From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/boost/tools/Jamfile.v2 | 55 + src/boost/tools/auto_index/build/Jamfile.v2 | 35 + .../auto_index/include/auto_index_helpers.qbk | 19 + src/boost/tools/auto_index/index.html | 15 + src/boost/tools/auto_index/src/auto_index.cpp | 783 + src/boost/tools/auto_index/src/auto_index.hpp | 137 + src/boost/tools/auto_index/src/file_scanning.cpp | 495 + src/boost/tools/auto_index/src/index_generator.cpp | 327 + src/boost/tools/auto_index/src/tiny_xml.cpp | 257 + src/boost/tools/auto_index/src/tiny_xml.hpp | 83 + src/boost/tools/auto_index/test/Jamfile.v2 | 62 + src/boost/tools/auto_index/test/index.idx | 26 + src/boost/tools/auto_index/test/test1.gold | 6671 + src/boost/tools/auto_index/test/test2.gold | 6671 + src/boost/tools/auto_index/test/test3.gold | 6671 + .../tools/auto_index/test/type_traits.docbook | 6673 + src/boost/tools/bcp/Jamfile.v2 | 36 + src/boost/tools/bcp/README.md | 24 + src/boost/tools/bcp/add_dependent_lib.cpp | 230 + src/boost/tools/bcp/add_path.cpp | 569 + src/boost/tools/bcp/bcp.hpp | 47 + src/boost/tools/bcp/bcp_imp.cpp | 300 + src/boost/tools/bcp/bcp_imp.hpp | 121 + src/boost/tools/bcp/copy_path.cpp | 248 + src/boost/tools/bcp/file_types.cpp | 72 + src/boost/tools/bcp/fileview.cpp | 143 + src/boost/tools/bcp/fileview.hpp | 72 + src/boost/tools/bcp/index.html | 17 + src/boost/tools/bcp/licence_info.cpp | 721 + src/boost/tools/bcp/licence_info.hpp | 39 + src/boost/tools/bcp/main.cpp | 183 + src/boost/tools/bcp/output_licence_info.cpp | 410 + src/boost/tools/bcp/path_operations.cpp | 41 + src/boost/tools/bcp/scan_cvs_path.cpp | 147 + src/boost/tools/bcp/scan_licence.cpp | 275 + src/boost/tools/bcp/test/Jamfile.v2 | 25 + src/boost/tools/boost_install/BoostConfig.cmake | 296 + .../tools/boost_install/BoostDetectToolset.cmake | 166 + src/boost/tools/boost_install/Jamfile | 10 + src/boost/tools/boost_install/README.md | 8 + .../tools/boost_install/boost-install-dirs.jam | 104 + src/boost/tools/boost_install/boost-install.jam | 1339 + .../tools/boost_install/test/BoostVersion.cmake | 1 + .../tools/boost_install/test/atomic/CMakeLists.txt | 37 + .../tools/boost_install/test/atomic/quick.cpp | 45 + .../tools/boost_install/test/chrono/CMakeLists.txt | 37 + .../tools/boost_install/test/chrono/quick.cpp | 16 + .../boost_install/test/container/CMakeLists.txt | 37 + .../tools/boost_install/test/container/quick.cpp | 25 + .../boost_install/test/filesystem/CMakeLists.txt | 45 + .../tools/boost_install/test/filesystem/quick.cpp | 24 + .../boost_install/test/headers/CMakeLists.txt | 34 + .../tools/boost_install/test/headers/quick.cpp | 10 + .../boost_install/test/iostreams/CMakeLists.txt | 41 + .../test/iostreams/bzip2-1.0.8/CHANGES | 356 + .../test/iostreams/bzip2-1.0.8/LICENSE | 42 + .../test/iostreams/bzip2-1.0.8/Makefile | 217 + .../test/iostreams/bzip2-1.0.8/Makefile-libbz2_so | 59 + .../test/iostreams/bzip2-1.0.8/README | 196 + .../bzip2-1.0.8/README.COMPILATION.PROBLEMS | 58 + .../test/iostreams/bzip2-1.0.8/README.XML.STUFF | 45 + .../test/iostreams/bzip2-1.0.8/blocksort.c | 1094 + .../test/iostreams/bzip2-1.0.8/bz-common.xsl | 39 + .../test/iostreams/bzip2-1.0.8/bz-fo.xsl | 276 + .../test/iostreams/bzip2-1.0.8/bz-html.xsl | 23 + .../test/iostreams/bzip2-1.0.8/bzdiff | 76 + .../test/iostreams/bzip2-1.0.8/bzdiff.1 | 47 + .../test/iostreams/bzip2-1.0.8/bzgrep | 85 + .../test/iostreams/bzip2-1.0.8/bzgrep.1 | 56 + .../test/iostreams/bzip2-1.0.8/bzip.css | 74 + .../test/iostreams/bzip2-1.0.8/bzip2.1 | 454 + .../iostreams/bzip2-1.0.8/bzip2.1.preformatted | 399 + .../test/iostreams/bzip2-1.0.8/bzip2.c | 2036 + .../test/iostreams/bzip2-1.0.8/bzip2.txt | 391 + .../test/iostreams/bzip2-1.0.8/bzip2recover.c | 516 + .../test/iostreams/bzip2-1.0.8/bzlib.c | 1572 + .../test/iostreams/bzip2-1.0.8/bzlib.h | 282 + .../test/iostreams/bzip2-1.0.8/bzlib_private.h | 509 + .../test/iostreams/bzip2-1.0.8/bzmore | 61 + .../test/iostreams/bzip2-1.0.8/bzmore.1 | 152 + .../test/iostreams/bzip2-1.0.8/compress.c | 672 + .../test/iostreams/bzip2-1.0.8/crctable.c | 104 + .../test/iostreams/bzip2-1.0.8/decompress.c | 652 + .../test/iostreams/bzip2-1.0.8/dlltest.c | 175 + .../test/iostreams/bzip2-1.0.8/dlltest.dsp | 93 + .../test/iostreams/bzip2-1.0.8/entities.xml | 10 + .../test/iostreams/bzip2-1.0.8/format.pl | 68 + .../test/iostreams/bzip2-1.0.8/huffman.c | 205 + .../test/iostreams/bzip2-1.0.8/libbz2.def | 27 + .../test/iostreams/bzip2-1.0.8/libbz2.dsp | 130 + .../test/iostreams/bzip2-1.0.8/makefile.msc | 63 + .../test/iostreams/bzip2-1.0.8/manual.html | 2541 + .../test/iostreams/bzip2-1.0.8/manual.pdf | Bin 0 -> 183803 bytes .../test/iostreams/bzip2-1.0.8/manual.ps | 216419 ++++++++++++++++++ .../test/iostreams/bzip2-1.0.8/manual.xml | 2964 + .../test/iostreams/bzip2-1.0.8/mk251.c | 31 + .../test/iostreams/bzip2-1.0.8/randtable.c | 84 + .../test/iostreams/bzip2-1.0.8/sample1.bz2 | Bin 0 -> 32348 bytes .../test/iostreams/bzip2-1.0.8/sample1.ref | Bin 0 -> 98696 bytes .../test/iostreams/bzip2-1.0.8/sample2.bz2 | Bin 0 -> 73732 bytes .../test/iostreams/bzip2-1.0.8/sample2.ref | Bin 0 -> 212340 bytes .../test/iostreams/bzip2-1.0.8/sample3.bz2 | Bin 0 -> 235 bytes .../test/iostreams/bzip2-1.0.8/sample3.ref | 30007 +++ .../test/iostreams/bzip2-1.0.8/spewG.c | 54 + .../test/iostreams/bzip2-1.0.8/unzcrash.c | 141 + .../test/iostreams/bzip2-1.0.8/words0 | 9 + .../test/iostreams/bzip2-1.0.8/words1 | 4 + .../test/iostreams/bzip2-1.0.8/words2 | 5 + .../test/iostreams/bzip2-1.0.8/words3 | 30 + .../test/iostreams/bzip2-1.0.8/xmlproc.sh | 114 + .../boost_install/test/iostreams/test.txt.bz2 | Bin 0 -> 57 bytes .../tools/boost_install/test/iostreams/test.txt.gz | Bin 0 -> 53 bytes .../boost_install/test/iostreams/test_bzip2.cpp | 29 + .../boost_install/test/iostreams/test_gzip.cpp | 29 + .../test/iostreams/zlib-1.2.11/CMakeLists.txt | 249 + .../test/iostreams/zlib-1.2.11/ChangeLog | 1515 + .../boost_install/test/iostreams/zlib-1.2.11/FAQ | 368 + .../boost_install/test/iostreams/zlib-1.2.11/INDEX | 68 + .../test/iostreams/zlib-1.2.11/Makefile | 5 + .../test/iostreams/zlib-1.2.11/Makefile.in | 410 + .../test/iostreams/zlib-1.2.11/README | 115 + .../test/iostreams/zlib-1.2.11/adler32.c | 186 + .../test/iostreams/zlib-1.2.11/amiga/Makefile.pup | 69 + .../test/iostreams/zlib-1.2.11/amiga/Makefile.sas | 68 + .../test/iostreams/zlib-1.2.11/compress.c | 86 + .../test/iostreams/zlib-1.2.11/configure | 921 + .../iostreams/zlib-1.2.11/contrib/README.contrib | 78 + .../zlib-1.2.11/contrib/ada/buffer_demo.adb | 106 + .../iostreams/zlib-1.2.11/contrib/ada/mtest.adb | 156 + .../iostreams/zlib-1.2.11/contrib/ada/read.adb | 156 + .../iostreams/zlib-1.2.11/contrib/ada/readme.txt | 65 + .../iostreams/zlib-1.2.11/contrib/ada/test.adb | 463 + .../zlib-1.2.11/contrib/ada/zlib-streams.adb | 225 + .../zlib-1.2.11/contrib/ada/zlib-streams.ads | 114 + .../zlib-1.2.11/contrib/ada/zlib-thin.adb | 141 + .../zlib-1.2.11/contrib/ada/zlib-thin.ads | 450 + .../iostreams/zlib-1.2.11/contrib/ada/zlib.adb | 701 + .../iostreams/zlib-1.2.11/contrib/ada/zlib.ads | 328 + .../iostreams/zlib-1.2.11/contrib/ada/zlib.gpr | 20 + .../zlib-1.2.11/contrib/amd64/amd64-match.S | 452 + .../zlib-1.2.11/contrib/asm686/README.686 | 51 + .../iostreams/zlib-1.2.11/contrib/asm686/match.S | 357 + .../iostreams/zlib-1.2.11/contrib/blast/Makefile | 8 + .../iostreams/zlib-1.2.11/contrib/blast/README | 4 + .../iostreams/zlib-1.2.11/contrib/blast/blast.c | 466 + .../iostreams/zlib-1.2.11/contrib/blast/blast.h | 83 + .../iostreams/zlib-1.2.11/contrib/blast/test.pk | Bin 0 -> 8 bytes .../iostreams/zlib-1.2.11/contrib/blast/test.txt | 1 + .../iostreams/zlib-1.2.11/contrib/delphi/ZLib.pas | 557 + .../zlib-1.2.11/contrib/delphi/ZLibConst.pas | 11 + .../zlib-1.2.11/contrib/delphi/readme.txt | 76 + .../zlib-1.2.11/contrib/delphi/zlibd32.mak | 99 + .../zlib-1.2.11/contrib/dotzlib/DotZLib.build | 33 + .../zlib-1.2.11/contrib/dotzlib/DotZLib.chm | Bin 0 -> 72726 bytes .../zlib-1.2.11/contrib/dotzlib/DotZLib.sln | 21 + .../contrib/dotzlib/DotZLib/AssemblyInfo.cs | 58 + .../contrib/dotzlib/DotZLib/ChecksumImpl.cs | 202 + .../contrib/dotzlib/DotZLib/CircularBuffer.cs | 83 + .../contrib/dotzlib/DotZLib/CodecBase.cs | 198 + .../contrib/dotzlib/DotZLib/Deflater.cs | 106 + .../zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs | 288 + .../contrib/dotzlib/DotZLib/DotZLib.csproj | 141 + .../contrib/dotzlib/DotZLib/GZipStream.cs | 301 + .../contrib/dotzlib/DotZLib/Inflater.cs | 105 + .../contrib/dotzlib/DotZLib/UnitTests.cs | 274 + .../zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt | 23 + .../zlib-1.2.11/contrib/dotzlib/readme.txt | 58 + .../zlib-1.2.11/contrib/gcc_gvmat64/gvmat64.S | 574 + .../iostreams/zlib-1.2.11/contrib/infback9/README | 1 + .../zlib-1.2.11/contrib/infback9/infback9.c | 615 + .../zlib-1.2.11/contrib/infback9/infback9.h | 37 + .../zlib-1.2.11/contrib/infback9/inffix9.h | 107 + .../zlib-1.2.11/contrib/infback9/inflate9.h | 47 + .../zlib-1.2.11/contrib/infback9/inftree9.c | 324 + .../zlib-1.2.11/contrib/infback9/inftree9.h | 61 + .../zlib-1.2.11/contrib/inflate86/inffas86.c | 1157 + .../zlib-1.2.11/contrib/inflate86/inffast.S | 1368 + .../zlib-1.2.11/contrib/iostream/test.cpp | 24 + .../zlib-1.2.11/contrib/iostream/zfstream.cpp | 329 + .../zlib-1.2.11/contrib/iostream/zfstream.h | 128 + .../zlib-1.2.11/contrib/iostream2/zstream.h | 307 + .../zlib-1.2.11/contrib/iostream2/zstream_test.cpp | 25 + .../iostreams/zlib-1.2.11/contrib/iostream3/README | 35 + .../iostreams/zlib-1.2.11/contrib/iostream3/TODO | 17 + .../zlib-1.2.11/contrib/iostream3/test.cc | 50 + .../zlib-1.2.11/contrib/iostream3/zfstream.cc | 479 + .../zlib-1.2.11/contrib/iostream3/zfstream.h | 466 + .../zlib-1.2.11/contrib/masmx64/bld_ml64.bat | 2 + .../zlib-1.2.11/contrib/masmx64/gvmat64.asm | 553 + .../zlib-1.2.11/contrib/masmx64/inffas8664.c | 186 + .../zlib-1.2.11/contrib/masmx64/inffasx64.asm | 396 + .../zlib-1.2.11/contrib/masmx64/readme.txt | 31 + .../zlib-1.2.11/contrib/masmx86/bld_ml32.bat | 2 + .../zlib-1.2.11/contrib/masmx86/inffas32.asm | 1080 + .../zlib-1.2.11/contrib/masmx86/match686.asm | 479 + .../zlib-1.2.11/contrib/masmx86/readme.txt | 27 + .../iostreams/zlib-1.2.11/contrib/minizip/Makefile | 25 + .../zlib-1.2.11/contrib/minizip/Makefile.am | 45 + .../contrib/minizip/MiniZip64_Changes.txt | 6 + .../zlib-1.2.11/contrib/minizip/MiniZip64_info.txt | 74 + .../zlib-1.2.11/contrib/minizip/configure.ac | 32 + .../iostreams/zlib-1.2.11/contrib/minizip/crypt.h | 131 + .../iostreams/zlib-1.2.11/contrib/minizip/ioapi.c | 247 + .../iostreams/zlib-1.2.11/contrib/minizip/ioapi.h | 208 + .../zlib-1.2.11/contrib/minizip/iowin32.c | 462 + .../zlib-1.2.11/contrib/minizip/iowin32.h | 28 + .../zlib-1.2.11/contrib/minizip/make_vms.com | 25 + .../zlib-1.2.11/contrib/minizip/miniunz.c | 660 + .../zlib-1.2.11/contrib/minizip/miniunzip.1 | 63 + .../zlib-1.2.11/contrib/minizip/minizip.1 | 46 + .../zlib-1.2.11/contrib/minizip/minizip.c | 520 + .../zlib-1.2.11/contrib/minizip/minizip.pc.in | 12 + .../zlib-1.2.11/contrib/minizip/mztools.c | 291 + .../zlib-1.2.11/contrib/minizip/mztools.h | 37 + .../iostreams/zlib-1.2.11/contrib/minizip/unzip.c | 2125 + .../iostreams/zlib-1.2.11/contrib/minizip/unzip.h | 437 + .../iostreams/zlib-1.2.11/contrib/minizip/zip.c | 2007 + .../iostreams/zlib-1.2.11/contrib/minizip/zip.h | 362 + .../zlib-1.2.11/contrib/pascal/example.pas | 599 + .../zlib-1.2.11/contrib/pascal/readme.txt | 76 + .../zlib-1.2.11/contrib/pascal/zlibd32.mak | 99 + .../zlib-1.2.11/contrib/pascal/zlibpas.pas | 276 + .../iostreams/zlib-1.2.11/contrib/puff/Makefile | 42 + .../test/iostreams/zlib-1.2.11/contrib/puff/README | 63 + .../test/iostreams/zlib-1.2.11/contrib/puff/puff.c | 840 + .../test/iostreams/zlib-1.2.11/contrib/puff/puff.h | 35 + .../iostreams/zlib-1.2.11/contrib/puff/pufftest.c | 165 + .../iostreams/zlib-1.2.11/contrib/puff/zeros.raw | Bin 0 -> 2517 bytes .../zlib-1.2.11/contrib/testzlib/testzlib.c | 275 + .../zlib-1.2.11/contrib/testzlib/testzlib.txt | 10 + .../iostreams/zlib-1.2.11/contrib/untgz/Makefile | 14 + .../zlib-1.2.11/contrib/untgz/Makefile.msc | 17 + .../iostreams/zlib-1.2.11/contrib/untgz/untgz.c | 674 + .../zlib-1.2.11/contrib/vstudio/readme.txt | 78 + .../contrib/vstudio/vc10/miniunz.vcxproj | 310 + .../contrib/vstudio/vc10/miniunz.vcxproj.filters | 22 + .../contrib/vstudio/vc10/minizip.vcxproj | 307 + .../contrib/vstudio/vc10/minizip.vcxproj.filters | 22 + .../contrib/vstudio/vc10/testzlib.vcxproj | 420 + .../contrib/vstudio/vc10/testzlib.vcxproj.filters | 58 + .../contrib/vstudio/vc10/testzlibdll.vcxproj | 310 + .../vstudio/vc10/testzlibdll.vcxproj.filters | 22 + .../zlib-1.2.11/contrib/vstudio/vc10/zlib.rc | 32 + .../contrib/vstudio/vc10/zlibstat.vcxproj | 473 + .../contrib/vstudio/vc10/zlibstat.vcxproj.filters | 77 + .../zlib-1.2.11/contrib/vstudio/vc10/zlibvc.def | 153 + .../zlib-1.2.11/contrib/vstudio/vc10/zlibvc.sln | 135 + .../contrib/vstudio/vc10/zlibvc.vcxproj | 657 + .../contrib/vstudio/vc10/zlibvc.vcxproj.filters | 118 + .../contrib/vstudio/vc11/miniunz.vcxproj | 314 + .../contrib/vstudio/vc11/minizip.vcxproj | 311 + .../contrib/vstudio/vc11/testzlib.vcxproj | 426 + .../contrib/vstudio/vc11/testzlibdll.vcxproj | 314 + .../zlib-1.2.11/contrib/vstudio/vc11/zlib.rc | 32 + .../contrib/vstudio/vc11/zlibstat.vcxproj | 464 + .../zlib-1.2.11/contrib/vstudio/vc11/zlibvc.def | 153 + .../zlib-1.2.11/contrib/vstudio/vc11/zlibvc.sln | 117 + .../contrib/vstudio/vc11/zlibvc.vcxproj | 688 + .../contrib/vstudio/vc12/miniunz.vcxproj | 316 + .../contrib/vstudio/vc12/minizip.vcxproj | 313 + .../contrib/vstudio/vc12/testzlib.vcxproj | 430 + .../contrib/vstudio/vc12/testzlibdll.vcxproj | 316 + .../zlib-1.2.11/contrib/vstudio/vc12/zlib.rc | 32 + .../contrib/vstudio/vc12/zlibstat.vcxproj | 467 + .../zlib-1.2.11/contrib/vstudio/vc12/zlibvc.def | 153 + .../zlib-1.2.11/contrib/vstudio/vc12/zlibvc.sln | 119 + .../contrib/vstudio/vc12/zlibvc.vcxproj | 692 + .../contrib/vstudio/vc14/miniunz.vcxproj | 316 + .../contrib/vstudio/vc14/minizip.vcxproj | 313 + .../contrib/vstudio/vc14/testzlib.vcxproj | 430 + .../contrib/vstudio/vc14/testzlibdll.vcxproj | 316 + .../zlib-1.2.11/contrib/vstudio/vc14/zlib.rc | 32 + .../contrib/vstudio/vc14/zlibstat.vcxproj | 467 + .../zlib-1.2.11/contrib/vstudio/vc14/zlibvc.def | 153 + .../zlib-1.2.11/contrib/vstudio/vc14/zlibvc.sln | 119 + .../contrib/vstudio/vc14/zlibvc.vcxproj | 692 + .../zlib-1.2.11/contrib/vstudio/vc9/miniunz.vcproj | 565 + .../zlib-1.2.11/contrib/vstudio/vc9/minizip.vcproj | 562 + .../contrib/vstudio/vc9/testzlib.vcproj | 852 + .../contrib/vstudio/vc9/testzlibdll.vcproj | 565 + .../zlib-1.2.11/contrib/vstudio/vc9/zlib.rc | 32 + .../contrib/vstudio/vc9/zlibstat.vcproj | 835 + .../zlib-1.2.11/contrib/vstudio/vc9/zlibvc.def | 153 + .../zlib-1.2.11/contrib/vstudio/vc9/zlibvc.sln | 144 + .../zlib-1.2.11/contrib/vstudio/vc9/zlibvc.vcproj | 1156 + .../test/iostreams/zlib-1.2.11/crc32.c | 442 + .../test/iostreams/zlib-1.2.11/crc32.h | 441 + .../test/iostreams/zlib-1.2.11/deflate.c | 2163 + .../test/iostreams/zlib-1.2.11/deflate.h | 349 + .../iostreams/zlib-1.2.11/examples/README.examples | 49 + .../test/iostreams/zlib-1.2.11/examples/enough.c | 572 + .../test/iostreams/zlib-1.2.11/examples/fitblk.c | 233 + .../test/iostreams/zlib-1.2.11/examples/gun.c | 702 + .../test/iostreams/zlib-1.2.11/examples/gzappend.c | 504 + .../test/iostreams/zlib-1.2.11/examples/gzjoin.c | 449 + .../test/iostreams/zlib-1.2.11/examples/gzlog.c | 1059 + .../test/iostreams/zlib-1.2.11/examples/gzlog.h | 91 + .../iostreams/zlib-1.2.11/examples/zlib_how.html | 545 + .../test/iostreams/zlib-1.2.11/examples/zpipe.c | 205 + .../test/iostreams/zlib-1.2.11/examples/zran.c | 409 + .../test/iostreams/zlib-1.2.11/gzclose.c | 25 + .../test/iostreams/zlib-1.2.11/gzguts.h | 218 + .../test/iostreams/zlib-1.2.11/gzlib.c | 637 + .../test/iostreams/zlib-1.2.11/gzread.c | 654 + .../test/iostreams/zlib-1.2.11/gzwrite.c | 665 + .../test/iostreams/zlib-1.2.11/infback.c | 640 + .../test/iostreams/zlib-1.2.11/inffast.c | 323 + .../test/iostreams/zlib-1.2.11/inffast.h | 11 + .../test/iostreams/zlib-1.2.11/inffixed.h | 94 + .../test/iostreams/zlib-1.2.11/inflate.c | 1561 + .../test/iostreams/zlib-1.2.11/inflate.h | 125 + .../test/iostreams/zlib-1.2.11/inftrees.c | 304 + .../test/iostreams/zlib-1.2.11/inftrees.h | 62 + .../test/iostreams/zlib-1.2.11/make_vms.com | 867 + .../test/iostreams/zlib-1.2.11/msdos/Makefile.bor | 115 + .../test/iostreams/zlib-1.2.11/msdos/Makefile.dj2 | 104 + .../test/iostreams/zlib-1.2.11/msdos/Makefile.emx | 69 + .../test/iostreams/zlib-1.2.11/msdos/Makefile.msc | 112 + .../test/iostreams/zlib-1.2.11/msdos/Makefile.tc | 100 + .../test/iostreams/zlib-1.2.11/nintendods/Makefile | 126 + .../test/iostreams/zlib-1.2.11/nintendods/README | 5 + .../test/iostreams/zlib-1.2.11/old/Makefile.emx | 69 + .../test/iostreams/zlib-1.2.11/old/Makefile.riscos | 151 + .../test/iostreams/zlib-1.2.11/old/README | 3 + .../test/iostreams/zlib-1.2.11/old/descrip.mms | 48 + .../iostreams/zlib-1.2.11/old/os2/Makefile.os2 | 136 + .../test/iostreams/zlib-1.2.11/old/os2/zlib.def | 51 + .../iostreams/zlib-1.2.11/old/visual-basic.txt | 160 + .../test/iostreams/zlib-1.2.11/os400/README400 | 48 + .../test/iostreams/zlib-1.2.11/os400/bndsrc | 119 + .../test/iostreams/zlib-1.2.11/os400/make.sh | 366 + .../test/iostreams/zlib-1.2.11/os400/zlib.inc | 527 + .../test/iostreams/zlib-1.2.11/qnx/package.qpg | 141 + .../test/iostreams/zlib-1.2.11/test/example.c | 602 + .../test/iostreams/zlib-1.2.11/test/infcover.c | 671 + .../test/iostreams/zlib-1.2.11/test/minigzip.c | 651 + .../test/iostreams/zlib-1.2.11/treebuild.xml | 116 + .../test/iostreams/zlib-1.2.11/trees.c | 1203 + .../test/iostreams/zlib-1.2.11/trees.h | 128 + .../test/iostreams/zlib-1.2.11/uncompr.c | 93 + .../test/iostreams/zlib-1.2.11/watcom/watcom_f.mak | 43 + .../test/iostreams/zlib-1.2.11/watcom/watcom_l.mak | 43 + .../test/iostreams/zlib-1.2.11/win32/DLL_FAQ.txt | 397 + .../test/iostreams/zlib-1.2.11/win32/Makefile.bor | 110 + .../test/iostreams/zlib-1.2.11/win32/Makefile.gcc | 182 + .../test/iostreams/zlib-1.2.11/win32/Makefile.msc | 163 + .../iostreams/zlib-1.2.11/win32/README-WIN32.txt | 103 + .../test/iostreams/zlib-1.2.11/win32/VisualC.txt | 3 + .../test/iostreams/zlib-1.2.11/win32/zlib.def | 94 + .../test/iostreams/zlib-1.2.11/win32/zlib1.rc | 40 + .../test/iostreams/zlib-1.2.11/zconf.h | 534 + .../test/iostreams/zlib-1.2.11/zconf.h.cmakein | 536 + .../test/iostreams/zlib-1.2.11/zconf.h.in | 534 + .../test/iostreams/zlib-1.2.11/zlib.3 | 149 + .../test/iostreams/zlib-1.2.11/zlib.3.pdf | Bin 0 -> 19318 bytes .../test/iostreams/zlib-1.2.11/zlib.h | 1912 + .../test/iostreams/zlib-1.2.11/zlib.map | 94 + .../test/iostreams/zlib-1.2.11/zlib.pc.cmakein | 13 + .../test/iostreams/zlib-1.2.11/zlib.pc.in | 13 + .../test/iostreams/zlib-1.2.11/zlib2ansi | 152 + .../test/iostreams/zlib-1.2.11/zutil.c | 325 + .../test/iostreams/zlib-1.2.11/zutil.h | 271 + .../tools/boost_install/test/log/CMakeLists.txt | 41 + src/boost/tools/boost_install/test/log/quick.cpp | 15 + .../tools/boost_install/test/mpi/CMakeLists.txt | 37 + src/boost/tools/boost_install/test/mpi/quick.cpp | 20 + .../test/program_options/CMakeLists.txt | 37 + .../boost_install/test/program_options/quick.cpp | 49 + .../tools/boost_install/test/python/CMakeLists.txt | 53 + .../tools/boost_install/test/python/quick.cpp | 27 + .../tools/boost_install/test/random/CMakeLists.txt | 40 + src/boost/tools/boost_install/test/random/lib.cpp | 18 + src/boost/tools/boost_install/test/random/main.cpp | 17 + .../tools/boost_install/test/regex/CMakeLists.txt | 50 + src/boost/tools/boost_install/test/regex/quick.cpp | 21 + .../test/serialization/CMakeLists.txt | 42 + .../boost_install/test/serialization/quick.cpp | 36 + .../boost_install/test/serialization/wquick.cpp | 36 + .../tools/boost_install/test/system/CMakeLists.txt | 37 + .../tools/boost_install/test/system/quick.cpp | 36 + .../tools/boost_install/test/test/CMakeLists.txt | 42 + .../tools/boost_install/test/test/test_mon.cpp | 14 + .../tools/boost_install/test/test/test_utf.cpp | 16 + .../tools/boost_install/test/thread/CMakeLists.txt | 27 + .../tools/boost_install/test/thread/quick.cpp | 27 + .../tools/boost_install/test/wave/CMakeLists.txt | 37 + src/boost/tools/boost_install/test/wave/quick.cpp | 49 + src/boost/tools/boostbook/dtd/1.1/boost-no-inspect | 4 + src/boost/tools/boostbook/dtd/1.1/boostbook.dtd | 435 + src/boost/tools/boostbook/dtd/boostbook.dtd | 439 + src/boost/tools/boostbook/index.html | 21 + src/boost/tools/boostbook/setup_boostbook.py | 300 + src/boost/tools/boostbook/setup_boostbook.sh | 181 + src/boost/tools/boostbook/test/Jamfile.v2 | 13 + src/boost/tools/boostbook/test/alt.xml | 47 + src/boost/tools/boostbook/test/doxygen/Jamfile.v2 | 41 + .../tools/boostbook/test/doxygen/autodoc.gold | 113 + .../tools/boostbook/test/doxygen/boost/example.hpp | 233 + src/boost/tools/boostbook/test/doxygen/example.xml | 13 + src/boost/tools/boostbook/xsl/admon.xsl | 36 + src/boost/tools/boostbook/xsl/annotation.xsl | 453 + src/boost/tools/boostbook/xsl/callout.xsl | 71 + src/boost/tools/boostbook/xsl/caramel/LICENSE | 58 + .../boostbook/xsl/caramel/concept2docbook.xsl | 812 + .../tools/boostbook/xsl/caramel/cpp-operators.xml | 288 + src/boost/tools/boostbook/xsl/caramel/unparser.xsl | 497 + src/boost/tools/boostbook/xsl/chunk-common.xsl | 126 + src/boost/tools/boostbook/xsl/docbook-layout.xsl | 262 + src/boost/tools/boostbook/xsl/docbook.xsl | 538 + src/boost/tools/boostbook/xsl/doxygen/collect.xsl | 58 + .../boostbook/xsl/doxygen/doxygen2boostbook.xsl | 1846 + .../tools/boostbook/xsl/dtd/dtd2boostbook.xsl | 217 + src/boost/tools/boostbook/xsl/error.xsl | 19 + src/boost/tools/boostbook/xsl/fo.xsl | 520 + src/boost/tools/boostbook/xsl/function.xsl | 1217 + src/boost/tools/boostbook/xsl/global.xsl | 80 + src/boost/tools/boostbook/xsl/html-base.xsl | 428 + src/boost/tools/boostbook/xsl/html-help.xsl | 49 + src/boost/tools/boostbook/xsl/html-single.xsl | 38 + src/boost/tools/boostbook/xsl/html.xsl | 37 + src/boost/tools/boostbook/xsl/index.xsl | 18 + src/boost/tools/boostbook/xsl/library.xsl | 129 + src/boost/tools/boostbook/xsl/lookup.xsl | 457 + src/boost/tools/boostbook/xsl/macro.xsl | 128 + src/boost/tools/boostbook/xsl/manpages.xsl | 195 + src/boost/tools/boostbook/xsl/navbar.xsl | 425 + src/boost/tools/boostbook/xsl/reference.xsl | 198 + src/boost/tools/boostbook/xsl/relative-href.xsl | 98 + src/boost/tools/boostbook/xsl/source-highlight.xsl | 578 + src/boost/tools/boostbook/xsl/template.xsl | 601 + src/boost/tools/boostbook/xsl/testing/Jamfile.xsl | 243 + .../tools/boostbook/xsl/testing/testsuite.xsl | 118 + src/boost/tools/boostbook/xsl/type.xsl | 1693 + src/boost/tools/boostbook/xsl/utility.xsl | 52 + src/boost/tools/boostbook/xsl/xhtml.xsl | 37 + src/boost/tools/boostbook/xsl/xref.xsl | 77 + src/boost/tools/boostdep/CMakeLists.txt | 15 + src/boost/tools/boostdep/README.md | 4 + src/boost/tools/boostdep/build/Jamfile | 11 + src/boost/tools/boostdep/depinst/depinst.py | 282 + src/boost/tools/boostdep/depinst/exceptions.txt | 411 + src/boost/tools/boostdep/examples/report.bat | 39 + src/boost/tools/boostdep/examples/report.css | 24 + src/boost/tools/boostdep/index.html | 15 + src/boost/tools/boostdep/src/boostdep.cpp | 3171 + src/boost/tools/boostdep/test/Jamfile | 12 + src/boost/tools/boostdep/test/assert-primary.txt | 11 + src/boost/tools/boostdep/test/bind-secondary.txt | 7 + src/boost/tools/boostdep/test/utf8-test.zip | Bin 0 -> 495 bytes src/boost/tools/build/CONTRIBUTING.adoc | 174 + src/boost/tools/build/Jamroot.jam | 267 + src/boost/tools/build/LICENSE.txt | 23 + src/boost/tools/build/README.adoc | 41 + src/boost/tools/build/azure-pipelines.yml | 427 + src/boost/tools/build/boost-build.jam | 8 + src/boost/tools/build/bootstrap.bat | 39 + src/boost/tools/build/bootstrap.sh | 28 + src/boost/tools/build/bootstrap_vms.com | 48 + .../tools/build/example/asciidoctor/example.adoc | 3 + .../build/example/asciidoctor/example_manpage.adoc | 38 + .../tools/build/example/asciidoctor/jamroot.jam | 11 + src/boost/tools/build/example/boost-build.jam | 6 + .../tools/build/example/built_tool/Jamroot.jam | 8 + .../build/example/built_tool/core/Jamfile.jam | 39 + src/boost/tools/build/example/built_tool/core/a.td | 0 .../tools/build/example/built_tool/core/core.cpp | 5 + .../tools/build/example/built_tool/readme.txt | 5 + .../build/example/built_tool/tblgen/Jamfile.jam | 4 + .../build/example/built_tool/tblgen/tblgen.cpp | 9 + .../build/example/complex-testing/compile-fail.cpp | 14 + .../tools/build/example/complex-testing/fail.cpp | 14 + .../build/example/complex-testing/jamroot.jam | 15 + .../tools/build/example/complex-testing/post.cpp | 14 + .../build/example/complex-testing/success.cpp | 14 + .../build/example/customization/class.verbatim | 7 + .../tools/build/example/customization/codegen.cpp | 36 + .../build/example/customization/inline_file.py | 44 + .../tools/build/example/customization/jamroot.jam | 9 + .../tools/build/example/customization/readme.txt | 11 + .../tools/build/example/customization/t1.verbatim | 2 + .../tools/build/example/customization/t2.verbatim | 0 .../build/example/customization/usage.verbatim | 5 + .../tools/build/example/customization/verbatim.jam | 61 + .../tools/build/example/customization/verbatim.py | 47 + src/boost/tools/build/example/generate/README.txt | 11 + src/boost/tools/build/example/generate/a.cpp | 10 + src/boost/tools/build/example/generate/gen.jam | 26 + src/boost/tools/build/example/generate/gen.py | 16 + src/boost/tools/build/example/generate/jamroot.jam | 9 + src/boost/tools/build/example/generator/README.txt | 6 + src/boost/tools/build/example/generator/foo.gci | 10 + .../tools/build/example/generator/jamroot.jam | 6 + src/boost/tools/build/example/generator/soap.jam | 86 + src/boost/tools/build/example/gettext/jamfile.jam | 26 + src/boost/tools/build/example/gettext/jamroot.jam | 6 + src/boost/tools/build/example/gettext/main.cpp | 28 + src/boost/tools/build/example/gettext/readme.txt | 24 + src/boost/tools/build/example/gettext/russian.po | 21 + src/boost/tools/build/example/hello/hello.cpp | 14 + src/boost/tools/build/example/hello/jamroot.jam | 1 + src/boost/tools/build/example/hello/readme.adoc | 46 + .../tools/build/example/libraries/app/app.cpp | 12 + .../tools/build/example/libraries/app/jamfile.jam | 9 + .../tools/build/example/libraries/jamroot.jam | 4 + .../tools/build/example/libraries/util/foo/bar.cpp | 10 + .../example/libraries/util/foo/include/lib1.h | 7 + .../build/example/libraries/util/foo/jamfile.jam | 9 + src/boost/tools/build/example/make/foo.py | 2 + src/boost/tools/build/example/make/jamroot.jam | 22 + src/boost/tools/build/example/make/main_cpp.pro | 1 + src/boost/tools/build/example/make/readme.txt | 7 + src/boost/tools/build/example/named-install-dirs/a | 0 .../build/example/named-install-dirs/build.jam | 54 + .../build/example/named-install-dirs/x/build.jam | 5 + .../build/example/named-install-dirs/x/y/build.jam | 9 + .../build/example/named-install-dirs/x/z/build.jam | 11 + .../build/example/pch-multi/include/extra/meta.hpp | 17 + .../tools/build/example/pch-multi/include/pch.hpp | 19 + .../tools/build/example/pch-multi/include/std.hpp | 16 + .../tools/build/example/pch-multi/jamroot.jam | 30 + .../build/example/pch-multi/source/hello_world.cpp | 17 + src/boost/tools/build/example/pch/include/pch.hpp | 19 + src/boost/tools/build/example/pch/jamroot.jam | 29 + .../tools/build/example/pch/source/hello_world.cpp | 15 + .../example/pkg-config/debug-packages/debugged.pc | 4 + .../tools/build/example/pkg-config/jamroot.jam | 104 + .../build/example/pkg-config/packages/debugged.pc | 4 + .../build/example/pkg-config/packages/foobar.pc | 4 + .../example/pkg-config/packages/mangled-mt.pc | 4 + .../build/example/pkg-config/packages/mangled.pc | 4 + .../build/example/pkg-config/packages/versioned.pc | 3 + .../build/example/pkg-config/packages/with-var.pc | 4 + src/boost/tools/build/example/pkg-config/test1.cpp | 11 + src/boost/tools/build/example/pkg-config/test2.cpp | 12 + src/boost/tools/build/example/pkg-config/test3.cpp | 12 + src/boost/tools/build/example/pkg-config/test4.cpp | 11 + src/boost/tools/build/example/pkg-config/test5.cpp | 12 + .../tools/build/example/python_modules/jamroot.jam | 8 + .../example/python_modules/python_helpers.jam | 15 + .../build/example/python_modules/python_helpers.py | 18 + .../tools/build/example/python_modules/readme.txt | 16 + src/boost/tools/build/example/qt/README.txt | 20 + .../tools/build/example/qt/qt3/hello/canvas.cpp | 73 + .../tools/build/example/qt/qt3/hello/canvas.h | 35 + .../tools/build/example/qt/qt3/hello/jamroot.jam | 13 + .../tools/build/example/qt/qt3/hello/main.cpp | 36 + .../build/example/qt/qt3/moccable-cpp/jamroot.jam | 11 + .../build/example/qt/qt3/moccable-cpp/main.cpp | 41 + .../build/example/qt/qt3/uic/hello_world_widget.ui | 58 + .../tools/build/example/qt/qt3/uic/jamroot.jam | 15 + src/boost/tools/build/example/qt/qt3/uic/main.cpp | 18 + .../tools/build/example/qt/qt4/hello/arrow.cpp | 158 + src/boost/tools/build/example/qt/qt4/hello/arrow.h | 30 + .../tools/build/example/qt/qt4/hello/jamroot.jam | 14 + .../tools/build/example/qt/qt4/hello/main.cpp | 27 + .../build/example/qt/qt4/moccable-cpp/jamroot.jam | 18 + .../build/example/qt/qt4/moccable-cpp/main.cpp | 39 + .../build/example/qt/qt4/uic/hello_world_widget.ui | 55 + .../tools/build/example/qt/qt4/uic/jamroot.jam | 18 + src/boost/tools/build/example/qt/qt4/uic/main.cpp | 23 + .../tools/build/example/sanitizers/jamroot.jam | 1 + src/boost/tools/build/example/sanitizers/main.cpp | 9 + .../tools/build/example/sanitizers/readme.adoc | 64 + src/boost/tools/build/example/sass/importing.scss | 3 + .../tools/build/example/sass/include/foobar.scss | 3 + src/boost/tools/build/example/sass/jamroot.jam | 15 + src/boost/tools/build/example/sass/singleton.sass | 12 + src/boost/tools/build/example/sass/singleton.scss | 11 + src/boost/tools/build/example/site-config.jam | 4 + .../tools/build/example/testing/compile-fail.cpp | 14 + src/boost/tools/build/example/testing/fail.cpp | 14 + src/boost/tools/build/example/testing/jamroot.jam | 10 + src/boost/tools/build/example/testing/success.cpp | 15 + src/boost/tools/build/example/time/hello.cpp | 12 + src/boost/tools/build/example/time/jamroot.jam | 16 + src/boost/tools/build/example/time/readme.qbk | 47 + .../tools/build/example/try_compile/Jamroot.jam | 29 + src/boost/tools/build/example/try_compile/foo.cpp | 6 + src/boost/tools/build/example/try_compile/main.cpp | 8 + src/boost/tools/build/example/user-config.jam | 92 + src/boost/tools/build/example/variant/a.cpp | 7 + src/boost/tools/build/example/variant/jamfile.jam | 11 + src/boost/tools/build/example/variant/jamroot.jam | 12 + .../tools/build/example/variant/libs/jamfile.jam | 8 + src/boost/tools/build/example/variant/libs/l.cpp | 9 + src/boost/tools/build/example/variant/readme.qbk | 94 + src/boost/tools/build/index.html | 5 + src/boost/tools/build/notes/README.txt | 8 + src/boost/tools/build/notes/build_dir_option.txt | 77 + src/boost/tools/build/notes/changes.txt | 317 + .../tools/build/notes/relative_source_paths.txt | 76 + src/boost/tools/build/notes/release_procedure.txt | 83 + src/boost/tools/build/src/__init__.py | 0 src/boost/tools/build/src/bootstrap.jam | 18 + src/boost/tools/build/src/build-system.jam | 1087 + src/boost/tools/build/src/build/__init__.py | 0 src/boost/tools/build/src/build/ac.jam | 326 + src/boost/tools/build/src/build/alias.jam | 82 + src/boost/tools/build/src/build/alias.py | 75 + src/boost/tools/build/src/build/build-request.jam | 418 + src/boost/tools/build/src/build/build_request.py | 222 + src/boost/tools/build/src/build/config-cache.jam | 78 + src/boost/tools/build/src/build/configure.jam | 629 + src/boost/tools/build/src/build/configure.py | 176 + src/boost/tools/build/src/build/engine.py | 246 + src/boost/tools/build/src/build/errors.py | 135 + src/boost/tools/build/src/build/feature.jam | 1442 + src/boost/tools/build/src/build/feature.py | 914 + src/boost/tools/build/src/build/generators.jam | 1453 + src/boost/tools/build/src/build/generators.py | 1209 + src/boost/tools/build/src/build/project.jam | 1357 + src/boost/tools/build/src/build/project.py | 1285 + src/boost/tools/build/src/build/property-set.jam | 604 + src/boost/tools/build/src/build/property.jam | 1005 + src/boost/tools/build/src/build/property.py | 750 + src/boost/tools/build/src/build/property_set.py | 498 + src/boost/tools/build/src/build/readme.txt | 11 + src/boost/tools/build/src/build/scanner.jam | 163 + src/boost/tools/build/src/build/scanner.py | 167 + src/boost/tools/build/src/build/targets.jam | 1820 + src/boost/tools/build/src/build/targets.py | 1523 + src/boost/tools/build/src/build/toolset.jam | 703 + src/boost/tools/build/src/build/toolset.py | 417 + src/boost/tools/build/src/build/type.jam | 410 + src/boost/tools/build/src/build/type.py | 381 + src/boost/tools/build/src/build/version.jam | 225 + src/boost/tools/build/src/build/version.py | 38 + src/boost/tools/build/src/build/virtual-target.jam | 1394 + src/boost/tools/build/src/build/virtual_target.py | 1175 + src/boost/tools/build/src/build_system.py | 682 + src/boost/tools/build/src/contrib/__init__.py | 0 src/boost/tools/build/src/contrib/boost.jam | 309 + src/boost/tools/build/src/contrib/boost.py | 280 + src/boost/tools/build/src/contrib/modular.jam | 288 + src/boost/tools/build/src/contrib/tntnet.jam | 208 + .../tools/build/src/contrib/wxFormBuilder.jam | 195 + src/boost/tools/build/src/engine/boost-jam.spec | 64 + src/boost/tools/build/src/engine/boost-no-inspect | 1 + src/boost/tools/build/src/engine/build.bat | 195 + src/boost/tools/build/src/engine/build.sh | 511 + src/boost/tools/build/src/engine/build_vms.com | 153 + src/boost/tools/build/src/engine/builtins.cpp | 2631 + src/boost/tools/build/src/engine/builtins.h | 74 + src/boost/tools/build/src/engine/bump_version.py | 98 + src/boost/tools/build/src/engine/check_clib.cpp | 19 + src/boost/tools/build/src/engine/check_cxx11.cpp | 31 + src/boost/tools/build/src/engine/class.cpp | 192 + src/boost/tools/build/src/engine/class.h | 15 + src/boost/tools/build/src/engine/command.cpp | 120 + src/boost/tools/build/src/engine/command.h | 108 + src/boost/tools/build/src/engine/compile.cpp | 231 + src/boost/tools/build/src/engine/compile.h | 60 + src/boost/tools/build/src/engine/config.h | 60 + .../tools/build/src/engine/config_toolset.bat | 238 + src/boost/tools/build/src/engine/constants.cpp | 199 + src/boost/tools/build/src/engine/constants.h | 78 + src/boost/tools/build/src/engine/cwd.cpp | 101 + src/boost/tools/build/src/engine/cwd.h | 42 + src/boost/tools/build/src/engine/debian/changelog | 72 + src/boost/tools/build/src/engine/debian/control | 16 + src/boost/tools/build/src/engine/debian/copyright | 25 + .../tools/build/src/engine/debian/jam.man.sgml | 236 + src/boost/tools/build/src/engine/debian/rules | 73 + src/boost/tools/build/src/engine/debug.cpp | 158 + src/boost/tools/build/src/engine/debug.h | 63 + src/boost/tools/build/src/engine/debugger.cpp | 2737 + src/boost/tools/build/src/engine/debugger.h | 64 + src/boost/tools/build/src/engine/execcmd.cpp | 122 + src/boost/tools/build/src/engine/execcmd.h | 119 + src/boost/tools/build/src/engine/execnt.cpp | 1389 + src/boost/tools/build/src/engine/execunix.cpp | 614 + src/boost/tools/build/src/engine/execvms.cpp | 426 + src/boost/tools/build/src/engine/filent.cpp | 517 + src/boost/tools/build/src/engine/filesys.cpp | 708 + src/boost/tools/build/src/engine/filesys.h | 125 + src/boost/tools/build/src/engine/fileunix.cpp | 533 + src/boost/tools/build/src/engine/filevms.cpp | 440 + src/boost/tools/build/src/engine/frames.cpp | 29 + src/boost/tools/build/src/engine/frames.h | 46 + src/boost/tools/build/src/engine/function.cpp | 5560 + src/boost/tools/build/src/engine/function.h | 53 + src/boost/tools/build/src/engine/glob.cpp | 152 + src/boost/tools/build/src/engine/guess_toolset.bat | 107 + src/boost/tools/build/src/engine/hash.cpp | 388 + src/boost/tools/build/src/engine/hash.h | 99 + src/boost/tools/build/src/engine/hcache.cpp | 534 + src/boost/tools/build/src/engine/hcache.h | 20 + src/boost/tools/build/src/engine/hdrmacro.cpp | 146 + src/boost/tools/build/src/engine/hdrmacro.h | 22 + src/boost/tools/build/src/engine/headers.cpp | 207 + src/boost/tools/build/src/engine/headers.h | 26 + src/boost/tools/build/src/engine/jam.cpp | 723 + src/boost/tools/build/src/engine/jam.h | 533 + src/boost/tools/build/src/engine/jam_strings.cpp | 240 + src/boost/tools/build/src/engine/jam_strings.h | 38 + src/boost/tools/build/src/engine/jamgram.cpp | 2287 + src/boost/tools/build/src/engine/jamgram.hpp | 176 + src/boost/tools/build/src/engine/jamgram.y | 386 + src/boost/tools/build/src/engine/jamgram.yy | 340 + src/boost/tools/build/src/engine/jamgramtab.h | 46 + src/boost/tools/build/src/engine/lists.cpp | 455 + src/boost/tools/build/src/engine/lists.h | 182 + src/boost/tools/build/src/engine/make.cpp | 931 + src/boost/tools/build/src/engine/make.h | 45 + src/boost/tools/build/src/engine/make1.cpp | 1515 + src/boost/tools/build/src/engine/md5.cpp | 381 + src/boost/tools/build/src/engine/md5.h | 93 + src/boost/tools/build/src/engine/mem.cpp | 8 + src/boost/tools/build/src/engine/mem.h | 170 + src/boost/tools/build/src/engine/modules.cpp | 434 + src/boost/tools/build/src/engine/modules.h | 57 + src/boost/tools/build/src/engine/modules/order.cpp | 159 + src/boost/tools/build/src/engine/modules/path.cpp | 25 + .../build/src/engine/modules/property-set.cpp | 334 + .../tools/build/src/engine/modules/readme.txt | 3 + src/boost/tools/build/src/engine/modules/regex.cpp | 233 + .../tools/build/src/engine/modules/sequence.cpp | 96 + src/boost/tools/build/src/engine/modules/set.cpp | 43 + src/boost/tools/build/src/engine/native.cpp | 34 + src/boost/tools/build/src/engine/native.h | 35 + src/boost/tools/build/src/engine/object.cpp | 404 + src/boost/tools/build/src/engine/object.h | 80 + src/boost/tools/build/src/engine/option.cpp | 94 + src/boost/tools/build/src/engine/option.h | 25 + src/boost/tools/build/src/engine/output.cpp | 192 + src/boost/tools/build/src/engine/output.h | 46 + src/boost/tools/build/src/engine/parse.cpp | 147 + src/boost/tools/build/src/engine/parse.h | 81 + src/boost/tools/build/src/engine/patchlevel.h | 16 + src/boost/tools/build/src/engine/pathnt.cpp | 413 + src/boost/tools/build/src/engine/pathsys.cpp | 469 + src/boost/tools/build/src/engine/pathsys.h | 123 + src/boost/tools/build/src/engine/pathunix.cpp | 91 + src/boost/tools/build/src/engine/pathvms.cpp | 254 + src/boost/tools/build/src/engine/regexp.cpp | 1330 + src/boost/tools/build/src/engine/regexp.h | 36 + src/boost/tools/build/src/engine/rules.cpp | 735 + src/boost/tools/build/src/engine/rules.h | 294 + src/boost/tools/build/src/engine/scan.cpp | 738 + src/boost/tools/build/src/engine/scan.h | 71 + src/boost/tools/build/src/engine/search.cpp | 275 + src/boost/tools/build/src/engine/search.h | 23 + src/boost/tools/build/src/engine/startup.cpp | 270 + src/boost/tools/build/src/engine/startup.h | 46 + src/boost/tools/build/src/engine/subst.cpp | 116 + src/boost/tools/build/src/engine/subst.h | 15 + src/boost/tools/build/src/engine/sysinfo.cpp | 168 + src/boost/tools/build/src/engine/sysinfo.h | 46 + src/boost/tools/build/src/engine/timestamp.cpp | 231 + src/boost/tools/build/src/engine/timestamp.h | 48 + src/boost/tools/build/src/engine/variable.cpp | 393 + src/boost/tools/build/src/engine/variable.h | 111 + .../build/src/engine/vswhere_usability_wrapper.cmd | 73 + src/boost/tools/build/src/engine/w32_getreg.cpp | 201 + src/boost/tools/build/src/engine/yyacc.cpp | 219 + src/boost/tools/build/src/exceptions.py | 55 + src/boost/tools/build/src/kernel/boost-build.jam | 5 + src/boost/tools/build/src/kernel/bootstrap.jam | 265 + src/boost/tools/build/src/kernel/bootstrap.py | 25 + src/boost/tools/build/src/kernel/class.jam | 420 + src/boost/tools/build/src/kernel/errors.jam | 287 + src/boost/tools/build/src/kernel/modules.jam | 364 + src/boost/tools/build/src/manager.py | 110 + src/boost/tools/build/src/options/help.jam | 222 + src/boost/tools/build/src/tools/__init__.py | 0 src/boost/tools/build/src/tools/acc.jam | 160 + src/boost/tools/build/src/tools/asciidoctor.jam | 212 + src/boost/tools/build/src/tools/auto-index.jam | 204 + src/boost/tools/build/src/tools/bison.jam | 26 + .../tools/build/src/tools/boostbook-config.jam | 13 + src/boost/tools/build/src/tools/boostbook.jam | 740 + src/boost/tools/build/src/tools/borland.jam | 322 + src/boost/tools/build/src/tools/builtin.jam | 96 + src/boost/tools/build/src/tools/builtin.py | 816 + src/boost/tools/build/src/tools/bzip2.jam | 279 + src/boost/tools/build/src/tools/cast.jam | 91 + src/boost/tools/build/src/tools/cast.py | 76 + src/boost/tools/build/src/tools/clang-darwin.jam | 141 + src/boost/tools/build/src/tools/clang-linux.jam | 185 + src/boost/tools/build/src/tools/clang-vxworks.jam | 123 + src/boost/tools/build/src/tools/clang-win.jam | 247 + src/boost/tools/build/src/tools/clang.jam | 68 + src/boost/tools/build/src/tools/common.jam | 1196 + src/boost/tools/build/src/tools/common.py | 860 + src/boost/tools/build/src/tools/como-linux.jam | 103 + src/boost/tools/build/src/tools/como-win.jam | 117 + src/boost/tools/build/src/tools/como.jam | 75 + src/boost/tools/build/src/tools/convert.jam | 62 + src/boost/tools/build/src/tools/cray.jam | 1158 + src/boost/tools/build/src/tools/cw-config.jam | 34 + src/boost/tools/build/src/tools/cw.jam | 304 + src/boost/tools/build/src/tools/cygwin.jam | 12 + src/boost/tools/build/src/tools/darwin.jam | 511 + src/boost/tools/build/src/tools/darwin.py | 57 + src/boost/tools/build/src/tools/diab.jam | 131 + src/boost/tools/build/src/tools/dmc.jam | 174 + src/boost/tools/build/src/tools/docutils.jam | 125 + src/boost/tools/build/src/tools/doxproc.py | 859 + src/boost/tools/build/src/tools/doxygen-config.jam | 11 + src/boost/tools/build/src/tools/doxygen.jam | 782 + .../src/tools/doxygen/windows-paths-check.doxyfile | 3 + .../src/tools/doxygen/windows-paths-check.hpp | 0 src/boost/tools/build/src/tools/embarcadero.jam | 640 + src/boost/tools/build/src/tools/emscripten.jam | 105 + .../build/src/tools/features/__init_features__.jam | 23 + .../src/tools/features/address-model-feature.jam | 22 + .../build/src/tools/features/allow-feature.jam | 19 + .../src/tools/features/architecture-feature.jam | 52 + .../src/tools/features/archiveflags-feature.jam | 18 + .../build/src/tools/features/asmflags-feature.jam | 17 + .../build/src/tools/features/build-feature.jam | 22 + .../build/src/tools/features/cflags-feature.jam | 21 + .../src/tools/features/compileflags-feature.jam | 19 + .../src/tools/features/conditional-feature.jam | 31 + .../build/src/tools/features/coverage-feature.jam | 22 + .../tools/features/cxx-template-depth-feature.jam | 39 + .../build/src/tools/features/cxxabi-feature.jam | 18 + .../build/src/tools/features/cxxflags-feature.jam | 17 + .../build/src/tools/features/cxxstd-feature.jam | 50 + .../build/src/tools/features/debug-feature.jam | 34 + .../build/src/tools/features/define-feature.jam | 30 + .../src/tools/features/dependency-feature.jam | 62 + .../tools/build/src/tools/features/dll-feature.jam | 73 + .../build/src/tools/features/exception-feature.jam | 47 + .../build/src/tools/features/fflags-feature.jam | 18 + .../build/src/tools/features/file-feature.jam | 18 + .../build/src/tools/features/find-lib-feature.jam | 42 + .../build/src/tools/features/flags-feature.jam | 19 + .../src/tools/features/force-include-feature.jam | 21 + .../build/src/tools/features/include-feature.jam | 19 + .../src/tools/features/instruction-set-feature.jam | 73 + .../build/src/tools/features/internal-feature.jam | 19 + .../build/src/tools/features/library-feature.jam | 22 + .../build/src/tools/features/link-feature.jam | 19 + .../build/src/tools/features/linkflags-feature.jam | 17 + .../tools/features/local-visibility-feature.jam | 27 + .../build/src/tools/features/location-feature.jam | 18 + .../src/tools/features/location-prefix-feature.jam | 18 + .../tools/build/src/tools/features/lto-feature.jam | 46 + .../build/src/tools/features/name-feature.jam | 22 + .../build/src/tools/features/objcflags-feature.jam | 32 + .../src/tools/features/optimization-feature.jam | 46 + .../tools/build/src/tools/features/os-feature.jam | 95 + .../build/src/tools/features/relevant-feature.jam | 48 + .../src/tools/features/response-file-feature.jam | 28 + .../build/src/tools/features/rtti-feature.jam | 19 + .../build/src/tools/features/runtime-feature.jam | 40 + .../src/tools/features/sanitizers-feature.jam | 63 + .../build/src/tools/features/search-feature.jam | 20 + .../build/src/tools/features/source-feature.jam | 22 + .../build/src/tools/features/stdlib-feature.jam | 29 + .../build/src/tools/features/strip-feature.jam | 25 + .../tools/build/src/tools/features/tag-feature.jam | 39 + .../build/src/tools/features/threadapi-feature.jam | 39 + .../build/src/tools/features/threading-feature.jam | 24 + .../build/src/tools/features/toolset-feature.jam | 20 + .../src/tools/features/translate-path-feature.jam | 34 + .../src/tools/features/user-interface-feature.jam | 28 + .../build/src/tools/features/variant-feature.jam | 114 + .../build/src/tools/features/version-feature.jam | 19 + .../src/tools/features/visibility-feature.jam | 46 + .../build/src/tools/features/warnings-feature.jam | 41 + src/boost/tools/build/src/tools/flags.jam | 152 + src/boost/tools/build/src/tools/fop.jam | 69 + src/boost/tools/build/src/tools/fortran.jam | 55 + src/boost/tools/build/src/tools/gcc.jam | 1268 + src/boost/tools/build/src/tools/gcc.py | 875 + src/boost/tools/build/src/tools/generate.jam | 111 + .../src/tools/generators/__init_generators__.jam | 23 + .../src/tools/generators/archive-generator.jam | 74 + .../src/tools/generators/c-compiling-generator.jam | 70 + .../build/src/tools/generators/dummy-generator.jam | 20 + .../build/src/tools/generators/lib-generator.jam | 121 + .../src/tools/generators/linking-generator.jam | 179 + .../tools/generators/prebuilt-lib-generator.jam | 29 + .../tools/generators/searched-lib-generator.jam | 97 + src/boost/tools/build/src/tools/gettext.jam | 230 + src/boost/tools/build/src/tools/gfortran.jam | 39 + src/boost/tools/build/src/tools/hp_cxx.jam | 222 + src/boost/tools/build/src/tools/hpfortran.jam | 35 + src/boost/tools/build/src/tools/ifort.jam | 44 + src/boost/tools/build/src/tools/intel-darwin.jam | 188 + src/boost/tools/build/src/tools/intel-linux.jam | 311 + src/boost/tools/build/src/tools/intel-vxworks.jam | 192 + src/boost/tools/build/src/tools/intel-win.jam | 544 + src/boost/tools/build/src/tools/intel.jam | 85 + src/boost/tools/build/src/tools/lex.jam | 25 + src/boost/tools/build/src/tools/libjpeg.jam | 234 + src/boost/tools/build/src/tools/libpng.jam | 229 + src/boost/tools/build/src/tools/libtiff.jam | 227 + src/boost/tools/build/src/tools/link.jam | 547 + src/boost/tools/build/src/tools/lzma.jam | 134 + src/boost/tools/build/src/tools/make.jam | 69 + src/boost/tools/build/src/tools/make.py | 59 + src/boost/tools/build/src/tools/mc.jam | 44 + src/boost/tools/build/src/tools/mc.py | 46 + src/boost/tools/build/src/tools/message.jam | 62 + src/boost/tools/build/src/tools/message.py | 54 + src/boost/tools/build/src/tools/midl.jam | 142 + src/boost/tools/build/src/tools/midl.py | 134 + src/boost/tools/build/src/tools/mipspro.jam | 148 + src/boost/tools/build/src/tools/mpi.jam | 637 + src/boost/tools/build/src/tools/msvc-config.jam | 12 + src/boost/tools/build/src/tools/msvc.jam | 2217 + src/boost/tools/build/src/tools/msvc.py | 1314 + src/boost/tools/build/src/tools/notfile.jam | 65 + src/boost/tools/build/src/tools/notfile.py | 51 + src/boost/tools/build/src/tools/openssl.jam | 140 + src/boost/tools/build/src/tools/package.jam | 274 + src/boost/tools/build/src/tools/package.py | 168 + src/boost/tools/build/src/tools/pathscale.jam | 180 + src/boost/tools/build/src/tools/pch.jam | 95 + src/boost/tools/build/src/tools/pch.py | 83 + src/boost/tools/build/src/tools/pgi.jam | 141 + src/boost/tools/build/src/tools/pkg-config.jam | 486 + src/boost/tools/build/src/tools/python-config.jam | 27 + src/boost/tools/build/src/tools/python.jam | 1345 + src/boost/tools/build/src/tools/qcc.jam | 299 + src/boost/tools/build/src/tools/qt.jam | 17 + src/boost/tools/build/src/tools/qt3.jam | 209 + src/boost/tools/build/src/tools/qt4.jam | 755 + src/boost/tools/build/src/tools/qt5.jam | 799 + .../tools/build/src/tools/quickbook-config.jam | 44 + src/boost/tools/build/src/tools/quickbook.jam | 363 + src/boost/tools/build/src/tools/rc.jam | 155 + src/boost/tools/build/src/tools/rc.py | 197 + src/boost/tools/build/src/tools/sass.jam | 193 + src/boost/tools/build/src/tools/saxonhe.jam | 53 + src/boost/tools/build/src/tools/stage.jam | 905 + src/boost/tools/build/src/tools/stage.py | 350 + src/boost/tools/build/src/tools/stlport.jam | 312 + src/boost/tools/build/src/tools/sun.jam | 226 + src/boost/tools/build/src/tools/symlink.jam | 140 + src/boost/tools/build/src/tools/symlink.py | 112 + src/boost/tools/build/src/tools/testing-aux.jam | 344 + src/boost/tools/build/src/tools/testing.jam | 847 + src/boost/tools/build/src/tools/testing.py | 359 + src/boost/tools/build/src/tools/types/__init__.py | 19 + src/boost/tools/build/src/tools/types/adoc.jam | 26 + src/boost/tools/build/src/tools/types/asm.jam | 4 + src/boost/tools/build/src/tools/types/asm.py | 33 + src/boost/tools/build/src/tools/types/cpp.jam | 93 + src/boost/tools/build/src/tools/types/cpp.py | 11 + src/boost/tools/build/src/tools/types/css.jam | 10 + src/boost/tools/build/src/tools/types/docbook.jam | 10 + src/boost/tools/build/src/tools/types/exe.jam | 9 + src/boost/tools/build/src/tools/types/exe.py | 11 + src/boost/tools/build/src/tools/types/html.jam | 4 + src/boost/tools/build/src/tools/types/html.py | 10 + src/boost/tools/build/src/tools/types/lib.jam | 74 + src/boost/tools/build/src/tools/types/lib.py | 77 + src/boost/tools/build/src/tools/types/man.jam | 8 + src/boost/tools/build/src/tools/types/markdown.jam | 4 + src/boost/tools/build/src/tools/types/markdown.py | 10 + src/boost/tools/build/src/tools/types/obj.jam | 9 + src/boost/tools/build/src/tools/types/obj.py | 11 + src/boost/tools/build/src/tools/types/objc.jam | 26 + src/boost/tools/build/src/tools/types/pdf.jam | 8 + .../tools/build/src/tools/types/preprocessed.jam | 10 + .../tools/build/src/tools/types/preprocessed.py | 11 + src/boost/tools/build/src/tools/types/qt.jam | 14 + src/boost/tools/build/src/tools/types/register.jam | 39 + src/boost/tools/build/src/tools/types/rsp.jam | 4 + src/boost/tools/build/src/tools/types/rsp.py | 10 + .../tools/build/src/tools/types/sass-type.jam | 49 + src/boost/tools/build/src/tools/types/xml.jam | 49 + src/boost/tools/build/src/tools/unix.jam | 223 + src/boost/tools/build/src/tools/unix.py | 155 + src/boost/tools/build/src/tools/vacpp.jam | 173 + src/boost/tools/build/src/tools/vmsdecc.jam | 580 + src/boost/tools/build/src/tools/whale.jam | 116 + src/boost/tools/build/src/tools/xlcpp.jam | 168 + src/boost/tools/build/src/tools/xlf.jam | 39 + .../tools/build/src/tools/xsltproc-config.jam | 36 + src/boost/tools/build/src/tools/xsltproc.jam | 232 + .../tools/build/src/tools/xsltproc/included.xsl | 11 + src/boost/tools/build/src/tools/xsltproc/test.xml | 2 + src/boost/tools/build/src/tools/xsltproc/test.xsl | 12 + src/boost/tools/build/src/tools/zlib.jam | 235 + src/boost/tools/build/src/tools/zstd.jam | 100 + src/boost/tools/build/src/util/__init__.py | 321 + src/boost/tools/build/src/util/assert.jam | 346 + src/boost/tools/build/src/util/container.jam | 339 + src/boost/tools/build/src/util/doc.jam | 1076 + src/boost/tools/build/src/util/indirect.jam | 167 + src/boost/tools/build/src/util/indirect.py | 15 + src/boost/tools/build/src/util/logger.py | 46 + src/boost/tools/build/src/util/numbers.jam | 241 + src/boost/tools/build/src/util/option.jam | 109 + src/boost/tools/build/src/util/option.py | 35 + src/boost/tools/build/src/util/order.jam | 173 + src/boost/tools/build/src/util/order.py | 121 + src/boost/tools/build/src/util/os.jam | 208 + src/boost/tools/build/src/util/os_j.py | 24 + src/boost/tools/build/src/util/param.jam | 54 + src/boost/tools/build/src/util/path.jam | 1015 + src/boost/tools/build/src/util/path.py | 937 + src/boost/tools/build/src/util/print.jam | 508 + src/boost/tools/build/src/util/regex.jam | 208 + src/boost/tools/build/src/util/regex.py | 63 + src/boost/tools/build/src/util/sequence.jam | 378 + src/boost/tools/build/src/util/sequence.py | 58 + src/boost/tools/build/src/util/set.jam | 93 + src/boost/tools/build/src/util/set.py | 48 + src/boost/tools/build/src/util/string.jam | 189 + src/boost/tools/build/src/util/utility.jam | 235 + src/boost/tools/build/src/util/utility.py | 176 + src/boost/tools/build/test/BoostBuild.py | 1381 + src/boost/tools/build/test/Jamfile.jam | 29 + src/boost/tools/build/test/MockToolset.py | 267 + src/boost/tools/build/test/TestCmd.py | 609 + src/boost/tools/build/test/TestToolset.py | 134 + src/boost/tools/build/test/abs_workdir.py | 39 + src/boost/tools/build/test/absolute_sources.py | 73 + src/boost/tools/build/test/alias.py | 116 + src/boost/tools/build/test/alternatives.py | 129 + src/boost/tools/build/test/always.py | 34 + src/boost/tools/build/test/bad_dirname.py | 22 + src/boost/tools/build/test/boost-build.jam | 14 + src/boost/tools/build/test/boostbook.py | 23 + src/boost/tools/build/test/boostbook/a.hpp | 16 + src/boost/tools/build/test/boostbook/docs.xml | 36 + src/boost/tools/build/test/boostbook/jamroot.jam | 3 + src/boost/tools/build/test/build_dir.py | 107 + src/boost/tools/build/test/build_file.py | 170 + src/boost/tools/build/test/build_hooks.py | 39 + src/boost/tools/build/test/build_no.py | 23 + src/boost/tools/build/test/builtin_echo.py | 30 + src/boost/tools/build/test/builtin_exit.py | 42 + src/boost/tools/build/test/builtin_glob.py | 87 + src/boost/tools/build/test/builtin_glob_archive.py | 217 + src/boost/tools/build/test/builtin_readlink.py | 31 + .../build/test/builtin_split_by_characters.py | 57 + src/boost/tools/build/test/bzip2.py | 119 + src/boost/tools/build/test/c_file.py | 36 + src/boost/tools/build/test/chain.py | 56 + src/boost/tools/build/test/clean.py | 104 + .../tools/build/test/cli_property_expansion.py | 41 + src/boost/tools/build/test/collect_debug_info.py | 341 + .../tools/build/test/command_line_properties.py | 166 + src/boost/tools/build/test/composite.py | 25 + src/boost/tools/build/test/conditionals.py | 48 + src/boost/tools/build/test/conditionals2.py | 43 + src/boost/tools/build/test/conditionals3.py | 30 + src/boost/tools/build/test/conditionals4.py | 45 + .../tools/build/test/conditionals_multiple.py | 312 + src/boost/tools/build/test/configuration.py | 397 + src/boost/tools/build/test/configure.py | 267 + src/boost/tools/build/test/copy_time.py | 69 + src/boost/tools/build/test/core-language/test.jam | 1571 + src/boost/tools/build/test/core_action_output.py | 62 + src/boost/tools/build/test/core_action_status.py | 27 + src/boost/tools/build/test/core_actions_quietly.py | 61 + src/boost/tools/build/test/core_arguments.py | 105 + src/boost/tools/build/test/core_at_file.py | 64 + src/boost/tools/build/test/core_bindrule.py | 45 + src/boost/tools/build/test/core_d12.py | 32 + src/boost/tools/build/test/core_delete_module.py | 51 + src/boost/tools/build/test/core_dependencies.py | 157 + src/boost/tools/build/test/core_fail_expected.py | 139 + src/boost/tools/build/test/core_import_module.py | 82 + src/boost/tools/build/test/core_jamshell.py | 55 + src/boost/tools/build/test/core_language.py | 12 + src/boost/tools/build/test/core_modifiers.py | 50 + .../tools/build/test/core_multifile_actions.py | 202 + src/boost/tools/build/test/core_nt_cmd_line.py | 266 + src/boost/tools/build/test/core_option_d2.py | 55 + src/boost/tools/build/test/core_option_l.py | 44 + src/boost/tools/build/test/core_option_n.py | 51 + .../tools/build/test/core_parallel_actions.py | 103 + .../test/core_parallel_multifile_actions_1.py | 78 + .../test/core_parallel_multifile_actions_2.py | 71 + src/boost/tools/build/test/core_scanner.py | 36 + .../tools/build/test/core_source_line_tracking.py | 74 + .../build/test/core_syntax_error_exit_status.py | 23 + src/boost/tools/build/test/core_typecheck.py | 47 + src/boost/tools/build/test/core_update_now.py | 377 + .../tools/build/test/core_variables_in_actions.py | 39 + src/boost/tools/build/test/core_varnames.py | 38 + src/boost/tools/build/test/custom_generator.py | 66 + src/boost/tools/build/test/debugger-mi.py | 326 + src/boost/tools/build/test/debugger.py | 674 + src/boost/tools/build/test/default_build.py | 81 + src/boost/tools/build/test/default_features.py | 50 + src/boost/tools/build/test/default_toolset.py | 215 + src/boost/tools/build/test/dependency_property.py | 38 + src/boost/tools/build/test/dependency_test.py | 243 + src/boost/tools/build/test/disambiguation.py | 32 + src/boost/tools/build/test/dll_path.py | 163 + src/boost/tools/build/test/double_loading.py | 31 + src/boost/tools/build/test/duplicate.py | 38 + .../tools/build/test/example_customization.py | 21 + src/boost/tools/build/test/example_gettext.py | 30 + src/boost/tools/build/test/example_libraries.py | 21 + src/boost/tools/build/test/example_make.py | 17 + src/boost/tools/build/test/example_qt4.py | 26 + src/boost/tools/build/test/exit_status.py | 26 + src/boost/tools/build/test/expansion.py | 140 + src/boost/tools/build/test/explicit.py | 59 + src/boost/tools/build/test/feature_cxxflags.py | 37 + .../tools/build/test/feature_force_include.py | 41 + .../build/test/feature_implicit_dependency.py | 113 + src/boost/tools/build/test/feature_relevant.py | 142 + .../build/test/feature_suppress_import_lib.py | 33 + src/boost/tools/build/test/file_types.py | 44 + src/boost/tools/build/test/flags.py | 74 + src/boost/tools/build/test/gcc_runtime.py | 27 + src/boost/tools/build/test/generator_selection.py | 158 + src/boost/tools/build/test/generators_test.py | 433 + src/boost/tools/build/test/implicit_dependency.py | 81 + src/boost/tools/build/test/indirect_conditional.py | 150 + src/boost/tools/build/test/inherit_toolset.py | 100 + src/boost/tools/build/test/inherited_dependency.py | 237 + src/boost/tools/build/test/inline.py | 62 + src/boost/tools/build/test/install_build_no.py | 26 + src/boost/tools/build/test/lang_objc.py | 33 + src/boost/tools/build/test/lib_source_property.py | 45 + src/boost/tools/build/test/lib_zlib.py | 184 + src/boost/tools/build/test/libjpeg.py | 117 + src/boost/tools/build/test/liblzma.py | 118 + src/boost/tools/build/test/libpng.py | 119 + src/boost/tools/build/test/library_chain.py | 152 + src/boost/tools/build/test/library_order.py | 94 + src/boost/tools/build/test/library_property.py | 56 + src/boost/tools/build/test/libtiff.py | 119 + src/boost/tools/build/test/libzstd.py | 118 + src/boost/tools/build/test/link.py | 350 + src/boost/tools/build/test/load_dir.py | 84 + src/boost/tools/build/test/load_order.py | 71 + src/boost/tools/build/test/loop.py | 24 + src/boost/tools/build/test/make_rule.py | 54 + src/boost/tools/build/test/message.py | 38 + src/boost/tools/build/test/module_actions.py | 105 + src/boost/tools/build/test/ndebug.py | 33 + src/boost/tools/build/test/no_type.py | 19 + src/boost/tools/build/test/notfile.py | 36 + src/boost/tools/build/test/ordered_include.py | 251 + src/boost/tools/build/test/ordered_properties.py | 33 + src/boost/tools/build/test/out_of_tree.py | 29 + src/boost/tools/build/test/package.py | 231 + src/boost/tools/build/test/param.py | 61 + src/boost/tools/build/test/path_features.py | 163 + src/boost/tools/build/test/pch.py | 69 + src/boost/tools/build/test/prebuilt.py | 43 + src/boost/tools/build/test/prebuilt/ext/a.cpp | 14 + src/boost/tools/build/test/prebuilt/ext/debug/a.h | 10 + .../tools/build/test/prebuilt/ext/jamfile.jam | 13 + .../tools/build/test/prebuilt/ext/jamfile2.jam | 41 + .../tools/build/test/prebuilt/ext/jamfile3.jam | 48 + .../tools/build/test/prebuilt/ext/jamroot.jam | 5 + .../tools/build/test/prebuilt/ext/release/a.h | 10 + src/boost/tools/build/test/prebuilt/hello.cpp | 17 + src/boost/tools/build/test/prebuilt/jamfile.jam | 13 + src/boost/tools/build/test/prebuilt/jamroot.jam | 4 + src/boost/tools/build/test/preprocessor.py | 53 + src/boost/tools/build/test/print.py | 48 + src/boost/tools/build/test/project-test3/a.cpp | 5 + .../tools/build/test/project-test3/jamfile.jam | 13 + .../tools/build/test/project-test3/jamroot.jam | 67 + src/boost/tools/build/test/project-test3/lib/b.cpp | 5 + .../tools/build/test/project-test3/lib/jamfile.jam | 9 + .../tools/build/test/project-test3/lib2/c.cpp | 5 + .../tools/build/test/project-test3/lib2/d.cpp | 5 + .../build/test/project-test3/lib2/helper/e.cpp | 5 + .../test/project-test3/lib2/helper/jamfile.jam | 9 + .../build/test/project-test3/lib2/jamfile.jam | 11 + .../tools/build/test/project-test3/lib3/f.cpp | 5 + .../build/test/project-test3/lib3/jamfile.jam | 47 + .../build/test/project-test3/lib3/jamroot.jam | 5 + .../tools/build/test/project-test3/readme.txt | 7 + src/boost/tools/build/test/project-test4/a.cpp | 5 + src/boost/tools/build/test/project-test4/a_gcc.cpp | 5 + .../tools/build/test/project-test4/jamfile.jam | 11 + .../tools/build/test/project-test4/jamfile3.jam | 5 + .../tools/build/test/project-test4/jamfile4.jam | 4 + .../tools/build/test/project-test4/jamfile5.jam | 6 + .../tools/build/test/project-test4/jamroot.jam | 68 + src/boost/tools/build/test/project-test4/lib/b.cpp | 5 + .../tools/build/test/project-test4/lib/jamfile.jam | 6 + .../build/test/project-test4/lib/jamfile1.jam | 2 + .../build/test/project-test4/lib/jamfile2.jam | 4 + .../build/test/project-test4/lib/jamfile3.jam | 2 + .../build/test/project-test4/lib2/jamfile.jam | 8 + .../build/test/project-test4/lib2/jamfile2.jam | 4 + .../tools/build/test/project-test4/readme.txt | 6 + src/boost/tools/build/test/project_dependencies.py | 51 + src/boost/tools/build/test/project_glob.py | 212 + src/boost/tools/build/test/project_id.py | 414 + .../tools/build/test/project_root_constants.py | 62 + src/boost/tools/build/test/project_root_rule.py | 34 + src/boost/tools/build/test/project_test3.py | 135 + src/boost/tools/build/test/project_test4.py | 65 + src/boost/tools/build/test/property_expansion.py | 28 + src/boost/tools/build/test/qt4.py | 19 + src/boost/tools/build/test/qt4/jamroot.jam | 82 + src/boost/tools/build/test/qt4/mock.cpp | 26 + src/boost/tools/build/test/qt4/mock.h | 21 + src/boost/tools/build/test/qt4/phonon.cpp | 23 + src/boost/tools/build/test/qt4/qt3support.cpp | 29 + src/boost/tools/build/test/qt4/qtassistant.cpp | 21 + src/boost/tools/build/test/qt4/qtcore.cpp | 22 + src/boost/tools/build/test/qt4/qtcorefail.cpp | 23 + src/boost/tools/build/test/qt4/qtdeclarative.cpp | 27 + src/boost/tools/build/test/qt4/qtgui.cpp | 42 + src/boost/tools/build/test/qt4/qthelp.cpp | 22 + src/boost/tools/build/test/qt4/qtmultimedia.cpp | 25 + src/boost/tools/build/test/qt4/qtnetwork.cpp | 33 + src/boost/tools/build/test/qt4/qtscript.cpp | 37 + src/boost/tools/build/test/qt4/qtscripttools.cpp | 47 + src/boost/tools/build/test/qt4/qtsql.cpp | 37 + src/boost/tools/build/test/qt4/qtsvg.cpp | 21 + src/boost/tools/build/test/qt4/qttest.cpp | 30 + src/boost/tools/build/test/qt4/qtwebkit.cpp | 24 + src/boost/tools/build/test/qt4/qtxml.cpp | 29 + src/boost/tools/build/test/qt4/qtxmlpatterns.cpp | 76 + src/boost/tools/build/test/qt4/rcc.cpp | 20 + src/boost/tools/build/test/qt4/rcc.qrc | 5 + src/boost/tools/build/test/qt5.py | 20 + src/boost/tools/build/test/qt5/initialization.cpp | 7 + src/boost/tools/build/test/qt5/jamroot.jam | 118 + src/boost/tools/build/test/qt5/mock.cpp | 26 + src/boost/tools/build/test/qt5/mock.h | 21 + src/boost/tools/build/test/qt5/qt3dcore.cpp | 21 + src/boost/tools/build/test/qt5/qt3dinput.cpp | 24 + src/boost/tools/build/test/qt5/qt3dlogic.cpp | 20 + src/boost/tools/build/test/qt5/qt3drender.cpp | 21 + src/boost/tools/build/test/qt5/qtassistant.cpp | 21 + src/boost/tools/build/test/qt5/qtbluetooth.cpp | 34 + src/boost/tools/build/test/qt5/qtcharts.cpp | 15 + src/boost/tools/build/test/qt5/qtcore.cpp | 22 + src/boost/tools/build/test/qt5/qtcorefail.cpp | 23 + .../tools/build/test/qt5/qtdatavisualization.cpp | 31 + src/boost/tools/build/test/qt5/qtdeclarative.cpp | 26 + src/boost/tools/build/test/qt5/qtgamepad.cpp | 29 + src/boost/tools/build/test/qt5/qthelp.cpp | 22 + src/boost/tools/build/test/qt5/qtlocation.cpp | 30 + src/boost/tools/build/test/qt5/qtmultimedia.cpp | 25 + src/boost/tools/build/test/qt5/qtnetwork.cpp | 33 + src/boost/tools/build/test/qt5/qtnfc.cpp | 28 + src/boost/tools/build/test/qt5/qtpositioning.cpp | 23 + src/boost/tools/build/test/qt5/qtpurchasing.cpp | 44 + src/boost/tools/build/test/qt5/qtquick.cpp | 43 + src/boost/tools/build/test/qt5/qtquick.qml | 20 + src/boost/tools/build/test/qt5/qtscript.cpp | 37 + src/boost/tools/build/test/qt5/qtscripttools.cpp | 47 + src/boost/tools/build/test/qt5/qtscxml.cpp | 33 + src/boost/tools/build/test/qt5/qtserialbus.cpp | 25 + src/boost/tools/build/test/qt5/qtserialport.cpp | 22 + src/boost/tools/build/test/qt5/qtsql.cpp | 37 + src/boost/tools/build/test/qt5/qtsvg.cpp | 21 + src/boost/tools/build/test/qt5/qttest.cpp | 30 + src/boost/tools/build/test/qt5/qtwebchannel.cpp | 29 + src/boost/tools/build/test/qt5/qtwebengine.cpp | 30 + .../tools/build/test/qt5/qtwebenginewidgets.cpp | 40 + src/boost/tools/build/test/qt5/qtwebkit.cpp | 22 + src/boost/tools/build/test/qt5/qtwebkitwidgets.cpp | 23 + src/boost/tools/build/test/qt5/qtwebsocket.cpp | 26 + src/boost/tools/build/test/qt5/qtwebsockets.cpp | 24 + src/boost/tools/build/test/qt5/qtwebview.cpp | 31 + src/boost/tools/build/test/qt5/qtwidgets.cpp | 43 + src/boost/tools/build/test/qt5/qtxml.cpp | 29 + src/boost/tools/build/test/qt5/qtxmlpatterns.cpp | 76 + src/boost/tools/build/test/qt5/rcc.cpp | 20 + src/boost/tools/build/test/qt5/rcc.qrc | 5 + src/boost/tools/build/test/readme.txt | 6 + src/boost/tools/build/test/rebuilds.py | 68 + src/boost/tools/build/test/relative_sources.py | 38 + src/boost/tools/build/test/remove_requirement.py | 91 + src/boost/tools/build/test/rescan_header.py | 268 + src/boost/tools/build/test/resolution.py | 35 + src/boost/tools/build/test/results-python.txt | 132 + src/boost/tools/build/test/rootless.py | 36 + .../tools/build/test/rootless/test1/sub_root/a.cpp | 6 + .../build/test/rootless/test1/sub_root/jamfile.jam | 10 + .../tools/build/test/rootless/test2/sub_root/a.cpp | 6 + .../build/test/rootless/test2/sub_root/jamfile.jam | 13 + .../tools/build/test/rootless/test3/jamfile.jam | 6 + .../build/test/rootless/test3/sub/inner/a.cpp | 6 + .../test/rootless/test3/sub/inner/jamfile.jam | 11 + .../tools/build/test/scanner_causing_rebuilds.py | 132 + src/boost/tools/build/test/searched_lib.py | 202 + src/boost/tools/build/test/skipping.py | 27 + src/boost/tools/build/test/sort_rule.py | 98 + src/boost/tools/build/test/source_locations.py | 42 + src/boost/tools/build/test/source_order.py | 84 + src/boost/tools/build/test/space_in_path.py | 51 + src/boost/tools/build/test/stage.py | 207 + src/boost/tools/build/test/standalone.py | 53 + .../build/test/startup/boost-root/boost-build.jam | 7 + .../test/startup/boost-root/build/boost-build.jam | 6 + .../test/startup/boost-root/build/bootstrap.jam | 7 + .../test/startup/bootstrap-env/boost-build.jam | 5 + .../startup/bootstrap-explicit/boost-build.jam | 6 + .../test/startup/bootstrap-implicit/readme.txt | 5 + .../test/startup/no-bootstrap1/boost-build.jam | 6 + .../test/startup/no-bootstrap1/subdir/readme.txt | 5 + .../test/startup/no-bootstrap2/boost-build.jam | 6 + .../test/startup/no-bootstrap3/boost-build.jam | 5 + src/boost/tools/build/test/startup_v2.py | 96 + .../tools/build/test/static_and_shared_library.py | 36 + src/boost/tools/build/test/suffix.py | 78 + src/boost/tools/build/test/symlink.py | 43 + src/boost/tools/build/test/tag.py | 122 + src/boost/tools/build/test/template.py | 42 + src/boost/tools/build/test/test-config-example.jam | 19 + src/boost/tools/build/test/test.jam | 39 + src/boost/tools/build/test/test1.py | 18 + src/boost/tools/build/test/test2.py | 25 + src/boost/tools/build/test/test2/foo.cpp | 7 + src/boost/tools/build/test/test2/jamroot.jam | 5 + src/boost/tools/build/test/test_all.py | 373 + src/boost/tools/build/test/test_rc.py | 148 + src/boost/tools/build/test/test_system.html | 623 + src/boost/tools/build/test/testing.py | 556 + src/boost/tools/build/test/timedata.py | 178 + .../tools/build/test/toolset-mock/Jamroot.jam | 8 + src/boost/tools/build/test/toolset-mock/lib.cpp | 7 + src/boost/tools/build/test/toolset-mock/main.cpp | 7 + .../build/test/toolset-mock/project-config.jam | 48 + .../tools/build/test/toolset-mock/src/Jamroot.jam | 57 + .../build/test/toolset-mock/src/MockProgram.py | 287 + src/boost/tools/build/test/toolset-mock/src/ar.py | 27 + .../test/toolset-mock/src/clang-3.9.0-darwin.py | 48 + .../test/toolset-mock/src/clang-linux-3.9.0.py | 87 + .../test/toolset-mock/src/clang-vxworks-4.0.1.py | 41 + .../build/test/toolset-mock/src/darwin-4.2.1.py | 38 + .../test/toolset-mock/src/gcc-4.2.1-darwin.py | 36 + .../build/test/toolset-mock/src/gcc-4.8.3-linux.py | 49 + .../test/toolset-mock/src/intel-darwin-10.2.py | 42 + src/boost/tools/build/test/toolset-mock/src/ld.py | 33 + .../tools/build/test/toolset-mock/src/libtool.py | 14 + .../tools/build/test/toolset-mock/src/linkx.py | 33 + .../build/test/toolset-mock/src/mock-program.cpp | 42 + .../tools/build/test/toolset-mock/src/msvc-14.3.py | 33 + .../build/test/toolset-mock/src/project-config.jam | 5 + .../tools/build/test/toolset-mock/src/strip.py | 13 + .../tools/build/test/toolset-mock/src/verify.py | 9 + src/boost/tools/build/test/toolset_clang_darwin.py | 20 + src/boost/tools/build/test/toolset_clang_linux.py | 29 + .../tools/build/test/toolset_clang_vxworks.py | 20 + src/boost/tools/build/test/toolset_darwin.py | 21 + src/boost/tools/build/test/toolset_defaults.py | 60 + src/boost/tools/build/test/toolset_gcc.py | 26 + src/boost/tools/build/test/toolset_intel_darwin.py | 19 + src/boost/tools/build/test/toolset_msvc.py | 19 + src/boost/tools/build/test/toolset_requirements.py | 44 + src/boost/tools/build/test/transitive_skip.py | 30 + src/boost/tools/build/test/tree.py | 245 + src/boost/tools/build/test/unit_test.py | 36 + src/boost/tools/build/test/unit_tests.py | 11 + src/boost/tools/build/test/unused.py | 81 + src/boost/tools/build/test/use_requirements.py | 283 + src/boost/tools/build/test/using.py | 32 + src/boost/tools/build/test/wrapper.py | 38 + src/boost/tools/build/test/wrong_project.py | 39 + src/boost/tools/check_build/README.md | 3 + src/boost/tools/check_build/test/Jamfile | 91 + src/boost/tools/check_build/test/main.cpp | 3 + src/boost/tools/cmake/README.md | 5 + src/boost/tools/cmake/include/BoostFetch.cmake | 97 + src/boost/tools/cmake/include/BoostInstall.cmake | 456 + src/boost/tools/cmake/include/BoostMessage.cmake | 45 + src/boost/tools/cmake/include/BoostRoot.cmake | 311 + src/boost/tools/cmake/include/BoostTest.cmake | 217 + .../tools/cmake/include/BoostTestJamfile.cmake | 69 + .../tools/cmake/test/add_subdir/CMakeLists.txt | 18 + src/boost/tools/cmake/test/add_subdir/main.cpp | 11 + .../tools/cmake/test/add_subdir_exc/CMakeLists.txt | 18 + src/boost/tools/cmake/test/add_subdir_exc/main.cpp | 11 + src/boost/tools/cmake/test/assert/CMakeLists.txt | 17 + src/boost/tools/cmake/test/assert/main.cpp | 11 + src/boost/tools/cmake/test/atomic/CMakeLists.txt | 21 + src/boost/tools/cmake/test/atomic/main.cpp | 16 + .../tools/cmake/test/boost_fetch/CMakeLists.txt | 27 + src/boost/tools/cmake/test/boost_fetch/main.cpp | 14 + .../tools/cmake/test/boost_test/CMakeLists.txt | 58 + src/boost/tools/cmake/test/boost_test/Jamfile | 21 + .../tools/cmake/test/boost_test/arguments.cpp | 18 + src/boost/tools/cmake/test/boost_test/compile.cpp | 8 + .../tools/cmake/test/boost_test/compile_fail.cpp | 8 + .../tools/cmake/test/boost_test/emits_warning.cpp | 9 + src/boost/tools/cmake/test/boost_test/link.cpp | 13 + .../tools/cmake/test/boost_test/link_fail.cpp | 10 + .../test/boost_test/requires_no_exceptions.cpp | 18 + .../cmake/test/boost_test/requires_no_rtti.cpp | 18 + .../boost_test/requires_variadic_templates.cpp | 13 + .../cmake/test/boost_test/return_exit_code.cpp | 8 + src/boost/tools/cmake/test/boost_test/run.cpp | 7 + src/boost/tools/cmake/test/boost_test/run_fail.cpp | 8 + .../tools/cmake/test/iostreams/CMakeLists.txt | 21 + src/boost/tools/cmake/test/iostreams/test.txt | 1 + src/boost/tools/cmake/test/iostreams/test_fd.cpp | 22 + src/boost/tools/cmake/test/locale/CMakeLists.txt | 21 + src/boost/tools/cmake/test/locale/main.cpp | 32 + src/boost/tools/cmake/test/mp11/CMakeLists.txt | 17 + src/boost/tools/cmake/test/mp11/main.cpp | 12 + src/boost/tools/cmake/test/timer/CMakeLists.txt | 21 + src/boost/tools/cmake/test/timer/main.cpp | 11 + src/boost/tools/docca/CHANGELOG.md | 1 + src/boost/tools/docca/LICENSE_1_0.txt | 23 + src/boost/tools/docca/README.md | 26 + src/boost/tools/docca/docca.jam | 231 + src/boost/tools/docca/example/Jamfile | 129 + src/boost/tools/docca/example/boostbook.dtd | 439 + .../docca/example/include/docca/issue_101.hpp | 22 + .../tools/docca/example/include/docca/issue_33.hpp | 27 + .../tools/docca/example/include/docca/issue_34.hpp | 37 + .../tools/docca/example/include/docca/issue_38.hpp | 35 + .../tools/docca/example/include/docca/issue_44.hpp | 60 + .../tools/docca/example/include/docca/issue_47.hpp | 34 + .../tools/docca/example/include/docca/issue_48.hpp | 47 + .../tools/docca/example/include/docca/issue_52.hpp | 35 + .../tools/docca/example/include/docca/issue_53.hpp | 44 + .../tools/docca/example/include/docca/issue_55.hpp | 26 + .../tools/docca/example/include/docca/issue_63.hpp | 41 + .../tools/docca/example/include/docca/issue_69.hpp | 27 + .../tools/docca/example/include/docca/issue_70.hpp | 32 + .../tools/docca/example/include/docca/issue_78.hpp | 27 + src/boost/tools/docca/example/index.xml | 14 + src/boost/tools/docca/example/main.qbk | 31 + src/boost/tools/docca/example/makeqbk.sh | 13 + src/boost/tools/docca/example/reference.xsl | 14 + .../tools/docca/example/xsl/custom-overrides.xsl | 25 + .../docca/include/docca/assemble-quickbook.xsl | 20 + .../tools/docca/include/docca/base-config.xsl | 47 + .../docca/include/docca/base-extract-xml-pages.xsl | 476 + .../tools/docca/include/docca/base-stage1.xsl | 635 + .../tools/docca/include/docca/base-stage2.xsl | 278 + src/boost/tools/docca/include/docca/common.xsl | 107 + .../include/docca/debug-friendly-quickbook.xsl | 23 + .../docca/include/docca/extract-xml-pages.xsl | 13 + src/boost/tools/docca/include/docca/stage1.xsl | 13 + src/boost/tools/docca/include/docca/stage2.xsl | 12 + src/boost/tools/docca/util/comparison/README.md | 28 + .../docca/util/comparison/build-and-compare.sh | 24 + .../tools/docca/util/comparison/compare-all.sh | 27 + .../tools/docca/util/comparison/grep-expressions | 4 + src/boost/tools/docca/util/comparison/sed-commands | 2 + .../docca/util/comparison/update-all-baselines.sh | 16 + .../docca/util/comparison/update-baseline-html.sh | 19 + .../docca/util/comparison/watch-all-builds.sh | 6 + src/boost/tools/index.html | 105 + src/boost/tools/inspect/apple_macro_check.cpp | 105 + src/boost/tools/inspect/apple_macro_check.hpp | 39 + src/boost/tools/inspect/ascii_check.cpp | 102 + src/boost/tools/inspect/ascii_check.hpp | 38 + src/boost/tools/inspect/assert_macro_check.cpp | 110 + src/boost/tools/inspect/assert_macro_check.hpp | 40 + src/boost/tools/inspect/build/Jamfile.v2 | 56 + .../tools/inspect/build/msvc/boost_inspect.sln | 20 + .../tools/inspect/build/msvc/boost_inspect.vcxproj | 117 + src/boost/tools/inspect/build/msvc/readme.txt | 8 + src/boost/tools/inspect/copyright_check.cpp | 35 + src/boost/tools/inspect/copyright_check.hpp | 39 + src/boost/tools/inspect/crlf_check.cpp | 97 + src/boost/tools/inspect/crlf_check.hpp | 40 + src/boost/tools/inspect/deprecated_macro_check.cpp | 146 + src/boost/tools/inspect/deprecated_macro_check.hpp | 40 + src/boost/tools/inspect/end_check.cpp | 58 + src/boost/tools/inspect/end_check.hpp | 40 + src/boost/tools/inspect/index.html | 55 + src/boost/tools/inspect/inspect.cpp | 1041 + src/boost/tools/inspect/inspector.hpp | 108 + src/boost/tools/inspect/license_check.cpp | 48 + src/boost/tools/inspect/license_check.hpp | 40 + src/boost/tools/inspect/link_check.cpp | 487 + src/boost/tools/inspect/link_check.hpp | 72 + src/boost/tools/inspect/link_check_test.html | 24 + src/boost/tools/inspect/minmax_check.cpp | 102 + src/boost/tools/inspect/minmax_check.hpp | 45 + src/boost/tools/inspect/path_name_check.cpp | 110 + src/boost/tools/inspect/path_name_check.hpp | 48 + src/boost/tools/inspect/tab_check.cpp | 44 + src/boost/tools/inspect/tab_check.hpp | 37 + src/boost/tools/inspect/time_string.hpp | 55 + .../tools/inspect/unnamed_namespace_check.cpp | 62 + .../tools/inspect/unnamed_namespace_check.hpp | 39 + src/boost/tools/inspect/wrong_line_ends_test.cpp | 1 + src/boost/tools/litre/cplusplus.py | 810 + src/boost/tools/litre/litre.py | 61 + src/boost/tools/litre/tool.py | 67 + src/boost/tools/make-cputime-page.pl | 54 + src/boost/tools/quickbook/Jamfile.v2 | 57 + src/boost/tools/quickbook/_clang-format | 57 + src/boost/tools/quickbook/build/Jamfile.v2 | 9 + src/boost/tools/quickbook/build/publish-docs | 65 + src/boost/tools/quickbook/build/warning-check | 29 + .../quickbook/examples/simple-boostbook/Jamfile.v2 | 10 + .../quickbook/examples/simple-boostbook/simple.xml | 13 + .../quickbook/examples/simple-quickbook/Jamfile.v2 | 13 + .../quickbook/examples/simple-quickbook/simple.qbk | 13 + .../examples/standalone-quickbook/Jamfile.v2 | 21 + .../examples/standalone-quickbook/Jamroot.jam | 45 + .../examples/standalone-quickbook/simple.qbk | 13 + .../tools/quickbook/extra/katepart/install.sh | 24 + .../tools/quickbook/extra/katepart/katepart.qbk | 125 + .../extra/katepart/syntax/boost_hs_boost.xml | 3020 + .../extra/katepart/syntax/boost_hs_cpp.xml | 471 + .../extra/katepart/syntax/boost_hs_quickbook.xml | 736 + .../extra/katepart/syntax/boost_hs_std.xml | 620 + src/boost/tools/quickbook/index.html | 15 + .../quickbook/meta/explicit-failures-markup.xml | 37 + src/boost/tools/quickbook/src/Jamfile.v2 | 62 + src/boost/tools/quickbook/src/actions.cpp | 1973 + src/boost/tools/quickbook/src/actions.hpp | 379 + src/boost/tools/quickbook/src/bb2html.cpp | 1626 + src/boost/tools/quickbook/src/bb2html.hpp | 36 + .../tools/quickbook/src/block_element_grammar.cpp | 335 + src/boost/tools/quickbook/src/block_tags.hpp | 43 + .../tools/quickbook/src/boostbook_chunker.cpp | 158 + .../tools/quickbook/src/boostbook_chunker.hpp | 41 + src/boost/tools/quickbook/src/cleanup.hpp | 107 + src/boost/tools/quickbook/src/code_snippet.cpp | 532 + src/boost/tools/quickbook/src/collector.cpp | 59 + src/boost/tools/quickbook/src/collector.hpp | 97 + .../tools/quickbook/src/dependency_tracker.cpp | 134 + .../tools/quickbook/src/dependency_tracker.hpp | 53 + src/boost/tools/quickbook/src/doc_info_actions.cpp | 610 + src/boost/tools/quickbook/src/doc_info_grammar.cpp | 323 + src/boost/tools/quickbook/src/doc_info_tags.hpp | 53 + src/boost/tools/quickbook/src/document_state.cpp | 500 + src/boost/tools/quickbook/src/document_state.hpp | 94 + .../tools/quickbook/src/document_state_impl.hpp | 156 + src/boost/tools/quickbook/src/files.cpp | 600 + src/boost/tools/quickbook/src/files.hpp | 160 + src/boost/tools/quickbook/src/for.hpp | 25 + src/boost/tools/quickbook/src/fwd.hpp | 31 + src/boost/tools/quickbook/src/glob.cpp | 349 + src/boost/tools/quickbook/src/glob.hpp | 34 + src/boost/tools/quickbook/src/grammar.cpp | 37 + src/boost/tools/quickbook/src/grammar.hpp | 79 + src/boost/tools/quickbook/src/grammar_impl.hpp | 168 + src/boost/tools/quickbook/src/html_printer.cpp | 51 + src/boost/tools/quickbook/src/html_printer.hpp | 38 + src/boost/tools/quickbook/src/id_generation.cpp | 376 + src/boost/tools/quickbook/src/id_xml.cpp | 183 + src/boost/tools/quickbook/src/include_paths.cpp | 327 + src/boost/tools/quickbook/src/include_paths.hpp | 82 + src/boost/tools/quickbook/src/iterator.hpp | 67 + src/boost/tools/quickbook/src/main_grammar.cpp | 1320 + src/boost/tools/quickbook/src/markups.cpp | 83 + src/boost/tools/quickbook/src/markups.hpp | 32 + src/boost/tools/quickbook/src/native_text.cpp | 67 + src/boost/tools/quickbook/src/native_text.hpp | 66 + src/boost/tools/quickbook/src/parsers.hpp | 305 + src/boost/tools/quickbook/src/path.cpp | 450 + src/boost/tools/quickbook/src/path.hpp | 116 + .../tools/quickbook/src/phrase_element_grammar.cpp | 211 + src/boost/tools/quickbook/src/phrase_tags.hpp | 46 + src/boost/tools/quickbook/src/post_process.cpp | 454 + src/boost/tools/quickbook/src/post_process.hpp | 33 + src/boost/tools/quickbook/src/quickbook.cpp | 782 + src/boost/tools/quickbook/src/quickbook.hpp | 47 + src/boost/tools/quickbook/src/scoped.hpp | 32 + src/boost/tools/quickbook/src/simple_parse.hpp | 63 + src/boost/tools/quickbook/src/state.cpp | 187 + src/boost/tools/quickbook/src/state.hpp | 122 + src/boost/tools/quickbook/src/state_save.hpp | 55 + src/boost/tools/quickbook/src/stream.cpp | 214 + src/boost/tools/quickbook/src/stream.hpp | 85 + src/boost/tools/quickbook/src/string_view.hpp | 47 + src/boost/tools/quickbook/src/symbols.hpp | 202 + src/boost/tools/quickbook/src/syntax_highlight.cpp | 633 + src/boost/tools/quickbook/src/syntax_highlight.hpp | 62 + src/boost/tools/quickbook/src/template_stack.cpp | 117 + src/boost/tools/quickbook/src/template_stack.hpp | 126 + src/boost/tools/quickbook/src/template_tags.hpp | 31 + src/boost/tools/quickbook/src/tree.cpp | 205 + src/boost/tools/quickbook/src/tree.hpp | 167 + src/boost/tools/quickbook/src/utils.cpp | 221 + src/boost/tools/quickbook/src/utils.hpp | 39 + src/boost/tools/quickbook/src/value_tags.hpp | 90 + src/boost/tools/quickbook/src/values.cpp | 829 + src/boost/tools/quickbook/src/values.hpp | 444 + src/boost/tools/quickbook/src/values_parse.hpp | 137 + src/boost/tools/quickbook/src/xml_parse.cpp | 302 + src/boost/tools/quickbook/src/xml_parse.hpp | 134 + src/boost/tools/quickbook/test/Jamfile.v2 | 173 + src/boost/tools/quickbook/test/anchor-1_1.gold | 145 + .../tools/quickbook/test/anchor-1_1.gold-html | 205 + .../tools/quickbook/test/anchor-1_1.quickbook | 80 + src/boost/tools/quickbook/test/anchor-1_6.gold | 151 + .../tools/quickbook/test/anchor-1_6.gold-html | 216 + .../tools/quickbook/test/anchor-1_6.quickbook | 88 + src/boost/tools/quickbook/test/anchor-1_7.gold | 151 + .../tools/quickbook/test/anchor-1_7.gold-html | 217 + .../tools/quickbook/test/anchor-1_7.quickbook | 97 + src/boost/tools/quickbook/test/blocks-1_5.gold | 111 + .../tools/quickbook/test/blocks-1_5.gold-html | 119 + .../tools/quickbook/test/blocks-1_5.quickbook | 46 + src/boost/tools/quickbook/test/callouts-1_5.gold | 241 + .../tools/quickbook/test/callouts-1_5.gold-html | 276 + .../tools/quickbook/test/callouts-1_5.quickbook | 51 + src/boost/tools/quickbook/test/callouts-1_7.gold | 249 + .../tools/quickbook/test/callouts-1_7.gold-html | 302 + .../tools/quickbook/test/callouts-1_7.quickbook | 73 + src/boost/tools/quickbook/test/callouts.cpp | 52 + src/boost/tools/quickbook/test/code-1_1.gold | 52 + src/boost/tools/quickbook/test/code-1_1.gold-html | 91 + src/boost/tools/quickbook/test/code-1_1.quickbook | 51 + src/boost/tools/quickbook/test/code-1_5.gold | 37 + src/boost/tools/quickbook/test/code-1_5.gold-html | 39 + src/boost/tools/quickbook/test/code-1_5.quickbook | 29 + src/boost/tools/quickbook/test/code_cpp-1_5.gold | 40 + .../tools/quickbook/test/code_cpp-1_5.gold-html | 43 + .../tools/quickbook/test/code_cpp-1_5.quickbook | 34 + .../code_cpp_mismatched_escape-1_4-fail.quickbook | 5 + .../tools/quickbook/test/code_python-1_5.gold | 10 + .../tools/quickbook/test/code_python-1_5.gold-html | 13 + .../tools/quickbook/test/code_python-1_5.quickbook | 8 + ...ode_python_mismatched_escape-1_4-fail.quickbook | 5 + .../tools/quickbook/test/code_snippet-1_1.gold | 22 + .../quickbook/test/code_snippet-1_1.gold-html | 39 + .../quickbook/test/code_snippet-1_1.quickbook | 12 + .../tools/quickbook/test/code_teletype-1_5.gold | 12 + .../quickbook/test/code_teletype-1_5.gold-html | 29 + .../quickbook/test/code_teletype-1_5.quickbook | 13 + .../test/code_unclosed_block-1_6-fail.quickbook | 4 + .../tools/quickbook/test/command-line/Jamfile.v2 | 28 + .../test/command-line/basic-1_6.quickbook | 5 + .../test/command-line/error-fail.quickbook | 5 + .../quickbook/test/command-line/error1.quickbook | 3 + .../quickbook/test/command-line/error2.quickbook | 7 + .../quickbook/test/command_line_macro-1_1.gold | 12 + .../test/command_line_macro-1_1.gold-html | 15 + .../test/command_line_macro-1_1.quickbook | 10 + .../tools/quickbook/test/cond_phrase-1_5.gold | 15 + .../tools/quickbook/test/cond_phrase-1_5.gold-html | 18 + .../tools/quickbook/test/cond_phrase-1_5.quickbook | 12 + .../tools/quickbook/test/cond_phrase-1_7.gold | 21 + .../tools/quickbook/test/cond_phrase-1_7.gold-html | 24 + .../tools/quickbook/test/cond_phrase-1_7.quickbook | 20 + src/boost/tools/quickbook/test/doc-info/Jamfile.v2 | 38 + .../tools/quickbook/test/doc-info/author1.gold | 13 + .../quickbook/test/doc-info/author1.gold-html | 14 + .../quickbook/test/doc-info/author1.quickbook | 5 + .../tools/quickbook/test/doc-info/author2.gold | 19 + .../quickbook/test/doc-info/author2.gold-html | 20 + .../quickbook/test/doc-info/author2.quickbook | 4 + .../test/doc-info/copyright-fail1.quickbook | 4 + .../test/doc-info/copyright-fail2.quickbook | 6 + .../tools/quickbook/test/doc-info/copyright1.gold | 17 + .../quickbook/test/doc-info/copyright1.gold-html | 18 + .../quickbook/test/doc-info/copyright1.quickbook | 5 + .../quickbook/test/doc-info/duplicates-1.1.gold | 35 + .../test/doc-info/duplicates-1.1.gold-html | 31 + .../test/doc-info/duplicates-1.1.quickbook | 23 + .../quickbook/test/doc-info/duplicates-1.5.gold | 32 + .../test/doc-info/duplicates-1.5.gold-html | 28 + .../test/doc-info/duplicates-1.5.quickbook | 27 + .../quickbook/test/doc-info/empty-attributes.gold | 19 + .../test/doc-info/empty-attributes.gold-html | 19 + .../test/doc-info/empty-attributes.quickbook | 16 + .../quickbook/test/doc-info/empty_title-1_1.gold | 10 + .../test/doc-info/empty_title-1_1.gold-html | 26 + .../test/doc-info/empty_title-1_1.quickbook | 8 + .../quickbook/test/doc-info/empty_title-1_5.gold | 10 + .../test/doc-info/empty_title-1_5.gold-html | 26 + .../test/doc-info/empty_title-1_5.quickbook | 7 + .../quickbook/test/doc-info/empty_title-1_6.gold | 4 + .../test/doc-info/empty_title-1_6.gold-html | 6 + .../test/doc-info/empty_title-1_6.quickbook | 1 + .../tools/quickbook/test/doc-info/encode-1.5.gold | 26 + .../quickbook/test/doc-info/encode-1.5.gold-html | 20 + .../quickbook/test/doc-info/encode-1.5.quickbook | 14 + .../tools/quickbook/test/doc-info/escape-1.6.gold | 24 + .../quickbook/test/doc-info/escape-1.6.gold-html | 20 + .../quickbook/test/doc-info/escape-1.6.quickbook | 12 + .../test/doc-info/escaped_attributes1-1_7.gold | 16 + .../doc-info/escaped_attributes1-1_7.gold-html | 17 + .../doc-info/escaped_attributes1-1_7.quickbook | 11 + .../test/doc-info/escaped_attributes2-1_7.gold | 12 + .../doc-info/escaped_attributes2-1_7.gold-html | 14 + .../doc-info/escaped_attributes2-1_7.quickbook | 10 + .../tools/quickbook/test/doc-info/id1-1.5.gold | 27 + .../quickbook/test/doc-info/id1-1.5.gold-html | 86 + .../quickbook/test/doc-info/id1-1.5.quickbook | 21 + .../test/doc-info/id1-docinfo-no-id.quickbook | 5 + .../test/doc-info/id1-no-docinfo.quickbook | 2 + .../tools/quickbook/test/doc-info/macros1-1_5.gold | 11 + .../quickbook/test/doc-info/macros1-1_5.gold-html | 9 + .../quickbook/test/doc-info/macros1-1_5.quickbook | 6 + .../tools/quickbook/test/doc-info/macros1-1_6.gold | 8 + .../quickbook/test/doc-info/macros1-1_6.gold-html | 24 + .../quickbook/test/doc-info/macros1-1_6.quickbook | 7 + .../test/doc-info/macros1-inc_1_6.quickbook | 4 + .../doc-info/missing_doc_info-1_6-fail.quickbook | 3 + .../quickbook/test/doc-info/source-mode-1.4.gold | 33 + .../test/doc-info/source-mode-1.4.gold-html | 31 + .../test/doc-info/source-mode-1.4.quickbook | 17 + .../quickbook/test/doc-info/source-mode-1.5.gold | 38 + .../test/doc-info/source-mode-1.5.gold-html | 37 + .../test/doc-info/source-mode-1.5.quickbook | 21 + .../quickbook/test/doc-info/source-mode-1.6.gold | 42 + .../test/doc-info/source-mode-1.6.gold-html | 60 + .../test/doc-info/source-mode-1.6.quickbook | 21 + .../doc-info/source-mode-cpp-include.quickbook | 4 + .../doc-info/source-mode-python-include.quickbook | 5 + .../source-mode-teletype-include.quickbook | 5 + .../test/doc-info/title_trailing_space-1_1.gold | 9 + .../doc-info/title_trailing_space-1_1.gold-html | 26 + .../doc-info/title_trailing_space-1_1.quickbook | 5 + .../test/doc-info/title_trailing_space-1_6.gold | 9 + .../doc-info/title_trailing_space-1_6.gold-html | 26 + .../doc-info/title_trailing_space-1_6.quickbook | 5 + src/boost/tools/quickbook/test/elements-1_5.gold | 18 + .../tools/quickbook/test/elements-1_5.quickbook | 13 + src/boost/tools/quickbook/test/elements-1_6.gold | 40 + .../tools/quickbook/test/elements-1_6.gold-html | 44 + .../tools/quickbook/test/elements-1_6.quickbook | 21 + src/boost/tools/quickbook/test/empty-inc.quickbook | 0 .../test/endsect-unopened-1_7-fail.quickbook | 6 + .../test/endsect-wrong-id-1_4-fail.quickbook | 6 + .../test/endsect-wrong-id-1_7-fail.quickbook | 6 + src/boost/tools/quickbook/test/escape-1_1.gold | 32 + .../tools/quickbook/test/escape-1_1.gold-html | 48 + .../tools/quickbook/test/escape-1_1.quickbook | 34 + src/boost/tools/quickbook/test/escape-1_6.gold | 32 + .../tools/quickbook/test/escape-1_6.gold-html | 48 + .../tools/quickbook/test/escape-1_6.quickbook | 35 + .../test/escape-mismatched-1_5-fail.quickbook | 5 + src/boost/tools/quickbook/test/footnotes-1_7.gold | 31 + .../tools/quickbook/test/footnotes-1_7.gold-html | 80 + .../tools/quickbook/test/footnotes-1_7.quickbook | 16 + src/boost/tools/quickbook/test/heading-1_1.gold | 76 + .../tools/quickbook/test/heading-1_1.gold-html | 100 + .../tools/quickbook/test/heading-1_1.quickbook | 55 + src/boost/tools/quickbook/test/heading-1_3.gold | 24 + .../tools/quickbook/test/heading-1_3.gold-html | 27 + .../tools/quickbook/test/heading-1_3.quickbook | 16 + src/boost/tools/quickbook/test/heading-1_5.gold | 87 + .../tools/quickbook/test/heading-1_5.gold-html | 100 + .../tools/quickbook/test/heading-1_5.quickbook | 57 + src/boost/tools/quickbook/test/heading-1_6.gold | 109 + .../tools/quickbook/test/heading-1_6.gold-html | 139 + .../tools/quickbook/test/heading-1_6.quickbook | 80 + src/boost/tools/quickbook/test/heading-1_7.gold | 113 + .../tools/quickbook/test/heading-1_7.gold-html | 142 + .../tools/quickbook/test/heading-1_7.quickbook | 83 + .../test/heading_unclosed-1_4-fail.quickbook | 3 + src/boost/tools/quickbook/test/hr-1_5.gold | 34 + src/boost/tools/quickbook/test/hr-1_5.gold-html | 45 + src/boost/tools/quickbook/test/hr-1_5.quickbook | 27 + src/boost/tools/quickbook/test/hr-1_6.gold | 39 + src/boost/tools/quickbook/test/hr-1_6.gold-html | 49 + src/boost/tools/quickbook/test/hr-1_6.quickbook | 26 + .../test/html/images/open_clipart_library_logo.svg | 143 + src/boost/tools/quickbook/test/identifier-1_5.gold | 610 + .../tools/quickbook/test/identifier-1_5.gold-html | 421 + .../tools/quickbook/test/identifier-1_5.quickbook | 148 + src/boost/tools/quickbook/test/identifier-1_6.gold | 609 + .../tools/quickbook/test/identifier-1_6.gold-html | 421 + .../tools/quickbook/test/identifier-1_6.quickbook | 148 + src/boost/tools/quickbook/test/image-1_5.gold | 64 + src/boost/tools/quickbook/test/image-1_5.gold-html | 26 + src/boost/tools/quickbook/test/image-1_5.quickbook | 19 + src/boost/tools/quickbook/test/image-1_6.gold | 51 + src/boost/tools/quickbook/test/image-1_6.gold-html | 32 + src/boost/tools/quickbook/test/image-1_6.quickbook | 23 + .../tools/quickbook/test/import-1_1-fail.quickbook | 8 + .../quickbook/test/include-1_1-fail.quickbook | 8 + src/boost/tools/quickbook/test/include-1_5.gold | 30 + .../tools/quickbook/test/include-1_5.gold-html | 61 + .../tools/quickbook/test/include-1_5.quickbook | 17 + src/boost/tools/quickbook/test/include-1_6.gold | 30 + .../tools/quickbook/test/include-1_6.gold-html | 61 + .../tools/quickbook/test/include-1_6.quickbook | 15 + src/boost/tools/quickbook/test/include-1_7.gold | 36 + .../tools/quickbook/test/include-1_7.gold-html | 74 + .../tools/quickbook/test/include-1_7.quickbook | 18 + .../tools/quickbook/test/include-inc-1_5.quickbook | 6 + .../tools/quickbook/test/include-inc.quickbook | 9 + src/boost/tools/quickbook/test/include/Jamfile.v2 | 48 + .../tools/quickbook/test/include/code-import.gold | 138 + .../quickbook/test/include/code-import.gold-html | 148 + .../quickbook/test/include/code-import.quickbook | 13 + .../tools/quickbook/test/include/code-include.gold | 50 + .../quickbook/test/include/code-include.gold-html | 55 + .../quickbook/test/include/code-include.quickbook | 16 + .../quickbook/test/include/compatibility-1_1.gold | 362 + .../test/include/compatibility-1_1.gold-html | 424 + .../test/include/compatibility-1_1.quickbook | 18 + .../quickbook/test/include/compatibility-1_5.gold | 362 + .../test/include/compatibility-1_5.gold-html | 424 + .../test/include/compatibility-1_5.quickbook | 18 + .../quickbook/test/include/compatibility-1_6.gold | 362 + .../test/include/compatibility-1_6.gold-html | 424 + .../test/include/compatibility-1_6.quickbook | 17 + .../test/include/compatibility-inc.quickbook | 31 + .../test/include/compatibility-inc_1_1.quickbook | 33 + .../test/include/compatibility-inc_1_5.quickbook | 33 + .../test/include/compatibility-inc_1_6.quickbook | 33 + .../quickbook/test/include/doc-title1-1.5.gold | 27 + .../test/include/doc-title1-1.5.gold-html | 30 + .../test/include/doc-title1-1.5.quickbook | 27 + .../test/include/doc-title1-inc1.quickbook | 1 + .../test/include/doc-title1-inc2.quickbook | 4 + .../test/include/doc-title1-inc3.quickbook | 1 + .../quickbook/test/include/doc-title1a-1.5.gold | 26 + .../test/include/doc-title1a-1.5.gold-html | 30 + .../test/include/doc-title1a-1.5.quickbook | 20 + .../tools/quickbook/test/include/filename-1_7.gold | 46 + .../quickbook/test/include/filename-1_7.gold-html | 45 + .../quickbook/test/include/filename-1_7.quickbook | 21 + .../quickbook/test/include/filename-path.gold | 18 + .../quickbook/test/include/filename-path.gold-html | 21 + .../quickbook/test/include/filename-path.quickbook | 9 + .../tools/quickbook/test/include/filename.gold | 18 + .../quickbook/test/include/filename.gold-html | 21 + .../quickbook/test/include/filename.quickbook | 9 + .../test/include/filename_include2.quickbook | 1 + .../quickbook/test/include/filename_path-1_7.gold | 18 + .../test/include/filename_path-1_7.gold-html | 21 + .../test/include/filename_path-1_7.quickbook | 7 + .../tools/quickbook/test/include/glob-1_7.gold | 41 + .../quickbook/test/include/glob-1_7.gold-html | 94 + .../quickbook/test/include/glob-1_7.quickbook | 39 + src/boost/tools/quickbook/test/include/glob1/a.qbk | 1 + .../quickbook/test/include/glob1/glob1-1/b.qbk | 1 + src/boost/tools/quickbook/test/include/glob2/a.qbk | 3 + .../quickbook/test/include/glob2/glob2-1/b.qbk | 1 + .../quickbook/test/include/import-basic-1.6.gold | 11 + .../test/include/import-basic-1.6.gold-html | 15 + .../test/include/import-basic-1.6.quickbook | 12 + .../test/include/import-basic-inc1.quickbook | 4 + .../test/include/import-basic-inc2.quickbook | 10 + .../quickbook/test/include/in_section-1_5.gold | 88 + .../test/include/in_section-1_5.gold-html | 120 + .../test/include/in_section-1_5.quickbook | 16 + .../quickbook/test/include/in_section-1_6.gold | 108 + .../test/include/in_section-1_6.gold-html | 238 + .../test/include/in_section-1_6.quickbook | 16 + .../test/include/in_section-inc1.quickbook | 13 + .../test/include/in_section-inc2.quickbook | 14 + .../quickbook/test/include/include-id-1.5.gold | 26 + .../test/include/include-id-1.5.gold-html | 27 + .../test/include/include-id-1.5.quickbook | 10 + .../quickbook/test/include/include-id-1.6.gold | 36 + .../test/include/include-id-1.6.gold-html | 66 + .../test/include/include-id-1.6.quickbook | 10 + .../test/include/include-id-inc1.quickbook | 1 + .../test/include/include-id-inc2.quickbook | 5 + .../test/include/include-id-inc3.quickbook | 6 + .../test/include/include_id_unbalanced-1_6.gold | 59 + .../include/include_id_unbalanced-1_6.gold-html | 89 + .../include/include_id_unbalanced-1_6.quickbook | 19 + .../include/include_id_unbalanced-inc1.quickbook | 4 + .../include/include_id_unbalanced-inc1a.quickbook | 3 + .../include/include_id_unbalanced-inc2.quickbook | 5 + .../include/include_id_unbalanced-inc2a.quickbook | 3 + .../tools/quickbook/test/include/macros-1.5.gold | 39 + .../quickbook/test/include/macros-1.5.gold-html | 42 + .../quickbook/test/include/macros-1.5.quickbook | 13 + .../tools/quickbook/test/include/macros-1.6.gold | 66 + .../quickbook/test/include/macros-1.6.gold-html | 69 + .../quickbook/test/include/macros-1.6.quickbook | 21 + .../quickbook/test/include/macros-inc1.quickbook | 15 + .../test/include/nested_compatibility-1_5.gold | 48 + .../include/nested_compatibility-1_5.gold-html | 76 + .../include/nested_compatibility-1_5.quickbook | 12 + .../test/include/nested_compatibility-1_6.gold | 48 + .../include/nested_compatibility-1_6.gold-html | 76 + .../include/nested_compatibility-1_6.quickbook | 12 + .../include/nested_compatibility-inc-1_5.quickbook | 5 + .../include/nested_compatibility-inc-1_6.quickbook | 5 + .../quickbook/test/include/section-fail1.quickbook | 6 + .../quickbook/test/include/section-fail2.quickbook | 5 + .../quickbook/test/include/section-inc1.quickbook | 1 + .../quickbook/test/include/section-inc2.quickbook | 1 + .../quickbook/test/include/section-unclosed.gold | 10 + .../test/include/section-unclosed.gold-html | 26 + .../test/include/section-unclosed.quickbook | 5 + .../tools/quickbook/test/include/section.gold | 10 + .../tools/quickbook/test/include/section.gold-html | 26 + .../tools/quickbook/test/include/section.quickbook | 6 + .../quickbook/test/include/source_mode-1_5.gold | 9 + .../test/include/source_mode-1_5.gold-html | 12 + .../test/include/source_mode-1_5.quickbook | 4 + .../quickbook/test/include/source_mode-1_6.gold | 13 + .../test/include/source_mode-1_6.gold-html | 27 + .../test/include/source_mode-1_6.quickbook | 5 + .../test/include/source_mode-inc1.quickbook | 3 + .../test/include/source_mode-inc2.quickbook | 3 + .../test/include/sub/filename_include1.quickbook | 3 + .../test/include/template_include-1_7.gold | 12 + .../test/include/template_include-1_7.gold-html | 14 + .../test/include/template_include-1_7.quickbook | 8 + .../quickbook/test/include/templates-1.5.gold | 12 + .../quickbook/test/include/templates-1.5.gold-html | 15 + .../quickbook/test/include/templates-1.5.quickbook | 7 + .../quickbook/test/include/templates-1.6.gold | 15 + .../quickbook/test/include/templates-1.6.gold-html | 18 + .../quickbook/test/include/templates-1.6.quickbook | 11 + .../test/include/templates-inc1.quickbook | 4 + src/boost/tools/quickbook/test/include2-1_6.gold | 22 + .../tools/quickbook/test/include2-1_6.gold-html | 50 + .../tools/quickbook/test/include2-1_6.quickbook | 8 + .../test/include_invalid_path1-1_7-fail.quickbook | 5 + .../test/include_invalid_path2-1_7-fail.quickbook | 5 + .../test/include_invalid_path3-1_7-fail.quickbook | 5 + .../test/include_unicode_glob-1_7-fail.quickbook | 5 + .../test/include_win_path-1_6-fail.quickbook | 5 + src/boost/tools/quickbook/test/link-1_1.gold | 45 + src/boost/tools/quickbook/test/link-1_1.gold-html | 68 + src/boost/tools/quickbook/test/link-1_1.quickbook | 48 + src/boost/tools/quickbook/test/link-1_6.gold | 49 + src/boost/tools/quickbook/test/link-1_6.gold-html | 71 + src/boost/tools/quickbook/test/link-1_6.quickbook | 52 + .../tools/quickbook/test/link-1_7-fail.quickbook | 5 + .../tools/quickbook/test/link-1_7-fail2.quickbook | 6 + src/boost/tools/quickbook/test/link-1_7.gold | 56 + src/boost/tools/quickbook/test/link-1_7.gold-html | 84 + src/boost/tools/quickbook/test/link-1_7.quickbook | 61 + src/boost/tools/quickbook/test/list_test-1_5.gold | 402 + .../tools/quickbook/test/list_test-1_5.gold-html | 432 + .../tools/quickbook/test/list_test-1_5.quickbook | 108 + .../quickbook/test/list_test-1_6-fail.quickbook | 46 + src/boost/tools/quickbook/test/list_test-1_6.gold | 450 + .../tools/quickbook/test/list_test-1_6.gold-html | 480 + .../tools/quickbook/test/list_test-1_6.quickbook | 120 + .../quickbook/test/list_test-1_7-fail1.quickbook | 9 + src/boost/tools/quickbook/test/list_test-1_7.gold | 479 + .../tools/quickbook/test/list_test-1_7.gold-html | 507 + .../tools/quickbook/test/list_test-1_7.quickbook | 134 + src/boost/tools/quickbook/test/macro-1_5.gold | 26 + src/boost/tools/quickbook/test/macro-1_5.gold-html | 30 + src/boost/tools/quickbook/test/macro-1_5.quickbook | 34 + src/boost/tools/quickbook/test/macro-1_6.gold | 26 + src/boost/tools/quickbook/test/macro-1_6.gold-html | 30 + src/boost/tools/quickbook/test/macro-1_6.quickbook | 34 + .../test/mismatched_brackets-1_1-fail.quickbook | 5 + .../quickbook/test/mismatched_brackets1-1_1.gold | 12 + .../test/mismatched_brackets1-1_1.gold-html | 15 + .../test/mismatched_brackets1-1_1.quickbook | 7 + .../test/mismatched_brackets1-1_7.quickbook | 8 + .../quickbook/test/mismatched_brackets2-1_1.gold | 9 + .../test/mismatched_brackets2-1_1.gold-html | 12 + .../test/mismatched_brackets2-1_1.quickbook | 7 + .../quickbook/test/mismatched_brackets3-1_1.gold | 12 + .../test/mismatched_brackets3-1_1.gold-html | 29 + .../test/mismatched_brackets3-1_1.quickbook | 6 + src/boost/tools/quickbook/test/newline-1_1.gold | 24 + .../tools/quickbook/test/newline-1_1.gold-html | 27 + .../tools/quickbook/test/newline-1_1.quickbook | 10 + src/boost/tools/quickbook/test/para_test-1_5.gold | 75 + .../tools/quickbook/test/para_test-1_5.gold-html | 97 + .../tools/quickbook/test/para_test-1_5.quickbook | 81 + .../quickbook/test/post_process-fail.quickbook | 3 + .../tools/quickbook/test/preformatted-1_1.gold | 40 + .../quickbook/test/preformatted-1_1.gold-html | 58 + .../quickbook/test/preformatted-1_1.quickbook | 32 + .../tools/quickbook/test/preformatted-1_6.gold | 40 + .../quickbook/test/preformatted-1_6.gold-html | 58 + .../quickbook/test/preformatted-1_6.quickbook | 33 + .../tools/quickbook/test/python/include_glob.qbk | 11 + .../quickbook/test/python/include_glob_deps.txt | 6 + .../quickbook/test/python/include_glob_locs.txt | 9 + .../tools/quickbook/test/python/include_path.qbk | 12 + .../quickbook/test/python/include_path_deps.txt | 6 + .../quickbook/test/python/include_path_locs.txt | 9 + .../quickbook/test/python/missing_relative.qbk | 14 + .../test/python/missing_relative_deps.txt | 4 + .../test/python/missing_relative_locs.txt | 7 + src/boost/tools/quickbook/test/python/run_tests.py | 191 + src/boost/tools/quickbook/test/python/simple.qbk | 23 + src/boost/tools/quickbook/test/python/simple.xml | 36 + .../test/python/simple_custom_pretty_print.xml | 42 + .../test/python/simple_no_pretty_print.xml | 36 + .../test/python/simple_no_self_linked.xml | 36 + src/boost/tools/quickbook/test/python/sub1/a.qbk | 9 + src/boost/tools/quickbook/test/python/sub2/b.qbk | 9 + .../tools/quickbook/test/python/svg_missing.qbk | 11 + .../quickbook/test/python/svg_missing_deps.txt | 4 + .../quickbook/test/python/svg_missing_locs.txt | 5 + .../tools/quickbook/test/quickbook-testing.jam | 185 + .../tools/quickbook/test/quickbook_manual-1_4.gold | 3945 + .../quickbook/test/quickbook_manual-1_4.gold-html | 4177 + .../quickbook/test/quickbook_manual-1_4.quickbook | 1981 + src/boost/tools/quickbook/test/regen-gold.sh | 47 + src/boost/tools/quickbook/test/role-1_6.gold | 9 + src/boost/tools/quickbook/test/role-1_6.gold-html | 12 + src/boost/tools/quickbook/test/role-1_6.quickbook | 5 + .../tools/quickbook/test/role-1_7-fail.quickbook | 5 + src/boost/tools/quickbook/test/role-1_7.gold | 13 + src/boost/tools/quickbook/test/role-1_7.gold-html | 16 + src/boost/tools/quickbook/test/role-1_7.quickbook | 13 + src/boost/tools/quickbook/test/section-1_4.gold | 20 + .../tools/quickbook/test/section-1_4.gold-html | 58 + .../tools/quickbook/test/section-1_4.quickbook | 12 + .../tools/quickbook/test/section-1_5-unclosed.gold | 10 + .../quickbook/test/section-1_5-unclosed.gold-html | 27 + .../quickbook/test/section-1_5-unclosed.quickbook | 5 + src/boost/tools/quickbook/test/section-1_5.gold | 19 + .../tools/quickbook/test/section-1_5.gold-html | 57 + .../tools/quickbook/test/section-1_5.quickbook | 12 + src/boost/tools/quickbook/test/section-1_7.gold | 32 + .../tools/quickbook/test/section-1_7.gold-html | 100 + .../tools/quickbook/test/section-1_7.quickbook | 23 + .../tools/quickbook/test/simple_markup-1_5.gold | 58 + .../quickbook/test/simple_markup-1_5.gold-html | 75 + .../quickbook/test/simple_markup-1_5.quickbook | 42 + src/boost/tools/quickbook/test/snippets/Jamfile.v2 | 18 + .../tools/quickbook/test/snippets/pass_thru.cpp | 33 + .../tools/quickbook/test/snippets/pass_thru.gold | 35 + .../quickbook/test/snippets/pass_thru.gold-html | 38 + .../tools/quickbook/test/snippets/pass_thru.py | 13 + .../quickbook/test/snippets/pass_thru.quickbook | 12 + .../test/snippets/unbalanced_snippet1-1_5.gold | 10 + .../snippets/unbalanced_snippet1-1_5.gold-html | 13 + .../snippets/unbalanced_snippet1-1_5.quickbook | 8 + .../unbalanced_snippet1-1_6-fail.quickbook | 7 + .../test/snippets/unbalanced_snippet1.cpp | 11 + .../unbalanced_snippet2-1_6-fail.quickbook | 5 + .../test/snippets/unbalanced_snippet2.cpp | 9 + .../tools/quickbook/test/source_mode-1_7.gold | 63 + .../tools/quickbook/test/source_mode-1_7.gold-html | 80 + .../tools/quickbook/test/source_mode-1_7.quickbook | 24 + src/boost/tools/quickbook/test/src/text_diff.cpp | 96 + .../quickbook/test/stray_close_bracket-1_1.gold | 9 + .../test/stray_close_bracket-1_1.gold-html | 12 + .../test/stray_close_bracket-1_1.quickbook | 3 + .../test/stray_close_bracket-1_7-fail.quickbook | 5 + src/boost/tools/quickbook/test/stub.c | 32 + src/boost/tools/quickbook/test/stub.cpp | 86 + src/boost/tools/quickbook/test/stub.py | 27 + src/boost/tools/quickbook/test/svg-1_1.gold | 18 + src/boost/tools/quickbook/test/svg-1_1.gold-html | 14 + src/boost/tools/quickbook/test/svg-1_1.quickbook | 4 + src/boost/tools/quickbook/test/table-1_3.gold | 351 + src/boost/tools/quickbook/test/table-1_3.gold-html | 368 + src/boost/tools/quickbook/test/table-1_3.quickbook | 113 + src/boost/tools/quickbook/test/table-1_5.gold | 442 + src/boost/tools/quickbook/test/table-1_5.gold-html | 459 + src/boost/tools/quickbook/test/table-1_5.quickbook | 133 + src/boost/tools/quickbook/test/table-1_6.gold | 478 + src/boost/tools/quickbook/test/table-1_6.gold-html | 496 + src/boost/tools/quickbook/test/table-1_6.quickbook | 134 + src/boost/tools/quickbook/test/table-1_7.gold | 520 + src/boost/tools/quickbook/test/table-1_7.gold-html | 538 + src/boost/tools/quickbook/test/table-1_7.quickbook | 151 + .../test/template_arguments1-1_1-fail.quickbook | 10 + .../test/template_arguments1-1_5-fail.quickbook | 11 + .../test/template_arguments2-1_1-fail.quickbook | 10 + .../test/template_arguments2-1_5-fail.quickbook | 6 + .../test/template_arguments3-1_1-fail.quickbook | 10 + .../test/template_arguments3-1_5-fail.quickbook | 11 + .../tools/quickbook/test/template_section-1_5.gold | 22 + .../quickbook/test/template_section-1_5.gold-html | 38 + .../quickbook/test/template_section-1_5.quickbook | 20 + .../test/template_section1-1_5-fail.quickbook | 9 + .../test/template_section2-1_5-fail.quickbook | 10 + .../test/template_section3-1_5-fail.quickbook | 9 + src/boost/tools/quickbook/test/templates-1_3.gold | 192 + .../tools/quickbook/test/templates-1_3.gold-html | 240 + .../tools/quickbook/test/templates-1_3.quickbook | 216 + src/boost/tools/quickbook/test/templates-1_4.gold | 28 + .../tools/quickbook/test/templates-1_4.gold-html | 45 + .../tools/quickbook/test/templates-1_4.quickbook | 53 + src/boost/tools/quickbook/test/templates-1_5.gold | 239 + .../tools/quickbook/test/templates-1_5.gold-html | 308 + .../tools/quickbook/test/templates-1_5.quickbook | 297 + .../quickbook/test/templates-1_6-fail1.quickbook | 8 + src/boost/tools/quickbook/test/templates-1_6.gold | 257 + .../tools/quickbook/test/templates-1_6.gold-html | 332 + .../tools/quickbook/test/templates-1_6.quickbook | 313 + .../quickbook/test/templates-1_7-fail1.quickbook | 12 + .../quickbook/test/templates-1_7-fail2.quickbook | 11 + src/boost/tools/quickbook/test/templates-1_7.gold | 302 + .../tools/quickbook/test/templates-1_7.gold-html | 377 + .../tools/quickbook/test/templates-1_7.quickbook | 322 + .../tools/quickbook/test/unicode_escape-1_5.gold | 156 + .../quickbook/test/unicode_escape-1_5.gold-html | 159 + .../quickbook/test/unicode_escape-1_5.quickbook | 37 + src/boost/tools/quickbook/test/unit/Jamfile.v2 | 31 + .../tools/quickbook/test/unit/cleanup_test.cpp | 80 + src/boost/tools/quickbook/test/unit/glob_test.cpp | 163 + src/boost/tools/quickbook/test/unit/path_test.cpp | 189 + .../quickbook/test/unit/post_process_test.cpp | 27 + .../tools/quickbook/test/unit/source_map_test.cpp | 444 + .../quickbook/test/unit/symbols_find_null.cpp | 36 + .../tools/quickbook/test/unit/symbols_tests.cpp | 374 + src/boost/tools/quickbook/test/unit/utils_test.cpp | 67 + .../tools/quickbook/test/unit/values_test.cpp | 128 + .../quickbook/test/unmatched_element-1_5.gold | 12 + .../quickbook/test/unmatched_element-1_5.gold-html | 15 + .../quickbook/test/unmatched_element-1_5.quickbook | 12 + .../quickbook/test/unmatched_element-1_6.gold | 12 + .../quickbook/test/unmatched_element-1_6.gold-html | 15 + .../quickbook/test/unmatched_element-1_6.quickbook | 12 + .../quickbook/test/utf16be_bom-1_5-fail.quickbook | Bin 0 -> 664 bytes .../quickbook/test/utf16le_bom-1_5-fail.quickbook | Bin 0 -> 664 bytes src/boost/tools/quickbook/test/utf8-1_5.gold | 130 + src/boost/tools/quickbook/test/utf8-1_5.gold-html | 134 + src/boost/tools/quickbook/test/utf8-1_5.quickbook | 30 + src/boost/tools/quickbook/test/utf8_bom-1_5.gold | 130 + .../tools/quickbook/test/utf8_bom-1_5.gold-html | 134 + .../tools/quickbook/test/utf8_bom-1_5.quickbook | 30 + .../quickbook/test/variablelist-1_5-fail.quickbook | 5 + .../tools/quickbook/test/variablelist-1_5.gold | 107 + .../quickbook/test/variablelist-1_5.gold-html | 103 + .../quickbook/test/variablelist-1_5.quickbook | 30 + .../quickbook/test/version-0_1-fail.quickbook | 5 + .../quickbook/test/version-1_8-fail.quickbook | 5 + .../quickbook/test/version-2_0-fail.quickbook | 5 + src/boost/tools/quickbook/test/versions/Jamfile.v2 | 19 + .../quickbook/test/versions/invalid_macro-1_6.gold | 36 + .../test/versions/invalid_macro-1_6.gold-html | 39 + .../test/versions/invalid_macro-1_6.quickbook | 14 + .../test/versions/invalid_macro-inc-1_1.quickbook | 7 + .../test/versions/templates-inc-1_1.quickbook | 15 + .../test/versions/templates-inc-1_4.quickbook | 20 + .../test/versions/templates-inc-1_5.quickbook | 19 + .../quickbook/test/versions/versions-1_6.gold | 114 + .../quickbook/test/versions/versions-1_6.gold-html | 239 + .../quickbook/test/versions/versions-1_6.quickbook | 26 + src/boost/tools/quickbook/test/xinclude/Jamfile.v2 | 31 + .../quickbook/test/xinclude/sub/boost-no-inspect | 2 + .../tools/quickbook/test/xinclude/sub/stub.xml | 0 .../quickbook/test/xinclude/xinclude-1_1-alt.gold | 9 + .../test/xinclude/xinclude-1_1-alt.gold-html | 9 + .../quickbook/test/xinclude/xinclude-1_1-alt2.gold | 9 + .../quickbook/test/xinclude/xinclude-1_1.gold | 9 + .../quickbook/test/xinclude/xinclude-1_1.gold-html | 9 + .../quickbook/test/xinclude/xinclude-1_1.quickbook | 6 + .../test/xinclude/xmlbase-1_6-fail.quickbook | 4 + .../quickbook/test/xinclude/xmlbase1-1_6-alt.gold | 10 + .../test/xinclude/xmlbase1-1_6-alt.gold-html | 9 + .../quickbook/test/xinclude/xmlbase1-1_6-alt2.gold | 10 + .../quickbook/test/xinclude/xmlbase1-1_6.gold | 10 + .../quickbook/test/xinclude/xmlbase1-1_6.gold-html | 9 + .../quickbook/test/xinclude/xmlbase1-1_6.quickbook | 9 + .../quickbook/test/xinclude/xmlbase2-1_6-alt.gold | 10 + .../test/xinclude/xmlbase2-1_6-alt.gold-html | 9 + .../quickbook/test/xinclude/xmlbase2-1_6-alt2.gold | 10 + .../quickbook/test/xinclude/xmlbase2-1_6.gold | 10 + .../quickbook/test/xinclude/xmlbase2-1_6.gold-html | 9 + .../quickbook/test/xinclude/xmlbase2-1_6.quickbook | 9 + src/boost/tools/quickbook/test/xml_escape-1_2.gold | 42 + .../tools/quickbook/test/xml_escape-1_2.gold-html | 54 + .../tools/quickbook/test/xml_escape-1_2.quickbook | 14 + src/boost/tools/quickbook/test/xml_escape-1_5.gold | 43 + .../tools/quickbook/test/xml_escape-1_5.gold-html | 54 + .../tools/quickbook/test/xml_escape-1_5.quickbook | 14 + 2143 files changed, 609422 insertions(+) create mode 100644 src/boost/tools/Jamfile.v2 create mode 100644 src/boost/tools/auto_index/build/Jamfile.v2 create mode 100644 src/boost/tools/auto_index/include/auto_index_helpers.qbk create mode 100644 src/boost/tools/auto_index/index.html create mode 100644 src/boost/tools/auto_index/src/auto_index.cpp create mode 100644 src/boost/tools/auto_index/src/auto_index.hpp create mode 100644 src/boost/tools/auto_index/src/file_scanning.cpp create mode 100644 src/boost/tools/auto_index/src/index_generator.cpp create mode 100644 src/boost/tools/auto_index/src/tiny_xml.cpp create mode 100644 src/boost/tools/auto_index/src/tiny_xml.hpp create mode 100644 src/boost/tools/auto_index/test/Jamfile.v2 create mode 100644 src/boost/tools/auto_index/test/index.idx create mode 100644 src/boost/tools/auto_index/test/test1.gold create mode 100644 src/boost/tools/auto_index/test/test2.gold create mode 100644 src/boost/tools/auto_index/test/test3.gold create mode 100644 src/boost/tools/auto_index/test/type_traits.docbook create mode 100644 src/boost/tools/bcp/Jamfile.v2 create mode 100644 src/boost/tools/bcp/README.md create mode 100644 src/boost/tools/bcp/add_dependent_lib.cpp create mode 100644 src/boost/tools/bcp/add_path.cpp create mode 100644 src/boost/tools/bcp/bcp.hpp create mode 100644 src/boost/tools/bcp/bcp_imp.cpp create mode 100644 src/boost/tools/bcp/bcp_imp.hpp create mode 100644 src/boost/tools/bcp/copy_path.cpp create mode 100644 src/boost/tools/bcp/file_types.cpp create mode 100644 src/boost/tools/bcp/fileview.cpp create mode 100644 src/boost/tools/bcp/fileview.hpp create mode 100644 src/boost/tools/bcp/index.html create mode 100644 src/boost/tools/bcp/licence_info.cpp create mode 100644 src/boost/tools/bcp/licence_info.hpp create mode 100644 src/boost/tools/bcp/main.cpp create mode 100644 src/boost/tools/bcp/output_licence_info.cpp create mode 100644 src/boost/tools/bcp/path_operations.cpp create mode 100644 src/boost/tools/bcp/scan_cvs_path.cpp create mode 100644 src/boost/tools/bcp/scan_licence.cpp create mode 100644 src/boost/tools/bcp/test/Jamfile.v2 create mode 100644 src/boost/tools/boost_install/BoostConfig.cmake create mode 100644 src/boost/tools/boost_install/BoostDetectToolset.cmake create mode 100644 src/boost/tools/boost_install/Jamfile create mode 100644 src/boost/tools/boost_install/README.md create mode 100644 src/boost/tools/boost_install/boost-install-dirs.jam create mode 100644 src/boost/tools/boost_install/boost-install.jam create mode 100644 src/boost/tools/boost_install/test/BoostVersion.cmake create mode 100644 src/boost/tools/boost_install/test/atomic/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/atomic/quick.cpp create mode 100644 src/boost/tools/boost_install/test/chrono/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/chrono/quick.cpp create mode 100644 src/boost/tools/boost_install/test/container/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/container/quick.cpp create mode 100644 src/boost/tools/boost_install/test/filesystem/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/filesystem/quick.cpp create mode 100644 src/boost/tools/boost_install/test/headers/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/headers/quick.cpp create mode 100644 src/boost/tools/boost_install/test/iostreams/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/CHANGES create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/LICENSE create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile-libbz2_so create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.COMPILATION.PROBLEMS create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.XML.STUFF create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/blocksort.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-common.xsl create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-fo.xsl create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-html.xsl create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff.1 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep.1 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip.css create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1.preformatted create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2recover.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.h create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib_private.h create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore.1 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/compress.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/crctable.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/decompress.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.dsp create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/entities.xml create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/format.pl create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/huffman.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.def create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.dsp create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/makefile.msc create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.html create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.pdf create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.ps create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.xml create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/mk251.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/randtable.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.bz2 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.ref create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.bz2 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.ref create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.bz2 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.ref create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/spewG.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/unzcrash.c create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words0 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words1 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words2 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words3 create mode 100644 src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/xmlproc.sh create mode 100644 src/boost/tools/boost_install/test/iostreams/test.txt.bz2 create mode 100644 src/boost/tools/boost_install/test/iostreams/test.txt.gz create mode 100644 src/boost/tools/boost_install/test/iostreams/test_bzip2.cpp create mode 100644 src/boost/tools/boost_install/test/iostreams/test_gzip.cpp create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/ChangeLog create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/FAQ create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/INDEX create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile.in create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/adler32.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.pup create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.sas create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/compress.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/configure create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/README.contrib create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/buffer_demo.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/mtest.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/read.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/test.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.ads create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.ads create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.adb create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.ads create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.gpr create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/amd64/amd64-match.S create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/README.686 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/match.S create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.pk create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLib.pas create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLibConst.pas create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/zlibd32.mak create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.build create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.chm create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.sln create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/AssemblyInfo.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.csproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/UnitTests.cs create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/gcc_gvmat64/gvmat64.S create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inffix9.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inflate9.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffas86.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffast.S create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/test.cpp create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.cpp create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream_test.cpp create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/TODO create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/test.cc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.cc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/bld_ml64.bat create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/gvmat64.asm create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffas8664.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffasx64.asm create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/bld_ml32.bat create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/inffas32.asm create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/match686.asm create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile.am create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_info.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/configure.ac create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/crypt.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/make_vms.com create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunz.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunzip.1 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.1 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.pc.in create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/example.pas create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibd32.mak create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibpas.pas create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/pufftest.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/zeros.raw create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile.msc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/untgz.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/readme.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj.filters create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlib.rc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj.filters create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.sln create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj.filters create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/miniunz.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/minizip.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlib.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlibdll.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlib.rc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibstat.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.sln create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/miniunz.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/minizip.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlib.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlibdll.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlib.rc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibstat.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.sln create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/miniunz.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/minizip.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlib.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlibdll.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlib.rc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibstat.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.sln create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.vcxproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/miniunz.vcproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/minizip.vcproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlib.vcproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlibdll.vcproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlib.rc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibstat.vcproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.sln create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.vcproj create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/README.examples create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/enough.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/fitblk.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gun.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzappend.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzjoin.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zlib_how.html create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zpipe.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zran.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzclose.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzguts.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzlib.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzread.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzwrite.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/infback.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffixed.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/make_vms.com create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.bor create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.dj2 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.emx create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.msc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.tc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/Makefile create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.emx create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.riscos create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/README create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/descrip.mms create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/Makefile.os2 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/zlib.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/visual-basic.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/README400 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/bndsrc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/make.sh create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/zlib.inc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/qnx/package.qpg create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/example.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/infcover.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/minigzip.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/treebuild.xml create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/uncompr.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_f.mak create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_l.mak create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/DLL_FAQ.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.bor create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.gcc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.msc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/README-WIN32.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/VisualC.txt create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib.def create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib1.rc create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.cmakein create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.in create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3 create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3.pdf create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.h create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.map create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.cmakein create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.in create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib2ansi create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.c create mode 100644 src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.h create mode 100644 src/boost/tools/boost_install/test/log/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/log/quick.cpp create mode 100644 src/boost/tools/boost_install/test/mpi/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/mpi/quick.cpp create mode 100644 src/boost/tools/boost_install/test/program_options/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/program_options/quick.cpp create mode 100644 src/boost/tools/boost_install/test/python/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/python/quick.cpp create mode 100644 src/boost/tools/boost_install/test/random/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/random/lib.cpp create mode 100644 src/boost/tools/boost_install/test/random/main.cpp create mode 100644 src/boost/tools/boost_install/test/regex/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/regex/quick.cpp create mode 100644 src/boost/tools/boost_install/test/serialization/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/serialization/quick.cpp create mode 100644 src/boost/tools/boost_install/test/serialization/wquick.cpp create mode 100644 src/boost/tools/boost_install/test/system/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/system/quick.cpp create mode 100644 src/boost/tools/boost_install/test/test/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/test/test_mon.cpp create mode 100644 src/boost/tools/boost_install/test/test/test_utf.cpp create mode 100644 src/boost/tools/boost_install/test/thread/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/thread/quick.cpp create mode 100644 src/boost/tools/boost_install/test/wave/CMakeLists.txt create mode 100644 src/boost/tools/boost_install/test/wave/quick.cpp create mode 100644 src/boost/tools/boostbook/dtd/1.1/boost-no-inspect create mode 100644 src/boost/tools/boostbook/dtd/1.1/boostbook.dtd create mode 100644 src/boost/tools/boostbook/dtd/boostbook.dtd create mode 100644 src/boost/tools/boostbook/index.html create mode 100644 src/boost/tools/boostbook/setup_boostbook.py create mode 100755 src/boost/tools/boostbook/setup_boostbook.sh create mode 100644 src/boost/tools/boostbook/test/Jamfile.v2 create mode 100644 src/boost/tools/boostbook/test/alt.xml create mode 100644 src/boost/tools/boostbook/test/doxygen/Jamfile.v2 create mode 100644 src/boost/tools/boostbook/test/doxygen/autodoc.gold create mode 100644 src/boost/tools/boostbook/test/doxygen/boost/example.hpp create mode 100644 src/boost/tools/boostbook/test/doxygen/example.xml create mode 100644 src/boost/tools/boostbook/xsl/admon.xsl create mode 100644 src/boost/tools/boostbook/xsl/annotation.xsl create mode 100644 src/boost/tools/boostbook/xsl/callout.xsl create mode 100644 src/boost/tools/boostbook/xsl/caramel/LICENSE create mode 100644 src/boost/tools/boostbook/xsl/caramel/concept2docbook.xsl create mode 100644 src/boost/tools/boostbook/xsl/caramel/cpp-operators.xml create mode 100644 src/boost/tools/boostbook/xsl/caramel/unparser.xsl create mode 100644 src/boost/tools/boostbook/xsl/chunk-common.xsl create mode 100644 src/boost/tools/boostbook/xsl/docbook-layout.xsl create mode 100644 src/boost/tools/boostbook/xsl/docbook.xsl create mode 100644 src/boost/tools/boostbook/xsl/doxygen/collect.xsl create mode 100644 src/boost/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl create mode 100644 src/boost/tools/boostbook/xsl/dtd/dtd2boostbook.xsl create mode 100644 src/boost/tools/boostbook/xsl/error.xsl create mode 100644 src/boost/tools/boostbook/xsl/fo.xsl create mode 100644 src/boost/tools/boostbook/xsl/function.xsl create mode 100644 src/boost/tools/boostbook/xsl/global.xsl create mode 100644 src/boost/tools/boostbook/xsl/html-base.xsl create mode 100644 src/boost/tools/boostbook/xsl/html-help.xsl create mode 100644 src/boost/tools/boostbook/xsl/html-single.xsl create mode 100644 src/boost/tools/boostbook/xsl/html.xsl create mode 100644 src/boost/tools/boostbook/xsl/index.xsl create mode 100644 src/boost/tools/boostbook/xsl/library.xsl create mode 100644 src/boost/tools/boostbook/xsl/lookup.xsl create mode 100644 src/boost/tools/boostbook/xsl/macro.xsl create mode 100644 src/boost/tools/boostbook/xsl/manpages.xsl create mode 100644 src/boost/tools/boostbook/xsl/navbar.xsl create mode 100644 src/boost/tools/boostbook/xsl/reference.xsl create mode 100644 src/boost/tools/boostbook/xsl/relative-href.xsl create mode 100644 src/boost/tools/boostbook/xsl/source-highlight.xsl create mode 100644 src/boost/tools/boostbook/xsl/template.xsl create mode 100644 src/boost/tools/boostbook/xsl/testing/Jamfile.xsl create mode 100644 src/boost/tools/boostbook/xsl/testing/testsuite.xsl create mode 100644 src/boost/tools/boostbook/xsl/type.xsl create mode 100644 src/boost/tools/boostbook/xsl/utility.xsl create mode 100644 src/boost/tools/boostbook/xsl/xhtml.xsl create mode 100644 src/boost/tools/boostbook/xsl/xref.xsl create mode 100644 src/boost/tools/boostdep/CMakeLists.txt create mode 100644 src/boost/tools/boostdep/README.md create mode 100644 src/boost/tools/boostdep/build/Jamfile create mode 100644 src/boost/tools/boostdep/depinst/depinst.py create mode 100644 src/boost/tools/boostdep/depinst/exceptions.txt create mode 100644 src/boost/tools/boostdep/examples/report.bat create mode 100644 src/boost/tools/boostdep/examples/report.css create mode 100644 src/boost/tools/boostdep/index.html create mode 100644 src/boost/tools/boostdep/src/boostdep.cpp create mode 100644 src/boost/tools/boostdep/test/Jamfile create mode 100644 src/boost/tools/boostdep/test/assert-primary.txt create mode 100644 src/boost/tools/boostdep/test/bind-secondary.txt create mode 100644 src/boost/tools/boostdep/test/utf8-test.zip create mode 100644 src/boost/tools/build/CONTRIBUTING.adoc create mode 100644 src/boost/tools/build/Jamroot.jam create mode 100644 src/boost/tools/build/LICENSE.txt create mode 100644 src/boost/tools/build/README.adoc create mode 100644 src/boost/tools/build/azure-pipelines.yml create mode 100644 src/boost/tools/build/boost-build.jam create mode 100644 src/boost/tools/build/bootstrap.bat create mode 100755 src/boost/tools/build/bootstrap.sh create mode 100644 src/boost/tools/build/bootstrap_vms.com create mode 100644 src/boost/tools/build/example/asciidoctor/example.adoc create mode 100644 src/boost/tools/build/example/asciidoctor/example_manpage.adoc create mode 100644 src/boost/tools/build/example/asciidoctor/jamroot.jam create mode 100644 src/boost/tools/build/example/boost-build.jam create mode 100644 src/boost/tools/build/example/built_tool/Jamroot.jam create mode 100644 src/boost/tools/build/example/built_tool/core/Jamfile.jam create mode 100644 src/boost/tools/build/example/built_tool/core/a.td create mode 100644 src/boost/tools/build/example/built_tool/core/core.cpp create mode 100644 src/boost/tools/build/example/built_tool/readme.txt create mode 100644 src/boost/tools/build/example/built_tool/tblgen/Jamfile.jam create mode 100644 src/boost/tools/build/example/built_tool/tblgen/tblgen.cpp create mode 100644 src/boost/tools/build/example/complex-testing/compile-fail.cpp create mode 100644 src/boost/tools/build/example/complex-testing/fail.cpp create mode 100644 src/boost/tools/build/example/complex-testing/jamroot.jam create mode 100644 src/boost/tools/build/example/complex-testing/post.cpp create mode 100644 src/boost/tools/build/example/complex-testing/success.cpp create mode 100644 src/boost/tools/build/example/customization/class.verbatim create mode 100644 src/boost/tools/build/example/customization/codegen.cpp create mode 100644 src/boost/tools/build/example/customization/inline_file.py create mode 100644 src/boost/tools/build/example/customization/jamroot.jam create mode 100644 src/boost/tools/build/example/customization/readme.txt create mode 100644 src/boost/tools/build/example/customization/t1.verbatim create mode 100644 src/boost/tools/build/example/customization/t2.verbatim create mode 100644 src/boost/tools/build/example/customization/usage.verbatim create mode 100644 src/boost/tools/build/example/customization/verbatim.jam create mode 100644 src/boost/tools/build/example/customization/verbatim.py create mode 100644 src/boost/tools/build/example/generate/README.txt create mode 100644 src/boost/tools/build/example/generate/a.cpp create mode 100644 src/boost/tools/build/example/generate/gen.jam create mode 100644 src/boost/tools/build/example/generate/gen.py create mode 100644 src/boost/tools/build/example/generate/jamroot.jam create mode 100644 src/boost/tools/build/example/generator/README.txt create mode 100644 src/boost/tools/build/example/generator/foo.gci create mode 100644 src/boost/tools/build/example/generator/jamroot.jam create mode 100644 src/boost/tools/build/example/generator/soap.jam create mode 100644 src/boost/tools/build/example/gettext/jamfile.jam create mode 100644 src/boost/tools/build/example/gettext/jamroot.jam create mode 100644 src/boost/tools/build/example/gettext/main.cpp create mode 100644 src/boost/tools/build/example/gettext/readme.txt create mode 100644 src/boost/tools/build/example/gettext/russian.po create mode 100644 src/boost/tools/build/example/hello/hello.cpp create mode 100644 src/boost/tools/build/example/hello/jamroot.jam create mode 100644 src/boost/tools/build/example/hello/readme.adoc create mode 100644 src/boost/tools/build/example/libraries/app/app.cpp create mode 100644 src/boost/tools/build/example/libraries/app/jamfile.jam create mode 100644 src/boost/tools/build/example/libraries/jamroot.jam create mode 100644 src/boost/tools/build/example/libraries/util/foo/bar.cpp create mode 100644 src/boost/tools/build/example/libraries/util/foo/include/lib1.h create mode 100644 src/boost/tools/build/example/libraries/util/foo/jamfile.jam create mode 100644 src/boost/tools/build/example/make/foo.py create mode 100644 src/boost/tools/build/example/make/jamroot.jam create mode 100644 src/boost/tools/build/example/make/main_cpp.pro create mode 100644 src/boost/tools/build/example/make/readme.txt create mode 100644 src/boost/tools/build/example/named-install-dirs/a create mode 100644 src/boost/tools/build/example/named-install-dirs/build.jam create mode 100644 src/boost/tools/build/example/named-install-dirs/x/build.jam create mode 100644 src/boost/tools/build/example/named-install-dirs/x/y/build.jam create mode 100644 src/boost/tools/build/example/named-install-dirs/x/z/build.jam create mode 100644 src/boost/tools/build/example/pch-multi/include/extra/meta.hpp create mode 100644 src/boost/tools/build/example/pch-multi/include/pch.hpp create mode 100644 src/boost/tools/build/example/pch-multi/include/std.hpp create mode 100644 src/boost/tools/build/example/pch-multi/jamroot.jam create mode 100644 src/boost/tools/build/example/pch-multi/source/hello_world.cpp create mode 100644 src/boost/tools/build/example/pch/include/pch.hpp create mode 100644 src/boost/tools/build/example/pch/jamroot.jam create mode 100644 src/boost/tools/build/example/pch/source/hello_world.cpp create mode 100644 src/boost/tools/build/example/pkg-config/debug-packages/debugged.pc create mode 100644 src/boost/tools/build/example/pkg-config/jamroot.jam create mode 100644 src/boost/tools/build/example/pkg-config/packages/debugged.pc create mode 100644 src/boost/tools/build/example/pkg-config/packages/foobar.pc create mode 100644 src/boost/tools/build/example/pkg-config/packages/mangled-mt.pc create mode 100644 src/boost/tools/build/example/pkg-config/packages/mangled.pc create mode 100644 src/boost/tools/build/example/pkg-config/packages/versioned.pc create mode 100644 src/boost/tools/build/example/pkg-config/packages/with-var.pc create mode 100644 src/boost/tools/build/example/pkg-config/test1.cpp create mode 100644 src/boost/tools/build/example/pkg-config/test2.cpp create mode 100644 src/boost/tools/build/example/pkg-config/test3.cpp create mode 100644 src/boost/tools/build/example/pkg-config/test4.cpp create mode 100644 src/boost/tools/build/example/pkg-config/test5.cpp create mode 100644 src/boost/tools/build/example/python_modules/jamroot.jam create mode 100644 src/boost/tools/build/example/python_modules/python_helpers.jam create mode 100644 src/boost/tools/build/example/python_modules/python_helpers.py create mode 100644 src/boost/tools/build/example/python_modules/readme.txt create mode 100644 src/boost/tools/build/example/qt/README.txt create mode 100644 src/boost/tools/build/example/qt/qt3/hello/canvas.cpp create mode 100644 src/boost/tools/build/example/qt/qt3/hello/canvas.h create mode 100644 src/boost/tools/build/example/qt/qt3/hello/jamroot.jam create mode 100644 src/boost/tools/build/example/qt/qt3/hello/main.cpp create mode 100644 src/boost/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam create mode 100644 src/boost/tools/build/example/qt/qt3/moccable-cpp/main.cpp create mode 100644 src/boost/tools/build/example/qt/qt3/uic/hello_world_widget.ui create mode 100644 src/boost/tools/build/example/qt/qt3/uic/jamroot.jam create mode 100644 src/boost/tools/build/example/qt/qt3/uic/main.cpp create mode 100644 src/boost/tools/build/example/qt/qt4/hello/arrow.cpp create mode 100644 src/boost/tools/build/example/qt/qt4/hello/arrow.h create mode 100644 src/boost/tools/build/example/qt/qt4/hello/jamroot.jam create mode 100644 src/boost/tools/build/example/qt/qt4/hello/main.cpp create mode 100644 src/boost/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam create mode 100644 src/boost/tools/build/example/qt/qt4/moccable-cpp/main.cpp create mode 100644 src/boost/tools/build/example/qt/qt4/uic/hello_world_widget.ui create mode 100644 src/boost/tools/build/example/qt/qt4/uic/jamroot.jam create mode 100644 src/boost/tools/build/example/qt/qt4/uic/main.cpp create mode 100644 src/boost/tools/build/example/sanitizers/jamroot.jam create mode 100644 src/boost/tools/build/example/sanitizers/main.cpp create mode 100644 src/boost/tools/build/example/sanitizers/readme.adoc create mode 100644 src/boost/tools/build/example/sass/importing.scss create mode 100644 src/boost/tools/build/example/sass/include/foobar.scss create mode 100644 src/boost/tools/build/example/sass/jamroot.jam create mode 100644 src/boost/tools/build/example/sass/singleton.sass create mode 100644 src/boost/tools/build/example/sass/singleton.scss create mode 100644 src/boost/tools/build/example/site-config.jam create mode 100644 src/boost/tools/build/example/testing/compile-fail.cpp create mode 100644 src/boost/tools/build/example/testing/fail.cpp create mode 100644 src/boost/tools/build/example/testing/jamroot.jam create mode 100644 src/boost/tools/build/example/testing/success.cpp create mode 100644 src/boost/tools/build/example/time/hello.cpp create mode 100644 src/boost/tools/build/example/time/jamroot.jam create mode 100644 src/boost/tools/build/example/time/readme.qbk create mode 100644 src/boost/tools/build/example/try_compile/Jamroot.jam create mode 100644 src/boost/tools/build/example/try_compile/foo.cpp create mode 100644 src/boost/tools/build/example/try_compile/main.cpp create mode 100644 src/boost/tools/build/example/user-config.jam create mode 100644 src/boost/tools/build/example/variant/a.cpp create mode 100644 src/boost/tools/build/example/variant/jamfile.jam create mode 100644 src/boost/tools/build/example/variant/jamroot.jam create mode 100644 src/boost/tools/build/example/variant/libs/jamfile.jam create mode 100644 src/boost/tools/build/example/variant/libs/l.cpp create mode 100644 src/boost/tools/build/example/variant/readme.qbk create mode 100644 src/boost/tools/build/index.html create mode 100644 src/boost/tools/build/notes/README.txt create mode 100644 src/boost/tools/build/notes/build_dir_option.txt create mode 100644 src/boost/tools/build/notes/changes.txt create mode 100644 src/boost/tools/build/notes/relative_source_paths.txt create mode 100644 src/boost/tools/build/notes/release_procedure.txt create mode 100644 src/boost/tools/build/src/__init__.py create mode 100644 src/boost/tools/build/src/bootstrap.jam create mode 100644 src/boost/tools/build/src/build-system.jam create mode 100644 src/boost/tools/build/src/build/__init__.py create mode 100644 src/boost/tools/build/src/build/ac.jam create mode 100644 src/boost/tools/build/src/build/alias.jam create mode 100755 src/boost/tools/build/src/build/alias.py create mode 100644 src/boost/tools/build/src/build/build-request.jam create mode 100644 src/boost/tools/build/src/build/build_request.py create mode 100644 src/boost/tools/build/src/build/config-cache.jam create mode 100644 src/boost/tools/build/src/build/configure.jam create mode 100644 src/boost/tools/build/src/build/configure.py create mode 100644 src/boost/tools/build/src/build/engine.py create mode 100644 src/boost/tools/build/src/build/errors.py create mode 100644 src/boost/tools/build/src/build/feature.jam create mode 100644 src/boost/tools/build/src/build/feature.py create mode 100644 src/boost/tools/build/src/build/generators.jam create mode 100644 src/boost/tools/build/src/build/generators.py create mode 100644 src/boost/tools/build/src/build/project.jam create mode 100644 src/boost/tools/build/src/build/project.py create mode 100644 src/boost/tools/build/src/build/property-set.jam create mode 100644 src/boost/tools/build/src/build/property.jam create mode 100644 src/boost/tools/build/src/build/property.py create mode 100644 src/boost/tools/build/src/build/property_set.py create mode 100644 src/boost/tools/build/src/build/readme.txt create mode 100644 src/boost/tools/build/src/build/scanner.jam create mode 100644 src/boost/tools/build/src/build/scanner.py create mode 100644 src/boost/tools/build/src/build/targets.jam create mode 100644 src/boost/tools/build/src/build/targets.py create mode 100644 src/boost/tools/build/src/build/toolset.jam create mode 100644 src/boost/tools/build/src/build/toolset.py create mode 100644 src/boost/tools/build/src/build/type.jam create mode 100644 src/boost/tools/build/src/build/type.py create mode 100644 src/boost/tools/build/src/build/version.jam create mode 100644 src/boost/tools/build/src/build/version.py create mode 100644 src/boost/tools/build/src/build/virtual-target.jam create mode 100644 src/boost/tools/build/src/build/virtual_target.py create mode 100644 src/boost/tools/build/src/build_system.py create mode 100644 src/boost/tools/build/src/contrib/__init__.py create mode 100644 src/boost/tools/build/src/contrib/boost.jam create mode 100644 src/boost/tools/build/src/contrib/boost.py create mode 100644 src/boost/tools/build/src/contrib/modular.jam create mode 100644 src/boost/tools/build/src/contrib/tntnet.jam create mode 100644 src/boost/tools/build/src/contrib/wxFormBuilder.jam create mode 100644 src/boost/tools/build/src/engine/boost-jam.spec create mode 100644 src/boost/tools/build/src/engine/boost-no-inspect create mode 100644 src/boost/tools/build/src/engine/build.bat create mode 100755 src/boost/tools/build/src/engine/build.sh create mode 100644 src/boost/tools/build/src/engine/build_vms.com create mode 100644 src/boost/tools/build/src/engine/builtins.cpp create mode 100644 src/boost/tools/build/src/engine/builtins.h create mode 100644 src/boost/tools/build/src/engine/bump_version.py create mode 100644 src/boost/tools/build/src/engine/check_clib.cpp create mode 100644 src/boost/tools/build/src/engine/check_cxx11.cpp create mode 100644 src/boost/tools/build/src/engine/class.cpp create mode 100644 src/boost/tools/build/src/engine/class.h create mode 100644 src/boost/tools/build/src/engine/command.cpp create mode 100644 src/boost/tools/build/src/engine/command.h create mode 100644 src/boost/tools/build/src/engine/compile.cpp create mode 100644 src/boost/tools/build/src/engine/compile.h create mode 100644 src/boost/tools/build/src/engine/config.h create mode 100644 src/boost/tools/build/src/engine/config_toolset.bat create mode 100644 src/boost/tools/build/src/engine/constants.cpp create mode 100644 src/boost/tools/build/src/engine/constants.h create mode 100644 src/boost/tools/build/src/engine/cwd.cpp create mode 100644 src/boost/tools/build/src/engine/cwd.h create mode 100644 src/boost/tools/build/src/engine/debian/changelog create mode 100644 src/boost/tools/build/src/engine/debian/control create mode 100644 src/boost/tools/build/src/engine/debian/copyright create mode 100644 src/boost/tools/build/src/engine/debian/jam.man.sgml create mode 100755 src/boost/tools/build/src/engine/debian/rules create mode 100644 src/boost/tools/build/src/engine/debug.cpp create mode 100644 src/boost/tools/build/src/engine/debug.h create mode 100644 src/boost/tools/build/src/engine/debugger.cpp create mode 100644 src/boost/tools/build/src/engine/debugger.h create mode 100644 src/boost/tools/build/src/engine/execcmd.cpp create mode 100644 src/boost/tools/build/src/engine/execcmd.h create mode 100644 src/boost/tools/build/src/engine/execnt.cpp create mode 100644 src/boost/tools/build/src/engine/execunix.cpp create mode 100644 src/boost/tools/build/src/engine/execvms.cpp create mode 100644 src/boost/tools/build/src/engine/filent.cpp create mode 100644 src/boost/tools/build/src/engine/filesys.cpp create mode 100644 src/boost/tools/build/src/engine/filesys.h create mode 100644 src/boost/tools/build/src/engine/fileunix.cpp create mode 100644 src/boost/tools/build/src/engine/filevms.cpp create mode 100644 src/boost/tools/build/src/engine/frames.cpp create mode 100644 src/boost/tools/build/src/engine/frames.h create mode 100644 src/boost/tools/build/src/engine/function.cpp create mode 100644 src/boost/tools/build/src/engine/function.h create mode 100644 src/boost/tools/build/src/engine/glob.cpp create mode 100644 src/boost/tools/build/src/engine/guess_toolset.bat create mode 100644 src/boost/tools/build/src/engine/hash.cpp create mode 100644 src/boost/tools/build/src/engine/hash.h create mode 100644 src/boost/tools/build/src/engine/hcache.cpp create mode 100644 src/boost/tools/build/src/engine/hcache.h create mode 100644 src/boost/tools/build/src/engine/hdrmacro.cpp create mode 100644 src/boost/tools/build/src/engine/hdrmacro.h create mode 100644 src/boost/tools/build/src/engine/headers.cpp create mode 100644 src/boost/tools/build/src/engine/headers.h create mode 100644 src/boost/tools/build/src/engine/jam.cpp create mode 100644 src/boost/tools/build/src/engine/jam.h create mode 100644 src/boost/tools/build/src/engine/jam_strings.cpp create mode 100644 src/boost/tools/build/src/engine/jam_strings.h create mode 100644 src/boost/tools/build/src/engine/jamgram.cpp create mode 100644 src/boost/tools/build/src/engine/jamgram.hpp create mode 100644 src/boost/tools/build/src/engine/jamgram.y create mode 100644 src/boost/tools/build/src/engine/jamgram.yy create mode 100644 src/boost/tools/build/src/engine/jamgramtab.h create mode 100644 src/boost/tools/build/src/engine/lists.cpp create mode 100644 src/boost/tools/build/src/engine/lists.h create mode 100644 src/boost/tools/build/src/engine/make.cpp create mode 100644 src/boost/tools/build/src/engine/make.h create mode 100644 src/boost/tools/build/src/engine/make1.cpp create mode 100644 src/boost/tools/build/src/engine/md5.cpp create mode 100644 src/boost/tools/build/src/engine/md5.h create mode 100644 src/boost/tools/build/src/engine/mem.cpp create mode 100644 src/boost/tools/build/src/engine/mem.h create mode 100644 src/boost/tools/build/src/engine/modules.cpp create mode 100644 src/boost/tools/build/src/engine/modules.h create mode 100644 src/boost/tools/build/src/engine/modules/order.cpp create mode 100644 src/boost/tools/build/src/engine/modules/path.cpp create mode 100644 src/boost/tools/build/src/engine/modules/property-set.cpp create mode 100644 src/boost/tools/build/src/engine/modules/readme.txt create mode 100644 src/boost/tools/build/src/engine/modules/regex.cpp create mode 100644 src/boost/tools/build/src/engine/modules/sequence.cpp create mode 100644 src/boost/tools/build/src/engine/modules/set.cpp create mode 100644 src/boost/tools/build/src/engine/native.cpp create mode 100644 src/boost/tools/build/src/engine/native.h create mode 100644 src/boost/tools/build/src/engine/object.cpp create mode 100644 src/boost/tools/build/src/engine/object.h create mode 100644 src/boost/tools/build/src/engine/option.cpp create mode 100644 src/boost/tools/build/src/engine/option.h create mode 100644 src/boost/tools/build/src/engine/output.cpp create mode 100644 src/boost/tools/build/src/engine/output.h create mode 100644 src/boost/tools/build/src/engine/parse.cpp create mode 100644 src/boost/tools/build/src/engine/parse.h create mode 100644 src/boost/tools/build/src/engine/patchlevel.h create mode 100644 src/boost/tools/build/src/engine/pathnt.cpp create mode 100644 src/boost/tools/build/src/engine/pathsys.cpp create mode 100644 src/boost/tools/build/src/engine/pathsys.h create mode 100644 src/boost/tools/build/src/engine/pathunix.cpp create mode 100644 src/boost/tools/build/src/engine/pathvms.cpp create mode 100644 src/boost/tools/build/src/engine/regexp.cpp create mode 100644 src/boost/tools/build/src/engine/regexp.h create mode 100644 src/boost/tools/build/src/engine/rules.cpp create mode 100644 src/boost/tools/build/src/engine/rules.h create mode 100644 src/boost/tools/build/src/engine/scan.cpp create mode 100644 src/boost/tools/build/src/engine/scan.h create mode 100644 src/boost/tools/build/src/engine/search.cpp create mode 100644 src/boost/tools/build/src/engine/search.h create mode 100644 src/boost/tools/build/src/engine/startup.cpp create mode 100644 src/boost/tools/build/src/engine/startup.h create mode 100644 src/boost/tools/build/src/engine/subst.cpp create mode 100644 src/boost/tools/build/src/engine/subst.h create mode 100644 src/boost/tools/build/src/engine/sysinfo.cpp create mode 100644 src/boost/tools/build/src/engine/sysinfo.h create mode 100644 src/boost/tools/build/src/engine/timestamp.cpp create mode 100644 src/boost/tools/build/src/engine/timestamp.h create mode 100644 src/boost/tools/build/src/engine/variable.cpp create mode 100644 src/boost/tools/build/src/engine/variable.h create mode 100644 src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd create mode 100644 src/boost/tools/build/src/engine/w32_getreg.cpp create mode 100644 src/boost/tools/build/src/engine/yyacc.cpp create mode 100644 src/boost/tools/build/src/exceptions.py create mode 100644 src/boost/tools/build/src/kernel/boost-build.jam create mode 100644 src/boost/tools/build/src/kernel/bootstrap.jam create mode 100644 src/boost/tools/build/src/kernel/bootstrap.py create mode 100644 src/boost/tools/build/src/kernel/class.jam create mode 100644 src/boost/tools/build/src/kernel/errors.jam create mode 100644 src/boost/tools/build/src/kernel/modules.jam create mode 100644 src/boost/tools/build/src/manager.py create mode 100644 src/boost/tools/build/src/options/help.jam create mode 100644 src/boost/tools/build/src/tools/__init__.py create mode 100644 src/boost/tools/build/src/tools/acc.jam create mode 100644 src/boost/tools/build/src/tools/asciidoctor.jam create mode 100644 src/boost/tools/build/src/tools/auto-index.jam create mode 100644 src/boost/tools/build/src/tools/bison.jam create mode 100644 src/boost/tools/build/src/tools/boostbook-config.jam create mode 100644 src/boost/tools/build/src/tools/boostbook.jam create mode 100644 src/boost/tools/build/src/tools/borland.jam create mode 100644 src/boost/tools/build/src/tools/builtin.jam create mode 100644 src/boost/tools/build/src/tools/builtin.py create mode 100644 src/boost/tools/build/src/tools/bzip2.jam create mode 100644 src/boost/tools/build/src/tools/cast.jam create mode 100644 src/boost/tools/build/src/tools/cast.py create mode 100644 src/boost/tools/build/src/tools/clang-darwin.jam create mode 100644 src/boost/tools/build/src/tools/clang-linux.jam create mode 100644 src/boost/tools/build/src/tools/clang-vxworks.jam create mode 100644 src/boost/tools/build/src/tools/clang-win.jam create mode 100644 src/boost/tools/build/src/tools/clang.jam create mode 100644 src/boost/tools/build/src/tools/common.jam create mode 100644 src/boost/tools/build/src/tools/common.py create mode 100644 src/boost/tools/build/src/tools/como-linux.jam create mode 100644 src/boost/tools/build/src/tools/como-win.jam create mode 100644 src/boost/tools/build/src/tools/como.jam create mode 100644 src/boost/tools/build/src/tools/convert.jam create mode 100644 src/boost/tools/build/src/tools/cray.jam create mode 100644 src/boost/tools/build/src/tools/cw-config.jam create mode 100644 src/boost/tools/build/src/tools/cw.jam create mode 100644 src/boost/tools/build/src/tools/cygwin.jam create mode 100644 src/boost/tools/build/src/tools/darwin.jam create mode 100644 src/boost/tools/build/src/tools/darwin.py create mode 100644 src/boost/tools/build/src/tools/diab.jam create mode 100644 src/boost/tools/build/src/tools/dmc.jam create mode 100644 src/boost/tools/build/src/tools/docutils.jam create mode 100644 src/boost/tools/build/src/tools/doxproc.py create mode 100644 src/boost/tools/build/src/tools/doxygen-config.jam create mode 100644 src/boost/tools/build/src/tools/doxygen.jam create mode 100644 src/boost/tools/build/src/tools/doxygen/windows-paths-check.doxyfile create mode 100644 src/boost/tools/build/src/tools/doxygen/windows-paths-check.hpp create mode 100644 src/boost/tools/build/src/tools/embarcadero.jam create mode 100644 src/boost/tools/build/src/tools/emscripten.jam create mode 100644 src/boost/tools/build/src/tools/features/__init_features__.jam create mode 100644 src/boost/tools/build/src/tools/features/address-model-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/allow-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/architecture-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/archiveflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/asmflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/build-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/cflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/compileflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/conditional-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/coverage-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/cxx-template-depth-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/cxxabi-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/cxxflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/cxxstd-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/debug-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/define-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/dependency-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/dll-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/exception-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/fflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/file-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/find-lib-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/flags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/force-include-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/include-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/instruction-set-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/internal-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/library-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/link-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/linkflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/local-visibility-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/location-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/location-prefix-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/lto-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/name-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/objcflags-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/optimization-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/os-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/relevant-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/response-file-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/rtti-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/runtime-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/sanitizers-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/search-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/source-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/stdlib-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/strip-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/tag-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/threadapi-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/threading-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/toolset-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/translate-path-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/user-interface-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/variant-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/version-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/visibility-feature.jam create mode 100644 src/boost/tools/build/src/tools/features/warnings-feature.jam create mode 100644 src/boost/tools/build/src/tools/flags.jam create mode 100644 src/boost/tools/build/src/tools/fop.jam create mode 100644 src/boost/tools/build/src/tools/fortran.jam create mode 100644 src/boost/tools/build/src/tools/gcc.jam create mode 100644 src/boost/tools/build/src/tools/gcc.py create mode 100644 src/boost/tools/build/src/tools/generate.jam create mode 100644 src/boost/tools/build/src/tools/generators/__init_generators__.jam create mode 100644 src/boost/tools/build/src/tools/generators/archive-generator.jam create mode 100644 src/boost/tools/build/src/tools/generators/c-compiling-generator.jam create mode 100644 src/boost/tools/build/src/tools/generators/dummy-generator.jam create mode 100644 src/boost/tools/build/src/tools/generators/lib-generator.jam create mode 100644 src/boost/tools/build/src/tools/generators/linking-generator.jam create mode 100644 src/boost/tools/build/src/tools/generators/prebuilt-lib-generator.jam create mode 100644 src/boost/tools/build/src/tools/generators/searched-lib-generator.jam create mode 100644 src/boost/tools/build/src/tools/gettext.jam create mode 100644 src/boost/tools/build/src/tools/gfortran.jam create mode 100644 src/boost/tools/build/src/tools/hp_cxx.jam create mode 100644 src/boost/tools/build/src/tools/hpfortran.jam create mode 100644 src/boost/tools/build/src/tools/ifort.jam create mode 100644 src/boost/tools/build/src/tools/intel-darwin.jam create mode 100644 src/boost/tools/build/src/tools/intel-linux.jam create mode 100644 src/boost/tools/build/src/tools/intel-vxworks.jam create mode 100644 src/boost/tools/build/src/tools/intel-win.jam create mode 100644 src/boost/tools/build/src/tools/intel.jam create mode 100644 src/boost/tools/build/src/tools/lex.jam create mode 100644 src/boost/tools/build/src/tools/libjpeg.jam create mode 100644 src/boost/tools/build/src/tools/libpng.jam create mode 100644 src/boost/tools/build/src/tools/libtiff.jam create mode 100644 src/boost/tools/build/src/tools/link.jam create mode 100644 src/boost/tools/build/src/tools/lzma.jam create mode 100644 src/boost/tools/build/src/tools/make.jam create mode 100644 src/boost/tools/build/src/tools/make.py create mode 100644 src/boost/tools/build/src/tools/mc.jam create mode 100644 src/boost/tools/build/src/tools/mc.py create mode 100644 src/boost/tools/build/src/tools/message.jam create mode 100644 src/boost/tools/build/src/tools/message.py create mode 100644 src/boost/tools/build/src/tools/midl.jam create mode 100644 src/boost/tools/build/src/tools/midl.py create mode 100644 src/boost/tools/build/src/tools/mipspro.jam create mode 100644 src/boost/tools/build/src/tools/mpi.jam create mode 100644 src/boost/tools/build/src/tools/msvc-config.jam create mode 100644 src/boost/tools/build/src/tools/msvc.jam create mode 100644 src/boost/tools/build/src/tools/msvc.py create mode 100644 src/boost/tools/build/src/tools/notfile.jam create mode 100644 src/boost/tools/build/src/tools/notfile.py create mode 100644 src/boost/tools/build/src/tools/openssl.jam create mode 100644 src/boost/tools/build/src/tools/package.jam create mode 100644 src/boost/tools/build/src/tools/package.py create mode 100644 src/boost/tools/build/src/tools/pathscale.jam create mode 100644 src/boost/tools/build/src/tools/pch.jam create mode 100644 src/boost/tools/build/src/tools/pch.py create mode 100644 src/boost/tools/build/src/tools/pgi.jam create mode 100644 src/boost/tools/build/src/tools/pkg-config.jam create mode 100644 src/boost/tools/build/src/tools/python-config.jam create mode 100644 src/boost/tools/build/src/tools/python.jam create mode 100644 src/boost/tools/build/src/tools/qcc.jam create mode 100644 src/boost/tools/build/src/tools/qt.jam create mode 100644 src/boost/tools/build/src/tools/qt3.jam create mode 100644 src/boost/tools/build/src/tools/qt4.jam create mode 100644 src/boost/tools/build/src/tools/qt5.jam create mode 100644 src/boost/tools/build/src/tools/quickbook-config.jam create mode 100644 src/boost/tools/build/src/tools/quickbook.jam create mode 100644 src/boost/tools/build/src/tools/rc.jam create mode 100644 src/boost/tools/build/src/tools/rc.py create mode 100644 src/boost/tools/build/src/tools/sass.jam create mode 100644 src/boost/tools/build/src/tools/saxonhe.jam create mode 100644 src/boost/tools/build/src/tools/stage.jam create mode 100644 src/boost/tools/build/src/tools/stage.py create mode 100644 src/boost/tools/build/src/tools/stlport.jam create mode 100644 src/boost/tools/build/src/tools/sun.jam create mode 100644 src/boost/tools/build/src/tools/symlink.jam create mode 100644 src/boost/tools/build/src/tools/symlink.py create mode 100644 src/boost/tools/build/src/tools/testing-aux.jam create mode 100644 src/boost/tools/build/src/tools/testing.jam create mode 100644 src/boost/tools/build/src/tools/testing.py create mode 100644 src/boost/tools/build/src/tools/types/__init__.py create mode 100644 src/boost/tools/build/src/tools/types/adoc.jam create mode 100644 src/boost/tools/build/src/tools/types/asm.jam create mode 100644 src/boost/tools/build/src/tools/types/asm.py create mode 100644 src/boost/tools/build/src/tools/types/cpp.jam create mode 100644 src/boost/tools/build/src/tools/types/cpp.py create mode 100644 src/boost/tools/build/src/tools/types/css.jam create mode 100644 src/boost/tools/build/src/tools/types/docbook.jam create mode 100644 src/boost/tools/build/src/tools/types/exe.jam create mode 100644 src/boost/tools/build/src/tools/types/exe.py create mode 100644 src/boost/tools/build/src/tools/types/html.jam create mode 100644 src/boost/tools/build/src/tools/types/html.py create mode 100644 src/boost/tools/build/src/tools/types/lib.jam create mode 100644 src/boost/tools/build/src/tools/types/lib.py create mode 100644 src/boost/tools/build/src/tools/types/man.jam create mode 100644 src/boost/tools/build/src/tools/types/markdown.jam create mode 100644 src/boost/tools/build/src/tools/types/markdown.py create mode 100644 src/boost/tools/build/src/tools/types/obj.jam create mode 100644 src/boost/tools/build/src/tools/types/obj.py create mode 100644 src/boost/tools/build/src/tools/types/objc.jam create mode 100644 src/boost/tools/build/src/tools/types/pdf.jam create mode 100644 src/boost/tools/build/src/tools/types/preprocessed.jam create mode 100644 src/boost/tools/build/src/tools/types/preprocessed.py create mode 100644 src/boost/tools/build/src/tools/types/qt.jam create mode 100644 src/boost/tools/build/src/tools/types/register.jam create mode 100644 src/boost/tools/build/src/tools/types/rsp.jam create mode 100644 src/boost/tools/build/src/tools/types/rsp.py create mode 100644 src/boost/tools/build/src/tools/types/sass-type.jam create mode 100644 src/boost/tools/build/src/tools/types/xml.jam create mode 100644 src/boost/tools/build/src/tools/unix.jam create mode 100644 src/boost/tools/build/src/tools/unix.py create mode 100644 src/boost/tools/build/src/tools/vacpp.jam create mode 100644 src/boost/tools/build/src/tools/vmsdecc.jam create mode 100644 src/boost/tools/build/src/tools/whale.jam create mode 100644 src/boost/tools/build/src/tools/xlcpp.jam create mode 100644 src/boost/tools/build/src/tools/xlf.jam create mode 100644 src/boost/tools/build/src/tools/xsltproc-config.jam create mode 100644 src/boost/tools/build/src/tools/xsltproc.jam create mode 100644 src/boost/tools/build/src/tools/xsltproc/included.xsl create mode 100644 src/boost/tools/build/src/tools/xsltproc/test.xml create mode 100644 src/boost/tools/build/src/tools/xsltproc/test.xsl create mode 100644 src/boost/tools/build/src/tools/zlib.jam create mode 100644 src/boost/tools/build/src/tools/zstd.jam create mode 100644 src/boost/tools/build/src/util/__init__.py create mode 100644 src/boost/tools/build/src/util/assert.jam create mode 100644 src/boost/tools/build/src/util/container.jam create mode 100644 src/boost/tools/build/src/util/doc.jam create mode 100644 src/boost/tools/build/src/util/indirect.jam create mode 100644 src/boost/tools/build/src/util/indirect.py create mode 100644 src/boost/tools/build/src/util/logger.py create mode 100644 src/boost/tools/build/src/util/numbers.jam create mode 100644 src/boost/tools/build/src/util/option.jam create mode 100644 src/boost/tools/build/src/util/option.py create mode 100644 src/boost/tools/build/src/util/order.jam create mode 100644 src/boost/tools/build/src/util/order.py create mode 100644 src/boost/tools/build/src/util/os.jam create mode 100644 src/boost/tools/build/src/util/os_j.py create mode 100644 src/boost/tools/build/src/util/param.jam create mode 100644 src/boost/tools/build/src/util/path.jam create mode 100644 src/boost/tools/build/src/util/path.py create mode 100644 src/boost/tools/build/src/util/print.jam create mode 100644 src/boost/tools/build/src/util/regex.jam create mode 100644 src/boost/tools/build/src/util/regex.py create mode 100644 src/boost/tools/build/src/util/sequence.jam create mode 100644 src/boost/tools/build/src/util/sequence.py create mode 100644 src/boost/tools/build/src/util/set.jam create mode 100644 src/boost/tools/build/src/util/set.py create mode 100644 src/boost/tools/build/src/util/string.jam create mode 100644 src/boost/tools/build/src/util/utility.jam create mode 100644 src/boost/tools/build/src/util/utility.py create mode 100644 src/boost/tools/build/test/BoostBuild.py create mode 100644 src/boost/tools/build/test/Jamfile.jam create mode 100755 src/boost/tools/build/test/MockToolset.py create mode 100644 src/boost/tools/build/test/TestCmd.py create mode 100644 src/boost/tools/build/test/TestToolset.py create mode 100644 src/boost/tools/build/test/abs_workdir.py create mode 100644 src/boost/tools/build/test/absolute_sources.py create mode 100644 src/boost/tools/build/test/alias.py create mode 100644 src/boost/tools/build/test/alternatives.py create mode 100644 src/boost/tools/build/test/always.py create mode 100644 src/boost/tools/build/test/bad_dirname.py create mode 100644 src/boost/tools/build/test/boost-build.jam create mode 100644 src/boost/tools/build/test/boostbook.py create mode 100644 src/boost/tools/build/test/boostbook/a.hpp create mode 100644 src/boost/tools/build/test/boostbook/docs.xml create mode 100644 src/boost/tools/build/test/boostbook/jamroot.jam create mode 100644 src/boost/tools/build/test/build_dir.py create mode 100644 src/boost/tools/build/test/build_file.py create mode 100644 src/boost/tools/build/test/build_hooks.py create mode 100644 src/boost/tools/build/test/build_no.py create mode 100755 src/boost/tools/build/test/builtin_echo.py create mode 100755 src/boost/tools/build/test/builtin_exit.py create mode 100755 src/boost/tools/build/test/builtin_glob.py create mode 100644 src/boost/tools/build/test/builtin_glob_archive.py create mode 100755 src/boost/tools/build/test/builtin_readlink.py create mode 100755 src/boost/tools/build/test/builtin_split_by_characters.py create mode 100755 src/boost/tools/build/test/bzip2.py create mode 100644 src/boost/tools/build/test/c_file.py create mode 100644 src/boost/tools/build/test/chain.py create mode 100644 src/boost/tools/build/test/clean.py create mode 100644 src/boost/tools/build/test/cli_property_expansion.py create mode 100755 src/boost/tools/build/test/collect_debug_info.py create mode 100644 src/boost/tools/build/test/command_line_properties.py create mode 100644 src/boost/tools/build/test/composite.py create mode 100644 src/boost/tools/build/test/conditionals.py create mode 100644 src/boost/tools/build/test/conditionals2.py create mode 100644 src/boost/tools/build/test/conditionals3.py create mode 100644 src/boost/tools/build/test/conditionals4.py create mode 100755 src/boost/tools/build/test/conditionals_multiple.py create mode 100755 src/boost/tools/build/test/configuration.py create mode 100644 src/boost/tools/build/test/configure.py create mode 100755 src/boost/tools/build/test/copy_time.py create mode 100644 src/boost/tools/build/test/core-language/test.jam create mode 100755 src/boost/tools/build/test/core_action_output.py create mode 100755 src/boost/tools/build/test/core_action_status.py create mode 100755 src/boost/tools/build/test/core_actions_quietly.py create mode 100755 src/boost/tools/build/test/core_arguments.py create mode 100755 src/boost/tools/build/test/core_at_file.py create mode 100755 src/boost/tools/build/test/core_bindrule.py create mode 100644 src/boost/tools/build/test/core_d12.py create mode 100644 src/boost/tools/build/test/core_delete_module.py create mode 100644 src/boost/tools/build/test/core_dependencies.py create mode 100644 src/boost/tools/build/test/core_fail_expected.py create mode 100644 src/boost/tools/build/test/core_import_module.py create mode 100644 src/boost/tools/build/test/core_jamshell.py create mode 100755 src/boost/tools/build/test/core_language.py create mode 100644 src/boost/tools/build/test/core_modifiers.py create mode 100755 src/boost/tools/build/test/core_multifile_actions.py create mode 100755 src/boost/tools/build/test/core_nt_cmd_line.py create mode 100755 src/boost/tools/build/test/core_option_d2.py create mode 100755 src/boost/tools/build/test/core_option_l.py create mode 100755 src/boost/tools/build/test/core_option_n.py create mode 100755 src/boost/tools/build/test/core_parallel_actions.py create mode 100755 src/boost/tools/build/test/core_parallel_multifile_actions_1.py create mode 100755 src/boost/tools/build/test/core_parallel_multifile_actions_2.py create mode 100644 src/boost/tools/build/test/core_scanner.py create mode 100755 src/boost/tools/build/test/core_source_line_tracking.py create mode 100644 src/boost/tools/build/test/core_syntax_error_exit_status.py create mode 100644 src/boost/tools/build/test/core_typecheck.py create mode 100755 src/boost/tools/build/test/core_update_now.py create mode 100755 src/boost/tools/build/test/core_variables_in_actions.py create mode 100644 src/boost/tools/build/test/core_varnames.py create mode 100644 src/boost/tools/build/test/custom_generator.py create mode 100644 src/boost/tools/build/test/debugger-mi.py create mode 100644 src/boost/tools/build/test/debugger.py create mode 100644 src/boost/tools/build/test/default_build.py create mode 100644 src/boost/tools/build/test/default_features.py create mode 100755 src/boost/tools/build/test/default_toolset.py create mode 100644 src/boost/tools/build/test/dependency_property.py create mode 100644 src/boost/tools/build/test/dependency_test.py create mode 100644 src/boost/tools/build/test/disambiguation.py create mode 100644 src/boost/tools/build/test/dll_path.py create mode 100644 src/boost/tools/build/test/double_loading.py create mode 100644 src/boost/tools/build/test/duplicate.py create mode 100644 src/boost/tools/build/test/example_customization.py create mode 100644 src/boost/tools/build/test/example_gettext.py create mode 100644 src/boost/tools/build/test/example_libraries.py create mode 100644 src/boost/tools/build/test/example_make.py create mode 100644 src/boost/tools/build/test/example_qt4.py create mode 100755 src/boost/tools/build/test/exit_status.py create mode 100644 src/boost/tools/build/test/expansion.py create mode 100644 src/boost/tools/build/test/explicit.py create mode 100755 src/boost/tools/build/test/feature_cxxflags.py create mode 100644 src/boost/tools/build/test/feature_force_include.py create mode 100644 src/boost/tools/build/test/feature_implicit_dependency.py create mode 100644 src/boost/tools/build/test/feature_relevant.py create mode 100644 src/boost/tools/build/test/feature_suppress_import_lib.py create mode 100644 src/boost/tools/build/test/file_types.py create mode 100644 src/boost/tools/build/test/flags.py create mode 100644 src/boost/tools/build/test/gcc_runtime.py create mode 100755 src/boost/tools/build/test/generator_selection.py create mode 100644 src/boost/tools/build/test/generators_test.py create mode 100644 src/boost/tools/build/test/implicit_dependency.py create mode 100644 src/boost/tools/build/test/indirect_conditional.py create mode 100644 src/boost/tools/build/test/inherit_toolset.py create mode 100755 src/boost/tools/build/test/inherited_dependency.py create mode 100644 src/boost/tools/build/test/inline.py create mode 100755 src/boost/tools/build/test/install_build_no.py create mode 100644 src/boost/tools/build/test/lang_objc.py create mode 100644 src/boost/tools/build/test/lib_source_property.py create mode 100755 src/boost/tools/build/test/lib_zlib.py create mode 100755 src/boost/tools/build/test/libjpeg.py create mode 100755 src/boost/tools/build/test/liblzma.py create mode 100755 src/boost/tools/build/test/libpng.py create mode 100644 src/boost/tools/build/test/library_chain.py create mode 100644 src/boost/tools/build/test/library_order.py create mode 100644 src/boost/tools/build/test/library_property.py create mode 100755 src/boost/tools/build/test/libtiff.py create mode 100755 src/boost/tools/build/test/libzstd.py create mode 100755 src/boost/tools/build/test/link.py create mode 100644 src/boost/tools/build/test/load_dir.py create mode 100644 src/boost/tools/build/test/load_order.py create mode 100644 src/boost/tools/build/test/loop.py create mode 100644 src/boost/tools/build/test/make_rule.py create mode 100755 src/boost/tools/build/test/message.py create mode 100644 src/boost/tools/build/test/module_actions.py create mode 100644 src/boost/tools/build/test/ndebug.py create mode 100644 src/boost/tools/build/test/no_type.py create mode 100644 src/boost/tools/build/test/notfile.py create mode 100644 src/boost/tools/build/test/ordered_include.py create mode 100644 src/boost/tools/build/test/ordered_properties.py create mode 100644 src/boost/tools/build/test/out_of_tree.py create mode 100644 src/boost/tools/build/test/package.py create mode 100644 src/boost/tools/build/test/param.py create mode 100644 src/boost/tools/build/test/path_features.py create mode 100644 src/boost/tools/build/test/pch.py create mode 100644 src/boost/tools/build/test/prebuilt.py create mode 100644 src/boost/tools/build/test/prebuilt/ext/a.cpp create mode 100644 src/boost/tools/build/test/prebuilt/ext/debug/a.h create mode 100644 src/boost/tools/build/test/prebuilt/ext/jamfile.jam create mode 100644 src/boost/tools/build/test/prebuilt/ext/jamfile2.jam create mode 100644 src/boost/tools/build/test/prebuilt/ext/jamfile3.jam create mode 100644 src/boost/tools/build/test/prebuilt/ext/jamroot.jam create mode 100644 src/boost/tools/build/test/prebuilt/ext/release/a.h create mode 100644 src/boost/tools/build/test/prebuilt/hello.cpp create mode 100644 src/boost/tools/build/test/prebuilt/jamfile.jam create mode 100644 src/boost/tools/build/test/prebuilt/jamroot.jam create mode 100755 src/boost/tools/build/test/preprocessor.py create mode 100644 src/boost/tools/build/test/print.py create mode 100644 src/boost/tools/build/test/project-test3/a.cpp create mode 100644 src/boost/tools/build/test/project-test3/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test3/jamroot.jam create mode 100644 src/boost/tools/build/test/project-test3/lib/b.cpp create mode 100644 src/boost/tools/build/test/project-test3/lib/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test3/lib2/c.cpp create mode 100644 src/boost/tools/build/test/project-test3/lib2/d.cpp create mode 100644 src/boost/tools/build/test/project-test3/lib2/helper/e.cpp create mode 100644 src/boost/tools/build/test/project-test3/lib2/helper/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test3/lib2/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test3/lib3/f.cpp create mode 100644 src/boost/tools/build/test/project-test3/lib3/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test3/lib3/jamroot.jam create mode 100644 src/boost/tools/build/test/project-test3/readme.txt create mode 100644 src/boost/tools/build/test/project-test4/a.cpp create mode 100644 src/boost/tools/build/test/project-test4/a_gcc.cpp create mode 100644 src/boost/tools/build/test/project-test4/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test4/jamfile3.jam create mode 100644 src/boost/tools/build/test/project-test4/jamfile4.jam create mode 100644 src/boost/tools/build/test/project-test4/jamfile5.jam create mode 100644 src/boost/tools/build/test/project-test4/jamroot.jam create mode 100644 src/boost/tools/build/test/project-test4/lib/b.cpp create mode 100644 src/boost/tools/build/test/project-test4/lib/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test4/lib/jamfile1.jam create mode 100644 src/boost/tools/build/test/project-test4/lib/jamfile2.jam create mode 100644 src/boost/tools/build/test/project-test4/lib/jamfile3.jam create mode 100644 src/boost/tools/build/test/project-test4/lib2/jamfile.jam create mode 100644 src/boost/tools/build/test/project-test4/lib2/jamfile2.jam create mode 100644 src/boost/tools/build/test/project-test4/readme.txt create mode 100644 src/boost/tools/build/test/project_dependencies.py create mode 100644 src/boost/tools/build/test/project_glob.py create mode 100755 src/boost/tools/build/test/project_id.py create mode 100644 src/boost/tools/build/test/project_root_constants.py create mode 100644 src/boost/tools/build/test/project_root_rule.py create mode 100644 src/boost/tools/build/test/project_test3.py create mode 100644 src/boost/tools/build/test/project_test4.py create mode 100644 src/boost/tools/build/test/property_expansion.py create mode 100755 src/boost/tools/build/test/qt4.py create mode 100644 src/boost/tools/build/test/qt4/jamroot.jam create mode 100644 src/boost/tools/build/test/qt4/mock.cpp create mode 100644 src/boost/tools/build/test/qt4/mock.h create mode 100644 src/boost/tools/build/test/qt4/phonon.cpp create mode 100644 src/boost/tools/build/test/qt4/qt3support.cpp create mode 100644 src/boost/tools/build/test/qt4/qtassistant.cpp create mode 100644 src/boost/tools/build/test/qt4/qtcore.cpp create mode 100644 src/boost/tools/build/test/qt4/qtcorefail.cpp create mode 100644 src/boost/tools/build/test/qt4/qtdeclarative.cpp create mode 100644 src/boost/tools/build/test/qt4/qtgui.cpp create mode 100644 src/boost/tools/build/test/qt4/qthelp.cpp create mode 100644 src/boost/tools/build/test/qt4/qtmultimedia.cpp create mode 100644 src/boost/tools/build/test/qt4/qtnetwork.cpp create mode 100644 src/boost/tools/build/test/qt4/qtscript.cpp create mode 100644 src/boost/tools/build/test/qt4/qtscripttools.cpp create mode 100644 src/boost/tools/build/test/qt4/qtsql.cpp create mode 100644 src/boost/tools/build/test/qt4/qtsvg.cpp create mode 100644 src/boost/tools/build/test/qt4/qttest.cpp create mode 100644 src/boost/tools/build/test/qt4/qtwebkit.cpp create mode 100644 src/boost/tools/build/test/qt4/qtxml.cpp create mode 100644 src/boost/tools/build/test/qt4/qtxmlpatterns.cpp create mode 100644 src/boost/tools/build/test/qt4/rcc.cpp create mode 100644 src/boost/tools/build/test/qt4/rcc.qrc create mode 100755 src/boost/tools/build/test/qt5.py create mode 100644 src/boost/tools/build/test/qt5/initialization.cpp create mode 100644 src/boost/tools/build/test/qt5/jamroot.jam create mode 100644 src/boost/tools/build/test/qt5/mock.cpp create mode 100644 src/boost/tools/build/test/qt5/mock.h create mode 100644 src/boost/tools/build/test/qt5/qt3dcore.cpp create mode 100644 src/boost/tools/build/test/qt5/qt3dinput.cpp create mode 100644 src/boost/tools/build/test/qt5/qt3dlogic.cpp create mode 100644 src/boost/tools/build/test/qt5/qt3drender.cpp create mode 100644 src/boost/tools/build/test/qt5/qtassistant.cpp create mode 100644 src/boost/tools/build/test/qt5/qtbluetooth.cpp create mode 100644 src/boost/tools/build/test/qt5/qtcharts.cpp create mode 100644 src/boost/tools/build/test/qt5/qtcore.cpp create mode 100644 src/boost/tools/build/test/qt5/qtcorefail.cpp create mode 100644 src/boost/tools/build/test/qt5/qtdatavisualization.cpp create mode 100644 src/boost/tools/build/test/qt5/qtdeclarative.cpp create mode 100644 src/boost/tools/build/test/qt5/qtgamepad.cpp create mode 100644 src/boost/tools/build/test/qt5/qthelp.cpp create mode 100644 src/boost/tools/build/test/qt5/qtlocation.cpp create mode 100644 src/boost/tools/build/test/qt5/qtmultimedia.cpp create mode 100644 src/boost/tools/build/test/qt5/qtnetwork.cpp create mode 100644 src/boost/tools/build/test/qt5/qtnfc.cpp create mode 100644 src/boost/tools/build/test/qt5/qtpositioning.cpp create mode 100644 src/boost/tools/build/test/qt5/qtpurchasing.cpp create mode 100644 src/boost/tools/build/test/qt5/qtquick.cpp create mode 100644 src/boost/tools/build/test/qt5/qtquick.qml create mode 100644 src/boost/tools/build/test/qt5/qtscript.cpp create mode 100644 src/boost/tools/build/test/qt5/qtscripttools.cpp create mode 100644 src/boost/tools/build/test/qt5/qtscxml.cpp create mode 100644 src/boost/tools/build/test/qt5/qtserialbus.cpp create mode 100644 src/boost/tools/build/test/qt5/qtserialport.cpp create mode 100644 src/boost/tools/build/test/qt5/qtsql.cpp create mode 100644 src/boost/tools/build/test/qt5/qtsvg.cpp create mode 100644 src/boost/tools/build/test/qt5/qttest.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebchannel.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebengine.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebenginewidgets.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebkit.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebkitwidgets.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebsocket.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebsockets.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwebview.cpp create mode 100644 src/boost/tools/build/test/qt5/qtwidgets.cpp create mode 100644 src/boost/tools/build/test/qt5/qtxml.cpp create mode 100644 src/boost/tools/build/test/qt5/qtxmlpatterns.cpp create mode 100644 src/boost/tools/build/test/qt5/rcc.cpp create mode 100644 src/boost/tools/build/test/qt5/rcc.qrc create mode 100644 src/boost/tools/build/test/readme.txt create mode 100644 src/boost/tools/build/test/rebuilds.py create mode 100644 src/boost/tools/build/test/relative_sources.py create mode 100644 src/boost/tools/build/test/remove_requirement.py create mode 100755 src/boost/tools/build/test/rescan_header.py create mode 100644 src/boost/tools/build/test/resolution.py create mode 100644 src/boost/tools/build/test/results-python.txt create mode 100644 src/boost/tools/build/test/rootless.py create mode 100644 src/boost/tools/build/test/rootless/test1/sub_root/a.cpp create mode 100644 src/boost/tools/build/test/rootless/test1/sub_root/jamfile.jam create mode 100644 src/boost/tools/build/test/rootless/test2/sub_root/a.cpp create mode 100644 src/boost/tools/build/test/rootless/test2/sub_root/jamfile.jam create mode 100644 src/boost/tools/build/test/rootless/test3/jamfile.jam create mode 100644 src/boost/tools/build/test/rootless/test3/sub/inner/a.cpp create mode 100644 src/boost/tools/build/test/rootless/test3/sub/inner/jamfile.jam create mode 100755 src/boost/tools/build/test/scanner_causing_rebuilds.py create mode 100644 src/boost/tools/build/test/searched_lib.py create mode 100644 src/boost/tools/build/test/skipping.py create mode 100755 src/boost/tools/build/test/sort_rule.py create mode 100644 src/boost/tools/build/test/source_locations.py create mode 100755 src/boost/tools/build/test/source_order.py create mode 100755 src/boost/tools/build/test/space_in_path.py create mode 100644 src/boost/tools/build/test/stage.py create mode 100644 src/boost/tools/build/test/standalone.py create mode 100644 src/boost/tools/build/test/startup/boost-root/boost-build.jam create mode 100644 src/boost/tools/build/test/startup/boost-root/build/boost-build.jam create mode 100644 src/boost/tools/build/test/startup/boost-root/build/bootstrap.jam create mode 100644 src/boost/tools/build/test/startup/bootstrap-env/boost-build.jam create mode 100644 src/boost/tools/build/test/startup/bootstrap-explicit/boost-build.jam create mode 100644 src/boost/tools/build/test/startup/bootstrap-implicit/readme.txt create mode 100644 src/boost/tools/build/test/startup/no-bootstrap1/boost-build.jam create mode 100644 src/boost/tools/build/test/startup/no-bootstrap1/subdir/readme.txt create mode 100644 src/boost/tools/build/test/startup/no-bootstrap2/boost-build.jam create mode 100644 src/boost/tools/build/test/startup/no-bootstrap3/boost-build.jam create mode 100644 src/boost/tools/build/test/startup_v2.py create mode 100755 src/boost/tools/build/test/static_and_shared_library.py create mode 100644 src/boost/tools/build/test/suffix.py create mode 100644 src/boost/tools/build/test/symlink.py create mode 100644 src/boost/tools/build/test/tag.py create mode 100644 src/boost/tools/build/test/template.py create mode 100644 src/boost/tools/build/test/test-config-example.jam create mode 100644 src/boost/tools/build/test/test.jam create mode 100644 src/boost/tools/build/test/test1.py create mode 100644 src/boost/tools/build/test/test2.py create mode 100644 src/boost/tools/build/test/test2/foo.cpp create mode 100644 src/boost/tools/build/test/test2/jamroot.jam create mode 100644 src/boost/tools/build/test/test_all.py create mode 100755 src/boost/tools/build/test/test_rc.py create mode 100644 src/boost/tools/build/test/test_system.html create mode 100755 src/boost/tools/build/test/testing.py create mode 100644 src/boost/tools/build/test/timedata.py create mode 100644 src/boost/tools/build/test/toolset-mock/Jamroot.jam create mode 100644 src/boost/tools/build/test/toolset-mock/lib.cpp create mode 100644 src/boost/tools/build/test/toolset-mock/main.cpp create mode 100644 src/boost/tools/build/test/toolset-mock/project-config.jam create mode 100644 src/boost/tools/build/test/toolset-mock/src/Jamroot.jam create mode 100644 src/boost/tools/build/test/toolset-mock/src/MockProgram.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/ar.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/clang-3.9.0-darwin.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/clang-linux-3.9.0.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/clang-vxworks-4.0.1.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/darwin-4.2.1.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/gcc-4.2.1-darwin.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/gcc-4.8.3-linux.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/intel-darwin-10.2.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/ld.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/libtool.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/linkx.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/mock-program.cpp create mode 100644 src/boost/tools/build/test/toolset-mock/src/msvc-14.3.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/project-config.jam create mode 100644 src/boost/tools/build/test/toolset-mock/src/strip.py create mode 100644 src/boost/tools/build/test/toolset-mock/src/verify.py create mode 100644 src/boost/tools/build/test/toolset_clang_darwin.py create mode 100644 src/boost/tools/build/test/toolset_clang_linux.py create mode 100644 src/boost/tools/build/test/toolset_clang_vxworks.py create mode 100644 src/boost/tools/build/test/toolset_darwin.py create mode 100644 src/boost/tools/build/test/toolset_defaults.py create mode 100644 src/boost/tools/build/test/toolset_gcc.py create mode 100644 src/boost/tools/build/test/toolset_intel_darwin.py create mode 100644 src/boost/tools/build/test/toolset_msvc.py create mode 100644 src/boost/tools/build/test/toolset_requirements.py create mode 100644 src/boost/tools/build/test/transitive_skip.py create mode 100644 src/boost/tools/build/test/tree.py create mode 100644 src/boost/tools/build/test/unit_test.py create mode 100644 src/boost/tools/build/test/unit_tests.py create mode 100644 src/boost/tools/build/test/unused.py create mode 100644 src/boost/tools/build/test/use_requirements.py create mode 100644 src/boost/tools/build/test/using.py create mode 100644 src/boost/tools/build/test/wrapper.py create mode 100644 src/boost/tools/build/test/wrong_project.py create mode 100644 src/boost/tools/check_build/README.md create mode 100644 src/boost/tools/check_build/test/Jamfile create mode 100644 src/boost/tools/check_build/test/main.cpp create mode 100644 src/boost/tools/cmake/README.md create mode 100644 src/boost/tools/cmake/include/BoostFetch.cmake create mode 100644 src/boost/tools/cmake/include/BoostInstall.cmake create mode 100644 src/boost/tools/cmake/include/BoostMessage.cmake create mode 100644 src/boost/tools/cmake/include/BoostRoot.cmake create mode 100644 src/boost/tools/cmake/include/BoostTest.cmake create mode 100644 src/boost/tools/cmake/include/BoostTestJamfile.cmake create mode 100644 src/boost/tools/cmake/test/add_subdir/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/add_subdir/main.cpp create mode 100644 src/boost/tools/cmake/test/add_subdir_exc/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/add_subdir_exc/main.cpp create mode 100644 src/boost/tools/cmake/test/assert/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/assert/main.cpp create mode 100644 src/boost/tools/cmake/test/atomic/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/atomic/main.cpp create mode 100644 src/boost/tools/cmake/test/boost_fetch/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/boost_fetch/main.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/boost_test/Jamfile create mode 100644 src/boost/tools/cmake/test/boost_test/arguments.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/compile.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/compile_fail.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/emits_warning.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/link.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/link_fail.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/requires_no_exceptions.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/requires_no_rtti.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/requires_variadic_templates.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/return_exit_code.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/run.cpp create mode 100644 src/boost/tools/cmake/test/boost_test/run_fail.cpp create mode 100644 src/boost/tools/cmake/test/iostreams/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/iostreams/test.txt create mode 100644 src/boost/tools/cmake/test/iostreams/test_fd.cpp create mode 100644 src/boost/tools/cmake/test/locale/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/locale/main.cpp create mode 100644 src/boost/tools/cmake/test/mp11/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/mp11/main.cpp create mode 100644 src/boost/tools/cmake/test/timer/CMakeLists.txt create mode 100644 src/boost/tools/cmake/test/timer/main.cpp create mode 100644 src/boost/tools/docca/CHANGELOG.md create mode 100644 src/boost/tools/docca/LICENSE_1_0.txt create mode 100644 src/boost/tools/docca/README.md create mode 100644 src/boost/tools/docca/docca.jam create mode 100644 src/boost/tools/docca/example/Jamfile create mode 100644 src/boost/tools/docca/example/boostbook.dtd create mode 100644 src/boost/tools/docca/example/include/docca/issue_101.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_33.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_34.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_38.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_44.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_47.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_48.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_52.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_53.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_55.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_63.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_69.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_70.hpp create mode 100644 src/boost/tools/docca/example/include/docca/issue_78.hpp create mode 100644 src/boost/tools/docca/example/index.xml create mode 100644 src/boost/tools/docca/example/main.qbk create mode 100644 src/boost/tools/docca/example/makeqbk.sh create mode 100644 src/boost/tools/docca/example/reference.xsl create mode 100644 src/boost/tools/docca/example/xsl/custom-overrides.xsl create mode 100644 src/boost/tools/docca/include/docca/assemble-quickbook.xsl create mode 100644 src/boost/tools/docca/include/docca/base-config.xsl create mode 100644 src/boost/tools/docca/include/docca/base-extract-xml-pages.xsl create mode 100644 src/boost/tools/docca/include/docca/base-stage1.xsl create mode 100644 src/boost/tools/docca/include/docca/base-stage2.xsl create mode 100644 src/boost/tools/docca/include/docca/common.xsl create mode 100644 src/boost/tools/docca/include/docca/debug-friendly-quickbook.xsl create mode 100644 src/boost/tools/docca/include/docca/extract-xml-pages.xsl create mode 100644 src/boost/tools/docca/include/docca/stage1.xsl create mode 100644 src/boost/tools/docca/include/docca/stage2.xsl create mode 100644 src/boost/tools/docca/util/comparison/README.md create mode 100755 src/boost/tools/docca/util/comparison/build-and-compare.sh create mode 100755 src/boost/tools/docca/util/comparison/compare-all.sh create mode 100644 src/boost/tools/docca/util/comparison/grep-expressions create mode 100644 src/boost/tools/docca/util/comparison/sed-commands create mode 100755 src/boost/tools/docca/util/comparison/update-all-baselines.sh create mode 100755 src/boost/tools/docca/util/comparison/update-baseline-html.sh create mode 100755 src/boost/tools/docca/util/comparison/watch-all-builds.sh create mode 100644 src/boost/tools/index.html create mode 100644 src/boost/tools/inspect/apple_macro_check.cpp create mode 100644 src/boost/tools/inspect/apple_macro_check.hpp create mode 100644 src/boost/tools/inspect/ascii_check.cpp create mode 100644 src/boost/tools/inspect/ascii_check.hpp create mode 100644 src/boost/tools/inspect/assert_macro_check.cpp create mode 100644 src/boost/tools/inspect/assert_macro_check.hpp create mode 100644 src/boost/tools/inspect/build/Jamfile.v2 create mode 100644 src/boost/tools/inspect/build/msvc/boost_inspect.sln create mode 100644 src/boost/tools/inspect/build/msvc/boost_inspect.vcxproj create mode 100644 src/boost/tools/inspect/build/msvc/readme.txt create mode 100644 src/boost/tools/inspect/copyright_check.cpp create mode 100644 src/boost/tools/inspect/copyright_check.hpp create mode 100644 src/boost/tools/inspect/crlf_check.cpp create mode 100644 src/boost/tools/inspect/crlf_check.hpp create mode 100644 src/boost/tools/inspect/deprecated_macro_check.cpp create mode 100644 src/boost/tools/inspect/deprecated_macro_check.hpp create mode 100644 src/boost/tools/inspect/end_check.cpp create mode 100644 src/boost/tools/inspect/end_check.hpp create mode 100644 src/boost/tools/inspect/index.html create mode 100644 src/boost/tools/inspect/inspect.cpp create mode 100644 src/boost/tools/inspect/inspector.hpp create mode 100644 src/boost/tools/inspect/license_check.cpp create mode 100644 src/boost/tools/inspect/license_check.hpp create mode 100644 src/boost/tools/inspect/link_check.cpp create mode 100644 src/boost/tools/inspect/link_check.hpp create mode 100644 src/boost/tools/inspect/link_check_test.html create mode 100644 src/boost/tools/inspect/minmax_check.cpp create mode 100644 src/boost/tools/inspect/minmax_check.hpp create mode 100644 src/boost/tools/inspect/path_name_check.cpp create mode 100644 src/boost/tools/inspect/path_name_check.hpp create mode 100644 src/boost/tools/inspect/tab_check.cpp create mode 100644 src/boost/tools/inspect/tab_check.hpp create mode 100644 src/boost/tools/inspect/time_string.hpp create mode 100644 src/boost/tools/inspect/unnamed_namespace_check.cpp create mode 100644 src/boost/tools/inspect/unnamed_namespace_check.hpp create mode 100644 src/boost/tools/inspect/wrong_line_ends_test.cpp create mode 100644 src/boost/tools/litre/cplusplus.py create mode 100644 src/boost/tools/litre/litre.py create mode 100644 src/boost/tools/litre/tool.py create mode 100644 src/boost/tools/make-cputime-page.pl create mode 100644 src/boost/tools/quickbook/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/_clang-format create mode 100644 src/boost/tools/quickbook/build/Jamfile.v2 create mode 100755 src/boost/tools/quickbook/build/publish-docs create mode 100755 src/boost/tools/quickbook/build/warning-check create mode 100644 src/boost/tools/quickbook/examples/simple-boostbook/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/examples/simple-boostbook/simple.xml create mode 100644 src/boost/tools/quickbook/examples/simple-quickbook/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/examples/simple-quickbook/simple.qbk create mode 100644 src/boost/tools/quickbook/examples/standalone-quickbook/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/examples/standalone-quickbook/Jamroot.jam create mode 100644 src/boost/tools/quickbook/examples/standalone-quickbook/simple.qbk create mode 100644 src/boost/tools/quickbook/extra/katepart/install.sh create mode 100644 src/boost/tools/quickbook/extra/katepart/katepart.qbk create mode 100644 src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml create mode 100644 src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml create mode 100644 src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml create mode 100644 src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml create mode 100644 src/boost/tools/quickbook/index.html create mode 100644 src/boost/tools/quickbook/meta/explicit-failures-markup.xml create mode 100644 src/boost/tools/quickbook/src/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/src/actions.cpp create mode 100644 src/boost/tools/quickbook/src/actions.hpp create mode 100644 src/boost/tools/quickbook/src/bb2html.cpp create mode 100644 src/boost/tools/quickbook/src/bb2html.hpp create mode 100644 src/boost/tools/quickbook/src/block_element_grammar.cpp create mode 100644 src/boost/tools/quickbook/src/block_tags.hpp create mode 100644 src/boost/tools/quickbook/src/boostbook_chunker.cpp create mode 100644 src/boost/tools/quickbook/src/boostbook_chunker.hpp create mode 100644 src/boost/tools/quickbook/src/cleanup.hpp create mode 100644 src/boost/tools/quickbook/src/code_snippet.cpp create mode 100644 src/boost/tools/quickbook/src/collector.cpp create mode 100644 src/boost/tools/quickbook/src/collector.hpp create mode 100644 src/boost/tools/quickbook/src/dependency_tracker.cpp create mode 100644 src/boost/tools/quickbook/src/dependency_tracker.hpp create mode 100644 src/boost/tools/quickbook/src/doc_info_actions.cpp create mode 100644 src/boost/tools/quickbook/src/doc_info_grammar.cpp create mode 100644 src/boost/tools/quickbook/src/doc_info_tags.hpp create mode 100644 src/boost/tools/quickbook/src/document_state.cpp create mode 100644 src/boost/tools/quickbook/src/document_state.hpp create mode 100644 src/boost/tools/quickbook/src/document_state_impl.hpp create mode 100644 src/boost/tools/quickbook/src/files.cpp create mode 100644 src/boost/tools/quickbook/src/files.hpp create mode 100644 src/boost/tools/quickbook/src/for.hpp create mode 100644 src/boost/tools/quickbook/src/fwd.hpp create mode 100644 src/boost/tools/quickbook/src/glob.cpp create mode 100644 src/boost/tools/quickbook/src/glob.hpp create mode 100644 src/boost/tools/quickbook/src/grammar.cpp create mode 100644 src/boost/tools/quickbook/src/grammar.hpp create mode 100644 src/boost/tools/quickbook/src/grammar_impl.hpp create mode 100644 src/boost/tools/quickbook/src/html_printer.cpp create mode 100644 src/boost/tools/quickbook/src/html_printer.hpp create mode 100644 src/boost/tools/quickbook/src/id_generation.cpp create mode 100644 src/boost/tools/quickbook/src/id_xml.cpp create mode 100644 src/boost/tools/quickbook/src/include_paths.cpp create mode 100644 src/boost/tools/quickbook/src/include_paths.hpp create mode 100644 src/boost/tools/quickbook/src/iterator.hpp create mode 100644 src/boost/tools/quickbook/src/main_grammar.cpp create mode 100644 src/boost/tools/quickbook/src/markups.cpp create mode 100644 src/boost/tools/quickbook/src/markups.hpp create mode 100644 src/boost/tools/quickbook/src/native_text.cpp create mode 100644 src/boost/tools/quickbook/src/native_text.hpp create mode 100644 src/boost/tools/quickbook/src/parsers.hpp create mode 100644 src/boost/tools/quickbook/src/path.cpp create mode 100644 src/boost/tools/quickbook/src/path.hpp create mode 100644 src/boost/tools/quickbook/src/phrase_element_grammar.cpp create mode 100644 src/boost/tools/quickbook/src/phrase_tags.hpp create mode 100644 src/boost/tools/quickbook/src/post_process.cpp create mode 100644 src/boost/tools/quickbook/src/post_process.hpp create mode 100644 src/boost/tools/quickbook/src/quickbook.cpp create mode 100644 src/boost/tools/quickbook/src/quickbook.hpp create mode 100644 src/boost/tools/quickbook/src/scoped.hpp create mode 100644 src/boost/tools/quickbook/src/simple_parse.hpp create mode 100644 src/boost/tools/quickbook/src/state.cpp create mode 100644 src/boost/tools/quickbook/src/state.hpp create mode 100644 src/boost/tools/quickbook/src/state_save.hpp create mode 100644 src/boost/tools/quickbook/src/stream.cpp create mode 100644 src/boost/tools/quickbook/src/stream.hpp create mode 100644 src/boost/tools/quickbook/src/string_view.hpp create mode 100644 src/boost/tools/quickbook/src/symbols.hpp create mode 100644 src/boost/tools/quickbook/src/syntax_highlight.cpp create mode 100644 src/boost/tools/quickbook/src/syntax_highlight.hpp create mode 100644 src/boost/tools/quickbook/src/template_stack.cpp create mode 100644 src/boost/tools/quickbook/src/template_stack.hpp create mode 100644 src/boost/tools/quickbook/src/template_tags.hpp create mode 100644 src/boost/tools/quickbook/src/tree.cpp create mode 100644 src/boost/tools/quickbook/src/tree.hpp create mode 100644 src/boost/tools/quickbook/src/utils.cpp create mode 100644 src/boost/tools/quickbook/src/utils.hpp create mode 100644 src/boost/tools/quickbook/src/value_tags.hpp create mode 100644 src/boost/tools/quickbook/src/values.cpp create mode 100644 src/boost/tools/quickbook/src/values.hpp create mode 100644 src/boost/tools/quickbook/src/values_parse.hpp create mode 100644 src/boost/tools/quickbook/src/xml_parse.cpp create mode 100644 src/boost/tools/quickbook/src/xml_parse.hpp create mode 100644 src/boost/tools/quickbook/test/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/anchor-1_1.gold create mode 100644 src/boost/tools/quickbook/test/anchor-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/anchor-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/anchor-1_6.gold create mode 100644 src/boost/tools/quickbook/test/anchor-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/anchor-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/anchor-1_7.gold create mode 100644 src/boost/tools/quickbook/test/anchor-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/anchor-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/blocks-1_5.gold create mode 100644 src/boost/tools/quickbook/test/blocks-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/blocks-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/callouts-1_5.gold create mode 100644 src/boost/tools/quickbook/test/callouts-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/callouts-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/callouts-1_7.gold create mode 100644 src/boost/tools/quickbook/test/callouts-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/callouts-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/callouts.cpp create mode 100644 src/boost/tools/quickbook/test/code-1_1.gold create mode 100644 src/boost/tools/quickbook/test/code-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/code-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/code-1_5.gold create mode 100644 src/boost/tools/quickbook/test/code-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/code-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/code_cpp-1_5.gold create mode 100644 src/boost/tools/quickbook/test/code_cpp-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/code_cpp-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/code_python-1_5.gold create mode 100644 src/boost/tools/quickbook/test/code_python-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/code_python-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/code_snippet-1_1.gold create mode 100644 src/boost/tools/quickbook/test/code_snippet-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/code_snippet-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/code_teletype-1_5.gold create mode 100644 src/boost/tools/quickbook/test/code_teletype-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/code_teletype-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/command-line/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/command-line/error-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/command-line/error1.quickbook create mode 100644 src/boost/tools/quickbook/test/command-line/error2.quickbook create mode 100644 src/boost/tools/quickbook/test/command_line_macro-1_1.gold create mode 100644 src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/cond_phrase-1_5.gold create mode 100644 src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/cond_phrase-1_7.gold create mode 100644 src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/doc-info/author1.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/author1.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/author1.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/author2.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/author2.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/author2.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/copyright1.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/copyright1.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/copyright1.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/empty-attributes.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/encode-1.5.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/escape-1.6.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/id1-1.5.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold create mode 100644 src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/elements-1_5.gold create mode 100644 src/boost/tools/quickbook/test/elements-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/elements-1_6.gold create mode 100644 src/boost/tools/quickbook/test/elements-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/elements-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/empty-inc.quickbook create mode 100644 src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/escape-1_1.gold create mode 100644 src/boost/tools/quickbook/test/escape-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/escape-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/escape-1_6.gold create mode 100644 src/boost/tools/quickbook/test/escape-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/escape-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/footnotes-1_7.gold create mode 100644 src/boost/tools/quickbook/test/footnotes-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/footnotes-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/heading-1_1.gold create mode 100644 src/boost/tools/quickbook/test/heading-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/heading-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/heading-1_3.gold create mode 100644 src/boost/tools/quickbook/test/heading-1_3.gold-html create mode 100644 src/boost/tools/quickbook/test/heading-1_3.quickbook create mode 100644 src/boost/tools/quickbook/test/heading-1_5.gold create mode 100644 src/boost/tools/quickbook/test/heading-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/heading-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/heading-1_6.gold create mode 100644 src/boost/tools/quickbook/test/heading-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/heading-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/heading-1_7.gold create mode 100644 src/boost/tools/quickbook/test/heading-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/heading-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/hr-1_5.gold create mode 100644 src/boost/tools/quickbook/test/hr-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/hr-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/hr-1_6.gold create mode 100644 src/boost/tools/quickbook/test/hr-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/hr-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg create mode 100644 src/boost/tools/quickbook/test/identifier-1_5.gold create mode 100644 src/boost/tools/quickbook/test/identifier-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/identifier-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/identifier-1_6.gold create mode 100644 src/boost/tools/quickbook/test/identifier-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/identifier-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/image-1_5.gold create mode 100644 src/boost/tools/quickbook/test/image-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/image-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/image-1_6.gold create mode 100644 src/boost/tools/quickbook/test/image-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/image-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/import-1_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/include-1_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/include-1_5.gold create mode 100644 src/boost/tools/quickbook/test/include-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/include-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include-1_7.gold create mode 100644 src/boost/tools/quickbook/test/include-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/include-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/include-inc-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include-inc.quickbook create mode 100644 src/boost/tools/quickbook/test/include/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/include/code-import.gold create mode 100644 src/boost/tools/quickbook/test/include/code-import.gold-html create mode 100644 src/boost/tools/quickbook/test/include/code-import.quickbook create mode 100644 src/boost/tools/quickbook/test/include/code-include.gold create mode 100644 src/boost/tools/quickbook/test/include/code-include.gold-html create mode 100644 src/boost/tools/quickbook/test/include/code-include.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_1.gold create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_5.gold create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-inc.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/doc-title1-1.5.gold create mode 100644 src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook create mode 100644 src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold create mode 100644 src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/filename-1_7.gold create mode 100644 src/boost/tools/quickbook/test/include/filename-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/include/filename-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/include/filename-path.gold create mode 100644 src/boost/tools/quickbook/test/include/filename-path.gold-html create mode 100644 src/boost/tools/quickbook/test/include/filename-path.quickbook create mode 100644 src/boost/tools/quickbook/test/include/filename.gold create mode 100644 src/boost/tools/quickbook/test/include/filename.gold-html create mode 100644 src/boost/tools/quickbook/test/include/filename.quickbook create mode 100644 src/boost/tools/quickbook/test/include/filename_include2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/filename_path-1_7.gold create mode 100644 src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/include/glob-1_7.gold create mode 100644 src/boost/tools/quickbook/test/include/glob-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/include/glob-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/include/glob1/a.qbk create mode 100644 src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk create mode 100644 src/boost/tools/quickbook/test/include/glob2/a.qbk create mode 100644 src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk create mode 100644 src/boost/tools/quickbook/test/include/import-basic-1.6.gold create mode 100644 src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/in_section-1_5.gold create mode 100644 src/boost/tools/quickbook/test/include/in_section-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/in_section-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/in_section-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include/in_section-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/in_section-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/in_section-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/in_section-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include-id-1.5.gold create mode 100644 src/boost/tools/quickbook/test/include/include-id-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/include-id-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include-id-1.6.gold create mode 100644 src/boost/tools/quickbook/test/include/include-id-1.6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/include-id-1.6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include-id-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include-id-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include-id-inc3.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook create mode 100644 src/boost/tools/quickbook/test/include/macros-1.5.gold create mode 100644 src/boost/tools/quickbook/test/include/macros-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/macros-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/macros-1.6.gold create mode 100644 src/boost/tools/quickbook/test/include/macros-1.6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/macros-1.6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/macros-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/section-fail1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/section-fail2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/section-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/section-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/section-unclosed.gold create mode 100644 src/boost/tools/quickbook/test/include/section-unclosed.gold-html create mode 100644 src/boost/tools/quickbook/test/include/section-unclosed.quickbook create mode 100644 src/boost/tools/quickbook/test/include/section.gold create mode 100644 src/boost/tools/quickbook/test/include/section.gold-html create mode 100644 src/boost/tools/quickbook/test/include/section.quickbook create mode 100644 src/boost/tools/quickbook/test/include/source_mode-1_5.gold create mode 100644 src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/source_mode-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook create mode 100644 src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook create mode 100644 src/boost/tools/quickbook/test/include/template_include-1_7.gold create mode 100644 src/boost/tools/quickbook/test/include/template_include-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/include/template_include-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/include/templates-1.5.gold create mode 100644 src/boost/tools/quickbook/test/include/templates-1.5.gold-html create mode 100644 src/boost/tools/quickbook/test/include/templates-1.5.quickbook create mode 100644 src/boost/tools/quickbook/test/include/templates-1.6.gold create mode 100644 src/boost/tools/quickbook/test/include/templates-1.6.gold-html create mode 100644 src/boost/tools/quickbook/test/include/templates-1.6.quickbook create mode 100644 src/boost/tools/quickbook/test/include/templates-inc1.quickbook create mode 100644 src/boost/tools/quickbook/test/include2-1_6.gold create mode 100644 src/boost/tools/quickbook/test/include2-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/include2-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/link-1_1.gold create mode 100644 src/boost/tools/quickbook/test/link-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/link-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/link-1_6.gold create mode 100644 src/boost/tools/quickbook/test/link-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/link-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/link-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/link-1_7-fail2.quickbook create mode 100644 src/boost/tools/quickbook/test/link-1_7.gold create mode 100644 src/boost/tools/quickbook/test/link-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/link-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/list_test-1_5.gold create mode 100644 src/boost/tools/quickbook/test/list_test-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/list_test-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/list_test-1_6.gold create mode 100644 src/boost/tools/quickbook/test/list_test-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/list_test-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook create mode 100644 src/boost/tools/quickbook/test/list_test-1_7.gold create mode 100644 src/boost/tools/quickbook/test/list_test-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/list_test-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/macro-1_5.gold create mode 100644 src/boost/tools/quickbook/test/macro-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/macro-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/macro-1_6.gold create mode 100644 src/boost/tools/quickbook/test/macro-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/macro-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/newline-1_1.gold create mode 100644 src/boost/tools/quickbook/test/newline-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/newline-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/para_test-1_5.gold create mode 100644 src/boost/tools/quickbook/test/para_test-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/para_test-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/post_process-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/preformatted-1_1.gold create mode 100644 src/boost/tools/quickbook/test/preformatted-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/preformatted-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/preformatted-1_6.gold create mode 100644 src/boost/tools/quickbook/test/preformatted-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/preformatted-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/python/include_glob.qbk create mode 100644 src/boost/tools/quickbook/test/python/include_glob_deps.txt create mode 100644 src/boost/tools/quickbook/test/python/include_glob_locs.txt create mode 100644 src/boost/tools/quickbook/test/python/include_path.qbk create mode 100644 src/boost/tools/quickbook/test/python/include_path_deps.txt create mode 100644 src/boost/tools/quickbook/test/python/include_path_locs.txt create mode 100644 src/boost/tools/quickbook/test/python/missing_relative.qbk create mode 100644 src/boost/tools/quickbook/test/python/missing_relative_deps.txt create mode 100644 src/boost/tools/quickbook/test/python/missing_relative_locs.txt create mode 100644 src/boost/tools/quickbook/test/python/run_tests.py create mode 100644 src/boost/tools/quickbook/test/python/simple.qbk create mode 100644 src/boost/tools/quickbook/test/python/simple.xml create mode 100644 src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml create mode 100644 src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml create mode 100644 src/boost/tools/quickbook/test/python/simple_no_self_linked.xml create mode 100644 src/boost/tools/quickbook/test/python/sub1/a.qbk create mode 100644 src/boost/tools/quickbook/test/python/sub2/b.qbk create mode 100644 src/boost/tools/quickbook/test/python/svg_missing.qbk create mode 100644 src/boost/tools/quickbook/test/python/svg_missing_deps.txt create mode 100644 src/boost/tools/quickbook/test/python/svg_missing_locs.txt create mode 100644 src/boost/tools/quickbook/test/quickbook-testing.jam create mode 100644 src/boost/tools/quickbook/test/quickbook_manual-1_4.gold create mode 100644 src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html create mode 100644 src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook create mode 100644 src/boost/tools/quickbook/test/regen-gold.sh create mode 100644 src/boost/tools/quickbook/test/role-1_6.gold create mode 100644 src/boost/tools/quickbook/test/role-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/role-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/role-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/role-1_7.gold create mode 100644 src/boost/tools/quickbook/test/role-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/role-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/section-1_4.gold create mode 100644 src/boost/tools/quickbook/test/section-1_4.gold-html create mode 100644 src/boost/tools/quickbook/test/section-1_4.quickbook create mode 100644 src/boost/tools/quickbook/test/section-1_5-unclosed.gold create mode 100644 src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html create mode 100644 src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook create mode 100644 src/boost/tools/quickbook/test/section-1_5.gold create mode 100644 src/boost/tools/quickbook/test/section-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/section-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/section-1_7.gold create mode 100644 src/boost/tools/quickbook/test/section-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/section-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/simple_markup-1_5.gold create mode 100644 src/boost/tools/quickbook/test/simple_markup-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/simple_markup-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.cpp create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.gold create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.gold-html create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.py create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp create mode 100644 src/boost/tools/quickbook/test/source_mode-1_7.gold create mode 100644 src/boost/tools/quickbook/test/source_mode-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/source_mode-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/src/text_diff.cpp create mode 100644 src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold create mode 100644 src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/stub.c create mode 100644 src/boost/tools/quickbook/test/stub.cpp create mode 100644 src/boost/tools/quickbook/test/stub.py create mode 100644 src/boost/tools/quickbook/test/svg-1_1.gold create mode 100644 src/boost/tools/quickbook/test/svg-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/svg-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/table-1_3.gold create mode 100644 src/boost/tools/quickbook/test/table-1_3.gold-html create mode 100644 src/boost/tools/quickbook/test/table-1_3.quickbook create mode 100644 src/boost/tools/quickbook/test/table-1_5.gold create mode 100644 src/boost/tools/quickbook/test/table-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/table-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/table-1_6.gold create mode 100644 src/boost/tools/quickbook/test/table-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/table-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/table-1_7.gold create mode 100644 src/boost/tools/quickbook/test/table-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/table-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_section-1_5.gold create mode 100644 src/boost/tools/quickbook/test/template_section-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/template_section-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_3.gold create mode 100644 src/boost/tools/quickbook/test/templates-1_3.gold-html create mode 100644 src/boost/tools/quickbook/test/templates-1_3.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_4.gold create mode 100644 src/boost/tools/quickbook/test/templates-1_4.gold-html create mode 100644 src/boost/tools/quickbook/test/templates-1_4.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_5.gold create mode 100644 src/boost/tools/quickbook/test/templates-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/templates-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_6.gold create mode 100644 src/boost/tools/quickbook/test/templates-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/templates-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook create mode 100644 src/boost/tools/quickbook/test/templates-1_7.gold create mode 100644 src/boost/tools/quickbook/test/templates-1_7.gold-html create mode 100644 src/boost/tools/quickbook/test/templates-1_7.quickbook create mode 100644 src/boost/tools/quickbook/test/unicode_escape-1_5.gold create mode 100644 src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/unit/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/unit/cleanup_test.cpp create mode 100644 src/boost/tools/quickbook/test/unit/glob_test.cpp create mode 100644 src/boost/tools/quickbook/test/unit/path_test.cpp create mode 100644 src/boost/tools/quickbook/test/unit/post_process_test.cpp create mode 100644 src/boost/tools/quickbook/test/unit/source_map_test.cpp create mode 100644 src/boost/tools/quickbook/test/unit/symbols_find_null.cpp create mode 100644 src/boost/tools/quickbook/test/unit/symbols_tests.cpp create mode 100644 src/boost/tools/quickbook/test/unit/utils_test.cpp create mode 100644 src/boost/tools/quickbook/test/unit/values_test.cpp create mode 100644 src/boost/tools/quickbook/test/unmatched_element-1_5.gold create mode 100644 src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/unmatched_element-1_6.gold create mode 100644 src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/utf8-1_5.gold create mode 100644 src/boost/tools/quickbook/test/utf8-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/utf8-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/utf8_bom-1_5.gold create mode 100644 src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/variablelist-1_5.gold create mode 100644 src/boost/tools/quickbook/test/variablelist-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/variablelist-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/version-0_1-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/version-1_8-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/version-2_0-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/versions/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold create mode 100644 src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook create mode 100644 src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/versions/versions-1_6.gold create mode 100644 src/boost/tools/quickbook/test/versions/versions-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/versions/versions-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/xinclude/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect create mode 100644 src/boost/tools/quickbook/test/xinclude/sub/stub.xml create mode 100644 src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html create mode 100644 src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html create mode 100644 src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html create mode 100644 src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook create mode 100644 src/boost/tools/quickbook/test/xml_escape-1_2.gold create mode 100644 src/boost/tools/quickbook/test/xml_escape-1_2.gold-html create mode 100644 src/boost/tools/quickbook/test/xml_escape-1_2.quickbook create mode 100644 src/boost/tools/quickbook/test/xml_escape-1_5.gold create mode 100644 src/boost/tools/quickbook/test/xml_escape-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/xml_escape-1_5.quickbook (limited to 'src/boost/tools') diff --git a/src/boost/tools/Jamfile.v2 b/src/boost/tools/Jamfile.v2 new file mode 100644 index 000000000..e1391c768 --- /dev/null +++ b/src/boost/tools/Jamfile.v2 @@ -0,0 +1,55 @@ +# Copyright 2005 Rene Rivera +# Copyright 2005 Hartmut Kaiser +# Copyright 2005 John Maddock +# Copyright 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +# Jamfile which builds all the tools. + +project + : + requirements + static + /boost//headers + : + usage-requirements /boost//headers + ; + +TOOLS = + bcp//bcp + inspect/build//inspect + quickbook//quickbook + /boost/libs/wave/tool//wave + ; + +install dist-bin + : + $(TOOLS) + : + EXE + ../dist/bin + : + release + ; + +install dist-lib + : + $(TOOLS) + : + LIB + ../dist/lib + : + release + ; + +local patterns = *.dtd *.xml *.xsl LICENSE ; +local dirs = boostbook/dtd boostbook/xsl ; +install dist-share-boostbook + : + [ glob $(dirs)/$(patterns) $(dirs)/*/$(patterns) $(dirs)/*/*/$(patterns) ] + : + ../dist/share + . + ; diff --git a/src/boost/tools/auto_index/build/Jamfile.v2 b/src/boost/tools/auto_index/build/Jamfile.v2 new file mode 100644 index 000000000..2e6227732 --- /dev/null +++ b/src/boost/tools/auto_index/build/Jamfile.v2 @@ -0,0 +1,35 @@ +#============================================================================== +# Copyright (c) 2015 Rene Rivera +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +#============================================================================== + +import quickbook ; +import modules ; +import boostcpp ; +import path ; +import option ; + +local DIST_DIR = [ option.get distdir ] ; +DIST_DIR ?= [ option.get build-dir ] ; +DIST_DIR ?= [ path.join $(BOOST_ROOT) dist ] ; +DIST_DIR = [ path.root [ path.make $(DIST_DIR) ] [ path.pwd ] ] ; +local DIST_BIN = [ path.join $(DIST_DIR) bin ] ; + +exe auto_index : + ../src/auto_index.cpp + ../src/file_scanning.cpp + ../src/index_generator.cpp + ../src/tiny_xml.cpp + /boost//regex + /boost//filesystem + /boost//system + /boost//program_options +: BOOST_ALL_NO_LIB=1 static release ; + +install aii : auto_index : . ; +explicit aii ; + +install i : auto_index : $(DIST_BIN) ; diff --git a/src/boost/tools/auto_index/include/auto_index_helpers.qbk b/src/boost/tools/auto_index/include/auto_index_helpers.qbk new file mode 100644 index 000000000..086c91630 --- /dev/null +++ b/src/boost/tools/auto_index/include/auto_index_helpers.qbk @@ -0,0 +1,19 @@ + + +[template index[] +'''''' +] + +[template named_index[type title] +''''''[title]'''''' +] + +[template AutoIndex [Args] ''''''] + +[template indexterm1 [primary] ''''''[primary]''''''] +[template indexterm2 [primary secondary] ''''''[primary]''''''[secondary]''''''] +[template indexterm3 [primary secondary tertiary] ''''''[primary]''''''[secondary]''''''[tertiary]''''''] + +[template typed_indexterm1 [type primary] ''''''[primary]''''''] +[template typed_indexterm2 [type primary secondary] ''''''[primary]''''''[secondary]''''''] +[template typed_indexterm3 [type primary secondary tertiary] ''''''[primary]''''''[secondary]''''''[tertiary]''''''] diff --git a/src/boost/tools/auto_index/index.html b/src/boost/tools/auto_index/index.html new file mode 100644 index 000000000..df7430bd0 --- /dev/null +++ b/src/boost/tools/auto_index/index.html @@ -0,0 +1,15 @@ + + + + + +

+ Automatic redirection failed, please go to doc/html/index.html. +

+

Copyright John Maddock 2001

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt).

+ + + + diff --git a/src/boost/tools/auto_index/src/auto_index.cpp b/src/boost/tools/auto_index/src/auto_index.cpp new file mode 100644 index 000000000..e8d5db201 --- /dev/null +++ b/src/boost/tools/auto_index/src/auto_index.cpp @@ -0,0 +1,783 @@ +// Copyright 2008 John Maddock +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include "auto_index.hpp" + +std::string infile, outfile, prefix, last_primary, last_secondary, last_tertiary; +std::set index_terms; +std::set > found_terms; +bool no_duplicates = false; +bool verbose = false; +bool use_section_names = true; +index_entry_set index_entries; +boost::tiny_xml::element_list indexes; +std::list id_rewrite_list; +bool internal_indexes = false; +std::string internal_index_type = "section"; +boost::regex debug; +file_scanner_set_type file_scanner_set; + +int help() +{ + std::cout << "Please refer to the documentation for the correct command line syntax" << std::endl; + return 1; +} + +void eat_block(std::string& result, std::istream & is) +{ + // + // everything until we get to a closing '>': + // + char c; + while(is.get(c) && c != '>') + { + result += c; + if(c == '\\') + { + is.get(c); + result += c; + } + } + result += c; +} + +std::string get_header(std::istream & is) +{ + // + // We need to get any leading > std::ws; + if(is.get() != '<') + throw std::runtime_error("Invalid leading markup in XML file found"); + char c = is.peek(); + while((c == '?') || (c == '!')) + { + std::string temp; + std::getline(is, temp, '>'); + result += '<' + temp + '>'; + is >> std::ws; + if(is.get() != '<') + throw std::runtime_error("Invalid leading markup in XML file found"); + c = is.peek(); + result += '\n'; + } + return result; +} +// +// Find attribute named "name" in node "node": +// +const std::string* find_attr(boost::tiny_xml::element_ptr node, const char* name) +{ + for(boost::tiny_xml::attribute_list::const_iterator i = node->attributes.begin(); + i != node->attributes.end(); ++i) + { + if(i->name == name) + return &(i->value); + } + return 0; +} +// +// Get the ID of the current block scope, basically +// move up the XML tree until we find a valid ID: +// +const std::string* get_current_block_id(node_id const* id) +{ + while((id->id == 0) && (id->prev)) + id = id->prev; + if(!id->id) + BOOST_THROW_EXCEPTION(std::runtime_error("Current XML block has no enclosing ID: XML is not valid Boostbook?")); + return id->id; +} +// +// Get the title of the current block scope, basically +// move up the XML tree until we find a valid title: +// +const std::string& get_current_block_title(title_info const* id) +{ + while((id->title.size() == 0) && (id->prev)) + id = id->prev; + return id->title; +} +// +// Get all the content under this node, with any inline XML +// stripped out: +// +std::string get_consolidated_content(boost::tiny_xml::element_ptr node) +{ + std::string result(node->content); + for(boost::tiny_xml::element_list::const_iterator i = node->elements.begin(); + i != node->elements.end(); ++i) + { + result += " "; + result += get_consolidated_content(*i); + } + static const boost::regex e("(^[[:space:]]+)|([[:space:]]+)|([[:space:]]+$)"); + return regex_replace(result, e, "(?2 )", boost::regex_constants::format_all); +} +// +// Rewrite a title based on any rewrite rules we may have: +// +std::string rewrite_title(const std::string& title, const std::string& id) +{ + for(std::list::const_iterator i = id_rewrite_list.begin(); i != id_rewrite_list.end(); ++i) + { + if(i->base_on_id) + { + if(regex_match(id, i->id)) + return i->new_name; + } + else + { + if(regex_match(title, i->id)) + return regex_replace(title, i->id, i->new_name); + } + } + return title; +} + +struct string_cmp +{ + bool operator()(const char* a, const char* b)const + { + return std::strcmp(a, b) < 0; + } +}; +// +// Discover whether this node can contain a or not, if not +// we don't want to link to it, or the XSL HTML stylesheets may do strange +// things, and at least emit copious messages. See https://sourceforge.net/tracker/?func=detail&aid=3325153&group_id=21935&atid=373747 +// +bool can_contain_title(const char* name) +{ + static const boost::array<const char*, 103> names = + { { + "abstract", "appendix", "appendixinfo", "article", "articleinfo", "authorblurb", "bibliodiv", "biblioentry", "bibliography", + "bibliographyinfo", "bibliolist", "bibliomixed", "bibliomset", "biblioset", "blockinfo", "blockquote", "book", "bookinfo", + "calloutlist", "caution", "chapter", "chapterinfo", "colophon", "constraintdef", "dedication", "equation", "example", "figure", + "formalpara", "glossary", "glossaryinfo", "glossdiv", "glosslist", "important", "index", "indexdiv", "indexinfo", "itemizedlist", + "legalnotice", "lot", "msg", "msgexplan", "msgmain", "msgrel", "msgset", "msgsub", "note", "objectinfo", "orderedlist", "part", + "partinfo", "partintro", "personblurb", "preface", "prefaceinfo", "procedure", "productionset", "qandadiv", "qandaset", + "refentryinfo", "reference", "referenceinfo", "refsect1", "refsect1info", "refsect2", "refsect2info", "refsect3", "refsect3info", + "refsection", "refsectioninfo", "refsynopsisdiv", "refsynopsisdivinfo", "sect1", "sect1info", "sect2", "sect2info", "sect3", + "sect3info", "sect4", "sect4info", "sect5", "sect5info", "section", "sectioninfo", "segmentedlist", "set", "setindex", + "setindexinfo", "setinfo", "sidebar", "sidebarinfo", "simplesect", "step", "table", "task", "taskprerequisites", + "taskrelated", "tasksummary", "tip", "toc", "variablelist", "warning", "refentry" + } }; + static std::set<const char*, string_cmp> permitted; + + if(permitted.empty()) + permitted.insert(names.begin(), names.end()); + + return 0 != permitted.count(name); +} +// +// Determine whether this node can contain an indexterm or not: +// +bool can_contain_indexterm(const char* name) +{ + static const boost::array<const char*, 257> names = + { { + "abbrev", "accel", "ackno", "acronym", "action", "answer", "appendix", "appendixinfo", "application", + "article", "articleinfo", "artpagenums", "attribution", "authorinitials", "bibliocoverage", "bibliodiv", + "biblioentry", "bibliography", "bibliographyinfo", "biblioid", "bibliomisc", "bibliomixed", "bibliomset", + "bibliorelation", "biblioset", "bibliosource", "blockinfo", "blockquote", "bookinfo", "bridgehead", "callout", + "caution", "chapter", "chapterinfo", "citation", "citebiblioid", "citetitle", "city", "classname", "classsynopsisinfo", + "code", "collabname", "command", "computeroutput", "confdates", "confnum", "confsponsor", "conftitle", "constant", + "constraintdef", "contractnum", "contractsponsor", "contrib", "corpauthor", "corpcredit", "corpname", "country", + "database", "date", "dedication", "edition", "email", "emphasis", "entry", "envar", "errorcode", "errorname", "errortext", + "errortype", "example", "exceptionname", "fax", "figure", "filename", "firstname", "firstterm", "foreignphrase", + "formalpara", "funcparams", "funcsynopsisinfo", "function", "glossary", "glossaryinfo", "glossdef", "glossdiv", + "glossentry", "glosssee", "glossseealso", "glossterm", "guibutton", "guiicon", "guilabel", "guimenu", "guimenuitem", + "guisubmenu", "hardware", "highlights", "holder", "honorific", "important", "index", "indexinfo", "informalexample", + "informalfigure", "initializer", "interface", "interfacename", "invpartnumber", "isbn", "issn", "issuenum", "itemizedlist", + "itermset", "jobtitle", "keycap", "keycode", "keysym", "label", "legalnotice", "lineage", "lineannotation", + /*"link", */"listitem", "literal", "literallayout", "lotentry", "manvolnum", "markup", "medialabel", "member", + "methodname", "modespec", "modifier", "mousebutton", "msgaud", "msgexplan", "msglevel", "msgorig", "msgtext", "note", + "objectinfo", "olink", "option", "optional", "orderedlist", "orgdiv", "orgname", "otheraddr", "othername", "package", + "pagenums", "para", "parameter", "partinfo", "partintro", "phone", "phrase", "pob", "postcode", "preface", "prefaceinfo", + "procedure", "productname", "productnumber", "programlisting", "prompt", "property", "pubdate", "publishername", + "pubsnumber", "qandadiv", "qandaset", "question", "quote", "refentry", "refentryinfo", "refentrytitle", "referenceinfo", + "refmeta", "refmiscinfo", "refpurpose", "refsect1", "refsect1info", "refsect2", "refsect2info", "refsect3", "refsect3info", + "refsection", "refsectioninfo", "refsynopsisdiv", "refsynopsisdivinfo", "releaseinfo", "remark", "returnvalue", + "revdescription", "revnumber", "revremark", "screen", "screeninfo", "sect1", "sect1info", "sect2", "sect2info", "sect3", + "sect3info", "sect4", "sect4info", "sect5", "sect5info", "section", "sectioninfo", "seg", "segtitle", "seriesvolnums", + "setindex", "setindexinfo", "setinfo", "sgmltag", "shortaffil", "sidebar", "sidebarinfo", "simpara", "simplesect", + "state", "step", "street", "structfield", "structname", "subtitle", "surname", "symbol", "synopsis", "systemitem", + "table", "task", "taskprerequisites", "taskrelated", "tasksummary", "td", "term", "termdef", "th", "tip", /*"title",*/ + "titleabbrev", "tocback", "tocentry", "tocfront", "token", "type", "ulink", "uri", "userinput", "variablelist", + "varname", "volumenum", "warning", "wordasword", "year" + } }; + static std::set<const char*, string_cmp> permitted; + + if(permitted.empty()) + permitted.insert(names.begin(), names.end()); + + return 0 != permitted.count(name); +} +// +// Decide whether to flatten this node for searching purposes: +// +bool should_flatten_node(const char* name) +{ + // + // The list of nodes to flatten is basically the list of elements that + // can appear inside a <section> - see http://www.docbook.org/tdg/en/html/section.html. + // In other words basically anything at the level of a paragraph/table/listing etc. + // + static const boost::array<const char*, 57> names = + { { + "title", "subtitle", "titleabbrev", + "toc", "lot", "glossary", "bibliography", + /*"calloutlist", "glosslist", "bibliolist", "itemizedlist", "orderedlist", + "segmentedlist", "simplelist", "variablelist",*/ "caution", "important", "note", + "tip", "warning", "literallayout", "programlisting", "programlistingco", + "screen", "screenco", "screenshot", "synopsis", "cmdsynopsis", "funcsynopsis", + "classsynopsis", "fieldsynopsis", "constructorsynopsis", + "destructorsynopsis", "methodsynopsis", "formalpara", "para", "simpara", + "address", "blockquote", "graphic", "graphicco", "mediaobject", + "mediaobjectco", "informalequation", "informalexample", "informalfigure", + "informaltable", "equation", "example", "figure", "table", "msgset", "procedure", + "sidebar", "qandaset", "task", "productionset", "constraintdef", "anchor", + "bridgehead", "remark", "highlights", "abstract", "authorblurb", "epigraph" + /*"biblioentry", "bibliomixed", "callout", "glossentry", "listitem", "seg", "seglistitem", "member", + "term", */ + } }; + static std::set<const char*, string_cmp> terminals; + + if(terminals.empty()) + terminals.insert(names.begin(), names.end()); + return 0 != terminals.count(name); +} +std::string unescape_xml(const std::string& s) +{ + boost::regex e("&(?:(quot)|(amp)|(apos)|(lt)|(gt));"); + return regex_replace(s, e, "(?1\")(?2&)(?3\')(?4<)(?5>)", boost::regex_constants::format_all); +} +// +// Exception classes to propagate processing instruction info: +// +struct ignore_section{}; +struct ignore_block{}; +// +// Check if we're in a section (or chapter etc) or not: +// +bool is_section(const std::string& name) +{ + static const boost::array<const char*, 19> data = + {{ + "dedication", "toc", "lot", "glossary", "bibliography", "preface", "chapter", + "reference", "part", "article", "appendix", "index", "setindex", "colophon", + "sect1", "refentry", "simplesect", "section", "partintro" + }}; + std::set<std::string> names; + if(names.empty()) + names.insert(data.begin(), data.end()); + return 0 != names.count(name); +} +// +// Check if we're in a block/paragraph or not: +// +bool is_block(const std::string& name) +{ + static const boost::array<const char*, 58> data = + {{ + "calloutlist", "glosslist", "bibliolist", "itemizedlist", "orderedlist", + "segmentedlist", "simplelist", "variablelist", "caution", "important", "note", + "tip", "warning", "literallayout", "programlisting", "programlistingco", + "screen", "screenco", "screenshot", "synopsis", "cmdsynopsis", "funcsynopsis", + "classsynopsis", "fieldsynopsis", "constructorsynopsis", + "destructorsynopsis", "methodsynopsis", "formalpara", "para", "simpara", + "address", "blockquote", "graphic", "graphicco", "mediaobject", + "mediaobjectco", "informalequation", "informalexample", "informalfigure", + "informaltable", "equation", "example", "figure", "table", "msgset", "procedure", + "sidebar", "qandaset", "task", "productionset", "constraintdef", "anchor", + "bridgehead", "remark", "highlights", "abstract", "authorblurb", "epigraph" + }}; + std::set<std::string> names; + if(names.empty()) + names.insert(data.begin(), data.end()); + return 0 != names.count(name); +} +// +// Helper proc to recurse through children: +// +void process_node(boost::tiny_xml::element_ptr node, node_id* prev, title_info* pt, bool seen); +bool recurse_through_children(boost::tiny_xml::element_ptr node, node_id* id, title_info* pt, bool seen) +{ + try + { + for(boost::tiny_xml::element_list::const_iterator i = node->elements.begin(); + i != node->elements.end(); ++i) + { + process_node(*i, id, pt, seen); + } + } + catch(const ignore_section&) + { + if(is_section(node->name)) + return false; + else + throw; + } + catch(const ignore_block&) + { + if(is_block(node->name) || is_section(node->name)) + return false; + else + throw; + } + return true; +} +// +// This does most of the work: process the node pointed to, and any children +// that it may have: +// +void process_node(boost::tiny_xml::element_ptr node, node_id* prev, title_info* pt, bool seen = false) +{ + // + // Store the current ID and title as nested scoped objects: + // + node_id id = { 0, prev }; + if(can_contain_title(node->name.c_str())) + { + // Only set the ID to link to if the block can contain a title, see + // can_contain_title above for rationale. + id.id = find_attr(node, "id"); + } + title_info title = { "", pt}; + bool flatten = should_flatten_node(node->name.c_str()); + + if(node->name.size() && node->name[0] == '?') + { + if(node->name == "?BoostAutoIndex") + { + if(node->content == "IgnoreSection") + { + throw ignore_section(); + } + else if(node->content == "IgnoreBlock") + { + throw ignore_block(); + } + } + return; // Ignore processing instructions + } + else if((node->name == "title") && (id.prev->id)) + { + // + // This actually sets the title of the enclosing scope, + // not this tag itself: + // + title.prev->title = get_consolidated_content(node); + if(verbose) + std::cout << "Indexing section: " << title.prev->title << std::endl; + } + else if((node->name == "refentrytitle") && (id.prev->prev->id)) + { + // + // This actually sets the title of the enclosing refentry scope, + // not this tag itself: + // + title.prev->prev->title = get_consolidated_content(node); + if(verbose) + std::cout << "Indexing refentry: " << title.prev->prev->title << std::endl; + } + if(node->name == "anchor") + { + if(node->parent.lock()->name == "title") + { + // We have a title with a nested anchor ID, change the ID of our parents parent to match: + id.prev->prev->id = id.id; + } + } + else if(node->name == "index") + { + // Keep track of all the indexes we see: + indexes.push_back(node); + if(node->parent.lock()->name == "para") + node->parent.lock()->name = ""; + } + else if(node->name == "primary") + { + last_primary = get_consolidated_content(node); + } + else if(node->name == "secondary") + { + last_secondary = get_consolidated_content(node); + } + else if(node->name == "tertiary") + { + last_tertiary = get_consolidated_content(node); + } + else if((node->name == "see") && internal_indexes) + { + std::cerr << "WARNING: <see> in XML source will be ignored for the index generation" << std::endl; + } + else if((node->name == "seealso") && internal_indexes) + { + std::cerr << "WARNING: <seealso> in XML source will be ignored for the index generation" << std::endl; + } + + std::string flattenned_text; + const std::string* ptext; + if(flatten) + { + flattenned_text = unescape_xml(get_consolidated_content(node)); + ptext = &flattenned_text; + // + // Recurse through children here if we're going to flatten the text, that way we see any processing instructions first: + // + if(!recurse_through_children(node, &id, &title, flatten || seen)) + return; + } + else + { + ptext = &(node->content); + } + + // + // Search content for items: we only search if the content is not empty, + // and the content is not whitespace alone, and we haven't already searched this + // text in one of our parent nodes that got flattened. + // + static const boost::regex space_re("[[:space:]]+"); + if(!seen && ptext->size() && !regex_match(*ptext, space_re)) + { + // Save block ID and title in case we find some hits: + const std::string* pid = get_current_block_id(&id); + const std::string& rtitle = get_current_block_title(&title); + const std::string simple_title = rewrite_title(rtitle, *pid); + // Scan for each index term: + for(std::set<index_info>::const_iterator i = index_terms.begin(); + i != index_terms.end(); ++i) + { + if(regex_search(*ptext, i->search_text)) + { + // + // We need to check to see if this term has already been indexed + // in this zone, in order to prevent duplicate entries, also check + // that any constrait placed on the term's ID is satisfied: + // + std::pair<std::string, std::string> item_index(*pid, i->term); + if(((no_duplicates == false) || (0 == found_terms.count(item_index))) + && (i->search_id.empty() || regex_match(*pid, i->search_id))) + { + // We have something to index! + found_terms.insert(item_index); + + if(!debug.empty() && (regex_match(i->term, debug) || regex_match(rtitle, debug) || regex_match(simple_title, debug))) + { + std::cout << "Debug term found, in block with ID: " << *pid << std::endl; + std::cout << "Current section title is: " << rtitle << std::endl; + std::cout << "The main index entry will be : " << simple_title << std::endl; + std::cout << "The indexed term is: " << i->term << std::endl; + std::cout << "The search regex is: " << i->search_text << std::endl; + std::cout << "The section constraint is: " << i->search_id << std::endl; + std::cout << "The index type for this entry is: " << i->category << std::endl; + } + + if(use_section_names && (simple_title != i->term)) + { + // + // First off insert index entry with primary term + // consisting of the section title, and secondary term the + // actual index term, this gets skipped if the title and index + // term are the same: + // + if(internal_indexes == false) + { + // Insert an <indexterm> into the XML: + boost::tiny_xml::element_ptr p(new boost::tiny_xml::element()); + p->name = "indexterm"; + boost::tiny_xml::element_ptr prim(new boost::tiny_xml::element()); + prim->name = "primary"; + prim->elements.push_front(boost::tiny_xml::element_ptr(new boost::tiny_xml::element())); + prim->elements.front()->content = simple_title; + p->elements.push_front(prim); + + boost::tiny_xml::element_ptr sec(new boost::tiny_xml::element()); + sec->name = "secondary"; + sec->elements.push_front(boost::tiny_xml::element_ptr(new boost::tiny_xml::element())); + sec->elements.front()->content = i->term; + p->elements.push_back(sec); + try{ + // Insert the Indexterm: + boost::tiny_xml::element_ptr parent(node->parent); + while(!can_contain_indexterm(parent->name.c_str())) + parent = parent->parent.lock(); + parent->elements.push_front(p); + } + catch(const std::exception&) + { + std::cerr << "Unable to find location to insert <indexterm>" << std::endl; + } + } + // Track the entry in our internal index: + index_entry_ptr item1(new index_entry(simple_title)); + index_entry_ptr item2(new index_entry(i->term, *pid)); + index_entry_set::iterator pos = index_entries.insert(item1).first; + (**pos).sub_keys.insert(item2); + } + // + // Now insert another index entry with the index term + // as the primary key, and the section title as the + // secondary key, this one gets assigned to the + // appropriate index category if there is one: + // + bool preferred_term = false; + if(internal_indexes == false) + { + // Insert <indexterm> into the XML: + boost::tiny_xml::element_ptr p2(new boost::tiny_xml::element()); + p2->name = "indexterm"; + if(i->category.size()) + { + p2->attributes.push_back(boost::tiny_xml::attribute("type", i->category)); + } + boost::tiny_xml::element_ptr prim2(new boost::tiny_xml::element()); + prim2->name = "primary"; + prim2->elements.push_front(boost::tiny_xml::element_ptr(new boost::tiny_xml::element())); + prim2->elements.front()->content = i->term; + p2->elements.push_front(prim2); + + boost::tiny_xml::element_ptr sec2(new boost::tiny_xml::element()); + sec2->name = "secondary"; + sec2->elements.push_front(boost::tiny_xml::element_ptr(new boost::tiny_xml::element())); + sec2->elements.front()->content = rtitle; + p2->elements.push_back(sec2); + try{ + // Insert the Indexterm: + boost::tiny_xml::element_ptr parent(node->parent); + while(!can_contain_indexterm(parent->name.c_str())) + { + // If the search text was found in a title then make it a preferred term: + if(parent->name == "title") + preferred_term = true; + parent = parent->parent.lock(); + } + if(preferred_term) + { + boost::tiny_xml::attribute a("significance", "preferred"); + p2->attributes.push_back(a); + } + parent->elements.push_front(p2); + } + catch(const std::exception&) + { + std::cerr << "Unable to find location to insert <indexterm>" << std::endl; + } + } + + // Track the entry in our internal index: + try{ + // figure out if it's preferred or not: + boost::tiny_xml::element_ptr parent(node->parent); + while(!can_contain_indexterm(parent->name.c_str())) + { + // If the search text was found in a title then make it a preferred term: + if(parent->name == "title") + { + preferred_term = true; + } + parent = parent->parent.lock(); + if(!parent) + break; + } + } + catch(const std::exception&){} + + index_entry_ptr item3(new index_entry(i->term)); + if(i->category.size()) + item3->category = i->category; + index_entry_ptr item4(new index_entry(rtitle, *pid)); + item4->preferred = preferred_term; + index_entry_set::iterator pos = index_entries.insert(item3).first; + (**pos).sub_keys.insert(item4); + } + } + } + } + // + // Recurse through children, if not done already: + // + if(!flatten) + recurse_through_children(node, &id, &title, flatten || seen); + // + // Process manual index entries last of all: + // + if(node->name == "indexterm") + { + // Track the entry in our internal index: + const std::string* pid = get_current_block_id(&id); + const std::string* attr = find_attr(node, "type"); + const std::string& rtitle = get_current_block_title(&title); + const std::string simple_title = rewrite_title(rtitle, *pid); + index_entry_ptr item1(new index_entry(last_primary, "", attr ? *attr : "")); + index_entry_set* parent = &((*index_entries.insert(item1).first)->sub_keys); + + if(last_secondary.size()) + { + item1.reset(new index_entry(last_secondary, "", attr ? *attr : "")); + parent = &((*parent->insert(item1).first)->sub_keys); + } + if(last_tertiary.size()) + { + item1.reset(new index_entry(last_tertiary, "", attr ? *attr : "")); + parent = &((*parent->insert(item1).first)->sub_keys); + } + item1.reset(new index_entry(simple_title, *pid, attr ? *attr : "")); + parent->insert(item1); + + last_primary = ""; + last_secondary = ""; + last_tertiary = ""; + } +} + +void process_nodes(boost::tiny_xml::element_ptr node) +{ + node_id id = { 0, }; + title_info t = { "", 0 }; + process_node(node, &id, &t); +} + +int main(int argc, char* argv[]) +{ + try{ + + namespace po = boost::program_options; + po::options_description desc("AutoIndex Allowed Options"); + desc.add_options() + ("help", "Print help message") + ("in", po::value<std::string>(), "Set the input XML file.") + ("out", po::value<std::string>(), "Set output input XML file.") + ("scan", po::value<std::string>(), "Scan the specified file for terms to try and index.") + ("script", po::value<std::string>(), "Specifies the script file to use.") + ("no-duplicates", "Prevents duplicate index entries within the same section.") + ("no-section-names", "Suppresses use of section names as index entries.") + ("internal-index", "Causes AutoIndex to generate the index itself, rather than relying on the XSL stylesheets.") + ("verbose", "Turns on verbose mode.") + ("prefix", po::value<std::string>(), "Sets the prefix to be prepended to all file names and paths in the script file.") + ("index-type", po::value<std::string>(), "Sets the XML container type to use the index.") + ; + + po::variables_map vm; + po::store(po::parse_command_line(argc, argv, desc), vm); + po::notify(vm); + + // + // Process arguments: + // + if(vm.count("help")) + { + std::cout << desc; + return 0; + } + if(vm.count("in")) + { + infile = vm["in"].as<std::string>(); + } + else + { + std::cerr << "No input XML file specified" << std::endl; + return 1; + } + if(vm.count("out")) + { + outfile = vm["out"].as<std::string>(); + } + else + { + std::cerr << "No output XML file specified" << std::endl; + return 1; + } + if(vm.count("verbose")) + { + verbose = true; + } + if(vm.count("prefix")) + { + prefix = vm["prefix"].as<std::string>(); + } + if(vm.count("scan")) + { + std::string f = vm["scan"].as<std::string>(); + if(!exists(boost::filesystem::path(f))) + throw std::runtime_error("Error the file requested for scanning does not exist: " + f); + scan_file(f); + } + if(vm.count("script")) + { + process_script(vm["script"].as<std::string>()); + } + if(vm.count("no-duplicates")) + { + no_duplicates = true; + } + if(vm.count("no-section-names")) + { + use_section_names = false; + } + if(vm.count("internal-index")) + { + internal_indexes = true; + } + if(vm.count("index-type")) + { + internal_index_type = vm["index-type"].as<std::string>(); + } + + std::ifstream is(infile.c_str()); + if((0 == is.peek()) || !is.good()) + { + std::cerr << "Unable to open XML data file " << argv[1] << std::endl; + return 1; + } + // + // We need to skip any leading <? and <! elements: + // + std::string header = get_header(is); + boost::tiny_xml::element_ptr xml = boost::tiny_xml::parse(is, ""); + is.close(); + + std::cout << "Indexing " << index_terms.size() << " terms..." << std::endl; + + process_nodes(xml); + + if(internal_indexes) + generate_indexes(); + + std::ofstream os(outfile.c_str()); + os << header << std::endl; + boost::tiny_xml::write(*xml, os); + std::cout << index_entries.size() << " Index entries were created." << std::endl; + + } + catch(boost::exception& e) + { + std::cerr << diagnostic_information(e); + return 1; + } + catch(const std::exception& e) + { + std::cerr << e.what() << std::endl; + return 1; + } + catch(const std::string& s) + { + std::cerr << s << std::endl; + return 1; + } + + return 0; +} diff --git a/src/boost/tools/auto_index/src/auto_index.hpp b/src/boost/tools/auto_index/src/auto_index.hpp new file mode 100644 index 000000000..255b8575f --- /dev/null +++ b/src/boost/tools/auto_index/src/auto_index.hpp @@ -0,0 +1,137 @@ +// Copyright 2008 John Maddock +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_AUTO_INDEX_HPP +#define BOOST_AUTO_INDEX_HPP + +#include <boost/version.hpp> + +#if BOOST_VERSION < 104400 +# error "This tool requires Boost 1.44 or later to build." +#endif + +#define BOOST_FILESYSTEM_VERSION 3 + +#include "tiny_xml.hpp" +#include <boost/regex.hpp> +#include <boost/filesystem.hpp> +#include <boost/algorithm/string/case_conv.hpp> +#include <fstream> +#include <cctype> +#include <map> +#include <set> +#include <sstream> + +struct index_info +{ + std::string term; // The term goes in the index entry + boost::regex search_text; // What to search for when indexing the term. + boost::regex search_id; // What id's this term may be indexed in. + std::string category; // Index category (function, class, macro etc). +}; +inline bool operator < (const index_info& a, const index_info& b) +{ + return (a.term != b.term) ? (a.term < b.term) : (a.category < b.category); +} + + +struct index_entry; +typedef boost::shared_ptr<index_entry> index_entry_ptr; +bool operator < (const index_entry_ptr& a, const index_entry_ptr& b); +typedef std::set<index_entry_ptr> index_entry_set; + +struct index_entry +{ + std::string key; // The index term. + std::string sort_key; // upper case version of term used for sorting. + std::string id; // The id of the block that we will link to. + std::string category; // The category of this entry (function, class, macro etc). + index_entry_set sub_keys; // All our sub-keys. + bool preferred; // This entry is the preferred one for this key + + index_entry() : preferred(false) {} + index_entry(const std::string& k) : key(k), sort_key(k), preferred(false) { boost::to_upper(sort_key); } + index_entry(const std::string& k, const std::string& i) : key(k), sort_key(k), id(i), preferred(false) { boost::to_upper(sort_key); } + index_entry(const std::string& k, const std::string& i, const std::string& c) : key(k), sort_key(k), id(i), category(c), preferred(false) { boost::to_upper(sort_key); } +}; + + +inline bool operator < (const index_entry_ptr& a, const index_entry_ptr& b) +{ + return ((a->sort_key != b->sort_key) ? (a->sort_key < b->sort_key) : (a->category < b->category)); +} + +struct id_rewrite_rule +{ + bool base_on_id; // rewrite the title if "id" matches the section id, otherwise rewrite if title matches "id". + boost::regex id; // regex for the id or title to match + std::string new_name; // either literal string or format string for the new name. + + id_rewrite_rule(const std::string& i, const std::string& n, bool b) + : base_on_id(b), id(i), new_name(n) {} +}; + +struct node_id +{ + const std::string* id; + node_id* prev; +}; + +struct title_info +{ + std::string title; + title_info* prev; +}; + +struct file_scanner +{ + boost::regex scanner, file_name_filter, section_filter; + std::string format_string, type, term_formatter; +}; + +inline bool operator < (const file_scanner & a, const file_scanner& b) +{ + return a.type < b.type; +} + +typedef std::multiset<file_scanner> file_scanner_set_type; + +void process_script(const std::string& script); +void scan_dir(const std::string& dir, const std::string& mask, bool recurse); +void scan_file(const std::string& file); +void generate_indexes(); +const std::string* find_attr(boost::tiny_xml::element_ptr node, const char* name); + +extern file_scanner_set_type file_scanner_set; + +inline void add_file_scanner(const std::string& type, const std::string& scanner, const std::string& format, const std::string& term_formatter, const std::string& id_filter, const std::string& file_filter) +{ + file_scanner s; + s.type = type; + s.scanner = scanner; + s.format_string = format; + s.term_formatter = term_formatter; + if(file_filter.size()) + s.file_name_filter = file_filter; + if(id_filter.size()) + s.section_filter = id_filter; + file_scanner_set.insert(s); +} + +extern std::set<index_info> index_terms; +extern std::set<std::pair<std::string, std::string> > found_terms; +extern bool no_duplicates; +extern bool verbose; +extern index_entry_set index_entries; +extern boost::tiny_xml::element_list indexes; +extern std::list<id_rewrite_rule> id_rewrite_list; +extern bool internal_indexes; +extern std::string prefix; +extern std::string internal_index_type; +extern boost::regex debug; + +#endif diff --git a/src/boost/tools/auto_index/src/file_scanning.cpp b/src/boost/tools/auto_index/src/file_scanning.cpp new file mode 100644 index 000000000..f6c2209c6 --- /dev/null +++ b/src/boost/tools/auto_index/src/file_scanning.cpp @@ -0,0 +1,495 @@ +// Copyright 2008 John Maddock +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "auto_index.hpp" + +bool need_defaults = true; + +void install_default_scanners() +{ + need_defaults = false; + // + // Set the default scanners if they're not defined already: + // + file_scanner s; + s.type = "class_name"; + if(file_scanner_set.find(s) == file_scanner_set.end()) + { + add_file_scanner( + "class_name", // Index type + // Header file scanner regex: + // possibly leading whitespace: + "^[[:space:]]*" + // possible template declaration: + "(template[[:space:]]*<[^;:{]+>[[:space:]]*)?" + // class or struct: + "(class|struct)[[:space:]]*" + // leading declspec macros etc: + "(" + "\\<\\w+\\>" + "(" + "[[:blank:]]*\\([^)]*\\)" + ")?" + "[[:space:]]*" + ")*" + // the class name + "(\\<\\w*\\>)[[:space:]]*" + // template specialisation parameters + "(<[^;:{]+>)?[[:space:]]*" + // terminate in { or : + "(\\{|:[^;\\{()]*\\{)", + + "(?:class|struct)[^;{]+\\\\<\\5\\\\>[^;{]+\\\\{", // Format string to create indexing regex. + "\\5", // Format string to create index term. + "", // Filter regex for section id's. + "" // Filter regex for filenames. + ); + } + + s.type = "typedef_name"; + if(file_scanner_set.find(s) == file_scanner_set.end()) + { + add_file_scanner( + "typedef_name", // Index type + "typedef[^;{}#]+?(\\w+)\\s*;", // scanner regex + "typedef[^;]+\\\\<\\1\\\\>\\\\s*;", // Format string to create indexing regex. + "\\1", // Format string to create index term. + "", // Filter regex for section id's. + "" // Filter regex for filenames. + ); + } + + s.type = "macro_name"; + if(file_scanner_set.find(s) == file_scanner_set.end()) + { + add_file_scanner( + "macro_name", // Index type + "^\\s*#\\s*define\\s+(\\w+)", // scanner regex + "\\\\<\\1\\\\>", // Format string to create indexing regex. + "\\1", // Format string to create index term. + "", // Filter regex for section id's. + "" // Filter regex for filenames. + ); + } + + s.type = "function_name"; + if(file_scanner_set.find(s) == file_scanner_set.end()) + { + add_file_scanner( + "function_name", // Index type + "\\w++(?:\\s*+<[^>]++>)?[\\s&*]+?(\\w+)\\s*(?:BOOST_[[:upper:]_]+\\s*)?\\([^;{}]*\\)\\s*[;{]", // scanner regex + "\\\\<\\\\w+\\\\>(?:\\\\s+<[^>]*>)*[\\\\s&*]+\\\\<\\1\\\\>\\\\s*\\\\([^;{]*\\\\)", // Format string to create indexing regex. + "\\1", // Format string to create index term. + "", // Filter regex for section id's. + "" // Filter regex for filenames. + ); + } +} + +// +// Helper to dump file contents into a std::string: +// +void load_file(std::string& s, std::istream& is) +{ + s.erase(); + if(is.bad()) return; + s.reserve(is.rdbuf()->in_avail()); + char c; + while(is.get(c)) + { + if(s.capacity() == s.size()) + s.reserve(s.capacity() * 3); + s.append(1, c); + } +} +// +// Helper to convert string from external source into valid XML: +// +std::string escape_to_xml(const std::string& in) +{ + std::string result; + for(std::string::size_type i = 0; i < in.size(); ++i) + { + switch(in[i]) + { + case '&': + result.append("&"); + break; + case '<': + result.append("<"); + break; + case '>': + result.append(">"); + break; + case '"': + result.append("""); + break; + default: + result.append(1, in[i]); + } + } + return result; +} +// +// Scan a source file for things to index: +// +void scan_file(const std::string& file) +{ + if(need_defaults) + install_default_scanners(); + if(verbose) + std::cout << "Scanning file... " << file << std::endl; + std::string text; + std::ifstream is(file.c_str()); + if(!is.peek() || !is.good()) + throw std::runtime_error(std::string("Unable to read from file: ") + file); + load_file(text, is); + + for(file_scanner_set_type::iterator pscan = file_scanner_set.begin(); pscan != file_scanner_set.end(); ++pscan) + { + bool need_debug = false; + if(!debug.empty() && regex_match(pscan->type, ::debug)) + { + need_debug = true; + std::cout << "Processing scanner " << pscan->type << " on file " << file << std::endl; + std::cout << "Scanner regex:" << pscan->scanner << std::endl; + std::cout << "Scanner formatter (search regex):" << pscan->format_string << std::endl; + std::cout << "Scanner formatter (index term):" << pscan->term_formatter << std::endl; + std::cout << "Scanner file name filter:" << pscan->file_name_filter << std::endl; + std::cout << "Scanner section id filter:" << pscan->section_filter << std::endl; + } + if(!pscan->file_name_filter.empty()) + { + if(!regex_match(file, pscan->file_name_filter)) + { + if(need_debug) + { + std::cout << "File failed to match file name filter, this file will be skipped..." << std::endl; + } + continue; // skip this file + } + } + if(verbose && !need_debug) + std::cout << "Scanning for type \"" << (*pscan).type << "\" ... " << std::endl; + boost::sregex_iterator i(text.begin(), text.end(), (*pscan).scanner), j; + while(i != j) + { + try + { + index_info info; + info.term = escape_to_xml(i->format(pscan->term_formatter)); + info.search_text = i->format(pscan->format_string); + info.category = pscan->type; + if(!pscan->section_filter.empty()) + info.search_id = pscan->section_filter; + std::pair<std::set<index_info>::iterator, bool> pos = index_terms.insert(info); + if(pos.second) + { + if(verbose || need_debug) + std::cout << "Indexing " << info.term << " as type " << info.category << std::endl; + if(need_debug) + std::cout << "Search regex will be: \"" << info.search_text << "\"" << + " ID constraint is: \"" << info.search_id << "\"" + << "Found text was: " << i->str() << std::endl; + if(pos.first->search_text != info.search_text) + { + // + // Merge the search terms: + // + const_cast<boost::regex&>(pos.first->search_text) = + "(?:" + pos.first->search_text.str() + ")|(?:" + info.search_text.str() + ")"; + } + if(pos.first->search_id != info.search_id) + { + // + // Merge the ID constraints: + // + const_cast<boost::regex&>(pos.first->search_id) = + "(?:" + pos.first->search_id.str() + ")|(?:" + info.search_id.str() + ")"; + } + } + } + catch(const boost::regex_error& e) + { + std::cerr << "Unable to create regular expression from found index term:\"" + << i->format(pscan->term_formatter) << "\" In file " << file << std::endl; + std::cerr << e.what() << std::endl; + } + catch(const std::exception& e) + { + std::cerr << "Unable to create index term:\"" + << i->format(pscan->term_formatter) << "\" In file " << file << std::endl; + std::cerr << e.what() << std::endl; + throw; + } + ++i; + } + } +} +// +// Scan a whole directory for files to search: +// +void scan_dir(const std::string& dir, const std::string& mask, bool recurse) +{ + using namespace boost::filesystem; + boost::regex e(mask); + directory_iterator i(dir), j; + + while(i != j) + { + if(regex_match(i->path().filename().string(), e)) + { + scan_file(i->path().string()); + } + else if(recurse && is_directory(i->status())) + { + scan_dir(i->path().string(), mask, recurse); + } + ++i; + } +} +// +// Remove quotes from a string: +// +std::string unquote(const std::string& s) +{ + std::string result(s); + if((s.size() >= 2) && (*s.begin() == '\"') && (*s.rbegin() == '\"')) + { + result.erase(result.begin()); + result.erase(result.end() - 1); + } + return result; +} +// +// Load and process a script file: +// +void process_script(const std::string& script) +{ + static const boost::regex comment_parser( + "\\s*(?:#.*)?$" + ); + static const boost::regex scan_parser( + "!scan[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s*" + ); + static const boost::regex scan_dir_parser( + "!scan-path[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" + "[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" + "(?:" + "[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" + ")?\\s*" + ); + static const boost::regex entry_parser( + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" + "(?:" + "[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)*\")" + "(?:" + "[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)*\")" + "(?:" + "[[:space:]]+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)*\")" + ")?" + ")?" + ")?" + "[[:space:]]*"); + static const boost::regex rewrite_parser( + "!(rewrite-name|rewrite-id)\\s+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s*" + ); + static const boost::regex debug_parser( + "!debug\\s+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s*" + ); + static const boost::regex define_scanner_parser( + "!define-scanner\\s+" + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s+" // type, index 1 + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s+" // scanner regex, index 2 + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")\\s+" // format string, index 3 + "([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" // format string for name, index 4 + "(?:" + "\\s+([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" // id-filter, index 5 + "(?:" + "\\s+([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")" // filename-filter, index 6 + ")?" + ")?" + "\\s*" + ); + static const boost::regex error_parser("!.*"); + + if(verbose) + std::cout << "Processing script " << script << std::endl; + boost::smatch what; + std::string line; + std::ifstream is(script.c_str()); + if(is.bad() || !exists(boost::filesystem::path(script))) + { + throw std::runtime_error(std::string("Could not open script file: ") + script); + } + while(std::getline(is, line).good()) + { + if(regex_match(line, what, comment_parser)) + { + // Nothing to do here... + } + else if(regex_match(line, what, scan_parser)) + { + std::string f = unquote(what[1].str()); + if(!boost::filesystem::path(f).is_complete()) + { + if(prefix.size()) + { + boost::filesystem::path base(prefix); + base /= f; + f = base.string(); + } + else + { + boost::filesystem::path base(script); + base.remove_filename(); + base /= f; + f = base.string(); + } + } + if(!exists(boost::filesystem::path(f))) + throw std::runtime_error("Error the file requested for scanning does not exist: " + f); + scan_file(f); + } + else if(regex_match(line, what, debug_parser)) + { + debug = unquote(what[1].str()); + } + else if(regex_match(line, what, define_scanner_parser)) + { + add_file_scanner(unquote(what.str(1)), unquote(what.str(2)), unquote(what.str(3)), + unquote(what.str(4)), unquote(what.str(5)), unquote(what.str(6))); + } + else if(regex_match(line, what, scan_dir_parser)) + { + std::string d = unquote(what[1].str()); + std::string m = unquote(what[2].str()); + bool r = unquote(what[3].str()) == "true"; + if(!boost::filesystem::path(d).is_complete()) + { + if(prefix.size()) + { + boost::filesystem::path base(prefix); + base /= d; + d = base.string(); + } + else + { + boost::filesystem::path base(script); + base.remove_filename(); + base /= d; + d = base.string(); + } + } + if(verbose) + std::cout << "Scanning directory " << d << std::endl; + if(!exists(boost::filesystem::path(d))) + throw std::runtime_error("Error the path requested for scanning does not exist: " + d); + scan_dir(d, m, r); + } + else if(regex_match(line, what, rewrite_parser)) + { + bool id = what[1] == "rewrite-id"; + std::string a = unquote(what[2].str()); + std::string b = unquote(what[3].str()); + id_rewrite_list.push_back(id_rewrite_rule(a, b, id)); + } + else if(line.compare(0, 9, "!exclude ") == 0) + { + static const boost::regex delim("([^\"[:space:]]+|\"(?:[^\"\\\\]|\\\\.)+\")"); + boost::sregex_token_iterator i(line.begin() + 9, line.end(), delim, 0), j; + while(i != j) + { + index_info info; + info.term = escape_to_xml(unquote(*i)); + // Erase all entries that have a category in our scanner set, + // plus any entry with no category at all: + index_terms.erase(info); + for(file_scanner_set_type::iterator pscan = file_scanner_set.begin(); pscan != file_scanner_set.end(); ++pscan) + { + info.category = (*pscan).type; + index_terms.erase(info); + } + ++i; + } + } + else if(regex_match(line, error_parser)) + { + std::cerr << "Error: Unable to process line: " << line << std::endl; + } + else if(regex_match(line, what, entry_parser)) + { + try{ + // what[1] is the Index entry + // what[2] is the regex to search for (optional) + // what[3] is a section id that must be matched + // in order for the term to be indexed (optional) + // what[4] is the index category to place the term in (optional). + index_info info; + info.term = escape_to_xml(unquote(what.str(1))); + std::string s = unquote(what.str(2)); + if(s.size()) + info.search_text = boost::regex(s, boost::regex::icase|boost::regex::perl); + else + info.search_text = boost::regex("\\<" + what.str(1) + "\\>", boost::regex::icase|boost::regex::perl); + + s = unquote(what.str(3)); + if(s.size()) + info.search_id = s; + if(what[4].matched) + info.category = unquote(what.str(4)); + std::pair<std::set<index_info>::iterator, bool> pos = index_terms.insert(info); + if(pos.second) + { + if(pos.first->search_text != info.search_text) + { + // + // Merge the search terms: + // + const_cast<boost::regex&>(pos.first->search_text) = + "(?:" + pos.first->search_text.str() + ")|(?:" + info.search_text.str() + ")"; + } + if(pos.first->search_id != info.search_id) + { + // + // Merge the ID constraints: + // + const_cast<boost::regex&>(pos.first->search_id) = + "(?:" + pos.first->search_id.str() + ")|(?:" + info.search_id.str() + ")"; + } + } + } + catch(const boost::regex_error&) + { + std::cerr << "Unable to process regular expression in script line:\n \"" + << line << "\"" << std::endl; + throw; + } + catch(const std::exception&) + { + std::cerr << "Unable to process script line:\n \"" + << line << "\"" << std::endl; + throw; + } + } + else + { + std::cerr << "Error: Unable to process line: " << line << std::endl; + } + } +} + diff --git a/src/boost/tools/auto_index/src/index_generator.cpp b/src/boost/tools/auto_index/src/index_generator.cpp new file mode 100644 index 000000000..1b65f63c9 --- /dev/null +++ b/src/boost/tools/auto_index/src/index_generator.cpp @@ -0,0 +1,327 @@ +// Copyright 2008 John Maddock +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "auto_index.hpp" +#include <boost/range.hpp> +#include <boost/format.hpp> + +// +// Get a numerical ID for the next item: +// +std::string get_next_index_id() +{ + static int index_id_count = 0; + std::stringstream s; + s << "idx_id_" << index_id_count; + ++index_id_count; + return s.str(); +} + +void raise_invalid_xml(const std::string& parent, const std::string& child) +{ + throw std::runtime_error("Error: element " + child + " can not appear inside the container " + parent + ": try using a different value for property \"auto-index-type\"."); +} +// +// Validate that the container for the Index is in a valid place: +// +void check_index_type_and_placement(const std::string& parent, const std::string& container) +{ + if(container == "section") + { + if((parent != "appendix") + && (parent != "article") + && (parent != "chapter") + && (parent != "partintro") + && (parent != "preface") + && (parent != "section")) + raise_invalid_xml(parent, container); + } + else if(container == "appendix") + { + if((parent != "article") + && (parent != "book") + && (parent != "part")) + raise_invalid_xml(parent, container); + } + else if(container == "index") + { + if((parent != "appendix") + && (parent != "article") + && (parent != "book") + && (parent != "chapter") + && (parent != "part") + && (parent != "preface") + && (parent != "sect1") + && (parent != "sect2") + && (parent != "sect3") + && (parent != "sect4") + && (parent != "sect5") + && (parent != "section") + ) + raise_invalid_xml(parent, container); + } + else if((container == "article") || (container == "chapter") || (container == "reference")) + { + if((parent != "book") + && (parent != "part")) + raise_invalid_xml(parent, container); + } + else if(container == "part") + { + if(parent != "book") + raise_invalid_xml(parent, container); + } + else if(container == "refsect1") + { + if(parent != "refentry") + raise_invalid_xml(parent, container); + } + else if(container == "refsect2") + { + if(parent != "refsect1") + raise_invalid_xml(parent, container); + } + else if(container == "refsect3") + { + if(parent != "refsect2") + raise_invalid_xml(parent, container); + } + else if(container == "refsection") + { + if((parent != "refsection") && (parent != "refentry")) + raise_invalid_xml(parent, container); + } + else if(container == "sect1") + { + if((parent != "appendix") + && (parent != "article") + && (parent != "chapter") + && (parent != "partintro") + && (parent != "preface") + ) + raise_invalid_xml(parent, container); + } + else if(container == "sect2") + { + if(parent != "sect1") + raise_invalid_xml(parent, container); + } + else if(container == "sect3") + { + if(parent != "sect2") + raise_invalid_xml(parent, container); + } + else if(container == "sect4") + { + if(parent != "sect3") + raise_invalid_xml(parent, container); + } + else if(container == "sect5") + { + if(parent != "sect4") + raise_invalid_xml(parent, container); + } + else + { + throw std::runtime_error("Error: element " + container + " is unknown, and can not be used as a container for an index: try using a different value for property \"auto-index-type\"."); + } +} + +boost::tiny_xml::element_ptr make_element(const std::string& name) +{ + boost::tiny_xml::element_ptr result(new boost::tiny_xml::element); + result->name = name; + return result; +} + +boost::tiny_xml::element_ptr add_attribute(boost::tiny_xml::element_ptr ptr, const std::string& name, const std::string& value) +{ + boost::tiny_xml::attribute attr; + attr.name = name; + attr.value = value; + ptr->attributes.push_back(attr); + return ptr; +} + +boost::regex make_primary_key_matcher(const std::string& s) +{ + static const boost::regex e("[-_[:space:]]+|([.\\[{}()\\*+?|^$])"); + static const char* format = "(?1\\\\$1:[-_[:space:]]+)"; + return boost::regex(regex_replace(s, e, format, boost::regex_constants::format_all), boost::regex::icase|boost::regex::perl); +} + +// +// Generate an index entry using our own internal method: +// +template <class Range> +boost::tiny_xml::element_ptr generate_entry(const Range& range, const std::string* pcategory, int level = 0, const boost::regex* primary_key = 0) +{ + boost::tiny_xml::element_ptr list = add_attribute(add_attribute(::add_attribute(make_element("itemizedlist"), "mark", "none"), "spacing", "compact"), "role", "index"); + + for(typename boost::range_iterator<Range>::type i = boost::begin(range); i != boost::end(range);) + { + std::string key = (*i)->key; + index_entry_set entries; + bool preferred = false; + std::string id; + bool collapse = false; + + // + // Create a regular expression for comparing key to other key's: + // + boost::regex key_regex; + if(level == 0) + { + key_regex = make_primary_key_matcher(key); + primary_key = &key_regex; + } + // + // Begin by consolidating entries with identical keys but possibly different categories: + // + while((i != boost::end(range)) && ((*i)->key == key)) + { + if((0 == pcategory) || (pcategory->size() == 0) || (pcategory && (**i).category == *pcategory)) + { + entries.insert((*i)->sub_keys.begin(), (*i)->sub_keys.end()); + if((*i)->preferred) + preferred = true; + if((*i)->id.size()) + { + if(id.size()) + { + std::cerr << "WARNING: two identical index terms have different link destinations!!" << std::endl; + } + id = (*i)->id; + } + } + ++i; + } + // + // Only actually generate content if we have anything in the entries set: + // + if(entries.size() || id.size()) + { + // + // See if we can collapse any sub-entries into this one: + // + if(entries.size() == 1) + { + if((regex_match((*entries.begin())->key, *primary_key) || ((*entries.begin())->key == key)) + && ((*entries.begin())->id.size()) + && ((*entries.begin())->id != id)) + { + collapse = true; + id = (*entries.begin())->id; + } + } + // + // See if this key is the same as the primary key, if it is then make it prefered: + // + if(level && regex_match(key, *primary_key)) + { + preferred = true; + } + boost::tiny_xml::element_ptr item = make_element("listitem"); + boost::tiny_xml::element_ptr para = make_element("para"); + item->elements.push_back(para); + list->elements.push_back(item); + if(preferred) + { + para->elements.push_back(add_attribute(make_element("emphasis"), "role", "bold")); + para = para->elements.back(); + } + if(id.size()) + { + boost::tiny_xml::element_ptr link = add_attribute(make_element("link"), "linkend", id); + para->elements.push_back(link); + para = link; + } + std::string classname = (boost::format("index-entry-level-%1%") % level).str(); + para->elements.push_back(add_attribute(make_element("phrase"), "role", classname)); + para = para->elements.back(); + para->content = key; + if(!collapse && entries.size()) + { + std::pair<index_entry_set::const_iterator, index_entry_set::const_iterator> subrange(entries.begin(), entries.end()); + item->elements.push_back(generate_entry(subrange, 0, level+1, primary_key)); + } + } + } + return list; +} +// +// Generate indexes using our own internal method: +// +void generate_indexes() +{ + for(boost::tiny_xml::element_list::const_iterator i = indexes.begin(); i != indexes.end(); ++i) + { + boost::tiny_xml::element_ptr node = *i; + const std::string* category = find_attr(node, "type"); + bool has_title = false; + + for(boost::tiny_xml::element_list::const_iterator k = (*i)->elements.begin(); k != (*i)->elements.end(); ++k) + { + if((**k).name == "title") + { + has_title = true; + break; + } + } + + boost::tiny_xml::element_ptr navbar = make_element("para"); + node->elements.push_back(navbar); + + index_entry_set::const_iterator m = index_entries.begin(); + index_entry_set::const_iterator n = m; + boost::tiny_xml::element_ptr vlist = make_element("variablelist"); + node->elements.push_back(vlist); + while(n != index_entries.end()) + { + char current_letter = std::toupper((*n)->key[0]); + std::string id_name = get_next_index_id(); + boost::tiny_xml::element_ptr entry = add_attribute(make_element("varlistentry"), "id", id_name); + boost::tiny_xml::element_ptr term = make_element("term"); + term->content = std::string(1, current_letter); + entry->elements.push_back(term); + boost::tiny_xml::element_ptr item = make_element("listitem"); + entry->elements.push_back(item); + while((n != index_entries.end()) && (std::toupper((*n)->key[0]) == current_letter)) + ++n; + std::pair<index_entry_set::const_iterator, index_entry_set::const_iterator> range(m, n); + item->elements.push_back(generate_entry(range, category)); + if(item->elements.size() && (*item->elements.begin())->elements.size()) + { + vlist->elements.push_back(entry); + boost::tiny_xml::element_ptr p = make_element(""); + p->content = " "; + if(navbar->elements.size()) + { + navbar->elements.push_back(p); + } + p = add_attribute(make_element("link"), "linkend", id_name); + p->content = current_letter; + navbar->elements.push_back(p); + } + m = n; + } + + node->name = internal_index_type; + boost::tiny_xml::element_ptr p(node->parent); + while(p->name.empty()) + p = boost::tiny_xml::element_ptr(p->parent); + check_index_type_and_placement(p->name, node->name); + node->attributes.clear(); + if(!has_title) + { + boost::tiny_xml::element_ptr t = make_element("title"); + t->content = "Index"; + node->elements.push_front(t); + } + } +} + diff --git a/src/boost/tools/auto_index/src/tiny_xml.cpp b/src/boost/tools/auto_index/src/tiny_xml.cpp new file mode 100644 index 000000000..81b3b26d9 --- /dev/null +++ b/src/boost/tools/auto_index/src/tiny_xml.cpp @@ -0,0 +1,257 @@ +// tiny XML sub-set tools implementation -----------------------------------// + +// (C) Copyright Beman Dawes 2002. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "tiny_xml.hpp" +#include <cassert> +#include <cstring> + +namespace +{ + + inline void eat_whitespace( char & c, std::istream & in ) + { + while ( c == ' ' || c == '\r' || c == '\n' || c == '\t' ) + in.get( c ); + } + + void eat_comment( char & c, std::istream & in ) + { + in.get(c); + if(c != '-') + throw std::string("Invalid comment in XML"); + in.get(c); + if(c != '-') + throw std::string("Invalid comment in XML"); + do{ + while(in.get(c) && (c != '-')); + in.get(c); + if(c != '-') + continue; + in.get(c); + if(c != '>') + continue; + else + break; + } + while(true); + } + + std::string get_name( char & c, std::istream & in ) + { + std::string result; + eat_whitespace( c, in ); + while ( std::strchr( + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.:", c ) + != 0 ) + { + result += c; + if(!in.get( c )) + throw std::string("xml: unexpected eof"); + } + return result; + } + + void eat_delim( char & c, std::istream & in, + char delim, const std::string & msg ) + { + eat_whitespace( c, in ); + if ( c != delim ) + throw std::string("xml syntax error, expected ") + delim + + " (" + msg + ")"; + in.get( c ); + } + + std::string get_value( char & c, std::istream & in ) + { + std::string result; + while ( c != '\"' ) + { + result += c; + in.get( c ); + } + in.get( c ); + return result; + } + +} + +namespace boost +{ + namespace tiny_xml + { + + // parse -----------------------------------------------------------------// + + element_ptr parse( std::istream & in, const std::string & msg ) + { + char c = 0; // current character + element_ptr e( new element ); + + if(!in.get( c )) + throw std::string("xml: unexpected eof"); + if ( c == '<' ) + if(!in.get( c )) + throw std::string("xml: unexpected eof"); + + if(c == '!') + { + eat_comment(c, in); + return e; + } + if(c == '?') + { + // XML processing instruction. + e->name += c; + if(!in.get( c )) // next char + throw std::string("xml: unexpected eof"); + e->name += get_name(c, in); + in >> std::ws; + if(!in.get( c )) // next char + throw std::string("xml: unexpected eof"); + while(c != '?') + { + e->content += c; + if(!in.get( c )) // next char + throw std::string("xml: unexpected eof"); + } + if(!in.get( c )) // next char + throw std::string("xml: unexpected eof"); + if(c != '>') + throw std::string("Invalid XML processing instruction."); + return e; + } + + e->name = get_name( c, in ); + eat_whitespace( c, in ); + + // attributes + while ( (c != '>') && (c != '/') ) + { + attribute a; + a.name = get_name( c, in ); + + eat_delim( c, in, '=', msg ); + eat_delim( c, in, '\"', msg ); + + a.value = get_value( c, in ); + + e->attributes.push_back( a ); + eat_whitespace( c, in ); + } + if(c == '/') + { + if(!in.get( c )) // next after '/' + throw std::string("xml: unexpected eof"); + eat_whitespace( c, in ); + if(c != '>') + throw std::string("xml: unexpected /"); + return e; + } + if(!in.get( c )) // next after '>' + throw std::string("xml: unexpected eof"); + + //eat_whitespace( c, in ); + + do{ + // sub-elements + while ( c == '<' ) + { + if ( in.peek() == '/' ) + break; + element_ptr child(parse( in, msg )); + child->parent = e; + e->elements.push_back(child); + in.get( c ); // next after '>' + //eat_whitespace( c, in ); + } + if (( in.peek() == '/' ) && (c == '<')) + break; + + // content + if ( (c != '<') ) + { + element_ptr sub( new element ); + while ( c != '<' ) + { + sub->content += c; + if(!in.get( c )) + throw std::string("xml: unexpected eof"); + } + sub->parent = e; + e->elements.push_back( sub ); + } + + assert( c == '<' ); + if( in.peek() == '/' ) + break; + }while(true); + + in.get(c); + eat_delim( c, in, '/', msg ); + std::string end_name( get_name( c, in ) ); + if ( e->name != end_name ) + throw std::string("xml syntax error: beginning name ") + + e->name + " did not match end name " + end_name + + " (" + msg + ")"; + + eat_delim( c, in, '>', msg ); + if(c != '>') + { + // we've eaten one character past the >, put it back: + if(!in.putback(c)) + throw std::string("Unable to put back character"); + } + return e; + } + + // write ---------------------------------------------------------------// + + void write( const element & e, std::ostream & out ) + { + if(e.name.size()) + { + out << "<" << e.name; + if ( !e.attributes.empty() ) + { + for( attribute_list::const_iterator itr = e.attributes.begin(); + itr != e.attributes.end(); ++itr ) + { + out << " " << itr->name << "=\"" << itr->value << "\""; + } + } + if(e.name[0] == '?') + { + out << " " << e.content << "?>"; + return; + } + if(e.elements.empty() && e.content.empty()) + { + out << "/>"; + return; + } + out << ">"; + } + if ( !e.elements.empty() ) + { + for( element_list::const_iterator itr = e.elements.begin(); + itr != e.elements.end(); ++itr ) + { + write( **itr, out ); + } + } + if ( !e.content.empty() ) + { + out << e.content; + } + if(e.name.size() && (e.name[0] != '?')) + { + out << "</" << e.name << ">"; + } + } + + } // namespace tiny_xml +} // namespace boost + diff --git a/src/boost/tools/auto_index/src/tiny_xml.hpp b/src/boost/tools/auto_index/src/tiny_xml.hpp new file mode 100644 index 000000000..5ecbd4ce2 --- /dev/null +++ b/src/boost/tools/auto_index/src/tiny_xml.hpp @@ -0,0 +1,83 @@ +// tiny XML sub-set tools --------------------------------------------------// + +// (C) Copyright Beman Dawes 2002. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Provides self-contained tools for this XML sub-set: +// +// element ::= { "<" name { name "=" "\"" value "\"" } ">" +// {element} [contents] "</" name ">" } +// +// The point of "self-contained" is to minimize tool-chain dependencies. + +#ifndef BOOST_TINY_XML_H +#define BOOST_TINY_XML_H + +#include "boost/smart_ptr.hpp" // for shared_ptr +#include "boost/utility.hpp" // for noncopyable +#include <list> +#include <iostream> +#include <string> + +namespace boost +{ + namespace tiny_xml + { + class element; + struct attribute + { + std::string name; + std::string value; + + attribute(){} + attribute( const std::string & name, const std::string & value ) + : name(name), value(value) {} + }; + typedef boost::shared_ptr< element > element_ptr; + typedef boost::weak_ptr< element > weak_element_ptr; + typedef std::list< element_ptr > element_list; + typedef std::list< attribute > attribute_list; + + class element + : private boost::noncopyable // because deep copy semantics would be required + { + public: + // The name of the XML element, or "" if this is inline content, + // or begins with '?' if this is a processing instruction. + std::string name; + // List of attributes applied to this element + attribute_list attributes; + // List of sub-elements, this will be empty if the name is empty + // or starts with a '?'. Plain text content will be inside + // anonymous elements in this list - this preserves the order of + // plain text mixed with true XML <elements>. + element_list elements; + // The plain text content of this element, only present if the name is "" + // or if this is a processing instruction in which case it is the content + // after the name of the instruction. + std::string content; + // Pointer to our parent + weak_element_ptr parent; + + element() {} + explicit element( const std::string & name ) : name(name) {} + }; + + // Precondition: stream positioned at either the initial "<" + // or the first character after the initial "<". + // Postcondition: stream positioned at the first character after final + // ">" (or eof). + // Returns: an element_ptr to an element representing the parsed stream. + // Throws: std::string on syntax error. msg appended to what() string. + element_ptr parse( std::istream & in, const std::string & msg ); + + void write( const element & e, std::ostream & out ); + + } +} + +#endif // BOOST_TINY_XML_H + + + diff --git a/src/boost/tools/auto_index/test/Jamfile.v2 b/src/boost/tools/auto_index/test/Jamfile.v2 new file mode 100644 index 000000000..4b1e60b56 --- /dev/null +++ b/src/boost/tools/auto_index/test/Jamfile.v2 @@ -0,0 +1,62 @@ + +import feature ; +import generators ; +import modules ; +import project ; +import targets ; +import testing ; +import toolset ; +import type ; + +alias line_compare_tool : ../../quickbook/test/src//line-compare-tool ; + +rule auto-index-test ( target-name : input-file : output-file ? : options * ) +{ + local project = [ project.current ] ; + + local t = + [ targets.create-typed-target RUN + : $(project) + : $(target-name) + : [ alias autoindex : ../build//auto_index : release ] + : $(requirements) + <location-prefix>$(target-name).test + <testing.arg>--prefix=../../.. + <testing.arg>$(options) + <testing.arg>--in=$(input-file) + <testing.arg>--out=$(target-name).out + <preserve-test-targets>on + <dependency>Jamfile.v2 + <dependency>$(input-file) + ] + ; + + t += + [ targets.create-typed-target RUN + : $(project) + : $(target-name)_check + : .//line_compare_tool + : $(requirements) + <location-prefix>$(target-name).test + <testing.arg>$(target-name).out + <testing.arg>$(target-name).gold + <preserve-test-targets>on + <dependency>$(target_name) + <implicit-dependency>$(target_name) + <dependency>Jamfile.v2 + <dependency>$(input-file) + ] + ; + + modules.poke testing : .all-tests : \$\(all-tests\) $(t) ; + + return $(t) ; +} + +auto-index-test test1 : type_traits.docbook : : --script=index.idx ; +auto-index-test test2 : type_traits.docbook : : --internal-index --script=index.idx ; +auto-index-test test3 : type_traits.docbook : : --internal-index --index-type=index --script=index.idx ; + + + + diff --git a/src/boost/tools/auto_index/test/index.idx b/src/boost/tools/auto_index/test/index.idx new file mode 100644 index 000000000..52507c28a --- /dev/null +++ b/src/boost/tools/auto_index/test/index.idx @@ -0,0 +1,26 @@ + +!define-scanner class_name "BOOST_TT_AUX_TYPE_TRAIT_DEF\d\s*\(\s*(\w+)\s*[,)]" "(?:class|struct)[^;{]+\\<\1\\>[^;{]+\\{" \1 +!define-scanner class_name "BOOST_TT_AUX_BOOL_TRAIT_DEF\d\s*\(\s*(\w+)\s*[,)]" "(?:class|struct)[^;{]+\\<\1\\>[^;{]+\\{" \1 +!define-scanner class_name "BOOST_TT_AUX_SIZE_T_TRAIT_DEF\d\s*\(\s*(\w+)\s*[,)]" "(?:class|struct)[^;{]+\\<\1\\>[^;{]+\\{" \1 + +!define-scanner class_name "^[[:space:]]*(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([[:blank:]]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\{|:[^;\{()]*\{)" "(?:class|struct)[^;{]+\\<\5\\>[^;{]+\\{" \5 +!define-scanner typedef_name "typedef[^;{}#]+?(\w+)\s*;" "typedef[^;]+\\<\1\\>\\s*;" "\1" +!define-scanner "macro_name" "^\s*#\s*define\s+(\w+)" "\\<\1\\>" "\1" +!define-scanner "function_name" "\w+\s+(\w+)\s*\([^\)]*\)\s*[;{]" "\\<\\w+\\>\\s+\\<\1\\>\\s*\\([^;{]*\\)\\s*[;{]" "\1" + +!scan-path boost/type_traits .*\.hpp true +!scan boost/aligned_storage.hpp +!scan boost/type_traits.hpp + +!exclude type arg1_type arg2_type arg3_type arg4_type arg5_type B D +!exclude result + +!rewrite-name "(?:A|An|The)\s+(.*)" "\1" + +"Constrained Index Term" add_const "boost_typetraits\.reference.*" class_name +"This term should not appear anywhere because of the ID constraint" strlen "(?!boost_typetraits.background).*" function_name + + +type-traits "" ".*.intro" test_index_1 +type-traits "" ".*.background" test_index_2 + diff --git a/src/boost/tools/auto_index/test/test1.gold b/src/boost/tools/auto_index/test/test1.gold new file mode 100644 index 000000000..ec051ab96 --- /dev/null +++ b/src/boost/tools/auto_index/test/test1.gold @@ -0,0 +1,6671 @@ +<?xml version="1.0"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<!-- + +This file is based upon the type traits docs, but has had additional XML elements added to it +to ensure complete testing. + +--> + +<chapter xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" id="boost_typetraits" rev:last-revision="$Date: 2008-11-28 12:41:45 +0000 (Fri, 28 Nov 2008) $"> + <chapterinfo><author> + <firstname>various</firstname> <surname>authors</surname> + </author><copyright> + <year>2000</year> <year>2006</year> <holder>Adobe Systems Inc, David Abrahams, + Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat + Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert + Ramey and Jeremy Siek</holder> + </copyright><legalnotice> + <para> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>) + </para> + </legalnotice></chapterinfo> + <title>Boost.TypeTraits + + A printer-friendly PDF + version of this manual is also available. + +
type-traitsIntroductionIntroductiontype-traitstype-traitsIntroductionIntroductiontype-traitstype-traitsIntroductionIntroductiontype-traits + <link linkend="boost_typetraits.intro"> Introduction</link> + + The Boost type-traits library contains a set of very specific traits classes, + each of which encapsulate a single trait from the C++ type system; for example, + is a type a pointer or a reference type? Or does a type have a trivial constructor, + or a const-qualifier? + + + The type-traits classes share a unified design: each class inherits from a + the type true_type + if the type has the specified property and inherits from false_type + otherwise. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. + +
+
type-traitsBackground and TutorialBackground and Tutorialtype-traitstype-traitsBackground and TutorialBackground and Tutorialtype-traitsremove_extentBackground and TutorialBackground and Tutorialremove_extentis_pointerBackground and TutorialBackground and Tutorialis_pointeris_voidBackground and TutorialBackground and Tutorialis_voidtype-traitsBackground and TutorialBackground and Tutorialtype-traitstype-traitsBackground and TutorialBackground and Tutorialtype-traitstype-traitsBackground and TutorialBackground and Tutorialtype-traits + <link linkend="boost_typetraits.background"> Background and Tutorial</link> + + The following is an updated version of the article "C++ Type traits" + by John Maddock and Steve Cleary that appeared in the October 2000 issue of + Dr Dobb's Journal. + + + Generic programming (writing code which works with any data type meeting a + set of requirements) has become the method of choice for providing reusable + code. However, there are times in generic programming when "generic" + just isn't good enough - sometimes the differences between types are too large + for an efficient generic implementation. This is when the traits technique + becomes important - by encapsulating those properties that need to be considered + on a type by type basis inside a traits class, we can minimize the amount of + code that has to differ from one type to another, and maximize the amount of + generic code. + + + + + Foo1 + + Consider an example: when working with character strings, one common operation + is to determine the length of a null terminated string. Clearly it's possible + to write generic code that can do this, but it turns out that there are much + more efficient methods available: for example, the C library functions strlen and wcslen + are usually written in assembler, and with suitable hardware support can be + considerably faster than a generic version written in C++. The authors of the + C++ standard library realized this, and abstracted the properties of char and wchar_t + into the class char_traits. + Generic code that works with character strings can simply use char_traits<>::length to determine the length of a null + terminated string, safe in the knowledge that specializations of char_traits will use the most appropriate + method available to them. + + + + Type Traits + + + Class char_traits is a classic + example of a collection of type specific properties wrapped up in a single + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very + specific traits classes, each of which encapsulate a single trait from the + C++ type system; for example, is a type a pointer or a reference type? Or does + a type have a trivial constructor, or a const-qualifier? The type-traits classes + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type + otherwise. As we will show, these classes can be used in generic programming + to determine the properties of a given type and introduce optimizations that + are appropriate for that case. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. All of the type-traits classes are + defined inside namespace boost; + for brevity, namespace-qualification is omitted in most of the code samples + given. + + + + Implementation + + + There are far too many separate classes contained in the type-traits library + to give a full implementation here - see the source code in the Boost library + for the full details - however, most of the implementation is fairly repetitive + anyway, so here we will just give you a flavor for how some of the classes + are implemented. Beginning with possibly the simplest class in the library, + is_void<T> inherits + from true_type + only if T is void. + + +template <typename T> +struct is_void : public false_type{}; + +template <> +struct is_void<void> : public true_type{}; + + + Here we define a primary version of the template class is_void, + and provide a full-specialization when T + is void. While full specialization + of a template class is an important technique, sometimes we need a solution + that is halfway between a fully generic solution, and a full specialization. + This is exactly the situation for which the standards committee defined partial + template-class specialization. As an example, consider the class boost::is_pointer<T>: + here we needed a primary version that handles all the cases where T is not + a pointer, and a partial specialization to handle all the cases where T is + a pointer: + + +template <typename T> +struct is_pointer : public false_type{}; + +template <typename T> +struct is_pointer<T*> : public true_type{}; + + + The syntax for partial specialization is somewhat arcane and could easily occupy + an article in its own right; like full specialization, in order to write a + partial specialization for a class, you must first declare the primary template. + The partial specialization contains an extra <...> after the class name + that contains the partial specialization parameters; these define the types + that will bind to that partial specialization rather than the default template. + The rules for what can appear in a partial specialization are somewhat convoluted, + but as a rule of thumb if you can legally write two function overloads of the + form: + + +void foo(T); +void foo(U); + + + Then you can also write a partial specialization of the form: + + +template <typename T> +class c{ /*details*/ }; + +template <typename T> +class c<U>{ /*details*/ }; + + + This rule is by no means foolproof, but it is reasonably simple to remember + and close enough to the actual rule to be useful for everyday use. + + + As a more complex example of partial specialization consider the class remove_extent<T>. This + class defines a single typedef-member type + that is the same type as T but with any top-level array bounds removed; this + is an example of a traits class that performs a transformation on a type: + + +template <typename T> +struct remove_extent +{ typedef T type; }; + +template <typename T, std::size_t N> +struct remove_extent<T[N]> +{ typedef T type; }; + + + The aim of remove_extent + is this: imagine a generic algorithm that is passed an array type as a template + parameter, remove_extent + provides a means of determining the underlying type of the array. For example + remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of + template parameters in a partial specialization does not have to match the + number in the default template. However, the number of parameters that appear + after the class name do have to match the number and type of the parameters + in the default template. + + + + Optimized copy + + + As an example of how the type traits classes can be used, consider the standard + library algorithm copy: + + +template<typename Iter1, typename Iter2> +Iter2 copy(Iter1 first, Iter1 last, Iter2 out); + + + Obviously, there's no problem writing a generic version of copy that works + for all iterator types Iter1 + and Iter2; however, there are + some circumstances when the copy operation can best be performed by a call + to memcpy. In order to implement + copy in terms of memcpy all + of the following conditions need to be met: + + + + Both of the iterator types Iter1 + and Iter2 must be pointers. + + + Both Iter1 and Iter2 must point to the same type - excluding + const and volatile-qualifiers. + + + The type pointed to by Iter1 + must have a trivial assignment operator. + + + + By trivial assignment operator we mean that the type is either a scalar type[3] or: + + + + The type has no user defined assignment operator. + + + The type does not have any data members that are references. + + + All base classes, and all data member objects must have trivial assignment + operators. + + + + If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated + assignment operator. The type-traits library provides a class has_trivial_assign, + such that has_trivial_assign<T>::value is true only if T has a trivial assignment + operator. This class "just works" for scalar types, but has to be + explicitly specialised for class/struct types that also happen to have a trivial + assignment operator. In other words if has_trivial_assign + gives the wrong answer, it will give the "safe" wrong answer - that + trivial assignment is not allowable. + + + The code for an optimized version of copy that uses memcpy + where appropriate is given in the + examples. The code begins by defining a template function do_copy that performs a "slow but safe" + copy. The last parameter passed to this function may be either a true_type + or a false_type. + Following that there is an overload of docopy that + uses `memcpy`: this time the iterators are required to actually be pointers + to the same type, and the final parameter must be a `_true_type. Finally, the version + of copy calls + docopy`, passing `_has_trivial_assign<value_type>()` + as the final parameter: this will dispatch to the optimized version where appropriate, + otherwise it will call the "slow but safe version". + + + + Was it worth it? + + + It has often been repeated in these columns that "premature optimization + is the root of all evil" [4]. + So the question must be asked: was our optimization premature? To put this + in perspective the timings for our version of copy compared a conventional + generic copy[5] are shown in table + 1. + + + Clearly the optimization makes a difference in this case; but, to be fair, + the timings are loaded to exclude cache miss effects - without this accurate + comparison between algorithms becomes difficult. However, perhaps we can add + a couple of caveats to the premature optimization rule: + + + + If you use the right algorithm for the job in the first place then optimization + will not be required; in some cases, memcpy is the right algorithm. + + + If a component is going to be reused in many places by many people then optimizations + may well be worthwhile where they would not be so for a single case - in + other words, the likelihood that the optimization will be absolutely necessary + somewhere, sometime is that much higher. Just as importantly the perceived + value of the stock implementation will be higher: there is no point standardizing + an algorithm if users reject it on the grounds that there are better, more + heavily optimized versions available. + + + Time taken to copy 1000 elements using `copy<const + T*, T*>` (times in micro-seconds) + + + + + + Version + + + + T + + + + Time + + + + + + + + + "Optimized" copy + + + + char + + + + 0.99 + + + + + + + Conventional copy + + + + char + + + + 8.07 + + + + + + + "Optimized" copy + + + + int + + + + 2.52 + + + + + + + Conventional copy + + + + int + + + + 8.02 + + + + + +
+ + Pair of References + + + The optimized copy example shows how type traits may be used to perform optimization + decisions at compile-time. Another important usage of type traits is to allow + code to compile that otherwise would not do so unless excessive partial specialization + is used. This is possible by delegating partial specialization to the type + traits classes. Our example for this form of usage is a pair that can hold + references [6]. + + + First, let us examine the definition of std::pair, omitting + the comparison operators, default constructor, and template copy constructor + for simplicity: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(const T1 & nfirst, const T2 & nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Now, this "pair" cannot hold references as it currently stands, because + the constructor would require taking a reference to a reference, which is currently + illegal [7]. Let us consider what + the constructor's parameters would have to be in order to allow "pair" + to hold non-reference types, references, and constant references: + + Required Constructor Argument Types + + + + + + Type of T1 + + + + Type of parameter to initializing constructor + + + + + + + + + T + + + + const T & + + + + + + + T & + + + + T & + + + + + + + const T & + + + + const T & + + + + + +
+ + A little familiarity with the type traits classes allows us to construct a + single mapping that allows us to determine the type of parameter from the type + of the contained class. The type traits classes provide a transformation add_reference, which + adds a reference to its type, unless it is already a reference. + + Using add_reference to synthesize the correct constructor + type + + + + + + Type of T1 + + + + Type of const T1 + + + + Type of add_reference<const T1>::type + + + + + + + + + T + + + + const T + + + + const T & + + + + + + + T & + + + + T & [8] + + + + T & + + + + + + + const T & + + + + const T & + + + + const T & + + + + + +
+ + This allows us to build a primary template definition for pair + that can contain non-reference types, reference types, and constant reference + types: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(boost::add_reference<const T1>::type nfirst, + boost::add_reference<const T2>::type nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Add back in the standard comparison operators, default constructor, and template + copy constructor (which are all the same), and you have a std::pair that + can hold reference types! + + + This same extension could have been done using partial template specialization + of pair, but to specialize + pair in this way would require + three partial specializations, plus the primary template. Type traits allows + us to define a single primary template that adjusts itself auto-magically to + any of these partial specializations, instead of a brute-force partial specialization + approach. Using type traits in this fashion allows programmers to delegate + partial specialization to the type traits classes, resulting in code that is + easier to maintain and easier to understand. + + + + Conclusion + + + We hope that in this article we have been able to give you some idea of what + type-traits are all about. A more complete listing of the available classes + are in the boost documentation, along with further examples using type traits. + Templates have enabled C++ uses to take the advantage of the code reuse that + generic programming brings; hopefully this article has shown that generic programming + does not have to sink to the lowest common denominator, and that templates + can be optimal as well as generic. + + + + Acknowledgements + + + The authors would like to thank Beman Dawes and Howard Hinnant for their helpful + comments when preparing this article. + + + + References + + + + Nathan C. Myers, C++ Report, June 1995. + + + The type traits library is based upon contributions by Steve Cleary, Beman + Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org. + + + A scalar type is an arithmetic type (i.e. a built-in integer or floating + point type), an enumeration type, a pointer, a pointer to member, or a const- + or volatile-qualified version of one of these types. + + + This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg + 268. + + + The test code is available as part of the boost utility library (see algo_opt_examples.cpp), + the code was compiled with gcc 2.95 with all optimisations turned on, tests + were conducted on a 400MHz Pentium II machine running Microsoft Windows 98. + + + John Maddock and Howard Hinnant have submitted a "compressed_pair" + library to Boost, which uses a technique similar to the one described here + to hold references. Their pair also uses type traits to determine if any + of the types are empty, and will derive instead of contain to conserve space + -- hence the name "compressed". + + + This is actually an issue with the C++ Core Language Working Group (issue + #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow + a "reference to a reference to T" to mean the same thing as a "reference + to T", but only in template instantiation, in a method similar to multiple + cv-qualifiers. + + + For those of you who are wondering why this shouldn't be const-qualified, + remember that references are always implicitly constant (for example, you + can't re-assign a reference). Remember also that "const T &" + is something completely different. For this reason, cv-qualifiers on template + type arguments that are references are ignored. + + +
+
+ <link linkend="boost_typetraits.category"> Type Traits by Category</link> +
+ <link linkend="boost_typetraits.category.value_traits"> Type Traits + that Describe the Properties of a Type</link> + + + Foo2 + Bar2 + + These traits are all value traits, which is to say the + traits classes all inherit from integral_constant, + and are used to access some numerical property of a type. Often this is a + simple true or false Boolean value, but in a few cases may be some other + integer value (for example when dealing with type alignments, or array bounds: + see alignment_of, + rank + and extent). + +
+ <link linkend="boost_typetraits.category.value_traits.primary"> Categorizing + a Type</link> + + These traits identify what "kind" of type some type T is. These are split into two groups: + primary traits which are all mutually exclusive, and composite traits that + are compositions of one or more primary traits. + + + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, + in other words these traits are mutually exclusive. + + + This means that is_integral<T>::value + and is_floating_point<T>::value + will only ever be true for built-in types; if you want to check for a user-defined + class type that behaves "as if" it is an integral or floating + point type, then use the std::numeric_limits + template instead. + + + Synopsis: + + +template <class T> +struct is_array; + +template <class T> +struct is_class; + +template <class T> +struct is_complex; + +template <class T> +struct is_enum; + +template <class T> +struct is_floating_point; + +template <class T> +struct is_function; + +template <class T> +struct is_integral; + +template <class T> +struct is_member_function_pointer; + +template <class T> +struct is_member_object_pointer; + +template <class T> +struct is_pointer; + +template <class T> +struct is_reference; + +template <class T> +struct is_union; + +template <class T> +struct is_void; + + + The following traits are made up of the union of one or more type categorizations. + A type may belong to more than one of these categories, in addition to + one of the primary categories. + + +template <class T> +struct is_arithmetic; + +template <class T> +struct is_compound; + +template <class T> +struct is_fundamental; + +template <class T> +struct is_member_pointer; + +template <class T> +struct is_object; + +template <class T> +struct is_scalar; + +
+
+ <link linkend="boost_typetraits.category.value_traits.properties"> + General Type Properties</link> + + The following templates describe the general properties of a type. + + + Synopsis: + + +template <class T> +struct alignment_of; + +template <class T> +struct has_nothrow_assign; + +template <class T> +struct has_nothrow_constructor; + +template <class T> +struct has_nothrow_default_constructor; + +template <class T> +struct has_nothrow_copy; + +template <class T> +struct has_nothrow_copy_constructor; + +template <class T> +struct has_trivial_assign; + +template <class T> +struct has_trivial_constructor; + +template <class T> +struct has_trivial_default_constructor; + +template <class T> +struct has_trivial_copy; + +template <class T> +struct has_trivial_copy_constructor; + +template <class T> +struct has_trivial_destructor; + +template <class T> +struct has_virtual_destructor; + +template <class T> +struct is_abstract; + +template <class T> +struct is_const; + +template <class T> +struct is_empty; + +template <class T> +struct is_stateless; + +template <class T> +struct is_pod; + +template <class T> +struct is_polymorphic; + +template <class T> +struct is_signed; + +template <class T> +struct is_unsigned; + +template <class T> +struct is_volatile; + +template <class T, std::size_t N = 0> +struct extent; + +template <class T> +struct rank; + +
+
+ <link linkend="boost_typetraits.category.value_traits.relate"> Relationships + Between Two Types</link> + + These templates determine the whether there is a relationship between two + types: + + + Synopsis: + + +template <class Base, class Derived> +struct is_base_of; + +template <class From, class To> +struct is_convertible; + +template <class T, class U> +struct is_same; + +
+
+
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONType Traits that Transform One Type to AnotherType Traits that Transform One Type to AnotherBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONType Traits that Transform One Type to AnotherType Traits that Transform One Type to AnotherBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION + <link linkend="boost_typetraits.category.transform"> Type Traits that + Transform One Type to Another</link> + + The following templates transform one type to another, based upon some well-defined + rule. Each template has a single member called type + that is the result of applying the transformation to the template argument + T. + + + Synopsis: + + +template <class T> +struct add_const; + +template <class T> +struct add_cv; + +template <class T> +struct add_pointer; + +template <class T> +struct add_reference; + +template <class T> +struct add_volatile; + +template <class T> +struct decay; + +template <class T> +struct floating_point_promotion; + +template <class T> +struct integral_promotion; + +template <class T> +struct make_signed; + +template <class T> +struct make_unsigned; + +template <class T> +struct promote; + +template <class T> +struct remove_all_extents; + +template <class T> +struct remove_const; + +template <class T> +struct remove_cv; + +template <class T> +struct remove_extent; + +template <class T> +struct remove_pointer; + +template <class T> +struct remove_reference; + +template <class T> +struct remove_volatile; + + + + Broken + Compiler Workarounds: + + + For all of these templates support for partial specialization of class templates + is required to correctly implement the transformation. On the other hand, + practice shows that many of the templates from this category are very useful, + and often essential for implementing some generic libraries. Lack of these + templates is often one of the major limiting factors in porting those libraries + to compilers that do not yet support this language feature. As some of these + compilers are going to be around for a while, and at least one of them is + very wide-spread, it was decided that the library should provide workarounds + where possible. + + + The basic idea behind the workaround is to manually define full specializations + of all type transformation templates for all fundamental types, and all their + 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide + a user-level macro that will define all the explicit specializations needed + for any user-defined type T. + + + The first part guarantees the successful compilation of something like this: + + +BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char*, remove_reference<char*&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const*, remove_reference<char const*&>::type>::value)); +... +BOOST_STATIC_ASSERT((is_same<char const volatile* const volatile* const volatile, remove_reference<char const volatile* const volatile* const volatile&>::type>::value)); + + + and the second part provides the library's users with a mechanism to make + the above code work not only for char, + int or other built-in type, + but for their own types as well: + + +namespace myspace{ + struct MyClass {}; +} +// declare this at global scope: +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass) +// transformations on myspace::MyClass now work: +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_const<myspace::MyClass const>::type>::value)); +// etc. + + + Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates + to nothing on those compilers that do support + partial specialization. + +
+
+ <link linkend="boost_typetraits.category.alignment"> Synthesizing Types + with Specific Alignments</link> + + Some low level memory management routines need to synthesize a POD type with + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage + creates a type with a specific size and alignment. + + + Synopsis + + +template <std::size_t Align> +struct type_with_alignment; + +template <std::size_t Size, std::size_t Align> +struct aligned_storage; + +
+
+ <link linkend="boost_typetraits.category.function"> Decomposing Function + Types</link> + + The class template function_traits + extracts information from function types (see also is_function). + This traits class allows you to tell how many arguments a function takes, + what those argument types are, and what the return type is. + + + Synopsis + + +template <std::size_t Align> +struct function_traits; + +
+
+
is_unionUser Defined SpecializationsUser Defined Specializationsis_unionis_classUser Defined SpecializationsUser Defined Specializationsis_class + <link linkend="boost_typetraits.user_defined"> User Defined Specializations</link> + + Occationally the end user may need to provide their own specialization for + one of the type traits - typically where intrinsic compiler support is required + to implement a specific trait fully. These specializations should derive from + boost::true_type + or boost::false_type + as appropriate: + + +#include <boost/type_traits/is_pod.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_union.hpp> + +struct my_pod{}; +struct my_union +{ + char c; + int i; +}; + +namespace boost +{ + template<> + struct is_pod<my_pod> : public true_type{}; + + template<> + struct is_pod<my_union> : public true_type{}; + + template<> + struct is_union<my_union> : public true_type{}; + + template<> + struct is_class<my_union> : public false_type{}; +} + +
+
BOOST_IS_UNIONSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_UNIONBOOST_IS_POLYMORPHICSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_POLYMORPHICBOOST_IS_PODSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_PODBOOST_IS_ENUMSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_ENUMBOOST_IS_EMPTYSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_EMPTYBOOST_IS_CONVERTIBLESupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_CONVERTIBLEBOOST_IS_CLASSSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_CLASSBOOST_IS_BASE_OFSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_BASE_OFBOOST_IS_ABSTRACTSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_IS_ABSTRACTBOOST_HAS_VIRTUAL_DESTRUCTORSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_VIRTUAL_DESTRUCTORBOOST_HAS_TRIVIAL_DESTRUCTORSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_DESTRUCTORBOOST_HAS_TRIVIAL_COPYSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_COPYBOOST_HAS_TRIVIAL_CONSTRUCTORSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_CONSTRUCTORBOOST_HAS_TRIVIAL_ASSIGNSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_ASSIGNBOOST_HAS_NOTHROW_COPYSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_COPYBOOST_HAS_NOTHROW_CONSTRUCTORSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_CONSTRUCTORBOOST_HAS_NOTHROW_ASSIGNSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_ASSIGNBOOST_ALIGNMENT_OFSupport for Compiler IntrinsicsSupport for Compiler IntrinsicsBOOST_ALIGNMENT_OF + <link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link> + + There are some traits that can not be implemented within the current C++ language: + to make these traits "just work" with user defined types, some kind + of additional help from the compiler is required. Currently (April 2008) Visual + C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other + compilers will no doubt follow in due course. + + + The Following traits classes always need compiler support to do the right thing + for all types (but all have safe fallback positions if this support is unavailable): + + + + is_union + + + is_pod + + + has_trivial_constructor + + + has_trivial_copy + + + has_trivial_assign + + + has_trivial_destructor + + + has_nothrow_constructor + + + has_nothrow_copy + + + has_nothrow_assign + + + has_virtual_destructor + + + + The following traits classes can't be portably implemented in the C++ language, + although in practice, the implementations do in fact do the right thing on + all the compilers we know about: + + + + is_empty + + + is_polymorphic + + + + The following traits classes are dependent on one or more of the above: + + + + is_class + + + is_stateless + + + + The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, + adding support for new compilers is simply a matter of defining one of more + of the following macros: + + Macros for Compiler Intrinsics + + + + + + BOOST_IS_UNION(T) + + + + Should evaluate to true if T is a union type + + + + + + + + + BOOST_IS_POD(T) + + + + Should evaluate to true if T is a POD type + + + + + + + BOOST_IS_EMPTY(T) + + + + Should evaluate to true if T is an empty struct or union + + + + + + + BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) + + + + Should evaluate to true if the default constructor for T is trivial (i.e. + has no effect) + + + + + + + BOOST_HAS_TRIVIAL_COPY(T) + + + + Should evaluate to true if T has a trivial copy constructor (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_ASSIGN(T) + + + + Should evaluate to true if T has a trivial assignment operator (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_DESTRUCTOR(T) + + + + Should evaluate to true if T has a trivial destructor (i.e. ~T() has + no effect) + + + + + + + BOOST_HAS_NOTHROW_CONSTRUCTOR(T) + + + + Should evaluate to true if T + x; + can not throw + + + + + + + BOOST_HAS_NOTHROW_COPY(T) + + + + Should evaluate to true if T(t) can not throw + + + + + + + BOOST_HAS_NOTHROW_ASSIGN(T) + + + + Should evaluate to true if T + t, + u; + t = + u can not throw + + + + + + + BOOST_HAS_VIRTUAL_DESTRUCTOR(T) + + + + Should evaluate to true T has a virtual destructor + + + + + + + BOOST_IS_ABSTRACT(T) + + + + Should evaluate to true if T is an abstract type + + + + + + + BOOST_IS_BASE_OF(T,U) + + + + Should evaluate to true if T is a base class of U + + + + + + + BOOST_IS_CLASS(T) + + + + Should evaluate to true if T is a class type + + + + + + + BOOST_IS_CONVERTIBLE(T,U) + + + + Should evaluate to true if T is convertible to U + + + + + + + BOOST_IS_ENUM(T) + + + + Should evaluate to true is T is an enum + + + + + + + BOOST_IS_POLYMORPHIC(T) + + + + Should evaluate to true if T is a polymorphic type + + + + + + + BOOST_ALIGNMENT_OF(T) + + + + Should evaluate to the alignment requirements of type T. + + + + + +
+
+
+ <link linkend="boost_typetraits.mpl"> MPL Interoperability</link> + + All the value based traits in this library conform to MPL's requirements for + an Integral + Constant type: that includes a number of rather intrusive workarounds + for broken compilers. + + + Purely as an implementation detail, this means that true_type + inherits from boost::mpl::true_, + false_type + inherits from boost::mpl::false_, + and integral_constant<T, + v> + inherits from boost::mpl::integral_c<T,v> + (provided T is not bool) + +
+
+ <link linkend="boost_typetraits.examples"> Examples</link> +
value_typeAn Optimized Version of std::copyOptimized Version of std::copyvalue_type + <link linkend="boost_typetraits.examples.copy"> An Optimized Version + of std::copy</link> + + Demonstrates a version of std::copy + that uses has_trivial_assign + to determine whether to use memcpy + to optimise the copy operation (see copy_example.cpp): + + +// +// opt::copy +// same semantics as std::copy +// calls memcpy where appropriate. +// + +namespace detail{ + +template<typename I1, typename I2, bool b> +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *out = *first; + ++out; + ++first; + } + return out; +} + +template<typename T> +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +{ + memcpy(out, first, (last-first)*sizeof(T)); + return out+(last-first); +} + + +} + +template<typename I1, typename I2> +inline I2 copy(I1 first, I1 last, I2 out) +{ + // + // We can copy with memcpy if T has a trivial assignment operator, + // and if the iterator arguments are actually pointers (this last + // requirement we detect with overload resolution): + // + typedef typename std::iterator_traits<I1>::value_type value_type; + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); +} + +
+
+ <link linkend="boost_typetraits.examples.fill"> An Optimised Version + of std::fill</link> + + Demonstrates a version of std::fill + that uses has_trivial_assign + to determine whether to use memset + to optimise the fill operation (see fill_example.cpp): + + +// +// fill +// same as std::fill, but uses memset where appropriate +// +namespace detail{ + +template <typename I, typename T, bool b> +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *first = val; + ++first; + } +} + +template <typename T> +void do_fill(T* first, T* last, const T& val, const boost::true_type&) +{ + std::memset(first, val, last-first); +} + +} + +template <class I, class T> +inline void fill(I first, I last, const T& val) +{ + // + // We can do an optimised fill if T has a trivial assignment + // operator and if it's size is one: + // + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + detail::do_fill(first, last, val, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.destruct"> An Example that + Omits Destructor Calls For Types with Trivial Destructors</link> + + Demonstrates a simple algorithm that uses __has_trivial_destruct + to determine whether to destructors need to be called (see trivial_destructor_example.cpp): + + +// +// algorithm destroy_array: +// The reverse of std::unitialized_copy, takes a block of +// initialized memory and calls destructors on all objects therein. +// + +namespace detail{ + +template <class T> +void do_destroy_array(T* first, T* last, const boost::false_type&) +{ + while(first != last) + { + first->~T(); + ++first; + } +} + +template <class T> +inline void do_destroy_array(T* first, T* last, const boost::true_type&) +{ +} + +} // namespace detail + +template <class T> +inline void destroy_array(T* p1, T* p2) +{ + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); +} + +
+
+ <link linkend="boost_typetraits.examples.iter"> An improved Version + of std::iter_swap</link> + + Demonstrates a version of std::iter_swap + that use type traits to determine whether an it's arguments are proxying + iterators or not, if they're not then it just does a std::swap + of it's dereferenced arguments (the same as std::iter_swap + does), however if they are proxying iterators then takes special care over + the swap to ensure that the algorithm works correctly for both proxying iterators, + and even iterators of different types (see iter_swap_example.cpp): + + +// +// iter_swap: +// tests whether iterator is a proxying iterator or not, and +// uses optimal form accordingly: +// +namespace detail{ + +template <typename I> +static void do_swap(I one, I two, const boost::false_type&) +{ + typedef typename std::iterator_traits<I>::value_type v_t; + v_t v = *one; + *one = *two; + *two = v; +} +template <typename I> +static void do_swap(I one, I two, const boost::true_type&) +{ + using std::swap; + swap(*one, *two); +} + +} + +template <typename I1, typename I2> +inline void iter_swap(I1 one, I2 two) +{ + // + // See is both arguments are non-proxying iterators, + // and if both iterator the same type: + // + typedef typename std::iterator_traits<I1>::reference r1_t; + typedef typename std::iterator_traits<I2>::reference r2_t; + + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; + + detail::do_swap(one, two, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.to_double"> Convert Numeric + Types and Enums to double</link> + + Demonstrates a conversion of Numeric + Types and enum types to double: + + +template<class T> +inline double to_double(T const& value) +{ + typedef typename boost::promote<T>::type promoted; + return boost::numeric::converter<double,promoted>::convert(value); +} + +
+
+
+ <link linkend="boost_typetraits.reference"> Alphabetical Reference</link> +
Constrained Index Termadd_constadd_constConstrained Index TermConstrained Index Termadd_constadd_constConstrained Index Termadd_constadd_constConstrained Index Termadd_constadd_constConstrained Index TermConstrained Index Termadd_constadd_constConstrained Index Term + <link linkend="boost_typetraits.reference.add_const"> add_const</link> + + one + two + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + type: The same type as T + const for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_const<int>::type + + + + int const + + + + + + + add_const<int&>::type + + + + int& + + + + + + + add_const<int*>::type + + + + int* + const + + + + + + + add_const<int const>::type + + + + int const + + + + + +
+
+
add_cvadd_cv + <link linkend="boost_typetraits.reference.add_cv"> add_cv</link> + + one + two + three + + + template <class T> +struct add_cv +{ + typedef see-below type; +}; + + + type: The same type as T + const volatile + for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_cv<int>::type + + + + int const + volatile + + + + + + + add_cv<int&>::type + + + + int& + + + + + + + add_cv<int*>::type + + + + int* + const volatile + + + + + + + add_cv<int const>::type + + + + int const + volatile + + + + + +
+
+
add_pointeradd_pointer + <link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link> + +template <class T> +struct add_pointer +{ + typedef see-below type; +}; + + + type: The same type as remove_reference<T>::type*. + + + The rationale for this template is that it produces the same type as TYPEOF(&t), where + t is an object of type T. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_pointer<int>::type + + + + int* + + + + + + + add_pointer<int const&>::type + + + + int const* + + + + + + + add_pointer<int*>::type + + + + int** + + + + + + + add_pointer<int*&>::type + + + + int** + + + + + +
+
+
add_referenceadd_reference + <link linkend="boost_typetraits.reference.add_reference"> add_reference</link> + +template <class T> +struct add_reference +{ + typedef see-below type; +}; + + + type: If T + is not a reference type then T&, otherwise T. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_reference<int>::type + + + + int& + + + + + + + add_reference<int const&>::type + + + + int const& + + + + + + + add_reference<int*>::type + + + + int*& + + + + + + + add_reference<int*&>::type + + + + int*& + + + + + +
+
+
add_volatileadd_volatile + <link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link> + + one + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + + + type: The same type as T + volatile for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_volatile<int>::type + + + + int volatile + + + + + + + add_volatile<int&>::type + + + + int& + + + + + + + add_volatile<int*>::type + + + + int* + volatile + + + + + + + add_volatile<int const>::type + + + + int const + volatile + + + + + +
+
+
aligned_storagealigned_storage + <link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link> + +template <std::size_t Size, std::size_t Align> +struct aligned_storage +{ + typedef see-below type; +}; + + + type: a built-in or POD type with size + Size and an alignment that + is a multiple of Align. + + + Header: #include + <boost/type_traits/aligned_storage.hpp> + or #include <boost/type_traits.hpp> + +
+
integral_constantalignment_ofalignment_ofintegral_constantalignment_ofalignment_of + <link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link> + +template <class T> +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {}; + + + Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, + ALIGNOF(T)>, where + ALIGNOF(T)` is the alignment of type T. + + + Note: strictly speaking you should only rely on the value of ALIGNOF(T) being + a multiple of the true alignment of T, although in practice it does compute + the correct value in all the cases we know about. + + + Header: #include + <boost/type_traits/alignment_of.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + alignment_of<int> + inherits from integral_constant<std::size_t, ALIGNOF(int)>. + + +
+
+ + + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + + +
+
+ + + alignment_of<double>::value is an integral constant expression + with value ALIGNOF(double). + + +
+
+ + + alignment_of<T>::value_type is the type std::size_t. + + +
+
+
decaydecay + <link linkend="boost_typetraits.reference.decay"> decay</link> + +template <class T> +struct decay +{ + typedef see-below type; +}; + + + type: Let U + be the result of remove_reference<T>::type, then if U + is an array type, the result is remove_extent<U>*, + otherwise if U is a function + type then the result is U*, otherwise the result is U. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/decay.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + decay<int[2][3]>::type + + + + int[2]* + + + + + + + decay<int(&)[2]>::type + + + + int* + + + + + + + decay<int(&)(double)>::type + + + + int(*)(double) + + + + + + + int(*)(double + + + + int(*)(double) + + + + + + + int(double) + + + + int(*)(double) + + + + + +
+
+
integral_constantextentextentintegral_constantextentextent + <link linkend="boost_typetraits.reference.extent"> extent</link> + +template <class T, std::size_t N = 0> +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {}; + + + Inherits: Class template extent inherits + from integral_constant<std::size_t, EXTENT(T,N)>, + where EXTENT(T,N) is the number of elements in the N'th array + dimention of type T. + + + If T is not an array type, + or if N > + rank<T>::value, or if the N'th array bound is incomplete, + then EXTENT(T,N) is zero. + + + Header: #include + <boost/type_traits/extent.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + extent<int[1]> inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + extent<double[2][3][4], + 1>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + extent<int[4]>::value + is an integral constant expression that evaluates to 4. + + +
+
+ + + extent<int[][2]>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<int[][2], 1>::value + is an integral constant expression that evaluates to 2. + + +
+
+ + + extent<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<T>::value_type is the type std::size_t. + + +
+
+
floating_point_promotionfloating_point_promotion + <link linkend="boost_typetraits.reference.floating_point_promotion"> + floating_point_promotion</link> +template <class T> +struct floating_point_promotion +{ + typedef see-below type; +}; + + + type: If floating point promotion can be + applied to an rvalue of type T, + then applies floating point promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.6. + + + Header: #include + <boost/type_traits/floating_point_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + floating_point_promotion<float + const>::type + + + + double const + + + + + + + floating_point_promotion<float&>::type + + + + float& + + + + + + + floating_point_promotion<short>::type + + + + short + + + + + +
+
+
result_typefunction_traitsfunction_traitsresult_typefunction_traitsfunction_traits + <link linkend="boost_typetraits.reference.function_traits"> function_traits</link> + +template <class F> +struct function_traits +{ + static const std::size_t arity = see-below; + typedef see-below result_type; + typedef see-below argN_type; +}; + + + The class template function_traits will only compile if: + + + + The compiler supports partial specialization of class templates. + + + The template argument F + is a function type, note that this is not the same thing as a pointer + to a function. + + + + + function_traits is intended to introspect only C++ functions of the form + R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member + functions. To convert a function pointer type to a suitable type use remove_pointer. + + + Function Traits Members + + + + + + Member + + + + Description + + + + + + + + + function_traits<F>::arity + + + + An integral constant expression that gives the number of arguments + accepted by the function type F. + + + + + + + function_traits<F>::result_type + + + + The type returned by function type F. + + + + + + + function_traits<F>::argN_type + + + + The Nth argument type of function type F, + where 1 <= + N <= + arity of F. + + + + + +
Examples + + + + + + Expression + + + + Result + + + + + + + + + function_traits<void (void)>::arity + + + + An integral constant expression that has the value 0. + + + + + + + function_traits<long (int)>::arity + + + + An integral constant expression that has the value 1. + + + + + + + function_traits<long (int, long, double, void*)>::arity + + + + An integral constant expression that has the value 4. + + + + + + + function_traits<void (void)>::result_type + + + + The type void. + + + + + + + function_traits<long (int)>::result_type + + + + The type long. + + + + + + + function_traits<long (int)>::arg1_type + + + + The type int. + + + + + + + function_traits<long (int, long, double, void*)>::arg4_type + + + + The type void*. + + + + + + + function_traits<long (int, long, double, void*)>::arg5_type + + + + A compiler error: there is no arg5_type + since there are only four arguments. + + + + + + + function_traits<long (*)(void)>::arity + + + + A compiler error: argument type is a function pointer, + and not a function type. + + + + + +
+
+
has_nothrow_assignhas_nothrow_assign + <link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link> + +template <class T> +struct has_nothrow_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_assign + will never report that a class or struct has a non-throwing assignment-operator; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler support to ensure that this trait "just + works". + + + Header: #include + <boost/type_traits/has_nothrow_assign.hpp> + or #include <boost/type_traits.hpp> + +
+
has_nothrow_default_constructorhas_nothrow_constructorhas_nothrow_constructorhas_nothrow_default_constructorhas_nothrow_constructorhas_nothrow_constructor + <link linkend="boost_typetraits.reference.has_nothrow_constructor"> + has_nothrow_constructor</link> +template <class T> +struct has_nothrow_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_constructor + will never report that a class or struct has a non-throwing default-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_constructor.hpp> + or #include <boost/type_traits.hpp> + +
+
has_nothrow_copy_constructorhas_nothrow_copyhas_nothrow_copyhas_nothrow_copy_constructorhas_nothrow_copyhas_nothrow_copy + <link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link> + +template <class T> +struct has_nothrow_copy : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_copy + will never report that a class or struct has a non-throwing copy-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_copy.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link> + + See has_nothrow_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link> + + See has_nothrow_constructor. + +
+
has_trivial_assignhas_trivial_assign + <link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link> + +template <class T> +struct has_trivial_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial assignment-operator then the operator has the same + effect as copying the bits of one object to the other: calls to the operator + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_assign + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p11. + + + Header: #include + <boost/type_traits/has_trivial_assign.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_assign<int> + inherits from true_type. + + +
+
+ + + has_trivial_assign<char*>::type is the type true_type. + + +
+
+ + + has_trivial_assign<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_assign<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_assign<T>::value_type is the type bool. + + +
+
+
has_trivial_default_constructorhas_trivial_constructorhas_trivial_constructorhas_trivial_default_constructor + <link linkend="boost_typetraits.reference.has_trivial_constructor"> + has_trivial_constructor</link> +template <class T> +struct has_trivial_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial default-constructor then the constructor have no + effect: calls to the constructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_constructor + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.1p6. + + + Header: #include + <boost/type_traits/has_trivial_constructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_constructor<int> inherits from true_type. + + +
+
+ + + has_trivial_constructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_constructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_constructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_constructor<T>::value_type + is the type bool. + + +
+
+
has_trivial_copy_constructorhas_trivial_copyhas_trivial_copyhas_trivial_copy_constructorhas_trivial_copyhas_trivial_copy + <link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link> + +template <class T> +struct has_trivial_copy : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial copy-constructor then the constructor has the same + effect as copying the bits of one object to the other: calls to the constructor + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_copy + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p6. + + + Header: #include + <boost/type_traits/has_trivial_copy.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_copy<int> + inherits from true_type. + + +
+
+ + + has_trivial_copy<char*>::type is the type true_type. + + +
+
+ + + has_trivial_copy<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_copy<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_copy<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link> + + See has_trivial_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link> + + See has_trivial_constructor. + +
+
has_trivial_destructorhas_trivial_destructor + <link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link> + +template <class T> +struct has_trivial_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial destructor then the destructor has no effect: calls + to the destructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_destructor + will never report that a user-defined class or struct has a trivial destructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.4p3. + + + Header: #include + <boost/type_traits/has_trivial_destructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_destructor<int> inherits from true_type. + + +
+
+ + + has_trivial_destructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_destructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_destructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_destructor<T>::value_type + is the type bool. + + +
+
+
has_virtual_destructorhas_virtual_destructor + <link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link> + +template <class T> +struct has_virtual_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type. + + + Compiler Compatibility: This trait is provided + for completeness, since it's part of the Technical Report on C++ Library + Extensions. However, there is currently no way to portably implement this + trait. The default version provided always inherits from false_type, + and has to be explicitly specialized for types with virtual destructors unless + the compiler used has compiler intrinsics + that enable the trait to do the right thing: currently (May 2005) only Visual + C++ 8 and GCC-4.3 have the necessary intrinsics. + + + C++ Standard Reference: 12.4. + + + Header: #include + <boost/type_traits/has_virtual_destructor.hpp> + or #include <boost/type_traits.hpp> + +
+
value_typeintegral_constantintegral_constantvalue_typetrue_typeintegral_constantintegral_constanttrue_typeintegral_constantintegral_constantfalse_typeintegral_constantintegral_constantfalse_type + <link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link> + +template <class T, T val> +struct integral_constant +{ + typedef integral_constant<T, val> type; + typedef T value_type; + static const T value = val; +}; + +typedef integral_constant<bool, true> true_type; +typedef integral_constant<bool, false> false_type; + + + Class template integral_constant + is the common base class for all the value-based type traits. The two typedef's + true_type and false_type are provided for convenience: + most of the value traits are Boolean properties and so will inherit from + one of these. + +
+
integral_promotionintegral_promotion + <link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link> + +template <class T> +struct integral_promotion +{ + typedef see-below type; +}; + + + type: If integral promotion can be applied + to an rvalue of type T, then + applies integral promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field). + + + Header: #include + <boost/type_traits/integral_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + integral_promotion<short + const>::type + + + + int const + + + + + + + integral_promotion<short&>::type + + + + short& + + + + + + + integral_promotion<enum std::float_round_style>::type + + + + int + + + + + +
+
+
is_abstractis_abstract + <link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link> + +template <class T> +struct is_abstract : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + abstract type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10.3. + + + Header: #include + <boost/type_traits/is_abstract.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: The compiler must + support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + this is the "safe fallback position" for which polymorphic types + are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT + is used to signify that the implementation is buggy, users should check for + this in their own code if the "safe fallback" is not suitable for + their particular use-case. + + + Examples: + +
+ + + Given: class abc{ virtual ~abc() = 0; }; + + +
+
+ + + is_abstract<abc> + inherits from true_type. + + +
+
+ + + is_abstract<abc>::type is the type true_type. + + +
+
+ + + is_abstract<abc const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_abstract<T>::value_type is the type bool. + + +
+
+
is_arithmeticis_arithmetic + <link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link> + +template <class T> +struct is_arithmetic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point). + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_arithmetic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_arithmetic<int> + inherits from true_type. + + +
+
+ + + is_arithmetic<char>::type is the type true_type. + + +
+
+ + + is_arithmetic<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_arithmetic<T>::value_type is the type bool. + + +
+
+
is_arrayis_array + <link linkend="boost_typetraits.reference.is_array"> is_array</link> + +template <class T> +struct is_array : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + array type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.4. + + + Header: #include + <boost/type_traits/is_array.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can give the wrong result with function types. + + + Examples: + +
+ + + is_array<int[2]> inherits from true_type. + + +
+
+ + + is_array<char[2][3]>::type + is the type true_type. + + +
+
+ + + is_array<double[]>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_array<T>::value_type is the type bool. + + +
+
+
is_base_ofis_base_of + <link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link> + +template <class Base, class Derived> +struct is_base_of : public true_type-or-false_type {}; + + + Inherits: If Base is base class of type + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type. + + + This template will detect non-public base classes, and ambiguous base classes. + + + Note that is_base_of<X,X> will always inherit from true_type. + This is the case even if X + is not a class type. This is a change in behaviour from Boost-1.33 + in order to track the Technical Report on C++ Library Extensions. + + + Types Base and Derived must not be incomplete types. + + + C++ Standard Reference: 10. + + + Header: #include + <boost/type_traits/is_base_of.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. There are some older compilers which + will produce compiler errors if Base + is a private base class of Derived, + or if Base is an ambiguous + base of Derived. These compilers + include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and + older versions of EDG based compilers. + + + Examples: + +
+ + + Given: class Base{}; class Derived : + public Base{}; + + +
+
+ + + is_base_of<Base, Derived> + inherits from true_type. + + +
+
+ + + is_base_of<Base, Derived>::type is the type true_type. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Base>::value is an integral constant expression + that evaluates to true: a class is regarded as it's + own base. + + +
+
+ + + is_base_of<T>::value_type is the type bool. + + +
+
+
is_classis_class + <link linkend="boost_typetraits.reference.is_class"> is_class</link> + +template <class T> +struct is_class : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + class type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 9.2. + + + Header: #include + <boost/type_traits/is_class.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + to correctly identify union types, and therefore make is_class function correctly. + + + Examples: + +
+ + + Given: class MyClass; then: + + +
+
+ + + is_class<MyClass> + inherits from true_type. + + +
+
+ + + is_class<MyClass const>::type + is the type true_type. + + +
+
+ + + is_class<MyClass>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_class<MyClass&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<MyClass*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<T>::value_type is the type bool. + + +
+
+
is_complexis_complex + <link linkend="boost_typetraits.reference.is_complex"> is_complex</link> + +template <class T> +struct is_complex : public true_type-or-false_type {}; + + + Inherits: If T + is a complex number type then true (of type std::complex<U> + for some type U), otherwise + false. + + + C++ Standard Reference: 26.2. + + + Header: #include + <boost/type_traits/is_complex.hpp> + or #include <boost/type_traits.hpp> + +
+
is_compoundis_compound + <link linkend="boost_typetraits.reference.is_compound"> is_compound</link> + +template <class T> +struct is_compound : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental). + + + C++ Standard Reference: 3.9.2. + + + Header: #include + <boost/type_traits/is_compound.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_compound<MyClass> + inherits from true_type. + + +
+
+ + + is_compound<MyEnum>::type is the type true_type. + + +
+
+ + + is_compound<int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int&>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_compound<T>::value_type is the type bool. + + +
+
+
is_constis_const + <link linkend="boost_typetraits.reference.is_const"> is_const</link> + +template <class T> +struct is_const : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) const-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_const.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_const<int const> inherits from true_type. + + +
+
+ + + is_const<int const volatile>::type is the type true_type. + + +
+
+ + + is_const<int* const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_const<int const*>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int const&>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_const<T>::value_type is the type bool. + + +
+
+
is_convertibleis_convertible + <link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link> + +template <class From, class To> +struct is_convertible : public true_type-or-false_type {}; + + + Inherits: If an imaginary lvalue of type + From is convertible to type + To then inherits from true_type, + otherwise inherits from false_type. + + + Type From must not be an incomplete type. + + + Type To must not be an incomplete, or function type. + + + No types are considered to be convertible to array types or abstract-class + types. + + + This template can not detect whether a converting-constructor is public or not: if type To + has a private converting constructor + from type From then instantiating + is_convertible<From, To> + will produce a compiler error. For this reason is_convertible + can not be used to determine whether a type has a public + copy-constructor or not. + + + This template will also produce compiler errors if the conversion is ambiguous, + for example: + + +struct A {}; +struct B : A {}; +struct C : A {}; +struct D : B, C {}; +// This produces a compiler error, the conversion is ambiguous: +bool const y = boost::is_convertible<D*,A*>::value; + + + C++ Standard Reference: 4 and 8.5. + + + Compiler Compatibility: This template is + currently broken with Borland C++ Builder 5 (and earlier), for constructor-based + conversions, and for the Metrowerks 7 (and earlier) compiler in all cases. + If the compiler does not support is_abstract, + then the template parameter To + must not be an abstract type. + + + Header: #include + <boost/type_traits/is_convertible.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_convertible<int, double> + inherits from true_type. + + +
+
+ + + is_convertible<const int, double>::type + is the type true_type. + + +
+
+ + + is_convertible<int* const, int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_convertible<int const*, int*>::value + is an integral constant expression that evaluates to false: + the conversion would require a const_cast. + + +
+
+ + + is_convertible<int const&, long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_convertible<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_convertible<T>::value_type is the type bool. + + +
+
+
is_emptyis_empty + <link linkend="boost_typetraits.reference.is_empty"> is_empty</link> + +template <class T> +struct is_empty : public true_type-or-false_type {}; + + + Inherits: If T is an empty class type then + inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10p5. + + + Header: #include + <boost/type_traits/is_empty.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: In order to correctly + detect empty classes this trait relies on either: + + + + the compiler implementing zero sized empty base classes, or + + + the compiler providing intrinsics + to detect empty classes. + + + + Can not be used with incomplete types. + + + Can not be used with union types, until is_union can be made to work. + + + If the compiler does not support partial-specialization of class templates, + then this template can not be used with abstract types. + + + Examples: + +
+ + + Given: struct empty_class + {}; + + +
+
+ + + is_empty<empty_class> + inherits from true_type. + + +
+
+ + + is_empty<empty_class const>::type + is the type true_type. + + +
+
+ + + is_empty<empty_class>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_empty<T>::value_type is the type bool. + + +
+
+
is_enumis_enum + <link linkend="boost_typetraits.reference.is_enum"> is_enum</link> + +template <class T> +struct is_enum : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + enum type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 7.2. + + + Header: #include + <boost/type_traits/is_enum.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Requires a correctly + functioning is_convertible + template; this means that is_enum is currently broken under Borland C++ Builder + 5, and for the Metrowerks compiler prior to version 8, other compilers should + handle this template just fine. + + + Examples: + +
+ + + Given: enum my_enum + { one, two }; + + +
+
+ + + is_enum<my_enum> + inherits from true_type. + + +
+
+ + + is_enum<my_enum const>::type + is the type true_type. + + +
+
+ + + is_enum<my_enum>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_enum<my_enum&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<my_enum*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<T>::value_type is the type bool. + + +
+
+
is_floating_pointis_floating_point + <link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link> + +template <class T> +struct is_floating_point : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + floating point type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_floating_point.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_floating_point<float> + inherits from true_type. + + +
+
+ + + is_floating_point<double>::type is the type true_type. + + +
+
+ + + is_floating_point<long double>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_floating_point<T>::value_type is the type bool. + + +
+
+
is_functionis_function + <link linkend="boost_typetraits.reference.is_function"> is_function</link> + +template <class T> +struct is_function : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + function type then inherits from true_type, + otherwise inherits from false_type. + Note that this template does not detect pointers to functions, + or references to functions, these are detected by is_pointer and is_reference respectively: + + +typedef int f1(); // f1 is of function type. +typedef int (f2*)(); // f2 is a pointer to a function. +typedef int (f3&)(); // f3 is a reference to a function. + + + C++ Standard Reference: 3.9.2p1 and 8.3.5. + + + Header: #include + <boost/type_traits/is_function.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_function<int (void)> + inherits from true_type. + + +
+
+ + + is_function<long (double, int)>::type is the type true_type. + + +
+
+ + + is_function<long (double, int)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_function<long (*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer type, not a function type. + + +
+
+ + + is_function<long (&)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a reference to a function, not a function type. + + +
+
+ + + is_function<long (MyClass::*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer to a member function. + + +
+
+ + + is_function<T>::value_type is the type bool. + + +
+ + + Don't confuse function-types with pointers to functions: + + + typedef int + f(double); + + + defines a function type, + + + f foo; + + + declares a prototype for a function of type f, + + + f* + pf = + foo; + + + f& + fr = + foo; + + + declares a pointer and a reference to the function foo. + + + If you want to detect whether some type is a pointer-to-function then use: + + + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value + + + or for pointers to member functions you can just use is_member_function_pointer + directly. + + +
+
is_fundamentalis_fundamental + <link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link> + +template <class T> +struct is_fundamental : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + fundamental type then inherits from true_type, + otherwise inherits from false_type. + Fundamental types include integral, floating point and void types (see also + is_integral, + is_floating_point + and is_void) + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/is_fundamental.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_fundamental<int)> + inherits from true_type. + + +
+
+ + + is_fundamental<double const>::type + is the type true_type. + + +
+
+ + + is_fundamental<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_fundamental<T>::value_type is the type bool. + + +
+
+
is_integralis_integral + <link linkend="boost_typetraits.reference.is_integral"> is_integral</link> + +template <class T> +struct is_integral : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + integral type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p7. + + + Header: #include + <boost/type_traits/is_integral.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_integral<int> + inherits from true_type. + + +
+
+ + + is_integral<const char>::type + is the type true_type. + + +
+
+ + + is_integral<long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_integral<T>::value_type is the type bool. + + +
+
+
is_member_function_pointeris_member_function_pointer + <link linkend="boost_typetraits.reference.is_member_function_pointer"> + is_member_function_pointer</link> +template <class T> +struct is_member_function_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member function then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_function_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(char)>::type + is the type true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(void)const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a data member and not a member + function, see is_member_object_pointer + and is_member_pointer + + +
+
+ + + is_member_function_pointer<T>::value_type + is the type bool. + + +
+
+
is_member_object_pointeris_member_object_pointer + <link linkend="boost_typetraits.reference.is_member_object_pointer"> + is_member_object_pointer</link> +template <class T> +struct is_member_object_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_object_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_object_pointer<int (MyClass::*)> inherits from true_type. + + +
+
+ + + is_member_object_pointer<double (MyClass::*)>::type + is the type true_type. + + +
+
+ + + is_member_object_pointer<const int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_object_pointer<int (MyClass::*)(void)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a member function and not a + member object, see is_member_function_pointer + and is_member_pointer + + +
+
+ + + is_member_object_pointer<T>::value_type + is the type bool. + + +
+
+
is_member_pointeris_member_pointer + <link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link> + +template <class T> +struct is_member_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member (either a function or a data member) then inherits from + true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_pointer<int (MyClass::*)> + inherits from true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_pointer<T>::value_type is the type bool. + + +
+
+
is_objectis_object + <link linkend="boost_typetraits.reference.is_object"> is_object</link> + +template <class T> +struct is_object : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + object type then inherits from true_type, + otherwise inherits from false_type. + All types are object types except references, void, and function types. + + + C++ Standard Reference: 3.9p9. + + + Header: #include + <boost/type_traits/is_object.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_object<int> + inherits from true_type. + + +
+
+ + + is_object<int*>::type is the type true_type. + + +
+
+ + + is_object<int (*)(void)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int &>::value is an integral constant expression + that evaluates to false: reference types are not + objects + + +
+
+ + + is_object<int (double)>::value is an integral constant expression + that evaluates to false: function types are not + objects + + +
+
+ + + is_object<const void>::value + is an integral constant expression that evaluates to false: + void is not an object type + + +
+
+ + + is_object<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pod"> is_pod</link> + +template <class T> +struct is_pod : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + POD type then inherits from true_type, + otherwise inherits from false_type. + + + POD stands for "Plain old data". Arithmetic types, and enumeration + types, a pointers and pointer to members are all PODs. Classes and unions + can also be POD's if they have no non-static data members that are of reference + or non-POD type, no user defined constructors, no user defined assignment + operators, no private or protected non-static data members, no virtual functions + and no base classes. Finally, a cv-qualified POD is still a POD, as is an + array of PODs. + + + C++ Standard Reference: 3.9p10 and 9p4 (Note + that POD's are also aggregates, see 8.5.1). + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, ispod + will never report that a class or struct is a POD; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler-_intrinsics. + + + Header: #include + <boost/type_traits/is_pod.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pod<int> + inherits from true_type. + + +
+
+ + + is_pod<char*>::type is the type true_type. + + +
+
+ + + is_pod<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pod<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pod<T>::value_type is the type bool. + + +
+
+
is_pointeris_pointer + <link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link> + +template <class T> +struct is_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer type (includes function pointers, but excludes pointers to members) + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2p2 and 8.3.1. + + + Header: #include + <boost/type_traits/is_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pointer<int*> + inherits from true_type. + + +
+
+ + + is_pointer<char* const>::type is the type true_type. + + +
+
+ + + is_pointer<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pointer<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<int (MyClass::*)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<T>::value_type is the type bool. + + +
+ + + is_pointer detects "real" + pointer types only, and not smart pointers. Users + should not specialise is_pointer + for smart pointer types, as doing so may cause Boost (and other third party) + code to fail to function correctly. Users wanting a trait to detect smart + pointers should create their own. However, note that there is no way in + general to auto-magically detect smart pointer types, so such a trait would + have to be partially specialised for each supported smart pointer type. + + +
+
is_polymorphicis_polymorphic + <link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link> + +template <class T> +struct is_polymorphic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + polymorphic type then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + C++ Standard Reference: 10.3. + + + Compiler Compatibility: The implementation + requires some knowledge of the compilers ABI, it does actually seem to work + with the majority of compilers though. + + + Header: #include + <boost/type_traits/is_polymorphic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + Given: class poly{ virtual ~poly(); }; + + +
+
+ + + is_polymorphic<poly> + inherits from true_type. + + +
+
+ + + is_polymorphic<poly const>::type + is the type true_type. + + +
+
+ + + is_polymorphic<poly>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_polymorphic<T>::value_type is the type bool. + + +
+
+
is_sameis_same + <link linkend="boost_typetraits.reference.is_same"> is_same</link> + +template <class T, class U> +struct is_same : public true_type-or-false_type {}; + + + Inherits: If T and U are the same types + then inherits from true_type, + otherwise inherits from false_type. + + + Header: #include + <boost/type_traits/is_same.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with abstract, incomplete or function types. + + + Examples: + +
+ + + is_same<int, int> + inherits from true_type. + + +
+
+ + + is_same<int, int>::type is the type true_type. + + +
+
+ + + is_same<int, int>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_same<int const, int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_same<int&, int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_same<T>::value_type is the type bool. + + +
+
+
is_scalaris_scalar + <link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link> + +template <class T> +struct is_scalar : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + scalar type then inherits from true_type, + otherwise inherits from false_type. + Scalar types include integral, floating point, enumeration, pointer, and + pointer-to-member types. + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_scalar.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Examples: + +
+ + + is_scalar<int*> + inherits from true_type. + + +
+
+ + + is_scalar<int>::type is the type true_type. + + +
+
+ + + is_scalar<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<T>::value_type is the type bool. + + +
+
+
is_signedis_signed + <link linkend="boost_typetraits.reference.is_signed"> is_signed</link> + +template <class T> +struct is_signed : public true_type-or-false_type {}; + + + Inherits: If T is an signed integer type + or an enumerated type with an underlying signed integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_signed.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_signed<int> + inherits from true_type. + + +
+
+ + + is_signed<int const volatile>::type is the type true_type. + + +
+
+ + + is_signed<unsigned int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_signed<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_signed<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_signed<long long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_signed<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link> + +template <class T> +struct is_stateless : public true_type-or-false_type {}; + + + Inherits: Ff T is a stateless type then + inherits from true_type, + otherwise from false_type. + + + Type T must be a complete type. + + + A stateless type is a type that has no storage and whose constructors and + destructors are trivial. That means that is_stateless + only inherits from true_type + if the following expression is true: + + +::boost::has_trivial_constructor<T>::value +&& ::boost::has_trivial_copy<T>::value +&& ::boost::has_trivial_destructor<T>::value +&& ::boost::is_class<T>::value +&& ::boost::is_empty<T>::value + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_stateless.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, is_stateless will + never report that a class or struct is stateless; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler intrinsics + to make this template work automatically. + +
+
is_referenceis_reference + <link linkend="boost_typetraits.reference.is_reference"> is_reference</link> + +template <class T> +struct is_reference : public true_type-or-false_type {}; + + + Inherits: If T is a reference pointer type + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + may report the wrong result for function types, and for types that are both + const and volatile qualified. + + + Header: #include + <boost/type_traits/is_reference.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_reference<int&> + inherits from true_type. + + +
+
+ + + is_reference<int const&>::type + is the type true_type. + + +
+
+ + + is_reference<int (&)(long)>::value is an integral constant expression + that evaluates to true (the argument in this case + is a reference to a function). + + +
+
+ + + is_reference<T>::value_type is the type bool. + + +
+
+
is_unionis_union + <link linkend="boost_typetraits.reference.is_union"> is_union</link> + +template <class T> +struct is_union : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + union type then inherits from true_type, + otherwise inherits from false_type. + Currently requires some kind of compiler support, otherwise unions are identified + as classes. + + + C++ Standard Reference: 3.9.2 and 9.5. + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types using only standard C++, as a result this type will never + inherit from true_type, + unless the user explicitly specializes the template for their user-defined + union types, or unless the compiler supplies some unspecified intrinsic that + implements this functionality. Currently (May 2005) only Visual C++ 8 has + the necessary compiler intrinsics + to make this trait "just work" without user intervention. + + + Header: #include + <boost/type_traits/is_union.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_union<void> + inherits from true_type. + + +
+
+ + + is_union<const void>::type + is the type true_type. + + +
+
+ + + is_union<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_union<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_union<T>::value_type is the type bool. + + +
+
+
is_unsignedis_unsigned + <link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link> + +template <class T> +struct is_unsigned : public true_type-or-false_type {}; + + + Inherits: If T is an unsigned integer type + or an enumerated type with an underlying unsigned integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_unsigned.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_unsigned<unsigned int> inherits from true_type. + + +
+
+ + + is_unsigned<unsigned int + const volatile>::type + is the type true_type. + + +
+
+ + + is_unsigned<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_unsigned<unsigned long + long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_unsigned<T>::value_type is the type bool. + + +
+
+
is_voidis_void + <link linkend="boost_typetraits.reference.is_void"> is_void</link> + +template <class T> +struct is_void : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + void type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p9. + + + Header: #include + <boost/type_traits/is_void.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_void<void> + inherits from true_type. + + +
+
+ + + is_void<const void>::type + is the type true_type. + + +
+
+ + + is_void<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_void<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_void<T>::value_type is the type bool. + + +
+
+
is_volatileis_volatile + <link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link> + +template <class T> +struct is_volatile : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) volatile-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_volatile.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_volatile<volatile int> inherits from true_type. + + +
+
+ + + is_volatile<const volatile + int>::type is the type true_type. + + +
+
+ + + is_volatile<int* volatile>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_volatile<int volatile*>::value + is an integral constant expression that evaluates to false: + the volatile qualifier is not at the top level in this case. + + +
+
+ + + is_volatile<T>::value_type is the type bool. + + +
+
+
make_signedmake_signed + <link linkend="boost_typetraits.reference.make_signed"> make_signed</link> + +template <class T> +struct make_signed +{ + typedef see-below type; +}; + + + type: If T is a signed integer type then + the same type as T, if T is an unsigned integer type then the corresponding + signed type. Otherwise if T is an enumerated or character type (char or wchar_t) + then a signed integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_signed.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + int + + + + + + + make_signed<unsigned int + const>::type + + + + int const + + + + + + + make_signed<const unsigned + long long>::type + + + + const long + long + + + + + + + make_signed<my_enum>::type + + + + A signed integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + A signed integer type with the same width as wchar_t. + + + + + +
+
+
make_unsignedmake_unsigned + <link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link> + +template <class T> +struct make_unsigned +{ + typedef see-below type; +}; + + + type: If T is a unsigned integer type then + the same type as T, if T is an signed integer type then the corresponding + unsigned type. Otherwise if T is an enumerated or character type (char or + wchar_t) then an unsigned integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_unsigned.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + unsigned int + + + + + + + make_signed<unsigned int + const>::type + + + + unsigned int + const + + + + + + + make_signed<const unsigned + long long>::type + + + + const unsigned + long long + + + + + + + make_signed<my_enum>::type + + + + An unsigned integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + An unsigned integer type with the same width as wchar_t. + + + + + +
+
+
promotepromote + <link linkend="boost_typetraits.reference.promote"> promote</link> + +template <class T> +struct promote +{ + typedef see-below type; +}; + + + type: If integral or floating point promotion + can be applied to an rvalue of type T, + then applies integral and floating point promotions to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + See also integral_promotion + and floating_point_promotion. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field) and 4.6. + + + Header: #include + <boost/type_traits/promote.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + promote<short volatile>::type + + + + int volatile + + + + + + + promote<float const>::type + + + + double const + + + + + + + promote<short&>::type + + + + short& + + + + + +
+
+
integral_constantrankrankintegral_constant + <link linkend="boost_typetraits.reference.rank"> rank</link> + +template <class T> +struct rank : public integral_constant<std::size_t, RANK(T)> {}; + + + Inherits: Class template rank inherits from + integral_constant<std::size_t, RANK(T)>, + where RANK(T) is the + number of array dimensions in type T. + + + If T is not an array type, + then RANK(T) is zero. + + + Header: #include + <boost/type_traits/rank.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + rank<int[]> + inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + rank<int[1]>::value + is an integral constant expression that evaluates to 1. + + +
+
+ + + rank<int[][2]>::value is an integral constant expression + that evaluates to 2. + + +
+
+ + + rank<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + rank<T>::value_type is the type std::size_t. + + +
+
+
remove_all_extentsremove_all_extents + <link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link> + +template <class T> +struct remove_all_extents +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes all of the array bounds on T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_all_extents.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_all_extents<int>::type + + + + int + + + + + + + remove_all_extents<int const[2]>::type + + + + int const + + + + + + + remove_all_extents<int[][2]>::type + + + + int + + + + + + + remove_all_extents<int[2][3][4]>::type + + + + int + + + + + + + remove_all_extents<int const*>::type + + + + int const* + + + + + +
+
+
remove_constremove_const + <link linkend="boost_typetraits.reference.remove_const"> remove_const</link> + +template <class T> +struct remove_const +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level const-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_const<int>::type + + + + int + + + + + + + remove_const<int const>::type + + + + int + + + + + + + remove_const<int const + volatile>::type + + + + int volatile + + + + + + + remove_const<int const&>::type + + + + int const& + + + + + + + remove_const<int const*>::type + + + + int const* + + + + + +
+
+
remove_cvremove_cv + <link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link> + +template <class T> +struct remove_cv +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level cv-qualifiers removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_cv<int>::type + + + + int + + + + + + + remove_cv<int const>::type + + + + int + + + + + + + remove_cv<int const + volatile>::type + + + + int + + + + + + + remove_cv<int const&>::type + + + + int const& + + + + + + + remove_cv<int const*>::type + + + + int const* + + + + + +
+
+
remove_extentremove_extent + <link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link> + +template <class T> +struct remove_extent +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes the topmost array bound, otherwise leaves + T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_extent.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_extent<int>::type + + + + int + + + + + + + remove_extent<int const[2]>::type + + + + int const + + + + + + + remove_extent<int[2][4]>::type + + + + int[4] + + + + + + + remove_extent<int[][2]>::type + + + + int[2] + + + + + + + remove_extent<int const*>::type + + + + int const* + + + + + +
+
+
remove_pointerremove_pointer + <link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link> + +template <class T> +struct remove_pointer +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any pointer modifier removed. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_pointer<int>::type + + + + int + + + + + + + remove_pointer<int const*>::type + + + + int const + + + + + + + remove_pointer<int const**>::type + + + + int const* + + + + + + + remove_pointer<int&>::type + + + + int& + + + + + + + remove_pointer<int*&>::type + + + + int*& + + + + + +
+
+
remove_referenceremove_reference + <link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link> + +template <class T> +struct remove_reference +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any reference modifier removed. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_reference<int>::type + + + + int + + + + + + + remove_reference<int const&>::type + + + + int const + + + + + + + remove_reference<int*>::type + + + + int* + + + + + + + remove_reference<int*&>::type + + + + int* + + + + + +
+
+
remove_volatileremove_volatile + <link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link> + +template <class T> +struct remove_volatile +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level volatile-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_volatile<int>::type + + + + int + + + + + + + remove_volatile<int volatile>::type + + + + int + + + + + + + remove_volatile<int const + volatile>::type + + + + int const + + + + + + + remove_volatile<int volatile&>::type + + + + int const& + + + + + + + remove_volatile<int volatile*>::type + + + + int const* + + + + + +
+
+
type_with_alignmenttype_with_alignment + <link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link> + +template <std::size_t Align> +struct type_with_alignment +{ + typedef see-below type; +}; + + + type: a built-in or POD type with an alignment + that is a multiple of Align. + + + Header: #include + <boost/type_traits/type_with_alignment.hpp> + or #include <boost/type_traits.hpp> + +
+
+
+ <link linkend="boost_typetraits.credits"> Credits</link> + + This documentation was pulled together by John Maddock, using Boost.Quickbook + and Boost.DocBook. + + + The original version of this library was created by Steve Cleary, Beman Dawes, + Howard Hinnant, and John Maddock. John Maddock is the current maintainer of + the library. + + + This version of type traits library is based on contributions by Adobe Systems + Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, + Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert + Ramey and Jeremy Siek. + + + Mat Marcus and Jesse Jones invented, and published + a paper describing, the partial specialization workarounds used in + this library. + + + Aleksey Gurtovoy added MPL integration to the library. + + + The is_convertible + template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: + Mappings between Types and Values". + + + The latest version of this library and documentation can be found at www.boost.org. Bugs, suggestions and discussion + should be directed to boost@lists.boost.org (see www.boost.org/more/mailing_lists.htm#main + for subscription details). + +
+ +
+ This section must not be indexed. + + template <class T> +struct add_const +{ + typedef see-below type; +}; + +
+ +
add_volatileThis section contains one block that must not be indexed and one that should be.This section contains one block that must not be indexed and one that should be.add_volatile + This section contains one block that must not be indexed and one that should be. + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + +
+ + + + Class Index + + + Typedef Index + + + Macro Index + + + Index Test 1 + + + Index Test 2 + + + + \ No newline at end of file diff --git a/src/boost/tools/auto_index/test/test2.gold b/src/boost/tools/auto_index/test/test2.gold new file mode 100644 index 000000000..b4f7c4eab --- /dev/null +++ b/src/boost/tools/auto_index/test/test2.gold @@ -0,0 +1,6671 @@ + + + + + + + various authors + + 2000 2006 Adobe Systems Inc, David Abrahams, + Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat + Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert + Ramey and Jeremy Siek + + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + Boost.TypeTraits + + A printer-friendly PDF + version of this manual is also available. + +
+ <link linkend="boost_typetraits.intro"> Introduction</link> + + The Boost type-traits library contains a set of very specific traits classes, + each of which encapsulate a single trait from the C++ type system; for example, + is a type a pointer or a reference type? Or does a type have a trivial constructor, + or a const-qualifier? + + + The type-traits classes share a unified design: each class inherits from a + the type true_type + if the type has the specified property and inherits from false_type + otherwise. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. + +
+
+ <link linkend="boost_typetraits.background"> Background and Tutorial</link> + + The following is an updated version of the article "C++ Type traits" + by John Maddock and Steve Cleary that appeared in the October 2000 issue of + Dr Dobb's Journal. + + + Generic programming (writing code which works with any data type meeting a + set of requirements) has become the method of choice for providing reusable + code. However, there are times in generic programming when "generic" + just isn't good enough - sometimes the differences between types are too large + for an efficient generic implementation. This is when the traits technique + becomes important - by encapsulating those properties that need to be considered + on a type by type basis inside a traits class, we can minimize the amount of + code that has to differ from one type to another, and maximize the amount of + generic code. + + + + + Foo1 + + Consider an example: when working with character strings, one common operation + is to determine the length of a null terminated string. Clearly it's possible + to write generic code that can do this, but it turns out that there are much + more efficient methods available: for example, the C library functions strlen and wcslen + are usually written in assembler, and with suitable hardware support can be + considerably faster than a generic version written in C++. The authors of the + C++ standard library realized this, and abstracted the properties of char and wchar_t + into the class char_traits. + Generic code that works with character strings can simply use char_traits<>::length to determine the length of a null + terminated string, safe in the knowledge that specializations of char_traits will use the most appropriate + method available to them. + + + + Type Traits + + + Class char_traits is a classic + example of a collection of type specific properties wrapped up in a single + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very + specific traits classes, each of which encapsulate a single trait from the + C++ type system; for example, is a type a pointer or a reference type? Or does + a type have a trivial constructor, or a const-qualifier? The type-traits classes + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type + otherwise. As we will show, these classes can be used in generic programming + to determine the properties of a given type and introduce optimizations that + are appropriate for that case. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. All of the type-traits classes are + defined inside namespace boost; + for brevity, namespace-qualification is omitted in most of the code samples + given. + + + + Implementation + + + There are far too many separate classes contained in the type-traits library + to give a full implementation here - see the source code in the Boost library + for the full details - however, most of the implementation is fairly repetitive + anyway, so here we will just give you a flavor for how some of the classes + are implemented. Beginning with possibly the simplest class in the library, + is_void<T> inherits + from true_type + only if T is void. + + +template <typename T> +struct is_void : public false_type{}; + +template <> +struct is_void<void> : public true_type{}; + + + Here we define a primary version of the template class is_void, + and provide a full-specialization when T + is void. While full specialization + of a template class is an important technique, sometimes we need a solution + that is halfway between a fully generic solution, and a full specialization. + This is exactly the situation for which the standards committee defined partial + template-class specialization. As an example, consider the class boost::is_pointer<T>: + here we needed a primary version that handles all the cases where T is not + a pointer, and a partial specialization to handle all the cases where T is + a pointer: + + +template <typename T> +struct is_pointer : public false_type{}; + +template <typename T> +struct is_pointer<T*> : public true_type{}; + + + The syntax for partial specialization is somewhat arcane and could easily occupy + an article in its own right; like full specialization, in order to write a + partial specialization for a class, you must first declare the primary template. + The partial specialization contains an extra <...> after the class name + that contains the partial specialization parameters; these define the types + that will bind to that partial specialization rather than the default template. + The rules for what can appear in a partial specialization are somewhat convoluted, + but as a rule of thumb if you can legally write two function overloads of the + form: + + +void foo(T); +void foo(U); + + + Then you can also write a partial specialization of the form: + + +template <typename T> +class c{ /*details*/ }; + +template <typename T> +class c<U>{ /*details*/ }; + + + This rule is by no means foolproof, but it is reasonably simple to remember + and close enough to the actual rule to be useful for everyday use. + + + As a more complex example of partial specialization consider the class remove_extent<T>. This + class defines a single typedef-member type + that is the same type as T but with any top-level array bounds removed; this + is an example of a traits class that performs a transformation on a type: + + +template <typename T> +struct remove_extent +{ typedef T type; }; + +template <typename T, std::size_t N> +struct remove_extent<T[N]> +{ typedef T type; }; + + + The aim of remove_extent + is this: imagine a generic algorithm that is passed an array type as a template + parameter, remove_extent + provides a means of determining the underlying type of the array. For example + remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of + template parameters in a partial specialization does not have to match the + number in the default template. However, the number of parameters that appear + after the class name do have to match the number and type of the parameters + in the default template. + + + + Optimized copy + + + As an example of how the type traits classes can be used, consider the standard + library algorithm copy: + + +template<typename Iter1, typename Iter2> +Iter2 copy(Iter1 first, Iter1 last, Iter2 out); + + + Obviously, there's no problem writing a generic version of copy that works + for all iterator types Iter1 + and Iter2; however, there are + some circumstances when the copy operation can best be performed by a call + to memcpy. In order to implement + copy in terms of memcpy all + of the following conditions need to be met: + + + + Both of the iterator types Iter1 + and Iter2 must be pointers. + + + Both Iter1 and Iter2 must point to the same type - excluding + const and volatile-qualifiers. + + + The type pointed to by Iter1 + must have a trivial assignment operator. + + + + By trivial assignment operator we mean that the type is either a scalar type[3] or: + + + + The type has no user defined assignment operator. + + + The type does not have any data members that are references. + + + All base classes, and all data member objects must have trivial assignment + operators. + + + + If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated + assignment operator. The type-traits library provides a class has_trivial_assign, + such that has_trivial_assign<T>::value is true only if T has a trivial assignment + operator. This class "just works" for scalar types, but has to be + explicitly specialised for class/struct types that also happen to have a trivial + assignment operator. In other words if has_trivial_assign + gives the wrong answer, it will give the "safe" wrong answer - that + trivial assignment is not allowable. + + + The code for an optimized version of copy that uses memcpy + where appropriate is given in the + examples. The code begins by defining a template function do_copy that performs a "slow but safe" + copy. The last parameter passed to this function may be either a true_type + or a false_type. + Following that there is an overload of docopy that + uses `memcpy`: this time the iterators are required to actually be pointers + to the same type, and the final parameter must be a `_true_type. Finally, the version + of copy calls + docopy`, passing `_has_trivial_assign<value_type>()` + as the final parameter: this will dispatch to the optimized version where appropriate, + otherwise it will call the "slow but safe version". + + + + Was it worth it? + + + It has often been repeated in these columns that "premature optimization + is the root of all evil" [4]. + So the question must be asked: was our optimization premature? To put this + in perspective the timings for our version of copy compared a conventional + generic copy[5] are shown in table + 1. + + + Clearly the optimization makes a difference in this case; but, to be fair, + the timings are loaded to exclude cache miss effects - without this accurate + comparison between algorithms becomes difficult. However, perhaps we can add + a couple of caveats to the premature optimization rule: + + + + If you use the right algorithm for the job in the first place then optimization + will not be required; in some cases, memcpy is the right algorithm. + + + If a component is going to be reused in many places by many people then optimizations + may well be worthwhile where they would not be so for a single case - in + other words, the likelihood that the optimization will be absolutely necessary + somewhere, sometime is that much higher. Just as importantly the perceived + value of the stock implementation will be higher: there is no point standardizing + an algorithm if users reject it on the grounds that there are better, more + heavily optimized versions available. + + + Time taken to copy 1000 elements using `copy<const + T*, T*>` (times in micro-seconds) + + + + + + Version + + + + T + + + + Time + + + + + + + + + "Optimized" copy + + + + char + + + + 0.99 + + + + + + + Conventional copy + + + + char + + + + 8.07 + + + + + + + "Optimized" copy + + + + int + + + + 2.52 + + + + + + + Conventional copy + + + + int + + + + 8.02 + + + + + +
+ + Pair of References + + + The optimized copy example shows how type traits may be used to perform optimization + decisions at compile-time. Another important usage of type traits is to allow + code to compile that otherwise would not do so unless excessive partial specialization + is used. This is possible by delegating partial specialization to the type + traits classes. Our example for this form of usage is a pair that can hold + references [6]. + + + First, let us examine the definition of std::pair, omitting + the comparison operators, default constructor, and template copy constructor + for simplicity: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(const T1 & nfirst, const T2 & nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Now, this "pair" cannot hold references as it currently stands, because + the constructor would require taking a reference to a reference, which is currently + illegal [7]. Let us consider what + the constructor's parameters would have to be in order to allow "pair" + to hold non-reference types, references, and constant references: + + Required Constructor Argument Types + + + + + + Type of T1 + + + + Type of parameter to initializing constructor + + + + + + + + + T + + + + const T & + + + + + + + T & + + + + T & + + + + + + + const T & + + + + const T & + + + + + +
+ + A little familiarity with the type traits classes allows us to construct a + single mapping that allows us to determine the type of parameter from the type + of the contained class. The type traits classes provide a transformation add_reference, which + adds a reference to its type, unless it is already a reference. + + Using add_reference to synthesize the correct constructor + type + + + + + + Type of T1 + + + + Type of const T1 + + + + Type of add_reference<const T1>::type + + + + + + + + + T + + + + const T + + + + const T & + + + + + + + T & + + + + T & [8] + + + + T & + + + + + + + const T & + + + + const T & + + + + const T & + + + + + +
+ + This allows us to build a primary template definition for pair + that can contain non-reference types, reference types, and constant reference + types: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(boost::add_reference<const T1>::type nfirst, + boost::add_reference<const T2>::type nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Add back in the standard comparison operators, default constructor, and template + copy constructor (which are all the same), and you have a std::pair that + can hold reference types! + + + This same extension could have been done using partial template specialization + of pair, but to specialize + pair in this way would require + three partial specializations, plus the primary template. Type traits allows + us to define a single primary template that adjusts itself auto-magically to + any of these partial specializations, instead of a brute-force partial specialization + approach. Using type traits in this fashion allows programmers to delegate + partial specialization to the type traits classes, resulting in code that is + easier to maintain and easier to understand. + + + + Conclusion + + + We hope that in this article we have been able to give you some idea of what + type-traits are all about. A more complete listing of the available classes + are in the boost documentation, along with further examples using type traits. + Templates have enabled C++ uses to take the advantage of the code reuse that + generic programming brings; hopefully this article has shown that generic programming + does not have to sink to the lowest common denominator, and that templates + can be optimal as well as generic. + + + + Acknowledgements + + + The authors would like to thank Beman Dawes and Howard Hinnant for their helpful + comments when preparing this article. + + + + References + + + + Nathan C. Myers, C++ Report, June 1995. + + + The type traits library is based upon contributions by Steve Cleary, Beman + Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org. + + + A scalar type is an arithmetic type (i.e. a built-in integer or floating + point type), an enumeration type, a pointer, a pointer to member, or a const- + or volatile-qualified version of one of these types. + + + This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg + 268. + + + The test code is available as part of the boost utility library (see algo_opt_examples.cpp), + the code was compiled with gcc 2.95 with all optimisations turned on, tests + were conducted on a 400MHz Pentium II machine running Microsoft Windows 98. + + + John Maddock and Howard Hinnant have submitted a "compressed_pair" + library to Boost, which uses a technique similar to the one described here + to hold references. Their pair also uses type traits to determine if any + of the types are empty, and will derive instead of contain to conserve space + -- hence the name "compressed". + + + This is actually an issue with the C++ Core Language Working Group (issue + #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow + a "reference to a reference to T" to mean the same thing as a "reference + to T", but only in template instantiation, in a method similar to multiple + cv-qualifiers. + + + For those of you who are wondering why this shouldn't be const-qualified, + remember that references are always implicitly constant (for example, you + can't re-assign a reference). Remember also that "const T &" + is something completely different. For this reason, cv-qualifiers on template + type arguments that are references are ignored. + + +
+
+ <link linkend="boost_typetraits.category"> Type Traits by Category</link> +
+ <link linkend="boost_typetraits.category.value_traits"> Type Traits + that Describe the Properties of a Type</link> + + + Foo2 + Bar2 + + These traits are all value traits, which is to say the + traits classes all inherit from integral_constant, + and are used to access some numerical property of a type. Often this is a + simple true or false Boolean value, but in a few cases may be some other + integer value (for example when dealing with type alignments, or array bounds: + see alignment_of, + rank + and extent). + +
+ <link linkend="boost_typetraits.category.value_traits.primary"> Categorizing + a Type</link> + + These traits identify what "kind" of type some type T is. These are split into two groups: + primary traits which are all mutually exclusive, and composite traits that + are compositions of one or more primary traits. + + + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, + in other words these traits are mutually exclusive. + + + This means that is_integral<T>::value + and is_floating_point<T>::value + will only ever be true for built-in types; if you want to check for a user-defined + class type that behaves "as if" it is an integral or floating + point type, then use the std::numeric_limits + template instead. + + + Synopsis: + + +template <class T> +struct is_array; + +template <class T> +struct is_class; + +template <class T> +struct is_complex; + +template <class T> +struct is_enum; + +template <class T> +struct is_floating_point; + +template <class T> +struct is_function; + +template <class T> +struct is_integral; + +template <class T> +struct is_member_function_pointer; + +template <class T> +struct is_member_object_pointer; + +template <class T> +struct is_pointer; + +template <class T> +struct is_reference; + +template <class T> +struct is_union; + +template <class T> +struct is_void; + + + The following traits are made up of the union of one or more type categorizations. + A type may belong to more than one of these categories, in addition to + one of the primary categories. + + +template <class T> +struct is_arithmetic; + +template <class T> +struct is_compound; + +template <class T> +struct is_fundamental; + +template <class T> +struct is_member_pointer; + +template <class T> +struct is_object; + +template <class T> +struct is_scalar; + +
+
+ <link linkend="boost_typetraits.category.value_traits.properties"> + General Type Properties</link> + + The following templates describe the general properties of a type. + + + Synopsis: + + +template <class T> +struct alignment_of; + +template <class T> +struct has_nothrow_assign; + +template <class T> +struct has_nothrow_constructor; + +template <class T> +struct has_nothrow_default_constructor; + +template <class T> +struct has_nothrow_copy; + +template <class T> +struct has_nothrow_copy_constructor; + +template <class T> +struct has_trivial_assign; + +template <class T> +struct has_trivial_constructor; + +template <class T> +struct has_trivial_default_constructor; + +template <class T> +struct has_trivial_copy; + +template <class T> +struct has_trivial_copy_constructor; + +template <class T> +struct has_trivial_destructor; + +template <class T> +struct has_virtual_destructor; + +template <class T> +struct is_abstract; + +template <class T> +struct is_const; + +template <class T> +struct is_empty; + +template <class T> +struct is_stateless; + +template <class T> +struct is_pod; + +template <class T> +struct is_polymorphic; + +template <class T> +struct is_signed; + +template <class T> +struct is_unsigned; + +template <class T> +struct is_volatile; + +template <class T, std::size_t N = 0> +struct extent; + +template <class T> +struct rank; + +
+
+ <link linkend="boost_typetraits.category.value_traits.relate"> Relationships + Between Two Types</link> + + These templates determine the whether there is a relationship between two + types: + + + Synopsis: + + +template <class Base, class Derived> +struct is_base_of; + +template <class From, class To> +struct is_convertible; + +template <class T, class U> +struct is_same; + +
+
+
+ <link linkend="boost_typetraits.category.transform"> Type Traits that + Transform One Type to Another</link> + + The following templates transform one type to another, based upon some well-defined + rule. Each template has a single member called type + that is the result of applying the transformation to the template argument + T. + + + Synopsis: + + +template <class T> +struct add_const; + +template <class T> +struct add_cv; + +template <class T> +struct add_pointer; + +template <class T> +struct add_reference; + +template <class T> +struct add_volatile; + +template <class T> +struct decay; + +template <class T> +struct floating_point_promotion; + +template <class T> +struct integral_promotion; + +template <class T> +struct make_signed; + +template <class T> +struct make_unsigned; + +template <class T> +struct promote; + +template <class T> +struct remove_all_extents; + +template <class T> +struct remove_const; + +template <class T> +struct remove_cv; + +template <class T> +struct remove_extent; + +template <class T> +struct remove_pointer; + +template <class T> +struct remove_reference; + +template <class T> +struct remove_volatile; + + + + Broken + Compiler Workarounds: + + + For all of these templates support for partial specialization of class templates + is required to correctly implement the transformation. On the other hand, + practice shows that many of the templates from this category are very useful, + and often essential for implementing some generic libraries. Lack of these + templates is often one of the major limiting factors in porting those libraries + to compilers that do not yet support this language feature. As some of these + compilers are going to be around for a while, and at least one of them is + very wide-spread, it was decided that the library should provide workarounds + where possible. + + + The basic idea behind the workaround is to manually define full specializations + of all type transformation templates for all fundamental types, and all their + 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide + a user-level macro that will define all the explicit specializations needed + for any user-defined type T. + + + The first part guarantees the successful compilation of something like this: + + +BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char*, remove_reference<char*&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const*, remove_reference<char const*&>::type>::value)); +... +BOOST_STATIC_ASSERT((is_same<char const volatile* const volatile* const volatile, remove_reference<char const volatile* const volatile* const volatile&>::type>::value)); + + + and the second part provides the library's users with a mechanism to make + the above code work not only for char, + int or other built-in type, + but for their own types as well: + + +namespace myspace{ + struct MyClass {}; +} +// declare this at global scope: +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass) +// transformations on myspace::MyClass now work: +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_const<myspace::MyClass const>::type>::value)); +// etc. + + + Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates + to nothing on those compilers that do support + partial specialization. + +
+
+ <link linkend="boost_typetraits.category.alignment"> Synthesizing Types + with Specific Alignments</link> + + Some low level memory management routines need to synthesize a POD type with + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage + creates a type with a specific size and alignment. + + + Synopsis + + +template <std::size_t Align> +struct type_with_alignment; + +template <std::size_t Size, std::size_t Align> +struct aligned_storage; + +
+
+ <link linkend="boost_typetraits.category.function"> Decomposing Function + Types</link> + + The class template function_traits + extracts information from function types (see also is_function). + This traits class allows you to tell how many arguments a function takes, + what those argument types are, and what the return type is. + + + Synopsis + + +template <std::size_t Align> +struct function_traits; + +
+
+
+ <link linkend="boost_typetraits.user_defined"> User Defined Specializations</link> + + Occationally the end user may need to provide their own specialization for + one of the type traits - typically where intrinsic compiler support is required + to implement a specific trait fully. These specializations should derive from + boost::true_type + or boost::false_type + as appropriate: + + +#include <boost/type_traits/is_pod.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_union.hpp> + +struct my_pod{}; +struct my_union +{ + char c; + int i; +}; + +namespace boost +{ + template<> + struct is_pod<my_pod> : public true_type{}; + + template<> + struct is_pod<my_union> : public true_type{}; + + template<> + struct is_union<my_union> : public true_type{}; + + template<> + struct is_class<my_union> : public false_type{}; +} + +
+
+ <link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link> + + There are some traits that can not be implemented within the current C++ language: + to make these traits "just work" with user defined types, some kind + of additional help from the compiler is required. Currently (April 2008) Visual + C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other + compilers will no doubt follow in due course. + + + The Following traits classes always need compiler support to do the right thing + for all types (but all have safe fallback positions if this support is unavailable): + + + + is_union + + + is_pod + + + has_trivial_constructor + + + has_trivial_copy + + + has_trivial_assign + + + has_trivial_destructor + + + has_nothrow_constructor + + + has_nothrow_copy + + + has_nothrow_assign + + + has_virtual_destructor + + + + The following traits classes can't be portably implemented in the C++ language, + although in practice, the implementations do in fact do the right thing on + all the compilers we know about: + + + + is_empty + + + is_polymorphic + + + + The following traits classes are dependent on one or more of the above: + + + + is_class + + + is_stateless + + + + The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, + adding support for new compilers is simply a matter of defining one of more + of the following macros: + + Macros for Compiler Intrinsics + + + + + + BOOST_IS_UNION(T) + + + + Should evaluate to true if T is a union type + + + + + + + + + BOOST_IS_POD(T) + + + + Should evaluate to true if T is a POD type + + + + + + + BOOST_IS_EMPTY(T) + + + + Should evaluate to true if T is an empty struct or union + + + + + + + BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) + + + + Should evaluate to true if the default constructor for T is trivial (i.e. + has no effect) + + + + + + + BOOST_HAS_TRIVIAL_COPY(T) + + + + Should evaluate to true if T has a trivial copy constructor (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_ASSIGN(T) + + + + Should evaluate to true if T has a trivial assignment operator (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_DESTRUCTOR(T) + + + + Should evaluate to true if T has a trivial destructor (i.e. ~T() has + no effect) + + + + + + + BOOST_HAS_NOTHROW_CONSTRUCTOR(T) + + + + Should evaluate to true if T + x; + can not throw + + + + + + + BOOST_HAS_NOTHROW_COPY(T) + + + + Should evaluate to true if T(t) can not throw + + + + + + + BOOST_HAS_NOTHROW_ASSIGN(T) + + + + Should evaluate to true if T + t, + u; + t = + u can not throw + + + + + + + BOOST_HAS_VIRTUAL_DESTRUCTOR(T) + + + + Should evaluate to true T has a virtual destructor + + + + + + + BOOST_IS_ABSTRACT(T) + + + + Should evaluate to true if T is an abstract type + + + + + + + BOOST_IS_BASE_OF(T,U) + + + + Should evaluate to true if T is a base class of U + + + + + + + BOOST_IS_CLASS(T) + + + + Should evaluate to true if T is a class type + + + + + + + BOOST_IS_CONVERTIBLE(T,U) + + + + Should evaluate to true if T is convertible to U + + + + + + + BOOST_IS_ENUM(T) + + + + Should evaluate to true is T is an enum + + + + + + + BOOST_IS_POLYMORPHIC(T) + + + + Should evaluate to true if T is a polymorphic type + + + + + + + BOOST_ALIGNMENT_OF(T) + + + + Should evaluate to the alignment requirements of type T. + + + + + +
+
+
+ <link linkend="boost_typetraits.mpl"> MPL Interoperability</link> + + All the value based traits in this library conform to MPL's requirements for + an Integral + Constant type: that includes a number of rather intrusive workarounds + for broken compilers. + + + Purely as an implementation detail, this means that true_type + inherits from boost::mpl::true_, + false_type + inherits from boost::mpl::false_, + and integral_constant<T, + v> + inherits from boost::mpl::integral_c<T,v> + (provided T is not bool) + +
+
+ <link linkend="boost_typetraits.examples"> Examples</link> +
+ <link linkend="boost_typetraits.examples.copy"> An Optimized Version + of std::copy</link> + + Demonstrates a version of std::copy + that uses has_trivial_assign + to determine whether to use memcpy + to optimise the copy operation (see copy_example.cpp): + + +// +// opt::copy +// same semantics as std::copy +// calls memcpy where appropriate. +// + +namespace detail{ + +template<typename I1, typename I2, bool b> +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *out = *first; + ++out; + ++first; + } + return out; +} + +template<typename T> +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +{ + memcpy(out, first, (last-first)*sizeof(T)); + return out+(last-first); +} + + +} + +template<typename I1, typename I2> +inline I2 copy(I1 first, I1 last, I2 out) +{ + // + // We can copy with memcpy if T has a trivial assignment operator, + // and if the iterator arguments are actually pointers (this last + // requirement we detect with overload resolution): + // + typedef typename std::iterator_traits<I1>::value_type value_type; + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); +} + +
+
+ <link linkend="boost_typetraits.examples.fill"> An Optimised Version + of std::fill</link> + + Demonstrates a version of std::fill + that uses has_trivial_assign + to determine whether to use memset + to optimise the fill operation (see fill_example.cpp): + + +// +// fill +// same as std::fill, but uses memset where appropriate +// +namespace detail{ + +template <typename I, typename T, bool b> +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *first = val; + ++first; + } +} + +template <typename T> +void do_fill(T* first, T* last, const T& val, const boost::true_type&) +{ + std::memset(first, val, last-first); +} + +} + +template <class I, class T> +inline void fill(I first, I last, const T& val) +{ + // + // We can do an optimised fill if T has a trivial assignment + // operator and if it's size is one: + // + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + detail::do_fill(first, last, val, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.destruct"> An Example that + Omits Destructor Calls For Types with Trivial Destructors</link> + + Demonstrates a simple algorithm that uses __has_trivial_destruct + to determine whether to destructors need to be called (see trivial_destructor_example.cpp): + + +// +// algorithm destroy_array: +// The reverse of std::unitialized_copy, takes a block of +// initialized memory and calls destructors on all objects therein. +// + +namespace detail{ + +template <class T> +void do_destroy_array(T* first, T* last, const boost::false_type&) +{ + while(first != last) + { + first->~T(); + ++first; + } +} + +template <class T> +inline void do_destroy_array(T* first, T* last, const boost::true_type&) +{ +} + +} // namespace detail + +template <class T> +inline void destroy_array(T* p1, T* p2) +{ + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); +} + +
+
+ <link linkend="boost_typetraits.examples.iter"> An improved Version + of std::iter_swap</link> + + Demonstrates a version of std::iter_swap + that use type traits to determine whether an it's arguments are proxying + iterators or not, if they're not then it just does a std::swap + of it's dereferenced arguments (the same as std::iter_swap + does), however if they are proxying iterators then takes special care over + the swap to ensure that the algorithm works correctly for both proxying iterators, + and even iterators of different types (see iter_swap_example.cpp): + + +// +// iter_swap: +// tests whether iterator is a proxying iterator or not, and +// uses optimal form accordingly: +// +namespace detail{ + +template <typename I> +static void do_swap(I one, I two, const boost::false_type&) +{ + typedef typename std::iterator_traits<I>::value_type v_t; + v_t v = *one; + *one = *two; + *two = v; +} +template <typename I> +static void do_swap(I one, I two, const boost::true_type&) +{ + using std::swap; + swap(*one, *two); +} + +} + +template <typename I1, typename I2> +inline void iter_swap(I1 one, I2 two) +{ + // + // See is both arguments are non-proxying iterators, + // and if both iterator the same type: + // + typedef typename std::iterator_traits<I1>::reference r1_t; + typedef typename std::iterator_traits<I2>::reference r2_t; + + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; + + detail::do_swap(one, two, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.to_double"> Convert Numeric + Types and Enums to double</link> + + Demonstrates a conversion of Numeric + Types and enum types to double: + + +template<class T> +inline double to_double(T const& value) +{ + typedef typename boost::promote<T>::type promoted; + return boost::numeric::converter<double,promoted>::convert(value); +} + +
+
+
+ <link linkend="boost_typetraits.reference"> Alphabetical Reference</link> +
+ <link linkend="boost_typetraits.reference.add_const"> add_const</link> + + one + two + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + type: The same type as T + const for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_const<int>::type + + + + int const + + + + + + + add_const<int&>::type + + + + int& + + + + + + + add_const<int*>::type + + + + int* + const + + + + + + + add_const<int const>::type + + + + int const + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_cv"> add_cv</link> + + one + two + three + + + template <class T> +struct add_cv +{ + typedef see-below type; +}; + + + type: The same type as T + const volatile + for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_cv<int>::type + + + + int const + volatile + + + + + + + add_cv<int&>::type + + + + int& + + + + + + + add_cv<int*>::type + + + + int* + const volatile + + + + + + + add_cv<int const>::type + + + + int const + volatile + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link> + +template <class T> +struct add_pointer +{ + typedef see-below type; +}; + + + type: The same type as remove_reference<T>::type*. + + + The rationale for this template is that it produces the same type as TYPEOF(&t), where + t is an object of type T. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_pointer<int>::type + + + + int* + + + + + + + add_pointer<int const&>::type + + + + int const* + + + + + + + add_pointer<int*>::type + + + + int** + + + + + + + add_pointer<int*&>::type + + + + int** + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_reference"> add_reference</link> + +template <class T> +struct add_reference +{ + typedef see-below type; +}; + + + type: If T + is not a reference type then T&, otherwise T. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_reference<int>::type + + + + int& + + + + + + + add_reference<int const&>::type + + + + int const& + + + + + + + add_reference<int*>::type + + + + int*& + + + + + + + add_reference<int*&>::type + + + + int*& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link> + + one + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + + + type: The same type as T + volatile for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_volatile<int>::type + + + + int volatile + + + + + + + add_volatile<int&>::type + + + + int& + + + + + + + add_volatile<int*>::type + + + + int* + volatile + + + + + + + add_volatile<int const>::type + + + + int const + volatile + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link> + +template <std::size_t Size, std::size_t Align> +struct aligned_storage +{ + typedef see-below type; +}; + + + type: a built-in or POD type with size + Size and an alignment that + is a multiple of Align. + + + Header: #include + <boost/type_traits/aligned_storage.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link> + +template <class T> +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {}; + + + Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, + ALIGNOF(T)>, where + ALIGNOF(T)` is the alignment of type T. + + + Note: strictly speaking you should only rely on the value of ALIGNOF(T) being + a multiple of the true alignment of T, although in practice it does compute + the correct value in all the cases we know about. + + + Header: #include + <boost/type_traits/alignment_of.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + alignment_of<int> + inherits from integral_constant<std::size_t, ALIGNOF(int)>. + + +
+
+ + + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + + +
+
+ + + alignment_of<double>::value is an integral constant expression + with value ALIGNOF(double). + + +
+
+ + + alignment_of<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.decay"> decay</link> + +template <class T> +struct decay +{ + typedef see-below type; +}; + + + type: Let U + be the result of remove_reference<T>::type, then if U + is an array type, the result is remove_extent<U>*, + otherwise if U is a function + type then the result is U*, otherwise the result is U. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/decay.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + decay<int[2][3]>::type + + + + int[2]* + + + + + + + decay<int(&)[2]>::type + + + + int* + + + + + + + decay<int(&)(double)>::type + + + + int(*)(double) + + + + + + + int(*)(double + + + + int(*)(double) + + + + + + + int(double) + + + + int(*)(double) + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.extent"> extent</link> + +template <class T, std::size_t N = 0> +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {}; + + + Inherits: Class template extent inherits + from integral_constant<std::size_t, EXTENT(T,N)>, + where EXTENT(T,N) is the number of elements in the N'th array + dimention of type T. + + + If T is not an array type, + or if N > + rank<T>::value, or if the N'th array bound is incomplete, + then EXTENT(T,N) is zero. + + + Header: #include + <boost/type_traits/extent.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + extent<int[1]> inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + extent<double[2][3][4], + 1>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + extent<int[4]>::value + is an integral constant expression that evaluates to 4. + + +
+
+ + + extent<int[][2]>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<int[][2], 1>::value + is an integral constant expression that evaluates to 2. + + +
+
+ + + extent<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.floating_point_promotion"> + floating_point_promotion</link> +template <class T> +struct floating_point_promotion +{ + typedef see-below type; +}; + + + type: If floating point promotion can be + applied to an rvalue of type T, + then applies floating point promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.6. + + + Header: #include + <boost/type_traits/floating_point_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + floating_point_promotion<float + const>::type + + + + double const + + + + + + + floating_point_promotion<float&>::type + + + + float& + + + + + + + floating_point_promotion<short>::type + + + + short + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.function_traits"> function_traits</link> + +template <class F> +struct function_traits +{ + static const std::size_t arity = see-below; + typedef see-below result_type; + typedef see-below argN_type; +}; + + + The class template function_traits will only compile if: + + + + The compiler supports partial specialization of class templates. + + + The template argument F + is a function type, note that this is not the same thing as a pointer + to a function. + + + + + function_traits is intended to introspect only C++ functions of the form + R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member + functions. To convert a function pointer type to a suitable type use remove_pointer. + + + Function Traits Members + + + + + + Member + + + + Description + + + + + + + + + function_traits<F>::arity + + + + An integral constant expression that gives the number of arguments + accepted by the function type F. + + + + + + + function_traits<F>::result_type + + + + The type returned by function type F. + + + + + + + function_traits<F>::argN_type + + + + The Nth argument type of function type F, + where 1 <= + N <= + arity of F. + + + + + +
Examples + + + + + + Expression + + + + Result + + + + + + + + + function_traits<void (void)>::arity + + + + An integral constant expression that has the value 0. + + + + + + + function_traits<long (int)>::arity + + + + An integral constant expression that has the value 1. + + + + + + + function_traits<long (int, long, double, void*)>::arity + + + + An integral constant expression that has the value 4. + + + + + + + function_traits<void (void)>::result_type + + + + The type void. + + + + + + + function_traits<long (int)>::result_type + + + + The type long. + + + + + + + function_traits<long (int)>::arg1_type + + + + The type int. + + + + + + + function_traits<long (int, long, double, void*)>::arg4_type + + + + The type void*. + + + + + + + function_traits<long (int, long, double, void*)>::arg5_type + + + + A compiler error: there is no arg5_type + since there are only four arguments. + + + + + + + function_traits<long (*)(void)>::arity + + + + A compiler error: argument type is a function pointer, + and not a function type. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link> + +template <class T> +struct has_nothrow_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_assign + will never report that a class or struct has a non-throwing assignment-operator; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler support to ensure that this trait "just + works". + + + Header: #include + <boost/type_traits/has_nothrow_assign.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor"> + has_nothrow_constructor</link> +template <class T> +struct has_nothrow_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_constructor + will never report that a class or struct has a non-throwing default-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_constructor.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link> + +template <class T> +struct has_nothrow_copy : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_copy + will never report that a class or struct has a non-throwing copy-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_copy.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link> + + See has_nothrow_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link> + + See has_nothrow_constructor. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link> + +template <class T> +struct has_trivial_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial assignment-operator then the operator has the same + effect as copying the bits of one object to the other: calls to the operator + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_assign + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p11. + + + Header: #include + <boost/type_traits/has_trivial_assign.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_assign<int> + inherits from true_type. + + +
+
+ + + has_trivial_assign<char*>::type is the type true_type. + + +
+
+ + + has_trivial_assign<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_assign<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_assign<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_constructor"> + has_trivial_constructor</link> +template <class T> +struct has_trivial_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial default-constructor then the constructor have no + effect: calls to the constructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_constructor + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.1p6. + + + Header: #include + <boost/type_traits/has_trivial_constructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_constructor<int> inherits from true_type. + + +
+
+ + + has_trivial_constructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_constructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_constructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_constructor<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link> + +template <class T> +struct has_trivial_copy : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial copy-constructor then the constructor has the same + effect as copying the bits of one object to the other: calls to the constructor + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_copy + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p6. + + + Header: #include + <boost/type_traits/has_trivial_copy.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_copy<int> + inherits from true_type. + + +
+
+ + + has_trivial_copy<char*>::type is the type true_type. + + +
+
+ + + has_trivial_copy<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_copy<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_copy<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link> + + See has_trivial_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link> + + See has_trivial_constructor. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link> + +template <class T> +struct has_trivial_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial destructor then the destructor has no effect: calls + to the destructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_destructor + will never report that a user-defined class or struct has a trivial destructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.4p3. + + + Header: #include + <boost/type_traits/has_trivial_destructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_destructor<int> inherits from true_type. + + +
+
+ + + has_trivial_destructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_destructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_destructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_destructor<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link> + +template <class T> +struct has_virtual_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type. + + + Compiler Compatibility: This trait is provided + for completeness, since it's part of the Technical Report on C++ Library + Extensions. However, there is currently no way to portably implement this + trait. The default version provided always inherits from false_type, + and has to be explicitly specialized for types with virtual destructors unless + the compiler used has compiler intrinsics + that enable the trait to do the right thing: currently (May 2005) only Visual + C++ 8 and GCC-4.3 have the necessary intrinsics. + + + C++ Standard Reference: 12.4. + + + Header: #include + <boost/type_traits/has_virtual_destructor.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link> + +template <class T, T val> +struct integral_constant +{ + typedef integral_constant<T, val> type; + typedef T value_type; + static const T value = val; +}; + +typedef integral_constant<bool, true> true_type; +typedef integral_constant<bool, false> false_type; + + + Class template integral_constant + is the common base class for all the value-based type traits. The two typedef's + true_type and false_type are provided for convenience: + most of the value traits are Boolean properties and so will inherit from + one of these. + +
+
+ <link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link> + +template <class T> +struct integral_promotion +{ + typedef see-below type; +}; + + + type: If integral promotion can be applied + to an rvalue of type T, then + applies integral promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field). + + + Header: #include + <boost/type_traits/integral_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + integral_promotion<short + const>::type + + + + int const + + + + + + + integral_promotion<short&>::type + + + + short& + + + + + + + integral_promotion<enum std::float_round_style>::type + + + + int + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link> + +template <class T> +struct is_abstract : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + abstract type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10.3. + + + Header: #include + <boost/type_traits/is_abstract.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: The compiler must + support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + this is the "safe fallback position" for which polymorphic types + are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT + is used to signify that the implementation is buggy, users should check for + this in their own code if the "safe fallback" is not suitable for + their particular use-case. + + + Examples: + +
+ + + Given: class abc{ virtual ~abc() = 0; }; + + +
+
+ + + is_abstract<abc> + inherits from true_type. + + +
+
+ + + is_abstract<abc>::type is the type true_type. + + +
+
+ + + is_abstract<abc const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_abstract<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link> + +template <class T> +struct is_arithmetic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point). + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_arithmetic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_arithmetic<int> + inherits from true_type. + + +
+
+ + + is_arithmetic<char>::type is the type true_type. + + +
+
+ + + is_arithmetic<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_arithmetic<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_array"> is_array</link> + +template <class T> +struct is_array : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + array type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.4. + + + Header: #include + <boost/type_traits/is_array.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can give the wrong result with function types. + + + Examples: + +
+ + + is_array<int[2]> inherits from true_type. + + +
+
+ + + is_array<char[2][3]>::type + is the type true_type. + + +
+
+ + + is_array<double[]>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_array<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link> + +template <class Base, class Derived> +struct is_base_of : public true_type-or-false_type {}; + + + Inherits: If Base is base class of type + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type. + + + This template will detect non-public base classes, and ambiguous base classes. + + + Note that is_base_of<X,X> will always inherit from true_type. + This is the case even if X + is not a class type. This is a change in behaviour from Boost-1.33 + in order to track the Technical Report on C++ Library Extensions. + + + Types Base and Derived must not be incomplete types. + + + C++ Standard Reference: 10. + + + Header: #include + <boost/type_traits/is_base_of.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. There are some older compilers which + will produce compiler errors if Base + is a private base class of Derived, + or if Base is an ambiguous + base of Derived. These compilers + include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and + older versions of EDG based compilers. + + + Examples: + +
+ + + Given: class Base{}; class Derived : + public Base{}; + + +
+
+ + + is_base_of<Base, Derived> + inherits from true_type. + + +
+
+ + + is_base_of<Base, Derived>::type is the type true_type. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Base>::value is an integral constant expression + that evaluates to true: a class is regarded as it's + own base. + + +
+
+ + + is_base_of<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_class"> is_class</link> + +template <class T> +struct is_class : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + class type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 9.2. + + + Header: #include + <boost/type_traits/is_class.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + to correctly identify union types, and therefore make is_class function correctly. + + + Examples: + +
+ + + Given: class MyClass; then: + + +
+
+ + + is_class<MyClass> + inherits from true_type. + + +
+
+ + + is_class<MyClass const>::type + is the type true_type. + + +
+
+ + + is_class<MyClass>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_class<MyClass&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<MyClass*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_complex"> is_complex</link> + +template <class T> +struct is_complex : public true_type-or-false_type {}; + + + Inherits: If T + is a complex number type then true (of type std::complex<U> + for some type U), otherwise + false. + + + C++ Standard Reference: 26.2. + + + Header: #include + <boost/type_traits/is_complex.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.is_compound"> is_compound</link> + +template <class T> +struct is_compound : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental). + + + C++ Standard Reference: 3.9.2. + + + Header: #include + <boost/type_traits/is_compound.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_compound<MyClass> + inherits from true_type. + + +
+
+ + + is_compound<MyEnum>::type is the type true_type. + + +
+
+ + + is_compound<int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int&>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_compound<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_const"> is_const</link> + +template <class T> +struct is_const : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) const-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_const.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_const<int const> inherits from true_type. + + +
+
+ + + is_const<int const volatile>::type is the type true_type. + + +
+
+ + + is_const<int* const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_const<int const*>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int const&>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_const<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link> + +template <class From, class To> +struct is_convertible : public true_type-or-false_type {}; + + + Inherits: If an imaginary lvalue of type + From is convertible to type + To then inherits from true_type, + otherwise inherits from false_type. + + + Type From must not be an incomplete type. + + + Type To must not be an incomplete, or function type. + + + No types are considered to be convertible to array types or abstract-class + types. + + + This template can not detect whether a converting-constructor is public or not: if type To + has a private converting constructor + from type From then instantiating + is_convertible<From, To> + will produce a compiler error. For this reason is_convertible + can not be used to determine whether a type has a public + copy-constructor or not. + + + This template will also produce compiler errors if the conversion is ambiguous, + for example: + + +struct A {}; +struct B : A {}; +struct C : A {}; +struct D : B, C {}; +// This produces a compiler error, the conversion is ambiguous: +bool const y = boost::is_convertible<D*,A*>::value; + + + C++ Standard Reference: 4 and 8.5. + + + Compiler Compatibility: This template is + currently broken with Borland C++ Builder 5 (and earlier), for constructor-based + conversions, and for the Metrowerks 7 (and earlier) compiler in all cases. + If the compiler does not support is_abstract, + then the template parameter To + must not be an abstract type. + + + Header: #include + <boost/type_traits/is_convertible.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_convertible<int, double> + inherits from true_type. + + +
+
+ + + is_convertible<const int, double>::type + is the type true_type. + + +
+
+ + + is_convertible<int* const, int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_convertible<int const*, int*>::value + is an integral constant expression that evaluates to false: + the conversion would require a const_cast. + + +
+
+ + + is_convertible<int const&, long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_convertible<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_convertible<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_empty"> is_empty</link> + +template <class T> +struct is_empty : public true_type-or-false_type {}; + + + Inherits: If T is an empty class type then + inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10p5. + + + Header: #include + <boost/type_traits/is_empty.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: In order to correctly + detect empty classes this trait relies on either: + + + + the compiler implementing zero sized empty base classes, or + + + the compiler providing intrinsics + to detect empty classes. + + + + Can not be used with incomplete types. + + + Can not be used with union types, until is_union can be made to work. + + + If the compiler does not support partial-specialization of class templates, + then this template can not be used with abstract types. + + + Examples: + +
+ + + Given: struct empty_class + {}; + + +
+
+ + + is_empty<empty_class> + inherits from true_type. + + +
+
+ + + is_empty<empty_class const>::type + is the type true_type. + + +
+
+ + + is_empty<empty_class>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_empty<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_enum"> is_enum</link> + +template <class T> +struct is_enum : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + enum type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 7.2. + + + Header: #include + <boost/type_traits/is_enum.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Requires a correctly + functioning is_convertible + template; this means that is_enum is currently broken under Borland C++ Builder + 5, and for the Metrowerks compiler prior to version 8, other compilers should + handle this template just fine. + + + Examples: + +
+ + + Given: enum my_enum + { one, two }; + + +
+
+ + + is_enum<my_enum> + inherits from true_type. + + +
+
+ + + is_enum<my_enum const>::type + is the type true_type. + + +
+
+ + + is_enum<my_enum>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_enum<my_enum&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<my_enum*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link> + +template <class T> +struct is_floating_point : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + floating point type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_floating_point.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_floating_point<float> + inherits from true_type. + + +
+
+ + + is_floating_point<double>::type is the type true_type. + + +
+
+ + + is_floating_point<long double>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_floating_point<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_function"> is_function</link> + +template <class T> +struct is_function : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + function type then inherits from true_type, + otherwise inherits from false_type. + Note that this template does not detect pointers to functions, + or references to functions, these are detected by is_pointer and is_reference respectively: + + +typedef int f1(); // f1 is of function type. +typedef int (f2*)(); // f2 is a pointer to a function. +typedef int (f3&)(); // f3 is a reference to a function. + + + C++ Standard Reference: 3.9.2p1 and 8.3.5. + + + Header: #include + <boost/type_traits/is_function.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_function<int (void)> + inherits from true_type. + + +
+
+ + + is_function<long (double, int)>::type is the type true_type. + + +
+
+ + + is_function<long (double, int)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_function<long (*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer type, not a function type. + + +
+
+ + + is_function<long (&)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a reference to a function, not a function type. + + +
+
+ + + is_function<long (MyClass::*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer to a member function. + + +
+
+ + + is_function<T>::value_type is the type bool. + + +
+ + + Don't confuse function-types with pointers to functions: + + + typedef int + f(double); + + + defines a function type, + + + f foo; + + + declares a prototype for a function of type f, + + + f* + pf = + foo; + + + f& + fr = + foo; + + + declares a pointer and a reference to the function foo. + + + If you want to detect whether some type is a pointer-to-function then use: + + + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value + + + or for pointers to member functions you can just use is_member_function_pointer + directly. + + +
+
+ <link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link> + +template <class T> +struct is_fundamental : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + fundamental type then inherits from true_type, + otherwise inherits from false_type. + Fundamental types include integral, floating point and void types (see also + is_integral, + is_floating_point + and is_void) + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/is_fundamental.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_fundamental<int)> + inherits from true_type. + + +
+
+ + + is_fundamental<double const>::type + is the type true_type. + + +
+
+ + + is_fundamental<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_fundamental<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_integral"> is_integral</link> + +template <class T> +struct is_integral : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + integral type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p7. + + + Header: #include + <boost/type_traits/is_integral.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_integral<int> + inherits from true_type. + + +
+
+ + + is_integral<const char>::type + is the type true_type. + + +
+
+ + + is_integral<long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_integral<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_function_pointer"> + is_member_function_pointer</link> +template <class T> +struct is_member_function_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member function then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_function_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(char)>::type + is the type true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(void)const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a data member and not a member + function, see is_member_object_pointer + and is_member_pointer + + +
+
+ + + is_member_function_pointer<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_object_pointer"> + is_member_object_pointer</link> +template <class T> +struct is_member_object_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_object_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_object_pointer<int (MyClass::*)> inherits from true_type. + + +
+
+ + + is_member_object_pointer<double (MyClass::*)>::type + is the type true_type. + + +
+
+ + + is_member_object_pointer<const int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_object_pointer<int (MyClass::*)(void)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a member function and not a + member object, see is_member_function_pointer + and is_member_pointer + + +
+
+ + + is_member_object_pointer<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link> + +template <class T> +struct is_member_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member (either a function or a data member) then inherits from + true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_pointer<int (MyClass::*)> + inherits from true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_pointer<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_object"> is_object</link> + +template <class T> +struct is_object : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + object type then inherits from true_type, + otherwise inherits from false_type. + All types are object types except references, void, and function types. + + + C++ Standard Reference: 3.9p9. + + + Header: #include + <boost/type_traits/is_object.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_object<int> + inherits from true_type. + + +
+
+ + + is_object<int*>::type is the type true_type. + + +
+
+ + + is_object<int (*)(void)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int &>::value is an integral constant expression + that evaluates to false: reference types are not + objects + + +
+
+ + + is_object<int (double)>::value is an integral constant expression + that evaluates to false: function types are not + objects + + +
+
+ + + is_object<const void>::value + is an integral constant expression that evaluates to false: + void is not an object type + + +
+
+ + + is_object<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pod"> is_pod</link> + +template <class T> +struct is_pod : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + POD type then inherits from true_type, + otherwise inherits from false_type. + + + POD stands for "Plain old data". Arithmetic types, and enumeration + types, a pointers and pointer to members are all PODs. Classes and unions + can also be POD's if they have no non-static data members that are of reference + or non-POD type, no user defined constructors, no user defined assignment + operators, no private or protected non-static data members, no virtual functions + and no base classes. Finally, a cv-qualified POD is still a POD, as is an + array of PODs. + + + C++ Standard Reference: 3.9p10 and 9p4 (Note + that POD's are also aggregates, see 8.5.1). + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, ispod + will never report that a class or struct is a POD; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler-_intrinsics. + + + Header: #include + <boost/type_traits/is_pod.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pod<int> + inherits from true_type. + + +
+
+ + + is_pod<char*>::type is the type true_type. + + +
+
+ + + is_pod<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pod<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pod<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link> + +template <class T> +struct is_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer type (includes function pointers, but excludes pointers to members) + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2p2 and 8.3.1. + + + Header: #include + <boost/type_traits/is_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pointer<int*> + inherits from true_type. + + +
+
+ + + is_pointer<char* const>::type is the type true_type. + + +
+
+ + + is_pointer<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pointer<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<int (MyClass::*)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<T>::value_type is the type bool. + + +
+ + + is_pointer detects "real" + pointer types only, and not smart pointers. Users + should not specialise is_pointer + for smart pointer types, as doing so may cause Boost (and other third party) + code to fail to function correctly. Users wanting a trait to detect smart + pointers should create their own. However, note that there is no way in + general to auto-magically detect smart pointer types, so such a trait would + have to be partially specialised for each supported smart pointer type. + + +
+
+ <link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link> + +template <class T> +struct is_polymorphic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + polymorphic type then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + C++ Standard Reference: 10.3. + + + Compiler Compatibility: The implementation + requires some knowledge of the compilers ABI, it does actually seem to work + with the majority of compilers though. + + + Header: #include + <boost/type_traits/is_polymorphic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + Given: class poly{ virtual ~poly(); }; + + +
+
+ + + is_polymorphic<poly> + inherits from true_type. + + +
+
+ + + is_polymorphic<poly const>::type + is the type true_type. + + +
+
+ + + is_polymorphic<poly>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_polymorphic<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_same"> is_same</link> + +template <class T, class U> +struct is_same : public true_type-or-false_type {}; + + + Inherits: If T and U are the same types + then inherits from true_type, + otherwise inherits from false_type. + + + Header: #include + <boost/type_traits/is_same.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with abstract, incomplete or function types. + + + Examples: + +
+ + + is_same<int, int> + inherits from true_type. + + +
+
+ + + is_same<int, int>::type is the type true_type. + + +
+
+ + + is_same<int, int>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_same<int const, int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_same<int&, int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_same<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link> + +template <class T> +struct is_scalar : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + scalar type then inherits from true_type, + otherwise inherits from false_type. + Scalar types include integral, floating point, enumeration, pointer, and + pointer-to-member types. + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_scalar.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Examples: + +
+ + + is_scalar<int*> + inherits from true_type. + + +
+
+ + + is_scalar<int>::type is the type true_type. + + +
+
+ + + is_scalar<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_signed"> is_signed</link> + +template <class T> +struct is_signed : public true_type-or-false_type {}; + + + Inherits: If T is an signed integer type + or an enumerated type with an underlying signed integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_signed.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_signed<int> + inherits from true_type. + + +
+
+ + + is_signed<int const volatile>::type is the type true_type. + + +
+
+ + + is_signed<unsigned int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_signed<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_signed<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_signed<long long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_signed<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link> + +template <class T> +struct is_stateless : public true_type-or-false_type {}; + + + Inherits: Ff T is a stateless type then + inherits from true_type, + otherwise from false_type. + + + Type T must be a complete type. + + + A stateless type is a type that has no storage and whose constructors and + destructors are trivial. That means that is_stateless + only inherits from true_type + if the following expression is true: + + +::boost::has_trivial_constructor<T>::value +&& ::boost::has_trivial_copy<T>::value +&& ::boost::has_trivial_destructor<T>::value +&& ::boost::is_class<T>::value +&& ::boost::is_empty<T>::value + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_stateless.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, is_stateless will + never report that a class or struct is stateless; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler intrinsics + to make this template work automatically. + +
+
+ <link linkend="boost_typetraits.reference.is_reference"> is_reference</link> + +template <class T> +struct is_reference : public true_type-or-false_type {}; + + + Inherits: If T is a reference pointer type + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + may report the wrong result for function types, and for types that are both + const and volatile qualified. + + + Header: #include + <boost/type_traits/is_reference.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_reference<int&> + inherits from true_type. + + +
+
+ + + is_reference<int const&>::type + is the type true_type. + + +
+
+ + + is_reference<int (&)(long)>::value is an integral constant expression + that evaluates to true (the argument in this case + is a reference to a function). + + +
+
+ + + is_reference<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_union"> is_union</link> + +template <class T> +struct is_union : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + union type then inherits from true_type, + otherwise inherits from false_type. + Currently requires some kind of compiler support, otherwise unions are identified + as classes. + + + C++ Standard Reference: 3.9.2 and 9.5. + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types using only standard C++, as a result this type will never + inherit from true_type, + unless the user explicitly specializes the template for their user-defined + union types, or unless the compiler supplies some unspecified intrinsic that + implements this functionality. Currently (May 2005) only Visual C++ 8 has + the necessary compiler intrinsics + to make this trait "just work" without user intervention. + + + Header: #include + <boost/type_traits/is_union.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_union<void> + inherits from true_type. + + +
+
+ + + is_union<const void>::type + is the type true_type. + + +
+
+ + + is_union<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_union<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_union<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link> + +template <class T> +struct is_unsigned : public true_type-or-false_type {}; + + + Inherits: If T is an unsigned integer type + or an enumerated type with an underlying unsigned integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_unsigned.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_unsigned<unsigned int> inherits from true_type. + + +
+
+ + + is_unsigned<unsigned int + const volatile>::type + is the type true_type. + + +
+
+ + + is_unsigned<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_unsigned<unsigned long + long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_unsigned<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_void"> is_void</link> + +template <class T> +struct is_void : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + void type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p9. + + + Header: #include + <boost/type_traits/is_void.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_void<void> + inherits from true_type. + + +
+
+ + + is_void<const void>::type + is the type true_type. + + +
+
+ + + is_void<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_void<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_void<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link> + +template <class T> +struct is_volatile : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) volatile-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_volatile.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_volatile<volatile int> inherits from true_type. + + +
+
+ + + is_volatile<const volatile + int>::type is the type true_type. + + +
+
+ + + is_volatile<int* volatile>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_volatile<int volatile*>::value + is an integral constant expression that evaluates to false: + the volatile qualifier is not at the top level in this case. + + +
+
+ + + is_volatile<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.make_signed"> make_signed</link> + +template <class T> +struct make_signed +{ + typedef see-below type; +}; + + + type: If T is a signed integer type then + the same type as T, if T is an unsigned integer type then the corresponding + signed type. Otherwise if T is an enumerated or character type (char or wchar_t) + then a signed integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_signed.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + int + + + + + + + make_signed<unsigned int + const>::type + + + + int const + + + + + + + make_signed<const unsigned + long long>::type + + + + const long + long + + + + + + + make_signed<my_enum>::type + + + + A signed integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + A signed integer type with the same width as wchar_t. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link> + +template <class T> +struct make_unsigned +{ + typedef see-below type; +}; + + + type: If T is a unsigned integer type then + the same type as T, if T is an signed integer type then the corresponding + unsigned type. Otherwise if T is an enumerated or character type (char or + wchar_t) then an unsigned integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_unsigned.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + unsigned int + + + + + + + make_signed<unsigned int + const>::type + + + + unsigned int + const + + + + + + + make_signed<const unsigned + long long>::type + + + + const unsigned + long long + + + + + + + make_signed<my_enum>::type + + + + An unsigned integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + An unsigned integer type with the same width as wchar_t. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.promote"> promote</link> + +template <class T> +struct promote +{ + typedef see-below type; +}; + + + type: If integral or floating point promotion + can be applied to an rvalue of type T, + then applies integral and floating point promotions to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + See also integral_promotion + and floating_point_promotion. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field) and 4.6. + + + Header: #include + <boost/type_traits/promote.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + promote<short volatile>::type + + + + int volatile + + + + + + + promote<float const>::type + + + + double const + + + + + + + promote<short&>::type + + + + short& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.rank"> rank</link> + +template <class T> +struct rank : public integral_constant<std::size_t, RANK(T)> {}; + + + Inherits: Class template rank inherits from + integral_constant<std::size_t, RANK(T)>, + where RANK(T) is the + number of array dimensions in type T. + + + If T is not an array type, + then RANK(T) is zero. + + + Header: #include + <boost/type_traits/rank.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + rank<int[]> + inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + rank<int[1]>::value + is an integral constant expression that evaluates to 1. + + +
+
+ + + rank<int[][2]>::value is an integral constant expression + that evaluates to 2. + + +
+
+ + + rank<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + rank<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link> + +template <class T> +struct remove_all_extents +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes all of the array bounds on T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_all_extents.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_all_extents<int>::type + + + + int + + + + + + + remove_all_extents<int const[2]>::type + + + + int const + + + + + + + remove_all_extents<int[][2]>::type + + + + int + + + + + + + remove_all_extents<int[2][3][4]>::type + + + + int + + + + + + + remove_all_extents<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_const"> remove_const</link> + +template <class T> +struct remove_const +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level const-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_const<int>::type + + + + int + + + + + + + remove_const<int const>::type + + + + int + + + + + + + remove_const<int const + volatile>::type + + + + int volatile + + + + + + + remove_const<int const&>::type + + + + int const& + + + + + + + remove_const<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link> + +template <class T> +struct remove_cv +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level cv-qualifiers removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_cv<int>::type + + + + int + + + + + + + remove_cv<int const>::type + + + + int + + + + + + + remove_cv<int const + volatile>::type + + + + int + + + + + + + remove_cv<int const&>::type + + + + int const& + + + + + + + remove_cv<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link> + +template <class T> +struct remove_extent +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes the topmost array bound, otherwise leaves + T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_extent.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_extent<int>::type + + + + int + + + + + + + remove_extent<int const[2]>::type + + + + int const + + + + + + + remove_extent<int[2][4]>::type + + + + int[4] + + + + + + + remove_extent<int[][2]>::type + + + + int[2] + + + + + + + remove_extent<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link> + +template <class T> +struct remove_pointer +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any pointer modifier removed. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_pointer<int>::type + + + + int + + + + + + + remove_pointer<int const*>::type + + + + int const + + + + + + + remove_pointer<int const**>::type + + + + int const* + + + + + + + remove_pointer<int&>::type + + + + int& + + + + + + + remove_pointer<int*&>::type + + + + int*& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link> + +template <class T> +struct remove_reference +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any reference modifier removed. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_reference<int>::type + + + + int + + + + + + + remove_reference<int const&>::type + + + + int const + + + + + + + remove_reference<int*>::type + + + + int* + + + + + + + remove_reference<int*&>::type + + + + int* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link> + +template <class T> +struct remove_volatile +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level volatile-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_volatile<int>::type + + + + int + + + + + + + remove_volatile<int volatile>::type + + + + int + + + + + + + remove_volatile<int const + volatile>::type + + + + int const + + + + + + + remove_volatile<int volatile&>::type + + + + int const& + + + + + + + remove_volatile<int volatile*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link> + +template <std::size_t Align> +struct type_with_alignment +{ + typedef see-below type; +}; + + + type: a built-in or POD type with an alignment + that is a multiple of Align. + + + Header: #include + <boost/type_traits/type_with_alignment.hpp> + or #include <boost/type_traits.hpp> + +
+
+
+ <link linkend="boost_typetraits.credits"> Credits</link> + + This documentation was pulled together by John Maddock, using Boost.Quickbook + and Boost.DocBook. + + + The original version of this library was created by Steve Cleary, Beman Dawes, + Howard Hinnant, and John Maddock. John Maddock is the current maintainer of + the library. + + + This version of type traits library is based on contributions by Adobe Systems + Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, + Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert + Ramey and Jeremy Siek. + + + Mat Marcus and Jesse Jones invented, and published + a paper describing, the partial specialization workarounds used in + this library. + + + Aleksey Gurtovoy added MPL integration to the library. + + + The is_convertible + template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: + Mappings between Types and Values". + + + The latest version of this library and documentation can be found at www.boost.org. Bugs, suggestions and discussion + should be directed to boost@lists.boost.org (see www.boost.org/more/mailing_lists.htm#main + for subscription details). + +
+ +
+ This section must not be indexed. + + template <class T> +struct add_const +{ + typedef see-below type; +}; + +
+ +
+ This section contains one block that must not be indexed and one that should be. + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + +
+ + +
+ Class Index + A C D E F H I M O P R TAadd_constadd_cvadd_pointeradd_referenceadd_volatileadd_volatileThis section contains one block that must not be indexed and one that should be.aligned_storagealignment_ofCConstrained Index Termadd_constDdecayEextentFfloating_point_promotionfunction_traitsHhas_nothrow_assignhas_nothrow_constructorhas_nothrow_copyhas_nothrow_copy_constructorhas_nothrow_copyhas_nothrow_default_constructorhas_nothrow_constructorhas_trivial_assignhas_trivial_copyhas_trivial_copy_constructorhas_trivial_copyhas_trivial_default_constructorhas_trivial_constructorhas_trivial_destructorhas_virtual_destructorIintegral_constantalignment_ofextentintegral_constantrankintegral_promotionis_abstractis_arithmeticis_arrayis_base_ofis_classis_classUser Defined Specializationsis_complexis_compoundis_constis_convertibleis_emptyis_enumis_floating_pointis_functionis_fundamentalis_integralis_member_function_pointeris_member_object_pointeris_member_pointeris_objectis_pointerBackground and Tutorialis_pointeris_polymorphicis_referenceis_sameis_scalaris_signedis_unionis_unionUser Defined Specializationsis_unsignedis_voidBackground and Tutorialis_voidis_volatileMmake_signedmake_unsignedOoneadd_volatiletwoadd_constthreeadd_cvPpromoteRremove_all_extentsremove_constremove_cvremove_extentBackground and Tutorialremove_extentremove_pointerremove_referenceremove_volatileTtype_with_alignment
+
+ Typedef Index + F R T VFfalse_typeintegral_constantRresult_typefunction_traitsTtrue_typeintegral_constantVvalue_typeAn Optimized Version of std::copyintegral_constant
+
+ Macro Index + BBBOOST_ALIGNMENT_OFSupport for Compiler IntrinsicsBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONType Traits that Transform One Type to AnotherBOOST_HAS_NOTHROW_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_VIRTUAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_IS_ABSTRACTSupport for Compiler IntrinsicsBOOST_IS_BASE_OFSupport for Compiler IntrinsicsBOOST_IS_CLASSSupport for Compiler IntrinsicsBOOST_IS_CONVERTIBLESupport for Compiler IntrinsicsBOOST_IS_EMPTYSupport for Compiler IntrinsicsBOOST_IS_ENUMSupport for Compiler IntrinsicsBOOST_IS_PODSupport for Compiler IntrinsicsBOOST_IS_POLYMORPHICSupport for Compiler IntrinsicsBOOST_IS_UNIONSupport for Compiler Intrinsics
+
+ Index Test 1 + TTtype-traitsIntroduction
+
+ Index Test 2 + TTtype-traitsBackground and Tutorial
+
IndexA B C D E F H I M O P R S T U VAadd_constadd_constConstrained Index Termadd_cvadd_pointeradd_referenceadd_volatileadd_volatileThis section contains one block that must not be indexed and one that should be.aligned_storagealignment_ofalignment_ofintegral_constantBBackground and Tutorialis_pointeris_voidremove_extenttype-traitsBOOST_ALIGNMENT_OFSupport for Compiler IntrinsicsBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONType Traits that Transform One Type to AnotherBOOST_HAS_NOTHROW_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_VIRTUAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_IS_ABSTRACTSupport for Compiler IntrinsicsBOOST_IS_BASE_OFSupport for Compiler IntrinsicsBOOST_IS_CLASSSupport for Compiler IntrinsicsBOOST_IS_CONVERTIBLESupport for Compiler IntrinsicsBOOST_IS_EMPTYSupport for Compiler IntrinsicsBOOST_IS_ENUMSupport for Compiler IntrinsicsBOOST_IS_PODSupport for Compiler IntrinsicsBOOST_IS_POLYMORPHICSupport for Compiler IntrinsicsBOOST_IS_UNIONSupport for Compiler IntrinsicsCConstrained Index Termadd_constDdecayEextentextentintegral_constantFfalse_typeintegral_constantfloating_point_promotionFoo1Background and TutorialFoo2Bar2Type Traits that Describe the Properties of a Typefunction_traitsfunction_traitsresult_typeHhas_nothrow_assignhas_nothrow_constructorhas_nothrow_constructorhas_nothrow_default_constructorhas_nothrow_copyhas_nothrow_copyhas_nothrow_copy_constructorhas_nothrow_copy_constructorhas_nothrow_copyhas_nothrow_default_constructorhas_nothrow_constructorhas_trivial_assignhas_trivial_constructorhas_trivial_default_constructorhas_trivial_copyhas_trivial_copyhas_trivial_copy_constructorhas_trivial_copy_constructorhas_trivial_copyhas_trivial_default_constructorhas_trivial_constructorhas_trivial_destructorhas_virtual_destructorIintegral_constantalignment_ofextentfalse_typeintegral_constantranktrue_typevalue_typeintegral_promotionIntroductiontype-traitsis_abstractis_arithmeticis_arrayis_base_ofis_classis_classUser Defined Specializationsis_complexis_compoundis_constis_convertibleis_emptyis_enumis_floating_pointis_functionis_fundamentalis_integralis_member_function_pointeris_member_object_pointeris_member_pointeris_objectis_pointerBackground and Tutorialis_pointeris_polymorphicis_referenceis_sameis_scalaris_signedis_unionis_unionUser Defined Specializationsis_unsignedis_voidBackground and Tutorialis_voidis_volatileMmake_signedmake_unsignedOoneadd_volatiletwoadd_constthreeadd_cvOptimized Version of std::copyvalue_typePpromoteRrankintegral_constantremove_all_extentsremove_constremove_cvremove_extentBackground and Tutorialremove_extentremove_pointerremove_referenceremove_volatileresult_typefunction_traitsSSupport for Compiler IntrinsicsBOOST_ALIGNMENT_OFBOOST_HAS_NOTHROW_ASSIGNBOOST_HAS_NOTHROW_CONSTRUCTORBOOST_HAS_NOTHROW_COPYBOOST_HAS_TRIVIAL_ASSIGNBOOST_HAS_TRIVIAL_CONSTRUCTORBOOST_HAS_TRIVIAL_COPYBOOST_HAS_TRIVIAL_DESTRUCTORBOOST_HAS_VIRTUAL_DESTRUCTORBOOST_IS_ABSTRACTBOOST_IS_BASE_OFBOOST_IS_CLASSBOOST_IS_CONVERTIBLEBOOST_IS_EMPTYBOOST_IS_ENUMBOOST_IS_PODBOOST_IS_POLYMORPHICBOOST_IS_UNIONTThis section contains one block that must not be indexed and one that should be.add_volatiletrue_typeintegral_constantType Traits that Transform One Type to AnotherBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONtype-traitsBackground and TutorialIntroductiontype_with_alignmentUUser Defined Specializationsis_classis_unionVvalue_typeAn Optimized Version of std::copyintegral_constant
+ +
\ No newline at end of file diff --git a/src/boost/tools/auto_index/test/test3.gold b/src/boost/tools/auto_index/test/test3.gold new file mode 100644 index 000000000..2da88c93d --- /dev/null +++ b/src/boost/tools/auto_index/test/test3.gold @@ -0,0 +1,6671 @@ + + + + + + + various authors + + 2000 2006 Adobe Systems Inc, David Abrahams, + Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat + Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert + Ramey and Jeremy Siek + + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + Boost.TypeTraits + + A printer-friendly PDF + version of this manual is also available. + +
+ <link linkend="boost_typetraits.intro"> Introduction</link> + + The Boost type-traits library contains a set of very specific traits classes, + each of which encapsulate a single trait from the C++ type system; for example, + is a type a pointer or a reference type? Or does a type have a trivial constructor, + or a const-qualifier? + + + The type-traits classes share a unified design: each class inherits from a + the type true_type + if the type has the specified property and inherits from false_type + otherwise. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. + +
+
+ <link linkend="boost_typetraits.background"> Background and Tutorial</link> + + The following is an updated version of the article "C++ Type traits" + by John Maddock and Steve Cleary that appeared in the October 2000 issue of + Dr Dobb's Journal. + + + Generic programming (writing code which works with any data type meeting a + set of requirements) has become the method of choice for providing reusable + code. However, there are times in generic programming when "generic" + just isn't good enough - sometimes the differences between types are too large + for an efficient generic implementation. This is when the traits technique + becomes important - by encapsulating those properties that need to be considered + on a type by type basis inside a traits class, we can minimize the amount of + code that has to differ from one type to another, and maximize the amount of + generic code. + + + + + Foo1 + + Consider an example: when working with character strings, one common operation + is to determine the length of a null terminated string. Clearly it's possible + to write generic code that can do this, but it turns out that there are much + more efficient methods available: for example, the C library functions strlen and wcslen + are usually written in assembler, and with suitable hardware support can be + considerably faster than a generic version written in C++. The authors of the + C++ standard library realized this, and abstracted the properties of char and wchar_t + into the class char_traits. + Generic code that works with character strings can simply use char_traits<>::length to determine the length of a null + terminated string, safe in the knowledge that specializations of char_traits will use the most appropriate + method available to them. + + + + Type Traits + + + Class char_traits is a classic + example of a collection of type specific properties wrapped up in a single + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very + specific traits classes, each of which encapsulate a single trait from the + C++ type system; for example, is a type a pointer or a reference type? Or does + a type have a trivial constructor, or a const-qualifier? The type-traits classes + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type + otherwise. As we will show, these classes can be used in generic programming + to determine the properties of a given type and introduce optimizations that + are appropriate for that case. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. All of the type-traits classes are + defined inside namespace boost; + for brevity, namespace-qualification is omitted in most of the code samples + given. + + + + Implementation + + + There are far too many separate classes contained in the type-traits library + to give a full implementation here - see the source code in the Boost library + for the full details - however, most of the implementation is fairly repetitive + anyway, so here we will just give you a flavor for how some of the classes + are implemented. Beginning with possibly the simplest class in the library, + is_void<T> inherits + from true_type + only if T is void. + + +template <typename T> +struct is_void : public false_type{}; + +template <> +struct is_void<void> : public true_type{}; + + + Here we define a primary version of the template class is_void, + and provide a full-specialization when T + is void. While full specialization + of a template class is an important technique, sometimes we need a solution + that is halfway between a fully generic solution, and a full specialization. + This is exactly the situation for which the standards committee defined partial + template-class specialization. As an example, consider the class boost::is_pointer<T>: + here we needed a primary version that handles all the cases where T is not + a pointer, and a partial specialization to handle all the cases where T is + a pointer: + + +template <typename T> +struct is_pointer : public false_type{}; + +template <typename T> +struct is_pointer<T*> : public true_type{}; + + + The syntax for partial specialization is somewhat arcane and could easily occupy + an article in its own right; like full specialization, in order to write a + partial specialization for a class, you must first declare the primary template. + The partial specialization contains an extra <...> after the class name + that contains the partial specialization parameters; these define the types + that will bind to that partial specialization rather than the default template. + The rules for what can appear in a partial specialization are somewhat convoluted, + but as a rule of thumb if you can legally write two function overloads of the + form: + + +void foo(T); +void foo(U); + + + Then you can also write a partial specialization of the form: + + +template <typename T> +class c{ /*details*/ }; + +template <typename T> +class c<U>{ /*details*/ }; + + + This rule is by no means foolproof, but it is reasonably simple to remember + and close enough to the actual rule to be useful for everyday use. + + + As a more complex example of partial specialization consider the class remove_extent<T>. This + class defines a single typedef-member type + that is the same type as T but with any top-level array bounds removed; this + is an example of a traits class that performs a transformation on a type: + + +template <typename T> +struct remove_extent +{ typedef T type; }; + +template <typename T, std::size_t N> +struct remove_extent<T[N]> +{ typedef T type; }; + + + The aim of remove_extent + is this: imagine a generic algorithm that is passed an array type as a template + parameter, remove_extent + provides a means of determining the underlying type of the array. For example + remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of + template parameters in a partial specialization does not have to match the + number in the default template. However, the number of parameters that appear + after the class name do have to match the number and type of the parameters + in the default template. + + + + Optimized copy + + + As an example of how the type traits classes can be used, consider the standard + library algorithm copy: + + +template<typename Iter1, typename Iter2> +Iter2 copy(Iter1 first, Iter1 last, Iter2 out); + + + Obviously, there's no problem writing a generic version of copy that works + for all iterator types Iter1 + and Iter2; however, there are + some circumstances when the copy operation can best be performed by a call + to memcpy. In order to implement + copy in terms of memcpy all + of the following conditions need to be met: + + + + Both of the iterator types Iter1 + and Iter2 must be pointers. + + + Both Iter1 and Iter2 must point to the same type - excluding + const and volatile-qualifiers. + + + The type pointed to by Iter1 + must have a trivial assignment operator. + + + + By trivial assignment operator we mean that the type is either a scalar type[3] or: + + + + The type has no user defined assignment operator. + + + The type does not have any data members that are references. + + + All base classes, and all data member objects must have trivial assignment + operators. + + + + If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated + assignment operator. The type-traits library provides a class has_trivial_assign, + such that has_trivial_assign<T>::value is true only if T has a trivial assignment + operator. This class "just works" for scalar types, but has to be + explicitly specialised for class/struct types that also happen to have a trivial + assignment operator. In other words if has_trivial_assign + gives the wrong answer, it will give the "safe" wrong answer - that + trivial assignment is not allowable. + + + The code for an optimized version of copy that uses memcpy + where appropriate is given in the + examples. The code begins by defining a template function do_copy that performs a "slow but safe" + copy. The last parameter passed to this function may be either a true_type + or a false_type. + Following that there is an overload of docopy that + uses `memcpy`: this time the iterators are required to actually be pointers + to the same type, and the final parameter must be a `_true_type. Finally, the version + of copy calls + docopy`, passing `_has_trivial_assign<value_type>()` + as the final parameter: this will dispatch to the optimized version where appropriate, + otherwise it will call the "slow but safe version". + + + + Was it worth it? + + + It has often been repeated in these columns that "premature optimization + is the root of all evil" [4]. + So the question must be asked: was our optimization premature? To put this + in perspective the timings for our version of copy compared a conventional + generic copy[5] are shown in table + 1. + + + Clearly the optimization makes a difference in this case; but, to be fair, + the timings are loaded to exclude cache miss effects - without this accurate + comparison between algorithms becomes difficult. However, perhaps we can add + a couple of caveats to the premature optimization rule: + + + + If you use the right algorithm for the job in the first place then optimization + will not be required; in some cases, memcpy is the right algorithm. + + + If a component is going to be reused in many places by many people then optimizations + may well be worthwhile where they would not be so for a single case - in + other words, the likelihood that the optimization will be absolutely necessary + somewhere, sometime is that much higher. Just as importantly the perceived + value of the stock implementation will be higher: there is no point standardizing + an algorithm if users reject it on the grounds that there are better, more + heavily optimized versions available. + + + Time taken to copy 1000 elements using `copy<const + T*, T*>` (times in micro-seconds) + + + + + + Version + + + + T + + + + Time + + + + + + + + + "Optimized" copy + + + + char + + + + 0.99 + + + + + + + Conventional copy + + + + char + + + + 8.07 + + + + + + + "Optimized" copy + + + + int + + + + 2.52 + + + + + + + Conventional copy + + + + int + + + + 8.02 + + + + + +
+ + Pair of References + + + The optimized copy example shows how type traits may be used to perform optimization + decisions at compile-time. Another important usage of type traits is to allow + code to compile that otherwise would not do so unless excessive partial specialization + is used. This is possible by delegating partial specialization to the type + traits classes. Our example for this form of usage is a pair that can hold + references [6]. + + + First, let us examine the definition of std::pair, omitting + the comparison operators, default constructor, and template copy constructor + for simplicity: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(const T1 & nfirst, const T2 & nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Now, this "pair" cannot hold references as it currently stands, because + the constructor would require taking a reference to a reference, which is currently + illegal [7]. Let us consider what + the constructor's parameters would have to be in order to allow "pair" + to hold non-reference types, references, and constant references: + + Required Constructor Argument Types + + + + + + Type of T1 + + + + Type of parameter to initializing constructor + + + + + + + + + T + + + + const T & + + + + + + + T & + + + + T & + + + + + + + const T & + + + + const T & + + + + + +
+ + A little familiarity with the type traits classes allows us to construct a + single mapping that allows us to determine the type of parameter from the type + of the contained class. The type traits classes provide a transformation add_reference, which + adds a reference to its type, unless it is already a reference. + + Using add_reference to synthesize the correct constructor + type + + + + + + Type of T1 + + + + Type of const T1 + + + + Type of add_reference<const T1>::type + + + + + + + + + T + + + + const T + + + + const T & + + + + + + + T & + + + + T & [8] + + + + T & + + + + + + + const T & + + + + const T & + + + + const T & + + + + + +
+ + This allows us to build a primary template definition for pair + that can contain non-reference types, reference types, and constant reference + types: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(boost::add_reference<const T1>::type nfirst, + boost::add_reference<const T2>::type nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Add back in the standard comparison operators, default constructor, and template + copy constructor (which are all the same), and you have a std::pair that + can hold reference types! + + + This same extension could have been done using partial template specialization + of pair, but to specialize + pair in this way would require + three partial specializations, plus the primary template. Type traits allows + us to define a single primary template that adjusts itself auto-magically to + any of these partial specializations, instead of a brute-force partial specialization + approach. Using type traits in this fashion allows programmers to delegate + partial specialization to the type traits classes, resulting in code that is + easier to maintain and easier to understand. + + + + Conclusion + + + We hope that in this article we have been able to give you some idea of what + type-traits are all about. A more complete listing of the available classes + are in the boost documentation, along with further examples using type traits. + Templates have enabled C++ uses to take the advantage of the code reuse that + generic programming brings; hopefully this article has shown that generic programming + does not have to sink to the lowest common denominator, and that templates + can be optimal as well as generic. + + + + Acknowledgements + + + The authors would like to thank Beman Dawes and Howard Hinnant for their helpful + comments when preparing this article. + + + + References + + + + Nathan C. Myers, C++ Report, June 1995. + + + The type traits library is based upon contributions by Steve Cleary, Beman + Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org. + + + A scalar type is an arithmetic type (i.e. a built-in integer or floating + point type), an enumeration type, a pointer, a pointer to member, or a const- + or volatile-qualified version of one of these types. + + + This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg + 268. + + + The test code is available as part of the boost utility library (see algo_opt_examples.cpp), + the code was compiled with gcc 2.95 with all optimisations turned on, tests + were conducted on a 400MHz Pentium II machine running Microsoft Windows 98. + + + John Maddock and Howard Hinnant have submitted a "compressed_pair" + library to Boost, which uses a technique similar to the one described here + to hold references. Their pair also uses type traits to determine if any + of the types are empty, and will derive instead of contain to conserve space + -- hence the name "compressed". + + + This is actually an issue with the C++ Core Language Working Group (issue + #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow + a "reference to a reference to T" to mean the same thing as a "reference + to T", but only in template instantiation, in a method similar to multiple + cv-qualifiers. + + + For those of you who are wondering why this shouldn't be const-qualified, + remember that references are always implicitly constant (for example, you + can't re-assign a reference). Remember also that "const T &" + is something completely different. For this reason, cv-qualifiers on template + type arguments that are references are ignored. + + +
+
+ <link linkend="boost_typetraits.category"> Type Traits by Category</link> +
+ <link linkend="boost_typetraits.category.value_traits"> Type Traits + that Describe the Properties of a Type</link> + + + Foo2 + Bar2 + + These traits are all value traits, which is to say the + traits classes all inherit from integral_constant, + and are used to access some numerical property of a type. Often this is a + simple true or false Boolean value, but in a few cases may be some other + integer value (for example when dealing with type alignments, or array bounds: + see alignment_of, + rank + and extent). + +
+ <link linkend="boost_typetraits.category.value_traits.primary"> Categorizing + a Type</link> + + These traits identify what "kind" of type some type T is. These are split into two groups: + primary traits which are all mutually exclusive, and composite traits that + are compositions of one or more primary traits. + + + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, + in other words these traits are mutually exclusive. + + + This means that is_integral<T>::value + and is_floating_point<T>::value + will only ever be true for built-in types; if you want to check for a user-defined + class type that behaves "as if" it is an integral or floating + point type, then use the std::numeric_limits + template instead. + + + Synopsis: + + +template <class T> +struct is_array; + +template <class T> +struct is_class; + +template <class T> +struct is_complex; + +template <class T> +struct is_enum; + +template <class T> +struct is_floating_point; + +template <class T> +struct is_function; + +template <class T> +struct is_integral; + +template <class T> +struct is_member_function_pointer; + +template <class T> +struct is_member_object_pointer; + +template <class T> +struct is_pointer; + +template <class T> +struct is_reference; + +template <class T> +struct is_union; + +template <class T> +struct is_void; + + + The following traits are made up of the union of one or more type categorizations. + A type may belong to more than one of these categories, in addition to + one of the primary categories. + + +template <class T> +struct is_arithmetic; + +template <class T> +struct is_compound; + +template <class T> +struct is_fundamental; + +template <class T> +struct is_member_pointer; + +template <class T> +struct is_object; + +template <class T> +struct is_scalar; + +
+
+ <link linkend="boost_typetraits.category.value_traits.properties"> + General Type Properties</link> + + The following templates describe the general properties of a type. + + + Synopsis: + + +template <class T> +struct alignment_of; + +template <class T> +struct has_nothrow_assign; + +template <class T> +struct has_nothrow_constructor; + +template <class T> +struct has_nothrow_default_constructor; + +template <class T> +struct has_nothrow_copy; + +template <class T> +struct has_nothrow_copy_constructor; + +template <class T> +struct has_trivial_assign; + +template <class T> +struct has_trivial_constructor; + +template <class T> +struct has_trivial_default_constructor; + +template <class T> +struct has_trivial_copy; + +template <class T> +struct has_trivial_copy_constructor; + +template <class T> +struct has_trivial_destructor; + +template <class T> +struct has_virtual_destructor; + +template <class T> +struct is_abstract; + +template <class T> +struct is_const; + +template <class T> +struct is_empty; + +template <class T> +struct is_stateless; + +template <class T> +struct is_pod; + +template <class T> +struct is_polymorphic; + +template <class T> +struct is_signed; + +template <class T> +struct is_unsigned; + +template <class T> +struct is_volatile; + +template <class T, std::size_t N = 0> +struct extent; + +template <class T> +struct rank; + +
+
+ <link linkend="boost_typetraits.category.value_traits.relate"> Relationships + Between Two Types</link> + + These templates determine the whether there is a relationship between two + types: + + + Synopsis: + + +template <class Base, class Derived> +struct is_base_of; + +template <class From, class To> +struct is_convertible; + +template <class T, class U> +struct is_same; + +
+
+
+ <link linkend="boost_typetraits.category.transform"> Type Traits that + Transform One Type to Another</link> + + The following templates transform one type to another, based upon some well-defined + rule. Each template has a single member called type + that is the result of applying the transformation to the template argument + T. + + + Synopsis: + + +template <class T> +struct add_const; + +template <class T> +struct add_cv; + +template <class T> +struct add_pointer; + +template <class T> +struct add_reference; + +template <class T> +struct add_volatile; + +template <class T> +struct decay; + +template <class T> +struct floating_point_promotion; + +template <class T> +struct integral_promotion; + +template <class T> +struct make_signed; + +template <class T> +struct make_unsigned; + +template <class T> +struct promote; + +template <class T> +struct remove_all_extents; + +template <class T> +struct remove_const; + +template <class T> +struct remove_cv; + +template <class T> +struct remove_extent; + +template <class T> +struct remove_pointer; + +template <class T> +struct remove_reference; + +template <class T> +struct remove_volatile; + + + + Broken + Compiler Workarounds: + + + For all of these templates support for partial specialization of class templates + is required to correctly implement the transformation. On the other hand, + practice shows that many of the templates from this category are very useful, + and often essential for implementing some generic libraries. Lack of these + templates is often one of the major limiting factors in porting those libraries + to compilers that do not yet support this language feature. As some of these + compilers are going to be around for a while, and at least one of them is + very wide-spread, it was decided that the library should provide workarounds + where possible. + + + The basic idea behind the workaround is to manually define full specializations + of all type transformation templates for all fundamental types, and all their + 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide + a user-level macro that will define all the explicit specializations needed + for any user-defined type T. + + + The first part guarantees the successful compilation of something like this: + + +BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char*, remove_reference<char*&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const*, remove_reference<char const*&>::type>::value)); +... +BOOST_STATIC_ASSERT((is_same<char const volatile* const volatile* const volatile, remove_reference<char const volatile* const volatile* const volatile&>::type>::value)); + + + and the second part provides the library's users with a mechanism to make + the above code work not only for char, + int or other built-in type, + but for their own types as well: + + +namespace myspace{ + struct MyClass {}; +} +// declare this at global scope: +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass) +// transformations on myspace::MyClass now work: +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_const<myspace::MyClass const>::type>::value)); +// etc. + + + Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates + to nothing on those compilers that do support + partial specialization. + +
+
+ <link linkend="boost_typetraits.category.alignment"> Synthesizing Types + with Specific Alignments</link> + + Some low level memory management routines need to synthesize a POD type with + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage + creates a type with a specific size and alignment. + + + Synopsis + + +template <std::size_t Align> +struct type_with_alignment; + +template <std::size_t Size, std::size_t Align> +struct aligned_storage; + +
+
+ <link linkend="boost_typetraits.category.function"> Decomposing Function + Types</link> + + The class template function_traits + extracts information from function types (see also is_function). + This traits class allows you to tell how many arguments a function takes, + what those argument types are, and what the return type is. + + + Synopsis + + +template <std::size_t Align> +struct function_traits; + +
+
+
+ <link linkend="boost_typetraits.user_defined"> User Defined Specializations</link> + + Occationally the end user may need to provide their own specialization for + one of the type traits - typically where intrinsic compiler support is required + to implement a specific trait fully. These specializations should derive from + boost::true_type + or boost::false_type + as appropriate: + + +#include <boost/type_traits/is_pod.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_union.hpp> + +struct my_pod{}; +struct my_union +{ + char c; + int i; +}; + +namespace boost +{ + template<> + struct is_pod<my_pod> : public true_type{}; + + template<> + struct is_pod<my_union> : public true_type{}; + + template<> + struct is_union<my_union> : public true_type{}; + + template<> + struct is_class<my_union> : public false_type{}; +} + +
+
+ <link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link> + + There are some traits that can not be implemented within the current C++ language: + to make these traits "just work" with user defined types, some kind + of additional help from the compiler is required. Currently (April 2008) Visual + C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other + compilers will no doubt follow in due course. + + + The Following traits classes always need compiler support to do the right thing + for all types (but all have safe fallback positions if this support is unavailable): + + + + is_union + + + is_pod + + + has_trivial_constructor + + + has_trivial_copy + + + has_trivial_assign + + + has_trivial_destructor + + + has_nothrow_constructor + + + has_nothrow_copy + + + has_nothrow_assign + + + has_virtual_destructor + + + + The following traits classes can't be portably implemented in the C++ language, + although in practice, the implementations do in fact do the right thing on + all the compilers we know about: + + + + is_empty + + + is_polymorphic + + + + The following traits classes are dependent on one or more of the above: + + + + is_class + + + is_stateless + + + + The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, + adding support for new compilers is simply a matter of defining one of more + of the following macros: + + Macros for Compiler Intrinsics + + + + + + BOOST_IS_UNION(T) + + + + Should evaluate to true if T is a union type + + + + + + + + + BOOST_IS_POD(T) + + + + Should evaluate to true if T is a POD type + + + + + + + BOOST_IS_EMPTY(T) + + + + Should evaluate to true if T is an empty struct or union + + + + + + + BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) + + + + Should evaluate to true if the default constructor for T is trivial (i.e. + has no effect) + + + + + + + BOOST_HAS_TRIVIAL_COPY(T) + + + + Should evaluate to true if T has a trivial copy constructor (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_ASSIGN(T) + + + + Should evaluate to true if T has a trivial assignment operator (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_DESTRUCTOR(T) + + + + Should evaluate to true if T has a trivial destructor (i.e. ~T() has + no effect) + + + + + + + BOOST_HAS_NOTHROW_CONSTRUCTOR(T) + + + + Should evaluate to true if T + x; + can not throw + + + + + + + BOOST_HAS_NOTHROW_COPY(T) + + + + Should evaluate to true if T(t) can not throw + + + + + + + BOOST_HAS_NOTHROW_ASSIGN(T) + + + + Should evaluate to true if T + t, + u; + t = + u can not throw + + + + + + + BOOST_HAS_VIRTUAL_DESTRUCTOR(T) + + + + Should evaluate to true T has a virtual destructor + + + + + + + BOOST_IS_ABSTRACT(T) + + + + Should evaluate to true if T is an abstract type + + + + + + + BOOST_IS_BASE_OF(T,U) + + + + Should evaluate to true if T is a base class of U + + + + + + + BOOST_IS_CLASS(T) + + + + Should evaluate to true if T is a class type + + + + + + + BOOST_IS_CONVERTIBLE(T,U) + + + + Should evaluate to true if T is convertible to U + + + + + + + BOOST_IS_ENUM(T) + + + + Should evaluate to true is T is an enum + + + + + + + BOOST_IS_POLYMORPHIC(T) + + + + Should evaluate to true if T is a polymorphic type + + + + + + + BOOST_ALIGNMENT_OF(T) + + + + Should evaluate to the alignment requirements of type T. + + + + + +
+
+
+ <link linkend="boost_typetraits.mpl"> MPL Interoperability</link> + + All the value based traits in this library conform to MPL's requirements for + an Integral + Constant type: that includes a number of rather intrusive workarounds + for broken compilers. + + + Purely as an implementation detail, this means that true_type + inherits from boost::mpl::true_, + false_type + inherits from boost::mpl::false_, + and integral_constant<T, + v> + inherits from boost::mpl::integral_c<T,v> + (provided T is not bool) + +
+
+ <link linkend="boost_typetraits.examples"> Examples</link> +
+ <link linkend="boost_typetraits.examples.copy"> An Optimized Version + of std::copy</link> + + Demonstrates a version of std::copy + that uses has_trivial_assign + to determine whether to use memcpy + to optimise the copy operation (see copy_example.cpp): + + +// +// opt::copy +// same semantics as std::copy +// calls memcpy where appropriate. +// + +namespace detail{ + +template<typename I1, typename I2, bool b> +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *out = *first; + ++out; + ++first; + } + return out; +} + +template<typename T> +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +{ + memcpy(out, first, (last-first)*sizeof(T)); + return out+(last-first); +} + + +} + +template<typename I1, typename I2> +inline I2 copy(I1 first, I1 last, I2 out) +{ + // + // We can copy with memcpy if T has a trivial assignment operator, + // and if the iterator arguments are actually pointers (this last + // requirement we detect with overload resolution): + // + typedef typename std::iterator_traits<I1>::value_type value_type; + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); +} + +
+
+ <link linkend="boost_typetraits.examples.fill"> An Optimised Version + of std::fill</link> + + Demonstrates a version of std::fill + that uses has_trivial_assign + to determine whether to use memset + to optimise the fill operation (see fill_example.cpp): + + +// +// fill +// same as std::fill, but uses memset where appropriate +// +namespace detail{ + +template <typename I, typename T, bool b> +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *first = val; + ++first; + } +} + +template <typename T> +void do_fill(T* first, T* last, const T& val, const boost::true_type&) +{ + std::memset(first, val, last-first); +} + +} + +template <class I, class T> +inline void fill(I first, I last, const T& val) +{ + // + // We can do an optimised fill if T has a trivial assignment + // operator and if it's size is one: + // + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + detail::do_fill(first, last, val, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.destruct"> An Example that + Omits Destructor Calls For Types with Trivial Destructors</link> + + Demonstrates a simple algorithm that uses __has_trivial_destruct + to determine whether to destructors need to be called (see trivial_destructor_example.cpp): + + +// +// algorithm destroy_array: +// The reverse of std::unitialized_copy, takes a block of +// initialized memory and calls destructors on all objects therein. +// + +namespace detail{ + +template <class T> +void do_destroy_array(T* first, T* last, const boost::false_type&) +{ + while(first != last) + { + first->~T(); + ++first; + } +} + +template <class T> +inline void do_destroy_array(T* first, T* last, const boost::true_type&) +{ +} + +} // namespace detail + +template <class T> +inline void destroy_array(T* p1, T* p2) +{ + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); +} + +
+
+ <link linkend="boost_typetraits.examples.iter"> An improved Version + of std::iter_swap</link> + + Demonstrates a version of std::iter_swap + that use type traits to determine whether an it's arguments are proxying + iterators or not, if they're not then it just does a std::swap + of it's dereferenced arguments (the same as std::iter_swap + does), however if they are proxying iterators then takes special care over + the swap to ensure that the algorithm works correctly for both proxying iterators, + and even iterators of different types (see iter_swap_example.cpp): + + +// +// iter_swap: +// tests whether iterator is a proxying iterator or not, and +// uses optimal form accordingly: +// +namespace detail{ + +template <typename I> +static void do_swap(I one, I two, const boost::false_type&) +{ + typedef typename std::iterator_traits<I>::value_type v_t; + v_t v = *one; + *one = *two; + *two = v; +} +template <typename I> +static void do_swap(I one, I two, const boost::true_type&) +{ + using std::swap; + swap(*one, *two); +} + +} + +template <typename I1, typename I2> +inline void iter_swap(I1 one, I2 two) +{ + // + // See is both arguments are non-proxying iterators, + // and if both iterator the same type: + // + typedef typename std::iterator_traits<I1>::reference r1_t; + typedef typename std::iterator_traits<I2>::reference r2_t; + + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; + + detail::do_swap(one, two, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.to_double"> Convert Numeric + Types and Enums to double</link> + + Demonstrates a conversion of Numeric + Types and enum types to double: + + +template<class T> +inline double to_double(T const& value) +{ + typedef typename boost::promote<T>::type promoted; + return boost::numeric::converter<double,promoted>::convert(value); +} + +
+
+
+ <link linkend="boost_typetraits.reference"> Alphabetical Reference</link> +
+ <link linkend="boost_typetraits.reference.add_const"> add_const</link> + + one + two + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + type: The same type as T + const for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_const<int>::type + + + + int const + + + + + + + add_const<int&>::type + + + + int& + + + + + + + add_const<int*>::type + + + + int* + const + + + + + + + add_const<int const>::type + + + + int const + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_cv"> add_cv</link> + + one + two + three + + + template <class T> +struct add_cv +{ + typedef see-below type; +}; + + + type: The same type as T + const volatile + for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_cv<int>::type + + + + int const + volatile + + + + + + + add_cv<int&>::type + + + + int& + + + + + + + add_cv<int*>::type + + + + int* + const volatile + + + + + + + add_cv<int const>::type + + + + int const + volatile + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link> + +template <class T> +struct add_pointer +{ + typedef see-below type; +}; + + + type: The same type as remove_reference<T>::type*. + + + The rationale for this template is that it produces the same type as TYPEOF(&t), where + t is an object of type T. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_pointer<int>::type + + + + int* + + + + + + + add_pointer<int const&>::type + + + + int const* + + + + + + + add_pointer<int*>::type + + + + int** + + + + + + + add_pointer<int*&>::type + + + + int** + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_reference"> add_reference</link> + +template <class T> +struct add_reference +{ + typedef see-below type; +}; + + + type: If T + is not a reference type then T&, otherwise T. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_reference<int>::type + + + + int& + + + + + + + add_reference<int const&>::type + + + + int const& + + + + + + + add_reference<int*>::type + + + + int*& + + + + + + + add_reference<int*&>::type + + + + int*& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link> + + one + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + + + type: The same type as T + volatile for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_volatile<int>::type + + + + int volatile + + + + + + + add_volatile<int&>::type + + + + int& + + + + + + + add_volatile<int*>::type + + + + int* + volatile + + + + + + + add_volatile<int const>::type + + + + int const + volatile + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link> + +template <std::size_t Size, std::size_t Align> +struct aligned_storage +{ + typedef see-below type; +}; + + + type: a built-in or POD type with size + Size and an alignment that + is a multiple of Align. + + + Header: #include + <boost/type_traits/aligned_storage.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link> + +template <class T> +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {}; + + + Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, + ALIGNOF(T)>, where + ALIGNOF(T)` is the alignment of type T. + + + Note: strictly speaking you should only rely on the value of ALIGNOF(T) being + a multiple of the true alignment of T, although in practice it does compute + the correct value in all the cases we know about. + + + Header: #include + <boost/type_traits/alignment_of.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + alignment_of<int> + inherits from integral_constant<std::size_t, ALIGNOF(int)>. + + +
+
+ + + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + + +
+
+ + + alignment_of<double>::value is an integral constant expression + with value ALIGNOF(double). + + +
+
+ + + alignment_of<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.decay"> decay</link> + +template <class T> +struct decay +{ + typedef see-below type; +}; + + + type: Let U + be the result of remove_reference<T>::type, then if U + is an array type, the result is remove_extent<U>*, + otherwise if U is a function + type then the result is U*, otherwise the result is U. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/decay.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + decay<int[2][3]>::type + + + + int[2]* + + + + + + + decay<int(&)[2]>::type + + + + int* + + + + + + + decay<int(&)(double)>::type + + + + int(*)(double) + + + + + + + int(*)(double + + + + int(*)(double) + + + + + + + int(double) + + + + int(*)(double) + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.extent"> extent</link> + +template <class T, std::size_t N = 0> +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {}; + + + Inherits: Class template extent inherits + from integral_constant<std::size_t, EXTENT(T,N)>, + where EXTENT(T,N) is the number of elements in the N'th array + dimention of type T. + + + If T is not an array type, + or if N > + rank<T>::value, or if the N'th array bound is incomplete, + then EXTENT(T,N) is zero. + + + Header: #include + <boost/type_traits/extent.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + extent<int[1]> inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + extent<double[2][3][4], + 1>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + extent<int[4]>::value + is an integral constant expression that evaluates to 4. + + +
+
+ + + extent<int[][2]>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<int[][2], 1>::value + is an integral constant expression that evaluates to 2. + + +
+
+ + + extent<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.floating_point_promotion"> + floating_point_promotion</link> +template <class T> +struct floating_point_promotion +{ + typedef see-below type; +}; + + + type: If floating point promotion can be + applied to an rvalue of type T, + then applies floating point promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.6. + + + Header: #include + <boost/type_traits/floating_point_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + floating_point_promotion<float + const>::type + + + + double const + + + + + + + floating_point_promotion<float&>::type + + + + float& + + + + + + + floating_point_promotion<short>::type + + + + short + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.function_traits"> function_traits</link> + +template <class F> +struct function_traits +{ + static const std::size_t arity = see-below; + typedef see-below result_type; + typedef see-below argN_type; +}; + + + The class template function_traits will only compile if: + + + + The compiler supports partial specialization of class templates. + + + The template argument F + is a function type, note that this is not the same thing as a pointer + to a function. + + + + + function_traits is intended to introspect only C++ functions of the form + R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member + functions. To convert a function pointer type to a suitable type use remove_pointer. + + + Function Traits Members + + + + + + Member + + + + Description + + + + + + + + + function_traits<F>::arity + + + + An integral constant expression that gives the number of arguments + accepted by the function type F. + + + + + + + function_traits<F>::result_type + + + + The type returned by function type F. + + + + + + + function_traits<F>::argN_type + + + + The Nth argument type of function type F, + where 1 <= + N <= + arity of F. + + + + + +
Examples + + + + + + Expression + + + + Result + + + + + + + + + function_traits<void (void)>::arity + + + + An integral constant expression that has the value 0. + + + + + + + function_traits<long (int)>::arity + + + + An integral constant expression that has the value 1. + + + + + + + function_traits<long (int, long, double, void*)>::arity + + + + An integral constant expression that has the value 4. + + + + + + + function_traits<void (void)>::result_type + + + + The type void. + + + + + + + function_traits<long (int)>::result_type + + + + The type long. + + + + + + + function_traits<long (int)>::arg1_type + + + + The type int. + + + + + + + function_traits<long (int, long, double, void*)>::arg4_type + + + + The type void*. + + + + + + + function_traits<long (int, long, double, void*)>::arg5_type + + + + A compiler error: there is no arg5_type + since there are only four arguments. + + + + + + + function_traits<long (*)(void)>::arity + + + + A compiler error: argument type is a function pointer, + and not a function type. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link> + +template <class T> +struct has_nothrow_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_assign + will never report that a class or struct has a non-throwing assignment-operator; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler support to ensure that this trait "just + works". + + + Header: #include + <boost/type_traits/has_nothrow_assign.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor"> + has_nothrow_constructor</link> +template <class T> +struct has_nothrow_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_constructor + will never report that a class or struct has a non-throwing default-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_constructor.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link> + +template <class T> +struct has_nothrow_copy : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_copy + will never report that a class or struct has a non-throwing copy-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_copy.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link> + + See has_nothrow_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link> + + See has_nothrow_constructor. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link> + +template <class T> +struct has_trivial_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial assignment-operator then the operator has the same + effect as copying the bits of one object to the other: calls to the operator + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_assign + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p11. + + + Header: #include + <boost/type_traits/has_trivial_assign.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_assign<int> + inherits from true_type. + + +
+
+ + + has_trivial_assign<char*>::type is the type true_type. + + +
+
+ + + has_trivial_assign<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_assign<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_assign<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_constructor"> + has_trivial_constructor</link> +template <class T> +struct has_trivial_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial default-constructor then the constructor have no + effect: calls to the constructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_constructor + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.1p6. + + + Header: #include + <boost/type_traits/has_trivial_constructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_constructor<int> inherits from true_type. + + +
+
+ + + has_trivial_constructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_constructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_constructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_constructor<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link> + +template <class T> +struct has_trivial_copy : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial copy-constructor then the constructor has the same + effect as copying the bits of one object to the other: calls to the constructor + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_copy + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p6. + + + Header: #include + <boost/type_traits/has_trivial_copy.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_copy<int> + inherits from true_type. + + +
+
+ + + has_trivial_copy<char*>::type is the type true_type. + + +
+
+ + + has_trivial_copy<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_copy<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_copy<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link> + + See has_trivial_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link> + + See has_trivial_constructor. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link> + +template <class T> +struct has_trivial_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial destructor then the destructor has no effect: calls + to the destructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_destructor + will never report that a user-defined class or struct has a trivial destructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.4p3. + + + Header: #include + <boost/type_traits/has_trivial_destructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_destructor<int> inherits from true_type. + + +
+
+ + + has_trivial_destructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_destructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_destructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_destructor<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link> + +template <class T> +struct has_virtual_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type. + + + Compiler Compatibility: This trait is provided + for completeness, since it's part of the Technical Report on C++ Library + Extensions. However, there is currently no way to portably implement this + trait. The default version provided always inherits from false_type, + and has to be explicitly specialized for types with virtual destructors unless + the compiler used has compiler intrinsics + that enable the trait to do the right thing: currently (May 2005) only Visual + C++ 8 and GCC-4.3 have the necessary intrinsics. + + + C++ Standard Reference: 12.4. + + + Header: #include + <boost/type_traits/has_virtual_destructor.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link> + +template <class T, T val> +struct integral_constant +{ + typedef integral_constant<T, val> type; + typedef T value_type; + static const T value = val; +}; + +typedef integral_constant<bool, true> true_type; +typedef integral_constant<bool, false> false_type; + + + Class template integral_constant + is the common base class for all the value-based type traits. The two typedef's + true_type and false_type are provided for convenience: + most of the value traits are Boolean properties and so will inherit from + one of these. + +
+
+ <link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link> + +template <class T> +struct integral_promotion +{ + typedef see-below type; +}; + + + type: If integral promotion can be applied + to an rvalue of type T, then + applies integral promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field). + + + Header: #include + <boost/type_traits/integral_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + integral_promotion<short + const>::type + + + + int const + + + + + + + integral_promotion<short&>::type + + + + short& + + + + + + + integral_promotion<enum std::float_round_style>::type + + + + int + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link> + +template <class T> +struct is_abstract : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + abstract type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10.3. + + + Header: #include + <boost/type_traits/is_abstract.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: The compiler must + support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + this is the "safe fallback position" for which polymorphic types + are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT + is used to signify that the implementation is buggy, users should check for + this in their own code if the "safe fallback" is not suitable for + their particular use-case. + + + Examples: + +
+ + + Given: class abc{ virtual ~abc() = 0; }; + + +
+
+ + + is_abstract<abc> + inherits from true_type. + + +
+
+ + + is_abstract<abc>::type is the type true_type. + + +
+
+ + + is_abstract<abc const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_abstract<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link> + +template <class T> +struct is_arithmetic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point). + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_arithmetic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_arithmetic<int> + inherits from true_type. + + +
+
+ + + is_arithmetic<char>::type is the type true_type. + + +
+
+ + + is_arithmetic<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_arithmetic<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_array"> is_array</link> + +template <class T> +struct is_array : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + array type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.4. + + + Header: #include + <boost/type_traits/is_array.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can give the wrong result with function types. + + + Examples: + +
+ + + is_array<int[2]> inherits from true_type. + + +
+
+ + + is_array<char[2][3]>::type + is the type true_type. + + +
+
+ + + is_array<double[]>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_array<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link> + +template <class Base, class Derived> +struct is_base_of : public true_type-or-false_type {}; + + + Inherits: If Base is base class of type + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type. + + + This template will detect non-public base classes, and ambiguous base classes. + + + Note that is_base_of<X,X> will always inherit from true_type. + This is the case even if X + is not a class type. This is a change in behaviour from Boost-1.33 + in order to track the Technical Report on C++ Library Extensions. + + + Types Base and Derived must not be incomplete types. + + + C++ Standard Reference: 10. + + + Header: #include + <boost/type_traits/is_base_of.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. There are some older compilers which + will produce compiler errors if Base + is a private base class of Derived, + or if Base is an ambiguous + base of Derived. These compilers + include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and + older versions of EDG based compilers. + + + Examples: + +
+ + + Given: class Base{}; class Derived : + public Base{}; + + +
+
+ + + is_base_of<Base, Derived> + inherits from true_type. + + +
+
+ + + is_base_of<Base, Derived>::type is the type true_type. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Base>::value is an integral constant expression + that evaluates to true: a class is regarded as it's + own base. + + +
+
+ + + is_base_of<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_class"> is_class</link> + +template <class T> +struct is_class : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + class type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 9.2. + + + Header: #include + <boost/type_traits/is_class.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + to correctly identify union types, and therefore make is_class function correctly. + + + Examples: + +
+ + + Given: class MyClass; then: + + +
+
+ + + is_class<MyClass> + inherits from true_type. + + +
+
+ + + is_class<MyClass const>::type + is the type true_type. + + +
+
+ + + is_class<MyClass>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_class<MyClass&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<MyClass*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_complex"> is_complex</link> + +template <class T> +struct is_complex : public true_type-or-false_type {}; + + + Inherits: If T + is a complex number type then true (of type std::complex<U> + for some type U), otherwise + false. + + + C++ Standard Reference: 26.2. + + + Header: #include + <boost/type_traits/is_complex.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.is_compound"> is_compound</link> + +template <class T> +struct is_compound : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental). + + + C++ Standard Reference: 3.9.2. + + + Header: #include + <boost/type_traits/is_compound.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_compound<MyClass> + inherits from true_type. + + +
+
+ + + is_compound<MyEnum>::type is the type true_type. + + +
+
+ + + is_compound<int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int&>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_compound<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_const"> is_const</link> + +template <class T> +struct is_const : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) const-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_const.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_const<int const> inherits from true_type. + + +
+
+ + + is_const<int const volatile>::type is the type true_type. + + +
+
+ + + is_const<int* const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_const<int const*>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int const&>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_const<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link> + +template <class From, class To> +struct is_convertible : public true_type-or-false_type {}; + + + Inherits: If an imaginary lvalue of type + From is convertible to type + To then inherits from true_type, + otherwise inherits from false_type. + + + Type From must not be an incomplete type. + + + Type To must not be an incomplete, or function type. + + + No types are considered to be convertible to array types or abstract-class + types. + + + This template can not detect whether a converting-constructor is public or not: if type To + has a private converting constructor + from type From then instantiating + is_convertible<From, To> + will produce a compiler error. For this reason is_convertible + can not be used to determine whether a type has a public + copy-constructor or not. + + + This template will also produce compiler errors if the conversion is ambiguous, + for example: + + +struct A {}; +struct B : A {}; +struct C : A {}; +struct D : B, C {}; +// This produces a compiler error, the conversion is ambiguous: +bool const y = boost::is_convertible<D*,A*>::value; + + + C++ Standard Reference: 4 and 8.5. + + + Compiler Compatibility: This template is + currently broken with Borland C++ Builder 5 (and earlier), for constructor-based + conversions, and for the Metrowerks 7 (and earlier) compiler in all cases. + If the compiler does not support is_abstract, + then the template parameter To + must not be an abstract type. + + + Header: #include + <boost/type_traits/is_convertible.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_convertible<int, double> + inherits from true_type. + + +
+
+ + + is_convertible<const int, double>::type + is the type true_type. + + +
+
+ + + is_convertible<int* const, int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_convertible<int const*, int*>::value + is an integral constant expression that evaluates to false: + the conversion would require a const_cast. + + +
+
+ + + is_convertible<int const&, long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_convertible<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_convertible<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_empty"> is_empty</link> + +template <class T> +struct is_empty : public true_type-or-false_type {}; + + + Inherits: If T is an empty class type then + inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10p5. + + + Header: #include + <boost/type_traits/is_empty.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: In order to correctly + detect empty classes this trait relies on either: + + + + the compiler implementing zero sized empty base classes, or + + + the compiler providing intrinsics + to detect empty classes. + + + + Can not be used with incomplete types. + + + Can not be used with union types, until is_union can be made to work. + + + If the compiler does not support partial-specialization of class templates, + then this template can not be used with abstract types. + + + Examples: + +
+ + + Given: struct empty_class + {}; + + +
+
+ + + is_empty<empty_class> + inherits from true_type. + + +
+
+ + + is_empty<empty_class const>::type + is the type true_type. + + +
+
+ + + is_empty<empty_class>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_empty<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_enum"> is_enum</link> + +template <class T> +struct is_enum : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + enum type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 7.2. + + + Header: #include + <boost/type_traits/is_enum.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Requires a correctly + functioning is_convertible + template; this means that is_enum is currently broken under Borland C++ Builder + 5, and for the Metrowerks compiler prior to version 8, other compilers should + handle this template just fine. + + + Examples: + +
+ + + Given: enum my_enum + { one, two }; + + +
+
+ + + is_enum<my_enum> + inherits from true_type. + + +
+
+ + + is_enum<my_enum const>::type + is the type true_type. + + +
+
+ + + is_enum<my_enum>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_enum<my_enum&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<my_enum*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link> + +template <class T> +struct is_floating_point : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + floating point type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_floating_point.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_floating_point<float> + inherits from true_type. + + +
+
+ + + is_floating_point<double>::type is the type true_type. + + +
+
+ + + is_floating_point<long double>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_floating_point<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_function"> is_function</link> + +template <class T> +struct is_function : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + function type then inherits from true_type, + otherwise inherits from false_type. + Note that this template does not detect pointers to functions, + or references to functions, these are detected by is_pointer and is_reference respectively: + + +typedef int f1(); // f1 is of function type. +typedef int (f2*)(); // f2 is a pointer to a function. +typedef int (f3&)(); // f3 is a reference to a function. + + + C++ Standard Reference: 3.9.2p1 and 8.3.5. + + + Header: #include + <boost/type_traits/is_function.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_function<int (void)> + inherits from true_type. + + +
+
+ + + is_function<long (double, int)>::type is the type true_type. + + +
+
+ + + is_function<long (double, int)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_function<long (*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer type, not a function type. + + +
+
+ + + is_function<long (&)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a reference to a function, not a function type. + + +
+
+ + + is_function<long (MyClass::*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer to a member function. + + +
+
+ + + is_function<T>::value_type is the type bool. + + +
+ + + Don't confuse function-types with pointers to functions: + + + typedef int + f(double); + + + defines a function type, + + + f foo; + + + declares a prototype for a function of type f, + + + f* + pf = + foo; + + + f& + fr = + foo; + + + declares a pointer and a reference to the function foo. + + + If you want to detect whether some type is a pointer-to-function then use: + + + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value + + + or for pointers to member functions you can just use is_member_function_pointer + directly. + + +
+
+ <link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link> + +template <class T> +struct is_fundamental : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + fundamental type then inherits from true_type, + otherwise inherits from false_type. + Fundamental types include integral, floating point and void types (see also + is_integral, + is_floating_point + and is_void) + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/is_fundamental.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_fundamental<int)> + inherits from true_type. + + +
+
+ + + is_fundamental<double const>::type + is the type true_type. + + +
+
+ + + is_fundamental<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_fundamental<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_integral"> is_integral</link> + +template <class T> +struct is_integral : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + integral type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p7. + + + Header: #include + <boost/type_traits/is_integral.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_integral<int> + inherits from true_type. + + +
+
+ + + is_integral<const char>::type + is the type true_type. + + +
+
+ + + is_integral<long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_integral<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_function_pointer"> + is_member_function_pointer</link> +template <class T> +struct is_member_function_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member function then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_function_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(char)>::type + is the type true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(void)const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a data member and not a member + function, see is_member_object_pointer + and is_member_pointer + + +
+
+ + + is_member_function_pointer<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_object_pointer"> + is_member_object_pointer</link> +template <class T> +struct is_member_object_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_object_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_object_pointer<int (MyClass::*)> inherits from true_type. + + +
+
+ + + is_member_object_pointer<double (MyClass::*)>::type + is the type true_type. + + +
+
+ + + is_member_object_pointer<const int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_object_pointer<int (MyClass::*)(void)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a member function and not a + member object, see is_member_function_pointer + and is_member_pointer + + +
+
+ + + is_member_object_pointer<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link> + +template <class T> +struct is_member_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member (either a function or a data member) then inherits from + true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_pointer<int (MyClass::*)> + inherits from true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_pointer<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_object"> is_object</link> + +template <class T> +struct is_object : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + object type then inherits from true_type, + otherwise inherits from false_type. + All types are object types except references, void, and function types. + + + C++ Standard Reference: 3.9p9. + + + Header: #include + <boost/type_traits/is_object.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_object<int> + inherits from true_type. + + +
+
+ + + is_object<int*>::type is the type true_type. + + +
+
+ + + is_object<int (*)(void)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int &>::value is an integral constant expression + that evaluates to false: reference types are not + objects + + +
+
+ + + is_object<int (double)>::value is an integral constant expression + that evaluates to false: function types are not + objects + + +
+
+ + + is_object<const void>::value + is an integral constant expression that evaluates to false: + void is not an object type + + +
+
+ + + is_object<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pod"> is_pod</link> + +template <class T> +struct is_pod : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + POD type then inherits from true_type, + otherwise inherits from false_type. + + + POD stands for "Plain old data". Arithmetic types, and enumeration + types, a pointers and pointer to members are all PODs. Classes and unions + can also be POD's if they have no non-static data members that are of reference + or non-POD type, no user defined constructors, no user defined assignment + operators, no private or protected non-static data members, no virtual functions + and no base classes. Finally, a cv-qualified POD is still a POD, as is an + array of PODs. + + + C++ Standard Reference: 3.9p10 and 9p4 (Note + that POD's are also aggregates, see 8.5.1). + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, ispod + will never report that a class or struct is a POD; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler-_intrinsics. + + + Header: #include + <boost/type_traits/is_pod.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pod<int> + inherits from true_type. + + +
+
+ + + is_pod<char*>::type is the type true_type. + + +
+
+ + + is_pod<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pod<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pod<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link> + +template <class T> +struct is_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer type (includes function pointers, but excludes pointers to members) + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2p2 and 8.3.1. + + + Header: #include + <boost/type_traits/is_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pointer<int*> + inherits from true_type. + + +
+
+ + + is_pointer<char* const>::type is the type true_type. + + +
+
+ + + is_pointer<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pointer<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<int (MyClass::*)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<T>::value_type is the type bool. + + +
+ + + is_pointer detects "real" + pointer types only, and not smart pointers. Users + should not specialise is_pointer + for smart pointer types, as doing so may cause Boost (and other third party) + code to fail to function correctly. Users wanting a trait to detect smart + pointers should create their own. However, note that there is no way in + general to auto-magically detect smart pointer types, so such a trait would + have to be partially specialised for each supported smart pointer type. + + +
+
+ <link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link> + +template <class T> +struct is_polymorphic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + polymorphic type then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + C++ Standard Reference: 10.3. + + + Compiler Compatibility: The implementation + requires some knowledge of the compilers ABI, it does actually seem to work + with the majority of compilers though. + + + Header: #include + <boost/type_traits/is_polymorphic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + Given: class poly{ virtual ~poly(); }; + + +
+
+ + + is_polymorphic<poly> + inherits from true_type. + + +
+
+ + + is_polymorphic<poly const>::type + is the type true_type. + + +
+
+ + + is_polymorphic<poly>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_polymorphic<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_same"> is_same</link> + +template <class T, class U> +struct is_same : public true_type-or-false_type {}; + + + Inherits: If T and U are the same types + then inherits from true_type, + otherwise inherits from false_type. + + + Header: #include + <boost/type_traits/is_same.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with abstract, incomplete or function types. + + + Examples: + +
+ + + is_same<int, int> + inherits from true_type. + + +
+
+ + + is_same<int, int>::type is the type true_type. + + +
+
+ + + is_same<int, int>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_same<int const, int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_same<int&, int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_same<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link> + +template <class T> +struct is_scalar : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + scalar type then inherits from true_type, + otherwise inherits from false_type. + Scalar types include integral, floating point, enumeration, pointer, and + pointer-to-member types. + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_scalar.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Examples: + +
+ + + is_scalar<int*> + inherits from true_type. + + +
+
+ + + is_scalar<int>::type is the type true_type. + + +
+
+ + + is_scalar<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_signed"> is_signed</link> + +template <class T> +struct is_signed : public true_type-or-false_type {}; + + + Inherits: If T is an signed integer type + or an enumerated type with an underlying signed integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_signed.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_signed<int> + inherits from true_type. + + +
+
+ + + is_signed<int const volatile>::type is the type true_type. + + +
+
+ + + is_signed<unsigned int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_signed<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_signed<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_signed<long long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_signed<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link> + +template <class T> +struct is_stateless : public true_type-or-false_type {}; + + + Inherits: Ff T is a stateless type then + inherits from true_type, + otherwise from false_type. + + + Type T must be a complete type. + + + A stateless type is a type that has no storage and whose constructors and + destructors are trivial. That means that is_stateless + only inherits from true_type + if the following expression is true: + + +::boost::has_trivial_constructor<T>::value +&& ::boost::has_trivial_copy<T>::value +&& ::boost::has_trivial_destructor<T>::value +&& ::boost::is_class<T>::value +&& ::boost::is_empty<T>::value + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_stateless.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, is_stateless will + never report that a class or struct is stateless; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler intrinsics + to make this template work automatically. + +
+
+ <link linkend="boost_typetraits.reference.is_reference"> is_reference</link> + +template <class T> +struct is_reference : public true_type-or-false_type {}; + + + Inherits: If T is a reference pointer type + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + may report the wrong result for function types, and for types that are both + const and volatile qualified. + + + Header: #include + <boost/type_traits/is_reference.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_reference<int&> + inherits from true_type. + + +
+
+ + + is_reference<int const&>::type + is the type true_type. + + +
+
+ + + is_reference<int (&)(long)>::value is an integral constant expression + that evaluates to true (the argument in this case + is a reference to a function). + + +
+
+ + + is_reference<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_union"> is_union</link> + +template <class T> +struct is_union : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + union type then inherits from true_type, + otherwise inherits from false_type. + Currently requires some kind of compiler support, otherwise unions are identified + as classes. + + + C++ Standard Reference: 3.9.2 and 9.5. + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types using only standard C++, as a result this type will never + inherit from true_type, + unless the user explicitly specializes the template for their user-defined + union types, or unless the compiler supplies some unspecified intrinsic that + implements this functionality. Currently (May 2005) only Visual C++ 8 has + the necessary compiler intrinsics + to make this trait "just work" without user intervention. + + + Header: #include + <boost/type_traits/is_union.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_union<void> + inherits from true_type. + + +
+
+ + + is_union<const void>::type + is the type true_type. + + +
+
+ + + is_union<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_union<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_union<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link> + +template <class T> +struct is_unsigned : public true_type-or-false_type {}; + + + Inherits: If T is an unsigned integer type + or an enumerated type with an underlying unsigned integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_unsigned.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_unsigned<unsigned int> inherits from true_type. + + +
+
+ + + is_unsigned<unsigned int + const volatile>::type + is the type true_type. + + +
+
+ + + is_unsigned<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_unsigned<unsigned long + long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_unsigned<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_void"> is_void</link> + +template <class T> +struct is_void : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + void type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p9. + + + Header: #include + <boost/type_traits/is_void.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_void<void> + inherits from true_type. + + +
+
+ + + is_void<const void>::type + is the type true_type. + + +
+
+ + + is_void<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_void<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_void<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link> + +template <class T> +struct is_volatile : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) volatile-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_volatile.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_volatile<volatile int> inherits from true_type. + + +
+
+ + + is_volatile<const volatile + int>::type is the type true_type. + + +
+
+ + + is_volatile<int* volatile>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_volatile<int volatile*>::value + is an integral constant expression that evaluates to false: + the volatile qualifier is not at the top level in this case. + + +
+
+ + + is_volatile<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.make_signed"> make_signed</link> + +template <class T> +struct make_signed +{ + typedef see-below type; +}; + + + type: If T is a signed integer type then + the same type as T, if T is an unsigned integer type then the corresponding + signed type. Otherwise if T is an enumerated or character type (char or wchar_t) + then a signed integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_signed.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + int + + + + + + + make_signed<unsigned int + const>::type + + + + int const + + + + + + + make_signed<const unsigned + long long>::type + + + + const long + long + + + + + + + make_signed<my_enum>::type + + + + A signed integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + A signed integer type with the same width as wchar_t. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link> + +template <class T> +struct make_unsigned +{ + typedef see-below type; +}; + + + type: If T is a unsigned integer type then + the same type as T, if T is an signed integer type then the corresponding + unsigned type. Otherwise if T is an enumerated or character type (char or + wchar_t) then an unsigned integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_unsigned.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + unsigned int + + + + + + + make_signed<unsigned int + const>::type + + + + unsigned int + const + + + + + + + make_signed<const unsigned + long long>::type + + + + const unsigned + long long + + + + + + + make_signed<my_enum>::type + + + + An unsigned integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + An unsigned integer type with the same width as wchar_t. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.promote"> promote</link> + +template <class T> +struct promote +{ + typedef see-below type; +}; + + + type: If integral or floating point promotion + can be applied to an rvalue of type T, + then applies integral and floating point promotions to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + See also integral_promotion + and floating_point_promotion. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field) and 4.6. + + + Header: #include + <boost/type_traits/promote.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + promote<short volatile>::type + + + + int volatile + + + + + + + promote<float const>::type + + + + double const + + + + + + + promote<short&>::type + + + + short& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.rank"> rank</link> + +template <class T> +struct rank : public integral_constant<std::size_t, RANK(T)> {}; + + + Inherits: Class template rank inherits from + integral_constant<std::size_t, RANK(T)>, + where RANK(T) is the + number of array dimensions in type T. + + + If T is not an array type, + then RANK(T) is zero. + + + Header: #include + <boost/type_traits/rank.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + rank<int[]> + inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + rank<int[1]>::value + is an integral constant expression that evaluates to 1. + + +
+
+ + + rank<int[][2]>::value is an integral constant expression + that evaluates to 2. + + +
+
+ + + rank<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + rank<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link> + +template <class T> +struct remove_all_extents +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes all of the array bounds on T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_all_extents.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_all_extents<int>::type + + + + int + + + + + + + remove_all_extents<int const[2]>::type + + + + int const + + + + + + + remove_all_extents<int[][2]>::type + + + + int + + + + + + + remove_all_extents<int[2][3][4]>::type + + + + int + + + + + + + remove_all_extents<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_const"> remove_const</link> + +template <class T> +struct remove_const +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level const-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_const<int>::type + + + + int + + + + + + + remove_const<int const>::type + + + + int + + + + + + + remove_const<int const + volatile>::type + + + + int volatile + + + + + + + remove_const<int const&>::type + + + + int const& + + + + + + + remove_const<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link> + +template <class T> +struct remove_cv +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level cv-qualifiers removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_cv<int>::type + + + + int + + + + + + + remove_cv<int const>::type + + + + int + + + + + + + remove_cv<int const + volatile>::type + + + + int + + + + + + + remove_cv<int const&>::type + + + + int const& + + + + + + + remove_cv<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link> + +template <class T> +struct remove_extent +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes the topmost array bound, otherwise leaves + T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_extent.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_extent<int>::type + + + + int + + + + + + + remove_extent<int const[2]>::type + + + + int const + + + + + + + remove_extent<int[2][4]>::type + + + + int[4] + + + + + + + remove_extent<int[][2]>::type + + + + int[2] + + + + + + + remove_extent<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link> + +template <class T> +struct remove_pointer +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any pointer modifier removed. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_pointer<int>::type + + + + int + + + + + + + remove_pointer<int const*>::type + + + + int const + + + + + + + remove_pointer<int const**>::type + + + + int const* + + + + + + + remove_pointer<int&>::type + + + + int& + + + + + + + remove_pointer<int*&>::type + + + + int*& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link> + +template <class T> +struct remove_reference +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any reference modifier removed. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_reference<int>::type + + + + int + + + + + + + remove_reference<int const&>::type + + + + int const + + + + + + + remove_reference<int*>::type + + + + int* + + + + + + + remove_reference<int*&>::type + + + + int* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link> + +template <class T> +struct remove_volatile +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level volatile-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_volatile<int>::type + + + + int + + + + + + + remove_volatile<int volatile>::type + + + + int + + + + + + + remove_volatile<int const + volatile>::type + + + + int const + + + + + + + remove_volatile<int volatile&>::type + + + + int const& + + + + + + + remove_volatile<int volatile*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link> + +template <std::size_t Align> +struct type_with_alignment +{ + typedef see-below type; +}; + + + type: a built-in or POD type with an alignment + that is a multiple of Align. + + + Header: #include + <boost/type_traits/type_with_alignment.hpp> + or #include <boost/type_traits.hpp> + +
+
+
+ <link linkend="boost_typetraits.credits"> Credits</link> + + This documentation was pulled together by John Maddock, using Boost.Quickbook + and Boost.DocBook. + + + The original version of this library was created by Steve Cleary, Beman Dawes, + Howard Hinnant, and John Maddock. John Maddock is the current maintainer of + the library. + + + This version of type traits library is based on contributions by Adobe Systems + Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, + Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert + Ramey and Jeremy Siek. + + + Mat Marcus and Jesse Jones invented, and published + a paper describing, the partial specialization workarounds used in + this library. + + + Aleksey Gurtovoy added MPL integration to the library. + + + The is_convertible + template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: + Mappings between Types and Values". + + + The latest version of this library and documentation can be found at www.boost.org. Bugs, suggestions and discussion + should be directed to boost@lists.boost.org (see www.boost.org/more/mailing_lists.htm#main + for subscription details). + +
+ +
+ This section must not be indexed. + + template <class T> +struct add_const +{ + typedef see-below type; +}; + +
+ +
+ This section contains one block that must not be indexed and one that should be. + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + +
+ + + + Class Index + A C D E F H I M O P R TAadd_constadd_cvadd_pointeradd_referenceadd_volatileadd_volatileThis section contains one block that must not be indexed and one that should be.aligned_storagealignment_ofCConstrained Index Termadd_constDdecayEextentFfloating_point_promotionfunction_traitsHhas_nothrow_assignhas_nothrow_constructorhas_nothrow_copyhas_nothrow_copy_constructorhas_nothrow_copyhas_nothrow_default_constructorhas_nothrow_constructorhas_trivial_assignhas_trivial_copyhas_trivial_copy_constructorhas_trivial_copyhas_trivial_default_constructorhas_trivial_constructorhas_trivial_destructorhas_virtual_destructorIintegral_constantalignment_ofextentintegral_constantrankintegral_promotionis_abstractis_arithmeticis_arrayis_base_ofis_classis_classUser Defined Specializationsis_complexis_compoundis_constis_convertibleis_emptyis_enumis_floating_pointis_functionis_fundamentalis_integralis_member_function_pointeris_member_object_pointeris_member_pointeris_objectis_pointerBackground and Tutorialis_pointeris_polymorphicis_referenceis_sameis_scalaris_signedis_unionis_unionUser Defined Specializationsis_unsignedis_voidBackground and Tutorialis_voidis_volatileMmake_signedmake_unsignedOoneadd_volatiletwoadd_constthreeadd_cvPpromoteRremove_all_extentsremove_constremove_cvremove_extentBackground and Tutorialremove_extentremove_pointerremove_referenceremove_volatileTtype_with_alignment + + Typedef Index + F R T VFfalse_typeintegral_constantRresult_typefunction_traitsTtrue_typeintegral_constantVvalue_typeAn Optimized Version of std::copyintegral_constant + + Macro Index + BBBOOST_ALIGNMENT_OFSupport for Compiler IntrinsicsBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONType Traits that Transform One Type to AnotherBOOST_HAS_NOTHROW_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_VIRTUAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_IS_ABSTRACTSupport for Compiler IntrinsicsBOOST_IS_BASE_OFSupport for Compiler IntrinsicsBOOST_IS_CLASSSupport for Compiler IntrinsicsBOOST_IS_CONVERTIBLESupport for Compiler IntrinsicsBOOST_IS_EMPTYSupport for Compiler IntrinsicsBOOST_IS_ENUMSupport for Compiler IntrinsicsBOOST_IS_PODSupport for Compiler IntrinsicsBOOST_IS_POLYMORPHICSupport for Compiler IntrinsicsBOOST_IS_UNIONSupport for Compiler Intrinsics + + Index Test 1 + TTtype-traitsIntroduction + + Index Test 2 + TTtype-traitsBackground and Tutorial + IndexA B C D E F H I M O P R S T U VAadd_constadd_constConstrained Index Termadd_cvadd_pointeradd_referenceadd_volatileadd_volatileThis section contains one block that must not be indexed and one that should be.aligned_storagealignment_ofalignment_ofintegral_constantBBackground and Tutorialis_pointeris_voidremove_extenttype-traitsBOOST_ALIGNMENT_OFSupport for Compiler IntrinsicsBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONType Traits that Transform One Type to AnotherBOOST_HAS_NOTHROW_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_NOTHROW_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_ASSIGNSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_CONSTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_COPYSupport for Compiler IntrinsicsBOOST_HAS_TRIVIAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_HAS_VIRTUAL_DESTRUCTORSupport for Compiler IntrinsicsBOOST_IS_ABSTRACTSupport for Compiler IntrinsicsBOOST_IS_BASE_OFSupport for Compiler IntrinsicsBOOST_IS_CLASSSupport for Compiler IntrinsicsBOOST_IS_CONVERTIBLESupport for Compiler IntrinsicsBOOST_IS_EMPTYSupport for Compiler IntrinsicsBOOST_IS_ENUMSupport for Compiler IntrinsicsBOOST_IS_PODSupport for Compiler IntrinsicsBOOST_IS_POLYMORPHICSupport for Compiler IntrinsicsBOOST_IS_UNIONSupport for Compiler IntrinsicsCConstrained Index Termadd_constDdecayEextentextentintegral_constantFfalse_typeintegral_constantfloating_point_promotionFoo1Background and TutorialFoo2Bar2Type Traits that Describe the Properties of a Typefunction_traitsfunction_traitsresult_typeHhas_nothrow_assignhas_nothrow_constructorhas_nothrow_constructorhas_nothrow_default_constructorhas_nothrow_copyhas_nothrow_copyhas_nothrow_copy_constructorhas_nothrow_copy_constructorhas_nothrow_copyhas_nothrow_default_constructorhas_nothrow_constructorhas_trivial_assignhas_trivial_constructorhas_trivial_default_constructorhas_trivial_copyhas_trivial_copyhas_trivial_copy_constructorhas_trivial_copy_constructorhas_trivial_copyhas_trivial_default_constructorhas_trivial_constructorhas_trivial_destructorhas_virtual_destructorIintegral_constantalignment_ofextentfalse_typeintegral_constantranktrue_typevalue_typeintegral_promotionIntroductiontype-traitsis_abstractis_arithmeticis_arrayis_base_ofis_classis_classUser Defined Specializationsis_complexis_compoundis_constis_convertibleis_emptyis_enumis_floating_pointis_functionis_fundamentalis_integralis_member_function_pointeris_member_object_pointeris_member_pointeris_objectis_pointerBackground and Tutorialis_pointeris_polymorphicis_referenceis_sameis_scalaris_signedis_unionis_unionUser Defined Specializationsis_unsignedis_voidBackground and Tutorialis_voidis_volatileMmake_signedmake_unsignedOoneadd_volatiletwoadd_constthreeadd_cvOptimized Version of std::copyvalue_typePpromoteRrankintegral_constantremove_all_extentsremove_constremove_cvremove_extentBackground and Tutorialremove_extentremove_pointerremove_referenceremove_volatileresult_typefunction_traitsSSupport for Compiler IntrinsicsBOOST_ALIGNMENT_OFBOOST_HAS_NOTHROW_ASSIGNBOOST_HAS_NOTHROW_CONSTRUCTORBOOST_HAS_NOTHROW_COPYBOOST_HAS_TRIVIAL_ASSIGNBOOST_HAS_TRIVIAL_CONSTRUCTORBOOST_HAS_TRIVIAL_COPYBOOST_HAS_TRIVIAL_DESTRUCTORBOOST_HAS_VIRTUAL_DESTRUCTORBOOST_IS_ABSTRACTBOOST_IS_BASE_OFBOOST_IS_CLASSBOOST_IS_CONVERTIBLEBOOST_IS_EMPTYBOOST_IS_ENUMBOOST_IS_PODBOOST_IS_POLYMORPHICBOOST_IS_UNIONTThis section contains one block that must not be indexed and one that should be.add_volatiletrue_typeintegral_constantType Traits that Transform One Type to AnotherBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATIONtype-traitsBackground and TutorialIntroductiontype_with_alignmentUUser Defined Specializationsis_classis_unionVvalue_typeAn Optimized Version of std::copyintegral_constant + +
\ No newline at end of file diff --git a/src/boost/tools/auto_index/test/type_traits.docbook b/src/boost/tools/auto_index/test/type_traits.docbook new file mode 100644 index 000000000..64837d71a --- /dev/null +++ b/src/boost/tools/auto_index/test/type_traits.docbook @@ -0,0 +1,6673 @@ + + + + + + + + various authors + + 2000 2006 Adobe Systems Inc, David Abrahams, + Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat + Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert + Ramey and Jeremy Siek + + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + Boost.TypeTraits + + A printer-friendly PDF + version of this manual is also available. + +
+ <link linkend="boost_typetraits.intro"> Introduction</link> + + The Boost type-traits library contains a set of very specific traits classes, + each of which encapsulate a single trait from the C++ type system; for example, + is a type a pointer or a reference type? Or does a type have a trivial constructor, + or a const-qualifier? + + + The type-traits classes share a unified design: each class inherits from a + the type true_type + if the type has the specified property and inherits from false_type + otherwise. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. + +
+
+ <link linkend="boost_typetraits.background"> Background and Tutorial</link> + + The following is an updated version of the article "C++ Type traits" + by John Maddock and Steve Cleary that appeared in the October 2000 issue of + Dr Dobb's Journal. + + + Generic programming (writing code which works with any data type meeting a + set of requirements) has become the method of choice for providing reusable + code. However, there are times in generic programming when "generic" + just isn't good enough - sometimes the differences between types are too large + for an efficient generic implementation. This is when the traits technique + becomes important - by encapsulating those properties that need to be considered + on a type by type basis inside a traits class, we can minimize the amount of + code that has to differ from one type to another, and maximize the amount of + generic code. + + + + + Foo1 + + Consider an example: when working with character strings, one common operation + is to determine the length of a null terminated string. Clearly it's possible + to write generic code that can do this, but it turns out that there are much + more efficient methods available: for example, the C library functions strlen and wcslen + are usually written in assembler, and with suitable hardware support can be + considerably faster than a generic version written in C++. The authors of the + C++ standard library realized this, and abstracted the properties of char and wchar_t + into the class char_traits. + Generic code that works with character strings can simply use char_traits<>::length to determine the length of a null + terminated string, safe in the knowledge that specializations of char_traits will use the most appropriate + method available to them. + + + + Type Traits + + + Class char_traits is a classic + example of a collection of type specific properties wrapped up in a single + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very + specific traits classes, each of which encapsulate a single trait from the + C++ type system; for example, is a type a pointer or a reference type? Or does + a type have a trivial constructor, or a const-qualifier? The type-traits classes + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type + otherwise. As we will show, these classes can be used in generic programming + to determine the properties of a given type and introduce optimizations that + are appropriate for that case. + + + The type-traits library also contains a set of classes that perform a specific + transformation on a type; for example, they can remove a top-level const or + volatile qualifier from a type. Each class that performs a transformation defines + a single typedef-member type + that is the result of the transformation. All of the type-traits classes are + defined inside namespace boost; + for brevity, namespace-qualification is omitted in most of the code samples + given. + + + + Implementation + + + There are far too many separate classes contained in the type-traits library + to give a full implementation here - see the source code in the Boost library + for the full details - however, most of the implementation is fairly repetitive + anyway, so here we will just give you a flavor for how some of the classes + are implemented. Beginning with possibly the simplest class in the library, + is_void<T> inherits + from true_type + only if T is void. + + +template <typename T> +struct is_void : public false_type{}; + +template <> +struct is_void<void> : public true_type{}; + + + Here we define a primary version of the template class is_void, + and provide a full-specialization when T + is void. While full specialization + of a template class is an important technique, sometimes we need a solution + that is halfway between a fully generic solution, and a full specialization. + This is exactly the situation for which the standards committee defined partial + template-class specialization. As an example, consider the class boost::is_pointer<T>: + here we needed a primary version that handles all the cases where T is not + a pointer, and a partial specialization to handle all the cases where T is + a pointer: + + +template <typename T> +struct is_pointer : public false_type{}; + +template <typename T> +struct is_pointer<T*> : public true_type{}; + + + The syntax for partial specialization is somewhat arcane and could easily occupy + an article in its own right; like full specialization, in order to write a + partial specialization for a class, you must first declare the primary template. + The partial specialization contains an extra <...> after the class name + that contains the partial specialization parameters; these define the types + that will bind to that partial specialization rather than the default template. + The rules for what can appear in a partial specialization are somewhat convoluted, + but as a rule of thumb if you can legally write two function overloads of the + form: + + +void foo(T); +void foo(U); + + + Then you can also write a partial specialization of the form: + + +template <typename T> +class c{ /*details*/ }; + +template <typename T> +class c<U>{ /*details*/ }; + + + This rule is by no means foolproof, but it is reasonably simple to remember + and close enough to the actual rule to be useful for everyday use. + + + As a more complex example of partial specialization consider the class remove_extent<T>. This + class defines a single typedef-member type + that is the same type as T but with any top-level array bounds removed; this + is an example of a traits class that performs a transformation on a type: + + +template <typename T> +struct remove_extent +{ typedef T type; }; + +template <typename T, std::size_t N> +struct remove_extent<T[N]> +{ typedef T type; }; + + + The aim of remove_extent + is this: imagine a generic algorithm that is passed an array type as a template + parameter, remove_extent + provides a means of determining the underlying type of the array. For example + remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of + template parameters in a partial specialization does not have to match the + number in the default template. However, the number of parameters that appear + after the class name do have to match the number and type of the parameters + in the default template. + + + + Optimized copy + + + As an example of how the type traits classes can be used, consider the standard + library algorithm copy: + + +template<typename Iter1, typename Iter2> +Iter2 copy(Iter1 first, Iter1 last, Iter2 out); + + + Obviously, there's no problem writing a generic version of copy that works + for all iterator types Iter1 + and Iter2; however, there are + some circumstances when the copy operation can best be performed by a call + to memcpy. In order to implement + copy in terms of memcpy all + of the following conditions need to be met: + + + + Both of the iterator types Iter1 + and Iter2 must be pointers. + + + Both Iter1 and Iter2 must point to the same type - excluding + const and volatile-qualifiers. + + + The type pointed to by Iter1 + must have a trivial assignment operator. + + + + By trivial assignment operator we mean that the type is either a scalar type[3] or: + + + + The type has no user defined assignment operator. + + + The type does not have any data members that are references. + + + All base classes, and all data member objects must have trivial assignment + operators. + + + + If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated + assignment operator. The type-traits library provides a class has_trivial_assign, + such that has_trivial_assign<T>::value is true only if T has a trivial assignment + operator. This class "just works" for scalar types, but has to be + explicitly specialised for class/struct types that also happen to have a trivial + assignment operator. In other words if has_trivial_assign + gives the wrong answer, it will give the "safe" wrong answer - that + trivial assignment is not allowable. + + + The code for an optimized version of copy that uses memcpy + where appropriate is given in the + examples. The code begins by defining a template function do_copy that performs a "slow but safe" + copy. The last parameter passed to this function may be either a true_type + or a false_type. + Following that there is an overload of docopy that + uses `memcpy`: this time the iterators are required to actually be pointers + to the same type, and the final parameter must be a `_true_type. Finally, the version + of copy calls + docopy`, passing `_has_trivial_assign<value_type>()` + as the final parameter: this will dispatch to the optimized version where appropriate, + otherwise it will call the "slow but safe version". + + + + Was it worth it? + + + It has often been repeated in these columns that "premature optimization + is the root of all evil" [4]. + So the question must be asked: was our optimization premature? To put this + in perspective the timings for our version of copy compared a conventional + generic copy[5] are shown in table + 1. + + + Clearly the optimization makes a difference in this case; but, to be fair, + the timings are loaded to exclude cache miss effects - without this accurate + comparison between algorithms becomes difficult. However, perhaps we can add + a couple of caveats to the premature optimization rule: + + + + If you use the right algorithm for the job in the first place then optimization + will not be required; in some cases, memcpy is the right algorithm. + + + If a component is going to be reused in many places by many people then optimizations + may well be worthwhile where they would not be so for a single case - in + other words, the likelihood that the optimization will be absolutely necessary + somewhere, sometime is that much higher. Just as importantly the perceived + value of the stock implementation will be higher: there is no point standardizing + an algorithm if users reject it on the grounds that there are better, more + heavily optimized versions available. + + + Time taken to copy 1000 elements using `copy<const + T*, T*>` (times in micro-seconds) + + + + + + Version + + + + T + + + + Time + + + + + + + + + "Optimized" copy + + + + char + + + + 0.99 + + + + + + + Conventional copy + + + + char + + + + 8.07 + + + + + + + "Optimized" copy + + + + int + + + + 2.52 + + + + + + + Conventional copy + + + + int + + + + 8.02 + + + + + +
+ + Pair of References + + + The optimized copy example shows how type traits may be used to perform optimization + decisions at compile-time. Another important usage of type traits is to allow + code to compile that otherwise would not do so unless excessive partial specialization + is used. This is possible by delegating partial specialization to the type + traits classes. Our example for this form of usage is a pair that can hold + references [6]. + + + First, let us examine the definition of std::pair, omitting + the comparison operators, default constructor, and template copy constructor + for simplicity: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(const T1 & nfirst, const T2 & nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Now, this "pair" cannot hold references as it currently stands, because + the constructor would require taking a reference to a reference, which is currently + illegal [7]. Let us consider what + the constructor's parameters would have to be in order to allow "pair" + to hold non-reference types, references, and constant references: + + Required Constructor Argument Types + + + + + + Type of T1 + + + + Type of parameter to initializing constructor + + + + + + + + + T + + + + const T & + + + + + + + T & + + + + T & + + + + + + + const T & + + + + const T & + + + + + +
+ + A little familiarity with the type traits classes allows us to construct a + single mapping that allows us to determine the type of parameter from the type + of the contained class. The type traits classes provide a transformation add_reference, which + adds a reference to its type, unless it is already a reference. + + Using add_reference to synthesize the correct constructor + type + + + + + + Type of T1 + + + + Type of const T1 + + + + Type of add_reference<const T1>::type + + + + + + + + + T + + + + const T + + + + const T & + + + + + + + T & + + + + T & [8] + + + + T & + + + + + + + const T & + + + + const T & + + + + const T & + + + + + +
+ + This allows us to build a primary template definition for pair + that can contain non-reference types, reference types, and constant reference + types: + + +template <typename T1, typename T2> +struct pair +{ +typedef T1 first_type; +typedef T2 second_type; + +T1 first; +T2 second; + +pair(boost::add_reference<const T1>::type nfirst, + boost::add_reference<const T2>::type nsecond) +:first(nfirst), second(nsecond) { } +}; + + + Add back in the standard comparison operators, default constructor, and template + copy constructor (which are all the same), and you have a std::pair that + can hold reference types! + + + This same extension could have been done using partial template specialization + of pair, but to specialize + pair in this way would require + three partial specializations, plus the primary template. Type traits allows + us to define a single primary template that adjusts itself auto-magically to + any of these partial specializations, instead of a brute-force partial specialization + approach. Using type traits in this fashion allows programmers to delegate + partial specialization to the type traits classes, resulting in code that is + easier to maintain and easier to understand. + + + + Conclusion + + + We hope that in this article we have been able to give you some idea of what + type-traits are all about. A more complete listing of the available classes + are in the boost documentation, along with further examples using type traits. + Templates have enabled C++ uses to take the advantage of the code reuse that + generic programming brings; hopefully this article has shown that generic programming + does not have to sink to the lowest common denominator, and that templates + can be optimal as well as generic. + + + + Acknowledgements + + + The authors would like to thank Beman Dawes and Howard Hinnant for their helpful + comments when preparing this article. + + + + References + + + + Nathan C. Myers, C++ Report, June 1995. + + + The type traits library is based upon contributions by Steve Cleary, Beman + Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org. + + + A scalar type is an arithmetic type (i.e. a built-in integer or floating + point type), an enumeration type, a pointer, a pointer to member, or a const- + or volatile-qualified version of one of these types. + + + This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg + 268. + + + The test code is available as part of the boost utility library (see algo_opt_examples.cpp), + the code was compiled with gcc 2.95 with all optimisations turned on, tests + were conducted on a 400MHz Pentium II machine running Microsoft Windows 98. + + + John Maddock and Howard Hinnant have submitted a "compressed_pair" + library to Boost, which uses a technique similar to the one described here + to hold references. Their pair also uses type traits to determine if any + of the types are empty, and will derive instead of contain to conserve space + -- hence the name "compressed". + + + This is actually an issue with the C++ Core Language Working Group (issue + #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow + a "reference to a reference to T" to mean the same thing as a "reference + to T", but only in template instantiation, in a method similar to multiple + cv-qualifiers. + + + For those of you who are wondering why this shouldn't be const-qualified, + remember that references are always implicitly constant (for example, you + can't re-assign a reference). Remember also that "const T &" + is something completely different. For this reason, cv-qualifiers on template + type arguments that are references are ignored. + + +
+
+ <link linkend="boost_typetraits.category"> Type Traits by Category</link> +
+ <link linkend="boost_typetraits.category.value_traits"> Type Traits + that Describe the Properties of a Type</link> + + + Foo2 + Bar2 + + These traits are all value traits, which is to say the + traits classes all inherit from integral_constant, + and are used to access some numerical property of a type. Often this is a + simple true or false Boolean value, but in a few cases may be some other + integer value (for example when dealing with type alignments, or array bounds: + see alignment_of, + rank + and extent). + +
+ <link linkend="boost_typetraits.category.value_traits.primary"> Categorizing + a Type</link> + + These traits identify what "kind" of type some type T is. These are split into two groups: + primary traits which are all mutually exclusive, and composite traits that + are compositions of one or more primary traits. + + + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, + in other words these traits are mutually exclusive. + + + This means that is_integral<T>::value + and is_floating_point<T>::value + will only ever be true for built-in types; if you want to check for a user-defined + class type that behaves "as if" it is an integral or floating + point type, then use the std::numeric_limits + template instead. + + + Synopsis: + + +template <class T> +struct is_array; + +template <class T> +struct is_class; + +template <class T> +struct is_complex; + +template <class T> +struct is_enum; + +template <class T> +struct is_floating_point; + +template <class T> +struct is_function; + +template <class T> +struct is_integral; + +template <class T> +struct is_member_function_pointer; + +template <class T> +struct is_member_object_pointer; + +template <class T> +struct is_pointer; + +template <class T> +struct is_reference; + +template <class T> +struct is_union; + +template <class T> +struct is_void; + + + The following traits are made up of the union of one or more type categorizations. + A type may belong to more than one of these categories, in addition to + one of the primary categories. + + +template <class T> +struct is_arithmetic; + +template <class T> +struct is_compound; + +template <class T> +struct is_fundamental; + +template <class T> +struct is_member_pointer; + +template <class T> +struct is_object; + +template <class T> +struct is_scalar; + +
+
+ <link linkend="boost_typetraits.category.value_traits.properties"> + General Type Properties</link> + + The following templates describe the general properties of a type. + + + Synopsis: + + +template <class T> +struct alignment_of; + +template <class T> +struct has_nothrow_assign; + +template <class T> +struct has_nothrow_constructor; + +template <class T> +struct has_nothrow_default_constructor; + +template <class T> +struct has_nothrow_copy; + +template <class T> +struct has_nothrow_copy_constructor; + +template <class T> +struct has_trivial_assign; + +template <class T> +struct has_trivial_constructor; + +template <class T> +struct has_trivial_default_constructor; + +template <class T> +struct has_trivial_copy; + +template <class T> +struct has_trivial_copy_constructor; + +template <class T> +struct has_trivial_destructor; + +template <class T> +struct has_virtual_destructor; + +template <class T> +struct is_abstract; + +template <class T> +struct is_const; + +template <class T> +struct is_empty; + +template <class T> +struct is_stateless; + +template <class T> +struct is_pod; + +template <class T> +struct is_polymorphic; + +template <class T> +struct is_signed; + +template <class T> +struct is_unsigned; + +template <class T> +struct is_volatile; + +template <class T, std::size_t N = 0> +struct extent; + +template <class T> +struct rank; + +
+
+ <link linkend="boost_typetraits.category.value_traits.relate"> Relationships + Between Two Types</link> + + These templates determine the whether there is a relationship between two + types: + + + Synopsis: + + +template <class Base, class Derived> +struct is_base_of; + +template <class From, class To> +struct is_convertible; + +template <class T, class U> +struct is_same; + +
+
+
+ <link linkend="boost_typetraits.category.transform"> Type Traits that + Transform One Type to Another</link> + + The following templates transform one type to another, based upon some well-defined + rule. Each template has a single member called type + that is the result of applying the transformation to the template argument + T. + + + Synopsis: + + +template <class T> +struct add_const; + +template <class T> +struct add_cv; + +template <class T> +struct add_pointer; + +template <class T> +struct add_reference; + +template <class T> +struct add_volatile; + +template <class T> +struct decay; + +template <class T> +struct floating_point_promotion; + +template <class T> +struct integral_promotion; + +template <class T> +struct make_signed; + +template <class T> +struct make_unsigned; + +template <class T> +struct promote; + +template <class T> +struct remove_all_extents; + +template <class T> +struct remove_const; + +template <class T> +struct remove_cv; + +template <class T> +struct remove_extent; + +template <class T> +struct remove_pointer; + +template <class T> +struct remove_reference; + +template <class T> +struct remove_volatile; + + + + Broken + Compiler Workarounds: + + + For all of these templates support for partial specialization of class templates + is required to correctly implement the transformation. On the other hand, + practice shows that many of the templates from this category are very useful, + and often essential for implementing some generic libraries. Lack of these + templates is often one of the major limiting factors in porting those libraries + to compilers that do not yet support this language feature. As some of these + compilers are going to be around for a while, and at least one of them is + very wide-spread, it was decided that the library should provide workarounds + where possible. + + + The basic idea behind the workaround is to manually define full specializations + of all type transformation templates for all fundamental types, and all their + 1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide + a user-level macro that will define all the explicit specializations needed + for any user-defined type T. + + + The first part guarantees the successful compilation of something like this: + + +BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char*, remove_reference<char*&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char const*, remove_reference<char const*&>::type>::value)); +... +BOOST_STATIC_ASSERT((is_same<char const volatile* const volatile* const volatile, remove_reference<char const volatile* const volatile* const volatile&>::type>::value)); + + + and the second part provides the library's users with a mechanism to make + the above code work not only for char, + int or other built-in type, + but for their own types as well: + + +namespace myspace{ + struct MyClass {}; +} +// declare this at global scope: +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass) +// transformations on myspace::MyClass now work: +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_const<myspace::MyClass const>::type>::value)); +// etc. + + + Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates + to nothing on those compilers that do support + partial specialization. + +
+
+ <link linkend="boost_typetraits.category.alignment"> Synthesizing Types + with Specific Alignments</link> + + Some low level memory management routines need to synthesize a POD type with + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage + creates a type with a specific size and alignment. + + + Synopsis + + +template <std::size_t Align> +struct type_with_alignment; + +template <std::size_t Size, std::size_t Align> +struct aligned_storage; + +
+
+ <link linkend="boost_typetraits.category.function"> Decomposing Function + Types</link> + + The class template function_traits + extracts information from function types (see also is_function). + This traits class allows you to tell how many arguments a function takes, + what those argument types are, and what the return type is. + + + Synopsis + + +template <std::size_t Align> +struct function_traits; + +
+
+
+ <link linkend="boost_typetraits.user_defined"> User Defined Specializations</link> + + Occationally the end user may need to provide their own specialization for + one of the type traits - typically where intrinsic compiler support is required + to implement a specific trait fully. These specializations should derive from + boost::true_type + or boost::false_type + as appropriate: + + +#include <boost/type_traits/is_pod.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_union.hpp> + +struct my_pod{}; +struct my_union +{ + char c; + int i; +}; + +namespace boost +{ + template<> + struct is_pod<my_pod> : public true_type{}; + + template<> + struct is_pod<my_union> : public true_type{}; + + template<> + struct is_union<my_union> : public true_type{}; + + template<> + struct is_class<my_union> : public false_type{}; +} + +
+
+ <link linkend="boost_typetraits.intrinsics"> Support for Compiler Intrinsics</link> + + There are some traits that can not be implemented within the current C++ language: + to make these traits "just work" with user defined types, some kind + of additional help from the compiler is required. Currently (April 2008) Visual + C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other + compilers will no doubt follow in due course. + + + The Following traits classes always need compiler support to do the right thing + for all types (but all have safe fallback positions if this support is unavailable): + + + + is_union + + + is_pod + + + has_trivial_constructor + + + has_trivial_copy + + + has_trivial_assign + + + has_trivial_destructor + + + has_nothrow_constructor + + + has_nothrow_copy + + + has_nothrow_assign + + + has_virtual_destructor + + + + The following traits classes can't be portably implemented in the C++ language, + although in practice, the implementations do in fact do the right thing on + all the compilers we know about: + + + + is_empty + + + is_polymorphic + + + + The following traits classes are dependent on one or more of the above: + + + + is_class + + + is_stateless + + + + The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, + adding support for new compilers is simply a matter of defining one of more + of the following macros: + + Macros for Compiler Intrinsics + + + + + + BOOST_IS_UNION(T) + + + + Should evaluate to true if T is a union type + + + + + + + + + BOOST_IS_POD(T) + + + + Should evaluate to true if T is a POD type + + + + + + + BOOST_IS_EMPTY(T) + + + + Should evaluate to true if T is an empty struct or union + + + + + + + BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) + + + + Should evaluate to true if the default constructor for T is trivial (i.e. + has no effect) + + + + + + + BOOST_HAS_TRIVIAL_COPY(T) + + + + Should evaluate to true if T has a trivial copy constructor (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_ASSIGN(T) + + + + Should evaluate to true if T has a trivial assignment operator (and can + therefore be replaced by a call to memcpy) + + + + + + + BOOST_HAS_TRIVIAL_DESTRUCTOR(T) + + + + Should evaluate to true if T has a trivial destructor (i.e. ~T() has + no effect) + + + + + + + BOOST_HAS_NOTHROW_CONSTRUCTOR(T) + + + + Should evaluate to true if T + x; + can not throw + + + + + + + BOOST_HAS_NOTHROW_COPY(T) + + + + Should evaluate to true if T(t) can not throw + + + + + + + BOOST_HAS_NOTHROW_ASSIGN(T) + + + + Should evaluate to true if T + t, + u; + t = + u can not throw + + + + + + + BOOST_HAS_VIRTUAL_DESTRUCTOR(T) + + + + Should evaluate to true T has a virtual destructor + + + + + + + BOOST_IS_ABSTRACT(T) + + + + Should evaluate to true if T is an abstract type + + + + + + + BOOST_IS_BASE_OF(T,U) + + + + Should evaluate to true if T is a base class of U + + + + + + + BOOST_IS_CLASS(T) + + + + Should evaluate to true if T is a class type + + + + + + + BOOST_IS_CONVERTIBLE(T,U) + + + + Should evaluate to true if T is convertible to U + + + + + + + BOOST_IS_ENUM(T) + + + + Should evaluate to true is T is an enum + + + + + + + BOOST_IS_POLYMORPHIC(T) + + + + Should evaluate to true if T is a polymorphic type + + + + + + + BOOST_ALIGNMENT_OF(T) + + + + Should evaluate to the alignment requirements of type T. + + + + + +
+
+
+ <link linkend="boost_typetraits.mpl"> MPL Interoperability</link> + + All the value based traits in this library conform to MPL's requirements for + an Integral + Constant type: that includes a number of rather intrusive workarounds + for broken compilers. + + + Purely as an implementation detail, this means that true_type + inherits from boost::mpl::true_, + false_type + inherits from boost::mpl::false_, + and integral_constant<T, + v> + inherits from boost::mpl::integral_c<T,v> + (provided T is not bool) + +
+
+ <link linkend="boost_typetraits.examples"> Examples</link> +
+ <link linkend="boost_typetraits.examples.copy"> An Optimized Version + of std::copy</link> + + Demonstrates a version of std::copy + that uses has_trivial_assign + to determine whether to use memcpy + to optimise the copy operation (see copy_example.cpp): + + +// +// opt::copy +// same semantics as std::copy +// calls memcpy where appropriate. +// + +namespace detail{ + +template<typename I1, typename I2, bool b> +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *out = *first; + ++out; + ++first; + } + return out; +} + +template<typename T> +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +{ + memcpy(out, first, (last-first)*sizeof(T)); + return out+(last-first); +} + + +} + +template<typename I1, typename I2> +inline I2 copy(I1 first, I1 last, I2 out) +{ + // + // We can copy with memcpy if T has a trivial assignment operator, + // and if the iterator arguments are actually pointers (this last + // requirement we detect with overload resolution): + // + typedef typename std::iterator_traits<I1>::value_type value_type; + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); +} + +
+
+ <link linkend="boost_typetraits.examples.fill"> An Optimised Version + of std::fill</link> + + Demonstrates a version of std::fill + that uses has_trivial_assign + to determine whether to use memset + to optimise the fill operation (see fill_example.cpp): + + +// +// fill +// same as std::fill, but uses memset where appropriate +// +namespace detail{ + +template <typename I, typename T, bool b> +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *first = val; + ++first; + } +} + +template <typename T> +void do_fill(T* first, T* last, const T& val, const boost::true_type&) +{ + std::memset(first, val, last-first); +} + +} + +template <class I, class T> +inline void fill(I first, I last, const T& val) +{ + // + // We can do an optimised fill if T has a trivial assignment + // operator and if it's size is one: + // + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + detail::do_fill(first, last, val, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.destruct"> An Example that + Omits Destructor Calls For Types with Trivial Destructors</link> + + Demonstrates a simple algorithm that uses __has_trivial_destruct + to determine whether to destructors need to be called (see trivial_destructor_example.cpp): + + +// +// algorithm destroy_array: +// The reverse of std::unitialized_copy, takes a block of +// initialized memory and calls destructors on all objects therein. +// + +namespace detail{ + +template <class T> +void do_destroy_array(T* first, T* last, const boost::false_type&) +{ + while(first != last) + { + first->~T(); + ++first; + } +} + +template <class T> +inline void do_destroy_array(T* first, T* last, const boost::true_type&) +{ +} + +} // namespace detail + +template <class T> +inline void destroy_array(T* p1, T* p2) +{ + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); +} + +
+
+ <link linkend="boost_typetraits.examples.iter"> An improved Version + of std::iter_swap</link> + + Demonstrates a version of std::iter_swap + that use type traits to determine whether an it's arguments are proxying + iterators or not, if they're not then it just does a std::swap + of it's dereferenced arguments (the same as std::iter_swap + does), however if they are proxying iterators then takes special care over + the swap to ensure that the algorithm works correctly for both proxying iterators, + and even iterators of different types (see iter_swap_example.cpp): + + +// +// iter_swap: +// tests whether iterator is a proxying iterator or not, and +// uses optimal form accordingly: +// +namespace detail{ + +template <typename I> +static void do_swap(I one, I two, const boost::false_type&) +{ + typedef typename std::iterator_traits<I>::value_type v_t; + v_t v = *one; + *one = *two; + *two = v; +} +template <typename I> +static void do_swap(I one, I two, const boost::true_type&) +{ + using std::swap; + swap(*one, *two); +} + +} + +template <typename I1, typename I2> +inline void iter_swap(I1 one, I2 two) +{ + // + // See is both arguments are non-proxying iterators, + // and if both iterator the same type: + // + typedef typename std::iterator_traits<I1>::reference r1_t; + typedef typename std::iterator_traits<I2>::reference r2_t; + + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; + + detail::do_swap(one, two, truth_type()); +} + +
+
+ <link linkend="boost_typetraits.examples.to_double"> Convert Numeric + Types and Enums to double</link> + + Demonstrates a conversion of Numeric + Types and enum types to double: + + +template<class T> +inline double to_double(T const& value) +{ + typedef typename boost::promote<T>::type promoted; + return boost::numeric::converter<double,promoted>::convert(value); +} + +
+
+
+ <link linkend="boost_typetraits.reference"> Alphabetical Reference</link> +
+ <link linkend="boost_typetraits.reference.add_const"> add_const</link> + + one + two + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + type: The same type as T + const for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_const<int>::type + + + + int const + + + + + + + add_const<int&>::type + + + + int& + + + + + + + add_const<int*>::type + + + + int* + const + + + + + + + add_const<int const>::type + + + + int const + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_cv"> add_cv</link> + + one + two + three + + + template <class T> +struct add_cv +{ + typedef see-below type; +}; + + + type: The same type as T + const volatile + for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_cv<int>::type + + + + int const + volatile + + + + + + + add_cv<int&>::type + + + + int& + + + + + + + add_cv<int*>::type + + + + int* + const volatile + + + + + + + add_cv<int const>::type + + + + int const + volatile + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_pointer"> add_pointer</link> + +template <class T> +struct add_pointer +{ + typedef see-below type; +}; + + + type: The same type as remove_reference<T>::type*. + + + The rationale for this template is that it produces the same type as TYPEOF(&t), where + t is an object of type T. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_pointer<int>::type + + + + int* + + + + + + + add_pointer<int const&>::type + + + + int const* + + + + + + + add_pointer<int*>::type + + + + int** + + + + + + + add_pointer<int*&>::type + + + + int** + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_reference"> add_reference</link> + +template <class T> +struct add_reference +{ + typedef see-below type; +}; + + + type: If T + is not a reference type then T&, otherwise T. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_reference<int>::type + + + + int& + + + + + + + add_reference<int const&>::type + + + + int const& + + + + + + + add_reference<int*>::type + + + + int*& + + + + + + + add_reference<int*&>::type + + + + int*& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.add_volatile"> add_volatile</link> + + one + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + + + type: The same type as T + volatile for all T. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/add_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + add_volatile<int>::type + + + + int volatile + + + + + + + add_volatile<int&>::type + + + + int& + + + + + + + add_volatile<int*>::type + + + + int* + volatile + + + + + + + add_volatile<int const>::type + + + + int const + volatile + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.aligned_storage"> aligned_storage</link> + +template <std::size_t Size, std::size_t Align> +struct aligned_storage +{ + typedef see-below type; +}; + + + type: a built-in or POD type with size + Size and an alignment that + is a multiple of Align. + + + Header: #include + <boost/type_traits/aligned_storage.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.alignment_of"> alignment_of</link> + +template <class T> +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {}; + + + Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, + ALIGNOF(T)>, where + ALIGNOF(T)` is the alignment of type T. + + + Note: strictly speaking you should only rely on the value of ALIGNOF(T) being + a multiple of the true alignment of T, although in practice it does compute + the correct value in all the cases we know about. + + + Header: #include + <boost/type_traits/alignment_of.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + alignment_of<int> + inherits from integral_constant<std::size_t, ALIGNOF(int)>. + + +
+
+ + + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + + +
+
+ + + alignment_of<double>::value is an integral constant expression + with value ALIGNOF(double). + + +
+
+ + + alignment_of<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.decay"> decay</link> + +template <class T> +struct decay +{ + typedef see-below type; +}; + + + type: Let U + be the result of remove_reference<T>::type, then if U + is an array type, the result is remove_extent<U>*, + otherwise if U is a function + type then the result is U*, otherwise the result is U. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/decay.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + decay<int[2][3]>::type + + + + int[2]* + + + + + + + decay<int(&)[2]>::type + + + + int* + + + + + + + decay<int(&)(double)>::type + + + + int(*)(double) + + + + + + + int(*)(double + + + + int(*)(double) + + + + + + + int(double) + + + + int(*)(double) + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.extent"> extent</link> + +template <class T, std::size_t N = 0> +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {}; + + + Inherits: Class template extent inherits + from integral_constant<std::size_t, EXTENT(T,N)>, + where EXTENT(T,N) is the number of elements in the N'th array + dimention of type T. + + + If T is not an array type, + or if N > + rank<T>::value, or if the N'th array bound is incomplete, + then EXTENT(T,N) is zero. + + + Header: #include + <boost/type_traits/extent.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + extent<int[1]> inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + extent<double[2][3][4], + 1>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + extent<int[4]>::value + is an integral constant expression that evaluates to 4. + + +
+
+ + + extent<int[][2]>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<int[][2], 1>::value + is an integral constant expression that evaluates to 2. + + +
+
+ + + extent<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + extent<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.floating_point_promotion"> + floating_point_promotion</link> +template <class T> +struct floating_point_promotion +{ + typedef see-below type; +}; + + + type: If floating point promotion can be + applied to an rvalue of type T, + then applies floating point promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.6. + + + Header: #include + <boost/type_traits/floating_point_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + floating_point_promotion<float + const>::type + + + + double const + + + + + + + floating_point_promotion<float&>::type + + + + float& + + + + + + + floating_point_promotion<short>::type + + + + short + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.function_traits"> function_traits</link> + +template <class F> +struct function_traits +{ + static const std::size_t arity = see-below; + typedef see-below result_type; + typedef see-below argN_type; +}; + + + The class template function_traits will only compile if: + + + + The compiler supports partial specialization of class templates. + + + The template argument F + is a function type, note that this is not the same thing as a pointer + to a function. + + + + + function_traits is intended to introspect only C++ functions of the form + R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member + functions. To convert a function pointer type to a suitable type use remove_pointer. + + + Function Traits Members + + + + + + Member + + + + Description + + + + + + + + + function_traits<F>::arity + + + + An integral constant expression that gives the number of arguments + accepted by the function type F. + + + + + + + function_traits<F>::result_type + + + + The type returned by function type F. + + + + + + + function_traits<F>::argN_type + + + + The Nth argument type of function type F, + where 1 <= + N <= + arity of F. + + + + + +
Examples + + + + + + Expression + + + + Result + + + + + + + + + function_traits<void (void)>::arity + + + + An integral constant expression that has the value 0. + + + + + + + function_traits<long (int)>::arity + + + + An integral constant expression that has the value 1. + + + + + + + function_traits<long (int, long, double, void*)>::arity + + + + An integral constant expression that has the value 4. + + + + + + + function_traits<void (void)>::result_type + + + + The type void. + + + + + + + function_traits<long (int)>::result_type + + + + The type long. + + + + + + + function_traits<long (int)>::arg1_type + + + + The type int. + + + + + + + function_traits<long (int, long, double, void*)>::arg4_type + + + + The type void*. + + + + + + + function_traits<long (int, long, double, void*)>::arg5_type + + + + A compiler error: there is no arg5_type + since there are only four arguments. + + + + + + + function_traits<long (*)(void)>::arity + + + + A compiler error: argument type is a function pointer, + and not a function type. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.has_nothrow_assign"> has_nothrow_assign</link> + +template <class T> +struct has_nothrow_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_assign + will never report that a class or struct has a non-throwing assignment-operator; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler support to ensure that this trait "just + works". + + + Header: #include + <boost/type_traits/has_nothrow_assign.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_constructor"> + has_nothrow_constructor</link> +template <class T> +struct has_nothrow_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_constructor + will never report that a class or struct has a non-throwing default-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_constructor.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_copy"> has_nothrow_copy</link> + +template <class T> +struct has_nothrow_copy : public true_type-or-false_type {}; + +template <class T> +struct has_nothrow_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + These two traits are synonyms for each other. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_nothrow_copy + will never report that a class or struct has a non-throwing copy-constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual + C++ 8 has the necessary compiler intrinsics + to ensure that this trait "just works". + + + Header: #include + <boost/type_traits/has_nothrow_copy.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.has_nothrow_cp_cons"> has_nothrow_copy_constructor</link> + + See has_nothrow_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_no_throw_def_cons"> has_nothrow_default_constructor</link> + + See has_nothrow_constructor. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_assign"> has_trivial_assign</link> + +template <class T> +struct has_trivial_assign : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial assignment-operator then the operator has the same + effect as copying the bits of one object to the other: calls to the operator + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_assign + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p11. + + + Header: #include + <boost/type_traits/has_trivial_assign.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_assign<int> + inherits from true_type. + + +
+
+ + + has_trivial_assign<char*>::type is the type true_type. + + +
+
+ + + has_trivial_assign<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_assign<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_assign<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_constructor"> + has_trivial_constructor</link> +template <class T> +struct has_trivial_constructor : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_default_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial default-constructor then the constructor have no + effect: calls to the constructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_constructor + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.1p6. + + + Header: #include + <boost/type_traits/has_trivial_constructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_constructor<int> inherits from true_type. + + +
+
+ + + has_trivial_constructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_constructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_constructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_constructor<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_copy"> has_trivial_copy</link> + +template <class T> +struct has_trivial_copy : public true_type-or-false_type {}; + +template <class T> +struct has_trivial_copy_constructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type. + + + These two traits are synonyms for each other. + + + If a type has a trivial copy-constructor then the constructor has the same + effect as copying the bits of one object to the other: calls to the constructor + can be safely replaced with a call to memcpy. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_copy + will never report that a user-defined class or struct has a trivial constructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.8p6. + + + Header: #include + <boost/type_traits/has_trivial_copy.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_copy<int> + inherits from true_type. + + +
+
+ + + has_trivial_copy<char*>::type is the type true_type. + + +
+
+ + + has_trivial_copy<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + has_trivial_copy<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + has_trivial_copy<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_trivial_cp_cons"> has_trivial_copy_constructor</link> + + See has_trivial_copy. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_def_cons"> has_trivial_default_constructor</link> + + See has_trivial_constructor. + +
+
+ <link linkend="boost_typetraits.reference.has_trivial_destructor"> has_trivial_destructor</link> + +template <class T> +struct has_trivial_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type. + + + If a type has a trivial destructor then the destructor has no effect: calls + to the destructor can be safely omitted. Note that using meta-programming + to omit a call to a single trivial-constructor call is of no benefit whatsoever. + However, if loops and/or exception handling code can also be omitted, then + some benefit in terms of code size and speed can be obtained. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, has_trivial_destructor + will never report that a user-defined class or struct has a trivial destructor; + this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW + 9 and Visual C++ 8 have the necessary compiler intrinsics + to detect user-defined classes with trivial constructors. + + + C++ Standard Reference: 12.4p3. + + + Header: #include + <boost/type_traits/has_trivial_destructor.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + has_trivial_destructor<int> inherits from true_type. + + +
+
+ + + has_trivial_destructor<char*>::type + is the type true_type. + + +
+
+ + + has_trivial_destructor<int (*)(long)>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + has_trivial_destructor<MyClass>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + has_trivial_destructor<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.has_virtual_destructor"> has_virtual_destructor</link> + +template <class T> +struct has_virtual_destructor : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type. + + + Compiler Compatibility: This trait is provided + for completeness, since it's part of the Technical Report on C++ Library + Extensions. However, there is currently no way to portably implement this + trait. The default version provided always inherits from false_type, + and has to be explicitly specialized for types with virtual destructors unless + the compiler used has compiler intrinsics + that enable the trait to do the right thing: currently (May 2005) only Visual + C++ 8 and GCC-4.3 have the necessary intrinsics. + + + C++ Standard Reference: 12.4. + + + Header: #include + <boost/type_traits/has_virtual_destructor.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.integral_constant"> integral_constant</link> + +template <class T, T val> +struct integral_constant +{ + typedef integral_constant<T, val> type; + typedef T value_type; + static const T value = val; +}; + +typedef integral_constant<bool, true> true_type; +typedef integral_constant<bool, false> false_type; + + + Class template integral_constant + is the common base class for all the value-based type traits. The two typedef's + true_type and false_type are provided for convenience: + most of the value traits are Boolean properties and so will inherit from + one of these. + +
+
+ <link linkend="boost_typetraits.reference.integral_promotion"> integral_promotion</link> + +template <class T> +struct integral_promotion +{ + typedef see-below type; +}; + + + type: If integral promotion can be applied + to an rvalue of type T, then + applies integral promotion to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field). + + + Header: #include + <boost/type_traits/integral_promotion.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + integral_promotion<short + const>::type + + + + int const + + + + + + + integral_promotion<short&>::type + + + + short& + + + + + + + integral_promotion<enum std::float_round_style>::type + + + + int + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.is_abstract"> is_abstract</link> + +template <class T> +struct is_abstract : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + abstract type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10.3. + + + Header: #include + <boost/type_traits/is_abstract.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: The compiler must + support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + this is the "safe fallback position" for which polymorphic types + are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT + is used to signify that the implementation is buggy, users should check for + this in their own code if the "safe fallback" is not suitable for + their particular use-case. + + + Examples: + +
+ + + Given: class abc{ virtual ~abc() = 0; }; + + +
+
+ + + is_abstract<abc> + inherits from true_type. + + +
+
+ + + is_abstract<abc>::type is the type true_type. + + +
+
+ + + is_abstract<abc const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_abstract<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_arithmetic"> is_arithmetic</link> + +template <class T> +struct is_arithmetic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point). + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_arithmetic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_arithmetic<int> + inherits from true_type. + + +
+
+ + + is_arithmetic<char>::type is the type true_type. + + +
+
+ + + is_arithmetic<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_arithmetic<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_array"> is_array</link> + +template <class T> +struct is_array : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + array type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.4. + + + Header: #include + <boost/type_traits/is_array.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can give the wrong result with function types. + + + Examples: + +
+ + + is_array<int[2]> inherits from true_type. + + +
+
+ + + is_array<char[2][3]>::type + is the type true_type. + + +
+
+ + + is_array<double[]>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_array<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_base_of"> is_base_of</link> + +template <class Base, class Derived> +struct is_base_of : public true_type-or-false_type {}; + + + Inherits: If Base is base class of type + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type. + + + This template will detect non-public base classes, and ambiguous base classes. + + + Note that is_base_of<X,X> will always inherit from true_type. + This is the case even if X + is not a class type. This is a change in behaviour from Boost-1.33 + in order to track the Technical Report on C++ Library Extensions. + + + Types Base and Derived must not be incomplete types. + + + C++ Standard Reference: 10. + + + Header: #include + <boost/type_traits/is_base_of.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. There are some older compilers which + will produce compiler errors if Base + is a private base class of Derived, + or if Base is an ambiguous + base of Derived. These compilers + include Borland C++, older versions of Sun Forte C++, Digital Mars C++, and + older versions of EDG based compilers. + + + Examples: + +
+ + + Given: class Base{}; class Derived : + public Base{}; + + +
+
+ + + is_base_of<Base, Derived> + inherits from true_type. + + +
+
+ + + is_base_of<Base, Derived>::type is the type true_type. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_base_of<Base, Base>::value is an integral constant expression + that evaluates to true: a class is regarded as it's + own base. + + +
+
+ + + is_base_of<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_class"> is_class</link> + +template <class T> +struct is_class : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + class type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 9.2. + + + Header: #include + <boost/type_traits/is_class.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + to correctly identify union types, and therefore make is_class function correctly. + + + Examples: + +
+ + + Given: class MyClass; then: + + +
+
+ + + is_class<MyClass> + inherits from true_type. + + +
+
+ + + is_class<MyClass const>::type + is the type true_type. + + +
+
+ + + is_class<MyClass>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_class<MyClass&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<MyClass*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_class<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_complex"> is_complex</link> + +template <class T> +struct is_complex : public true_type-or-false_type {}; + + + Inherits: If T + is a complex number type then true (of type std::complex<U> + for some type U), otherwise + false. + + + C++ Standard Reference: 26.2. + + + Header: #include + <boost/type_traits/is_complex.hpp> + or #include <boost/type_traits.hpp> + +
+
+ <link linkend="boost_typetraits.reference.is_compound"> is_compound</link> + +template <class T> +struct is_compound : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental). + + + C++ Standard Reference: 3.9.2. + + + Header: #include + <boost/type_traits/is_compound.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_compound<MyClass> + inherits from true_type. + + +
+
+ + + is_compound<MyEnum>::type is the type true_type. + + +
+
+ + + is_compound<int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int&>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_compound<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_compound<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_const"> is_const</link> + +template <class T> +struct is_const : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) const-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_const.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_const<int const> inherits from true_type. + + +
+
+ + + is_const<int const volatile>::type is the type true_type. + + +
+
+ + + is_const<int* const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_const<int const*>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int const&>::value + is an integral constant expression that evaluates to false: + the const-qualifier is not at the top level in this case. + + +
+
+ + + is_const<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_const<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_convertible"> is_convertible</link> + +template <class From, class To> +struct is_convertible : public true_type-or-false_type {}; + + + Inherits: If an imaginary lvalue of type + From is convertible to type + To then inherits from true_type, + otherwise inherits from false_type. + + + Type From must not be an incomplete type. + + + Type To must not be an incomplete, or function type. + + + No types are considered to be convertible to array types or abstract-class + types. + + + This template can not detect whether a converting-constructor is public or not: if type To + has a private converting constructor + from type From then instantiating + is_convertible<From, To> + will produce a compiler error. For this reason is_convertible + can not be used to determine whether a type has a public + copy-constructor or not. + + + This template will also produce compiler errors if the conversion is ambiguous, + for example: + + +struct A {}; +struct B : A {}; +struct C : A {}; +struct D : B, C {}; +// This produces a compiler error, the conversion is ambiguous: +bool const y = boost::is_convertible<D*,A*>::value; + + + C++ Standard Reference: 4 and 8.5. + + + Compiler Compatibility: This template is + currently broken with Borland C++ Builder 5 (and earlier), for constructor-based + conversions, and for the Metrowerks 7 (and earlier) compiler in all cases. + If the compiler does not support is_abstract, + then the template parameter To + must not be an abstract type. + + + Header: #include + <boost/type_traits/is_convertible.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_convertible<int, double> + inherits from true_type. + + +
+
+ + + is_convertible<const int, double>::type + is the type true_type. + + +
+
+ + + is_convertible<int* const, int*>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_convertible<int const*, int*>::value + is an integral constant expression that evaluates to false: + the conversion would require a const_cast. + + +
+
+ + + is_convertible<int const&, long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_convertible<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_convertible<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_empty"> is_empty</link> + +template <class T> +struct is_empty : public true_type-or-false_type {}; + + + Inherits: If T is an empty class type then + inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 10p5. + + + Header: #include + <boost/type_traits/is_empty.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: In order to correctly + detect empty classes this trait relies on either: + + + + the compiler implementing zero sized empty base classes, or + + + the compiler providing intrinsics + to detect empty classes. + + + + Can not be used with incomplete types. + + + Can not be used with union types, until is_union can be made to work. + + + If the compiler does not support partial-specialization of class templates, + then this template can not be used with abstract types. + + + Examples: + +
+ + + Given: struct empty_class + {}; + + +
+
+ + + is_empty<empty_class> + inherits from true_type. + + +
+
+ + + is_empty<empty_class const>::type + is the type true_type. + + +
+
+ + + is_empty<empty_class>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_empty<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_enum"> is_enum</link> + +template <class T> +struct is_enum : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + enum type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 7.2. + + + Header: #include + <boost/type_traits/is_enum.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: Requires a correctly + functioning is_convertible + template; this means that is_enum is currently broken under Borland C++ Builder + 5, and for the Metrowerks compiler prior to version 8, other compilers should + handle this template just fine. + + + Examples: + +
+ + + Given: enum my_enum + { one, two }; + + +
+
+ + + is_enum<my_enum> + inherits from true_type. + + +
+
+ + + is_enum<my_enum const>::type + is the type true_type. + + +
+
+ + + is_enum<my_enum>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_enum<my_enum&>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<my_enum*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_enum<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_floating_point"> is_floating_point</link> + +template <class T> +struct is_floating_point : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + floating point type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p8. + + + Header: #include + <boost/type_traits/is_floating_point.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_floating_point<float> + inherits from true_type. + + +
+
+ + + is_floating_point<double>::type is the type true_type. + + +
+
+ + + is_floating_point<long double>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_floating_point<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_function"> is_function</link> + +template <class T> +struct is_function : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + function type then inherits from true_type, + otherwise inherits from false_type. + Note that this template does not detect pointers to functions, + or references to functions, these are detected by is_pointer and is_reference respectively: + + +typedef int f1(); // f1 is of function type. +typedef int (f2*)(); // f2 is a pointer to a function. +typedef int (f3&)(); // f3 is a reference to a function. + + + C++ Standard Reference: 3.9.2p1 and 8.3.5. + + + Header: #include + <boost/type_traits/is_function.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_function<int (void)> + inherits from true_type. + + +
+
+ + + is_function<long (double, int)>::type is the type true_type. + + +
+
+ + + is_function<long (double, int)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_function<long (*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer type, not a function type. + + +
+
+ + + is_function<long (&)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a reference to a function, not a function type. + + +
+
+ + + is_function<long (MyClass::*)(double, int)>::value is an integral constant expression + that evaluates to false: the argument in this case + is a pointer to a member function. + + +
+
+ + + is_function<T>::value_type is the type bool. + + +
+ + + Don't confuse function-types with pointers to functions: + + + typedef int + f(double); + + + defines a function type, + + + f foo; + + + declares a prototype for a function of type f, + + + f* + pf = + foo; + + + f& + fr = + foo; + + + declares a pointer and a reference to the function foo. + + + If you want to detect whether some type is a pointer-to-function then use: + + + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value + + + or for pointers to member functions you can just use is_member_function_pointer + directly. + + +
+
+ <link linkend="boost_typetraits.reference.is_fundamental"> is_fundamental</link> + +template <class T> +struct is_fundamental : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + fundamental type then inherits from true_type, + otherwise inherits from false_type. + Fundamental types include integral, floating point and void types (see also + is_integral, + is_floating_point + and is_void) + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/is_fundamental.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_fundamental<int)> + inherits from true_type. + + +
+
+ + + is_fundamental<double const>::type + is the type true_type. + + +
+
+ + + is_fundamental<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_fundamental<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_integral"> is_integral</link> + +template <class T> +struct is_integral : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + integral type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p7. + + + Header: #include + <boost/type_traits/is_integral.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_integral<int> + inherits from true_type. + + +
+
+ + + is_integral<const char>::type + is the type true_type. + + +
+
+ + + is_integral<long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_integral<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_function_pointer"> + is_member_function_pointer</link> +template <class T> +struct is_member_function_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member function then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_function_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(char)>::type + is the type true_type. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)(void)const>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_member_function_pointer<int (MyClass::*)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a data member and not a member + function, see is_member_object_pointer + and is_member_pointer + + +
+
+ + + is_member_function_pointer<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_object_pointer"> + is_member_object_pointer</link> +template <class T> +struct is_member_object_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_object_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_object_pointer<int (MyClass::*)> inherits from true_type. + + +
+
+ + + is_member_object_pointer<double (MyClass::*)>::type + is the type true_type. + + +
+
+ + + is_member_object_pointer<const int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_object_pointer<int (MyClass::*)(void)>::value + is an integral constant expression that evaluates to false: + the argument in this case is a pointer to a member function and not a + member object, see is_member_function_pointer + and is_member_pointer + + +
+
+ + + is_member_object_pointer<T>::value_type + is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_member_pointer"> is_member_pointer</link> + +template <class T> +struct is_member_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer to a member (either a function or a data member) then inherits from + true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.3. + + + Header: #include + <boost/type_traits/is_member_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_member_pointer<int (MyClass::*)> + inherits from true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + + +
+
+ + + is_member_pointer<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_member_pointer<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_object"> is_object</link> + +template <class T> +struct is_object : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + object type then inherits from true_type, + otherwise inherits from false_type. + All types are object types except references, void, and function types. + + + C++ Standard Reference: 3.9p9. + + + Header: #include + <boost/type_traits/is_object.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_object<int> + inherits from true_type. + + +
+
+ + + is_object<int*>::type is the type true_type. + + +
+
+ + + is_object<int (*)(void)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int (MyClass::*)(void)const>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_object<int &>::value is an integral constant expression + that evaluates to false: reference types are not + objects + + +
+
+ + + is_object<int (double)>::value is an integral constant expression + that evaluates to false: function types are not + objects + + +
+
+ + + is_object<const void>::value + is an integral constant expression that evaluates to false: + void is not an object type + + +
+
+ + + is_object<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pod"> is_pod</link> + +template <class T> +struct is_pod : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + POD type then inherits from true_type, + otherwise inherits from false_type. + + + POD stands for "Plain old data". Arithmetic types, and enumeration + types, a pointers and pointer to members are all PODs. Classes and unions + can also be POD's if they have no non-static data members that are of reference + or non-POD type, no user defined constructors, no user defined assignment + operators, no private or protected non-static data members, no virtual functions + and no base classes. Finally, a cv-qualified POD is still a POD, as is an + array of PODs. + + + C++ Standard Reference: 3.9p10 and 9p4 (Note + that POD's are also aggregates, see 8.5.1). + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, ispod + will never report that a class or struct is a POD; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler-_intrinsics. + + + Header: #include + <boost/type_traits/is_pod.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pod<int> + inherits from true_type. + + +
+
+ + + is_pod<char*>::type is the type true_type. + + +
+
+ + + is_pod<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pod<MyClass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pod<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_pointer"> is_pointer</link> + +template <class T> +struct is_pointer : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + pointer type (includes function pointers, but excludes pointers to members) + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2p2 and 8.3.1. + + + Header: #include + <boost/type_traits/is_pointer.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_pointer<int*> + inherits from true_type. + + +
+
+ + + is_pointer<char* const>::type is the type true_type. + + +
+
+ + + is_pointer<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_pointer<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<int (MyClass::*)>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_pointer<T>::value_type is the type bool. + + +
+ + + is_pointer detects "real" + pointer types only, and not smart pointers. Users + should not specialise is_pointer + for smart pointer types, as doing so may cause Boost (and other third party) + code to fail to function correctly. Users wanting a trait to detect smart + pointers should create their own. However, note that there is no way in + general to auto-magically detect smart pointer types, so such a trait would + have to be partially specialised for each supported smart pointer type. + + +
+
+ <link linkend="boost_typetraits.reference.is_polymorphic"> is_polymorphic</link> + +template <class T> +struct is_polymorphic : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + polymorphic type then inherits from true_type, + otherwise inherits from false_type. + Type T must be a complete + type. + + + C++ Standard Reference: 10.3. + + + Compiler Compatibility: The implementation + requires some knowledge of the compilers ABI, it does actually seem to work + with the majority of compilers though. + + + Header: #include + <boost/type_traits/is_polymorphic.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + Given: class poly{ virtual ~poly(); }; + + +
+
+ + + is_polymorphic<poly> + inherits from true_type. + + +
+
+ + + is_polymorphic<poly const>::type + is the type true_type. + + +
+
+ + + is_polymorphic<poly>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_polymorphic<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_same"> is_same</link> + +template <class T, class U> +struct is_same : public true_type-or-false_type {}; + + + Inherits: If T and U are the same types + then inherits from true_type, + otherwise inherits from false_type. + + + Header: #include + <boost/type_traits/is_same.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with abstract, incomplete or function types. + + + Examples: + +
+ + + is_same<int, int> + inherits from true_type. + + +
+
+ + + is_same<int, int>::type is the type true_type. + + +
+
+ + + is_same<int, int>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_same<int const, int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_same<int&, int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_same<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_scalar"> is_scalar</link> + +template <class T> +struct is_scalar : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + scalar type then inherits from true_type, + otherwise inherits from false_type. + Scalar types include integral, floating point, enumeration, pointer, and + pointer-to-member types. + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_scalar.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Examples: + +
+ + + is_scalar<int*> + inherits from true_type. + + +
+
+ + + is_scalar<int>::type is the type true_type. + + +
+
+ + + is_scalar<double>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)(long)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<int (MyClass::*)>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_scalar<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_signed"> is_signed</link> + +template <class T> +struct is_signed : public true_type-or-false_type {}; + + + Inherits: If T is an signed integer type + or an enumerated type with an underlying signed integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_signed.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_signed<int> + inherits from true_type. + + +
+
+ + + is_signed<int const volatile>::type is the type true_type. + + +
+
+ + + is_signed<unsigned int>::value + is an integral constant expression that evaluates to false. + + +
+
+ + + is_signed<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_signed<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_signed<long long>::value + is an integral constant expression that evaluates to true. + + +
+
+ + + is_signed<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_stateless"> is_stateless</link> + +template <class T> +struct is_stateless : public true_type-or-false_type {}; + + + Inherits: Ff T is a stateless type then + inherits from true_type, + otherwise from false_type. + + + Type T must be a complete type. + + + A stateless type is a type that has no storage and whose constructors and + destructors are trivial. That means that is_stateless + only inherits from true_type + if the following expression is true: + + +::boost::has_trivial_constructor<T>::value +&& ::boost::has_trivial_copy<T>::value +&& ::boost::has_trivial_destructor<T>::value +&& ::boost::is_class<T>::value +&& ::boost::is_empty<T>::value + + + C++ Standard Reference: 3.9p10. + + + Header: #include + <boost/type_traits/is_stateless.hpp> + or #include <boost/type_traits.hpp> + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + can not be used with function types. + + + Without some (as yet unspecified) help from the compiler, is_stateless will + never report that a class or struct is stateless; this is always safe, if + possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have + the necessary compiler intrinsics + to make this template work automatically. + +
+
+ <link linkend="boost_typetraits.reference.is_reference"> is_reference</link> + +template <class T> +struct is_reference : public true_type-or-false_type {}; + + + Inherits: If T is a reference pointer type + then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.2 and 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial-specialization of class templates, then this template + may report the wrong result for function types, and for types that are both + const and volatile qualified. + + + Header: #include + <boost/type_traits/is_reference.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_reference<int&> + inherits from true_type. + + +
+
+ + + is_reference<int const&>::type + is the type true_type. + + +
+
+ + + is_reference<int (&)(long)>::value is an integral constant expression + that evaluates to true (the argument in this case + is a reference to a function). + + +
+
+ + + is_reference<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_union"> is_union</link> + +template <class T> +struct is_union : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + union type then inherits from true_type, + otherwise inherits from false_type. + Currently requires some kind of compiler support, otherwise unions are identified + as classes. + + + C++ Standard Reference: 3.9.2 and 9.5. + + + Compiler Compatibility: Without (some as + yet unspecified) help from the compiler, we cannot distinguish between union + and class types using only standard C++, as a result this type will never + inherit from true_type, + unless the user explicitly specializes the template for their user-defined + union types, or unless the compiler supplies some unspecified intrinsic that + implements this functionality. Currently (May 2005) only Visual C++ 8 has + the necessary compiler intrinsics + to make this trait "just work" without user intervention. + + + Header: #include + <boost/type_traits/is_union.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_union<void> + inherits from true_type. + + +
+
+ + + is_union<const void>::type + is the type true_type. + + +
+
+ + + is_union<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_union<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_union<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_unsigned"> is_unsigned</link> + +template <class T> +struct is_unsigned : public true_type-or-false_type {}; + + + Inherits: If T is an unsigned integer type + or an enumerated type with an underlying unsigned integer type, then inherits + from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1, 7.2. + + + Header: #include + <boost/type_traits/is_unsigned.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_unsigned<unsigned int> inherits from true_type. + + +
+
+ + + is_unsigned<unsigned int + const volatile>::type + is the type true_type. + + +
+
+ + + is_unsigned<int>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<myclass>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_unsigned<char>::value is an integral constant expression + whose value depends upon the signedness of type char. + + +
+
+ + + is_unsigned<unsigned long + long>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_unsigned<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_void"> is_void</link> + +template <class T> +struct is_void : public true_type-or-false_type {}; + + + Inherits: If T is a (possibly cv-qualified) + void type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.1p9. + + + Header: #include + <boost/type_traits/is_void.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_void<void> + inherits from true_type. + + +
+
+ + + is_void<const void>::type + is the type true_type. + + +
+
+ + + is_void<void>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_void<void*>::value is an integral constant expression + that evaluates to false. + + +
+
+ + + is_void<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.is_volatile"> is_volatile</link> + +template <class T> +struct is_volatile : public true_type-or-false_type {}; + + + Inherits: If T is a (top level) volatile-qualified + type then inherits from true_type, + otherwise inherits from false_type. + + + C++ Standard Reference: 3.9.3. + + + Header: #include + <boost/type_traits/is_volatile.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + is_volatile<volatile int> inherits from true_type. + + +
+
+ + + is_volatile<const volatile + int>::type is the type true_type. + + +
+
+ + + is_volatile<int* volatile>::value is an integral constant expression + that evaluates to true. + + +
+
+ + + is_volatile<int volatile*>::value + is an integral constant expression that evaluates to false: + the volatile qualifier is not at the top level in this case. + + +
+
+ + + is_volatile<T>::value_type is the type bool. + + +
+
+
+ <link linkend="boost_typetraits.reference.make_signed"> make_signed</link> + +template <class T> +struct make_signed +{ + typedef see-below type; +}; + + + type: If T is a signed integer type then + the same type as T, if T is an unsigned integer type then the corresponding + signed type. Otherwise if T is an enumerated or character type (char or wchar_t) + then a signed integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_signed.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + int + + + + + + + make_signed<unsigned int + const>::type + + + + int const + + + + + + + make_signed<const unsigned + long long>::type + + + + const long + long + + + + + + + make_signed<my_enum>::type + + + + A signed integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + A signed integer type with the same width as wchar_t. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.make_unsigned"> make_unsigned</link> + +template <class T> +struct make_unsigned +{ + typedef see-below type; +}; + + + type: If T is a unsigned integer type then + the same type as T, if T is an signed integer type then the corresponding + unsigned type. Otherwise if T is an enumerated or character type (char or + wchar_t) then an unsigned integer type with the same width as T. + + + If T has any cv-qualifiers then these are also present on the result type. + + + Requires: T must be an integer or enumerated + type, and must not be the type bool. + + + C++ Standard Reference: 3.9.1. + + + Header: #include + <boost/type_traits/make_unsigned.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + make_signed<int>::type + + + + unsigned int + + + + + + + make_signed<unsigned int + const>::type + + + + unsigned int + const + + + + + + + make_signed<const unsigned + long long>::type + + + + const unsigned + long long + + + + + + + make_signed<my_enum>::type + + + + An unsigned integer type with the same width as the enum. + + + + + + + make_signed<wchar_t>::type + + + + An unsigned integer type with the same width as wchar_t. + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.promote"> promote</link> + +template <class T> +struct promote +{ + typedef see-below type; +}; + + + type: If integral or floating point promotion + can be applied to an rvalue of type T, + then applies integral and floating point promotions to T + and keeps cv-qualifiers of T, + otherwise leaves T unchanged. + See also integral_promotion + and floating_point_promotion. + + + C++ Standard Reference: 4.5 except 4.5/3 + (integral bit-field) and 4.6. + + + Header: #include + <boost/type_traits/promote.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + promote<short volatile>::type + + + + int volatile + + + + + + + promote<float const>::type + + + + double const + + + + + + + promote<short&>::type + + + + short& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.rank"> rank</link> + +template <class T> +struct rank : public integral_constant<std::size_t, RANK(T)> {}; + + + Inherits: Class template rank inherits from + integral_constant<std::size_t, RANK(T)>, + where RANK(T) is the + number of array dimensions in type T. + + + If T is not an array type, + then RANK(T) is zero. + + + Header: #include + <boost/type_traits/rank.hpp> + or #include <boost/type_traits.hpp> + + + Examples: + +
+ + + rank<int[]> + inherits from integral_constant<std::size_t, 1>. + + +
+
+ + + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + + +
+
+ + + rank<int[1]>::value + is an integral constant expression that evaluates to 1. + + +
+
+ + + rank<int[][2]>::value is an integral constant expression + that evaluates to 2. + + +
+
+ + + rank<int*>::value is an integral constant expression + that evaluates to 0. + + +
+
+ + + rank<T>::value_type is the type std::size_t. + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_all_extents"> remove_all_extents</link> + +template <class T> +struct remove_all_extents +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes all of the array bounds on T, + otherwise leaves T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_all_extents.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_all_extents<int>::type + + + + int + + + + + + + remove_all_extents<int const[2]>::type + + + + int const + + + + + + + remove_all_extents<int[][2]>::type + + + + int + + + + + + + remove_all_extents<int[2][3][4]>::type + + + + int + + + + + + + remove_all_extents<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_const"> remove_const</link> + +template <class T> +struct remove_const +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level const-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_const.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_const<int>::type + + + + int + + + + + + + remove_const<int const>::type + + + + int + + + + + + + remove_const<int const + volatile>::type + + + + int volatile + + + + + + + remove_const<int const&>::type + + + + int const& + + + + + + + remove_const<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_cv"> remove_cv</link> + +template <class T> +struct remove_cv +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level cv-qualifiers removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_cv.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_cv<int>::type + + + + int + + + + + + + remove_cv<int const>::type + + + + int + + + + + + + remove_cv<int const + volatile>::type + + + + int + + + + + + + remove_cv<int const&>::type + + + + int const& + + + + + + + remove_cv<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_extent"> remove_extent</link> + +template <class T> +struct remove_extent +{ + typedef see-below type; +}; + + + type: If T + is an array type, then removes the topmost array bound, otherwise leaves + T unchanged. + + + C++ Standard Reference: 8.3.4. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_extent.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_extent<int>::type + + + + int + + + + + + + remove_extent<int const[2]>::type + + + + int const + + + + + + + remove_extent<int[2][4]>::type + + + + int[4] + + + + + + + remove_extent<int[][2]>::type + + + + int[2] + + + + + + + remove_extent<int const*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_pointer"> remove_pointer</link> + +template <class T> +struct remove_pointer +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any pointer modifier removed. + + + C++ Standard Reference: 8.3.1. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_pointer.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_pointer<int>::type + + + + int + + + + + + + remove_pointer<int const*>::type + + + + int const + + + + + + + remove_pointer<int const**>::type + + + + int const* + + + + + + + remove_pointer<int&>::type + + + + int& + + + + + + + remove_pointer<int*&>::type + + + + int*& + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_reference"> remove_reference</link> + +template <class T> +struct remove_reference +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any reference modifier removed. + + + C++ Standard Reference: 8.3.2. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_reference.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_reference<int>::type + + + + int + + + + + + + remove_reference<int const&>::type + + + + int const + + + + + + + remove_reference<int*>::type + + + + int* + + + + + + + remove_reference<int*&>::type + + + + int* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.remove_volatile"> remove_volatile</link> + +template <class T> +struct remove_volatile +{ + typedef see-below type; +}; + + + type: The same type as T, + but with any top level volatile-qualifier removed. + + + C++ Standard Reference: 3.9.3. + + + Compiler Compatibility: If the compiler + does not support partial specialization of class-templates then this template + will compile, but the member type + will always be the same as type T + except where compiler + workarounds have been applied. + + + Header: #include + <boost/type_traits/remove_volatile.hpp> + or #include <boost/type_traits.hpp> + + Examples + + + + + + Expression + + + + Result Type + + + + + + + + + remove_volatile<int>::type + + + + int + + + + + + + remove_volatile<int volatile>::type + + + + int + + + + + + + remove_volatile<int const + volatile>::type + + + + int const + + + + + + + remove_volatile<int volatile&>::type + + + + int const& + + + + + + + remove_volatile<int volatile*>::type + + + + int const* + + + + + +
+
+
+ <link linkend="boost_typetraits.reference.type_with_alignment"> type_with_alignment</link> + +template <std::size_t Align> +struct type_with_alignment +{ + typedef see-below type; +}; + + + type: a built-in or POD type with an alignment + that is a multiple of Align. + + + Header: #include + <boost/type_traits/type_with_alignment.hpp> + or #include <boost/type_traits.hpp> + +
+
+
+ <link linkend="boost_typetraits.credits"> Credits</link> + + This documentation was pulled together by John Maddock, using Boost.Quickbook + and Boost.DocBook. + + + The original version of this library was created by Steve Cleary, Beman Dawes, + Howard Hinnant, and John Maddock. John Maddock is the current maintainer of + the library. + + + This version of type traits library is based on contributions by Adobe Systems + Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, + Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Thorsten Ottosen, Robert + Ramey and Jeremy Siek. + + + Mat Marcus and Jesse Jones invented, and published + a paper describing, the partial specialization workarounds used in + this library. + + + Aleksey Gurtovoy added MPL integration to the library. + + + The is_convertible + template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: + Mappings between Types and Values". + + + The latest version of this library and documentation can be found at www.boost.org. Bugs, suggestions and discussion + should be directed to boost@lists.boost.org (see www.boost.org/more/mailing_lists.htm#main + for subscription details). + +
+ +
+ This section must not be indexed. + + template <class T> +struct add_const +{ + typedef see-below type; +}; + +
+ +
+ This section contains one block that must not be indexed and one that should be. + + + template <class T> +struct add_const +{ + typedef see-below type; +}; + + + template <class T> +struct add_volatile +{ + typedef see-below type; +}; + +
+ + + + Class Index + + + Typedef Index + + + Macro Index + + + Index Test 1 + + + Index Test 2 + + + +
+ diff --git a/src/boost/tools/bcp/Jamfile.v2 b/src/boost/tools/bcp/Jamfile.v2 new file mode 100644 index 000000000..b89a15362 --- /dev/null +++ b/src/boost/tools/bcp/Jamfile.v2 @@ -0,0 +1,36 @@ +# (C) Copyright John Maddock 2006. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +exe bcp + : + add_dependent_lib.cpp add_path.cpp bcp_imp.cpp copy_path.cpp file_types.cpp + fileview.cpp main.cpp path_operations.cpp scan_cvs_path.cpp + licence_info.cpp scan_licence.cpp output_licence_info.cpp + /boost/filesystem//boost_filesystem + /boost/regex//boost_regex + : + : + release + ; + +install dist-bin + : + bcp + : + EXE + ../../dist/bin + : + release + ; + +install dist-lib + : + bcp + : + LIB + ../../dist/lib + : + release + ; + diff --git a/src/boost/tools/bcp/README.md b/src/boost/tools/bcp/README.md new file mode 100644 index 000000000..b3f2b4d72 --- /dev/null +++ b/src/boost/tools/bcp/README.md @@ -0,0 +1,24 @@ +BCP Tool [![Build Status](https://travis-ci.org/boostorg/bcp.svg?branch=develop)](https://travis-ci.org/boostorg/bcp) +================== + +The bcp utility is a tool for extracting subsets of Boost, it's useful for Boost authors who want to distribute +their library separately from Boost, and for Boost users who want to distribute a subset of Boost with their application. + +bcp can also report on which parts of Boost your code is dependent on, and what licences are used by those dependencies. + +The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/tools/bcp). + +| | Master | Develop | +|------------------|----------|-------------| +| Travis | [![Build Status](https://travis-ci.org/boostorg/bcp.svg?branch=master)](https://travis-ci.org/boostorg/bcp) | [![Build Status](https://travis-ci.org/boostorg/bcp.svg)](https://travis-ci.org/boostorg/bcp) | + + + +## Support, bugs and feature requests ## + +Bugs and feature requests can be reported through the [Gitub issue tracker](https://github.com/boostorg/bcp/issues) +(see [open issues](https://github.com/boostorg/bcp/issues) and +[closed issues](https://github.com/boostorg/bcp/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)). + +You can submit your changes through a [pull request](https://github.com/boostorg/bcp/pulls). + diff --git a/src/boost/tools/bcp/add_dependent_lib.cpp b/src/boost/tools/bcp/add_dependent_lib.cpp new file mode 100644 index 000000000..48529142f --- /dev/null +++ b/src/boost/tools/bcp/add_dependent_lib.cpp @@ -0,0 +1,230 @@ +/* + * + * Copyright (c) 2009 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the following: + * void bcp_implementation::add_path(const fs::path& p) + * void bcp_implementation::add_directory(const fs::path& p) + * void bcp_implementation::add_file(const fs::path& p) + * void bcp_implementation::add_dependent_lib(const std::string& libname, const fs::path& p, const fileview& view) + */ + +#include "bcp_imp.hpp" +#include "fileview.hpp" +#include +#include +#include +#include + +// +// This file contains the code required to work out whether the source/header file being scanned +// is actually dependent upon some library's source code or not. +// + +static std::map scanner; + +static std::map > free_function_names; +static std::map > class_names; +static std::map > variable_names; + +static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::string& libname, bool recurse = false) +{ + /* + if(free_function_names.count(libname) == 0) + { + free_function_names[libname] = "[\\x0]"; + class_names[libname] = "[\\x0]"; + variable_names[libname] = "[\\x0]"; + } + */ + // + // Don't add files created by build system: + // + if((p.leaf() == "bin") || (p.leaf() == "bin-stage")) + return; + // + // Don't add version control directories: + // + if((p.leaf() == "CVS") || (p.leaf() == ".svn")) + return; + // + // don't add directories not under version control: + // + if(cvs_mode && !fs::exists(p / "CVS/Entries")) + return; + if(cvs_mode && !fs::exists(p / ".svn/entries")) + return; + // + // Enumerate files and directories: + // + fs::directory_iterator i(p); + fs::directory_iterator j; + while(i != j) + { + if(fs::is_directory(*i)) + init_library_scanner(*i, cvs_mode, libname, true); + if(bcp_implementation::is_source_file(*i)) + { + static boost::regex function_scanner( + "(?|" // Branch reset group + "(?:\\<\\w+\\>[^>;{},:]*)" // Return type + "(?:" + "(\\<\\w+\\>)" // Maybe class name + "\\s*" + "(?:<[^>;{]*>)?" // Maybe template specialisation + "::\\s*)?" + "(\\<(?!throw|if|while|for|catch)\\w+\\>)" // function name + "\\s*" + "\\(" + "[^\\(\\);{}]*" // argument list + "\\)" + "\\s*(?:BOOST[_A-Z]+\\s*)?" + "\\{" // start of definition + "|" + "(\\<\\w+\\>)" // Maybe class name + "\\s*" + "(?:<[^>;{]*>)?" // Maybe template specialisation + "::\\s*" + "~?\\1" // function name, same as class name + "\\s*" + "\\(" + "[^\\(\\);{}]*" // argument list + "\\)" + "\\s*(?:BOOST[_A-Z]+\\s*)?" + "\\{" // start of definition + ")" // end branch reset + ); + fileview view(*i); + boost::regex_iterator a(view.begin(), view.end(), function_scanner); + boost::regex_iterator b; + while(a != b) + { + if((*a)[1].matched) + { + std::string n = a->str(1); + class_names[libname].insert(n); + } + else + { + std::string n = a->str(2); + free_function_names[libname].insert(n); + } + ++a; + } + } + ++i; + } + + if(recurse == false) + { + // + // Build the regular expressions: + // + const char* e1 = + "^(?>[[:blank:]]*)(?!#)[^;{}\\r\\n]*" + "(?|" + "(?:class|struct)[^:;{}#]*" + "("; + // list of class names goes here... + const char* e2 = + ")\\s*(?:<[^;{>]*>\\s*)?(?::[^;{]*)?\\{" + "|" + "\\<(?!return)\\w+\\>[^:;{}#=<>!~%.\\w]*("; + // List of function names goes here... + const char* e3 = + ")\\s*\\([^;()]*\\)\\s*(?:BOOST[_A-Z]+\\s*)?;)"; + + std::string class_name_list; + std::set::const_iterator i = class_names[libname].begin(), j = class_names[libname].end(); + if(i != j) + { + class_name_list = *i; + ++i; + while(i != j) + { + class_name_list += "|" + *i; + ++i; + } + } + else + { + class_name_list = "[\\x0]"; + } + std::string function_name_list; + i = free_function_names[libname].begin(); + j = free_function_names[libname].end(); + if(i != j) + { + function_name_list = *i; + ++i; + while(i != j) + { + function_name_list += "|" + *i; + ++i; + } + } + else + { + function_name_list = "[\\x0]"; + } + + scanner[libname] = boost::regex(e1 + class_name_list + e2 + function_name_list + e3); + } +} + +void bcp_implementation::add_dependent_lib(const std::string& libname, const fs::path& p, const fileview& view) +{ + // + // if the boost library libname has source associated with it + // then add the source to our list: + // + if(fs::exists(m_boost_path / "libs" / libname / "src")) + { + if(!m_dependencies.count(fs::path("libs") / libname / "src")) + { + if(scanner.count(libname) == 0) + init_library_scanner(m_boost_path / "libs" / libname / "src", m_cvs_mode, libname); + boost::cmatch what; + if(regex_search(view.begin(), view.end(), what, scanner[libname])) + { + std::cout << "INFO: tracking source dependencies of library " << libname + << " due to presence of \"" << what << "\" in file " << p << std::endl; + //std::cout << "Full text match was: " << what << std::endl; + m_dependencies[fs::path("libs") / libname / "src"] = p; // set up dependency tree + add_path(fs::path("libs") / libname / "src"); + + if(fs::exists(m_boost_path / "libs" / libname / "build")) + { + if(!m_dependencies.count(fs::path("libs") / libname / "build")) + { + m_dependencies[fs::path("libs") / libname / "build"] = p; // set up dependency tree + add_path(fs::path("libs") / libname / "build"); + //m_dependencies[fs::path("boost-build.jam")] = p; + //add_path(fs::path("boost-build.jam")); + m_dependencies[fs::path("Jamroot")] = p; + add_path(fs::path("Jamroot")); + //m_dependencies[fs::path("tools/build")] = p; + //add_path(fs::path("tools/build")); + } + } + if(fs::exists(m_boost_path / "libs" / libname / "config")) + { + if(!m_dependencies.count(fs::path("libs") / libname / "config")) + { + m_dependencies[fs::path("libs") / libname / "config"] = p; // set up dependency tree + add_path(fs::path("libs") / libname / "config"); + //m_dependencies[fs::path("boost-build.jam")] = p; + //add_path(fs::path("boost-build.jam")); + m_dependencies[fs::path("Jamroot")] = p; + add_path(fs::path("Jamroot")); + //m_dependencies[fs::path("tools/build")] = p; + //add_path(fs::path("tools/build")); + } + } + } + } + } +} diff --git a/src/boost/tools/bcp/add_path.cpp b/src/boost/tools/bcp/add_path.cpp new file mode 100644 index 000000000..669fc92e7 --- /dev/null +++ b/src/boost/tools/bcp/add_path.cpp @@ -0,0 +1,569 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the following: + * void bcp_implementation::add_path(const fs::path& p) + * void bcp_implementation::add_directory(const fs::path& p) + * void bcp_implementation::add_file(const fs::path& p) + * void bcp_implementation::add_dependent_lib(const std::string& libname, const fs::path& p, const fileview& view) + */ + +#include "bcp_imp.hpp" +#include "fileview.hpp" +#include +#include +#include +#include + + +void bcp_implementation::add_path(const fs::path& p) +{ + fs::path normalized_path = p; + normalized_path.normalize(); + if(fs::exists(m_boost_path / normalized_path)) + { + if(fs::is_directory(m_boost_path / normalized_path)) + add_directory(normalized_path); + else + add_file(normalized_path); + } + else + { + std::cerr << "CAUTION: dependent file " << p.string() << " does not exist." << std::endl; + std::cerr << " Found while scanning file " << m_dependencies[p].string() << std::endl; + } +} + +void bcp_implementation::add_directory(const fs::path& p) +{ + // + // Don't add files created by build system: + // + if((p.leaf() == "bin") || (p.leaf() == "bin-stage")) + return; + // + // Don't add version control directories: + // + if((p.leaf() == "CVS") || (p.leaf() == ".svn")) + return; + // + // don't add directories not under version control: + // + if(m_cvs_mode && !fs::exists(m_boost_path / p / "CVS/Entries")) + return; + if(m_svn_mode && !fs::exists(m_boost_path / p / ".svn/entries")) + return; + // + // enermerate files and directories: + // + fs::directory_iterator i(m_boost_path / p); + fs::directory_iterator j; + while(i != j) + { + // + // we need to convert *i back into + // a relative path, what follows is a hack: + // + std::string s(i->path().string()); + if(m_boost_path.string().size()) + s.erase(0, m_boost_path.string().size() + 1); + fs::path np = s; + if(!m_dependencies.count(np)) + { + m_dependencies[np] = p; // set up dependency tree + add_pending_path(np); + } + ++i; + } +} + +void bcp_implementation::add_file(const fs::path& p) +{ + // + // if the file does not exist in cvs then don't do anything with it: + // + if((m_cvs_mode || m_svn_mode) && (m_cvs_paths.find(p) == m_cvs_paths.end())) + return; + // + // if we've already seen the file return: + // + if(m_copy_paths.find(p) != m_copy_paths.end()) + return; + // + // add the file to our list: + // + m_copy_paths.insert(p); + // + // if this is a source file, scan for dependencies: + // + if(is_source_file(p)) + { + add_file_dependencies(p, false); + } + if(is_jam_file(p) && m_namespace_name.size() && ((std::distance(p.begin(), p.end()) < 3) || (*p.begin() != "tools") || (*++p.begin() != "build"))) + { + // + // We're doing a rename of namespaces and library names + // so scan for names of libraries: + // + static const boost::regex e( + "\\ i(view.begin(), view.end(), e, 1); + boost::regex_token_iterator j; + while(i != j) + { + m_lib_names.insert(*i); + ++i; + } + static const std::pair specials_library_names[] = { + std::pair("libs/python/build/Jamfile.v2", "boost_python"), + std::pair("libs/python/build/Jamfile.v2", "boost_python3"), + }; + + for(unsigned int n = 0; n < (sizeof(specials_library_names)/sizeof(specials_library_names[0])); ++n) + { + if(0 == compare_paths(specials_library_names[n].first, p)) + { + m_lib_names.insert(specials_library_names[n].second); + } + } + } + // + // if this is a html file, scan for dependencies: + // + if(is_html_file(p)) + { + static const boost::regex e( + "<(?:img[^>]*src=|link[^>]*href=)(\"[^\"]+\"|\\w+)[^>]*>" + ); + + fileview view(m_boost_path / p); + boost::regex_token_iterator i(view.begin(), view.end(), e, 1); + boost::regex_token_iterator j; + while(i != j) + { + // + // extract the dependent name: + // + std::string s(*i); + if(s[0] == '\"') + { + // remove quotes: + assert(s.size() > 2); + s.erase(0, 1); + s.erase(s.size() - 1); + } + // + // Remove any target suffix: + // + std::string::size_type n = s.find('#'); + if(n != std::string::npos) + { + s.erase(n); + } + // + // if the name starts with ./ remove it + // or we'll get an error: + if(s.compare(0, 2, "./") == 0) + s.erase(0, 2); + if(s.find(':') == std::string::npos) + { + // only concatonate if it's a relative path + // rather than a URL: + fs::path dep(p.branch_path() / s); + if(!m_dependencies.count(dep)) + { + m_dependencies[dep] = p; // set up dependency tree + add_pending_path(dep); + } + } + ++i; + } + } + // + // now scan for "special" dependencies: + // anything that we can't automatically detect... + // +static const std::pair + specials[] = { + std::pair("tools/build/src/kernel/modules.jam", "libs/predef/check"), + std::pair("tools/build/src/kernel/modules.jam", "libs/predef/tools"), + std::pair("tools/build/src/kernel/modules.jam", "tools/boost_install/boost-install.jam"), + std::pair("tools/build/src/kernel/modules.jam", "tools/boost_install/boost-install-dirs.jam"), + std::pair("tools/build/src/kernel/modules.jam", "tools/boost_install/Jamfile"), + std::pair("tools/build/src/kernel/modules.jam", "libs/headers"), + std::pair("libs/test/build/Jamfile.v2", "libs/timer/src"), + std::pair("libs/test/build/Jamfile.v2", "libs/timer/build"), + std::pair("boost/atomic/capabilities.hpp", "boost/atomic/detail"), + std::pair("boost/chrono/chrono.hpp", "libs/chrono/src"), + std::pair("boost/chrono/chrono.hpp", "libs/chrono/build"), + std::pair("boost/context/execution_context.hpp", "libs/context/src"), + std::pair("boost/context/execution_context.hpp", "libs/context/build"), + std::pair("boost/context/fcontext.hpp", "libs/context/src"), + std::pair("boost/context/fcontext.hpp", "libs/context/build"), + std::pair("boost/context/fixedsize_stack.hpp", "libs/context/src"), + std::pair("boost/context/fixedsize_stack.hpp", "libs/context/build"), + std::pair("boost/context/protected_fixedsize_stack.hpp", "libs/context/src"), + std::pair("boost/context/protected_fixedsize_stack.hpp", "libs/context/build"), + std::pair("boost/context/segmented_stack.hpp", "libs/context/src"), + std::pair("boost/context/segmented_stack.hpp", "libs/context/build"), + std::pair("boost/context/stack_context.hpp", "libs/context/src"), + std::pair("boost/context/stack_context.hpp", "libs/context/build"), + std::pair("boost/context/stack_traits.hpp", "libs/context/src"), + std::pair("boost/context/stack_traits.hpp", "libs/context/build"), + std::pair("boost/cerrno.hpp", "libs/system/build"), + std::pair("boost/cerrno.hpp", "libs/system/src"), + std::pair("libs/thread/build", "boost/system"), + std::pair("libs/thread/build", "boost/cerrno.hpp"), + std::pair("libs/thread/build", "boost/chrono"), + std::pair("boost/filesystem/convenience.hpp", "boost/filesystem.hpp"), + std::pair("boost/filesystem/exception.hpp", "boost/filesystem.hpp"), + std::pair("boost/filesystem/fstream.hpp", "boost/filesystem.hpp"), + std::pair("boost/filesystem/operations.hpp", "boost/filesystem.hpp"), + std::pair("boost/filesystem/path.hpp", "boost/filesystem.hpp"), + std::pair("boost/filesystem.hpp", "libs/filesystem/build"), + std::pair("boost/filesystem.hpp", "libs/filesystem/v2"), + std::pair("boost/filesystem.hpp", "libs/filesystem/v3"), + std::pair("boost/config.hpp", "boost/config"), + std::pair("tools/build/boost-build.jam", "libs/config/checks"), + std::pair("tools/build/boost-build.jam", "libs/config/test"), + std::pair("tools/build/boost-build.jam", "libs/headers/build"), + std::pair("tools/build/boost-build.jam", "tools/boost_install/BoostConfig.cmake"), + std::pair("tools/build/boost-build.jam", "tools/boost_install/BoostDetectToolset.cmake"), + std::pair("tools/build/boost-build.jam", "tools/boost_install/boost-install.jam"), + std::pair("tools/build/boost-build.jam", "tools/boost_install/boost-install-dirs.jam"), + std::pair("tools/build/boost-build.jam", "boost-build.jam"), + std::pair("tools/build/boost-build.jam", "boostcpp.jam"), + std::pair("tools/build/boost-build.jam", "bootstrap.bat"), + std::pair("tools/build/boost-build.jam", "bootstrap.sh"), + std::pair("tools/build/boost-build.jam", "Jamroot"), + std::pair("tools/build/boost-build.jam", "INSTALL"), + std::pair("tools/build/boost-build.jam", "LICENSE_1_0.txt"), + std::pair("boost/preprocessor/iterate.hpp", "boost/preprocessor/iteration"), + std::pair("boost/preprocessor/slot/slot.hpp", "boost/preprocessor/slot/detail"), + std::pair("boost/function.hpp", "boost/function/detail"), + std::pair("boost/regex/config.hpp", "boost/regex/user.hpp"), + std::pair("boost/signals/signal_template.hpp", "boost/function"), + std::pair("boost/mpl/list.hpp", "boost/mpl/list"), + std::pair("boost/mpl/list_c.hpp", "boost/mpl/list"), + std::pair("boost/mpl/vector.hpp", "boost/mpl/vector"), + std::pair("boost/mpl/deque.hpp", "boost/mpl/vector"), + std::pair("boost/mpl/vector_c.hpp", "boost/mpl/vector"), + std::pair("boost/mpl/map.hpp", "boost/mpl/map"), + std::pair("boost/mpl/set.hpp", "boost/mpl/set"), + std::pair("boost/mpl/set_c.hpp", "boost/mpl/set"), + std::pair("boost/mpl/aux_/include_preprocessed.hpp", "boost/mpl/aux_/preprocessed"), + std::pair("boost/mpl/vector/aux_/include_preprocessed.hpp", "boost/mpl/vector/aux_/preprocessed"), + std::pair("boost/mpl/set/aux_/include_preprocessed.hpp", "boost/mpl/set/aux_/preprocessed"), + std::pair("boost/mpl/map/aux_/include_preprocessed.hpp", "boost/mpl/map/aux_/preprocessed"), + std::pair("boost/mpl/list/aux_/include_preprocessed.hpp", "boost/mpl/list/aux_/preprocessed"), + std::pair("libs/graph/src/python/visitor.hpp", "libs/graph/src/python"), + std::pair("boost/test/detail/config.hpp", "libs/test/src"), + std::pair("boost/test/detail/config.hpp", "libs/test/build"), + std::pair("boost/test/detail/config.hpp", "libs/predef/build.jam"), + std::pair("boost/test/detail/config.hpp", "libs/predef/check"), + std::pair("boost/typeof.hpp", "boost/typeof/incr_registration_group.hpp"), + std::pair("boost/function_types/detail/pp_loop.hpp", "boost/function_types/detail/pp_cc_loop"), + std::pair("boost/function_types/components.hpp", "boost/function_types/detail/components_impl"), + std::pair("boost/function_types/detail/pp_loop.hpp", "boost/function_types/detail"), + std::pair("boost/math/tools/rational.hpp", "boost/math/tools/detail"), + std::pair("boost/proto/repeat.hpp", "boost/proto/detail/local.hpp"), + std::pair("boost/signals/signal_template.hpp", "boost/function"), + std::pair("boost/preprocessor/slot/counter.hpp", "boost/preprocessor/slot/detail/counter.hpp"), + std::pair("boost/graph/distributed/detail/tag_allocator.hpp", "libs/graph_parallel"), + std::pair("boost/graph/distributed/mpi_process_group.hpp", "libs/graph_parallel"), + std::pair("libs/coroutine/build/Jamfile.v2", "libs/context/src"), + std::pair("libs/coroutine/build/Jamfile.v2", "libs/context/build"), + std::pair("libs/fiber/build/Jamfile.v2", "libs/context/src"), + std::pair("libs/fiber/build/Jamfile.v2", "libs/context/build"), + }; + + for(unsigned int n = 0; n < (sizeof(specials)/sizeof(specials[0])); ++n) + { + if(0 == compare_paths(specials[n].first, p)) + { + if(!m_dependencies.count(specials[n].second)) + { + m_dependencies[specials[n].second] = p; // set up dependency tree + add_pending_path(specials[n].second); + } + } + } + +} + +void bcp_implementation::add_file_dependencies(const fs::path& p, bool scanfile) +{ + static const boost::regex e( + "^[[:blank:]]*(?://@bcp[[:blank:]]+([^\\n]*)\n)?#[[:blank:]]*include[[:blank:]]*[\"<]([^\">]+)[\">]" + ); + + if(!m_dependencies.count(p)) + m_dependencies[p] = p; // set terminal dependency + + fileview view; + if(scanfile) + view.open(p); + else + view.open(m_boost_path / p); + if(m_license_mode && !scanfile) + scan_license(p, view); + const int subs[] = { 1, 2 }; + boost::regex_token_iterator i(view.begin(), view.end(), e, subs); + boost::regex_token_iterator j; + while(i != j) + { + // + // *i contains the name of the include file, + // check first for a file of that name in the + // same directory as the file we are scanning, + // and if that fails, then check the boost-root: + // + fs::path include_file; + try{ + std::string discart_message = *i; + ++i; + if(discart_message.size()) + { + // The include is optional and should be discarded: + std::cout << "Optional functionality won't be copied: " << discart_message << std::endl; + std::cout << "Add the file " << *i << " to the list of dependencies to extract to copy this functionality." << std::endl; + ++i; + continue; + } + include_file = i->str(); + fs::path test_file(m_boost_path / p.branch_path() / include_file); + if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.branch_path().string() != "boost")) + { + if(!m_dependencies.count(p.branch_path() / include_file)) + { + m_dependencies[p.branch_path() / include_file] = p; + add_pending_path(p.branch_path() / include_file); + } + } + else if(fs::exists(m_boost_path / include_file)) + { + if(!m_dependencies.count(include_file)) + { + m_dependencies[include_file] = p; + add_pending_path(include_file); + } + } + ++i; + } + catch(const fs::filesystem_error&) + { + std::cerr << "Can't parse filename " << *i << " included by file " << p.string() << std::endl; + ++i; + continue; + } + } + // + // Now we need to scan for Boost.Preprocessor includes that + // are included via preprocessor iteration: + // + static const boost::regex ppfiles("^[[:blank:]]*#[[:blank:]]*define[[:blank:]]+(?:BOOST_PP_FILENAME|BOOST_PP_ITERATION_PARAMS|BOOST_PP_INDIRECT_SELF)(?:[^\\n]|\\\\\\n)+?[\"<]([^\">]+)[\">]"); + i = boost::regex_token_iterator(view.begin(), view.end(), ppfiles, 1); + while(i != j) + { + // + // *i contains the name of the include file, + // check first for a file of that name in the + // same directory as the file we are scanning, + // and if that fails, then check the boost-root: + // + fs::path include_file; + try{ + include_file = i->str(); + } + catch(const fs::filesystem_error&) + { + std::cerr << "Can't parse filename " << *i << " included by file " << p.string() << std::endl; + ++i; + continue; + } + fs::path test_file(m_boost_path / p.branch_path() / include_file); + if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.branch_path().string() != "boost")) + { + if(!m_dependencies.count(p.branch_path() / include_file)) + { + m_dependencies[p.branch_path() / include_file] = p; + add_pending_path(p.branch_path() / include_file); + } + } + else if(fs::exists(m_boost_path / include_file)) + { + if(!m_dependencies.count(include_file)) + { + m_dependencies[include_file] = p; + add_pending_path(include_file); + } + } + else + { + std::cerr << "CAUTION: Boost.Preprocessor iterated file " << include_file.string() << " does not exist." << std::endl; + } + ++i; + } + + // + // Scan for any #include MACRO includes that we don't recognise. + // + // Begin by declaring all of the macros that get #included that + // we know about and are correctly handled as special cases: + // + static const std::string known_macros[] = { + "AUX778076_INCLUDE_STRING", + "BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER)", + "BOOST_USER_CONFIG", + "BOOST_COMPILER_CONFIG", + "BOOST_STDLIB_CONFIG", + "BOOST_PLATFORM_CONFIG", + "BOOST_PP_FILENAME_1", + "BOOST_PP_ITERATION_PARAMS_1", + "BOOST_PP_FILENAME_2", + "BOOST_PP_ITERATION_PARAMS_2", + "BOOST_PP_FILENAME_3", + "BOOST_PP_ITERATION_PARAMS_3", + "BOOST_PP_FILENAME_4", + "BOOST_PP_ITERATION_PARAMS_4", + "BOOST_PP_FILENAME_5", + "BOOST_PP_ITERATION_PARAMS_5", + "BOOST_PP_INDIRECT_SELF", + "BOOST_PP_INCLUDE_SELF()", + "BOOST_PP_ITERATE", + "BOOST_PP_LOCAL_ITERATE", + "BOOST_PP_ITERATE()", + "BOOST_PP_LOCAL_ITERATE()", + "BOOST_PP_ASSIGN_SLOT(1)", + "BOOST_PP_ASSIGN_SLOT(2)", + "BOOST_PP_ASSIGN_SLOT(3)", + "BOOST_PP_ASSIGN_SLOT(4)", + "BOOST_PP_ASSIGN_SLOT(5)", + "BOOST_ABI_PREFIX", + "BOOST_ABI_SUFFIX", + "BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX_PREPROCESSED_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_C_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/map/aux_/preprocessed/AUX778076_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/map/AUX778076_MAP_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/set/aux_/preprocessed/AUX778076_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_C_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_DEQUE_HEADER)", + "BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_C_HEADER)", + "BOOST_REGEX_USER_CONFIG", + "BGL_PYTHON_EVENTS_HEADER", + "B1", + "B2", + "BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()", + "BOOST_SLIST_HEADER", + "BOOST_HASH_SET_HEADER", + "BOOST_HASH_MAP_HEADER", + "BOOST_INTRUSIVE_INVARIANT_ASSERT_INCLUDE", + "BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT_INCLUDE", + "BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT_INCLUDE", + "BOOST_FT_loop", + "BOOST_FT_AL_PREPROCESSED", + "BOOST_FT_AL_INCLUDE_FILE", + "__FILE__", + "BOOST_FT_cc_file", + "BOOST_FT_variate_file", + "BOOST_USER_CONFIG", + "BOOST_HEADER()", + "BOOST_TR1_STD_HEADER(utility)", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(tuple))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(random))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(array))", + "BOOST_TR1_HEADER(cmath)", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(complex))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(functional))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(memory))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(regex))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(type_traits))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(unordered_map))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(unordered_set))", + "BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(utility))", + "BOOST_PROTO_LOCAL_ITERATE()", + "BOOST_SIGNAL_FUNCTION_N_HEADER", + "BOOST_PP_UPDATE_COUNTER()", + }; + + static const boost::regex indirect_includes("^[[:blank:]]*#[[:blank:]]*include[[:blank:]]+([^\"<][^\n]*?)[[:blank:]]*$"); + i = boost::regex_token_iterator(view.begin(), view.end(), indirect_includes, 1); + while(i != j) + { + const std::string* known_macros_end = known_macros + sizeof(known_macros)/sizeof(known_macros[0]); + if(known_macros_end == std::find(known_macros, known_macros_end, i->str())) + { + std::cerr << "CAUTION: don't know how to trace depenencies through macro: \"" << *i << "\" in file: " << p.string() << std::endl; + } + ++i; + } + // + // if the file contains a cpp_main / unit_test_main / test_main + // it is dependent upon Boost.test even if it doesn't + // include any of the Boost.test headers directly. + // + static const boost::regex m("^\\s*int\\s+(?:cpp_main|test_main|unit_test_main)"); + boost::cmatch what; + if(boost::regex_search(view.begin(), view.end(), what, m)) + { + add_dependent_lib("test", p, view); + } + if(!scanfile) + { + // + // grab the name of the library to which the header belongs, + // and if that library has source then add the source to our + // list: + // + // this regex catches boost/libname.hpp or boost/libname/whatever: + // + static const boost::regex lib1("boost/([^\\./]+)(?!detail).*"); + boost::smatch swhat; + std::string gs(p.generic_string()); + if(boost::regex_match(gs, swhat, lib1)) + { + add_dependent_lib(swhat.str(1), p, view); + } + // + // and this one catches boost/x/y/whatever (for example numeric/ublas): + // + static const boost::regex lib2("boost/([^/]+/[^/]+)/(?!detail).*"); + gs = p.generic_string(); + if(boost::regex_match(gs, swhat, lib2)) + { + add_dependent_lib(swhat.str(1), p, view); + } + } + if(m_list_namespaces) + { + // + // scan for top level namespaces and add to our list: + // + static const boost::regex namespace_scanner( + "^(?(view.begin(), view.end(), namespace_scanner, 1); + while(i != j) + { + if(m_top_namespaces.count(*i) == 0) + { + //std::cout << *i << " (Found in " << p << ")" << std::endl; + m_top_namespaces[*i] = p; + } + ++i; + } + } +} diff --git a/src/boost/tools/bcp/bcp.hpp b/src/boost/tools/bcp/bcp.hpp new file mode 100644 index 000000000..bec63641c --- /dev/null +++ b/src/boost/tools/bcp/bcp.hpp @@ -0,0 +1,47 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#include + +#if defined(BOOST_FILESYSTEM_VERSION) && (BOOST_FILESYSTEM_VERSION != 3) +# error "This library must be built with Boost.Filesystem version 3" +#else +#define BOOST_FILESYSTEM_VERSION 3 +#endif + +class bcp_application; +typedef boost::shared_ptr pbcp_application; + +class bcp_application +{ +public: + virtual ~bcp_application(); + + virtual void enable_list_mode() = 0; + virtual void enable_summary_list_mode() = 0; + virtual void enable_cvs_mode() = 0; + virtual void enable_svn_mode() = 0; + virtual void enable_unix_lines() = 0; + virtual void enable_scan_mode() = 0; + virtual void enable_license_mode() = 0; + virtual void enable_bsl_convert_mode() = 0; + virtual void enable_bsl_summary_mode() = 0; + virtual void set_boost_path(const char* p) = 0; + virtual void set_destination(const char* p) = 0; + virtual void add_module(const char* p) = 0; + virtual void set_namespace(const char* name) = 0; + virtual void set_namespace_alias(bool) = 0; + virtual void set_namespace_list(bool) = 0; + + virtual int run() = 0; + + static pbcp_application create(); +}; + + diff --git a/src/boost/tools/bcp/bcp_imp.cpp b/src/boost/tools/bcp/bcp_imp.cpp new file mode 100644 index 000000000..1fe8cf926 --- /dev/null +++ b/src/boost/tools/bcp/bcp_imp.cpp @@ -0,0 +1,300 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the bcp_implementation virtuals. + */ + +#include "bcp_imp.hpp" +#include "licence_info.hpp" +#include +#include +#include +#include +#include +#include + +bcp_implementation::bcp_implementation() + : m_list_mode(false), m_list_summary_mode(false), m_license_mode(false), m_cvs_mode(false), + m_svn_mode(false), m_unix_lines(false), m_scan_mode(false), m_bsl_convert_mode(false), + m_bsl_summary_mode(false), m_namespace_alias(false), m_list_namespaces(false) +{ +} + +bcp_implementation::~bcp_implementation() +{ +} + +bcp_application::~bcp_application() +{ +} + +void bcp_implementation::enable_list_mode() +{ + m_list_mode = true; +} + +void bcp_implementation::enable_summary_list_mode() +{ + m_list_mode = true; + m_list_summary_mode = true; +} + +void bcp_implementation::enable_cvs_mode() +{ + m_cvs_mode = true; +} + +void bcp_implementation::enable_svn_mode() +{ + m_svn_mode = true; +} + +void bcp_implementation::enable_scan_mode() +{ + m_scan_mode = true; +} + +void bcp_implementation::enable_license_mode() +{ + m_license_mode = true; +} + +void bcp_implementation::enable_bsl_convert_mode() +{ + m_bsl_convert_mode = true; +} + +void bcp_implementation::enable_bsl_summary_mode() +{ + m_bsl_summary_mode = true; +} + +void bcp_implementation::enable_unix_lines() +{ + m_unix_lines = true; +} + +void bcp_implementation::set_boost_path(const char* p) +{ + // Hack to strip trailing slashes from the path + m_boost_path = (fs::path(p) / "boost").parent_path(); + fs::path check = m_boost_path / "boost" / "version.hpp"; + if(!fs::exists(check)) + { + std::string s = "The Boost path appears to have been incorrectly set: could not find boost/version.hpp in "; + s += m_boost_path.string(); + std::runtime_error e(s); + throw e; + } +} + +void bcp_implementation::set_destination(const char* p) +{ + m_dest_path = fs::path(p); +} + +void bcp_implementation::add_module(const char* p) +{ + m_module_list.push_back(p); +} + +void bcp_implementation::set_namespace(const char* name) +{ + m_namespace_name = name; +} + +void bcp_implementation::set_namespace_alias(bool b) +{ + m_namespace_alias = b; +} + +void bcp_implementation::set_namespace_list(bool b) +{ + m_list_namespaces = b; + m_list_mode = b; +} + +fs::path get_short_path(const fs::path& p) +{ + // truncate path no more than "x/y": + std::string s = p.generic_string(); + std::string::size_type n = s.find('/'); + if(n != std::string::npos) + { + n = s.find('/', n+1); + if(n != std::string::npos) + s.erase(n); + } + return s; +} + +int bcp_implementation::run() +{ + // + // check output path is OK: + // + if(!m_list_mode && !m_license_mode && !fs::exists(m_dest_path)) + { + std::string msg("Destination path does not exist: "); + msg.append(m_dest_path.string()); + std::runtime_error e(msg); + boost::throw_exception(e); + } + // + // Check Boost path is OK if it hasn't been checked already: + // + if(m_boost_path == "") + { + set_boost_path(""); + } + // start by building a list of permitted files + // if m_cvs_mode is true: + if(m_cvs_mode) + { + std::cerr << "CAUTION: Boost is no longer in CVS, cvs mode may not work anymore!!!" << std::endl; + scan_cvs_path(fs::path()); + } + if(m_svn_mode) + { + scan_svn_path(fs::path()); + } + // + // if in license mode, try to load more/blanket_permission.txt + // + fs::path blanket_permission(m_boost_path / "more" / "blanket-permission.txt"); + if (fs::exists(blanket_permission)) { + fs::ifstream in(blanket_permission); + std::string line; + while (std::getline(in, line)) { + static const boost::regex e("([^(]+)\\("); + boost::smatch result; + if (boost::regex_search(line, result, e)) + m_bsl_authors.insert(format_authors_name(result[1])); + } + } + + // + // scan through modules looking for the equivalent + // file to add to our list: + // + std::list::const_iterator i = m_module_list.begin(); + std::list::const_iterator j = m_module_list.end(); + while(i != j) + { + // + // convert *i to a path - could be native or portable: + // + fs::path module; + fs::path exmodule; + module = fs::path(*i); + exmodule = fs::path(*i + ".hpp"); + + if(m_scan_mode) + { + // in scan mode each module must be a real file: + add_file_dependencies(module, true); + } + else + { + int count = 0; + if(fs::exists(m_boost_path / "tools" / module)) + { + add_path(fs::path("tools") / module); + ++count; + } + if(fs::exists(m_boost_path / "libs" / module)) + { + add_path(fs::path("libs") / module); + ++count; + } + if(fs::exists(m_boost_path / "boost" / module)) + { + add_path(fs::path("boost") / module); + ++count; + } + if(fs::exists(m_boost_path / "boost" / exmodule)) + { + add_path(fs::path("boost") / exmodule); + ++count; + } + if(fs::exists(m_boost_path / module)) + { + add_path(module); + ++count; + } + } + ++i; + } + while (!m_pending_paths.empty()) + { + add_path(m_pending_paths.front()); + m_pending_paths.pop(); + } + // + // now perform output: + // + if(m_list_namespaces) + { + // List the namespaces, in two lists, headers and source files + // first, then everything else afterwards: + // + boost::regex important_file("boost/.*|libs/[^/]*/(?:[^/]*/)?/src/.*"); + std::map::const_iterator i, j; + i = m_top_namespaces.begin(); + j = m_top_namespaces.end(); + std::cout << "\n\nThe top level namespaces found for header and source files were:\n"; + while(i != j) + { + if(regex_match(i->second.generic_string(), important_file)) + std::cout << i->first << " (from " << i->second << ")" << std::endl; + ++i; + } + + i = m_top_namespaces.begin(); + std::cout << "\n\nThe top level namespaces found for all other source files were:\n"; + while(i != j) + { + if(!regex_match(i->second.generic_string(), important_file)) + std::cout << i->first << " (from " << i->second << ")" << std::endl; + ++i; + } + return 0; + } + std::set::iterator m, n; + std::set short_paths; + m = m_copy_paths.begin(); + n = m_copy_paths.end(); + if(!m_license_mode) + { + while(m != n) + { + if(m_list_summary_mode) + { + fs::path p = get_short_path(*m); + if(short_paths.find(p) == short_paths.end()) + { + short_paths.insert(p); + std::cout << p.string() << "\n"; + } + } + else if(m_list_mode) + std::cout << m->string() << "\n"; + else + copy_path(*m); + ++m; + } + } + else + output_license_info(); + return 0; +} + +pbcp_application bcp_application::create() +{ + pbcp_application result(static_cast(new bcp_implementation())); + return result; +} diff --git a/src/boost/tools/bcp/bcp_imp.hpp b/src/boost/tools/bcp/bcp_imp.hpp new file mode 100644 index 000000000..ffe407237 --- /dev/null +++ b/src/boost/tools/bcp/bcp_imp.hpp @@ -0,0 +1,121 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#include "bcp.hpp" +#include +#include +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; + +class fileview; + +// +//path operations: +// +int compare_paths(const fs::path& a, const fs::path& b); +inline bool equal_paths(const fs::path& a, const fs::path& b) +{ return compare_paths(a, b) == 0; } + +struct path_less +{ + bool operator()(const fs::path& a, const fs::path& b)const + { return compare_paths(a, b) < 0; } +}; + +struct license_data +{ + std::set files; + std::set authors; +}; + +class bcp_implementation + : public bcp_application +{ +public: + bcp_implementation(); + ~bcp_implementation(); + static bool is_source_file(const fs::path& p); + static bool is_html_file(const fs::path& p); + static bool is_jam_file(const fs::path& p); +private: + // + // the following are the overridden virtuals from the base class: + // + void enable_list_mode(); + void enable_summary_list_mode(); + void enable_cvs_mode(); + void enable_svn_mode(); + void enable_unix_lines(); + void enable_scan_mode(); + void enable_license_mode(); + void enable_bsl_convert_mode(); + void enable_bsl_summary_mode(); + void set_boost_path(const char* p); + void set_destination(const char* p); + void add_module(const char* p); + void set_namespace(const char* name); + void set_namespace_alias(bool); + void set_namespace_list(bool); + + virtual int run(); + + // internal helper functions: + bool is_binary_file(const fs::path& p); + void scan_cvs_path(const fs::path& p); + void scan_svn_path(const fs::path& p); + void add_path(const fs::path& p); + void add_pending_path(const fs::path& p) { m_pending_paths.push(p); } + void add_directory(const fs::path& p); + void add_file(const fs::path& p); + void copy_path(const fs::path& p); + void add_file_dependencies(const fs::path& p, bool scanfile); + void add_dependent_lib(const std::string& libname, const fs::path& p, const fileview& view); + void create_path(const fs::path& p); + // license code: + void scan_license(const fs::path& p, const fileview& v); + void output_license_info(); + + std::list m_module_list; // the modules to process + bool m_list_mode; // list files only + bool m_list_summary_mode; // list file summary only + bool m_license_mode; // generate license information for files listed + bool m_cvs_mode; // check cvs for files + bool m_svn_mode; // check svn for files + bool m_unix_lines; // fix line endings + bool m_scan_mode; // scan non-boost files. + bool m_bsl_convert_mode; // try to convert to the BSL + bool m_bsl_summary_mode; // summarise BSL issues only + bool m_namespace_alias; // make "boost" a namespace alias when doing a namespace rename. + bool m_list_namespaces; // list all the top level namespaces found. + fs::path m_boost_path; // the path to the boost root + fs::path m_dest_path; // the path to copy to + std::map m_cvs_paths; // valid files under cvs control + std::set m_copy_paths; // list of files to copy + std::map m_license_data; // licenses in use + std::set m_unknown_licenses; // files with no known license + std::set m_unknown_authors; // files with no known copyright/author + std::set m_can_migrate_to_bsl; // files that can migrate to the BSL + std::set m_cannot_migrate_to_bsl; // files that cannot migrate to the BSL + std::set m_bsl_authors; // authors giving blanket permission to use the BSL + std::set m_authors_for_bsl_migration; // authors we need for BSL migration + std::map, path_less> + m_converted_to_bsl; + std::map > m_author_data; // all the authors + std::map m_dependencies; // dependency information + std::string m_namespace_name; // namespace rename. + std::set m_lib_names; // List of library binary names + std::map m_top_namespaces; // List of top level namespace names + std::queue > m_pending_paths; // Queue of paths we haven't scanned yet. +}; + diff --git a/src/boost/tools/bcp/copy_path.cpp b/src/boost/tools/bcp/copy_path.cpp new file mode 100644 index 000000000..4143c79e6 --- /dev/null +++ b/src/boost/tools/bcp/copy_path.cpp @@ -0,0 +1,248 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the following: + * void bcp_implementation::copy_path(const fs::path& p) + * void bcp_implementation::create_path(const fs::path& p) + */ + +#include "bcp_imp.hpp" +#include "fileview.hpp" +#include +#include +#include +#include +#include +#include +#include +#include + +struct get_new_library_name +{ + get_new_library_name(const std::string& n) : m_new_name(n) {} + template + std::string operator()(const boost::match_results& what) + { + std::string s = what[0]; + std::string::size_type n = s.find("boost"); + if(n == std::string::npos) + { + s.insert(0, m_new_name); + } + else + { + s.replace(n, 5, m_new_name); + } + return s; + } +private: + std::string m_new_name; +}; + +void bcp_implementation::copy_path(const fs::path& p) +{ + BOOST_ASSERT(!fs::is_directory(m_boost_path / p)); + if(fs::exists(m_dest_path / p)) + { + std::cout << "Copying (and overwriting) file: " << p.string() << "\n"; + fs::remove(m_dest_path / p); + } + else + std::cout << "Copying file: " << p.string() << "\n"; + // + // create the path to the new file if it doesn't already exist: + // + create_path(p.branch_path()); + // + // do text based copy if requested: + // + if((p.leaf() == "Jamroot") && m_namespace_name.size()) + { + static std::vector v1, v2; + v1.clear(); + v2.clear(); + boost::filesystem::ifstream is((m_boost_path / p)); + std::copy(std::istreambuf_iterator(is), std::istreambuf_iterator(), std::back_inserter(v1)); + + static boost::regex libname_matcher; + if(libname_matcher.empty()) + { + libname_matcher.assign("boost_"); + } + + regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), libname_matcher, m_namespace_name + "_"); + std::swap(v1, v2); + v2.clear(); + + boost::filesystem::ofstream os; + if(m_unix_lines) + os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out); + else + os.open((m_dest_path / p), std::ios_base::out); + os.write(&*v1.begin(), v1.size()); + os.close(); + } + else if(m_namespace_name.size() && m_lib_names.size() && is_jam_file(p)) + { + static std::vector v1, v2; + v1.clear(); + v2.clear(); + boost::filesystem::ifstream is((m_boost_path / p)); + std::copy(std::istreambuf_iterator(is), std::istreambuf_iterator(), std::back_inserter(v1)); + + static boost::regex libname_matcher; + if(libname_matcher.empty()) + { + std::string re = "\\<"; + re += *m_lib_names.begin(); + for(std::set::const_iterator i = ++m_lib_names.begin(); i != m_lib_names.end(); ++i) + { + re += "|" + *i; + } + re += "\\>"; + libname_matcher.assign(re); + } + + regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), libname_matcher, get_new_library_name(m_namespace_name)); + std::swap(v1, v2); + v2.clear(); + + boost::filesystem::ofstream os; + if(m_unix_lines) + os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out); + else + os.open((m_dest_path / p), std::ios_base::out); + os.write(&*v1.begin(), v1.size()); + os.close(); + } + else if(m_namespace_name.size() && is_source_file(p)) + { + // + // v1 hold the current content, v2 is temp buffer. + // Each time we do a search and replace the new content + // ends up in v2: we then swap v1 and v2, and clear v2. + // + static std::vector v1, v2; + v1.clear(); + v2.clear(); + boost::filesystem::ifstream is((m_boost_path / p)); + std::copy(std::istreambuf_iterator(is), std::istreambuf_iterator(), std::back_inserter(v1)); + + static const boost::regex namespace_matcher( + "(?|" + "(namespace\\s+)boost(_\\w+)?(?:(\\s*::\\s*)phoenix)?" + "|" + "(namespace\\s+(?:detail::)?)(adstl|phoenix|rapidxml)\\>" + "|" + "()\\" + "|" + "(^\\s*#\\s*define\\s+\\w+\\s+)boost((?:_\\w+)?\\s*)$" + "|" + "(^\\s*#\\s*define[^\\n]+)((?:adstl|phoenix|rapidxml)\\s*)$" + "|" + "()boost(_asio_detail_posix_thread_function|_regex_free_static_mutex)" + "|" + "()\\<(lw_thread_routine|at_thread_exit|on_process_enter|on_process_exit|on_thread_enter|on_thread_exit|tss_cleanup_implemented)\\>" + "|" + "(BOOST_CLASS_REQUIRE4?[^;]*)boost((?:_\\w+)?\\s*,)" + "|" + "(::tr1::|TR1_DECL\\s+)boost(_\\w+\\s*)" // math tr1 + "|" + "(\\(\\s*)boost(\\s*\\))\\s*(\\(\\s*)phoenix(\\s*\\))" + "|" + "(\\(\\s*)boost(\\s*\\))" + "|" + "(BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE[^\\)]*)boost(\\))" + ")" + ); + + regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_matcher, "$1" + m_namespace_name + "$2(?3$3" + m_namespace_name + "phoenix?4$4)", boost::regex_constants::format_all); + std::swap(v1, v2); + v2.clear(); + + if(m_namespace_alias) + { + static const boost::regex namespace_alias( + /* + "namespace\\s+" + m_namespace_name + + "\\s*" + "(" + "\\{" + "(?:" + "(?>[^\\{\\}/]+)" + "(?>" + "(?:" + "(?1)" + "|//[^\\n]+$" + "|/[^/]" + "|(?:^\\s*#[^\\n]*" + "(?:(?<=\\\\)\\n[^\\n]*)*)" + ")" + "[^\\{\\}]+" + ")*" + ")*" + "\\}" + ")" + */ + /* + "(namespace\\s+" + m_namespace_name + + "\\s*\\{.*" + "\\})([^\\{\\};]*)\\z" + */ + "(namespace)(\\s+)(" + m_namespace_name + ")" + "(adstl|phoenix|rapidxml)?(\\s*\\{)" + ); + regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_alias, + "$1 $3$4 {} $1 (?4$4:boost) = $3$4; $1$2$3$4$5", boost::regex_constants::format_all); + std::swap(v1, v2); + v2.clear(); + } + + boost::filesystem::ofstream os; + if(m_unix_lines) + os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out); + else + os.open((m_dest_path / p), std::ios_base::out); + if(v1.size()) + os.write(&*v1.begin(), v1.size()); + os.close(); + } + else if(m_unix_lines && !is_binary_file(p)) + { + boost::filesystem::ifstream is((m_boost_path / p)); + std::istreambuf_iterator isi(is); + std::istreambuf_iterator end; + + boost::filesystem::ofstream os((m_dest_path / p), std::ios_base::binary | std::ios_base::out); + std::ostreambuf_iterator osi(os); + + std::copy(isi, end, osi); + } + else + { + // binary copy: + fs::copy_file(m_boost_path / p, m_dest_path / p); + } +} + +void bcp_implementation::create_path(const fs::path& p) +{ + if(!fs::exists(m_dest_path / p)) + { + // recurse then create the path: + create_path(p.branch_path()); + fs::create_directory(m_dest_path / p); + } +} + + diff --git a/src/boost/tools/bcp/file_types.cpp b/src/boost/tools/bcp/file_types.cpp new file mode 100644 index 000000000..297d304cf --- /dev/null +++ b/src/boost/tools/bcp/file_types.cpp @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the following: + * void bcp_implementation::is_source_file(const fs::path& p) + * void bcp_implementation::is_html_file(const fs::path& p) + * void bcp_implementation::is_binary_file(const fs::path& p) + */ + +#include "bcp_imp.hpp" +#include + +bool bcp_implementation::is_source_file(const fs::path& p) +{ + static const boost::regex e( + ".*\\." + "(?:" + "c|cxx|h|hxx|inc|inl|.?pp|yy?" + ")", + boost::regex::perl | boost::regex::icase + ); + return boost::regex_match(p.filename().generic_string(), e); +} + +bool bcp_implementation::is_html_file(const fs::path& p) +{ + static const boost::regex e( + ".*\\." + "(?:" + "html?|css" + ")" + ); + return boost::regex_match(p.filename().generic_string(), e); +} + +bool bcp_implementation::is_binary_file(const fs::path& p) +{ + if(m_cvs_mode || m_svn_mode) + { + std::map::iterator pos = m_cvs_paths.find(p); + if(pos != m_cvs_paths.end()) return pos->second; + } + static const boost::regex e( + ".*\\." + "(?:" + "c|cxx|cpp|h|hxx|hpp|inc|html?|css|mak|in" + ")" + "|" + "(Jamfile|makefile|configure)", + boost::regex::perl | boost::regex::icase); + return !boost::regex_match(p.leaf().generic_string(), e); + +} + +bool bcp_implementation::is_jam_file(const fs::path& p) +{ + static const boost::regex e( + ".*\\." + "(?:" + "jam|v2" + ")" + "|" + "(Jamfile|Jamroot)\\.?", + boost::regex::perl | boost::regex::icase + ); + return boost::regex_match(p.filename().generic_string(), e); +} + diff --git a/src/boost/tools/bcp/fileview.cpp b/src/boost/tools/bcp/fileview.cpp new file mode 100644 index 000000000..36e785062 --- /dev/null +++ b/src/boost/tools/bcp/fileview.cpp @@ -0,0 +1,143 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the fileview class + */ + +#include "fileview.hpp" +#include +#include +#include +#include +#include +#include +#include + +struct fileview::implementation +{ + std::vector m_data; +}; + + +// construct: +fileview::fileview() +{ + pimpl.reset(new implementation()); +} + +fileview::fileview(const boost::filesystem::path& p) +{ + pimpl.reset(new implementation()); + open(p); +} + +fileview::~fileview() +{ +} + +fileview::fileview(const fileview& ) +{ +} + +fileview& fileview::operator=(const fileview& that) +{ + pimpl = that.pimpl; + return *this; +} + +void fileview::close() +{ + cow(); + pimpl->m_data.clear(); +} + +void fileview::open(const boost::filesystem::path& p) +{ + cow(); + boost::filesystem::ifstream is(p); + if(!is) + { + std::string msg("Bad file name: "); + msg += p.string(); + std::runtime_error e(msg); + boost::throw_exception(e); + } + std::istreambuf_iterator in(is); + std::istreambuf_iterator end; + std::copy(in, end, std::back_inserter(pimpl->m_data)); +} + +// iterators: +fileview::const_iterator fileview::begin() const +{ + return pimpl->m_data.size() ? &(pimpl->m_data[0]) : 0; +} + +fileview::const_iterator fileview::end() const +{ + return begin() + pimpl->m_data.size(); +} + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +fileview::const_reverse_iterator fileview::rbegin() const +{ + return const_reverse_iterator(end()); +} + +fileview::const_reverse_iterator fileview::rend() const +{ + return const_reverse_iterator(begin()); +} +#endif + +// capacity: +fileview::size_type fileview::size() const +{ + return pimpl->m_data.size(); +} + +fileview::size_type fileview::max_size() const +{ + return pimpl->m_data.max_size(); +} + +bool fileview::empty() const +{ + return pimpl->m_data.empty(); +} + +// element access: +fileview::const_reference fileview::operator[](fileview::size_type n) const +{ + return pimpl->m_data[n]; +} + +fileview::const_reference fileview::at(size_type n) const +{ + return pimpl->m_data.at(n); +} + +fileview::const_reference fileview::front() const +{ + return pimpl->m_data.front(); +} + +fileview::const_reference fileview::back() const +{ + return pimpl->m_data.back(); +} + +void fileview::swap(fileview& that) +{ + pimpl.swap(that.pimpl); +} + +void fileview::cow() +{ + if(!pimpl.unique()) + pimpl.reset(new implementation(*pimpl)); +} diff --git a/src/boost/tools/bcp/fileview.hpp b/src/boost/tools/bcp/fileview.hpp new file mode 100644 index 000000000..fe76f84ea --- /dev/null +++ b/src/boost/tools/bcp/fileview.hpp @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#if defined(BOOST_FILESYSTEM_VERSION) && (BOOST_FILESYSTEM_VERSION != 3) +# error "This library must be built with Boost.Filesystem version 3" +#else +#define BOOST_FILESYSTEM_VERSION 3 +#endif + +#include +#include + +class fileview +{ +public: + // types: + typedef const char& reference; + typedef reference const_reference; + typedef const char* iterator; // See _lib.container.requirements_ + typedef iterator const_iterator; // See _lib.container.requirements_ + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef char value_type; + typedef const char* pointer; + typedef pointer const_pointer; +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + // construct: + fileview(); + fileview(const boost::filesystem::path& p); + ~fileview(); + fileview(const fileview& that); + fileview& operator=(const fileview& that); + void close(); + void open(const boost::filesystem::path& p); + + // iterators: + const_iterator begin() const; + const_iterator end() const; +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + const_reverse_iterator rbegin() const; + const_reverse_iterator rend() const; +#endif + + // capacity: + size_type size() const; + size_type max_size() const; + bool empty() const; + + // element access: + const_reference operator[](size_type n) const; + const_reference at(size_type n) const; + const_reference front() const; + const_reference back() const; + void swap(fileview& that); + +private: + void cow(); + struct implementation; + boost::shared_ptr pimpl; +}; + + diff --git a/src/boost/tools/bcp/index.html b/src/boost/tools/bcp/index.html new file mode 100644 index 000000000..34e938c60 --- /dev/null +++ b/src/boost/tools/bcp/index.html @@ -0,0 +1,17 @@ + + + + + +

+ Automatic redirection failed, please go to doc/html/index.html. +

+

Copyright John Maddock 2007

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt).

+ + + + + + diff --git a/src/boost/tools/bcp/licence_info.cpp b/src/boost/tools/bcp/licence_info.cpp new file mode 100644 index 000000000..0e527fa48 --- /dev/null +++ b/src/boost/tools/bcp/licence_info.cpp @@ -0,0 +1,721 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * boostinspect:noascii + */ + +#include "licence_info.hpp" + + +std::pair get_licenses() +{ + static const char* generic_author_sig = + "(?:" + "(?:" + "Copyright|\\(c\\)|\xA9" + ")[[:blank:]]+" + "){1,2}" + "(?:" + "\\d[^[:alpha:]]+" + "([[:alpha:]]" + "(?:" + "(?!Use\\b|Permission\\b|All\\b|Copyright (c) Date Author

" + "

Distributed under the " + "Boost Software License, Version 1.0. (See accompanying file " + "LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

" + ) + , + license_info( boost::regex("Use\\W+\\modification\\W+and\\W+distribution(\\W+is|\\W+are)\\W+subject\\W+to" + "(\\W+the)?[^\"[:word:]]+Boost\\W+Software\\W+License\\W+Version\\W+1.0", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Boost Software License, Version 1.0 (variant #1)" + , + "

Copyright (c) Date Author

" + "

Use, modification and distribution is subject to the " + "Boost Software License, Version 1.0. (See accompanying file " + "LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

" + ) + , + license_info( boost::regex("(?!is)\\w\\w\\W+subject\\W+to" + "(\\W+the)?[^\"[:word:]]+Boost\\W+Software\\W+License\\W+Version\\W+1.0", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Boost Software License, Version 1.0 (variant #2)" + , + "

Copyright (c) Date Author

" + "

Subject to the " + "Boost Software License, Version 1.0. (See accompanying file " + "LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

" + ) + , + license_info( boost::regex("Copyright\\W+(c)\\W+2001\\W+2002\\W+Python\\W+Software\\W+Foundation\\W+All\\W+Rights\\W+Reserved", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Python Software License" + , + "

Copyright (c) 2001, 2002 Python Software Foundation;

" + "

All Rights Reserved

" + ) + , + license_info( boost::regex("Permission\\W+to\\W+use\\W+copy\\W+modify\\W+distribute\\W+and\\W+sell\\W+this\\W+software\\W+and\\W+its\\W+documentation" + "\\W+for\\W+any\\W+purpose\\W+is\\W+hereby\\W+granted\\W+without\\W+fee" + "\\W+provided\\W+that\\W+the\\W+above\\W+copyright\\W+notice\\W+appears?\\W+in\\W+all\\W+copies\\W+and" + "\\W+that\\W+both\\W+(the|that)\\W+copyright\\W+notice\\W+and\\W+this\\W+permission\\W+notice\\W+appears?" + "\\W+in\\W+supporting\\W+documentation[^<>]{1, 100}\\W+no\\W+representations" + "\\W+(are\\W+made\\W+)?about\\W+the\\W+suitability\\W+of\\W+this\\W+software\\W+for\\W+any\\W+purpose" + "\\W+It\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "SGI Style License" + , + "

Copyright (c) Date
" + "Author
" + "
" + "Permission to use, copy, modify, distribute and sell this software " + "and its documentation for any purpose is hereby granted without fee, " + "provided that the above copyright notice appear in all copies and " + "that both that copyright notice and this permission notice appear " + "in supporting documentation. Author makes no representations " + "about the suitability of this software for any purpose. " + "It is provided \"as is\" without express or implied warranty.

" + ) + , + license_info( boost::regex("Permission\\W+to\\W+use\\W+copy\\W+modify\\W+distribute\\W+and\\W+sell\\W+this\\W+software" + "\\W+for\\W+any\\W+purpose\\W+is\\W+hereby\\W+granted\\W+without\\W+fee" + "\\W+provided\\W+that\\W+the\\W+above\\W+copyright\\W+notice\\W+appears?\\W+in\\W+all\\W+copies\\W+and" + "\\W+that\\W+both\\W+(the|that)\\W+copyright\\W+notice\\W+and\\W+this\\W+permission\\W+notice\\W+appears?" + "\\W+in\\W+supporting\\W+documentation[^<>]{1, 100}\\W+no\\W+representations" + "\\W+(are\\W+made\\W+)?about\\W+the\\W+suitability\\W+of\\W+this\\W+software\\W+for\\W+any\\W+purpose" + "\\W+It\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express(ed)?\\W+or\\W+implied\\W+warranty", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #1" + , + "

Copyright (c) Date
" + "Author
" + "
" + "Permission to use, copy, modify, distribute and sell this software " + "for any purpose is hereby granted without fee, " + "provided that the above copyright notice appear in all copies and " + "that both that copyright notice and this permission notice appears? " + "in supporting documentation. Author makes no representations " + "about the suitability of this software for any purpose. " + "It is provided \"as is\" without express or implied warranty.

" + ) + , + license_info( + boost::regex( + "Permission\\W+to\\W+copy\\W+use\\W+modify\\W+sell\\W+and\\W+distribute\\W+this\\W+software" + "\\W+is\\W+granted\\W+provided\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies" + "\\W+This\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied" + "\\W+warranty\\W+and\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase + ) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #2" + , + "

Copyright (c) Date Author.

\n" + "Permission to copy, use, modify, sell and distribute this software
\n" + "is granted provided this copyright notice appears in all copies.
\n" + "This software is provided \"as is\" without express or implied
\n" + "warranty, and with no claim as to its suitability for any purpose.

\n" + ) + , + license_info( + boost::regex( + "Permission\\W+to\\W+copy\\W+use[^\"[:word:]]+modify\\W+sell\\W+and\\W+distribute\\W+this\\W+software\\W+is\\W+granted\\W+provided" + "\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies\\W+This\\W+software\\W+is" + "\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty\\W+and\\W+with" + "\\W+no\\W+claim\\W+at\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase + ) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #3" + , + "

(C) Copyright Author Date. Permission to copy, use, " + "modify, sell, and distribute this software is granted provided " + "this copyright notice appears in all copies. This software is " + "provided \"as is\" without express or implied warranty, and with " + "no claim at to its suitability for any purpose.

\n" + ) + , + license_info( boost::regex("Permission\\W+to\\W+copy\\W+use\\W+sell\\W+and\\W+distribute\\W+this\\W+software\\W+is\\W+granted" + "\\W+provided\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies" + "\\W+Permission\\W+to\\W+modify\\W+the\\W+code\\W+and\\W+to\\W+distribute\\W+modified\\W+code\\W+is\\W+granted" + "\\W+provided\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies\\W+and\\W+a\\W+notice" + "\\W+that\\W+the\\W+code\\W+was\\W+modified\\W+is\\W+included\\W+with\\W+the\\W+copyright\\W+notice" + "\\W+This\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty\\W+and\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #4" + , + "

Copyright (C) Date Author
" + "
" + "Permission to copy, use, sell and distribute this software is granted\n" + "provided this copyright notice appears in all copies.\n" + "Permission to modify the code and to distribute modified code is granted\n" + "provided this copyright notice appears in all copies, and a notice\n" + "that the code was modified is included with the copyright notice.

\n" + "

This software is provided \"as is\" without express or implied warranty,\n" + "and with no claim as to its suitability for any purpose.

" + ) + , + license_info( boost::regex("This\\W+file\\W+is\\W+part\\W+of\\W+the\\W+(Boost\\W+Graph|Generic\\W+Graph\\W+Component)\\W+Library" + "\\W+You\\W+should\\W+have\\W+received\\W+a\\W+copy\\W+of\\W+the\\W+License\\W+Agreement\\W+for\\W+the" + "\\W+(Boost|Generic)\\W+Graph\\W+(Component\\W+)?Library\\W+along\\W+with\\W+the\\W+software;\\W+see\\W+the\\W+file\\W+LICENSE" + "(\\W+If\\W+not\\W+contact\\W+Office\\W+of\\W+Research\\W+University\\W+of\\W+Notre\\W+Dame\\W+Notre" + "\\W+Dame\\W+IN\\W+46556)?" + "\\W+Permission\\W+to\\W+modify\\W+the\\W+code\\W+and\\W+to\\W+distribute(\\W+modified|\\W+the)\\W+code\\W+is" + "\\W+granted\\W+provided\\W+the\\W+text\\W+of\\W+this\\W+NOTICE\\W+is\\W+retained\\W+a\\W+notice\\W+(that|if)" + "\\W+the\\W+code\\W+was\\W+modified\\W+is\\W+included\\W+with\\W+the\\W+above\\W+COPYRIGHT\\W+NOTICE\\W+and" + "\\W+with\\W+the\\W+COPYRIGHT\\W+NOTICE\\W+in\\W+the\\W+LICENSE\\W+file\\W+and\\W+that\\W+the\\W+LICENSE" + "\\W+file\\W+is\\W+distributed\\W+with\\W+the\\W+modified\\W+code\\W+" + "\\W+LICENSOR\\W+MAKES\\W+NO\\W+REPRESENTATIONS\\W+OR\\W+WARRANTIES\\W+EXPRESS\\W+OR\\W+IMPLIED" + "\\W+By\\W+way\\W+of\\W+example\\W+but\\W+not\\W+limitation\\W+Licensor\\W+MAKES\\W+NO" + "\\W+REPRESENTATIONS\\W+OR\\W+WARRANTIES\\W+OF\\W+MERCHANTABILITY\\W+OR\\W+FITNESS\\W+FOR\\W+ANY" + "\\W+PARTICULAR\\W+PURPOSE\\W+OR\\W+THAT\\W+THE\\W+USE\\W+OF\\W+THE\\W+LICENSED\\W+SOFTWARE\\W+COMPONENTS" + "\\W+OR\\W+DOCUMENTATION\\W+WILL\\W+NOT\\W+INFRINGE\\W+ANY\\W+PATENTS\\W+COPYRIGHTS\\W+TRADEMARKS" + "\\W+OR\\W+OTHER\\W+RIGHTS" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Boost.Graph license (Notre Dame)" + , + "

Copyright Date University of Notre Dame.
" + "Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek

" + "

This file is part of the Boost Graph Library

" + "

You should have received a copy of the License Agreement for the " + "Boost Graph Library along with the software; see the file LICENSE. " + "If not, contact Office of Research, University of Notre Dame, Notre " + "Dame, IN 46556.

" + "

Permission to modify the code and to distribute modified code is " + "granted, provided the text of this NOTICE is retained, a notice that " + "the code was modified is included with the above COPYRIGHT NOTICE and " + "with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE " + "file is distributed with the modified code.

" + "

LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
" + "By way of example, but not limitation, Licensor MAKES NO " + "REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY " + "PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS " + "OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS " + "OR OTHER RIGHTS.

" + ) + , + license_info( boost::regex("This\\W+file\\W+is\\W+part\\W+of\\W+the\\W+(Boost\\W+Graph|Generic\\W+Graph\\W+Component)\\W+Library" + "\\W+You\\W+should\\W+have\\W+received\\W+a\\W+copy\\W+of\\W+the\\W+License\\W+Agreement\\W+for\\W+the" + "\\W+(Boost|Generic)\\W+Graph\\W+(Component\\W+)?Library\\W+along\\W+with\\W+the\\W+software;\\W+see\\W+the\\W+file\\W+LICENSE" + "(\\W+If\\W+not\\W+contact\\W+Office\\W+of\\W+Research\\W+Indiana\\W+University\\W+Bloomington\\W+IN\\W+47405)?" + "\\W+Permission\\W+to\\W+modify\\W+the\\W+code\\W+and\\W+to\\W+distribute(\\W+modified|\\W+the)\\W+code\\W+is" + "\\W+granted\\W+provided\\W+the\\W+text\\W+of\\W+this\\W+NOTICE\\W+is\\W+retained\\W+a\\W+notice\\W+(that|if)" + "\\W+the\\W+code\\W+was\\W+modified\\W+is\\W+included\\W+with\\W+the\\W+above\\W+COPYRIGHT\\W+NOTICE\\W+and" + "\\W+with\\W+the\\W+COPYRIGHT\\W+NOTICE\\W+in\\W+the\\W+LICENSE\\W+file\\W+and\\W+that\\W+the\\W+LICENSE" + "\\W+file\\W+is\\W+distributed\\W+with\\W+the\\W+modified\\W+code\\W+" + "\\W+LICENSOR\\W+MAKES\\W+NO\\W+REPRESENTATIONS\\W+OR\\W+WARRANTIES\\W+EXPRESS\\W+OR\\W+IMPLIED" + "\\W+By\\W+way\\W+of\\W+example\\W+but\\W+not\\W+limitation\\W+Licensor\\W+MAKES\\W+NO" + "\\W+REPRESENTATIONS\\W+OR\\W+WARRANTIES\\W+OF\\W+MERCHANTABILITY\\W+OR\\W+FITNESS\\W+FOR\\W+ANY" + "\\W+PARTICULAR\\W+PURPOSE\\W+OR\\W+THAT\\W+THE\\W+USE\\W+OF\\W+THE\\W+LICENSED\\W+SOFTWARE\\W+COMPONENTS" + "\\W+OR\\W+DOCUMENTATION\\W+WILL\\W+NOT\\W+INFRINGE\\W+ANY\\W+PATENTS\\W+COPYRIGHTS\\W+TRADEMARKS" + "\\W+OR\\W+OTHER\\W+RIGHTS" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Boost.Graph license (Indiana University)" + , + "

Copyright Date Indiana University.
" + "Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek

" + "

This file is part of the Boost Graph Library

" + "

You should have received a copy of the License Agreement for the " + "Boost Graph Library along with the software; see the file LICENSE. " + "If not, contact Office of Research, Indiana University, Bloomington," + "IN 47404.

" + "

Permission to modify the code and to distribute modified code is " + "granted, provided the text of this NOTICE is retained, a notice that " + "the code was modified is included with the above COPYRIGHT NOTICE and " + "with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE " + "file is distributed with the modified code.

" + "

LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
" + "By way of example, but not limitation, Licensor MAKES NO " + "REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY " + "PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS " + "OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS " + "OR OTHER RIGHTS.

" + ) + , + license_info( boost::regex("Permission\\W+to\\W+copy\\W+use\\W+modify\\W+sell\\W+and\\W+distribute\\W+this\\W+software\\W+is" + "[^\"[:word:]]+granted\\W+provided\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies\\W+and" + "\\W+modified\\W+version\\W+are\\W+clearly\\W+marked\\W+as\\W+such\\W+This\\W+software\\W+is\\W+provided" + "\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty\\W+and\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its" + "\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #5" + , + "

Copyright (C) Date Author

" + "

Permission to copy, use, modify, sell and distribute this software is " + "granted, provided this copyright notice appears in all copies and " + "modified version are clearly marked as such. This software is provided " + "\"as is\" without express or implied warranty, and with no claim as to its " + "suitability for any purpose.

" + ) + , + license_info( boost::regex("This\\W+file\\W+can\\W+be\\W+redistributed\\W+and\\W+or\\W+modified\\W+under\\W+the\\W+terms\\W+found" + "\\W+in\\W+copyright\\W+html" + "\\W+This\\W+software\\W+and\\W+its\\W+documentation\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or" + "\\W+implied\\W+warranty\\W+and\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Boost.Pool license" + , + "

This file can be redistributed and/or modified under the terms found " + "in copyright.html

\n" + "

This software and its documentation is provided \"as is\" without express or " + "implied warranty, and with no claim as to its suitability for any purpose

" + ) + , + license_info(boost::regex("Permission\\W+to\\W+use\\W+copy\\W+modify\\W+sell\\W+and\\W+distribute\\W+this\\W+software" + "\\W+is\\W+hereby\\W+granted\\W+without\\W+fee\\W+provided\\W+that\\W+the\\W+above\\W+copyright\\W+notice" + "\\W+appears\\W+in\\W+all\\W+copies\\W+and\\W+that\\W+both\\W+that\\W+copyright\\W+notice\\W+and\\W+this" + "\\W+permission\\W+notice\\W+appear\\W+in\\W+supporting\\W+documentation" + "[^<>]{1,100}\\W+(make\\W+any\\W+representation|makes\\W+no\\W+representations)\\W+about\\W+the\\W+suitability\\W+of\\W+this" + "\\W+software\\W+for\\W+any\\W+purpose\\W+It\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or" + "\\W+implied\\W+warranty" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #6" + , + "

Copyright Author Data

" + "

Permission to use, copy, modify, sell, and distribute this software " + "is hereby granted without fee provided that the above copyright notice " + "appears in all copies and that both that copyright notice and this " + "permission notice appear in supporting documentation, " + "Author makes no representations about the suitability of this " + "software for any purpose. It is provided \"as is\" without express or " + "implied warranty.

" + ) + , + license_info( boost::regex("Permission\\W+to\\W+copy" + "[^\"[:word:]]+use\\W+modify\\W+sell\\W+and\\W+distribute\\W+this\\W+software\\W+is\\W+granted\\W+provided" + "\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies\\W+of\\W+the\\W+source\\W+This" + "\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty" + "\\W+and\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #7" + , + "

Copyright Author Date. Permission to copy, " + "use, modify, sell and distribute this software is granted provided " + "this copyright notice appears in all copies of the source. This " + "software is provided \"as is\" without express or implied warranty, " + "and with no claim as to its suitability for any purpose." + ) + , + license_info(boost::regex("This\\W+software\\W+is\\W+provided\\W+as-is\\W+without\\W+any\\W+express\\W+or\\W+implied" + "\\W+warranty\\W+In\\W+no\\W+event\\W+will\\W+the\\W+copyright\\W+holder\\W+be\\W+held\\W+liable\\W+for" + "\\W+any\\W+damages\\W+arising\\W+from\\W+the\\W+use\\W+of\\W+this\\W+software" + "\\W+Permission\\W+is\\W+granted\\W+to\\W+anyone\\W+to\\W+use\\W+this\\W+software\\W+for\\W+any\\W+purpose" + "\\W+including\\W+commercial\\W+applications\\W+and\\W+to\\W+alter\\W+it\\W+and\\W+redistribute" + "\\W+it\\W+freely\\W+subject\\W+to\\W+the\\W+following\\W+restrictions:" + "\\W+1\\W+The\\W+origin\\W+of\\W+this\\W+software\\W+must\\W+not\\W+be\\W+misrepresented;\\W+you\\W+must" + "\\W+not\\W+claim\\W+that\\W+you\\W+wrote\\W+the\\W+original\\W+software\\W+If\\W+you\\W+use\\W+this" + "\\W+software\\W+in\\W+a\\W+product\\W+an\\W+acknowledgment\\W+in\\W+the\\W+product\\W+documentation" + "\\W+would\\W+be\\W+appreciated\\W+but\\W+is\\W+not\\W+required" + "\\W+2\\W+Altered\\W+source\\W+versions\\W+must\\W+be\\W+plainly\\W+marked\\W+as\\W+such\\W+and\\W+must" + "\\W+not\\W+be\\W+misrepresented\\W+as\\W+being\\W+the\\W+original\\W+software" + "\\W+3\\W+This\\W+notice\\W+may\\W+not\\W+be\\W+removed\\W+or\\W+altered\\W+from\\W+any\\W+source" + "\\W+distribution" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #8" + , + "

Phoenix V0.9
Copyright (c) Date Joel de Guzman

" + "

This software is provided 'as-is', without any express or implied " + "warranty. In no event will the copyright holder be held liable for " + "any damages arising from the use of this software.

" + "

Permission is granted to anyone to use this software for any purpose, " + "including commercial applications, and to alter it and redistribute " + "it freely, subject to the following restrictions:

" + "

1. The origin of this software must not be misrepresented; you must " + "not claim that you wrote the original software. If you use this " + "software in a product, an acknowledgment in the product documentation " + "would be appreciated but is not required.

" + "2. Altered source versions must be plainly marked as such, and must " + "not be misrepresented as being the original software.

" + "

3. This notice may not be removed or altered from any source " + "distribution. " + ) + , + license_info( boost::regex("Permission\\W+to\\W+use\\W+copy\\W+modify\\W+sell\\W+and\\W+distribute\\W+this\\W+software" + "\\W+is\\W+hereby\\W+granted\\W+without\\W+fee\\W+provided\\W+that\\W+the\\W+above\\W+copyright\\W+notice" + "\\W+appears\\W+in\\W+all\\W+copies\\W+and\\W+that\\W+both\\W+that\\W+copyright\\W+notice\\W+and\\W+this" + "\\W+permission\\W+notice\\W+appear\\W+in\\W+supporting\\W+documentation" + "\\W+None\\W+of\\W+the\\W+above\\W+authors\\W+nor.{1,100}make\\W+any" + "\\W+representation\\W+about\\W+the\\W+suitability\\W+of\\W+this\\W+software\\W+for\\W+any" + "\\W+purpose\\W+It\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #9" + , + "

Copyright Author Date
" + "Permission to use, copy, modify, sell, and distribute this software " + "is hereby granted without fee provided that the above copyright notice " + "appears in all copies and that both that copyright notice and this " + "permission notice appear in supporting documentation,
" + "None of the above authors nor Author's Organisation make any " + "representation about the suitability of this software for any " + "purpose. It is provided \"as is\" without express or implied warranty." + ) + , + license_info( boost::regex("Permission\\W+to\\W+use\\W+copy\\W+modify\\W+and\\W+distribute\\W+this\\W+software\\W+for\\W+any" + "\\W+purpose\\W+is\\W+hereby\\W+granted\\W+without\\W+fee\\W+provided\\W+that\\W+this\\W+copyright\\W+and" + "\\W+permissions\\W+notice\\W+appear\\W+in\\W+all\\W+copies\\W+and\\W+derivatives" + "\\W+This\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #10" + , + "

Copyright Author Date. All rights reserved.

" + "

Permission to use, copy, modify, and distribute this software for any " + "purpose is hereby granted without fee, provided that this copyright and " + "permissions notice appear in all copies and derivatives.

" + "

This software is provided \"as is\" without express or implied warranty.

" + ) + , + license_info( boost::regex("This\\W+material\\W+is\\W+provided\\W+as\\W+is\\W+with\\W+absolutely\\W+no\\W+warranty\\W+expressed" + "\\W+or\\W+implied\\W+Any\\W+use\\W+is\\W+at\\W+your\\W+own\\W+risk" + "\\W+Permission\\W+to\\W+use\\W+or\\W+copy\\W+this\\W+software\\W+for\\W+any\\W+purpose\\W+is\\W+hereby\\W+granted" + "\\W+without\\W+fee\\W+provided\\W+the\\W+above\\W+notices\\W+are\\W+retained\\W+on\\W+all\\W+copies" + "\\W+Permission\\W+to\\W+modify\\W+the\\W+code\\W+and\\W+to\\W+distribute\\W+modified\\W+code\\W+is\\W+granted" + "\\W+provided\\W+the\\W+above\\W+notices\\W+are\\W+retained\\W+and\\W+a\\W+notice\\W+that\\W+the\\W+code\\W+was" + "\\W+modified\\W+is\\W+included\\W+with\\W+the\\W+above\\W+copyright\\W+notice" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #11" + , + "

This material is provided \"as is\", with absolutely no warranty expressed " + "or implied. Any use is at your own risk.

" + "

Permission to use or copy this software for any purpose is hereby granted " + "without fee, provided the above notices are retained on all copies. " + "Permission to modify the code and to distribute modified code is granted, " + "provided the above notices are retained, and a notice that the code was " + "modified is included with the above copyright notice.

" + ) + , + license_info( boost::regex("Permission\\W+to\\W+copy\\W+use\\W+and\\W+distribute\\W+this\\W+software\\W+is\\W+granted\\W+provided" + "\\W+that\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies" + "\\W+Permission\\W+to\\W+modify\\W+the\\W+code\\W+and\\W+to\\W+distribute\\W+modified\\W+code\\W+is\\W+granted" + "\\W+provided\\W+that\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies\\W+and\\W+a\\W+notice" + "\\W+that\\W+the\\W+code\\W+was\\W+modified\\W+is\\W+included\\W+with\\W+the\\W+copyright\\W+notice" + "\\W+This\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty\\W+and" + "\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #12" + , + "

Copyright (C) Date Author

Permission to copy, use, and distribute this software is granted, provided " + "that this copyright notice appears in all copies.
" + "Permission to modify the code and to distribute modified code is granted, " + "provided that this copyright notice appears in all copies, and a notice " + "that the code was modified is included with the copyright notice.

" + "

This software is provided \"as is\" without express or implied warranty, and " + "with no claim as to its suitability for any purpose.

" + ) + , + license_info( boost::regex("Permission\\W+to\\W+copy\\W+and\\W+use\\W+this\\W+software\\W+is\\W+granted" + "\\W+provided\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies" + "\\W+Permission\\W+to\\W+modify\\W+the\\W+code\\W+and\\W+to\\W+distribute\\W+modified\\W+code\\W+is\\W+granted" + "\\W+provided\\W+this\\W+copyright\\W+notice\\W+appears\\W+in\\W+all\\W+copies\\W+and\\W+a\\W+notice" + "\\W+that\\W+the\\W+code\\W+was\\W+modified\\W+is\\W+included\\W+with\\W+the\\W+copyright\\W+notice" + "\\W+This\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty" + "\\W+and\\W+with\\W+no\\W+claim\\W+as\\W+to\\W+its\\W+suitability\\W+for\\W+any\\W+purpose" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #13" + , + "

Copyright (C) Date Author

" + "

Permission to copy and use this software is granted, " + "provided this copyright notice appears in all copies. " + "Permission to modify the code and to distribute modified code is granted, " + "provided this copyright notice appears in all copies, and a notice " + "that the code was modified is included with the copyright notice.

" + "

This software is provided \"as is\" without express or implied warranty, " + "and with no claim as to its suitability for any purpose.

" + ) + , + license_info( boost::regex("Copyright\\W+Kevlin\\W+Henney\\W+2000\\W+All\\W+rights\\W+reserved\\W+" + "Permission\\W+to\\W+use\\W+copy\\W+modify\\W+and\\W+distribute\\W+this\\W+software\\W+for\\W+any" + "\\W+purpose\\W+is\\W+hereby\\W+granted\\W+without\\W+fee\\W+provided\\W+that\\W+this\\W+copyright\\W+and" + "\\W+permissions\\W+notice\\W+appear\\W+in\\W+all\\W+copies\\W+and\\W+derivatives\\W+and\\W+that\\W+no" + "\\W+charge\\W+may\\W+be\\W+made\\W+for\\W+the\\W+software\\W+and\\W+its\\W+documentation\\W+except\\W+to\\W+cover" + "\\W+cost\\W+of\\W+distribution" + "\\W+This\\W+software\\W+is\\W+provided\\W+as\\W+is\\W+without\\W+express\\W+or\\W+implied\\W+warranty\\W+" + , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Old style Boost license #14" + , + "

Copyright The Author, The Date. All rights reserved.

" + "

Permission to use, copy, modify, and distribute this software for any" + " purpose is hereby granted without fee, provided that this copyright and" + " permissions notice appear in all copies and derivatives, and that no" + " charge may be made for the software and its documentation except to cover" + " cost of distribution.

" + "

This software is provided \"as is\" without express or implied warranty.

" + ) + , + license_info( boost::regex("preprocessed\\W+version\\W+of\\W+boost/mpl/.*\\.hpp\\W+header\\W+see\\W+the\\W+original\\W+for\\W+copyright\\W+information", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "SGI Style Licence (MPL preprocessed file)" + , + "

Copyright (c) Date
" + "Author
" + "
" + "Permission to use, copy, modify, distribute and sell this software " + "and its documentation for any purpose is hereby granted without fee, " + "provided that the above copyright notice appear in all copies and " + "that both that copyright notice and this permission notice appear " + "in supporting documentation. Author makes no representations " + "about the suitability of this software for any purpose. " + "It is provided \"as is\" without express or implied warranty.

" + ) + , + license_info( boost::regex( + "This\\W+file\\W+is\\W+part\\W+of\\W+jam\\W+" + "License\\W+is\\W+hereby\\W+granted\\W+to\\W+use\\W+this\\W+software\\W+and\\W+distribute\\W+it\\W+" + "freely\\W+as\\W+long\\W+as\\W+this\\W+copyright\\W+notice\\W+is\\W+retained\\W+and\\W+modifications\\W+" + "are\\W+clearly\\W+marked\\W+" + "ALL\\W+WARRANTIES\\W+ARE\\W+HEREBY\\W+DISCLAIMED" + "|" + "This\\W+file\\W+is\\W+part\\W+of\\W+Jam\\W+see\\W+jam\\.c\\W+for\\W+Copyright\\W+information" + "|This file has been donated to Jam" + "|Generated by mkjambase from Jambase" , boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig + std::string("|(Craig\\W+W\\W+McPheeters\\W+Alias\\W+Wavefront)|(Generated by mkjambase from Jambase)"), boost::regex::perl | boost::regex::icase) + , + generic_author_format + std::string("(?4Craig W. McPheeters, Alias|Wavefront)(?5Christopher Seiwald and Perforce Software, Inc)") + , + "Perforce Jam License" + , + "

Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.

" + "

This file is part of jam.

" + "

License is hereby granted to use this software and distribute it " + "freely, as long as this copyright notice is retained and modifications " + " are clearly marked.

" + "

ALL WARRANTIES ARE HEREBY DISCLAIMED

" + ) + , + license_info( boost::regex( + "Permission\\W+is\\W+granted\\W+to\\W+anyone\\W+to\\W+use\\W+this\\W+software\\W+for\\W+any\\W+" + "purpose\\W+on\\W+any\\W+computer\\W+system\\W+and\\W+to\\W+redistribute\\W+it\\W+freely\\W+" + "subject\\W+to\\W+the\\W+following\\W+restrictions\\W+" + "1\\W+The\\W+author\\W+is\\W+not\\W+responsible\\W+for\\W+the\\W+consequences\\W+of\\W+use\\W+of\\W+" + "this\\W+software\\W+no\\W+matter\\W+how\\W+awful\\W+even\\W+if\\W+they\\W+arise\\W+" + "from\\W+defects\\W+in\\W+it\\W+" + "2\\W+The\\W+origin\\W+of\\W+this\\W+software\\W+must\\W+not\\W+be\\W+misrepresented\\W+either\\W+" + "by\\W+explicit\\W+claim\\W+or\\W+by\\W+omission\\W+" + "3\\W+Altered\\W+versions\\W+must\\W+be\\W+plainly\\W+marked\\W+as\\W+such\\W+and\\W+must\\W+not\\W+" + "be\\W+misrepresented\\W+as\\W+being\\W+the\\W+original\\W+software" + "|Definitions\\W+etc\\W+for\\W+regexp\\W+3\\W+routines", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig + std::string("|(Definitions\\W+etc\\W+for\\W+regexp\\W+3\\W+routines)"), boost::regex::perl | boost::regex::icase) + , + generic_author_format + std::string("(?4University of Toronto)") + , + "BSD Regex License" + , + "

Copyright (c) 1986 by University of Toronto.

" + "

Written by Henry Spencer. Not derived from licensed software.

" + "

Permission is granted to anyone to use this software for any" + "purpose on any computer system, and to redistribute it freely," + "subject to the following restrictions:

" + "

The author is not responsible for the consequences of use of" + "this software, no matter how awful, even if they arise" + "from defects in it.

" + "

The origin of this software must not be misrepresented, either" + "by explicit claim or by omission.

" + "

Altered versions must be plainly marked as such, and must not" + "be misrepresented as being the original software.

" + ) + , + license_info( boost::regex( + "Skeleton\\W+parser\\W+for\\W+Yacc\\W+like\\W+parsing\\W+with\\W+Bison\\W+" + "Copyright.{0,100}Free\\W+Software\\W+Foundation\\W+Inc\\W+" + "\\W+This\\W+program\\W+is\\W+free\\W+software\\W+you\\W+can\\W+redistribute\\W+it\\W+and\\W+or\\W+modify\\W+" + "it\\W+under\\W+the\\W+terms\\W+of\\W+the\\W+GNU\\W+General\\W+Public\\W+License\\W+as\\W+published\\W+by\\W+" + "the\\W+Free\\W+Software\\W+Foundation\\W+either\\W+version\\W+2\\W+or\\W+at\\W+your\\W+option\\W+" + "any\\W+later\\W+version" + "|" + // this part matches the start of jamgramtab.h which is under the same licence + // but bison does not output it's usual licence declaration: + "\\{\\s*\"!\"\\s*,\\s*_BANG_t\\s*\\}", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig + std::string("|(\\{\\s*\"!\"\\s*,\\s*_BANG_t\\s*\\})"), boost::regex::perl | boost::regex::icase) + , + generic_author_format + std::string("(?4Free Software Foundation, Inc)") + , + "GNU Parser Licence" + , + "

Skeleton parser for Yacc-like parsing with Bison,
" + "Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.

" + "

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, 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., 59 Temple Place - Suite 330," + "Boston, MA 02111-1307, USA.

" + "

As a special exception, when this file is copied by Bison into a" + "Bison output file, you may use that output file without restriction." + "This special exception was added by the Free Software Foundation" + "in version 1.24 of Bison.

" + ) + , + license_info( boost::regex( + "(?:The|This)\\W+code\\W+is\\W+considered\\W+to\\W+be\\W+in\\W+the\\W+public\\W+domain", boost::regex::perl | boost::regex::icase) + , + boost::regex(generic_author_sig, boost::regex::perl | boost::regex::icase) + , + generic_author_format + , + "Public Domain" + , + "

The code has no license terms, it has been explicity placed in the\n" + "public domain by it's author(s).

" + ) + , + }; + return std::pair(licenses, static_cast(sizeof(licenses)/sizeof(licenses[0]))); +} + +std::string format_authors_name(const std::string& name) +{ + // put name into a consistent format, so that we don't get too much + // of a proliferation of names (lots of versions of the same basic form). + + static const boost::regex e("(^)?[^-( +#include + +struct license_info +{ + boost::regex license_signature; + boost::regex copyright_signature; + std::string copyright_formatter; + std::string license_name; + std::string license_text; + // + // we should really be able to initialize license_info as an + // aggregate, but some compilers reject this, so use a constructor + //instead: + // + license_info(const boost::regex& e1, + const boost::regex& e2, + const std::string& s1, + const std::string& s2, + const std::string& s3) + : license_signature(e1), + copyright_signature(e2), + copyright_formatter(s1), + license_name(s2), + license_text(s3){} +}; + +std::pair get_licenses(); + +std::string format_authors_name(const std::string& name); diff --git a/src/boost/tools/bcp/main.cpp b/src/boost/tools/bcp/main.cpp new file mode 100644 index 000000000..214c6d820 --- /dev/null +++ b/src/boost/tools/bcp/main.cpp @@ -0,0 +1,183 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the cpp_main entry point + */ + + +#include +#include +#include +#include +#include "bcp.hpp" +#include +#include +#include + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::strcmp; + using ::strncmp; +} +#endif + +void show_usage() +{ + std::cout << + "Usage:\n" + " bcp --list [options] module-list\n" + " bcp --list-short [options] module-list\n" + " bcp --report [options] module-list html-file\n" + " bcp [options] module-list output-path\n" + "\n" + "Options:\n" + " --boost=path sets the location of the boost tree to path\n" + " --scan treat the module list as a list of (possibly non-boost)\n" + " files to scan for boost dependencies\n" + " --svn only copy files under cvs version control\n" + " --unix-lines make sure that all copied files use Unix style line endings\n" + " --namespace=name rename the boost namespace to name (also changes library names).\n" + " --namespace-alias Makes namespace boost an alias of the namespace set with --namespace.\n" + "\n" + "module-list: a list of boost files or library names to copy\n" + "html-file: the name of a html file to which the report will be written\n" + "output-path: the path to which files will be copied\n"; +} + +bool filesystem_name_check( const std::string & ) +{ + return true; +} + +int cpp_main(int argc, char* argv[]) +{ + // + // Before anything else replace Boost.filesystem's file + // name checker with one that does nothing (we only deal + // with files that already exist, if they're not portable + // names it's too late for us to do anything about it). + // + /*boost::filesystem::path::default_name_check(filesystem_name_check);*/ + // + // without arguments just show help: + // + if(argc < 2) + { + std::cout << "Error: insufficient arguments, don't know what to do." << std::endl; + show_usage(); + return 1; + } + // + // create the application object: + // + pbcp_application papp(bcp_application::create()); + // + // work through args, and tell the application + // object what ir needs to do: + // + bool list_mode = false; + std::list positional_args; + for(int i = 1; i < argc; ++i) + { + if(0 == std::strcmp("-h", argv[i]) + || 0 == std::strcmp("--help", argv[i])) + { + show_usage(); + return 0; + } + if(0 == std::strcmp("-v", argv[i]) + || 0 == std::strcmp("--version", argv[i])) + { + std::cout << "bcp " << (BOOST_VERSION / 100000) << "." << (BOOST_VERSION / 100 % 1000) << "." << (BOOST_VERSION % 100) << std::endl; + std::cout << __DATE__ << std::endl; + return 0; + } + else if(0 == std::strcmp("--list", argv[i])) + { + list_mode = true; + papp->enable_list_mode(); + } + else if(0 == std::strcmp("--list-short", argv[i])) + { + list_mode = true; + papp->enable_summary_list_mode(); + } + else if(0 == std::strcmp("--report", argv[i])) + { + papp->enable_license_mode(); + } + else if(0 == std::strcmp("--cvs", argv[i])) + { + papp->enable_cvs_mode(); + } + else if(0 == std::strcmp("--svn", argv[i])) + { + papp->enable_svn_mode(); + } + else if(0 == std::strcmp("--scan", argv[i])) + { + papp->enable_scan_mode(); + } + else if(0 == std::strcmp("--bsl-convert", argv[i])) + { + papp->enable_bsl_convert_mode(); + } + else if(0 == std::strcmp("--bsl-summary", argv[i])) + { + papp->enable_bsl_summary_mode(); + } + else if(0 == std::strcmp("--unix-lines", argv[i])) + { + papp->enable_unix_lines(); + } + else if(0 == std::strncmp("--boost=", argv[i], 8)) + { + papp->set_boost_path(argv[i] + 8); + } + else if(0 == std::strncmp("--namespace=", argv[i], 12)) + { + papp->set_namespace(argv[i] + 12); + } + else if(0 == std::strncmp("--namespace-alias", argv[i], 17)) + { + papp->set_namespace_alias(true); + } + else if(0 == std::strncmp("--list-namespaces", argv[i], 17)) + { + list_mode = true; + papp->set_namespace_list(true); + } + else if(argv[i][0] == '-') + { + std::cout << "Error: Unknown argument " << argv[i] << std::endl; + show_usage(); + return 1; + } + else + { + positional_args.push_back(argv[i]); + } + } + // + // Handle positional args last: + // + for(std::list::const_iterator i = positional_args.begin(); + i != positional_args.end(); ++i) + { + if(!list_mode && (i == --positional_args.end())) + papp->set_destination(*i); + else + papp->add_module(*i); + } + // + // run the application object: + // + return papp->run(); +} + + + diff --git a/src/boost/tools/bcp/output_licence_info.cpp b/src/boost/tools/bcp/output_licence_info.cpp new file mode 100644 index 000000000..d42268fdb --- /dev/null +++ b/src/boost/tools/bcp/output_licence_info.cpp @@ -0,0 +1,410 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#include "licence_info.hpp" +#include "bcp_imp.hpp" +#include "fileview.hpp" +#include +#include +#include +#include +#include +#include +#include + +// +// split_path is a small helper for outputting a path name, +// complete with a link to that path: +// +struct split_path +{ + const fs::path& root; + const fs::path& file; + split_path(const fs::path& r, const fs::path& f) + : root(r), file(f){} +private: + split_path& operator=(const split_path&); +}; + +std::ostream& operator << (std::ostream& os, const split_path& p) +{ + os << "" << p.file.string() << ""; + return os; +} + +std::string make_link_target(const std::string& s) +{ + // convert an arbitrary string into something suitable + // for an name: + std::string result; + for(unsigned i = 0; i < s.size(); ++i) + { + result.append(1, static_cast(std::isalnum(s[i]) ? s[i] : '_')); + } + return result; +} + + +void bcp_implementation::output_license_info() +{ + std::pair licenses = get_licenses(); + + std::map::const_iterator i, j; + i = m_license_data.begin(); + j = m_license_data.end(); + + std::ofstream os(m_dest_path.string().c_str()); + if(!os) + { + std::string msg("Error opening "); + msg += m_dest_path.string(); + msg += " for output."; + std::runtime_error e(msg); + boost::throw_exception(e); + } + os << + "\n" + "\n" + "\n" + "Boost Licence Dependency Information"; + if(m_module_list.size() == 1) + { + os << " for " << *(m_module_list.begin()); + } + os << + "\n" + "\n" + "\n" + "

Boost Licence Dependency Information"; + if(m_module_list.size() == 1) + { + os << " for " << *(m_module_list.begin()); + } + os << + "

\n" + "

Contents

\n" + "
Input Information\n";
+   if(!m_bsl_summary_mode)
+      os << "Licence Summary\n";
+   os << "Licence Details\n";
+
+   while(i != j)
+   {
+      // title:
+      os << "   first].license_name) 
+         << "\">" << licenses.first[i->first].license_name << "\n";
+      ++i;
+   }
+
+   os << "Files with no recognised license\n"
+      "Files with no recognised copyright holder\n";
+   if(!m_bsl_summary_mode)
+   {
+      os <<
+      "Moving to the Boost Software License...\n"
+      "  Files that can be automatically converted to the Boost Software License\n"
+      "  Files that can be manually converted to the Boost Software License\n"
+      "  Files that can NOT be moved to the Boost Software License\n"
+      "  Authors we need to move to the Boost Software License\n"
+      "Copyright Holder Information\n";
+   }
+   os << 
+      "File Dependency Information\n"
+      "
"; + + // + // input Information: + // + os << "

Input Information

\n"; + if(m_scan_mode) + os << "

The following files were scanned for boost dependencies:
"; + else + os << "

The following Boost modules were checked:
"; + + std::list::const_iterator si = m_module_list.begin(); + std::list::const_iterator sj = m_module_list.end(); + while(si != sj) + { + os << *si << "
"; + ++si; + } + os << "

The Boost path was: " << m_boost_path.string() << "

"; + // + // extract the boost version number from the boost directory tree, + // not from this app (which may have been built from a previous + // version): + // + fileview version_file(m_boost_path / "boost/version.hpp"); + static const boost::regex version_regex( + "^[[:blank:]]*#[[:blank:]]*define[[:blank:]]+BOOST_VERSION[[:blank:]]+(\\d+)"); + boost::cmatch what; + if(boost::regex_search(version_file.begin(), version_file.end(), what, version_regex)) + { + int version = boost::lexical_cast(what.str(1)); + os << "

The Boost version is: " << version / 100000 << "." << version / 100 % 1000 << "." << version % 100 << "

\n"; + } + + // + // output each license: + // + i = m_license_data.begin(); + j = m_license_data.end(); + if(!m_bsl_summary_mode) + { + // + // start with the summary: + // + os << "

Licence Summary

\n"; + while(i != j) + { + // title: + os << + "

" << licenses.first[i->first].license_name << "

\n"; + // license text: + os << "
" << licenses.first[i->first].license_text << "
"; + // Copyright holders: + os << "

This license is used by " << i->second.authors.size() + << " authors and " << i->second.files.size() + << " files first].license_name) << "\">(see details)"; + os << "

\n"; + ++i; + } + } + // + // and now the details: + // + i = m_license_data.begin(); + j = m_license_data.end(); + int license_index = 0; + os << "

Licence Details

\n"; + while(i != j) + { + // title: + os << + "

first].license_name) + << "\">" << licenses.first[i->first].license_name << "

\n"; + // license text: + os << "
" << licenses.first[i->first].license_text << "
"; + if(!m_bsl_summary_mode || (license_index >= 3)) + { + // Copyright holders: + os << "

This license is used by the following " << i->second.authors.size() << " copyright holders:

\n

"; + std::set::const_iterator x, y; + x = i->second.authors.begin(); + y = i->second.authors.end(); + while(x != y) + { + os << *x << "
\n"; + ++x; + } + os << "

\n"; + // Files using this license: + os << "

This license applies to the following " << i->second.files.size() << " files:

\n

"; + std::set::const_iterator m, n; + m = i->second.files.begin(); + n = i->second.files.end(); + while(m != n) + { + os << split_path(m_boost_path, *m) << "
\n"; + ++m; + } + os << "

\n"; + } + else + { + os << "

This license is used by " << i->second.authors.size() << " authors (list omitted for brevity).

\n"; + os << "

This license applies to " << i->second.files.size() << " files (list omitted for brevity).

\n"; + } + ++license_index; + ++i; + } + // + // Output list of files not found to be under license control: + // + os << "

Files With No Recognisable Licence

\n" + "

The following " << m_unknown_licenses.size() << " files had no recognisable license information:

\n"; + std::set::const_iterator i2, j2; + i2 = m_unknown_licenses.begin(); + j2 = m_unknown_licenses.end(); + while(i2 != j2) + { + os << split_path(m_boost_path, *i2) << "
\n"; + ++i2; + } + os << "

"; + // + // Output list of files with no found copyright holder: + // + os << "

Files With No Recognisable Copyright Holder

\n" + "

The following " << m_unknown_authors.size() << " files had no recognisable copyright holder:

\n

"; + i2 = m_unknown_authors.begin(); + j2 = m_unknown_authors.end(); + while(i2 != j2) + { + os << split_path(m_boost_path, *i2) << "
\n"; + ++i2; + } + os << "

"; + if(!m_bsl_summary_mode) + { + // + // Output list of files that have been moved over to the Boost + // Software License, along with enough information for human + // verification. + // + os << "

Files that can be automatically converted to the Boost Software License

\n" + << "

The following " << m_converted_to_bsl.size() << " files can be automatically converted to the Boost Software License, but require manual verification before they can be committed to CVS:

\n"; + if (!m_converted_to_bsl.empty()) + { + typedef std::map, path_less> + ::const_iterator conv_iterator; + conv_iterator i = m_converted_to_bsl.begin(), + ie = m_converted_to_bsl.end(); + int file_num = 1; + while (i != ie) + { + os << "

[" << file_num << "] File: " << split_path(m_boost_path, i->first) + << "
\n\n \n \n \n \n
" 
+               << i->second.first << "
"
+               << i->second.second << "
\n"; + ++i; + ++file_num; + } + } + // + // Output list of files that could be moved over to the Boost Software License + // + os << "

Files that could be converted to the Boost Software License

\n" + "

The following " << m_can_migrate_to_bsl.size() << " files could be manually converted to the Boost Software License, but have not yet been:

\n

"; + i2 = m_can_migrate_to_bsl.begin(); + j2 = m_can_migrate_to_bsl.end(); + while(i2 != j2) + { + os << split_path(m_boost_path, *i2) << "
\n"; + ++i2; + } + os << "

"; + // + // Output list of files that can not be moved over to the Boost Software License + // + os << "

Files that can NOT be converted to the Boost Software License

\n" + "

The following " << m_cannot_migrate_to_bsl.size() << " files cannot be converted to the Boost Software License because we need the permission of more authors:

\n

"; + i2 = m_cannot_migrate_to_bsl.begin(); + j2 = m_cannot_migrate_to_bsl.end(); + while(i2 != j2) + { + os << split_path(m_boost_path, *i2) << "
\n"; + ++i2; + } + os << "

"; + // + // Output list of authors that we need permission for to move to the BSL + // + os << "

Authors we need for the BSL

\n" + "

Permission of the following authors is needed before we can convert to the Boost Software License. The list of authors that have given their permission is contained in more/blanket-permission.txt.

\n

"; + std::copy(m_authors_for_bsl_migration.begin(), m_authors_for_bsl_migration.end(), + std::ostream_iterator(os, "
\n")); + os << "

"; + // + // output a table of copyright information: + // + os << "

Copyright Holder Information

\n"; + std::map >::const_iterator ad, ead; + ad = m_author_data.begin(); + ead = m_author_data.end(); + while(ad != ead) + { + os << "\n"; + ++ad; + } + os << "
" << ad->first << ""; + std::set::const_iterator fi, efi; + fi = ad->second.begin(); + efi = ad->second.end(); + while(fi != efi) + { + os << split_path(m_boost_path, *fi) << " "; + ++fi; + } + os << "
\n"; + } + + // + // output file dependency information: + // + os << "

File Dependency Information

\n";
+   std::map::const_iterator dep, last_dep;
+   std::set::const_iterator fi, efi;
+   fi = m_copy_paths.begin();
+   efi = m_copy_paths.end();
+   // if in summary mode, just figure out the "bad" files and print those only:
+   std::set bad_paths;
+   if(m_bsl_summary_mode)
+   {
+      bad_paths.insert(m_unknown_licenses.begin(), m_unknown_licenses.end());
+      bad_paths.insert(m_unknown_authors.begin(), m_unknown_authors.end());
+      bad_paths.insert(m_can_migrate_to_bsl.begin(), m_can_migrate_to_bsl.end());
+      bad_paths.insert(m_cannot_migrate_to_bsl.begin(), m_cannot_migrate_to_bsl.end());
+      typedef std::map, path_less>
+         ::const_iterator conv_iterator;
+      conv_iterator i = m_converted_to_bsl.begin(), 
+                     ie = m_converted_to_bsl.end();
+      while(i != ie)
+      {
+         bad_paths.insert(i->first);
+         ++i;
+      }
+      fi = bad_paths.begin();
+      efi = bad_paths.end();
+      os << "

For brevity, only files not under the BSL are shown

\n"; + } + while(fi != efi) + { + os << split_path(m_boost_path, *fi); + dep = m_dependencies.find(*fi); + last_dep = m_dependencies.end(); + std::set seen_deps; + if (dep != last_dep) + while(true) + { + os << " -> "; + if(fs::exists(m_boost_path / dep->second)) + os << split_path(m_boost_path, dep->second); + else if(fs::exists(dep->second)) + os << split_path(fs::path(), dep->second); + else + os << dep->second.string(); + if(seen_deps.find(dep->second) != seen_deps.end()) + { + os << " (Circular dependency!)"; + break; // circular dependency!!! + } + seen_deps.insert(dep->second); + last_dep = dep; + dep = m_dependencies.find(dep->second); + if((dep == m_dependencies.end()) || (0 == compare_paths(dep->second, last_dep->second))) + break; + } + os << "\n"; + ++fi; + } + os << "
\n"; + + os << "\n"; + + if(!os) + { + std::string msg("Error writing to "); + msg += m_dest_path.string(); + msg += "."; + std::runtime_error e(msg); + boost::throw_exception(e); + } + +} diff --git a/src/boost/tools/bcp/path_operations.cpp b/src/boost/tools/bcp/path_operations.cpp new file mode 100644 index 000000000..aebbc4e6f --- /dev/null +++ b/src/boost/tools/bcp/path_operations.cpp @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements path comparisons + */ + + +#include "bcp_imp.hpp" +#include + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::tolower; +} +#endif + + +int compare_paths(const fs::path& a, const fs::path& b) +{ + const std::string& as = a.generic_string(); + const std::string& bs = b.generic_string(); + std::string::const_iterator i, j, k, l; + i = as.begin(); + j = as.end(); + k = bs.begin(); + l = bs.end(); + while(i != j) + { + if(k == l) + return -1; + int r = std::tolower(*i) - std::tolower(*k); + if(r) return r; + ++i; + ++k; + } + return (k == l) ? 0 : 1; +} diff --git a/src/boost/tools/bcp/scan_cvs_path.cpp b/src/boost/tools/bcp/scan_cvs_path.cpp new file mode 100644 index 000000000..6d2eb3a60 --- /dev/null +++ b/src/boost/tools/bcp/scan_cvs_path.cpp @@ -0,0 +1,147 @@ +/* + * + * Copyright (c) 2003-7 John Maddock + * Copyright (c) 2007 Bjorn Roald + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file implements the following: + * void bcp_implementation::scan_cvs_path(const fs::path& p) + */ + + + +#include "bcp_imp.hpp" +#include "fileview.hpp" +#include +#include +#include +#include + +void bcp_implementation::scan_cvs_path(const fs::path& p) +{ + // + // scan through the cvs admin files to build a list + // of all the files under cvs version control + // and whether they are text or binary: + // + static const char* file_list[] = { "CVS/Entries", "CVS/Entries.Log" }; + static const boost::regex file_expression("^(?:A\\s+)?/([^/\\n]+)/[^/\\n]*/[^/\\n]*/[^k/\\n]*(kb[^/\\n]*)?/[^/\\n]*"); + static const boost::regex dir_expression("^(?:A\\s+)?D/([^/\\n]+)/"); + static const int file_subs[] = {1,2,}; + + for(std::size_t entry = 0; entry < sizeof(file_list)/sizeof(file_list[0]); ++entry) + { + fs::path entries(m_boost_path / p / file_list[entry]); + if(fs::exists(entries)) + { + fileview view(entries); + boost::regex_token_iterator i(view.begin(), view.end(), dir_expression, 1); + boost::regex_token_iterator j; + while(i != j) + { + fs::path recursion_dir(p / i->str()); + scan_cvs_path(recursion_dir); + ++i; + } + #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) + std::vector v(file_subs, file_subs + 2); + i = boost::regex_token_iterator(view.begin(), view.end(), file_expression, v); + #else + i = boost::regex_token_iterator(view.begin(), view.end(), file_expression, file_subs); + #endif + while(i != j) + { + fs::path file = p / i->str(); + ++i; + bool binary = i->length() ? true : false; + ++i; + m_cvs_paths[file] = binary; + } + + } + } +} + +void bcp_implementation::scan_svn_path(const fs::path& p) +{ + // + // scan through the svn entries files to build a list + // of all the files under svn version control + // and whether they are text or binary: + // + static const boost::regex entry_expression("^\\f([^\\f]*)"); + static const boost::regex entry_line_expression("\\n[[:blank:]]*([^\\n]*)"); + // static const boost::regex + // mime_type_expression("\\nsvn:mime-type\\nV [[digit]]*\\n([^/]*)[^\\n]*"); + + fs::path entries(m_boost_path / p / ".svn" / "entries"); + if(fs::exists(entries)) + { + fileview view(entries); + boost::cregex_token_iterator + i(view.begin(), view.end(), entry_expression, 1), j; + + while(i != j) // entries + { + std::string entr = i->str(); + boost::sregex_token_iterator + atr_it(entr.begin(), entr.end(), entry_line_expression, 1), atr_j; + + if(atr_it != atr_j) + { + std::string name = atr_it->str(); // name of file or directory + fs::path fpath = p / name; + if(++atr_it != atr_j) + { + std::string kind = atr_it->str(); + if(kind == "file") + { + // find if binary, we asume text unless mime type is + // set in property file + bool binary = false; // + + // skip some lines type | example + if( ++atr_it != atr_j && // revnum | + ++atr_it != atr_j && // url | + ++atr_it != atr_j && // repos | + ++atr_it != atr_j && // scedule attr | + ++atr_it != atr_j && // text timestamp | 2007-09-02T... + ++atr_it != atr_j && // checksum | 58f4bfa7860... + ++atr_it != atr_j && // cmt_date | 2007-05-09T... + ++atr_it != atr_j && // cmt_rev | 37654 + ++atr_it != atr_j && // cmt_author | dgregor + ++atr_it != atr_j ) // has_props | has-props + { + if(atr_it->str() == "has-props") + { + // we need to check properties file for mime-type + // that does not start with "text/", if found file is binary + fs::path properties(m_boost_path / p / ".svn" / "prop-base" + / (name + ".svn-base") ); + if(fs::exists(properties)) + { + fileview prop(properties); + + static const boost::regex mime_type( + "svn:mime-type[[:blank:]]*(?:\\n|\\r|\\r\\n)[^\\r\\n]*(?:\\n|\\r|\\r\\n)[[:blank:]]*text/"); + binary = regex_search(prop.begin(), prop.end(), mime_type) ? false : true; + } + } + } + m_cvs_paths[fpath] = binary; + } // kind == "file" + else if(kind == "dir") + { + scan_svn_path(fpath); // recursion for directory entries + } + // else + // std::cerr << "WARNING: unknown entry kind for entry " << name + // << "in " << entries << std::endl; + } + } + ++i; + } // while + } +} diff --git a/src/boost/tools/bcp/scan_licence.cpp b/src/boost/tools/bcp/scan_licence.cpp new file mode 100644 index 000000000..4dc461c14 --- /dev/null +++ b/src/boost/tools/bcp/scan_licence.cpp @@ -0,0 +1,275 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#include "licence_info.hpp" +#include "bcp_imp.hpp" +#include "fileview.hpp" +#include +#include + + +const int boost_license_lines = 3; +static const std::string boost_license_text[boost_license_lines] = { + "Distributed under the Boost Software License, Version 1.0. (See", + "accompanying file LICENSE_1_0.txt or copy at", + "http://www.boost.org/LICENSE_1_0.txt)" +}; + +fileview::const_iterator +context_before_license(const fileview& v, fileview::const_iterator start, + int context_lines = 3) +{ + char last_char = '\0'; + while (start != v.begin() && context_lines >= 0) { + if (((*start == '\r') || (*start == '\n')) + && ((last_char == *start) || ((last_char != '\r') && (last_char != '\n')))) + --context_lines; + + last_char = *start; + --start; + } + + // Unless we hit the beginning, we need to step forward one to start + // on the next line. + if (start != v.begin()) ++start; + + return start; +} + +fileview::const_iterator +context_after_license(const fileview& v, fileview::const_iterator end, + int context_lines = 3) +{ + char last_char = '\0'; + while (end != v.end() && context_lines >= 0) { + if ((*end == '\r' || *end == '\n') + && (last_char == *end || (last_char != '\r' && last_char != '\n'))) + --context_lines; + + last_char = *end; + ++end; + } + + return end; +} + +static std::string +find_prefix(const fileview& v, fileview::const_iterator start_of_line) +{ + while (start_of_line != v.begin() + && *start_of_line != '\n' + && *start_of_line != '\r') + --start_of_line; + if (start_of_line != v.begin()) + ++start_of_line; + + fileview::const_iterator first_noncomment_char = start_of_line; + while (*first_noncomment_char == '/' + || *first_noncomment_char == '*' + || *first_noncomment_char == ' ' + || *first_noncomment_char == '#') + ++first_noncomment_char; + + return std::string(start_of_line, first_noncomment_char); +} + +static std::string +html_escape(fileview::const_iterator first, fileview::const_iterator last) +{ + std::string result; + while (first != last) { + switch (*first) { + case '<': result += "<"; break; + case '>': result += ">"; break; + case '&': result += "&"; break; + default: result += *first; + } + ++first; + } + return result; +} + +static bool is_non_bsl_license(int index) +{ + return index > 2; +} + +void bcp_implementation::scan_license(const fs::path& p, const fileview& v) +{ + std::pair licenses = get_licenses(); + // + // scan file for all the licenses in the list: + // + int license_count = 0; + int author_count = 0; + int nonbsl_author_count = 0; + bool has_non_bsl_license = false; + fileview::const_iterator start_of_license = v.begin(), + end_of_license = v.end(); + bool start_in_middle_of_line = false; + + for(int i = 0; i < licenses.second; ++i) + { + boost::match_results m; + if(boost::regex_search(v.begin(), v.end(), m, licenses.first[i].license_signature)) + { + start_of_license = m[0].first; + end_of_license = m[0].second; + + if (is_non_bsl_license(i) && i < licenses.second - 1) + has_non_bsl_license = true; + + // add this license to the list: + m_license_data[i].files.insert(p); + ++license_count; + // + // scan for the associated copyright declarations: + // + boost::regex_iterator cpy(v.begin(), v.end(), licenses.first[i].copyright_signature); + boost::regex_iterator ecpy; + while(cpy != ecpy) + { +#if 0 + // Not dealing with copyrights because we don't have the years + if ((*cpy)[0].first < start_of_license) + start_of_license = (*cpy)[0].first; + if ((*cpy)[0].second > end_of_license) + end_of_license = (*cpy)[0].second; +#endif + + // extract the copy holders as a list: + std::string author_list = cpy->format(licenses.first[i].copyright_formatter, boost::format_all); + // now enumerate that list for all the names: + static const boost::regex author_separator("(?:\\s*,(?!\\s*(?:inc|ltd)\\b)\\s*|\\s+(,\\s*)?(and|&)\\s+)|by\\s+", boost::regex::perl | boost::regex::icase); + boost::regex_token_iterator atr(author_list.begin(), author_list.end(), author_separator, -1); + boost::regex_token_iterator eatr; + while(atr != eatr) + { + // get the reformatted authors name: + std::string name = format_authors_name(*atr); + // add to list of authors for this file: + if(name.size() && name[0] != '-') + { + m_license_data[i].authors.insert(name); + // add file to author index: + m_author_data[name].insert(p); + ++author_count; + + // If this is not the Boost Software License (license 0), and the author hasn't given + // blanket permission, note this for the report. + if (has_non_bsl_license + && m_bsl_authors.find(name) == m_bsl_authors.end()) { + ++nonbsl_author_count; + m_authors_for_bsl_migration.insert(name); + } + } + ++atr; + } + ++cpy; + } + + while (start_of_license != v.begin() + && *start_of_license != '\r' + && *start_of_license != '\n' + && *start_of_license != '.') + --start_of_license; + + if (start_of_license != v.begin()) { + if (*start_of_license == '.') + start_in_middle_of_line = true; + ++start_of_license; + } + + while (end_of_license != v.end() + && *end_of_license != '\r' + && *end_of_license != '\n') + ++end_of_license; + } + } + if(license_count == 0) + m_unknown_licenses.insert(p); + if(license_count && !author_count) + m_unknown_authors.insert(p); + + if (has_non_bsl_license) { + bool converted = false; + if (nonbsl_author_count == 0 + && license_count == 1) { + // Grab a few lines of context + fileview::const_iterator context_start = + context_before_license(v, start_of_license); + fileview::const_iterator context_end = + context_after_license(v, end_of_license); + + // TBD: For files that aren't C++ code, this will have to + // change. + std::string prefix = find_prefix(v, start_of_license); + + // Create enough information to permit manual verification of + // the correctness of the transformation + std::string before_conversion = + html_escape(context_start, start_of_license); + before_conversion += ""; + before_conversion += html_escape(start_of_license, end_of_license); + before_conversion += ""; + before_conversion += html_escape(end_of_license, context_end); + + std::string after_conversion = + html_escape(context_start, start_of_license); + if (start_in_middle_of_line) + after_conversion += '\n'; + + after_conversion += ""; + for (int i = 0; i < boost_license_lines; ++i) { + if (i > 0) after_conversion += '\n'; + after_conversion += prefix + boost_license_text[i]; + } + after_conversion += ""; + after_conversion += html_escape(end_of_license, context_end); + + m_converted_to_bsl[p] = + std::make_pair(before_conversion, after_conversion); + + // Perform the actual conversion + if (m_bsl_convert_mode) { + try{ + std::ofstream out((m_boost_path / p).string().c_str()); + if (!out) { + std::string msg("Cannot open file for license conversion: "); + msg += p.string(); + std::runtime_error e(msg); + boost::throw_exception(e); + } + + out << std::string(v.begin(), start_of_license); + if (start_in_middle_of_line) + out << std::endl; + + for (int j = 0; j < boost_license_lines; ++j) { + if (j > 0) out << std::endl; + out << prefix << boost_license_text[j]; + } + out << std::string(end_of_license, v.end()); + + converted = true; + } + catch(const std::exception& e) + { + std::cerr << e.what() << std::endl; + } + } + } + + if (!converted) { + if (nonbsl_author_count > 0) m_cannot_migrate_to_bsl.insert(p); + else m_can_migrate_to_bsl.insert(p); + } + } +} + diff --git a/src/boost/tools/bcp/test/Jamfile.v2 b/src/boost/tools/bcp/test/Jamfile.v2 new file mode 100644 index 000000000..bea522489 --- /dev/null +++ b/src/boost/tools/bcp/test/Jamfile.v2 @@ -0,0 +1,25 @@ +# (C) Copyright John Maddock 2006. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +path-constant boost-path : ../../.. ; + +run + # sources + ../add_dependent_lib.cpp ../add_path.cpp ../bcp_imp.cpp ../copy_path.cpp ../file_types.cpp + ../fileview.cpp ../main.cpp ../path_operations.cpp ../scan_cvs_path.cpp + ../licence_info.cpp ../scan_licence.cpp ../output_licence_info.cpp + /boost/filesystem//boost_filesystem + /boost/regex//boost_regex + /boost/test//boost_prg_exec_monitor + : # args + --boost=$(boost-path) --list boost + : # input-files + : # requirements + release + : # target-name + bcp-test + : # default-build + release + ; + diff --git a/src/boost/tools/boost_install/BoostConfig.cmake b/src/boost/tools/boost_install/BoostConfig.cmake new file mode 100644 index 000000000..c762b3252 --- /dev/null +++ b/src/boost/tools/boost_install/BoostConfig.cmake @@ -0,0 +1,296 @@ +# Copyright 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +# This CMake configuration file, installed as part of the Boost build +# and installation procedure done by `b2 install`, provides support +# for find_package(Boost). +# +# It's roughly, but not perfectly, compatible with the behavior +# of find_package(Boost) as provided by FindBoost.cmake. +# +# A typical use might be +# +# find_package(Boost 1.70 REQUIRED COMPONENTS filesystem regex PATHS C:/Boost) +# +# On success, the above invocation would define the targets Boost::headers, +# Boost::filesystem and Boost::regex. Boost::headers represents all +# header-only libraries. An alias, Boost::boost, for Boost::headers is +# provided for compatibility. +# +# Requesting the special component "ALL" will make all installed components +# available, as in the following example: +# +# find_package(Boost 1.73 REQUIRED COMPONENTS ALL) +# +# Since COMPONENTS is optional when REQUIRED is specified, the above can be +# shortened to +# +# find_package(Boost 1.73 REQUIRED ALL) +# +# When ALL is used, a variable Boost_ALL_TARGETS will be set and will contain +# the names of all created targets. +# +# The ALL component cannot be combined with named components. +# +# Since Boost libraries can coexist in many variants - 32/64 bit, +# static/dynamic runtime, debug/release, the following variables can be used +# to control which variant is chosen: +# +# Boost_USE_DEBUG_LIBS: When OFF, disables debug libraries. +# Boost_USE_RELEASE_LIBS: When OFF, disables release libraries. +# Boost_USE_MULTITHREADED: When OFF, uses single-threaded libraries. +# The default is multithreaded. +# Boost_USE_STATIC_LIBS: When ON, uses static Boost libraries; when OFF, +# uses shared Boost libraries; when not set, uses +# static on Windows, shared otherwise. +# Boost_USE_STATIC_RUNTIME: When ON, uses Boost libraries linked against the +# static runtime. The default is shared runtime. +# Boost_USE_DEBUG_RUNTIME: When ON, uses Boost libraries linked against the +# debug runtime. When OFF, against the release +# runtime. The default is to use either. +# Boost_COMPILER: The compiler that has been used to build Boost, +# such as vc141, gcc7, clang37. The default is +# determined from CMAKE_CXX_COMPILER_ID. +# Boost_PYTHON_VERSION: The version of Python against which Boost.Python +# has been built; only required when more than one +# Boost.Python library is present. +# +# The following variables control the verbosity of the output: +# +# Boost_VERBOSE: Enable verbose output +# Boost_DEBUG: Enable debug (even more verbose) output + +if(Boost_VERBOSE OR Boost_DEBUG) + + message(STATUS "Found Boost ${Boost_VERSION} at ${Boost_DIR}") + + # Output requested configuration (f.ex. "REQUIRED COMPONENTS filesystem") + + if(Boost_FIND_QUIETLY) + set(_BOOST_CONFIG "${_BOOST_CONFIG} QUIET") + endif() + + if(Boost_FIND_REQUIRED) + set(_BOOST_CONFIG "${_BOOST_CONFIG} REQUIRED") + endif() + + foreach(__boost_comp IN LISTS Boost_FIND_COMPONENTS) + if(${Boost_FIND_REQUIRED_${__boost_comp}}) + list(APPEND _BOOST_COMPONENTS ${__boost_comp}) + else() + list(APPEND _BOOST_OPTIONAL_COMPONENTS ${__boost_comp}) + endif() + endforeach() + + if(_BOOST_COMPONENTS) + set(_BOOST_CONFIG "${_BOOST_CONFIG} COMPONENTS ${_BOOST_COMPONENTS}") + endif() + + if(_BOOST_OPTIONAL_COMPONENTS) + set(_BOOST_CONFIG "${_BOOST_CONFIG} OPTIONAL_COMPONENTS ${_BOOST_OPTIONAL_COMPONENTS}") + endif() + + if(_BOOST_CONFIG) + message(STATUS " Requested configuration:${_BOOST_CONFIG}") + endif() + + unset(_BOOST_CONFIG) + unset(_BOOST_COMPONENTS) + unset(_BOOST_OPTIONAL_COMPONENTS) + +endif() + +macro(boost_find_component comp required quiet) + + set(_BOOST_QUIET) + if(Boost_FIND_QUIETLY OR ${quiet}) + set(_BOOST_QUIET QUIET) + endif() + + set(_BOOST_REQUIRED) + if(${required} AND Boost_FIND_REQUIRED) + set(_BOOST_REQUIRED REQUIRED) + endif() + + if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9][0-9]?)$") + + # handle pythonXY and numpyXY versioned components for compatibility + + set(Boost_PYTHON_VERSION "${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") + set(__boost_comp_nv "${CMAKE_MATCH_1}") + + elseif("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])$") + + # handle python2/python3 for compatibility + + set(Boost_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}") + set(__boost_comp_nv "${CMAKE_MATCH_1}") + + else() + + set(__boost_comp_nv "${comp}") + + endif() + + get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE) + + if(Boost_DEBUG) + message(STATUS "BoostConfig: find_package(boost_${__boost_comp_nv} ${Boost_VERSION} EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})") + endif() + find_package(boost_${__boost_comp_nv} ${Boost_VERSION} EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR}) + + set(__boost_comp_found ${boost_${__boost_comp_nv}_FOUND}) + + # FindPackageHandleStandardArgs expects __FOUND + set(Boost_${comp}_FOUND ${__boost_comp_found}) + + # FindBoost sets Boost__FOUND + string(TOUPPER ${comp} _BOOST_COMP) + set(Boost_${_BOOST_COMP}_FOUND ${__boost_comp_found}) + + # FindBoost compatibility variables: Boost_LIBRARIES, Boost__LIBRARY + if(__boost_comp_found) + + list(APPEND Boost_LIBRARIES Boost::${__boost_comp_nv}) + set(Boost_${_BOOST_COMP}_LIBRARY Boost::${__boost_comp_nv}) + + if(NOT "${comp}" STREQUAL "${__boost_comp_nv}" AND NOT TARGET Boost::${comp}) + + # Versioned target alias (f.ex. Boost::python27) for compatibility + add_library(Boost::${comp} INTERFACE IMPORTED) + set_property(TARGET Boost::${comp} APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${__boost_comp_nv}) + + endif() + + endif() + + unset(_BOOST_REQUIRED) + unset(_BOOST_QUIET) + unset(_BOOST_CMAKEDIR) + unset(__boost_comp_nv) + unset(__boost_comp_found) + unset(_BOOST_COMP) + +endmacro() + +macro(boost_find_all_components) + + # Search for all available component-configuration directories... + file(GLOB __boost_all_components + LIST_DIRECTORIES true RELATIVE "${CMAKE_CURRENT_LIST_DIR}/.." + "${CMAKE_CURRENT_LIST_DIR}/../boost_*-${Boost_VERSION}") + # ...and extract component names from it. + string(REGEX REPLACE "boost_([_a-z0-9]+)-${Boost_VERSION}" "\\1" + __boost_all_components "${__boost_all_components}") + + if(Boost_DEBUG) + message(STATUS "BoostConfig: discovered components: ${__boost_all_components}") + endif() + + list(REMOVE_ITEM __boost_all_components "headers") + + # Try to find each component. + foreach(__boost_comp IN LISTS __boost_all_components) + + boost_find_component(${__boost_comp} 0 1) + + # Append to list of all targets (if found). + if(Boost_${__boost_comp}_FOUND) + list(APPEND Boost_ALL_TARGETS Boost::${__boost_comp}) + endif() + + endforeach() + + unset(__boost_all_components) + + if(Boost_DEBUG) + message(STATUS "BoostConfig: Boost_ALL_TARGETS: ${Boost_ALL_TARGETS}") + endif() + +endmacro() + +# Find boost_headers + +boost_find_component(headers 1 0) + +if(NOT boost_headers_FOUND) + + set(Boost_FOUND 0) + set(Boost_NOT_FOUND_MESSAGE "A required dependency, boost_headers, has not been found.") + + return() + +endif() + +# Compatibility variables + +set(Boost_MAJOR_VERSION ${Boost_VERSION_MAJOR}) +set(Boost_MINOR_VERSION ${Boost_VERSION_MINOR}) +set(Boost_SUBMINOR_VERSION ${Boost_VERSION_PATCH}) + +set(Boost_VERSION_STRING ${Boost_VERSION}) +set(Boost_VERSION_MACRO ${Boost_VERSION_MAJOR}0${Boost_VERSION_MINOR}0${Boost_VERSION_PATCH}) + +get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES) +set(Boost_LIBRARIES "") + +# Save project's policies +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST + +# Find components + +if("ALL" IN_LIST Boost_FIND_COMPONENTS) + + # Make sure "ALL" is the only requested component. + list(LENGTH Boost_FIND_COMPONENTS __boost_find_components_count) + if(NOT ${__boost_find_components_count} EQUAL 1) + message(AUTHOR_WARNING "ALL cannot be combined with named components; the named components will be ignored.") + endif() + + unset(__boost_find_components_count) + + set(Boost_ALL_TARGETS Boost::headers) + + boost_find_all_components() + +else() + + foreach(__boost_comp IN LISTS Boost_FIND_COMPONENTS) + + boost_find_component(${__boost_comp} ${Boost_FIND_REQUIRED_${__boost_comp}} 0) + + endforeach() + +endif() + +# Compatibility targets + +if(NOT TARGET Boost::boost) + + add_library(Boost::boost INTERFACE IMPORTED) + set_property(TARGET Boost::boost APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::headers) + + add_library(Boost::diagnostic_definitions INTERFACE IMPORTED) + add_library(Boost::disable_autolinking INTERFACE IMPORTED) + add_library(Boost::dynamic_linking INTERFACE IMPORTED) + + if(WIN32) + + set_property(TARGET Boost::diagnostic_definitions PROPERTY INTERFACE_COMPILE_DEFINITIONS "BOOST_LIB_DIAGNOSTIC") + set_property(TARGET Boost::disable_autolinking PROPERTY INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB") + set_property(TARGET Boost::dynamic_linking PROPERTY INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK") + + endif() + +endif() + +# Compatibility variable when using meta-component "ALL" + +if("ALL" IN_LIST Boost_FIND_COMPONENTS) + set(Boost_ALL_FOUND ${boost_headers_FOUND}) +endif() + +# Restore project's policies +cmake_policy(POP) diff --git a/src/boost/tools/boost_install/BoostDetectToolset.cmake b/src/boost/tools/boost_install/BoostDetectToolset.cmake new file mode 100644 index 000000000..7544159e5 --- /dev/null +++ b/src/boost/tools/boost_install/BoostDetectToolset.cmake @@ -0,0 +1,166 @@ +# Copyright 2017-2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +string(REGEX MATCHALL "[0-9]+" _BOOST_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) + +list(GET _BOOST_COMPILER_VERSION 0 _BOOST_COMPILER_VERSION_MAJOR) +list(GET _BOOST_COMPILER_VERSION 1 _BOOST_COMPILER_VERSION_MINOR) + +if(BORLAND) + + # Borland is unversioned + + set(BOOST_DETECTED_TOOLSET "bcb") + + set(_BOOST_COMPILER_VERSION_MAJOR) + set(_BOOST_COMPILER_VERSION_MINOR) + +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + + set(BOOST_DETECTED_TOOLSET "clang-darwin") + + # Match clang-darwin.jam + + if(_BOOST_COMPILER_VERSION_MAJOR GREATER 3) + set(_BOOST_COMPILER_VERSION_MINOR) + endif() + +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + + if(MSVC_VERSION) + set(BOOST_DETECTED_TOOLSET "clangw") + else() + set(BOOST_DETECTED_TOOLSET "clang") + endif() + + if(_BOOST_COMPILER_VERSION_MAJOR GREATER 3) + set(_BOOST_COMPILER_VERSION_MINOR) + endif() + +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + + if(WIN32) + + # Intel-Win is unversioned + + set(BOOST_DETECTED_TOOLSET "iw") + + set(_BOOST_COMPILER_VERSION_MAJOR) + set(_BOOST_COMPILER_VERSION_MINOR) + + else() + + set(BOOST_DETECTED_TOOLSET "il") + + endif() + +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MIPSpro") + + set(BOOST_DETECTED_TOOLSET "mp") + +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") + + set(BOOST_DETECTED_TOOLSET "sun") + +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "IBM XL") + + set(BOOST_DETECTED_TOOLSET "xlc") + +elseif(MINGW) + + set(BOOST_DETECTED_TOOLSET "mgw") + + if(_BOOST_COMPILER_VERSION_MAJOR GREATER 4) + set(_BOOST_COMPILER_VERSION_MINOR) + endif() + +elseif(CMAKE_COMPILER_IS_GNUCXX) + + if(APPLE) + set(BOOST_DETECTED_TOOLSET "xgcc") + else() + set(BOOST_DETECTED_TOOLSET "gcc") + endif() + + if(_BOOST_COMPILER_VERSION_MAJOR GREATER 4) + set(_BOOST_COMPILER_VERSION_MINOR) + endif() + +elseif(MSVC) + + if((MSVC_VERSION GREATER 1929) AND (MSVC_VERSION LESS 1940)) + + set(BOOST_DETECTED_TOOLSET "vc143") + + elseif((MSVC_VERSION GREATER 1919) AND (MSVC_VERSION LESS 1930)) + + set(BOOST_DETECTED_TOOLSET "vc142") + + elseif((MSVC_VERSION GREATER 1909) AND (MSVC_VERSION LESS 1920)) + + set(BOOST_DETECTED_TOOLSET "vc141") + + elseif(MSVC_VERSION EQUAL 1900) + + set(BOOST_DETECTED_TOOLSET "vc140") + + elseif(MSVC_VERSION EQUAL 1800) + + set(BOOST_DETECTED_TOOLSET "vc120") + + elseif(MSVC_VERSION EQUAL 1700) + + set(BOOST_DETECTED_TOOLSET "vc110") + + elseif(MSVC_VERSION EQUAL 1600) + + set(BOOST_DETECTED_TOOLSET "vc100") + + elseif(MSVC_VERSION EQUAL 1500) + + set(BOOST_DETECTED_TOOLSET "vc90") + + elseif(MSVC_VERSION EQUAL 1400) + + set(BOOST_DETECTED_TOOLSET "vc80") + + elseif(MSVC_VERSION EQUAL 1310) + + set(BOOST_DETECTED_TOOLSET "vc71") + + elseif(MSVC_VERSION EQUAL 1300) + + set(BOOST_DETECTED_TOOLSET "vc7") + + elseif(MSVC_VERSION EQUAL 1200) + + set(BOOST_DETECTED_TOOLSET "vc6") + + endif() + + set(_BOOST_COMPILER_VERSION_MAJOR) + set(_BOOST_COMPILER_VERSION_MINOR) + +endif() + +# Add version + +if(BOOST_DETECTED_TOOLSET) + set(BOOST_DETECTED_TOOLSET ${BOOST_DETECTED_TOOLSET}${_BOOST_COMPILER_VERSION_MAJOR}${_BOOST_COMPILER_VERSION_MINOR}) +endif() + +unset(_BOOST_COMPILER_VERSION) +unset(_BOOST_COMPILER_VERSION_MAJOR) +unset(_BOOST_COMPILER_VERSION_MINOR) + +if("${BOOST_DETECTED_TOOLSET}" STREQUAL "") + + # Unknown toolset + message(STATUS "Boost toolset is unknown (compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})") + +elseif(Boost_DEBUG) + + message(STATUS "Boost toolset is ${BOOST_DETECTED_TOOLSET} (${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})") + +endif() diff --git a/src/boost/tools/boost_install/Jamfile b/src/boost/tools/boost_install/Jamfile new file mode 100644 index 000000000..7d25aaebb --- /dev/null +++ b/src/boost/tools/boost_install/Jamfile @@ -0,0 +1,10 @@ +# Copyright 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +project /boost/tools/boost_install ; + +# BoostConfigVersion.cmake + +generate BoostConfigVersion.cmake : : @boost-install%generate-cmake-config-version Boost $(BOOST_VERSION) ; +explicit BoostConfigVersion.cmake ; diff --git a/src/boost/tools/boost_install/README.md b/src/boost/tools/boost_install/README.md new file mode 100644 index 000000000..97e0e48c7 --- /dev/null +++ b/src/boost/tools/boost_install/README.md @@ -0,0 +1,8 @@ +# boost_install + +This repository contains the implementation of the +`boost-install` rule. This rule, when called from +a library `Jamfile`, creates an `install` target +that installs the library and its CMake configuration +file. It also invokes the `install` targets of its +dependencies. diff --git a/src/boost/tools/boost_install/boost-install-dirs.jam b/src/boost/tools/boost_install/boost-install-dirs.jam new file mode 100644 index 000000000..5c9f3d469 --- /dev/null +++ b/src/boost/tools/boost_install/boost-install-dirs.jam @@ -0,0 +1,104 @@ +# Copyright 2018-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +import modules ; +import boostcpp ; +import package ; +import path ; + +# includedir + +rule includedir +{ + if ! $(.includedir) + { + local paths = [ package.paths Boost ] ; + .includedir = [ $(paths).includedir ] ; + } + + return $(.includedir) ; +} + +# bindir + +rule bindir +{ + if ! $(.bindir) + { + local paths = [ package.paths Boost ] ; + .bindir = [ $(paths).bindir ] ; + } + + return $(.bindir) ; +} + +# libdir + +rule libdir +{ + if ! $(.libdir) + { + local paths = [ package.paths Boost ] ; + .libdir = [ $(paths).libdir ] ; + } + + return $(.libdir) ; +} + +# cmakedir + +rule cmakedir +{ + if ! $(.cmakedir) + { + package.add-path-option cmakedir : cmake : libdir ; + + local paths = [ package.paths Boost ] ; + .cmakedir = [ $(paths).get cmakedir ] ; + } + + return $(.cmakedir) ; +} + +# header-subdir + +rule header-subdir +{ + local r ; + + local layout = [ modules.peek boostcpp : layout ] ; + + if $(layout) = versioned + { + local BOOST_VERSION_TAG = [ modules.peek boostcpp : BOOST_VERSION_TAG ] ; + r = "boost-$(BOOST_VERSION_TAG)" ; + } + + return $(r) ; +} + +# stagedir + +rule stagedir +{ + return [ path.make [ modules.peek boostcpp : BOOST_STAGE_LOCATE ] ] ; +} + +# stage-libdir + +rule stage-libdir +{ + local ld = [ MATCH --stage-libdir=(.*) : [ modules.peek : ARGV ] ] ; + + if $(ld) + { + ld = [ path.root [ path.make $(ld) ] [ path.pwd ] ] ; + return $(ld) ; + } + else + { + local stagedir = [ stagedir ] ; + return $(stagedir)/lib ; + } +} diff --git a/src/boost/tools/boost_install/boost-install.jam b/src/boost/tools/boost_install/boost-install.jam new file mode 100644 index 000000000..93d5965d3 --- /dev/null +++ b/src/boost/tools/boost_install/boost-install.jam @@ -0,0 +1,1339 @@ +# Copyright 2018-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +import modules ; +import boostcpp ; +import property-set ; +import "class" : new ; +import project ; +import common ; +import print ; +import os ; +import feature ; +import package ; +import sequence ; +import set ; +import type ; +import path ; +import regex ; +import ./boost-install-dirs ; + +feature.feature library-type : : free ; +feature.feature boost-install.dependency : : free ; +feature.feature boost-install.cmakedir : : free ; +feature.feature boost-install.includedir : : free ; +feature.feature boost-install.libdir : : free ; +feature.feature boost-install.lib-target-type : : free ; +feature.feature boost-install.dll-target : : free ; + +if "--verbose" in [ modules.peek : ARGV ] +{ + .info-enabled = 1 ; +} + +if "--debug-boost-install" in [ modules.peek : ARGV ] +{ + .debug-enabled = 1 ; +} + +local rule .info ( messages * ) +{ + if $(.info-enabled) + { + ECHO "info:" $(messages) ; + } +} + +local rule .debug ( messages * ) +{ + if $(.debug-enabled) + { + ECHO "boost-install:" $(messages) ; + } +} + +# generate-cmake-variant- + +local rule remap-library ( lib ) +{ + switch $(lib) + { + case "python.lib" : + + return ; + + case "zlib" : + + return "z" ; + + case "bzip2" : + + return "bz2" ; + + case "icudt" : + + return "icudata" ; + + case "icuin" : + + return "icui18n" ; + + case * : + + return $(lib) ; + } +} + +rule generate-cmake-variant- ( target : sources * : properties * ) +{ + .info generate-cmake-variant- $(target) ":" $(sources) ; + + local ps = [ property-set.create $(properties) ] ; + + print.output $(target) ; + + local version = [ $(ps).get ] ; + .info " version=" $(version) ; + + local name = [ $(ps).get ] ; + .info " name=" $(name) ; + + local variant = [ $(ps).get ] ; + .info " variant=" $(variant) ; + + local link = [ $(ps).get ] ; + .info " link= " $(link) ; + + local runtime-link = [ $(ps).get ] ; + .info " runtime-link=" $(runtime-link) ; + + local runtime-debugging = [ $(ps).get ] ; + .info " runtime-debugging=" $(runtime-debugging) ; + + local threading = [ $(ps).get ] ; + .info " threading=" $(threading) ; + + local address-model = [ $(ps).get ] ; + .info " address-model=" $(address-model) ; + + local toolset = [ MATCH ^-(.*) : [ common.format-name : "" : "" : $(ps) ] ] ; + .info " toolset=" $(toolset) ; + + local fname = $(sources[1]:BS) ; + .info " fname=" $(fname) ; + + local layout = [ modules.peek boostcpp : layout ] ; + .info " layout=" $(layout) ; + + print.text + + "# Generated by Boost $(version)" + "" + : true ; + + print.text "# address-model=$(address-model)" "" : true ; + + if $(address-model) = 32 + { + print.text + + "if(CMAKE_SIZEOF_VOID_P EQUAL 8)" + " _BOOST_SKIPPED(\"$(fname)\" \"32 bit, need 64\")" + " return()" + "endif()" + "" + : true ; + } + else + { + print.text + + "if(CMAKE_SIZEOF_VOID_P EQUAL 4)" + " _BOOST_SKIPPED(\"$(fname)\" \"64 bit, need 32\")" + " return()" + "endif()" + "" + : true ; + } + + local python ; + + local relevant = [ $(ps).get ] ; + relevant = [ feature.expand-relevant $(relevant) ] ; + + if python in $(relevant) + { + python = [ $(ps).get ] ; + } + + if $(python) + { + .info " python=" $(python) ; + + print.text "# python=$(python)" "" : true ; + + print.text + + "if(Boost_PYTHON_VERSION)" + " string(REGEX REPLACE \"([0-9]+[.][0-9]+)([.].*)?\" \"\\\\1\" __boost_pyver ${Boost_PYTHON_VERSION})" + " if(NOT __boost_pyver VERSION_EQUAL \"$(python)\")" + " _BOOST_SKIPPED(\"$(fname)\" \"$(python), Boost_PYTHON_VERSION=${Boost_PYTHON_VERSION}\")" + " return()" + " endif()" + "endif()" + "" + "if(Boost_PYTHON_VERSION_MAJOR)" + " if(NOT \"$(python)\" MATCHES \"^${Boost_PYTHON_VERSION_MAJOR}[.]\")" + " _BOOST_SKIPPED(\"$(fname)\" \"$(python), Boost_PYTHON_VERSION_MAJOR=${Boost_PYTHON_VERSION_MAJOR}\")" + " return()" + " endif()" + "endif()" + "" + : true ; + } + + print.text "# layout=$(layout)" "" : true ; + + print.text "# toolset=$(toolset)" "" : true ; + + if $(layout) = versioned + { + print.text + + "if(Boost_COMPILER)" + " if(NOT Boost_COMPILER STREQUAL \"$(toolset)\" AND NOT Boost_COMPILER STREQUAL \"-$(toolset)\")" + " _BOOST_SKIPPED(\"$(fname)\" \"$(toolset), Boost_COMPILER=${Boost_COMPILER}\")" + " return()" + " endif()" + "else()" + " if(BOOST_DETECTED_TOOLSET AND NOT BOOST_DETECTED_TOOLSET STREQUAL \"$(toolset)\")" + " _BOOST_SKIPPED(\"$(fname)\" \"$(toolset), detected ${BOOST_DETECTED_TOOLSET}, set Boost_COMPILER to override\")" + " return()" + " endif()" + "endif()" + "" + : true ; + } + + print.text "# link=$(link)" "" : true ; + + if $(link) = static + { + print.text + + "if(DEFINED Boost_USE_STATIC_LIBS)" + " if(NOT Boost_USE_STATIC_LIBS)" + " _BOOST_SKIPPED(\"$(fname)\" \"static, Boost_USE_STATIC_LIBS=${Boost_USE_STATIC_LIBS}\")" + " return()" + " endif()" + "else()" + " if(NOT WIN32 AND NOT _BOOST_SINGLE_VARIANT)" + " _BOOST_SKIPPED(\"$(fname)\" \"static, default is shared, set Boost_USE_STATIC_LIBS=ON to override\")" + " return()" + " endif()" + "endif()" + "" + : true ; + } + else + { + print.text + + "if(DEFINED Boost_USE_STATIC_LIBS)" + " if(Boost_USE_STATIC_LIBS)" + " _BOOST_SKIPPED(\"$(fname)\" \"shared, Boost_USE_STATIC_LIBS=${Boost_USE_STATIC_LIBS}\")" + " return()" + " endif()" + "else()" + " if(WIN32 AND NOT _BOOST_SINGLE_VARIANT)" + " _BOOST_SKIPPED(\"$(fname)\" \"shared, default on Windows is static, set Boost_USE_STATIC_LIBS=OFF to override\")" + " return()" + " endif()" + "endif()" + "" + : true ; + } + + print.text "# runtime-link=$(runtime-link)" "" : true ; + + if $(runtime-link) = static + { + print.text + + "if(NOT Boost_USE_STATIC_RUNTIME)" + " _BOOST_SKIPPED(\"$(fname)\" \"static runtime, Boost_USE_STATIC_RUNTIME not ON\")" + " return()" + "endif()" + "" + : true ; + } + else + { + print.text + + "if(Boost_USE_STATIC_RUNTIME)" + " _BOOST_SKIPPED(\"$(fname)\" \"shared runtime, Boost_USE_STATIC_RUNTIME=${Boost_USE_STATIC_RUNTIME}\")" + " return()" + "endif()" + "" + : true ; + } + + print.text "# runtime-debugging=$(runtime-debugging)" "" : true ; + + if $(runtime-debugging) = "on" + { + print.text + + "if(NOT \"${Boost_USE_DEBUG_RUNTIME}\" STREQUAL \"\" AND NOT Boost_USE_DEBUG_RUNTIME)" + " _BOOST_SKIPPED(\"$(fname)\" \"debug runtime, Boost_USE_DEBUG_RUNTIME=${Boost_USE_DEBUG_RUNTIME}\")" + " return()" + "endif()" + "" + : true ; + } + else + { + print.text + + "if(Boost_USE_DEBUG_RUNTIME)" + " _BOOST_SKIPPED(\"$(fname)\" \"release runtime, Boost_USE_DEBUG_RUNTIME=${Boost_USE_DEBUG_RUNTIME}\")" + " return()" + "endif()" + "" + : true ; + } + + print.text "# threading=$(threading)" "" : true ; + + if $(layout) != system + { + if $(threading) = "multi" + { + print.text + + "if(DEFINED Boost_USE_MULTITHREADED AND NOT Boost_USE_MULTITHREADED)" + " _BOOST_SKIPPED(\"$(fname)\" \"multithreaded, Boost_USE_MULTITHREADED=${Boost_USE_MULTITHREADED}\")" + " return()" + "endif()" + "" + : true ; + } + else + { + print.text + + "if(NOT DEFINED Boost_USE_MULTITHREADED)" + " _BOOST_SKIPPED(\"$(fname)\" \"single-threaded, Boost_USE_MULTITHREADED is not set and defaults to ON, set to OFF to override\")" + " return()" + "endif()" + "" + "if(Boost_USE_MULTITHREADED)" + " _BOOST_SKIPPED(\"$(fname)\" \"single-threaded, Boost_USE_MULTITHREADED=${Boost_USE_MULTITHREADED}\")" + " return()" + "endif()" + "" + : true ; + } + } + + print.text "# variant=$(variant)" "" : true ; + + if $(variant) = debug + { + print.text + + "if(NOT \"${Boost_USE_DEBUG_LIBS}\" STREQUAL \"\" AND NOT Boost_USE_DEBUG_LIBS)" + " _BOOST_SKIPPED(\"$(fname)\" \"debug, Boost_USE_DEBUG_LIBS=${Boost_USE_DEBUG_LIBS}\")" + " return()" + "endif()" + "" + : true ; + } + else + { + print.text + + "if(NOT \"${Boost_USE_RELEASE_LIBS}\" STREQUAL \"\" AND NOT Boost_USE_RELEASE_LIBS)" + " _BOOST_SKIPPED(\"$(fname)\" \"release, Boost_USE_RELEASE_LIBS=${Boost_USE_RELEASE_LIBS}\")" + " return()" + "endif()" + "" + : true ; + } + + print.text + + "if(Boost_VERBOSE OR Boost_DEBUG)" + " message(STATUS \" [x] $(fname)\")" + "endif()" + "" + : true ; + + if $(python) + { + print.text + + "if(NOT Boost_PYTHON_VERSION)" + " if(Boost_DEBUG)" + " message(STATUS \" Setting Boost_PYTHON_VERSION to $(python)\")" + " endif()" + " set(Boost_PYTHON_VERSION \"$(python)\")" + "endif()" + "" + : true ; + } + + local lname = [ MATCH boost_(.*) : $(name) ] ; + .info " lname=" $(lname) ; + + local target = "Boost::$(lname)" ; + .info " target=" $(target) ; + + print.text + + "# Create imported target $(target)" + "" + "if(NOT TARGET $(target))" + " add_library($(target) $(link:U) IMPORTED)" + "" + " set_target_properties($(target) PROPERTIES" + " INTERFACE_INCLUDE_DIRECTORIES \"\${_BOOST_INCLUDEDIR}\"" + " INTERFACE_COMPILE_DEFINITIONS \"BOOST_$(lname:U)_NO_LIB\"" + " )" + "endif()" + "" + : true ; + + print.text "# Target file name: $(fname)" "" : true ; + + local lib-target-type = [ $(ps).get ] ; + .info " lib-target-type=" $(lib-target-type) ; + + local loc-prop = LOCATION ; + + if $(lib-target-type) = IMPORT_LIB + { + loc-prop = IMPLIB ; + } + + .info " loc-prop=" $(loc-prop) ; + + local dll-target = [ $(ps).get ] ; + + local dll-name ; + + if $(dll-target) + { + dll-name = [ $(dll-target).name ] ; + } + + .info " dll-name=" $(dll-name) ; + + print.text + + "get_target_property(__boost_imploc $(target) IMPORTED_$(loc-prop)_$(variant:U))" + "if(__boost_imploc)" + " message(SEND_ERROR \"Target $(target) already has an imported location '${__boost_imploc}', which is being overwritten with '${_BOOST_LIBDIR}/$(fname)'\")" + "endif()" + "unset(__boost_imploc)" + "" + "set_property(TARGET $(target) APPEND PROPERTY IMPORTED_CONFIGURATIONS $(variant:U))" + "" + "set_target_properties($(target) PROPERTIES" + " IMPORTED_LINK_INTERFACE_LANGUAGES_$(variant:U) CXX" + " IMPORTED_$(loc-prop)_$(variant:U) \"${_BOOST_LIBDIR}/$(fname)\"" + " )" + "" + : true ; + + if $(lib-target-type) = IMPORT_LIB + { + print.text + + "set_target_properties($(target) PROPERTIES" + " IMPORTED_LOCATION_$(variant:U) \"${_BOOST_LIBDIR}/$(dll-name)\"" + " )" + "" + : true ; + } + + if $(variant) = release + { + print.text + + "set_target_properties($(target) PROPERTIES" + " MAP_IMPORTED_CONFIG_MINSIZEREL Release" + " MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release" + " )" + "" + : true ; + } + + if $(link) = shared + { + print.text + + "set_property(TARGET $(target) APPEND" + " PROPERTY INTERFACE_COMPILE_DEFINITIONS \"BOOST_$(lname:U)_DYN_LINK\"" + " )" + "" + : true ; + } + + local deps = [ MATCH "boost_(.*)" : [ $(ps).get ] ] headers ; + .info " deps=" $(deps) ; + + if $(deps) + { + print.text + + "list(APPEND _BOOST_$(lname:U)_DEPS $(deps:S=:J= ))" + "" + : true ; + } + + local deps2 = [ set.difference [ $(ps).get ] : boost_$(deps) ] ; + .info " deps2=" $(deps2) ; + + local deps3 ; + + for local dep in $(deps2) + { + deps3 += [ remap-library $(dep) ] ; + } + + .info " deps3=" $(deps3) ; + + if $(deps3) && $(link) = static + { + print.text + + "if(CMAKE_CONFIGURATION_TYPES)" + " set_property(TARGET $(target) APPEND PROPERTY INTERFACE_LINK_LIBRARIES" + " \"$<$:$(deps3:J=;)>\")" + "else()" + " set_property(TARGET $(target) APPEND PROPERTY INTERFACE_LINK_LIBRARIES" + " $(deps3:J= ))" + "endif()" + "" + : true ; + } +} + +actions generate-cmake-variant- +{ +} + +# tag + +local rule tag ( name : type ? : property-set ) +{ + .debug tag $(name) ; + + local link = [ $(property-set).get ] ; + .debug " link=" $(link) ; + + local python = ; + + local relevant = [ $(property-set).get ] ; + relevant = [ feature.expand-relevant $(relevant) ] ; + + if python in $(relevant) + { + python = [ $(property-set).get ] ; + .debug " python=" $(python) ; + } + + local r = [ boostcpp.tag $(name) : STATIC_LIB : $(property-set) ] ; + + r = $(r:S=$(name:S)) ; + r = $(r:B=$(r:B)-$(link)) ; + + if $(python) + { + r = $(r:B=$(r:B)-py$(python)) ; + } + + .debug " result=" $(r) ; + + return $(r) ; +} + +# choose-lib-target: get the import library, if present, the +# shared/static library otherwise, ignore .pdb et al + +local rule choose-lib-target ( sources * ) +{ + local result ; + + for local t in $(sources) + { + if [ type.is-derived [ $(t).type ] IMPORT_LIB ] + { + return $(t) ; + } + else if [ type.is-derived [ $(t).type ] LIB ] + { + result = $(t) ; + } + } + + return $(result) ; +} + +local rule get-dll-target ( sources * ) +{ + for local t in $(sources) + { + if [ type.is-derived [ $(t).type ] SHARED_LIB ] + { + return $(t) ; + } + } +} + +# get-dependency-names: Returns the base names of all +# dependency libraries. +# +local rule get-dependency-names ( sources * ) +{ + local all-targets = [ collect-targets $(sources) ] ; + local lib-names ; + for local t in [ set.difference $(all-targets) : $(sources) ] + { + if [ $(t).type ] && [ type.is-derived [ $(t).type ] LIB ] + { + # Get back the original unmangled name of the library + local subvariant = [ $(t).creating-subvariant ] ; + local main-target = [ $(subvariant).main-target ] ; + lib-names += [ $(main-target).name ] ; + } + } + return [ sequence.unique $(lib-names) ] ; +} + +# generate-cmake-variant + +rule generate-cmake-variant ( project name : property-set : sources * ) +{ + .debug generate-cmake-variant $(name) ; + + for local s in $(sources) + { + .debug " name=" [ $(s).name ] ; + } + + local lib-target = [ choose-lib-target $(sources) ] ; + + local dll-target = [ get-dll-target $(sources) ] ; + + local other-names = [ get-dependency-names $(sources) ] ; + property-set = [ $(property-set).add-raw $(other-names) ] ; + + local result ; + + if $(lib-target) + { + .debug " lib-target=" [ $(lib-target).name ] ; + + local lib-target-type = [ $(lib-target).type ] ; + + .debug " lib-target-type=" $(lib-target-type) ; + + if $(dll-target) + { + .debug " dll-target=" [ $(dll-target).name ] ; + } + + local tag = [ tag $(name) : : $(property-set) ] ; + + property-set = [ $(property-set).add-raw $(lib-target-type) ] ; + property-set = [ $(property-set).add-raw $(dll-target) ] ; + + local a = [ new non-scanning-action $(lib-target) : boost-install.generate-cmake-variant- : $(property-set) ] ; + + result += [ new file-target $(tag) : : $(project) : $(a) ] ; + } + + # The result is an optional property set, the usage requirements, + # followed by a list of targets. When the list is empty, we need + # to include the property set, to avoid a warning. + + return [ property-set.empty ] $(result) ; +} + +# generate-cmake-config- + +local rule path-native-fwd ( path ) +{ + path = [ path.native $(path) ] ; + + if [ os.name ] = NT + { + path = $(path:T) ; + } + + return $(path) ; +} + +local rule get-dir ( name : dir ) +{ + if [ path.is-rooted $(dir) ] + { + dir = [ path-native-fwd $(dir) ] ; + + print.text + + "set($(name) \"$(dir)\")" + + : true ; + } + else + { + print.text + + "get_filename_component($(name) \"${_BOOST_CMAKEDIR}/$(dir)/\" ABSOLUTE)" + + : true ; + } +} + +rule generate-cmake-config- ( target : sources * : properties * ) +{ + .info generate-cmake-config- $(target) ":" $(sources) ; + + local ps = [ property-set.create $(properties) ] ; + + print.output $(target) ; + + local version = [ $(ps).get ] ; + .info " version=" $(version) ; + + local name = [ $(ps).get ] ; + .info " name=" $(name) ; + + local library-type = [ $(ps).get ] ; + .info " library-type=" $(library-type) ; + + local cmakedir = [ $(ps).get ] ; + .info " cmakedir=" $(cmakedir) ; + + local includedir = [ $(ps).get ] ; + .info " includedir=" $(includedir) ; + + local libdir = [ $(ps).get ] ; + .info " libdir=" $(libdir) ; + + local lname = [ MATCH boost_(.*) : $(name) ] ; + .info " lname=" $(lname) ; + + local ltarget = "Boost::$(lname)" ; + .info " ltarget=" $(ltarget) ; + + print.output $(target) ; + + print.text + + "# Generated by Boost $(version)" + "" + "if(TARGET $(ltarget))" + " return()" + "endif()" + "" + "if(Boost_VERBOSE OR Boost_DEBUG)" + " message(STATUS \"Found $(name) ${$(name)_VERSION} at ${$(name)_DIR}\")" + "endif()" + "" + "mark_as_advanced($(name)_DIR)" + "" + "# Compute the include and library directories relative to this file." + "" + "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)" + : true ; + + if [ path.is-rooted $(cmakedir) ] + { + local cmakedir-native = [ path-native-fwd $(cmakedir) ] ; + + print.text + + "" + "# If the computed and the original directories are symlink-equivalent, use original" + "if(EXISTS \"$(cmakedir-native)\")" + " get_filename_component(_BOOST_CMAKEDIR_ORIGINAL \"$(cmakedir-native)\" REALPATH)" + " if(_BOOST_CMAKEDIR STREQUAL _BOOST_CMAKEDIR_ORIGINAL)" + " set(_BOOST_CMAKEDIR \"$(cmakedir-native)\")" + " endif()" + " unset(_BOOST_CMAKEDIR_ORIGINAL)" + "endif()" + "" + : true ; + } + + get-dir "_BOOST_INCLUDEDIR" : $(includedir) ; + + if $(library-type) = INTERFACE + { + print.text + + "" + "add_library($(ltarget) INTERFACE IMPORTED)" + "" + "set_target_properties($(ltarget) PROPERTIES" + " INTERFACE_INCLUDE_DIRECTORIES \"\${_BOOST_INCLUDEDIR}\"" + ")" + "" + "unset(_BOOST_INCLUDEDIR)" + "unset(_BOOST_CMAKEDIR)" + "" + : true ; + } + else + { + get-dir "_BOOST_LIBDIR" : $(libdir) ; + + print.text + + "" + "include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-$(version).cmake)" + "" + "if(Boost_DEBUG)" + " message(STATUS \"Scanning ${CMAKE_CURRENT_LIST_DIR}/lib$(name)-variant*.cmake\")" + "endif()" + "" + "file(GLOB __boost_variants \"${CMAKE_CURRENT_LIST_DIR}/lib$(name)-variant*.cmake\")" + "" + "macro(_BOOST_SKIPPED fname reason)" + " if(Boost_VERBOSE OR Boost_DEBUG)" + " message(STATUS \" [ ] ${fname}\")" + " endif()" + " list(APPEND __boost_skipped \"${fname} (${reason})\")" + "endmacro()" + "" + "list(LENGTH __boost_variants _BOOST_SINGLE_VARIANT)" + "if(NOT _BOOST_SINGLE_VARIANT EQUAL 1)" + " set(_BOOST_SINGLE_VARIANT 0)" + "endif()" + "" + "foreach(f IN LISTS __boost_variants)" + " if(Boost_DEBUG)" + " message(STATUS \" Including ${f}\")" + " endif()" + " include(${f})" + "endforeach()" + "" + "unset(_BOOST_SINGLE_VARIANT)" + "unset(_BOOST_LIBDIR)" + "unset(_BOOST_INCLUDEDIR)" + "unset(_BOOST_CMAKEDIR)" + "" + "if(NOT __boost_variants AND (Boost_VERBOSE OR Boost_DEBUG))" + " message(STATUS \" Library has no variants and is considered not found\")" + "endif()" + "" + "if(NOT TARGET $(ltarget))" + " set(__boost_message \"No suitable build variant has been found.\")" + " if(__boost_skipped)" + " set(__boost_message \"${__boost_message}\\nThe following variants have been tried and rejected:\")" + " foreach(s IN LISTS __boost_skipped)" + " set(__boost_message \"${__boost_message}\\n* ${s}\")" + " endforeach()" + " endif()" + " set($(name)_FOUND 0)" + " set($(name)_NOT_FOUND_MESSAGE ${__boost_message})" + " unset(__boost_message)" + " unset(__boost_skipped)" + " unset(__boost_variants)" + " unset(_BOOST_$(lname:U)_DEPS)" + " return()" + "endif()" + "" + "unset(__boost_skipped)" + "unset(__boost_variants)" + "" + "if(_BOOST_$(lname:U)_DEPS)" + " list(REMOVE_DUPLICATES _BOOST_$(lname:U)_DEPS)" + " if(Boost_VERBOSE OR Boost_DEBUG)" + " message(STATUS \"Adding $(name) dependencies: ${_BOOST_$(lname:U)_DEPS}\")" + " endif()" + "endif()" + "" + "foreach(dep_$(name) IN LISTS _BOOST_$(lname:U)_DEPS") + " set(_BOOST_QUIET)" + " if($(name)_FIND_QUIETLY)" + " set(_BOOST_QUIET QUIET)" + " endif()" + " set(_BOOST_REQUIRED)" + " if($(name)_FIND_REQUIRED)" + " set(_BOOST_REQUIRED REQUIRED)" + " endif()" + " get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" ABSOLUTE)" + " find_package(boost_${dep_$(name)} $(version) EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})" + " set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_$(name)})" + " unset(_BOOST_QUIET)" + " unset(_BOOST_REQUIRED)" + " unset(_BOOST_CMAKEDIR)" + " if(NOT boost_${dep_$(name)}_FOUND)" + " set($(name)_FOUND 0)" + " set($(name)_NOT_FOUND_MESSAGE \"A required dependency, boost_${dep_$(name)}, has not been found.\")" + " unset(_BOOST_$(lname:U)_DEPS)" + " return()" + " endif()" + "endforeach()" + "" + "unset(_BOOST_$(lname:U)_DEPS)" + "" + : true ; + + if $(name) = boost_thread + { + print.text + + "include(CMakeFindDependencyMacro)" + "find_dependency(Threads)" + "set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)" + "" + : true ; + } + + if $(name) = boost_mpi + { + print.text + + "include(CMakeFindDependencyMacro)" + "find_dependency(MPI)" + "" + "if(MPI_CXX_FOUND AND NOT TARGET MPI::MPI_CXX)" + " if(MPI_CXX_COMPILE_FLAGS)" + " set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_COMPILE_OPTIONS \"${MPI_CXX_COMPILE_FLAGS}\")" + " endif()" + " if(MPI_CXX_INCLUDE_PATH)" + " set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES \"${MPI_CXX_INCLUDE_PATH}\")" + " endif()" + " if(MPI_CXX_LINK_FLAGS)" + " set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_LINK_OPTIONS \"SHELL:${MPI_CXX_LINK_FLAGS}\")" + " endif()" + " if(MPI_CXX_LIBRARIES)" + " set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_LINK_LIBRARIES \"${MPI_CXX_LIBRARIES}\")" + " endif()" + "else()" + " set_property(TARGET $(ltarget) APPEND PROPERTY INTERFACE_LINK_LIBRARIES MPI::MPI_CXX)" + "endif()" + "" + : true ; + } + } +} + +actions generate-cmake-config- +{ +} + +# generate-cmake-config + +rule generate-cmake-config ( project name : property-set : sources * ) +{ + .debug generate-cmake-config $(name) ; + + local pname = [ $(property-set).get ] ; + local version = [ $(property-set).get ] ; + local location = [ $(property-set).get ] ; + local library-type = [ $(property-set).get ] ; + local cmakedir = [ $(property-set).get ] ; + local includedir = [ $(property-set).get ] ; + local libdir = [ $(property-set).get ] ; + + local ps = [ property-set.create + $(pname) $(version) $(location) + $(library-type) + $(cmakedir) + $(includedir) + $(libdir) ] ; + + local result ; + + local a = [ new non-scanning-action : boost-install.generate-cmake-config- : $(ps) ] ; + + result += [ new file-target $(name) : : $(project) : $(a) ] ; + + return $(result) ; +} + +# generate-cmake-config-version- + +rule generate-cmake-config-version- ( target : sources * : properties * ) +{ + .info generate-cmake-config-version- $(target) ":" $(sources) ; + + local ps = [ property-set.create $(properties) ] ; + + print.output $(target) ; + + local version = [ $(ps).get ] ; + .info " version=" $(version) ; + + print.output $(target) ; + + print.text + + "# Generated by Boost $(version)" + "" + "set(PACKAGE_VERSION $(version))" + "" + "if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)" + " set(PACKAGE_VERSION_COMPATIBLE FALSE)" + "else()" + " set(PACKAGE_VERSION_COMPATIBLE TRUE)" + " if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)" + " set(PACKAGE_VERSION_EXACT TRUE)" + " endif()" + "endif()" + "" + : true ; +} + +actions generate-cmake-config-version- +{ +} + +# generate-cmake-config-version + +rule generate-cmake-config-version ( project name : property-set : sources * ) +{ + .debug generate-cmake-config-version $(name) ; + + local pname = [ $(property-set).get ] ; + local version = [ $(property-set).get ] ; + local location = [ $(property-set).get ] ; + + local ps = [ property-set.create $(pname) $(version) $(location) ] ; + + local result ; + + local a = [ new non-scanning-action : boost-install.generate-cmake-config-version- : $(ps) ] ; + + result += [ new file-target $(name) : : $(project) : $(a) ] ; + + return $(result) ; +} + +# install-cmake-config- + +local rule install-cmake-config- ( install-or-stage : location : includedir : libdir : version : name ) +{ + #.debug install-cmake-config- $(name) ; + + local r ; + + if [ MATCH boost_(.*) : $(name) ] + { + local loc = $(location)/$(name)-$(version) ; + + local library-type = UNKNOWN ; + + if $(name) = boost_headers || $(name) = boost_math || $(name) = boost_exception + { + library-type = INTERFACE ; + } + + local reqs = $(name) $(version) $(library-type) $(location) $(includedir) $(libdir) ; + + r += [ generate $(install-or-stage)/$(name)-config.cmake : $(name) : @boost-install%generate-cmake-config $(reqs) ] ; + r += [ install $(install-or-stage)-$(name)-config.cmake : $(install-or-stage)/$(name)-config.cmake : $(loc) ] ; + + r += [ generate $(install-or-stage)/$(name)-config-version.cmake : $(name) : @boost-install%generate-cmake-config-version $(reqs) ] ; + r += [ install $(install-or-stage)-$(name)-config-version.cmake : $(install-or-stage)/$(name)-config-version.cmake : $(loc) ] ; + + if $(library-type) != INTERFACE + { + local v = [ generate $(install-or-stage)/$(name)-variant.cmake : $(name) : @boost-install%generate-cmake-variant $(reqs) ] ; + r += $(v) ; + r += [ install $(install-or-stage)-$(name)-config-variant.cmake : $(v) : $(loc) ] ; + } + } + else + { + .info "target '$(name)' not prefixed by 'boost_', omitting CMake config" ; + } + + return $(r) ; +} + +# install-or-stage-cmake-config +# +# includedir, libdir, cmakedir should be in canonical path.make format + +rule install-or-stage-cmake-config ( name * : install-or-stage : includedir : libdir : cmakedir ) +{ + local p = [ project.current ] ; + + if "--no-cmake-config" in [ modules.peek : ARGV ] + { + alias $(install-or-stage)-cmake-config ; + $(p).mark-target-as-explicit $(install-or-stage)-cmake-config ; + } + else + { + includedir = [ path.relative-to $(cmakedir) $(includedir) ] ; + libdir = [ path.relative-to $(cmakedir) $(libdir) ] ; + + local BOOST_VERSION = [ modules.peek boostcpp : BOOST_VERSION ] ; + + local configs ; + + for local nm in $(name) + { + configs += [ install-cmake-config- $(install-or-stage) : $(cmakedir) : $(includedir) : $(libdir) : $(BOOST_VERSION) : $(nm) ] ; + } + + # Target install/stage-detect-toolset + + local boost-install-dir = [ modules.binding $(__name__) ] ; + boost-install-dir = $(boost-install-dir:D) ; + + install $(install-or-stage)-detect-toolset : $(boost-install-dir)/BoostDetectToolset.cmake : $(cmakedir) BoostDetectToolset-$(BOOST_VERSION).cmake ; + $(p).mark-target-as-explicit $(install-or-stage)-detect-toolset ; + + # Target install/stage-boost-config + + install $(install-or-stage)-boost-config : $(boost-install-dir)/BoostConfig.cmake : $(cmakedir)/Boost-$(BOOST_VERSION) ; + $(p).mark-target-as-explicit $(install-or-stage)-boost-config ; + + # Target install/stage-boost-config-version + + project.load [ path.make $(boost-install-dir) ] ; + + install $(install-or-stage)-boost-config-version : /boost/tools/boost_install//BoostConfigVersion.cmake : $(cmakedir)/Boost-$(BOOST_VERSION) ; + $(p).mark-target-as-explicit $(install-or-stage)-boost-config-version ; + + # Target install/stage-cmake-config + + alias $(install-or-stage)-cmake-config : $(configs) $(install-or-stage)-detect-toolset $(install-or-stage)-boost-config $(install-or-stage)-boost-config-version ; + $(p).mark-target-as-explicit $(install-or-stage)-cmake-config ; + } +} + +# install-cmake-config + +rule install-cmake-config ( name * ) +{ + #.debug install-cmake-config $(name) ; + + local includedir = [ boost-install-dirs.includedir ] ; + local libdir = [ boost-install-dirs.libdir ] ; + local cmakedir = [ boost-install-dirs.cmakedir ] ; + local header-subdir = [ boost-install-dirs.header-subdir ] ; + + if $(header-subdir) + { + includedir = $(includedir)/$(header-subdir) ; + } + + install-or-stage-cmake-config $(name) : install : $(includedir) : $(libdir) : $(cmakedir) ; +} + +rule stage-cmake-config ( name * ) +{ + local includedir = [ path.make [ modules.peek boostcpp : BOOST_ROOT ] ] ; + local libdir = [ boost-install-dirs.stage-libdir ] ; + local cmakedir = $(libdir)/cmake ; + + install-or-stage-cmake-config $(name) : stage : $(includedir) : $(libdir) : $(cmakedir) ; +} + +# stage-cmake-config + +# collect-targets: Returns the targets and all their dependencies. +# Copied from stage.jam +# TODO: Factor this out as a utility in virtal-target.jam + +rule collect-targets ( targets * ) +{ + # Find subvariants + local s ; + for local t in $(targets) + { + s += [ $(t).creating-subvariant ] ; + } + s = [ sequence.unique $(s) ] ; + + local result = [ new set ] ; + $(result).add $(targets) ; + + for local i in $(s) + { + $(i).all-referenced-targets $(result) ; + } + local result2 ; + for local r in [ $(result).list ] + { + if $(r:G) != + { + result2 += $(r:G=) ; + } + } + DELETE_MODULE $(result) ; + return [ sequence.unique $(result2) ] ; +} + +# get-dependency-projects: Returns all the projects of any dependency of the sources. + +rule get-dependency-projects ( sources * ) +{ + local result ; + for local t in [ collect-targets $(sources) ] + { + result += [ $(t).project ] ; + } + return [ sequence.unique $(result) ] ; +} + +# generate-dependencies: find and generate the stage and install targets +# corresponding to the source libraries. + +rule generate-dependencies ( project name ? : property-set : sources * ) +{ + local stage-targets ; + local stage-or-install = [ $(property-set).get ] ; + local excluded-projects = $(project) [ $(project).find /boost ] ; + for local p in [ get-dependency-projects $(sources) ] [ $(project).find /boost/headers ] + { + if ! ( $(p) in $(excluded-projects) ) + { + stage-targets += [ $(p).find $(stage-or-install) : no-error ] ; + } + } + local props = [ $(property-set).propagated ] ; + local result ; + local usage-requirements = [ property-set.empty ] ; + for local t in $(stage-targets) + { + local g = [ $(t).generate $(props) ] ; + usage-requirements = [ $(usage-requirements).add $(g[1]) ] ; + result += $(g[2-]) ; + } + return $(usage-requirements) $(result) ; +} + +# boost-install + +local rule install-stage-subdir ( properties * ) +{ + local ps = [ property-set.create $(properties) ] ; + + local r = [ boostcpp.tag boost : STATIC_LIB : $(ps) ] ; + + r = $(r:S=) ; + + local r2 = [ MATCH "lib(.*)" : $(r) ] ; + if $(r2) { r = $(r2) ; } + + local python = [ $(ps).get ] ; + + if $(python) + { + r = $(r:B=$(r:B)-python$(python)) ; + } + + return $(r) ; +} + +rule stage-subdir ( properties * ) +{ + local r = [ install-stage-subdir $(properties) ] ; + + local libdir = [ boost-install-dirs.stage-libdir ] ; + + return $(libdir)/$(r) ; +} + +rule install-subdir ( properties * ) +{ + local r = [ install-stage-subdir $(properties) ] ; + + local libdir = [ boost-install-dirs.libdir ] ; + + return $(libdir)/$(r) ; +} + +rule boost-install ( libraries * ) +{ + .debug boost-install $(libraries) ; + + local l2 = ; + local unprefixed = ; + + for local lib in $(libraries) + { + if [ MATCH boost_(.*) : $(lib) ] + { + l2 += $(lib) ; + } + else + { + unprefixed += $(lib) ; + } + } + + libraries = $(l2) ; + + # Target install + + local p = [ project.current ] ; + + local libdir = [ boost-install-dirs.libdir ] ; + local bindir = [ boost-install-dirs.bindir ] ; + + install install-libraries-static : $(libraries) : $(libdir) on STATIC_LIB ; + $(p).mark-target-as-explicit install-libraries-static ; + + alias install-libraries-shared : install-libraries-shared- ; + alias install-libraries-shared : install-libraries-shared-cygwin : cygwin ; + $(p).mark-target-as-explicit install-libraries-shared ; + + install install-libraries-shared- : $(libraries) : $(libdir) SHARED_LIB PDB on on ; + $(p).mark-target-as-explicit install-libraries-shared- ; + + install install-libraries-shared-cygwin : $(libraries) : $(bindir) SHARED_LIB PDB on on ; + $(p).mark-target-as-explicit install-libraries-shared-cygwin ; + + install install-unprefixed-static : $(unprefixed) : STATIC_LIB @boost-install%install-subdir ; + $(p).mark-target-as-explicit install-unprefixed-static ; + + install install-unprefixed-shared : $(unprefixed) : SHARED_LIB on @boost-install%install-subdir ; + $(p).mark-target-as-explicit install-unprefixed-shared ; + + install-cmake-config $(libraries) ; + + generate install-dependencies : $(libraries) : @boost-install%generate-dependencies install ; + $(p).mark-target-as-explicit install-dependencies ; + + alias install : install-libraries-static install-libraries-shared install-unprefixed-static install-unprefixed-shared install-cmake-config install-dependencies ; + $(p).mark-target-as-explicit install ; + + # Target stage + + local stage-libdir = [ boost-install-dirs.stage-libdir ] ; + + stage-cmake-config $(libraries) ; + + install stage-libraries-static : $(libraries) : $(stage-libdir) on STATIC_LIB ; + $(p).mark-target-as-explicit stage-libraries-static ; + + install stage-libraries-shared : $(libraries) : $(stage-libdir) on SHARED_LIB PDB on ; + $(p).mark-target-as-explicit stage-libraries-shared ; + + install stage-unprefixed-static : $(unprefixed) : STATIC_LIB @boost-install%stage-subdir ; + $(p).mark-target-as-explicit stage-unprefixed-static ; + + install stage-unprefixed-shared : $(unprefixed) : SHARED_LIB PDB on @boost-install%stage-subdir ; + $(p).mark-target-as-explicit stage-unprefixed-shared ; + + generate stage-dependencies : $(libraries) : @boost-install%generate-dependencies stage ; + $(p).mark-target-as-explicit stage-dependencies ; + + alias stage : stage-libraries-static stage-libraries-shared stage-unprefixed-static stage-unprefixed-shared stage-cmake-config stage-dependencies ; + $(p).mark-target-as-explicit stage ; +} diff --git a/src/boost/tools/boost_install/test/BoostVersion.cmake b/src/boost/tools/boost_install/test/BoostVersion.cmake new file mode 100644 index 000000000..da05e0329 --- /dev/null +++ b/src/boost/tools/boost_install/test/BoostVersion.cmake @@ -0,0 +1 @@ +set(BOOST_VERSION 1.79.0) diff --git a/src/boost/tools/boost_install/test/atomic/CMakeLists.txt b/src/boost/tools/boost_install/test/atomic/CMakeLists.txt new file mode 100644 index 000000000..842a81cc3 --- /dev/null +++ b/src/boost/tools/boost_install/test/atomic/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigAtomicTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS atomic ${BOOST_HINTS}) + +else() + + find_package(boost_atomic ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::atomic) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/atomic/quick.cpp b/src/boost/tools/boost_install/test/atomic/quick.cpp new file mode 100644 index 000000000..f9a3d1a4a --- /dev/null +++ b/src/boost/tools/boost_install/test/atomic/quick.cpp @@ -0,0 +1,45 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +struct X +{ + int u_; + int v_; + int w_; + + X(): u_( 0 ), v_( 0 ), w_( 0 ) + { + } + + X( int u, int v, int w ): u_( u ), v_( v ), w_( w ) + { + } +}; + +int main() +{ + boost::atomic a; + + a.store( X( 1, 2, 3 ) ); + X x1 = a.exchange( X( 4, 5, 6 ) ); + + BOOST_TEST_EQ( x1.u_, 1 ); + BOOST_TEST_EQ( x1.v_, 2 ); + BOOST_TEST_EQ( x1.w_, 3 ); + + X x2 = a.load(); + + BOOST_TEST_EQ( x2.u_, 4 ); + BOOST_TEST_EQ( x2.v_, 5 ); + BOOST_TEST_EQ( x2.w_, 6 ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/chrono/CMakeLists.txt b/src/boost/tools/boost_install/test/chrono/CMakeLists.txt new file mode 100644 index 000000000..ba067f37f --- /dev/null +++ b/src/boost/tools/boost_install/test/chrono/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigChronoTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS chrono ${BOOST_HINTS}) + +else() + + find_package(boost_chrono ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::chrono) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/chrono/quick.cpp b/src/boost/tools/boost_install/test/chrono/quick.cpp new file mode 100644 index 000000000..c5c0c0dda --- /dev/null +++ b/src/boost/tools/boost_install/test/chrono/quick.cpp @@ -0,0 +1,16 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +int main() +{ + std::cout << boost::chrono::system_clock::now() << std::endl; + std::cout << boost::chrono::steady_clock::now() << std::endl; +} diff --git a/src/boost/tools/boost_install/test/container/CMakeLists.txt b/src/boost/tools/boost_install/test/container/CMakeLists.txt new file mode 100644 index 000000000..c7cc7520c --- /dev/null +++ b/src/boost/tools/boost_install/test/container/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigContainerTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS container ${BOOST_HINTS}) + +else() + + find_package(boost_container ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::container) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/container/quick.cpp b/src/boost/tools/boost_install/test/container/quick.cpp new file mode 100644 index 000000000..08f2f62fe --- /dev/null +++ b/src/boost/tools/boost_install/test/container/quick.cpp @@ -0,0 +1,25 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +int main() +{ + boost::container::pmr::vector_of::type v; + + v.push_back( 1 ); + v.push_back( 2 ); + + BOOST_TEST_EQ( v.size(), 2 ); + + BOOST_TEST_EQ( v[0], 1 ); + BOOST_TEST_EQ( v[1], 2 ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/filesystem/CMakeLists.txt b/src/boost/tools/boost_install/test/filesystem/CMakeLists.txt new file mode 100644 index 000000000..a24bd50a1 --- /dev/null +++ b/src/boost/tools/boost_install/test/filesystem/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright 2018-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigFilesystemTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_ALL_COMPONENTS) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED ALL ${BOOST_HINTS}) + +elseif(USE_ALL_COMPONENTS_CONFIG) + + find_package(Boost ${BOOST_VERSION} EXACT CONFIG REQUIRED ALL ${BOOST_HINTS}) + +elseif(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS filesystem ${BOOST_HINTS}) + +else() + + find_package(boost_filesystem ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::filesystem) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/filesystem/quick.cpp b/src/boost/tools/boost_install/test/filesystem/quick.cpp new file mode 100644 index 000000000..76f2d7ab3 --- /dev/null +++ b/src/boost/tools/boost_install/test/filesystem/quick.cpp @@ -0,0 +1,24 @@ + +// Copyright 2017 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +// See library home page at http://www.boost.org/libs/filesystem + +#include +#include + +namespace fs = boost::filesystem; + +int main() +{ + fs::path p1( "a" ); + fs::path p2 = p1 / "b"; + + BOOST_TEST_EQ( p2, "a/b" ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/headers/CMakeLists.txt b/src/boost/tools/boost_install/test/headers/CMakeLists.txt new file mode 100644 index 000000000..25f9a1db2 --- /dev/null +++ b/src/boost/tools/boost_install/test/headers/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.2) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigHeadersTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +find_package(Boost ${BOOST_VERSION} EXACT REQUIRED ${BOOST_HINTS}) + +# Using `include_directories` is bad practice, done here for +# testing purposes. The right, "modern CMake", thing to do is +# `target_link_libraries(main Boost::headers)`. + +include_directories(${Boost_INCLUDE_DIRS}) + +add_executable(main quick.cpp) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/headers/quick.cpp b/src/boost/tools/boost_install/test/headers/quick.cpp new file mode 100644 index 000000000..28b35f179 --- /dev/null +++ b/src/boost/tools/boost_install/test/headers/quick.cpp @@ -0,0 +1,10 @@ +// Copyright 2019 Peter Dimov +// Distributed under the Boost Software License, Version 1.0 +// http://www.boost.org/LICENSE_1_0.txt + +#include + +int main() +{ + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/iostreams/CMakeLists.txt b/src/boost/tools/boost_install/test/iostreams/CMakeLists.txt new file mode 100644 index 000000000..1009a8459 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigIostreamsTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS iostreams ${BOOST_HINTS}) + +else() + + find_package(boost_iostreams ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(test_gzip test_gzip.cpp) +target_link_libraries(test_gzip Boost::iostreams) + +add_executable(test_bzip2 test_bzip2.cpp) +target_link_libraries(test_bzip2 Boost::iostreams) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(NAME test_gzip COMMAND test_gzip WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +add_test(NAME test_bzip2 COMMAND test_bzip2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/CHANGES b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/CHANGES new file mode 100644 index 000000000..30afead25 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/CHANGES @@ -0,0 +1,356 @@ + ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ + + +0.9.0 +~~~~~ +First version. + + +0.9.0a +~~~~~~ +Removed 'ranlib' from Makefile, since most modern Unix-es +don't need it, or even know about it. + + +0.9.0b +~~~~~~ +Fixed a problem with error reporting in bzip2.c. This does not effect +the library in any way. Problem is: versions 0.9.0 and 0.9.0a (of the +program proper) compress and decompress correctly, but give misleading +error messages (internal panics) when an I/O error occurs, instead of +reporting the problem correctly. This shouldn't give any data loss +(as far as I can see), but is confusing. + +Made the inline declarations disappear for non-GCC compilers. + + +0.9.0c +~~~~~~ +Fixed some problems in the library pertaining to some boundary cases. +This makes the library behave more correctly in those situations. The +fixes apply only to features (calls and parameters) not used by +bzip2.c, so the non-fixedness of them in previous versions has no +effect on reliability of bzip2.c. + +In bzlib.c: + * made zero-length BZ_FLUSH work correctly in bzCompress(). + * fixed bzWrite/bzRead to ignore zero-length requests. + * fixed bzread to correctly handle read requests after EOF. + * wrong parameter order in call to bzDecompressInit in + bzBuffToBuffDecompress. Fixed. + +In compress.c: + * changed setting of nGroups in sendMTFValues() so as to + do a bit better on small files. This _does_ effect + bzip2.c. + + +0.9.5a +~~~~~~ +Major change: add a fallback sorting algorithm (blocksort.c) +to give reasonable behaviour even for very repetitive inputs. +Nuked --repetitive-best and --repetitive-fast since they are +no longer useful. + +Minor changes: mostly a whole bunch of small changes/ +bugfixes in the driver (bzip2.c). Changes pertaining to the +user interface are: + + allow decompression of symlink'd files to stdout + decompress/test files even without .bz2 extension + give more accurate error messages for I/O errors + when compressing/decompressing to stdout, don't catch control-C + read flags from BZIP2 and BZIP environment variables + decline to break hard links to a file unless forced with -f + allow -c flag even with no filenames + preserve file ownerships as far as possible + make -s -1 give the expected block size (100k) + add a flag -q --quiet to suppress nonessential warnings + stop decoding flags after --, so files beginning in - can be handled + resolved inconsistent naming: bzcat or bz2cat ? + bzip2 --help now returns 0 + +Programming-level changes are: + + fixed syntax error in GET_LL4 for Borland C++ 5.02 + let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC} + fix overshoot of mode-string end in bzopen_or_bzdopen + wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... } + close file handles under all error conditions + added minor mods so it compiles with DJGPP out of the box + fixed Makefile so it doesn't give problems with BSD make + fix uninitialised memory reads in dlltest.c + +0.9.5b +~~~~~~ +Open stdin/stdout in binary mode for DJGPP. + +0.9.5c +~~~~~~ +Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1. The + 1 +version could cause the sorted order to be wrong in some extremely +obscure cases. Also changed setting of quadrant in blocksort.c. + +0.9.5d +~~~~~~ +The only functional change is to make bzlibVersion() in the library +return the correct string. This has no effect whatsoever on the +functioning of the bzip2 program or library. Added a couple of casts +so the library compiles without warnings at level 3 in MS Visual +Studio 6.0. Included a Y2K statement in the file Y2K_INFO. All other +changes are minor documentation changes. + +1.0 +~~~ +Several minor bugfixes and enhancements: + +* Large file support. The library uses 64-bit counters to + count the volume of data passing through it. bzip2.c + is now compiled with -D_FILE_OFFSET_BITS=64 to get large + file support from the C library. -v correctly prints out + file sizes greater than 4 gigabytes. All these changes have + been made without assuming a 64-bit platform or a C compiler + which supports 64-bit ints, so, except for the C library + aspect, they are fully portable. + +* Decompression robustness. The library/program should be + robust to any corruption of compressed data, detecting and + handling _all_ corruption, instead of merely relying on + the CRCs. What this means is that the program should + never crash, given corrupted data, and the library should + always return BZ_DATA_ERROR. + +* Fixed an obscure race-condition bug only ever observed on + Solaris, in which, if you were very unlucky and issued + control-C at exactly the wrong time, both input and output + files would be deleted. + +* Don't run out of file handles on test/decompression when + large numbers of files have invalid magic numbers. + +* Avoid library namespace pollution. Prefix all exported + symbols with BZ2_. + +* Minor sorting enhancements from my DCC2000 paper. + +* Advance the version number to 1.0, so as to counteract the + (false-in-this-case) impression some people have that programs + with version numbers less than 1.0 are in some way, experimental, + pre-release versions. + +* Create an initial Makefile-libbz2_so to build a shared library. + Yes, I know I should really use libtool et al ... + +* Make the program exit with 2 instead of 0 when decompression + fails due to a bad magic number (ie, an invalid bzip2 header). + Also exit with 1 (as the manual claims :-) whenever a diagnostic + message would have been printed AND the corresponding operation + is aborted, for example + bzip2: Output file xx already exists. + When a diagnostic message is printed but the operation is not + aborted, for example + bzip2: Can't guess original name for wurble -- using wurble.out + then the exit value 0 is returned, unless some other problem is + also detected. + + I think it corresponds more closely to what the manual claims now. + + +1.0.1 +~~~~~ +* Modified dlltest.c so it uses the new BZ2_ naming scheme. +* Modified makefile-msc to fix minor build probs on Win2k. +* Updated README.COMPILATION.PROBLEMS. + +There are no functionality changes or bug fixes relative to version +1.0.0. This is just a documentation update + a fix for minor Win32 +build problems. For almost everyone, upgrading from 1.0.0 to 1.0.1 is +utterly pointless. Don't bother. + + +1.0.2 +~~~~~ +A bug fix release, addressing various minor issues which have appeared +in the 18 or so months since 1.0.1 was released. Most of the fixes +are to do with file-handling or documentation bugs. To the best of my +knowledge, there have been no data-loss-causing bugs reported in the +compression/decompression engine of 1.0.0 or 1.0.1. + +Note that this release does not improve the rather crude build system +for Unix platforms. The general plan here is to autoconfiscate/ +libtoolise 1.0.2 soon after release, and release the result as 1.1.0 +or perhaps 1.2.0. That, however, is still just a plan at this point. + +Here are the changes in 1.0.2. Bug-reporters and/or patch-senders in +parentheses. + +* Fix an infinite segfault loop in 1.0.1 when a directory is + encountered in -f (force) mode. + (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt) + +* Avoid double fclose() of output file on certain I/O error paths. + (Solar Designer) + +* Don't fail with internal error 1007 when fed a long stream (> 48MB) + of byte 251. Also print useful message suggesting that 1007s may be + caused by bad memory. + (noticed by Juan Pedro Vallejo, fixed by me) + +* Fix uninitialised variable silly bug in demo prog dlltest.c. + (Jorj Bauer) + +* Remove 512-MB limitation on recovered file size for bzip2recover + on selected platforms which support 64-bit ints. At the moment + all GCC supported platforms, and Win32. + (me, Alson van der Meulen) + +* Hard-code header byte values, to give correct operation on platforms + using EBCDIC as their native character set (IBM's OS/390). + (Leland Lucius) + +* Copy file access times correctly. + (Marty Leisner) + +* Add distclean and check targets to Makefile. + (Michael Carmack) + +* Parameterise use of ar and ranlib in Makefile. Also add $(LDFLAGS). + (Rich Ireland, Bo Thorsen) + +* Pass -p (create parent dirs as needed) to mkdir during make install. + (Jeremy Fusco) + +* Dereference symlinks when copying file permissions in -f mode. + (Volker Schmidt) + +* Majorly simplify implementation of uInt64_qrm10. + (Bo Lindbergh) + +* Check the input file still exists before deleting the output one, + when aborting in cleanUpAndFail(). + (Joerg Prante, Robert Linden, Matthias Krings) + +Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer +of bzip2: + +* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore. + +* Spelling changes and minor enhancements in bzip2.1. + +* Avoid race condition between creating the output file and setting its + interim permissions safely, by using fopen_output_safely(). + No changes to bzip2recover since there is no issue with file + permissions there. + +* do not print senseless report with -v when compressing an empty + file. + +* bzcat -f works on non-bzip2 files. + +* do not try to escape shell meta-characters on unix (the shell takes + care of these). + +* added --fast and --best aliases for -1 -9 for gzip compatibility. + + +1.0.3 (15 Feb 05) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.2. + +* Further robustification against corrupted compressed data. + There are currently no known bitstreams which can cause the + decompressor to crash, loop or access memory which does not + belong to it. If you are using bzip2 or the library to + decompress bitstreams from untrusted sources, an upgrade + to 1.0.3 is recommended. This fixes CAN-2005-1260. + +* The documentation has been converted to XML, from which html + and pdf can be derived. + +* Various minor bugs in the documentation have been fixed. + +* Fixes for various compilation warnings with newer versions of + gcc, and on 64-bit platforms. + +* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. + This has been fixed. + + +1.0.4 (20 Dec 06) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.3. + +* Fix file permissions race problem (CAN-2005-0953). + +* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD + scan. + +* 'const'/prototype cleanups in the C code. + +* Change default install location to /usr/local, and handle multiple + 'make install's without error. + +* Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 + to the extent that applies to bzgrep. + +* Use 'mktemp' rather than 'tempfile' in bzdiff. + +* Tighten up a couple of assertions in blocksort.c following automated + analysis. + +* Fix minor doc/comment bugs. + + +1.0.5 (10 Dec 07) +~~~~~~~~~~~~~~~~~ +Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 + +1.0.7 (27 Jun 19) +~~~~~~~~~~~~~~~~~ + +* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH + +* bzip2: Fix return value when combining --test,-t and -q. + +* bzip2recover: Fix buffer overflow for large argv[0] + +* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) + +* Make sure nSelectors is not out of range (CVE-2019-12900) + +1.0.8 (13 Jul 19) +~~~~~~~~~~~~~~~~~ + +* Accept as many selectors as the file format allows. + This relaxes the fix for CVE-2019-12900 from 1.0.7 + so that bzip2 allows decompression of bz2 files that + use (too) many selectors again. + +* Fix handling of large (> 4GB) files on Windows. + +* Cleanup of bzdiff and bzgrep scripts so they don't use + any bash extensions and handle multiple archives correctly. + +* There is now a bz2-files testsuite at + https://sourceware.org/git/bzip2-tests.git diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/LICENSE b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/LICENSE new file mode 100644 index 000000000..81a37eab7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/LICENSE @@ -0,0 +1,42 @@ + +-------------------------------------------------------------------------- + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2019 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.8 of 13 July 2019 + +-------------------------------------------------------------------------- diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile new file mode 100644 index 000000000..f8a17722e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile @@ -0,0 +1,217 @@ +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.8 of 13 July 2019 +# Copyright (C) 1996-2019 Julian Seward +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ------------------------------------------------------------------ + +SHELL=/bin/sh + +# To assist in cross-compiling +CC=gcc +AR=ar +RANLIB=ranlib +LDFLAGS= + +BIGFILES=-D_FILE_OFFSET_BITS=64 +CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) + +# Where you want it installed when you do 'make install' +PREFIX=/usr/local + + +OBJS= blocksort.o \ + huffman.o \ + crctable.o \ + randtable.o \ + compress.o \ + decompress.o \ + bzlib.o + +all: libbz2.a bzip2 bzip2recover test + +bzip2: libbz2.a bzip2.o + $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 + +bzip2recover: bzip2recover.o + $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o + +libbz2.a: $(OBJS) + rm -f libbz2.a + $(AR) cq libbz2.a $(OBJS) + @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \ + -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \ + echo $(RANLIB) libbz2.a ; \ + $(RANLIB) libbz2.a ; \ + fi + +check: test +test: bzip2 + @cat words1 + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 + ./bzip2 -d < sample1.bz2 > sample1.tst + ./bzip2 -d < sample2.bz2 > sample2.tst + ./bzip2 -ds < sample3.bz2 > sample3.tst + cmp sample1.bz2 sample1.rb2 + cmp sample2.bz2 sample2.rb2 + cmp sample3.bz2 sample3.rb2 + cmp sample1.tst sample1.ref + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref + @cat words3 + +install: bzip2 bzip2recover + if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi + if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi + if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi + if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi + if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi + cp -f bzip2 $(PREFIX)/bin/bzip2 + cp -f bzip2 $(PREFIX)/bin/bunzip2 + cp -f bzip2 $(PREFIX)/bin/bzcat + cp -f bzip2recover $(PREFIX)/bin/bzip2recover + chmod a+x $(PREFIX)/bin/bzip2 + chmod a+x $(PREFIX)/bin/bunzip2 + chmod a+x $(PREFIX)/bin/bzcat + chmod a+x $(PREFIX)/bin/bzip2recover + cp -f bzip2.1 $(PREFIX)/man/man1 + chmod a+r $(PREFIX)/man/man1/bzip2.1 + cp -f bzlib.h $(PREFIX)/include + chmod a+r $(PREFIX)/include/bzlib.h + cp -f libbz2.a $(PREFIX)/lib + chmod a+r $(PREFIX)/lib/libbz2.a + cp -f bzgrep $(PREFIX)/bin/bzgrep + ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep + ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep + chmod a+x $(PREFIX)/bin/bzgrep + cp -f bzmore $(PREFIX)/bin/bzmore + ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless + chmod a+x $(PREFIX)/bin/bzmore + cp -f bzdiff $(PREFIX)/bin/bzdiff + ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp + chmod a+x $(PREFIX)/bin/bzdiff + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 + chmod a+r $(PREFIX)/man/man1/bzgrep.1 + chmod a+r $(PREFIX)/man/man1/bzmore.1 + chmod a+r $(PREFIX)/man/man1/bzdiff.1 + echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1 + echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1 + echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1 + echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 + +clean: + rm -f *.o libbz2.a bzip2 bzip2recover \ + sample1.rb2 sample2.rb2 sample3.rb2 \ + sample1.tst sample2.tst sample3.tst + +blocksort.o: blocksort.c + @cat words0 + $(CC) $(CFLAGS) -c blocksort.c +huffman.o: huffman.c + $(CC) $(CFLAGS) -c huffman.c +crctable.o: crctable.c + $(CC) $(CFLAGS) -c crctable.c +randtable.o: randtable.c + $(CC) $(CFLAGS) -c randtable.c +compress.o: compress.c + $(CC) $(CFLAGS) -c compress.c +decompress.o: decompress.c + $(CC) $(CFLAGS) -c decompress.c +bzlib.o: bzlib.c + $(CC) $(CFLAGS) -c bzlib.c +bzip2.o: bzip2.c + $(CC) $(CFLAGS) -c bzip2.c +bzip2recover.o: bzip2recover.c + $(CC) $(CFLAGS) -c bzip2recover.c + + +distclean: clean + rm -f manual.ps manual.html manual.pdf + +DISTNAME=bzip2-1.0.8 +dist: check manual + rm -f $(DISTNAME) + ln -s -f . $(DISTNAME) + tar cvf $(DISTNAME).tar \ + $(DISTNAME)/blocksort.c \ + $(DISTNAME)/huffman.c \ + $(DISTNAME)/crctable.c \ + $(DISTNAME)/randtable.c \ + $(DISTNAME)/compress.c \ + $(DISTNAME)/decompress.c \ + $(DISTNAME)/bzlib.c \ + $(DISTNAME)/bzip2.c \ + $(DISTNAME)/bzip2recover.c \ + $(DISTNAME)/bzlib.h \ + $(DISTNAME)/bzlib_private.h \ + $(DISTNAME)/Makefile \ + $(DISTNAME)/LICENSE \ + $(DISTNAME)/bzip2.1 \ + $(DISTNAME)/bzip2.1.preformatted \ + $(DISTNAME)/bzip2.txt \ + $(DISTNAME)/words0 \ + $(DISTNAME)/words1 \ + $(DISTNAME)/words2 \ + $(DISTNAME)/words3 \ + $(DISTNAME)/sample1.ref \ + $(DISTNAME)/sample2.ref \ + $(DISTNAME)/sample3.ref \ + $(DISTNAME)/sample1.bz2 \ + $(DISTNAME)/sample2.bz2 \ + $(DISTNAME)/sample3.bz2 \ + $(DISTNAME)/dlltest.c \ + $(DISTNAME)/manual.html \ + $(DISTNAME)/manual.pdf \ + $(DISTNAME)/manual.ps \ + $(DISTNAME)/README \ + $(DISTNAME)/README.COMPILATION.PROBLEMS \ + $(DISTNAME)/README.XML.STUFF \ + $(DISTNAME)/CHANGES \ + $(DISTNAME)/libbz2.def \ + $(DISTNAME)/libbz2.dsp \ + $(DISTNAME)/dlltest.dsp \ + $(DISTNAME)/makefile.msc \ + $(DISTNAME)/unzcrash.c \ + $(DISTNAME)/spewG.c \ + $(DISTNAME)/mk251.c \ + $(DISTNAME)/bzdiff \ + $(DISTNAME)/bzdiff.1 \ + $(DISTNAME)/bzmore \ + $(DISTNAME)/bzmore.1 \ + $(DISTNAME)/bzgrep \ + $(DISTNAME)/bzgrep.1 \ + $(DISTNAME)/Makefile-libbz2_so \ + $(DISTNAME)/bz-common.xsl \ + $(DISTNAME)/bz-fo.xsl \ + $(DISTNAME)/bz-html.xsl \ + $(DISTNAME)/bzip.css \ + $(DISTNAME)/entities.xml \ + $(DISTNAME)/manual.xml \ + $(DISTNAME)/format.pl \ + $(DISTNAME)/xmlproc.sh + gzip -v $(DISTNAME).tar + +# For rebuilding the manual from sources on my SuSE 9.1 box + +MANUAL_SRCS= bz-common.xsl bz-fo.xsl bz-html.xsl bzip.css \ + entities.xml manual.xml + +manual: manual.html manual.ps manual.pdf + +manual.ps: $(MANUAL_SRCS) + ./xmlproc.sh -ps manual.xml + +manual.pdf: $(MANUAL_SRCS) + ./xmlproc.sh -pdf manual.xml + +manual.html: $(MANUAL_SRCS) + ./xmlproc.sh -html manual.xml diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile-libbz2_so b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile-libbz2_so new file mode 100644 index 000000000..fb0f2306f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/Makefile-libbz2_so @@ -0,0 +1,59 @@ + +# This Makefile builds a shared version of the library, +# libbz2.so.1.0.8, with soname libbz2.so.1.0, +# at least on x86-Linux (RedHat 7.2), +# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). +# Please see the README file for some important info +# about building the library like this. + +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.8 of 13 July 2019 +# Copyright (C) 1996-2019 Julian Seward +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ------------------------------------------------------------------ + + +SHELL=/bin/sh +CC=gcc +BIGFILES=-D_FILE_OFFSET_BITS=64 +CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) + +OBJS= blocksort.o \ + huffman.o \ + crctable.o \ + randtable.o \ + compress.o \ + decompress.o \ + bzlib.o + +all: $(OBJS) + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.8 libbz2.so.1.0 + +clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared + +blocksort.o: blocksort.c + $(CC) $(CFLAGS) -c blocksort.c +huffman.o: huffman.c + $(CC) $(CFLAGS) -c huffman.c +crctable.o: crctable.c + $(CC) $(CFLAGS) -c crctable.c +randtable.o: randtable.c + $(CC) $(CFLAGS) -c randtable.c +compress.o: compress.c + $(CC) $(CFLAGS) -c compress.c +decompress.o: decompress.c + $(CC) $(CFLAGS) -c decompress.c +bzlib.o: bzlib.c + $(CC) $(CFLAGS) -c bzlib.c diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README new file mode 100644 index 000000000..b9c6099fd --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README @@ -0,0 +1,196 @@ + +This is the README for bzip2/libzip2. +This version is fully compatible with the previous public releases. + +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward + +Please read the WARNING, DISCLAIMER and PATENTS sections in this file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +Complete documentation is available in Postscript form (manual.ps), +PDF (manual.pdf) or html (manual.html). A plain-text version of the +manual page is available as bzip2.txt. + + +HOW TO BUILD -- UNIX + +Type 'make'. This builds the library libbz2.a and then the programs +bzip2 and bzip2recover. Six self-tests are run. If the self-tests +complete ok, carry on to installation: + +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type + + make install + +To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type + + make install PREFIX=/xxx/yyy + +If you are (justifiably) paranoid and want to see what 'make install' +is going to do, you can first do + + make -n install or + make -n install PREFIX=/xxx/yyy respectively. + +The -n instructs make to show the commands it would execute, but not +actually execute them. + + +HOW TO BUILD -- UNIX, shared library libbz2.so. + +Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for +Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims +that it works for any other platform, though I suspect it probably +will work for most platforms employing both ELF and gcc. + +bzip2-shared, a client of the shared library, is also built, but not +self-tested. So I suggest you also build using the normal Makefile, +since that conducts a self-test. A second reason to prefer the +version statically linked to the library is that, on x86 platforms, +building shared objects makes a valuable register (%ebx) unavailable +to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. + +Important note for people upgrading .so's from 0.9.0/0.9.5 to version +1.0.X. All the functions in the library have been renamed, from (eg) +bzCompress to BZ2_bzCompress, to avoid namespace pollution. +Unfortunately this means that the libbz2.so created by +Makefile-libbz2_so will not work with any program which used an older +version of the library. I do encourage library clients to make the +effort to upgrade to use version 1.0, since it is both faster and more +robust than previous versions. + + +HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. + +It's difficult for me to support compilation on all these platforms. +My approach is to collect binaries for these platforms, and put them +on the master web site (https://sourceware.org/bzip2/). Look there. However +(FWIW), bzip2-1.0.X is very standard ANSI C and should compile +unmodified with MS Visual C. If you have difficulties building, you +might want to read README.COMPILATION.PROBLEMS. + +At least using MS Visual C++ 6, you can build from the unmodified +sources by issuing, in a command shell: + + nmake -f makefile.msc + +(you may need to first run the MSVC-provided script VCVARS32.BAT + so as to set up paths to the MSVC tools correctly). + + +VALIDATION + +Correct operation, in the sense that a compressed file can always be +decompressed to reproduce the original, is obviously of paramount +importance. To validate bzip2, I used a modified version of Mark +Nelson's churn program. Churn is an automated test driver which +recursively traverses a directory structure, using bzip2 to compress +and then decompress each file it encounters, and checking that the +decompressed data is the same as the original. + + + +Please read and be aware of the following: + +WARNING: + + This program and library (attempts to) compress data by + performing several non-trivial transformations on it. + Unless you are 100% familiar with *all* the algorithms + contained herein, and with the consequences of modifying them, + you should NOT meddle with the compression or decompression + machinery. Incorrect changes can and very likely *will* + lead to disastrous loss of data. + + +DISCLAIMER: + + I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE + USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. + + Every compression of a file implies an assumption that the + compressed file can be decompressed to reproduce the original. + Great efforts in design, coding and testing have been made to + ensure that this program works correctly. However, the complexity + of the algorithms, and, in particular, the presence of various + special cases in the code which occur with very low but non-zero + probability make it impossible to rule out the possibility of bugs + remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS + PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER + SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. + + That is not to say this program is inherently unreliable. + Indeed, I very much hope the opposite is true. bzip2/libbzip2 + has been carefully constructed and extensively tested. + + +PATENTS: + + To the best of my knowledge, bzip2/libbzip2 does not use any + patented algorithms. However, I do not have the resources + to carry out a patent search. Therefore I cannot give any + guarantee of the above statement. + + + +WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? + + * Approx 10% faster compression, 30% faster decompression + * -t (test mode) is a lot quicker + * Can decompress concatenated compressed files + * Programming interface, so programs can directly read/write .bz2 files + * Less restrictive (BSD-style) licensing + * Flag handling more compatible with GNU gzip + * Much more documentation, i.e., a proper user manual + * Hopefully, improved portability (at least of the library) + +WHAT'S NEW IN 0.9.5 ? + + * Compression speed is much less sensitive to the input + data than in previous versions. Specifically, the very + slow performance caused by repetitive data is fixed. + * Many small improvements in file and flag handling. + * A Y2K statement. + +WHAT'S NEW IN 1.0.x ? + + See the CHANGES file. + +I hope you find bzip2 useful. Feel free to contact the developers at + bzip2-devel@sourceware.org +if you have any suggestions or queries. Many people mailed me with +comments, suggestions and patches after the releases of bzip-0.15, +bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, +1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this +feedback. I thank you for your comments. + +bzip2's "home" is https://sourceware.org/bzip2/ + +Julian Seward +jseward@acm.org +Cambridge, UK. + +18 July 1996 (version 0.15) +25 August 1996 (version 0.21) + 7 August 1997 (bzip2, version 0.1) +29 August 1997 (bzip2, version 0.1pl2) +23 August 1998 (bzip2, version 0.9.0) + 8 June 1999 (bzip2, version 0.9.5) + 4 Sept 1999 (bzip2, version 0.9.5d) + 5 May 2000 (bzip2, version 1.0pre8) +30 December 2001 (bzip2, version 1.0.2pre1) +15 February 2005 (bzip2, version 1.0.3) +20 December 2006 (bzip2, version 1.0.4) +10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) +27 June 2019 (bzip2, version 1.0.7) +13 July 2019 (bzip2, version 1.0.8) diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.COMPILATION.PROBLEMS b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.COMPILATION.PROBLEMS new file mode 100644 index 000000000..fa317a50c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.COMPILATION.PROBLEMS @@ -0,0 +1,58 @@ +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward + +Please read the WARNING, DISCLAIMER and PATENTS sections in the +README file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +bzip2 should compile without problems on the vast majority of +platforms. Using the supplied Makefile, I've built and tested it +myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ +6.0 and nmake, you can build a native Win32 version too. Large file +support seems to work correctly on at least on amd64-linux. + +When I say "large file" I mean a file of size 2,147,483,648 (2^31) +bytes or above. Many older OSs can't handle files above this size, +but many newer ones can. Large files are pretty huge -- most files +you'll encounter are not Large Files. + +Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety +of platforms without difficulty, and I hope this version will continue +in that tradition. However, in order to support large files, I've had +to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. This +can cause problems. + +The technique of adding -D_FILE_OFFSET_BITS=64 to get large file +support is, as far as I know, the Recommended Way to get correct large +file support. For more details, see the Large File Support +Specification, published by the Large File Summit, at + + http://ftp.sas.com/standards/large.file + +As a general comment, if you get compilation errors which you think +are related to large file support, try removing the above define from +the Makefile, ie, delete the line + + BIGFILES=-D_FILE_OFFSET_BITS=64 + +from the Makefile, and do 'make clean ; make'. This will give you a +version of bzip2 without large file support, which, for most +applications, is probably not a problem. + +Alternatively, try some of the platform-specific hints listed below. + +You can use the spewG.c program to generate huge files to test bzip2's +large file support, if you are feeling paranoid. Be aware though that +any compilation problems which affect bzip2 will also affect spewG.c, +alas. + +AIX: I have reports that for large file support, you need to specify +-D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64. I have not tested +this myself. diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.XML.STUFF b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.XML.STUFF new file mode 100644 index 000000000..1503476eb --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/README.XML.STUFF @@ -0,0 +1,45 @@ + ---------------------------------------------------------------- + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ---------------------------------------------------------------- + +The script xmlproc.sh takes an xml file as input, +and processes it to create .pdf, .html or .ps output. +It uses format.pl, a perl script to format
 blocks nicely,
+ and add CDATA tags so writers do not have to use eg. < 
+
+The file "entities.xml" must be edited to reflect current
+version, year, etc.
+
+
+Usage:
+
+  ./xmlproc.sh -v manual.xml
+  Validates an xml file to ensure no dtd-compliance errors
+
+  ./xmlproc.sh -html manual.xml
+  Output: manual.html
+
+  ./xmlproc.sh -pdf manual.xml
+  Output: manual.pdf
+
+  ./xmlproc.sh -ps manual.xml
+  Output: manual.ps
+
+
+Notum bene: 
+- pdfxmltex barfs if given a filename with an underscore in it
+
+- xmltex won't work yet - there's a bug in passivetex
+    which we are all waiting for Sebastian to fix.
+  So we are going the xml -> pdf -> ps route for the time being,
+    using pdfxmltex.
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/blocksort.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/blocksort.c
new file mode 100644
index 000000000..92d81fe28
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/blocksort.c
@@ -0,0 +1,1094 @@
+
+/*-------------------------------------------------------------*/
+/*--- Block sorting machinery                               ---*/
+/*---                                           blocksort.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+#include "bzlib_private.h"
+
+/*---------------------------------------------*/
+/*--- Fallback O(N log(N)^2) sorting        ---*/
+/*--- algorithm, for repetitive blocks      ---*/
+/*---------------------------------------------*/
+
+/*---------------------------------------------*/
+static 
+__inline__
+void fallbackSimpleSort ( UInt32* fmap, 
+                          UInt32* eclass, 
+                          Int32   lo, 
+                          Int32   hi )
+{
+   Int32 i, j, tmp;
+   UInt32 ec_tmp;
+
+   if (lo == hi) return;
+
+   if (hi - lo > 3) {
+      for ( i = hi-4; i >= lo; i-- ) {
+         tmp = fmap[i];
+         ec_tmp = eclass[tmp];
+         for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
+            fmap[j-4] = fmap[j];
+         fmap[j-4] = tmp;
+      }
+   }
+
+   for ( i = hi-1; i >= lo; i-- ) {
+      tmp = fmap[i];
+      ec_tmp = eclass[tmp];
+      for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
+         fmap[j-1] = fmap[j];
+      fmap[j-1] = tmp;
+   }
+}
+
+
+/*---------------------------------------------*/
+#define fswap(zz1, zz2) \
+   { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
+
+#define fvswap(zzp1, zzp2, zzn)       \
+{                                     \
+   Int32 yyp1 = (zzp1);               \
+   Int32 yyp2 = (zzp2);               \
+   Int32 yyn  = (zzn);                \
+   while (yyn > 0) {                  \
+      fswap(fmap[yyp1], fmap[yyp2]);  \
+      yyp1++; yyp2++; yyn--;          \
+   }                                  \
+}
+
+
+#define fmin(a,b) ((a) < (b)) ? (a) : (b)
+
+#define fpush(lz,hz) { stackLo[sp] = lz; \
+                       stackHi[sp] = hz; \
+                       sp++; }
+
+#define fpop(lz,hz) { sp--;              \
+                      lz = stackLo[sp];  \
+                      hz = stackHi[sp]; }
+
+#define FALLBACK_QSORT_SMALL_THRESH 10
+#define FALLBACK_QSORT_STACK_SIZE   100
+
+
+static
+void fallbackQSort3 ( UInt32* fmap, 
+                      UInt32* eclass,
+                      Int32   loSt, 
+                      Int32   hiSt )
+{
+   Int32 unLo, unHi, ltLo, gtHi, n, m;
+   Int32 sp, lo, hi;
+   UInt32 med, r, r3;
+   Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
+   Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
+
+   r = 0;
+
+   sp = 0;
+   fpush ( loSt, hiSt );
+
+   while (sp > 0) {
+
+      AssertH ( sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004 );
+
+      fpop ( lo, hi );
+      if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
+         fallbackSimpleSort ( fmap, eclass, lo, hi );
+         continue;
+      }
+
+      /* Random partitioning.  Median of 3 sometimes fails to
+         avoid bad cases.  Median of 9 seems to help but 
+         looks rather expensive.  This too seems to work but
+         is cheaper.  Guidance for the magic constants 
+         7621 and 32768 is taken from Sedgewick's algorithms
+         book, chapter 35.
+      */
+      r = ((r * 7621) + 1) % 32768;
+      r3 = r % 3;
+      if (r3 == 0) med = eclass[fmap[lo]]; else
+      if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
+                   med = eclass[fmap[hi]];
+
+      unLo = ltLo = lo;
+      unHi = gtHi = hi;
+
+      while (1) {
+         while (1) {
+            if (unLo > unHi) break;
+            n = (Int32)eclass[fmap[unLo]] - (Int32)med;
+            if (n == 0) { 
+               fswap(fmap[unLo], fmap[ltLo]); 
+               ltLo++; unLo++; 
+               continue; 
+            };
+            if (n > 0) break;
+            unLo++;
+         }
+         while (1) {
+            if (unLo > unHi) break;
+            n = (Int32)eclass[fmap[unHi]] - (Int32)med;
+            if (n == 0) { 
+               fswap(fmap[unHi], fmap[gtHi]); 
+               gtHi--; unHi--; 
+               continue; 
+            };
+            if (n < 0) break;
+            unHi--;
+         }
+         if (unLo > unHi) break;
+         fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
+      }
+
+      AssertD ( unHi == unLo-1, "fallbackQSort3(2)" );
+
+      if (gtHi < ltLo) continue;
+
+      n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
+      m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
+
+      n = lo + unLo - ltLo - 1;
+      m = hi - (gtHi - unHi) + 1;
+
+      if (n - lo > hi - m) {
+         fpush ( lo, n );
+         fpush ( m, hi );
+      } else {
+         fpush ( m, hi );
+         fpush ( lo, n );
+      }
+   }
+}
+
+#undef fmin
+#undef fpush
+#undef fpop
+#undef fswap
+#undef fvswap
+#undef FALLBACK_QSORT_SMALL_THRESH
+#undef FALLBACK_QSORT_STACK_SIZE
+
+
+/*---------------------------------------------*/
+/* Pre:
+      nblock > 0
+      eclass exists for [0 .. nblock-1]
+      ((UChar*)eclass) [0 .. nblock-1] holds block
+      ptr exists for [0 .. nblock-1]
+
+   Post:
+      ((UChar*)eclass) [0 .. nblock-1] holds block
+      All other areas of eclass destroyed
+      fmap [0 .. nblock-1] holds sorted order
+      bhtab [ 0 .. 2+(nblock/32) ] destroyed
+*/
+
+#define       SET_BH(zz)  bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31))
+#define     CLEAR_BH(zz)  bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31))
+#define     ISSET_BH(zz)  (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31)))
+#define      WORD_BH(zz)  bhtab[(zz) >> 5]
+#define UNALIGNED_BH(zz)  ((zz) & 0x01f)
+
+static
+void fallbackSort ( UInt32* fmap, 
+                    UInt32* eclass, 
+                    UInt32* bhtab,
+                    Int32   nblock,
+                    Int32   verb )
+{
+   Int32 ftab[257];
+   Int32 ftabCopy[256];
+   Int32 H, i, j, k, l, r, cc, cc1;
+   Int32 nNotDone;
+   Int32 nBhtab;
+   UChar* eclass8 = (UChar*)eclass;
+
+   /*--
+      Initial 1-char radix sort to generate
+      initial fmap and initial BH bits.
+   --*/
+   if (verb >= 4)
+      VPrintf0 ( "        bucket sorting ...\n" );
+   for (i = 0; i < 257;    i++) ftab[i] = 0;
+   for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
+   for (i = 0; i < 256;    i++) ftabCopy[i] = ftab[i];
+   for (i = 1; i < 257;    i++) ftab[i] += ftab[i-1];
+
+   for (i = 0; i < nblock; i++) {
+      j = eclass8[i];
+      k = ftab[j] - 1;
+      ftab[j] = k;
+      fmap[k] = i;
+   }
+
+   nBhtab = 2 + (nblock / 32);
+   for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
+   for (i = 0; i < 256; i++) SET_BH(ftab[i]);
+
+   /*--
+      Inductively refine the buckets.  Kind-of an
+      "exponential radix sort" (!), inspired by the
+      Manber-Myers suffix array construction algorithm.
+   --*/
+
+   /*-- set sentinel bits for block-end detection --*/
+   for (i = 0; i < 32; i++) { 
+      SET_BH(nblock + 2*i);
+      CLEAR_BH(nblock + 2*i + 1);
+   }
+
+   /*-- the log(N) loop --*/
+   H = 1;
+   while (1) {
+
+      if (verb >= 4) 
+         VPrintf1 ( "        depth %6d has ", H );
+
+      j = 0;
+      for (i = 0; i < nblock; i++) {
+         if (ISSET_BH(i)) j = i;
+         k = fmap[i] - H; if (k < 0) k += nblock;
+         eclass[k] = j;
+      }
+
+      nNotDone = 0;
+      r = -1;
+      while (1) {
+
+	 /*-- find the next non-singleton bucket --*/
+         k = r + 1;
+         while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
+         if (ISSET_BH(k)) {
+            while (WORD_BH(k) == 0xffffffff) k += 32;
+            while (ISSET_BH(k)) k++;
+         }
+         l = k - 1;
+         if (l >= nblock) break;
+         while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
+         if (!ISSET_BH(k)) {
+            while (WORD_BH(k) == 0x00000000) k += 32;
+            while (!ISSET_BH(k)) k++;
+         }
+         r = k - 1;
+         if (r >= nblock) break;
+
+         /*-- now [l, r] bracket current bucket --*/
+         if (r > l) {
+            nNotDone += (r - l + 1);
+            fallbackQSort3 ( fmap, eclass, l, r );
+
+            /*-- scan bucket and generate header bits-- */
+            cc = -1;
+            for (i = l; i <= r; i++) {
+               cc1 = eclass[fmap[i]];
+               if (cc != cc1) { SET_BH(i); cc = cc1; };
+            }
+         }
+      }
+
+      if (verb >= 4) 
+         VPrintf1 ( "%6d unresolved strings\n", nNotDone );
+
+      H *= 2;
+      if (H > nblock || nNotDone == 0) break;
+   }
+
+   /*-- 
+      Reconstruct the original block in
+      eclass8 [0 .. nblock-1], since the
+      previous phase destroyed it.
+   --*/
+   if (verb >= 4)
+      VPrintf0 ( "        reconstructing block ...\n" );
+   j = 0;
+   for (i = 0; i < nblock; i++) {
+      while (ftabCopy[j] == 0) j++;
+      ftabCopy[j]--;
+      eclass8[fmap[i]] = (UChar)j;
+   }
+   AssertH ( j < 256, 1005 );
+}
+
+#undef       SET_BH
+#undef     CLEAR_BH
+#undef     ISSET_BH
+#undef      WORD_BH
+#undef UNALIGNED_BH
+
+
+/*---------------------------------------------*/
+/*--- The main, O(N^2 log(N)) sorting       ---*/
+/*--- algorithm.  Faster for "normal"       ---*/
+/*--- non-repetitive blocks.                ---*/
+/*---------------------------------------------*/
+
+/*---------------------------------------------*/
+static
+__inline__
+Bool mainGtU ( UInt32  i1, 
+               UInt32  i2,
+               UChar*  block, 
+               UInt16* quadrant,
+               UInt32  nblock,
+               Int32*  budget )
+{
+   Int32  k;
+   UChar  c1, c2;
+   UInt16 s1, s2;
+
+   AssertD ( i1 != i2, "mainGtU" );
+   /* 1 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 2 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 3 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 4 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 5 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 6 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 7 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 8 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 9 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 10 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 11 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+   /* 12 */
+   c1 = block[i1]; c2 = block[i2];
+   if (c1 != c2) return (c1 > c2);
+   i1++; i2++;
+
+   k = nblock + 8;
+
+   do {
+      /* 1 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 2 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 3 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 4 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 5 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 6 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 7 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+      /* 8 */
+      c1 = block[i1]; c2 = block[i2];
+      if (c1 != c2) return (c1 > c2);
+      s1 = quadrant[i1]; s2 = quadrant[i2];
+      if (s1 != s2) return (s1 > s2);
+      i1++; i2++;
+
+      if (i1 >= nblock) i1 -= nblock;
+      if (i2 >= nblock) i2 -= nblock;
+
+      k -= 8;
+      (*budget)--;
+   }
+      while (k >= 0);
+
+   return False;
+}
+
+
+/*---------------------------------------------*/
+/*--
+   Knuth's increments seem to work better
+   than Incerpi-Sedgewick here.  Possibly
+   because the number of elems to sort is
+   usually small, typically <= 20.
+--*/
+static
+Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
+                   9841, 29524, 88573, 265720,
+                   797161, 2391484 };
+
+static
+void mainSimpleSort ( UInt32* ptr,
+                      UChar*  block,
+                      UInt16* quadrant,
+                      Int32   nblock,
+                      Int32   lo, 
+                      Int32   hi, 
+                      Int32   d,
+                      Int32*  budget )
+{
+   Int32 i, j, h, bigN, hp;
+   UInt32 v;
+
+   bigN = hi - lo + 1;
+   if (bigN < 2) return;
+
+   hp = 0;
+   while (incs[hp] < bigN) hp++;
+   hp--;
+
+   for (; hp >= 0; hp--) {
+      h = incs[hp];
+
+      i = lo + h;
+      while (True) {
+
+         /*-- copy 1 --*/
+         if (i > hi) break;
+         v = ptr[i];
+         j = i;
+         while ( mainGtU ( 
+                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
+                 ) ) {
+            ptr[j] = ptr[j-h];
+            j = j - h;
+            if (j <= (lo + h - 1)) break;
+         }
+         ptr[j] = v;
+         i++;
+
+         /*-- copy 2 --*/
+         if (i > hi) break;
+         v = ptr[i];
+         j = i;
+         while ( mainGtU ( 
+                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
+                 ) ) {
+            ptr[j] = ptr[j-h];
+            j = j - h;
+            if (j <= (lo + h - 1)) break;
+         }
+         ptr[j] = v;
+         i++;
+
+         /*-- copy 3 --*/
+         if (i > hi) break;
+         v = ptr[i];
+         j = i;
+         while ( mainGtU ( 
+                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
+                 ) ) {
+            ptr[j] = ptr[j-h];
+            j = j - h;
+            if (j <= (lo + h - 1)) break;
+         }
+         ptr[j] = v;
+         i++;
+
+         if (*budget < 0) return;
+      }
+   }
+}
+
+
+/*---------------------------------------------*/
+/*--
+   The following is an implementation of
+   an elegant 3-way quicksort for strings,
+   described in a paper "Fast Algorithms for
+   Sorting and Searching Strings", by Robert
+   Sedgewick and Jon L. Bentley.
+--*/
+
+#define mswap(zz1, zz2) \
+   { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
+
+#define mvswap(zzp1, zzp2, zzn)       \
+{                                     \
+   Int32 yyp1 = (zzp1);               \
+   Int32 yyp2 = (zzp2);               \
+   Int32 yyn  = (zzn);                \
+   while (yyn > 0) {                  \
+      mswap(ptr[yyp1], ptr[yyp2]);    \
+      yyp1++; yyp2++; yyn--;          \
+   }                                  \
+}
+
+static 
+__inline__
+UChar mmed3 ( UChar a, UChar b, UChar c )
+{
+   UChar t;
+   if (a > b) { t = a; a = b; b = t; };
+   if (b > c) { 
+      b = c;
+      if (a > b) b = a;
+   }
+   return b;
+}
+
+#define mmin(a,b) ((a) < (b)) ? (a) : (b)
+
+#define mpush(lz,hz,dz) { stackLo[sp] = lz; \
+                          stackHi[sp] = hz; \
+                          stackD [sp] = dz; \
+                          sp++; }
+
+#define mpop(lz,hz,dz) { sp--;             \
+                         lz = stackLo[sp]; \
+                         hz = stackHi[sp]; \
+                         dz = stackD [sp]; }
+
+
+#define mnextsize(az) (nextHi[az]-nextLo[az])
+
+#define mnextswap(az,bz)                                        \
+   { Int32 tz;                                                  \
+     tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
+     tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
+     tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
+
+
+#define MAIN_QSORT_SMALL_THRESH 20
+#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
+#define MAIN_QSORT_STACK_SIZE 100
+
+static
+void mainQSort3 ( UInt32* ptr,
+                  UChar*  block,
+                  UInt16* quadrant,
+                  Int32   nblock,
+                  Int32   loSt, 
+                  Int32   hiSt, 
+                  Int32   dSt,
+                  Int32*  budget )
+{
+   Int32 unLo, unHi, ltLo, gtHi, n, m, med;
+   Int32 sp, lo, hi, d;
+
+   Int32 stackLo[MAIN_QSORT_STACK_SIZE];
+   Int32 stackHi[MAIN_QSORT_STACK_SIZE];
+   Int32 stackD [MAIN_QSORT_STACK_SIZE];
+
+   Int32 nextLo[3];
+   Int32 nextHi[3];
+   Int32 nextD [3];
+
+   sp = 0;
+   mpush ( loSt, hiSt, dSt );
+
+   while (sp > 0) {
+
+      AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 );
+
+      mpop ( lo, hi, d );
+      if (hi - lo < MAIN_QSORT_SMALL_THRESH || 
+          d > MAIN_QSORT_DEPTH_THRESH) {
+         mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
+         if (*budget < 0) return;
+         continue;
+      }
+
+      med = (Int32) 
+            mmed3 ( block[ptr[ lo         ]+d],
+                    block[ptr[ hi         ]+d],
+                    block[ptr[ (lo+hi)>>1 ]+d] );
+
+      unLo = ltLo = lo;
+      unHi = gtHi = hi;
+
+      while (True) {
+         while (True) {
+            if (unLo > unHi) break;
+            n = ((Int32)block[ptr[unLo]+d]) - med;
+            if (n == 0) { 
+               mswap(ptr[unLo], ptr[ltLo]); 
+               ltLo++; unLo++; continue; 
+            };
+            if (n >  0) break;
+            unLo++;
+         }
+         while (True) {
+            if (unLo > unHi) break;
+            n = ((Int32)block[ptr[unHi]+d]) - med;
+            if (n == 0) { 
+               mswap(ptr[unHi], ptr[gtHi]); 
+               gtHi--; unHi--; continue; 
+            };
+            if (n <  0) break;
+            unHi--;
+         }
+         if (unLo > unHi) break;
+         mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
+      }
+
+      AssertD ( unHi == unLo-1, "mainQSort3(2)" );
+
+      if (gtHi < ltLo) {
+         mpush(lo, hi, d+1 );
+         continue;
+      }
+
+      n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
+      m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
+
+      n = lo + unLo - ltLo - 1;
+      m = hi - (gtHi - unHi) + 1;
+
+      nextLo[0] = lo;  nextHi[0] = n;   nextD[0] = d;
+      nextLo[1] = m;   nextHi[1] = hi;  nextD[1] = d;
+      nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
+
+      if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
+      if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
+      if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
+
+      AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" );
+      AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" );
+
+      mpush (nextLo[0], nextHi[0], nextD[0]);
+      mpush (nextLo[1], nextHi[1], nextD[1]);
+      mpush (nextLo[2], nextHi[2], nextD[2]);
+   }
+}
+
+#undef mswap
+#undef mvswap
+#undef mpush
+#undef mpop
+#undef mmin
+#undef mnextsize
+#undef mnextswap
+#undef MAIN_QSORT_SMALL_THRESH
+#undef MAIN_QSORT_DEPTH_THRESH
+#undef MAIN_QSORT_STACK_SIZE
+
+
+/*---------------------------------------------*/
+/* Pre:
+      nblock > N_OVERSHOOT
+      block32 exists for [0 .. nblock-1 +N_OVERSHOOT]
+      ((UChar*)block32) [0 .. nblock-1] holds block
+      ptr exists for [0 .. nblock-1]
+
+   Post:
+      ((UChar*)block32) [0 .. nblock-1] holds block
+      All other areas of block32 destroyed
+      ftab [0 .. 65536 ] destroyed
+      ptr [0 .. nblock-1] holds sorted order
+      if (*budget < 0), sorting was abandoned
+*/
+
+#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8])
+#define SETMASK (1 << 21)
+#define CLEARMASK (~(SETMASK))
+
+static
+void mainSort ( UInt32* ptr, 
+                UChar*  block,
+                UInt16* quadrant, 
+                UInt32* ftab,
+                Int32   nblock,
+                Int32   verb,
+                Int32*  budget )
+{
+   Int32  i, j, k, ss, sb;
+   Int32  runningOrder[256];
+   Bool   bigDone[256];
+   Int32  copyStart[256];
+   Int32  copyEnd  [256];
+   UChar  c1;
+   Int32  numQSorted;
+   UInt16 s;
+   if (verb >= 4) VPrintf0 ( "        main sort initialise ...\n" );
+
+   /*-- set up the 2-byte frequency table --*/
+   for (i = 65536; i >= 0; i--) ftab[i] = 0;
+
+   j = block[0] << 8;
+   i = nblock-1;
+   for (; i >= 3; i -= 4) {
+      quadrant[i] = 0;
+      j = (j >> 8) | ( ((UInt16)block[i]) << 8);
+      ftab[j]++;
+      quadrant[i-1] = 0;
+      j = (j >> 8) | ( ((UInt16)block[i-1]) << 8);
+      ftab[j]++;
+      quadrant[i-2] = 0;
+      j = (j >> 8) | ( ((UInt16)block[i-2]) << 8);
+      ftab[j]++;
+      quadrant[i-3] = 0;
+      j = (j >> 8) | ( ((UInt16)block[i-3]) << 8);
+      ftab[j]++;
+   }
+   for (; i >= 0; i--) {
+      quadrant[i] = 0;
+      j = (j >> 8) | ( ((UInt16)block[i]) << 8);
+      ftab[j]++;
+   }
+
+   /*-- (emphasises close relationship of block & quadrant) --*/
+   for (i = 0; i < BZ_N_OVERSHOOT; i++) {
+      block   [nblock+i] = block[i];
+      quadrant[nblock+i] = 0;
+   }
+
+   if (verb >= 4) VPrintf0 ( "        bucket sorting ...\n" );
+
+   /*-- Complete the initial radix sort --*/
+   for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1];
+
+   s = block[0] << 8;
+   i = nblock-1;
+   for (; i >= 3; i -= 4) {
+      s = (s >> 8) | (block[i] << 8);
+      j = ftab[s] -1;
+      ftab[s] = j;
+      ptr[j] = i;
+      s = (s >> 8) | (block[i-1] << 8);
+      j = ftab[s] -1;
+      ftab[s] = j;
+      ptr[j] = i-1;
+      s = (s >> 8) | (block[i-2] << 8);
+      j = ftab[s] -1;
+      ftab[s] = j;
+      ptr[j] = i-2;
+      s = (s >> 8) | (block[i-3] << 8);
+      j = ftab[s] -1;
+      ftab[s] = j;
+      ptr[j] = i-3;
+   }
+   for (; i >= 0; i--) {
+      s = (s >> 8) | (block[i] << 8);
+      j = ftab[s] -1;
+      ftab[s] = j;
+      ptr[j] = i;
+   }
+
+   /*--
+      Now ftab contains the first loc of every small bucket.
+      Calculate the running order, from smallest to largest
+      big bucket.
+   --*/
+   for (i = 0; i <= 255; i++) {
+      bigDone     [i] = False;
+      runningOrder[i] = i;
+   }
+
+   {
+      Int32 vv;
+      Int32 h = 1;
+      do h = 3 * h + 1; while (h <= 256);
+      do {
+         h = h / 3;
+         for (i = h; i <= 255; i++) {
+            vv = runningOrder[i];
+            j = i;
+            while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) {
+               runningOrder[j] = runningOrder[j-h];
+               j = j - h;
+               if (j <= (h - 1)) goto zero;
+            }
+            zero:
+            runningOrder[j] = vv;
+         }
+      } while (h != 1);
+   }
+
+   /*--
+      The main sorting loop.
+   --*/
+
+   numQSorted = 0;
+
+   for (i = 0; i <= 255; i++) {
+
+      /*--
+         Process big buckets, starting with the least full.
+         Basically this is a 3-step process in which we call
+         mainQSort3 to sort the small buckets [ss, j], but
+         also make a big effort to avoid the calls if we can.
+      --*/
+      ss = runningOrder[i];
+
+      /*--
+         Step 1:
+         Complete the big bucket [ss] by quicksorting
+         any unsorted small buckets [ss, j], for j != ss.  
+         Hopefully previous pointer-scanning phases have already
+         completed many of the small buckets [ss, j], so
+         we don't have to sort them at all.
+      --*/
+      for (j = 0; j <= 255; j++) {
+         if (j != ss) {
+            sb = (ss << 8) + j;
+            if ( ! (ftab[sb] & SETMASK) ) {
+               Int32 lo = ftab[sb]   & CLEARMASK;
+               Int32 hi = (ftab[sb+1] & CLEARMASK) - 1;
+               if (hi > lo) {
+                  if (verb >= 4)
+                     VPrintf4 ( "        qsort [0x%x, 0x%x]   "
+                                "done %d   this %d\n",
+                                ss, j, numQSorted, hi - lo + 1 );
+                  mainQSort3 ( 
+                     ptr, block, quadrant, nblock, 
+                     lo, hi, BZ_N_RADIX, budget 
+                  );   
+                  numQSorted += (hi - lo + 1);
+                  if (*budget < 0) return;
+               }
+            }
+            ftab[sb] |= SETMASK;
+         }
+      }
+
+      AssertH ( !bigDone[ss], 1006 );
+
+      /*--
+         Step 2:
+         Now scan this big bucket [ss] so as to synthesise the
+         sorted order for small buckets [t, ss] for all t,
+         including, magically, the bucket [ss,ss] too.
+         This will avoid doing Real Work in subsequent Step 1's.
+      --*/
+      {
+         for (j = 0; j <= 255; j++) {
+            copyStart[j] =  ftab[(j << 8) + ss]     & CLEARMASK;
+            copyEnd  [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1;
+         }
+         for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) {
+            k = ptr[j]-1; if (k < 0) k += nblock;
+            c1 = block[k];
+            if (!bigDone[c1])
+               ptr[ copyStart[c1]++ ] = k;
+         }
+         for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) {
+            k = ptr[j]-1; if (k < 0) k += nblock;
+            c1 = block[k];
+            if (!bigDone[c1]) 
+               ptr[ copyEnd[c1]-- ] = k;
+         }
+      }
+
+      AssertH ( (copyStart[ss]-1 == copyEnd[ss])
+                || 
+                /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1.
+                   Necessity for this case is demonstrated by compressing 
+                   a sequence of approximately 48.5 million of character 
+                   251; 1.0.0/1.0.1 will then die here. */
+                (copyStart[ss] == 0 && copyEnd[ss] == nblock-1),
+                1007 )
+
+      for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK;
+
+      /*--
+         Step 3:
+         The [ss] big bucket is now done.  Record this fact,
+         and update the quadrant descriptors.  Remember to
+         update quadrants in the overshoot area too, if
+         necessary.  The "if (i < 255)" test merely skips
+         this updating for the last bucket processed, since
+         updating for the last bucket is pointless.
+
+         The quadrant array provides a way to incrementally
+         cache sort orderings, as they appear, so as to 
+         make subsequent comparisons in fullGtU() complete
+         faster.  For repetitive blocks this makes a big
+         difference (but not big enough to be able to avoid
+         the fallback sorting mechanism, exponential radix sort).
+
+         The precise meaning is: at all times:
+
+            for 0 <= i < nblock and 0 <= j <= nblock
+
+            if block[i] != block[j], 
+
+               then the relative values of quadrant[i] and 
+                    quadrant[j] are meaningless.
+
+               else {
+                  if quadrant[i] < quadrant[j]
+                     then the string starting at i lexicographically
+                     precedes the string starting at j
+
+                  else if quadrant[i] > quadrant[j]
+                     then the string starting at j lexicographically
+                     precedes the string starting at i
+
+                  else
+                     the relative ordering of the strings starting
+                     at i and j has not yet been determined.
+               }
+      --*/
+      bigDone[ss] = True;
+
+      if (i < 255) {
+         Int32 bbStart  = ftab[ss << 8] & CLEARMASK;
+         Int32 bbSize   = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
+         Int32 shifts   = 0;
+
+         while ((bbSize >> shifts) > 65534) shifts++;
+
+         for (j = bbSize-1; j >= 0; j--) {
+            Int32 a2update     = ptr[bbStart + j];
+            UInt16 qVal        = (UInt16)(j >> shifts);
+            quadrant[a2update] = qVal;
+            if (a2update < BZ_N_OVERSHOOT)
+               quadrant[a2update + nblock] = qVal;
+         }
+         AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 );
+      }
+
+   }
+
+   if (verb >= 4)
+      VPrintf3 ( "        %d pointers, %d sorted, %d scanned\n",
+                 nblock, numQSorted, nblock - numQSorted );
+}
+
+#undef BIGFREQ
+#undef SETMASK
+#undef CLEARMASK
+
+
+/*---------------------------------------------*/
+/* Pre:
+      nblock > 0
+      arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]
+      ((UChar*)arr2)  [0 .. nblock-1] holds block
+      arr1 exists for [0 .. nblock-1]
+
+   Post:
+      ((UChar*)arr2) [0 .. nblock-1] holds block
+      All other areas of block destroyed
+      ftab [ 0 .. 65536 ] destroyed
+      arr1 [0 .. nblock-1] holds sorted order
+*/
+void BZ2_blockSort ( EState* s )
+{
+   UInt32* ptr    = s->ptr; 
+   UChar*  block  = s->block;
+   UInt32* ftab   = s->ftab;
+   Int32   nblock = s->nblock;
+   Int32   verb   = s->verbosity;
+   Int32   wfact  = s->workFactor;
+   UInt16* quadrant;
+   Int32   budget;
+   Int32   budgetInit;
+   Int32   i;
+
+   if (nblock < 10000) {
+      fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
+   } else {
+      /* Calculate the location for quadrant, remembering to get
+         the alignment right.  Assumes that &(block[0]) is at least
+         2-byte aligned -- this should be ok since block is really
+         the first section of arr2.
+      */
+      i = nblock+BZ_N_OVERSHOOT;
+      if (i & 1) i++;
+      quadrant = (UInt16*)(&(block[i]));
+
+      /* (wfact-1) / 3 puts the default-factor-30
+         transition point at very roughly the same place as 
+         with v0.1 and v0.9.0.  
+         Not that it particularly matters any more, since the
+         resulting compressed stream is now the same regardless
+         of whether or not we use the main sort or fallback sort.
+      */
+      if (wfact < 1  ) wfact = 1;
+      if (wfact > 100) wfact = 100;
+      budgetInit = nblock * ((wfact-1) / 3);
+      budget = budgetInit;
+
+      mainSort ( ptr, block, quadrant, ftab, nblock, verb, &budget );
+      if (verb >= 3) 
+         VPrintf3 ( "      %d work, %d block, ratio %5.2f\n",
+                    budgetInit - budget,
+                    nblock, 
+                    (float)(budgetInit - budget) /
+                    (float)(nblock==0 ? 1 : nblock) ); 
+      if (budget < 0) {
+         if (verb >= 2) 
+            VPrintf0 ( "    too repetitive; using fallback"
+                       " sorting algorithm\n" );
+         fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
+      }
+   }
+
+   s->origPtr = -1;
+   for (i = 0; i < s->nblock; i++)
+      if (ptr[i] == 0)
+         { s->origPtr = i; break; };
+
+   AssertH( s->origPtr != -1, 1003 );
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                       blocksort.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-common.xsl b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-common.xsl
new file mode 100644
index 000000000..66fcd6fe0
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-common.xsl
@@ -0,0 +1,39 @@
+ 
+
+
+
+ 
+
+
+
+ 
+ 
+   
+    
+      
+     
+  
+
+
+
+
+set       toc,title
+book      toc,title,figure,table,example,equation
+chapter   toc,title
+section   toc
+sect1     toc
+sect2     toc
+sect3     toc
+sect4     nop
+sect5     nop
+qandaset  toc
+qandadiv  nop
+appendix  toc,title
+article/appendix  nop
+article   toc,title
+preface   toc,title
+reference toc,title
+
+
+
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-fo.xsl b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-fo.xsl
new file mode 100644
index 000000000..ba3e30123
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-fo.xsl
@@ -0,0 +1,276 @@
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+      
+     
+   
+
+
+
+
+ 
+
+
+
+
+
+
+  
+
+
+
+
+  blue
+
+
+
+
+  
+    
+  
+
+
+
+  
+    
+  
+
+
+
+
+  
+  
+  
+    
+      
+    
+  
+  
+    
+      
+        
+          
+          
+          
+        
+      
+    
+    
+          
+    
+  
+  
+    
+      
+        
+      
+    
+    
+      
+        
+      
+    
+  
+
+
+
+
+  
+  
+  
+    
+      
+        
+      
+    
+    
+          
+    
+  
+  
+    
+      
+        
+      
+    
+    
+      
+        
+      
+    
+  
+
+
+
+
+
+  
+    
+  
+    
+  
+  
+    
+      
+    
+  
+
+
+
+
+
+  
+  
+  
+  
+    
+      0pt
+    
+  
+  
+    
+      
+      
+      
+        
+          
+            baseline
+             
+               
+            
+          
+          
+            baseline
+            
+              
+                
+                
+                
+                
+              
+            
+          
+        
+      
+    
+  
+  
+  
+    
+      
+    
+    
+      
+    
+    
+      
+    
+  
+
+
+
+
+
+  
+  
+  
+  
+    
+      0pt
+    
+  
+  
+    
+      
+        
+        
+        
+      
+      
+      
+      
+        
+          
+            baseline
+            
+               
+            
+          
+          
+            baseline
+            
+              
+                
+                
+                
+                
+              
+            
+          
+        
+      
+    
+  
+  
+  
+    
+      
+    
+    
+      
+    
+    
+      
+    
+  
+
+
+
+
+
+
+  always
+  
+    
+  
+  
+    
+    pt
+  
+  
+    
+    pt
+  
+  false
+
+
+
+
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-html.xsl b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-html.xsl
new file mode 100644
index 000000000..b6000d586
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bz-html.xsl
@@ -0,0 +1,23 @@
+ 
+ ]>
+
+
+
+
+
+
+
+
+
+
+
+  
+link rel="stylesheet" type="text/css" href="bzip.css" />
+  
+  
+
+
+
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff
new file mode 100644
index 000000000..bd96c27c3
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff
@@ -0,0 +1,76 @@
+#!/bin/sh
+# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
+
+# Bzcmp/diff wrapped for bzip2, 
+# adapted from zdiff by Philippe Troin  for Debian GNU/Linux.
+
+# Bzcmp and bzdiff are used to invoke the cmp or the  diff  pro-
+# gram  on compressed files.  All options specified are passed
+# directly to cmp or diff.  If only 1 file is specified,  then
+# the  files  compared  are file1 and an uncompressed file1.gz.
+# If two files are specified, then they are  uncompressed  (if
+# necessary) and fed to cmp or diff.  The exit status from cmp
+# or diff is preserved.
+
+PATH="/usr/bin:/bin:$PATH"; export PATH
+prog=`echo $0 | sed 's|.*/||'`
+case "$prog" in
+  *cmp) comp=${CMP-cmp}   ;;
+  *)    comp=${DIFF-diff} ;;
+esac
+
+OPTIONS=
+FILES=
+for ARG
+do
+    case "$ARG" in
+    -*)	OPTIONS="$OPTIONS $ARG";;
+     *)	if test -f "$ARG"; then
+            FILES="$FILES $ARG"
+        else
+            echo "${prog}: $ARG not found or not a regular file"
+	    exit 1
+        fi ;;
+    esac
+done
+if test -z "$FILES"; then
+	echo "Usage: $prog [${comp}_options] file [file]"
+	exit 1
+fi
+set $FILES
+if test $# -eq 1; then
+	FILE=`echo "$1" | sed 's/.bz2$//'`
+	bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
+	STAT="$?"
+
+elif test $# -eq 2; then
+	case "$1" in
+        *.bz2)
+                case "$2" in
+	        *.bz2)
+			F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
+			tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
+			      echo 'cannot create a temporary file' >&2
+			      exit 1
+			}
+                        bzip2 -cdfq "$2" > "$tmp"
+                        bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
+                        STAT="$?"
+			/bin/rm -f "$tmp";;
+
+                *)      bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
+                        STAT="$?";;
+                esac;;
+        *)      case "$2" in
+	        *.bz2)
+                        bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
+                        STAT="$?";;
+                *)      $comp $OPTIONS "$1" "$2"
+                        STAT="$?";;
+                esac;;
+	esac
+else
+	echo "Usage: $prog [${comp}_options] file [file]"
+	exit 1
+fi
+exit "$STAT"
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff.1 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff.1
new file mode 100644
index 000000000..adb7a8e72
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzdiff.1
@@ -0,0 +1,47 @@
+\"Shamelessly copied from zmore.1 by Philippe Troin 
+\"for Debian GNU/Linux
+.TH BZDIFF 1
+.SH NAME
+bzcmp, bzdiff \- compare bzip2 compressed files
+.SH SYNOPSIS
+.B bzcmp
+[ cmp_options ] file1
+[ file2 ]
+.br
+.B bzdiff
+[ diff_options ] file1
+[ file2 ]
+.SH DESCRIPTION
+.I  Bzcmp
+and 
+.I bzdiff
+are used to invoke the
+.I cmp
+or the
+.I diff
+program on bzip2 compressed files.  All options specified are passed
+directly to
+.I cmp
+or
+.IR diff "."
+If only 1 file is specified, then the files compared are
+.I file1
+and an uncompressed
+.IR file1 ".bz2."
+If two files are specified, then they are uncompressed if necessary and fed to
+.I cmp
+or
+.IR diff "."
+The exit status from 
+.I cmp
+or
+.I diff
+is preserved.
+.SH "SEE ALSO"
+cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)
+.SH BUGS
+Messages from the
+.I cmp
+or
+.I diff
+programs refer to temporary filenames instead of those specified.
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep
new file mode 100644
index 000000000..0314ca603
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+# Bzgrep wrapped for bzip2, 
+# adapted from zgrep by Philippe Troin  for Debian GNU/Linux.
+## zgrep notice:
+## zgrep -- a wrapper around a grep program that decompresses files as needed
+## Adapted from a version sent by Charles Levert 
+
+PATH="/usr/bin:$PATH"; export PATH
+
+prog=`echo $0 | sed 's|.*/||'`
+case "$prog" in
+	*egrep)	grep=${EGREP-egrep}	;;
+	*fgrep)	grep=${FGREP-fgrep}	;;
+	*)	grep=${GREP-grep}	;;
+esac
+pat=""
+while test $# -ne 0; do
+  case "$1" in
+  -e | -f) opt="$opt $1"; shift; pat="$1"
+           if test "$grep" = grep; then  # grep is buggy with -e on SVR4
+             grep=egrep
+           fi;;
+  -A | -B) opt="$opt $1 $2"; shift;;
+  -*)	   opt="$opt $1";;
+   *)      if test -z "$pat"; then
+	     pat="$1"
+	   else
+	     break;
+           fi;;
+  esac
+  shift
+done
+
+if test -z "$pat"; then
+  echo "grep through bzip2 files"
+  echo "usage: $prog [grep_options] pattern [files]"
+  exit 1
+fi
+
+list=0
+silent=0
+op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
+case "$op" in
+  *l*) list=1
+esac
+case "$op" in
+  *h*) silent=1
+esac
+
+if test $# -eq 0; then
+  bzip2 -cdfq | $grep $opt "$pat"
+  exit $?
+fi
+
+res=0
+for i do
+  if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi
+  if test $list -eq 1; then
+    bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i
+    r=$?
+  elif test $# -eq 1 -o $silent -eq 1; then
+    bzip2 -cdfq "$i" | $grep $opt "$pat"
+    r=$?
+  else
+    j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
+    j=`printf "%s" "$j" | tr '\n' ' '`
+    # A trick adapted from
+    # https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
+    # that has the same effect as the following bash code:
+    # bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
+    # r=${PIPESTATUS[1]}
+    exec 3>&1
+    eval `
+      exec 4>&1 >&3 3>&-
+      {
+        bzip2 -cdfq "$i" 4>&-
+      } | {
+        $grep $opt "$pat" 4>&-; echo "r=$?;" >&4
+      } | sed "s|^|${j}:|"
+    `
+  fi
+  test "$r" -ne 0 && res="$r"
+done
+exit $res
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep.1 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep.1
new file mode 100644
index 000000000..930af8c7f
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzgrep.1
@@ -0,0 +1,56 @@
+\"Shamelessly copied from zmore.1 by Philippe Troin 
+\"for Debian GNU/Linux
+.TH BZGREP 1
+.SH NAME
+bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression
+.SH SYNOPSIS
+.B bzgrep
+[ grep_options ]
+.BI  [\ -e\ ] " pattern"
+.IR filename ".\|.\|."
+.br
+.B bzegrep
+[ egrep_options ]
+.BI  [\ -e\ ] " pattern"
+.IR filename ".\|.\|."
+.br
+.B bzfgrep
+[ fgrep_options ]
+.BI  [\ -e\ ] " pattern"
+.IR filename ".\|.\|."
+.SH DESCRIPTION
+.IR  Bzgrep
+is used to invoke the
+.I grep
+on bzip2-compressed files. All options specified are passed directly to
+.I grep.
+If no file is specified, then the standard input is decompressed
+if necessary and fed to grep.
+Otherwise the given files are uncompressed if necessary and fed to
+.I grep.
+.PP
+If
+.I bzgrep
+is invoked as
+.I bzegrep
+or
+.I bzfgrep
+then
+.I egrep
+or
+.I fgrep
+is used instead of
+.I grep.
+If the GREP environment variable is set,
+.I bzgrep
+uses it as the
+.I grep
+program to be invoked. For example:
+
+    for sh:  GREP=fgrep  bzgrep string files
+    for csh: (setenv GREP fgrep; bzgrep string files)
+.SH AUTHOR
+Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe
+Troin  for Debian GNU/Linux.
+.SH "SEE ALSO"
+grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip.css b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip.css
new file mode 100644
index 000000000..211311838
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip.css
@@ -0,0 +1,74 @@
+/* Colours:
+#74240f  dark brown      h1, h2, h3, h4
+#336699  medium blue     links
+#339999  turquoise       link hover colour
+#202020  almost black    general text
+#761596  purple          md5sum text
+#626262  dark gray       pre border
+#eeeeee  very light gray pre background
+#f2f2f9  very light blue nav table background
+#3366cc  medium blue     nav table border
+*/
+
+a, a:link, a:visited, a:active { color: #336699; }
+a:hover { color: #339999; }
+
+body { font: 80%/126% sans-serif; }
+h1, h2, h3, h4 { color: #74240f; }
+
+dt { color: #336699; font-weight: bold }
+dd { 
+ margin-left: 1.5em; 
+ padding-bottom: 0.8em;
+}
+
+/* -- ruler -- */
+div.hr_blue { 
+  height:  3px; 
+  background:#ffffff url("../images/hr_blue.png") repeat-x; }
+div.hr_blue hr { display:none; }
+
+/* release styles */
+#release p { margin-top: 0.4em; }
+#release .md5sum { color: #761596; }
+
+
+/* ------ styles for docs|manuals|howto ------ */
+/* -- lists -- */
+ul  { 
+ margin:     0px 4px 16px 16px;
+ padding:    0px;
+ list-style: url("../images/li-blue.png"); 
+}
+ul li { 
+ margin-bottom: 10px;
+}
+ul ul	{ 
+ list-style-type:  none; 
+ list-style-image: none; 
+ margin-left:      0px; 
+}
+
+/* header / footer nav tables */
+table.nav {
+ border:     solid 1px #3366cc;
+ background: #f2f2f9;
+ background-color: #f2f2f9;
+ margin-bottom: 0.5em;
+}
+/* don't have underlined links in chunked nav menus */
+table.nav a { text-decoration: none; }
+table.nav a:hover { text-decoration: underline; }
+table.nav td { font-size: 85%; }
+
+code, tt, pre { font-size: 120%; }
+code, tt { color: #761596; }
+
+div.literallayout, pre.programlisting, pre.screen {
+ color:      #000000;
+ padding:    0.5em;
+ background: #eeeeee;
+ border:     1px solid #626262;
+ background-color: #eeeeee;
+ margin: 4px 0px 4px 0px; 
+}
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1
new file mode 100644
index 000000000..0cbcdab00
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1
@@ -0,0 +1,454 @@
+.PU
+.TH bzip2 1
+.SH NAME
+bzip2, bunzip2 \- a block-sorting file compressor, v1.0.8
+.br
+bzcat \- decompresses files to stdout
+.br
+bzip2recover \- recovers data from damaged bzip2 files
+
+.SH SYNOPSIS
+.ll +8
+.B bzip2
+.RB [ " \-cdfkqstvzVL123456789 " ]
+[
+.I "filenames \&..."
+]
+.ll -8
+.br
+.B bunzip2
+.RB [ " \-fkvsVL " ]
+[ 
+.I "filenames \&..."
+]
+.br
+.B bzcat
+.RB [ " \-s " ]
+[ 
+.I "filenames \&..."
+]
+.br
+.B bzip2recover
+.I "filename"
+
+.SH DESCRIPTION
+.I bzip2
+compresses files using the Burrows-Wheeler block sorting
+text compression algorithm, and Huffman coding.  Compression is
+generally considerably better than that achieved by more conventional
+LZ77/LZ78-based compressors, and approaches the performance of the PPM
+family of statistical compressors.
+
+The command-line options are deliberately very similar to 
+those of 
+.I GNU gzip, 
+but they are not identical.
+
+.I bzip2
+expects a list of file names to accompany the
+command-line flags.  Each file is replaced by a compressed version of
+itself, with the name "original_name.bz2".  
+Each compressed file
+has the same modification date, permissions, and, when possible,
+ownership as the corresponding original, so that these properties can
+be correctly restored at decompression time.  File name handling is
+naive in the sense that there is no mechanism for preserving original
+file names, permissions, ownerships or dates in filesystems which lack
+these concepts, or have serious file name length restrictions, such as
+MS-DOS.
+
+.I bzip2
+and
+.I bunzip2
+will by default not overwrite existing
+files.  If you want this to happen, specify the \-f flag.
+
+If no file names are specified,
+.I bzip2
+compresses from standard
+input to standard output.  In this case,
+.I bzip2
+will decline to
+write compressed output to a terminal, as this would be entirely
+incomprehensible and therefore pointless.
+
+.I bunzip2
+(or
+.I bzip2 \-d) 
+decompresses all
+specified files.  Files which were not created by 
+.I bzip2
+will be detected and ignored, and a warning issued.  
+.I bzip2
+attempts to guess the filename for the decompressed file 
+from that of the compressed file as follows:
+
+       filename.bz2    becomes   filename
+       filename.bz     becomes   filename
+       filename.tbz2   becomes   filename.tar
+       filename.tbz    becomes   filename.tar
+       anyothername    becomes   anyothername.out
+
+If the file does not end in one of the recognised endings, 
+.I .bz2, 
+.I .bz, 
+.I .tbz2
+or
+.I .tbz, 
+.I bzip2 
+complains that it cannot
+guess the name of the original file, and uses the original name
+with
+.I .out
+appended.
+
+As with compression, supplying no
+filenames causes decompression from 
+standard input to standard output.
+
+.I bunzip2 
+will correctly decompress a file which is the
+concatenation of two or more compressed files.  The result is the
+concatenation of the corresponding uncompressed files.  Integrity
+testing (\-t) 
+of concatenated 
+compressed files is also supported.
+
+You can also compress or decompress files to the standard output by
+giving the \-c flag.  Multiple files may be compressed and
+decompressed like this.  The resulting outputs are fed sequentially to
+stdout.  Compression of multiple files 
+in this manner generates a stream
+containing multiple compressed file representations.  Such a stream
+can be decompressed correctly only by
+.I bzip2 
+version 0.9.0 or
+later.  Earlier versions of
+.I bzip2
+will stop after decompressing
+the first file in the stream.
+
+.I bzcat
+(or
+.I bzip2 -dc) 
+decompresses all specified files to
+the standard output.
+
+.I bzip2
+will read arguments from the environment variables
+.I BZIP2
+and
+.I BZIP,
+in that order, and will process them
+before any arguments read from the command line.  This gives a 
+convenient way to supply default arguments.
+
+Compression is always performed, even if the compressed 
+file is slightly
+larger than the original.  Files of less than about one hundred bytes
+tend to get larger, since the compression mechanism has a constant
+overhead in the region of 50 bytes.  Random data (including the output
+of most file compressors) is coded at about 8.05 bits per byte, giving
+an expansion of around 0.5%.
+
+As a self-check for your protection, 
+.I 
+bzip2
+uses 32-bit CRCs to
+make sure that the decompressed version of a file is identical to the
+original.  This guards against corruption of the compressed data, and
+against undetected bugs in
+.I bzip2
+(hopefully very unlikely).  The
+chances of data corruption going undetected is microscopic, about one
+chance in four billion for each file processed.  Be aware, though, that
+the check occurs upon decompression, so it can only tell you that
+something is wrong.  It can't help you 
+recover the original uncompressed
+data.  You can use 
+.I bzip2recover
+to try to recover data from
+damaged files.
+
+Return values: 0 for a normal exit, 1 for environmental problems (file
+not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
+compressed file, 3 for an internal consistency error (eg, bug) which
+caused
+.I bzip2
+to panic.
+
+.SH OPTIONS
+.TP
+.B \-c --stdout
+Compress or decompress to standard output.
+.TP
+.B \-d --decompress
+Force decompression.  
+.I bzip2, 
+.I bunzip2 
+and
+.I bzcat 
+are
+really the same program, and the decision about what actions to take is
+done on the basis of which name is used.  This flag overrides that
+mechanism, and forces 
+.I bzip2
+to decompress.
+.TP
+.B \-z --compress
+The complement to \-d: forces compression, regardless of the
+invocation name.
+.TP
+.B \-t --test
+Check integrity of the specified file(s), but don't decompress them.
+This really performs a trial decompression and throws away the result.
+.TP
+.B \-f --force
+Force overwrite of output files.  Normally,
+.I bzip2 
+will not overwrite
+existing output files.  Also forces 
+.I bzip2 
+to break hard links
+to files, which it otherwise wouldn't do.
+
+bzip2 normally declines to decompress files which don't have the
+correct magic header bytes.  If forced (-f), however, it will pass
+such files through unmodified.  This is how GNU gzip behaves.
+.TP
+.B \-k --keep
+Keep (don't delete) input files during compression
+or decompression.
+.TP
+.B \-s --small
+Reduce memory usage, for compression, decompression and testing.  Files
+are decompressed and tested using a modified algorithm which only
+requires 2.5 bytes per block byte.  This means any file can be
+decompressed in 2300k of memory, albeit at about half the normal speed.
+
+During compression, \-s selects a block size of 200k, which limits
+memory use to around the same figure, at the expense of your compression
+ratio.  In short, if your machine is low on memory (8 megabytes or
+less), use \-s for everything.  See MEMORY MANAGEMENT below.
+.TP
+.B \-q --quiet
+Suppress non-essential warning messages.  Messages pertaining to
+I/O errors and other critical events will not be suppressed.
+.TP
+.B \-v --verbose
+Verbose mode -- show the compression ratio for each file processed.
+Further \-v's increase the verbosity level, spewing out lots of
+information which is primarily of interest for diagnostic purposes.
+.TP
+.B \-L --license -V --version
+Display the software version, license terms and conditions.
+.TP
+.B \-1 (or \-\-fast) to \-9 (or \-\-best)
+Set the block size to 100 k, 200 k ..  900 k when compressing.  Has no
+effect when decompressing.  See MEMORY MANAGEMENT below.
+The \-\-fast and \-\-best aliases are primarily for GNU gzip 
+compatibility.  In particular, \-\-fast doesn't make things
+significantly faster.  
+And \-\-best merely selects the default behaviour.
+.TP
+.B \--
+Treats all subsequent arguments as file names, even if they start
+with a dash.  This is so you can handle files with names beginning
+with a dash, for example: bzip2 \-- \-myfilename.
+.TP
+.B \--repetitive-fast --repetitive-best
+These flags are redundant in versions 0.9.5 and above.  They provided
+some coarse control over the behaviour of the sorting algorithm in
+earlier versions, which was sometimes useful.  0.9.5 and above have an
+improved algorithm which renders these flags irrelevant.
+
+.SH MEMORY MANAGEMENT
+.I bzip2 
+compresses large files in blocks.  The block size affects
+both the compression ratio achieved, and the amount of memory needed for
+compression and decompression.  The flags \-1 through \-9
+specify the block size to be 100,000 bytes through 900,000 bytes (the
+default) respectively.  At decompression time, the block size used for
+compression is read from the header of the compressed file, and
+.I bunzip2
+then allocates itself just enough memory to decompress
+the file.  Since block sizes are stored in compressed files, it follows
+that the flags \-1 to \-9 are irrelevant to and so ignored
+during decompression.
+
+Compression and decompression requirements, 
+in bytes, can be estimated as:
+
+       Compression:   400k + ( 8 x block size )
+
+       Decompression: 100k + ( 4 x block size ), or
+                      100k + ( 2.5 x block size )
+
+Larger block sizes give rapidly diminishing marginal returns.  Most of
+the compression comes from the first two or three hundred k of block
+size, a fact worth bearing in mind when using
+.I bzip2
+on small machines.
+It is also important to appreciate that the decompression memory
+requirement is set at compression time by the choice of block size.
+
+For files compressed with the default 900k block size,
+.I bunzip2
+will require about 3700 kbytes to decompress.  To support decompression
+of any file on a 4 megabyte machine, 
+.I bunzip2
+has an option to
+decompress using approximately half this amount of memory, about 2300
+kbytes.  Decompression speed is also halved, so you should use this
+option only where necessary.  The relevant flag is -s.
+
+In general, try and use the largest block size memory constraints allow,
+since that maximises the compression achieved.  Compression and
+decompression speed are virtually unaffected by block size.
+
+Another significant point applies to files which fit in a single block
+-- that means most files you'd encounter using a large block size.  The
+amount of real memory touched is proportional to the size of the file,
+since the file is smaller than a block.  For example, compressing a file
+20,000 bytes long with the flag -9 will cause the compressor to
+allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
+kbytes of it.  Similarly, the decompressor will allocate 3700k but only
+touch 100k + 20000 * 4 = 180 kbytes.
+
+Here is a table which summarises the maximum memory usage for different
+block sizes.  Also recorded is the total compressed size for 14 files of
+the Calgary Text Compression Corpus totalling 3,141,622 bytes.  This
+column gives some feel for how compression varies with block size.
+These figures tend to understate the advantage of larger block sizes for
+larger files, since the Corpus is dominated by smaller files.
+
+           Compress   Decompress   Decompress   Corpus
+    Flag     usage      usage       -s usage     Size
+
+     -1      1200k       500k         350k      914704
+     -2      2000k       900k         600k      877703
+     -3      2800k      1300k         850k      860338
+     -4      3600k      1700k        1100k      846899
+     -5      4400k      2100k        1350k      845160
+     -6      5200k      2500k        1600k      838626
+     -7      6100k      2900k        1850k      834096
+     -8      6800k      3300k        2100k      828642
+     -9      7600k      3700k        2350k      828642
+
+.SH RECOVERING DATA FROM DAMAGED FILES
+.I bzip2
+compresses files in blocks, usually 900kbytes long.  Each
+block is handled independently.  If a media or transmission error causes
+a multi-block .bz2
+file to become damaged, it may be possible to
+recover data from the undamaged blocks in the file.
+
+The compressed representation of each block is delimited by a 48-bit
+pattern, which makes it possible to find the block boundaries with
+reasonable certainty.  Each block also carries its own 32-bit CRC, so
+damaged blocks can be distinguished from undamaged ones.
+
+.I bzip2recover
+is a simple program whose purpose is to search for
+blocks in .bz2 files, and write each block out into its own .bz2 
+file.  You can then use
+.I bzip2 
+\-t
+to test the
+integrity of the resulting files, and decompress those which are
+undamaged.
+
+.I bzip2recover
+takes a single argument, the name of the damaged file, 
+and writes a number of files "rec00001file.bz2",
+"rec00002file.bz2", etc, containing the  extracted  blocks.
+The  output  filenames  are  designed  so  that the use of
+wildcards in subsequent processing -- for example,  
+"bzip2 -dc  rec*file.bz2 > recovered_data" -- processes the files in
+the correct order.
+
+.I bzip2recover
+should be of most use dealing with large .bz2
+files,  as  these will contain many blocks.  It is clearly
+futile to use it on damaged single-block  files,  since  a
+damaged  block  cannot  be recovered.  If you wish to minimise 
+any potential data loss through media  or  transmission errors, 
+you might consider compressing with a smaller
+block size.
+
+.SH PERFORMANCE NOTES
+The sorting phase of compression gathers together similar strings in the
+file.  Because of this, files containing very long runs of repeated
+symbols, like "aabaabaabaab ..."  (repeated several hundred times) may
+compress more slowly than normal.  Versions 0.9.5 and above fare much
+better than previous versions in this respect.  The ratio between
+worst-case and average-case compression time is in the region of 10:1.
+For previous versions, this figure was more like 100:1.  You can use the
+\-vvvv option to monitor progress in great detail, if you want.
+
+Decompression speed is unaffected by these phenomena.
+
+.I bzip2
+usually allocates several megabytes of memory to operate
+in, and then charges all over it in a fairly random fashion.  This means
+that performance, both for compressing and decompressing, is largely
+determined by the speed at which your machine can service cache misses.
+Because of this, small changes to the code to reduce the miss rate have
+been observed to give disproportionately large performance improvements.
+I imagine 
+.I bzip2
+will perform best on machines with very large caches.
+
+.SH CAVEATS
+I/O error messages are not as helpful as they could be.
+.I bzip2
+tries hard to detect I/O errors and exit cleanly, but the details of
+what the problem is sometimes seem rather misleading.
+
+This manual page pertains to version 1.0.8 of
+.I bzip2.  
+Compressed data created by this version is entirely forwards and
+backwards compatible with the previous public releases, versions
+0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following
+exception: 0.9.0 and above can correctly decompress multiple
+concatenated compressed files.  0.1pl2 cannot do this; it will stop
+after decompressing just the first file in the stream.
+
+.I bzip2recover
+versions prior to 1.0.2 used 32-bit integers to represent
+bit positions in compressed files, so they could not handle compressed
+files more than 512 megabytes long.  Versions 1.0.2 and above use
+64-bit ints on some platforms which support them (GNU supported
+targets, and Windows).  To establish whether or not bzip2recover was
+built with such a limitation, run it without arguments.  In any event
+you can build yourself an unlimited version if you can recompile it
+with MaybeUInt64 set to be an unsigned 64-bit integer.
+
+
+
+.SH AUTHOR
+Julian Seward, jseward@acm.org.
+
+https://sourceware.org/bzip2/
+
+The ideas embodied in
+.I bzip2
+are due to (at least) the following
+people: Michael Burrows and David Wheeler (for the block sorting
+transformation), David Wheeler (again, for the Huffman coder), Peter
+Fenwick (for the structured coding model in the original
+.I bzip,
+and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
+(for the arithmetic coder in the original
+.I bzip).  
+I am much
+indebted for their help, support and advice.  See the manual in the
+source distribution for pointers to sources of documentation.  Christian
+von Roques encouraged me to look for faster sorting algorithms, so as to
+speed up compression.  Bela Lubkin encouraged me to improve the
+worst-case compression performance.  
+Donna Robinson XMLised the documentation.
+The bz* scripts are derived from those of GNU gzip.
+Many people sent patches, helped
+with portability problems, lent machines, gave advice and were generally
+helpful.
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1.preformatted b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1.preformatted
new file mode 100644
index 000000000..787f1c614
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.1.preformatted
@@ -0,0 +1,399 @@
+bzip2(1)                                                 bzip2(1)
+
+
+
+NNAAMMEE
+       bzip2, bunzip2 − a block‐sorting file compressor, v1.0.8
+       bzcat − decompresses files to stdout
+       bzip2recover − recovers data from damaged bzip2 files
+
+
+SSYYNNOOPPSSIISS
+       bbzziipp22 [ −−ccddffkkqqssttvvzzVVLL112233445566778899 ] [ _f_i_l_e_n_a_m_e_s _._._.  ]
+       bbuunnzziipp22 [ −−ffkkvvssVVLL ] [ _f_i_l_e_n_a_m_e_s _._._.  ]
+       bbzzccaatt [ −−ss ] [ _f_i_l_e_n_a_m_e_s _._._.  ]
+       bbzziipp22rreeccoovveerr _f_i_l_e_n_a_m_e
+
+
+DDEESSCCRRIIPPTTIIOONN
+       _b_z_i_p_2  compresses  files  using  the Burrows‐Wheeler block
+       sorting text compression algorithm,  and  Huffman  coding.
+       Compression  is  generally  considerably  better than that
+       achieved by more conventional LZ77/LZ78‐based compressors,
+       and  approaches  the performance of the PPM family of sta­
+       tistical compressors.
+
+       The command‐line options are deliberately very similar  to
+       those of _G_N_U _g_z_i_p_, but they are not identical.
+
+       _b_z_i_p_2  expects  a list of file names to accompany the com­
+       mand‐line flags.  Each file is replaced  by  a  compressed
+       version  of  itself,  with  the  name "original_name.bz2".
+       Each compressed file has the same modification date,  per­
+       missions, and, when possible, ownership as the correspond­
+       ing original, so that these properties  can  be  correctly
+       restored  at  decompression  time.   File name handling is
+       naive in the sense that there is no mechanism for preserv­
+       ing  original file names, permissions, ownerships or dates
+       in filesystems which lack these concepts, or have  serious
+       file name length restrictions, such as MS‐DOS.
+
+       _b_z_i_p_2  and  _b_u_n_z_i_p_2 will by default not overwrite existing
+       files.  If you want this to happen, specify the −f flag.
+
+       If no file names  are  specified,  _b_z_i_p_2  compresses  from
+       standard  input  to  standard output.  In this case, _b_z_i_p_2
+       will decline to write compressed output to a terminal,  as
+       this  would  be  entirely  incomprehensible  and therefore
+       pointless.
+
+       _b_u_n_z_i_p_2 (or _b_z_i_p_2 _−_d_) decompresses  all  specified  files.
+       Files which were not created by _b_z_i_p_2 will be detected and
+       ignored, and a warning issued.  _b_z_i_p_2  attempts  to  guess
+       the  filename  for  the decompressed file from that of the
+       compressed file as follows:
+
+              filename.bz2    becomes   filename
+              filename.bz     becomes   filename
+              filename.tbz2   becomes   filename.tar
+              filename.tbz    becomes   filename.tar
+              anyothername    becomes   anyothername.out
+
+       If the file does not end in one of the recognised endings,
+       _._b_z_2_,  _._b_z_,  _._t_b_z_2 or _._t_b_z_, _b_z_i_p_2 complains that it cannot
+       guess the name of the original file, and uses the original
+       name with _._o_u_t appended.
+
+       As  with compression, supplying no filenames causes decom­
+       pression from standard input to standard output.
+
+       _b_u_n_z_i_p_2 will correctly decompress a file which is the con­
+       catenation of two or more compressed files.  The result is
+       the concatenation of the corresponding uncompressed files.
+       Integrity testing (−t) of concatenated compressed files is
+       also supported.
+
+       You can also compress or decompress files to the  standard
+       output  by giving the −c flag.  Multiple files may be com­
+       pressed and decompressed like this.  The resulting outputs
+       are  fed  sequentially to stdout.  Compression of multiple
+       files in this manner generates a stream containing  multi­
+       ple compressed file representations.  Such a stream can be
+       decompressed correctly only  by  _b_z_i_p_2  version  0.9.0  or
+       later.   Earlier  versions of _b_z_i_p_2 will stop after decom­
+       pressing the first file in the stream.
+
+       _b_z_c_a_t (or _b_z_i_p_2 _‐_d_c_) decompresses all specified  files  to
+       the standard output.
+
+       _b_z_i_p_2  will  read arguments from the environment variables
+       _B_Z_I_P_2 and _B_Z_I_P_, in  that  order,  and  will  process  them
+       before  any  arguments  read  from the command line.  This
+       gives a convenient way to supply default arguments.
+
+       Compression is always performed, even  if  the  compressed
+       file  is slightly larger than the original.  Files of less
+       than about one hundred bytes tend to get larger, since the
+       compression  mechanism  has  a  constant  overhead  in the
+       region of 50 bytes.  Random data (including the output  of
+       most  file  compressors)  is  coded at about 8.05 bits per
+       byte, giving an expansion of around 0.5%.
+
+       As a self‐check for your  protection,  _b_z_i_p_2  uses  32‐bit
+       CRCs  to make sure that the decompressed version of a file
+       is identical to the original.  This guards against corrup­
+       tion  of  the compressed data, and against undetected bugs
+       in _b_z_i_p_2 (hopefully very unlikely).  The chances  of  data
+       corruption  going  undetected  is  microscopic,  about one
+       chance in four billion for each file processed.  Be aware,
+       though,  that  the  check occurs upon decompression, so it
+       can only tell you that something is wrong.  It can’t  help
+       you  recover  the original uncompressed data.  You can use
+       _b_z_i_p_2_r_e_c_o_v_e_r to try to recover data from damaged files.
+
+       Return values: 0 for a normal exit,  1  for  environmental
+       problems  (file not found, invalid flags, I/O errors, &c),
+       2 to indicate a corrupt compressed file, 3 for an internal
+       consistency error (eg, bug) which caused _b_z_i_p_2 to panic.
+
+
+OOPPTTIIOONNSS
+       −−cc ‐‐‐‐ssttddoouutt
+              Compress or decompress to standard output.
+
+       −−dd ‐‐‐‐ddeeccoommpprreessss
+              Force  decompression.  _b_z_i_p_2_, _b_u_n_z_i_p_2 and _b_z_c_a_t are
+              really the same program,  and  the  decision  about
+              what  actions to take is done on the basis of which
+              name is used.  This flag overrides that  mechanism,
+              and forces _b_z_i_p_2 to decompress.
+
+       −−zz ‐‐‐‐ccoommpprreessss
+              The   complement   to   −d:   forces   compression,
+              regardless of the invocation name.
+
+       −−tt ‐‐‐‐tteesstt
+              Check integrity of the specified file(s), but don’t
+              decompress  them.   This  really  performs  a trial
+              decompression and throws away the result.
+
+       −−ff ‐‐‐‐ffoorrccee
+              Force overwrite of output files.   Normally,  _b_z_i_p_2
+              will  not  overwrite  existing  output files.  Also
+              forces _b_z_i_p_2 to break hard links to files, which it
+              otherwise wouldn’t do.
+
+              bzip2  normally  declines to decompress files which
+              don’t have the  correct  magic  header  bytes.   If
+              forced  (‐f),  however,  it  will  pass  such files
+              through unmodified.  This is how GNU gzip  behaves.
+
+       −−kk ‐‐‐‐kkeeeepp
+              Keep  (don’t delete) input files during compression
+              or decompression.
+
+       −−ss ‐‐‐‐ssmmaallll
+              Reduce memory usage, for compression, decompression
+              and  testing.   Files  are  decompressed and tested
+              using a modified algorithm which only requires  2.5
+              bytes  per  block byte.  This means any file can be
+              decompressed in 2300k of memory,  albeit  at  about
+              half the normal speed.
+
+              During  compression,  −s  selects  a  block size of
+              200k, which limits memory use to  around  the  same
+              figure,  at  the expense of your compression ratio.
+              In short, if your  machine  is  low  on  memory  (8
+              megabytes  or  less),  use  −s for everything.  See
+              MEMORY MANAGEMENT below.
+
+       −−qq ‐‐‐‐qquuiieett
+              Suppress non‐essential warning messages.   Messages
+              pertaining  to I/O errors and other critical events
+              will not be suppressed.
+
+       −−vv ‐‐‐‐vveerrbboossee
+              Verbose mode ‐‐ show the compression ratio for each
+              file  processed.   Further  −v’s  increase the ver­
+              bosity level, spewing out lots of information which
+              is primarily of interest for diagnostic purposes.
+
+       −−LL ‐‐‐‐lliicceennssee ‐‐VV ‐‐‐‐vveerrssiioonn
+              Display  the  software  version,  license terms and
+              conditions.
+
+       −−11 ((oorr −−−−ffaasstt)) ttoo −−99 ((oorr −−−−bbeesstt))
+              Set the block size to 100 k, 200 k ..  900  k  when
+              compressing.   Has  no  effect  when decompressing.
+              See MEMORY MANAGEMENT below.  The −−fast and −−best
+              aliases  are  primarily for GNU gzip compatibility.
+              In particular, −−fast doesn’t make things  signifi­
+              cantly  faster.   And  −−best  merely  selects  the
+              default behaviour.
+
+       −−‐‐     Treats all subsequent arguments as file names, even
+              if they start with a dash.  This is so you can han­
+              dle files with names beginning  with  a  dash,  for
+              example: bzip2 −‐ −myfilename.
+
+       −−‐‐rreeppeettiittiivvee‐‐ffaasstt ‐‐‐‐rreeppeettiittiivvee‐‐bbeesstt
+              These  flags  are  redundant  in versions 0.9.5 and
+              above.  They provided some coarse control over  the
+              behaviour  of the sorting algorithm in earlier ver­
+              sions, which was sometimes useful.  0.9.5 and above
+              have  an  improved  algorithm  which  renders these
+              flags irrelevant.
+
+
+MMEEMMOORRYY MMAANNAAGGEEMMEENNTT
+       _b_z_i_p_2 compresses large files in blocks.   The  block  size
+       affects  both  the  compression  ratio  achieved,  and the
+       amount of memory needed for compression and decompression.
+       The  flags  −1  through  −9  specify  the block size to be
+       100,000 bytes through 900,000 bytes (the default)  respec­
+       tively.   At  decompression  time, the block size used for
+       compression is read from  the  header  of  the  compressed
+       file, and _b_u_n_z_i_p_2 then allocates itself just enough memory
+       to decompress the file.  Since block sizes are  stored  in
+       compressed  files,  it follows that the flags −1 to −9 are
+       irrelevant to and so ignored during decompression.
+
+       Compression and decompression requirements, in bytes,  can
+       be estimated as:
+
+              Compression:   400k + ( 8 x block size )
+
+              Decompression: 100k + ( 4 x block size ), or
+                             100k + ( 2.5 x block size )
+
+       Larger  block  sizes  give  rapidly  diminishing  marginal
+       returns.  Most of the compression comes from the first two
+       or  three hundred k of block size, a fact worth bearing in
+       mind when using _b_z_i_p_2  on  small  machines.   It  is  also
+       important  to  appreciate  that  the  decompression memory
+       requirement is set at compression time by  the  choice  of
+       block size.
+
+       For  files  compressed  with  the default 900k block size,
+       _b_u_n_z_i_p_2 will require about 3700 kbytes to decompress.   To
+       support decompression of any file on a 4 megabyte machine,
+       _b_u_n_z_i_p_2 has an option to  decompress  using  approximately
+       half this amount of memory, about 2300 kbytes.  Decompres­
+       sion speed is also halved, so you should use  this  option
+       only where necessary.  The relevant flag is ‐s.
+
+       In general, try and use the largest block size memory con­
+       straints  allow,  since  that  maximises  the  compression
+       achieved.   Compression and decompression speed are virtu­
+       ally unaffected by block size.
+
+       Another significant point applies to files which fit in  a
+       single  block  ‐‐  that  means  most files you’d encounter
+       using a large block  size.   The  amount  of  real  memory
+       touched is proportional to the size of the file, since the
+       file is smaller than a block.  For example, compressing  a
+       file  20,000  bytes  long  with the flag ‐9 will cause the
+       compressor to allocate around 7600k of  memory,  but  only
+       touch 400k + 20000 * 8 = 560 kbytes of it.  Similarly, the
+       decompressor will allocate 3700k but  only  touch  100k  +
+       20000 * 4 = 180 kbytes.
+
+       Here  is a table which summarises the maximum memory usage
+       for different block sizes.  Also  recorded  is  the  total
+       compressed  size for 14 files of the Calgary Text Compres­
+       sion Corpus totalling 3,141,622 bytes.  This column  gives
+       some  feel  for  how  compression  varies with block size.
+       These figures tend to understate the advantage  of  larger
+       block  sizes  for  larger files, since the Corpus is domi­
+       nated by smaller files.
+
+                  Compress   Decompress   Decompress   Corpus
+           Flag     usage      usage       ‐s usage     Size
+
+            ‐1      1200k       500k         350k      914704
+            ‐2      2000k       900k         600k      877703
+            ‐3      2800k      1300k         850k      860338
+            ‐4      3600k      1700k        1100k      846899
+            ‐5      4400k      2100k        1350k      845160
+            ‐6      5200k      2500k        1600k      838626
+            ‐7      6100k      2900k        1850k      834096
+            ‐8      6800k      3300k        2100k      828642
+            ‐9      7600k      3700k        2350k      828642
+
+
+RREECCOOVVEERRIINNGG DDAATTAA FFRROOMM DDAAMMAAGGEEDD FFIILLEESS
+       _b_z_i_p_2 compresses files in blocks, usually 900kbytes  long.
+       Each block is handled independently.  If a media or trans­
+       mission error causes a multi‐block  .bz2  file  to  become
+       damaged,  it  may  be  possible  to  recover data from the
+       undamaged blocks in the file.
+
+       The compressed representation of each block  is  delimited
+       by  a  48‐bit pattern, which makes it possible to find the
+       block boundaries with reasonable  certainty.   Each  block
+       also  carries its own 32‐bit CRC, so damaged blocks can be
+       distinguished from undamaged ones.
+
+       _b_z_i_p_2_r_e_c_o_v_e_r is a  simple  program  whose  purpose  is  to
+       search  for blocks in .bz2 files, and write each block out
+       into its own .bz2 file.  You can then use _b_z_i_p_2 −t to test
+       the integrity of the resulting files, and decompress those
+       which are undamaged.
+
+       _b_z_i_p_2_r_e_c_o_v_e_r takes a single argument, the name of the dam­
+       aged    file,    and    writes    a    number   of   files
+       "rec00001file.bz2",  "rec00002file.bz2",  etc,  containing
+       the   extracted   blocks.   The   output   filenames   are
+       designed  so  that the use of wildcards in subsequent pro­
+       cessing  ‐‐ for example, "bzip2 ‐dc  rec*file.bz2 > recov­
+       ered_data" ‐‐ processes the files in the correct order.
+
+       _b_z_i_p_2_r_e_c_o_v_e_r should be of most use dealing with large .bz2
+       files,  as  these will contain many blocks.  It is clearly
+       futile to use it on damaged single‐block  files,  since  a
+       damaged  block  cannot  be recovered.  If you wish to min­
+       imise any potential data loss through media  or  transmis­
+       sion errors, you might consider compressing with a smaller
+       block size.
+
+
+PPEERRFFOORRMMAANNCCEE NNOOTTEESS
+       The sorting phase of compression gathers together  similar
+       strings  in  the  file.  Because of this, files containing
+       very long runs of  repeated  symbols,  like  "aabaabaabaab
+       ..."   (repeated  several hundred times) may compress more
+       slowly than normal.  Versions 0.9.5 and  above  fare  much
+       better  than previous versions in this respect.  The ratio
+       between worst‐case and average‐case compression time is in
+       the  region  of  10:1.  For previous versions, this figure
+       was more like 100:1.  You can use the −vvvv option to mon­
+       itor progress in great detail, if you want.
+
+       Decompression speed is unaffected by these phenomena.
+
+       _b_z_i_p_2  usually  allocates  several  megabytes of memory to
+       operate in, and then charges all over it in a fairly  ran­
+       dom  fashion.   This means that performance, both for com­
+       pressing and decompressing, is largely determined  by  the
+       speed  at  which  your  machine  can service cache misses.
+       Because of this, small changes to the code to  reduce  the
+       miss  rate  have  been observed to give disproportionately
+       large performance improvements.  I imagine _b_z_i_p_2 will per­
+       form best on machines with very large caches.
+
+
+CCAAVVEEAATTSS
+       I/O  error  messages  are not as helpful as they could be.
+       _b_z_i_p_2 tries hard to detect I/O errors  and  exit  cleanly,
+       but  the  details  of  what  the problem is sometimes seem
+       rather misleading.
+
+       This manual page pertains to version 1.0.8 of _b_z_i_p_2_.  Com­
+       pressed  data created by this version is entirely forwards
+       and  backwards  compatible  with   the   previous   public
+       releases,  versions  0.1pl2,  0.9.0,  0.9.5, 1.0.0, 1.0.1, 
+       1.0.2 and above, but with the  following  exception: 0.9.0
+       and above can  correctly decompress  multiple concatenated
+       compressed files.  0.1pl2  cannot do this;  it  will  stop 
+       after  decompressing just the first file in the stream.
+
+       _b_z_i_p_2_r_e_c_o_v_e_r  versions prior to 1.0.2 used 32‐bit integers
+       to represent bit positions in compressed  files,  so  they
+       could  not handle compressed files more than 512 megabytes
+       long.  Versions 1.0.2 and above use 64‐bit  ints  on  some
+       platforms  which  support them (GNU supported targets, and
+       Windows).  To establish whether or  not  bzip2recover  was
+       built  with  such  a limitation, run it without arguments.
+       In any event you can build yourself an  unlimited  version
+       if  you  can  recompile  it  with MaybeUInt64 set to be an
+       unsigned 64‐bit integer.
+
+
+
+
+AAUUTTHHOORR
+       Julian Seward, jseward@acm.org.
+
+       https://sourceware.org/bzip2/
+
+       The ideas embodied in _b_z_i_p_2 are due to (at least) the fol­
+       lowing  people: Michael Burrows and David Wheeler (for the
+       block sorting transformation), David Wheeler  (again,  for
+       the Huffman coder), Peter Fenwick (for the structured cod­
+       ing model in the original _b_z_i_p_, and many refinements), and
+       Alistair  Moffat,  Radford  Neal  and  Ian Witten (for the
+       arithmetic  coder  in  the  original  _b_z_i_p_)_.   I  am  much
+       indebted for their help, support and advice.  See the man­
+       ual in the source distribution for pointers to sources  of
+       documentation.  Christian von Roques encouraged me to look
+       for faster sorting algorithms, so as to speed up  compres­
+       sion.  Bela Lubkin encouraged me to improve the worst‐case
+       compression performance.  Donna Robinson XMLised the docu­
+       mentation.   The bz* scripts are derived from those of GNU
+       gzip.  Many people sent patches, helped  with  portability
+       problems,  lent  machines,  gave advice and were generally
+       helpful.
+
+
+
+                                                         bzip2(1)
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.c
new file mode 100644
index 000000000..d95d28061
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.c
@@ -0,0 +1,2036 @@
+
+/*-----------------------------------------------------------*/
+/*--- A block-sorting, lossless compressor        bzip2.c ---*/
+/*-----------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+/* Place a 1 beside your platform, and 0 elsewhere.
+   Generic 32-bit Unix.
+   Also works on 64-bit Unix boxes.
+   This is the default.
+*/
+#define BZ_UNIX      1
+
+/*--
+  Win32, as seen by Jacob Navia's excellent
+  port of (Chris Fraser & David Hanson)'s excellent
+  lcc compiler.  Or with MS Visual C.
+  This is selected automatically if compiled by a compiler which
+  defines _WIN32, not including the Cygwin GCC.
+--*/
+#define BZ_LCCWIN32  0
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#undef  BZ_LCCWIN32
+#define BZ_LCCWIN32 1
+#undef  BZ_UNIX
+#define BZ_UNIX 0
+#endif
+
+
+/*---------------------------------------------*/
+/*--
+  Some stuff for all platforms.
+--*/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "bzlib.h"
+
+#define ERROR_IF_EOF(i)       { if ((i) == EOF)  ioError(); }
+#define ERROR_IF_NOT_ZERO(i)  { if ((i) != 0)    ioError(); }
+#define ERROR_IF_MINUS_ONE(i) { if ((i) == (-1)) ioError(); }
+
+
+/*---------------------------------------------*/
+/*--
+   Platform-specific stuff.
+--*/
+
+#if BZ_UNIX
+#   include 
+#   include 
+#   include 
+#   include 
+#   include 
+#   include 
+
+#   define PATH_SEP    '/'
+#   define MY_LSTAT    lstat
+#   define MY_STAT     stat
+#   define MY_S_ISREG  S_ISREG
+#   define MY_S_ISDIR  S_ISDIR
+
+#   define APPEND_FILESPEC(root, name) \
+      root=snocString((root), (name))
+
+#   define APPEND_FLAG(root, name) \
+      root=snocString((root), (name))
+
+#   define SET_BINARY_MODE(fd) /**/
+
+#   ifdef __GNUC__
+#      define NORETURN __attribute__ ((noreturn))
+#   else
+#      define NORETURN /**/
+#   endif
+
+#   ifdef __DJGPP__
+#     include 
+#     include 
+#     undef MY_LSTAT
+#     undef MY_STAT
+#     define MY_LSTAT stat
+#     define MY_STAT stat
+#     undef SET_BINARY_MODE
+#     define SET_BINARY_MODE(fd)                        \
+        do {                                            \
+           int retVal = setmode ( fileno ( fd ),        \
+                                  O_BINARY );           \
+           ERROR_IF_MINUS_ONE ( retVal );               \
+        } while ( 0 )
+#   endif
+
+#   ifdef __CYGWIN__
+#     include 
+#     include 
+#     undef SET_BINARY_MODE
+#     define SET_BINARY_MODE(fd)                        \
+        do {                                            \
+           int retVal = setmode ( fileno ( fd ),        \
+                                  O_BINARY );           \
+           ERROR_IF_MINUS_ONE ( retVal );               \
+        } while ( 0 )
+#   endif
+#endif /* BZ_UNIX */
+
+
+
+#if BZ_LCCWIN32
+#   include 
+#   include 
+#   include 
+
+#   define NORETURN       /**/
+#   define PATH_SEP       '\\'
+#   define MY_LSTAT       _stati64
+#   define MY_STAT        _stati64
+#   define MY_S_ISREG(x)  ((x) & _S_IFREG)
+#   define MY_S_ISDIR(x)  ((x) & _S_IFDIR)
+
+#   define APPEND_FLAG(root, name) \
+      root=snocString((root), (name))
+
+#   define APPEND_FILESPEC(root, name)                \
+      root = snocString ((root), (name))
+
+#   define SET_BINARY_MODE(fd)                        \
+      do {                                            \
+         int retVal = setmode ( fileno ( fd ),        \
+                                O_BINARY );           \
+         ERROR_IF_MINUS_ONE ( retVal );               \
+      } while ( 0 )
+
+#endif /* BZ_LCCWIN32 */
+
+
+/*---------------------------------------------*/
+/*--
+  Some more stuff for all platforms :-)
+--*/
+
+typedef char            Char;
+typedef unsigned char   Bool;
+typedef unsigned char   UChar;
+typedef int             Int32;
+typedef unsigned int    UInt32;
+typedef short           Int16;
+typedef unsigned short  UInt16;
+                                       
+#define True  ((Bool)1)
+#define False ((Bool)0)
+
+/*--
+  IntNative is your platform's `native' int size.
+  Only here to avoid probs with 64-bit platforms.
+--*/
+typedef int IntNative;
+
+
+/*---------------------------------------------------*/
+/*--- Misc (file handling) data decls             ---*/
+/*---------------------------------------------------*/
+
+Int32   verbosity;
+Bool    keepInputFiles, smallMode, deleteOutputOnInterrupt;
+Bool    forceOverwrite, testFailsExist, unzFailsExist, noisy;
+Int32   numFileNames, numFilesProcessed, blockSize100k;
+Int32   exitValue;
+
+/*-- source modes; F==file, I==stdin, O==stdout --*/
+#define SM_I2O           1
+#define SM_F2O           2
+#define SM_F2F           3
+
+/*-- operation modes --*/
+#define OM_Z             1
+#define OM_UNZ           2
+#define OM_TEST          3
+
+Int32   opMode;
+Int32   srcMode;
+
+#define FILE_NAME_LEN 1034
+
+Int32   longestFileName;
+Char    inName [FILE_NAME_LEN];
+Char    outName[FILE_NAME_LEN];
+Char    tmpName[FILE_NAME_LEN];
+Char    *progName;
+Char    progNameReally[FILE_NAME_LEN];
+FILE    *outputHandleJustInCase;
+Int32   workFactor;
+
+static void    panic                 ( const Char* ) NORETURN;
+static void    ioError               ( void )        NORETURN;
+static void    outOfMemory           ( void )        NORETURN;
+static void    configError           ( void )        NORETURN;
+static void    crcError              ( void )        NORETURN;
+static void    cleanUpAndFail        ( Int32 )       NORETURN;
+static void    compressedStreamEOF   ( void )        NORETURN;
+
+static void    copyFileName ( Char*, Char* );
+static void*   myMalloc     ( Int32 );
+static void    applySavedFileAttrToOutputFile ( IntNative fd );
+
+
+
+/*---------------------------------------------------*/
+/*--- An implementation of 64-bit ints.  Sigh.    ---*/
+/*--- Roll on widespread deployment of ANSI C9X ! ---*/
+/*---------------------------------------------------*/
+
+typedef
+   struct { UChar b[8]; } 
+   UInt64;
+
+
+static
+void uInt64_from_UInt32s ( UInt64* n, UInt32 lo32, UInt32 hi32 )
+{
+   n->b[7] = (UChar)((hi32 >> 24) & 0xFF);
+   n->b[6] = (UChar)((hi32 >> 16) & 0xFF);
+   n->b[5] = (UChar)((hi32 >> 8)  & 0xFF);
+   n->b[4] = (UChar) (hi32        & 0xFF);
+   n->b[3] = (UChar)((lo32 >> 24) & 0xFF);
+   n->b[2] = (UChar)((lo32 >> 16) & 0xFF);
+   n->b[1] = (UChar)((lo32 >> 8)  & 0xFF);
+   n->b[0] = (UChar) (lo32        & 0xFF);
+}
+
+
+static
+double uInt64_to_double ( UInt64* n )
+{
+   Int32  i;
+   double base = 1.0;
+   double sum  = 0.0;
+   for (i = 0; i < 8; i++) {
+      sum  += base * (double)(n->b[i]);
+      base *= 256.0;
+   }
+   return sum;
+}
+
+
+static
+Bool uInt64_isZero ( UInt64* n )
+{
+   Int32 i;
+   for (i = 0; i < 8; i++)
+      if (n->b[i] != 0) return 0;
+   return 1;
+}
+
+
+/* Divide *n by 10, and return the remainder.  */
+static 
+Int32 uInt64_qrm10 ( UInt64* n )
+{
+   UInt32 rem, tmp;
+   Int32  i;
+   rem = 0;
+   for (i = 7; i >= 0; i--) {
+      tmp = rem * 256 + n->b[i];
+      n->b[i] = tmp / 10;
+      rem = tmp % 10;
+   }
+   return rem;
+}
+
+
+/* ... and the Whole Entire Point of all this UInt64 stuff is
+   so that we can supply the following function.
+*/
+static
+void uInt64_toAscii ( char* outbuf, UInt64* n )
+{
+   Int32  i, q;
+   UChar  buf[32];
+   Int32  nBuf   = 0;
+   UInt64 n_copy = *n;
+   do {
+      q = uInt64_qrm10 ( &n_copy );
+      buf[nBuf] = q + '0';
+      nBuf++;
+   } while (!uInt64_isZero(&n_copy));
+   outbuf[nBuf] = 0;
+   for (i = 0; i < nBuf; i++) 
+      outbuf[i] = buf[nBuf-i-1];
+}
+
+
+/*---------------------------------------------------*/
+/*--- Processing of complete files and streams    ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------*/
+static 
+Bool myfeof ( FILE* f )
+{
+   Int32 c = fgetc ( f );
+   if (c == EOF) return True;
+   ungetc ( c, f );
+   return False;
+}
+
+
+/*---------------------------------------------*/
+static 
+void compressStream ( FILE *stream, FILE *zStream )
+{
+   BZFILE* bzf = NULL;
+   UChar   ibuf[5000];
+   Int32   nIbuf;
+   UInt32  nbytes_in_lo32, nbytes_in_hi32;
+   UInt32  nbytes_out_lo32, nbytes_out_hi32;
+   Int32   bzerr, bzerr_dummy, ret;
+
+   SET_BINARY_MODE(stream);
+   SET_BINARY_MODE(zStream);
+
+   if (ferror(stream)) goto errhandler_io;
+   if (ferror(zStream)) goto errhandler_io;
+
+   bzf = BZ2_bzWriteOpen ( &bzerr, zStream, 
+                           blockSize100k, verbosity, workFactor );   
+   if (bzerr != BZ_OK) goto errhandler;
+
+   if (verbosity >= 2) fprintf ( stderr, "\n" );
+
+   while (True) {
+
+      if (myfeof(stream)) break;
+      nIbuf = fread ( ibuf, sizeof(UChar), 5000, stream );
+      if (ferror(stream)) goto errhandler_io;
+      if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
+      if (bzerr != BZ_OK) goto errhandler;
+
+   }
+
+   BZ2_bzWriteClose64 ( &bzerr, bzf, 0, 
+                        &nbytes_in_lo32, &nbytes_in_hi32,
+                        &nbytes_out_lo32, &nbytes_out_hi32 );
+   if (bzerr != BZ_OK) goto errhandler;
+
+   if (ferror(zStream)) goto errhandler_io;
+   ret = fflush ( zStream );
+   if (ret == EOF) goto errhandler_io;
+   if (zStream != stdout) {
+      Int32 fd = fileno ( zStream );
+      if (fd < 0) goto errhandler_io;
+      applySavedFileAttrToOutputFile ( fd );
+      ret = fclose ( zStream );
+      outputHandleJustInCase = NULL;
+      if (ret == EOF) goto errhandler_io;
+   }
+   outputHandleJustInCase = NULL;
+   if (ferror(stream)) goto errhandler_io;
+   ret = fclose ( stream );
+   if (ret == EOF) goto errhandler_io;
+
+   if (verbosity >= 1) {
+      if (nbytes_in_lo32 == 0 && nbytes_in_hi32 == 0) {
+	 fprintf ( stderr, " no data compressed.\n");
+      } else {
+	 Char   buf_nin[32], buf_nout[32];
+	 UInt64 nbytes_in,   nbytes_out;
+	 double nbytes_in_d, nbytes_out_d;
+	 uInt64_from_UInt32s ( &nbytes_in, 
+			       nbytes_in_lo32, nbytes_in_hi32 );
+	 uInt64_from_UInt32s ( &nbytes_out, 
+			       nbytes_out_lo32, nbytes_out_hi32 );
+	 nbytes_in_d  = uInt64_to_double ( &nbytes_in );
+	 nbytes_out_d = uInt64_to_double ( &nbytes_out );
+	 uInt64_toAscii ( buf_nin, &nbytes_in );
+	 uInt64_toAscii ( buf_nout, &nbytes_out );
+	 fprintf ( stderr, "%6.3f:1, %6.3f bits/byte, "
+		   "%5.2f%% saved, %s in, %s out.\n",
+		   nbytes_in_d / nbytes_out_d,
+		   (8.0 * nbytes_out_d) / nbytes_in_d,
+		   100.0 * (1.0 - nbytes_out_d / nbytes_in_d),
+		   buf_nin,
+		   buf_nout
+		 );
+      }
+   }
+
+   return;
+
+   errhandler:
+   BZ2_bzWriteClose64 ( &bzerr_dummy, bzf, 1, 
+                        &nbytes_in_lo32, &nbytes_in_hi32,
+                        &nbytes_out_lo32, &nbytes_out_hi32 );
+   switch (bzerr) {
+      case BZ_CONFIG_ERROR:
+         configError(); break;
+      case BZ_MEM_ERROR:
+         outOfMemory (); break;
+      case BZ_IO_ERROR:
+         errhandler_io:
+         ioError(); break;
+      default:
+         panic ( "compress:unexpected error" );
+   }
+
+   panic ( "compress:end" );
+   /*notreached*/
+}
+
+
+
+/*---------------------------------------------*/
+static 
+Bool uncompressStream ( FILE *zStream, FILE *stream )
+{
+   BZFILE* bzf = NULL;
+   Int32   bzerr, bzerr_dummy, ret, nread, streamNo, i;
+   UChar   obuf[5000];
+   UChar   unused[BZ_MAX_UNUSED];
+   Int32   nUnused;
+   void*   unusedTmpV;
+   UChar*  unusedTmp;
+
+   nUnused = 0;
+   streamNo = 0;
+
+   SET_BINARY_MODE(stream);
+   SET_BINARY_MODE(zStream);
+
+   if (ferror(stream)) goto errhandler_io;
+   if (ferror(zStream)) goto errhandler_io;
+
+   while (True) {
+
+      bzf = BZ2_bzReadOpen ( 
+               &bzerr, zStream, verbosity, 
+               (int)smallMode, unused, nUnused
+            );
+      if (bzf == NULL || bzerr != BZ_OK) goto errhandler;
+      streamNo++;
+
+      while (bzerr == BZ_OK) {
+         nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
+         if (bzerr == BZ_DATA_ERROR_MAGIC) goto trycat;
+         if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
+            fwrite ( obuf, sizeof(UChar), nread, stream );
+         if (ferror(stream)) goto errhandler_io;
+      }
+      if (bzerr != BZ_STREAM_END) goto errhandler;
+
+      BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused );
+      if (bzerr != BZ_OK) panic ( "decompress:bzReadGetUnused" );
+
+      unusedTmp = (UChar*)unusedTmpV;
+      for (i = 0; i < nUnused; i++) unused[i] = unusedTmp[i];
+
+      BZ2_bzReadClose ( &bzerr, bzf );
+      if (bzerr != BZ_OK) panic ( "decompress:bzReadGetUnused" );
+
+      if (nUnused == 0 && myfeof(zStream)) break;
+   }
+
+   closeok:
+   if (ferror(zStream)) goto errhandler_io;
+   if (stream != stdout) {
+      Int32 fd = fileno ( stream );
+      if (fd < 0) goto errhandler_io;
+      applySavedFileAttrToOutputFile ( fd );
+   }
+   ret = fclose ( zStream );
+   if (ret == EOF) goto errhandler_io;
+
+   if (ferror(stream)) goto errhandler_io;
+   ret = fflush ( stream );
+   if (ret != 0) goto errhandler_io;
+   if (stream != stdout) {
+      ret = fclose ( stream );
+      outputHandleJustInCase = NULL;
+      if (ret == EOF) goto errhandler_io;
+   }
+   outputHandleJustInCase = NULL;
+   if (verbosity >= 2) fprintf ( stderr, "\n    " );
+   return True;
+
+   trycat: 
+   if (forceOverwrite) {
+      rewind(zStream);
+      while (True) {
+      	 if (myfeof(zStream)) break;
+      	 nread = fread ( obuf, sizeof(UChar), 5000, zStream );
+      	 if (ferror(zStream)) goto errhandler_io;
+      	 if (nread > 0) fwrite ( obuf, sizeof(UChar), nread, stream );
+      	 if (ferror(stream)) goto errhandler_io;
+      }
+      goto closeok;
+   }
+  
+   errhandler:
+   BZ2_bzReadClose ( &bzerr_dummy, bzf );
+   switch (bzerr) {
+      case BZ_CONFIG_ERROR:
+         configError(); break;
+      case BZ_IO_ERROR:
+         errhandler_io:
+         ioError(); break;
+      case BZ_DATA_ERROR:
+         crcError();
+      case BZ_MEM_ERROR:
+         outOfMemory();
+      case BZ_UNEXPECTED_EOF:
+         compressedStreamEOF();
+      case BZ_DATA_ERROR_MAGIC:
+         if (zStream != stdin) fclose(zStream);
+         if (stream != stdout) fclose(stream);
+         if (streamNo == 1) {
+            return False;
+         } else {
+            if (noisy)
+            fprintf ( stderr, 
+                      "\n%s: %s: trailing garbage after EOF ignored\n",
+                      progName, inName );
+            return True;       
+         }
+      default:
+         panic ( "decompress:unexpected error" );
+   }
+
+   panic ( "decompress:end" );
+   return True; /*notreached*/
+}
+
+
+/*---------------------------------------------*/
+static 
+Bool testStream ( FILE *zStream )
+{
+   BZFILE* bzf = NULL;
+   Int32   bzerr, bzerr_dummy, ret, streamNo, i;
+   UChar   obuf[5000];
+   UChar   unused[BZ_MAX_UNUSED];
+   Int32   nUnused;
+   void*   unusedTmpV;
+   UChar*  unusedTmp;
+
+   nUnused = 0;
+   streamNo = 0;
+
+   SET_BINARY_MODE(zStream);
+   if (ferror(zStream)) goto errhandler_io;
+
+   while (True) {
+
+      bzf = BZ2_bzReadOpen ( 
+               &bzerr, zStream, verbosity, 
+               (int)smallMode, unused, nUnused
+            );
+      if (bzf == NULL || bzerr != BZ_OK) goto errhandler;
+      streamNo++;
+
+      while (bzerr == BZ_OK) {
+         BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
+         if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler;
+      }
+      if (bzerr != BZ_STREAM_END) goto errhandler;
+
+      BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused );
+      if (bzerr != BZ_OK) panic ( "test:bzReadGetUnused" );
+
+      unusedTmp = (UChar*)unusedTmpV;
+      for (i = 0; i < nUnused; i++) unused[i] = unusedTmp[i];
+
+      BZ2_bzReadClose ( &bzerr, bzf );
+      if (bzerr != BZ_OK) panic ( "test:bzReadGetUnused" );
+      if (nUnused == 0 && myfeof(zStream)) break;
+
+   }
+
+   if (ferror(zStream)) goto errhandler_io;
+   ret = fclose ( zStream );
+   if (ret == EOF) goto errhandler_io;
+
+   if (verbosity >= 2) fprintf ( stderr, "\n    " );
+   return True;
+
+   errhandler:
+   BZ2_bzReadClose ( &bzerr_dummy, bzf );
+   if (verbosity == 0) 
+      fprintf ( stderr, "%s: %s: ", progName, inName );
+   switch (bzerr) {
+      case BZ_CONFIG_ERROR:
+         configError(); break;
+      case BZ_IO_ERROR:
+         errhandler_io:
+         ioError(); break;
+      case BZ_DATA_ERROR:
+         fprintf ( stderr,
+                   "data integrity (CRC) error in data\n" );
+         return False;
+      case BZ_MEM_ERROR:
+         outOfMemory();
+      case BZ_UNEXPECTED_EOF:
+         fprintf ( stderr,
+                   "file ends unexpectedly\n" );
+         return False;
+      case BZ_DATA_ERROR_MAGIC:
+         if (zStream != stdin) fclose(zStream);
+         if (streamNo == 1) {
+          fprintf ( stderr, 
+                    "bad magic number (file not created by bzip2)\n" );
+            return False;
+         } else {
+            if (noisy)
+            fprintf ( stderr, 
+                      "trailing garbage after EOF ignored\n" );
+            return True;       
+         }
+      default:
+         panic ( "test:unexpected error" );
+   }
+
+   panic ( "test:end" );
+   return True; /*notreached*/
+}
+
+
+/*---------------------------------------------------*/
+/*--- Error [non-] handling grunge                ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------*/
+static
+void setExit ( Int32 v )
+{
+   if (v > exitValue) exitValue = v;
+}
+
+
+/*---------------------------------------------*/
+static 
+void cadvise ( void )
+{
+   if (noisy)
+   fprintf (
+      stderr,
+      "\nIt is possible that the compressed file(s) have become corrupted.\n"
+        "You can use the -tvv option to test integrity of such files.\n\n"
+        "You can use the `bzip2recover' program to attempt to recover\n"
+        "data from undamaged sections of corrupted files.\n\n"
+    );
+}
+
+
+/*---------------------------------------------*/
+static 
+void showFileNames ( void )
+{
+   if (noisy)
+   fprintf (
+      stderr,
+      "\tInput file = %s, output file = %s\n",
+      inName, outName 
+   );
+}
+
+
+/*---------------------------------------------*/
+static 
+void cleanUpAndFail ( Int32 ec )
+{
+   IntNative      retVal;
+   struct MY_STAT statBuf;
+
+   if ( srcMode == SM_F2F 
+        && opMode != OM_TEST
+        && deleteOutputOnInterrupt ) {
+
+      /* Check whether input file still exists.  Delete output file
+         only if input exists to avoid loss of data.  Joerg Prante, 5
+         January 2002.  (JRS 06-Jan-2002: other changes in 1.0.2 mean
+         this is less likely to happen.  But to be ultra-paranoid, we
+         do the check anyway.)  */
+      retVal = MY_STAT ( inName, &statBuf );
+      if (retVal == 0) {
+         if (noisy)
+            fprintf ( stderr, 
+                      "%s: Deleting output file %s, if it exists.\n",
+                      progName, outName );
+         if (outputHandleJustInCase != NULL)
+            fclose ( outputHandleJustInCase );
+         retVal = remove ( outName );
+         if (retVal != 0)
+            fprintf ( stderr,
+                      "%s: WARNING: deletion of output file "
+                      "(apparently) failed.\n",
+                      progName );
+      } else {
+         fprintf ( stderr,
+                   "%s: WARNING: deletion of output file suppressed\n",
+                    progName );
+         fprintf ( stderr,
+                   "%s:    since input file no longer exists.  Output file\n",
+                   progName );
+         fprintf ( stderr,
+                   "%s:    `%s' may be incomplete.\n",
+                   progName, outName );
+         fprintf ( stderr, 
+                   "%s:    I suggest doing an integrity test (bzip2 -tv)"
+                   " of it.\n",
+                   progName );
+      }
+   }
+
+   if (noisy && numFileNames > 0 && numFilesProcessed < numFileNames) {
+      fprintf ( stderr, 
+                "%s: WARNING: some files have not been processed:\n"
+                "%s:    %d specified on command line, %d not processed yet.\n\n",
+                progName, progName,
+                numFileNames, numFileNames - numFilesProcessed );
+   }
+   setExit(ec);
+   exit(exitValue);
+}
+
+
+/*---------------------------------------------*/
+static 
+void panic ( const Char* s )
+{
+   fprintf ( stderr,
+             "\n%s: PANIC -- internal consistency error:\n"
+             "\t%s\n"
+             "\tThis is a BUG.  Please report it to:\n"
+             "\tbzip2-devel@sourceware.org\n",
+             progName, s );
+   showFileNames();
+   cleanUpAndFail( 3 );
+}
+
+
+/*---------------------------------------------*/
+static 
+void crcError ( void )
+{
+   fprintf ( stderr,
+             "\n%s: Data integrity error when decompressing.\n",
+             progName );
+   showFileNames();
+   cadvise();
+   cleanUpAndFail( 2 );
+}
+
+
+/*---------------------------------------------*/
+static 
+void compressedStreamEOF ( void )
+{
+  if (noisy) {
+    fprintf ( stderr,
+	      "\n%s: Compressed file ends unexpectedly;\n\t"
+	      "perhaps it is corrupted?  *Possible* reason follows.\n",
+	      progName );
+    perror ( progName );
+    showFileNames();
+    cadvise();
+  }
+  cleanUpAndFail( 2 );
+}
+
+
+/*---------------------------------------------*/
+static 
+void ioError ( void )
+{
+   fprintf ( stderr,
+             "\n%s: I/O or other error, bailing out.  "
+             "Possible reason follows.\n",
+             progName );
+   perror ( progName );
+   showFileNames();
+   cleanUpAndFail( 1 );
+}
+
+
+/*---------------------------------------------*/
+static 
+void mySignalCatcher ( IntNative n )
+{
+   fprintf ( stderr,
+             "\n%s: Control-C or similar caught, quitting.\n",
+             progName );
+   cleanUpAndFail(1);
+}
+
+
+/*---------------------------------------------*/
+static 
+void mySIGSEGVorSIGBUScatcher ( IntNative n )
+{
+   if (opMode == OM_Z)
+      fprintf ( 
+      stderr,
+      "\n%s: Caught a SIGSEGV or SIGBUS whilst compressing.\n"
+      "\n"
+      "   Possible causes are (most likely first):\n"
+      "   (1) This computer has unreliable memory or cache hardware\n"
+      "       (a surprisingly common problem; try a different machine.)\n"
+      "   (2) A bug in the compiler used to create this executable\n"
+      "       (unlikely, if you didn't compile bzip2 yourself.)\n"
+      "   (3) A real bug in bzip2 -- I hope this should never be the case.\n"
+      "   The user's manual, Section 4.3, has more info on (1) and (2).\n"
+      "   \n"
+      "   If you suspect this is a bug in bzip2, or are unsure about (1)\n"
+      "   or (2), feel free to report it to: bzip2-devel@sourceware.org.\n"
+      "   Section 4.3 of the user's manual describes the info a useful\n"
+      "   bug report should have.  If the manual is available on your\n"
+      "   system, please try and read it before mailing me.  If you don't\n"
+      "   have the manual or can't be bothered to read it, mail me anyway.\n"
+      "\n",
+      progName );
+      else
+      fprintf ( 
+      stderr,
+      "\n%s: Caught a SIGSEGV or SIGBUS whilst decompressing.\n"
+      "\n"
+      "   Possible causes are (most likely first):\n"
+      "   (1) The compressed data is corrupted, and bzip2's usual checks\n"
+      "       failed to detect this.  Try bzip2 -tvv my_file.bz2.\n"
+      "   (2) This computer has unreliable memory or cache hardware\n"
+      "       (a surprisingly common problem; try a different machine.)\n"
+      "   (3) A bug in the compiler used to create this executable\n"
+      "       (unlikely, if you didn't compile bzip2 yourself.)\n"
+      "   (4) A real bug in bzip2 -- I hope this should never be the case.\n"
+      "   The user's manual, Section 4.3, has more info on (2) and (3).\n"
+      "   \n"
+      "   If you suspect this is a bug in bzip2, or are unsure about (2)\n"
+      "   or (3), feel free to report it to: bzip2-devel@sourceware.org.\n"
+      "   Section 4.3 of the user's manual describes the info a useful\n"
+      "   bug report should have.  If the manual is available on your\n"
+      "   system, please try and read it before mailing me.  If you don't\n"
+      "   have the manual or can't be bothered to read it, mail me anyway.\n"
+      "\n",
+      progName );
+
+   showFileNames();
+   if (opMode == OM_Z)
+      cleanUpAndFail( 3 ); else
+      { cadvise(); cleanUpAndFail( 2 ); }
+}
+
+
+/*---------------------------------------------*/
+static 
+void outOfMemory ( void )
+{
+   fprintf ( stderr,
+             "\n%s: couldn't allocate enough memory\n",
+             progName );
+   showFileNames();
+   cleanUpAndFail(1);
+}
+
+
+/*---------------------------------------------*/
+static 
+void configError ( void )
+{
+   fprintf ( stderr,
+             "bzip2: I'm not configured correctly for this platform!\n"
+             "\tI require Int32, Int16 and Char to have sizes\n"
+             "\tof 4, 2 and 1 bytes to run properly, and they don't.\n"
+             "\tProbably you can fix this by defining them correctly,\n"
+             "\tand recompiling.  Bye!\n" );
+   setExit(3);
+   exit(exitValue);
+}
+
+
+/*---------------------------------------------------*/
+/*--- The main driver machinery                   ---*/
+/*---------------------------------------------------*/
+
+/* All rather crufty.  The main problem is that input files
+   are stat()d multiple times before use.  This should be
+   cleaned up. 
+*/
+
+/*---------------------------------------------*/
+static 
+void pad ( Char *s )
+{
+   Int32 i;
+   if ( (Int32)strlen(s) >= longestFileName ) return;
+   for (i = 1; i <= longestFileName - (Int32)strlen(s); i++)
+      fprintf ( stderr, " " );
+}
+
+
+/*---------------------------------------------*/
+static 
+void copyFileName ( Char* to, Char* from ) 
+{
+   if ( strlen(from) > FILE_NAME_LEN-10 )  {
+      fprintf (
+         stderr,
+         "bzip2: file name\n`%s'\n"
+         "is suspiciously (more than %d chars) long.\n"
+         "Try using a reasonable file name instead.  Sorry! :-)\n",
+         from, FILE_NAME_LEN-10
+      );
+      setExit(1);
+      exit(exitValue);
+   }
+
+  strncpy(to,from,FILE_NAME_LEN-10);
+  to[FILE_NAME_LEN-10]='\0';
+}
+
+
+/*---------------------------------------------*/
+static 
+Bool fileExists ( Char* name )
+{
+   FILE *tmp   = fopen ( name, "rb" );
+   Bool exists = (tmp != NULL);
+   if (tmp != NULL) fclose ( tmp );
+   return exists;
+}
+
+
+/*---------------------------------------------*/
+/* Open an output file safely with O_EXCL and good permissions.
+   This avoids a race condition in versions < 1.0.2, in which
+   the file was first opened and then had its interim permissions
+   set safely.  We instead use open() to create the file with
+   the interim permissions required. (--- --- rw-).
+
+   For non-Unix platforms, if we are not worrying about
+   security issues, simple this simply behaves like fopen.
+*/
+static
+FILE* fopen_output_safely ( Char* name, const char* mode )
+{
+#  if BZ_UNIX
+   FILE*     fp;
+   IntNative fh;
+   fh = open(name, O_WRONLY|O_CREAT|O_EXCL, S_IWUSR|S_IRUSR);
+   if (fh == -1) return NULL;
+   fp = fdopen(fh, mode);
+   if (fp == NULL) close(fh);
+   return fp;
+#  else
+   return fopen(name, mode);
+#  endif
+}
+
+
+/*---------------------------------------------*/
+/*--
+  if in doubt, return True
+--*/
+static 
+Bool notAStandardFile ( Char* name )
+{
+   IntNative      i;
+   struct MY_STAT statBuf;
+
+   i = MY_LSTAT ( name, &statBuf );
+   if (i != 0) return True;
+   if (MY_S_ISREG(statBuf.st_mode)) return False;
+   return True;
+}
+
+
+/*---------------------------------------------*/
+/*--
+  rac 11/21/98 see if file has hard links to it
+--*/
+static 
+Int32 countHardLinks ( Char* name )
+{  
+   IntNative      i;
+   struct MY_STAT statBuf;
+
+   i = MY_LSTAT ( name, &statBuf );
+   if (i != 0) return 0;
+   return (statBuf.st_nlink - 1);
+}
+
+
+/*---------------------------------------------*/
+/* Copy modification date, access date, permissions and owner from the
+   source to destination file.  We have to copy this meta-info off
+   into fileMetaInfo before starting to compress / decompress it,
+   because doing it afterwards means we get the wrong access time.
+
+   To complicate matters, in compress() and decompress() below, the
+   sequence of tests preceding the call to saveInputFileMetaInfo()
+   involves calling fileExists(), which in turn establishes its result
+   by attempting to fopen() the file, and if successful, immediately
+   fclose()ing it again.  So we have to assume that the fopen() call
+   does not cause the access time field to be updated.
+
+   Reading of the man page for stat() (man 2 stat) on RedHat 7.2 seems
+   to imply that merely doing open() will not affect the access time.
+   Therefore we merely need to hope that the C library only does
+   open() as a result of fopen(), and not any kind of read()-ahead
+   cleverness.
+
+   It sounds pretty fragile to me.  Whether this carries across
+   robustly to arbitrary Unix-like platforms (or even works robustly
+   on this one, RedHat 7.2) is unknown to me.  Nevertheless ...  
+*/
+#if BZ_UNIX
+static 
+struct MY_STAT fileMetaInfo;
+#endif
+
+static 
+void saveInputFileMetaInfo ( Char *srcName )
+{
+#  if BZ_UNIX
+   IntNative retVal;
+   /* Note use of stat here, not lstat. */
+   retVal = MY_STAT( srcName, &fileMetaInfo );
+   ERROR_IF_NOT_ZERO ( retVal );
+#  endif
+}
+
+
+static 
+void applySavedTimeInfoToOutputFile ( Char *dstName )
+{
+#  if BZ_UNIX
+   IntNative      retVal;
+   struct utimbuf uTimBuf;
+
+   uTimBuf.actime = fileMetaInfo.st_atime;
+   uTimBuf.modtime = fileMetaInfo.st_mtime;
+
+   retVal = utime ( dstName, &uTimBuf );
+   ERROR_IF_NOT_ZERO ( retVal );
+#  endif
+}
+
+static 
+void applySavedFileAttrToOutputFile ( IntNative fd )
+{
+#  if BZ_UNIX
+   IntNative retVal;
+
+   retVal = fchmod ( fd, fileMetaInfo.st_mode );
+   ERROR_IF_NOT_ZERO ( retVal );
+
+   (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
+   /* chown() will in many cases return with EPERM, which can
+      be safely ignored.
+   */
+#  endif
+}
+
+
+/*---------------------------------------------*/
+static 
+Bool containsDubiousChars ( Char* name )
+{
+#  if BZ_UNIX
+   /* On unix, files can contain any characters and the file expansion
+    * is performed by the shell.
+    */
+   return False;
+#  else /* ! BZ_UNIX */
+   /* On non-unix (Win* platforms), wildcard characters are not allowed in 
+    * filenames.
+    */
+   for (; *name != '\0'; name++)
+      if (*name == '?' || *name == '*') return True;
+   return False;
+#  endif /* BZ_UNIX */
+}
+
+
+/*---------------------------------------------*/
+#define BZ_N_SUFFIX_PAIRS 4
+
+const Char* zSuffix[BZ_N_SUFFIX_PAIRS] 
+   = { ".bz2", ".bz", ".tbz2", ".tbz" };
+const Char* unzSuffix[BZ_N_SUFFIX_PAIRS] 
+   = { "", "", ".tar", ".tar" };
+
+static 
+Bool hasSuffix ( Char* s, const Char* suffix )
+{
+   Int32 ns = strlen(s);
+   Int32 nx = strlen(suffix);
+   if (ns < nx) return False;
+   if (strcmp(s + ns - nx, suffix) == 0) return True;
+   return False;
+}
+
+static 
+Bool mapSuffix ( Char* name, 
+                 const Char* oldSuffix, 
+                 const Char* newSuffix )
+{
+   if (!hasSuffix(name,oldSuffix)) return False;
+   name[strlen(name)-strlen(oldSuffix)] = 0;
+   strcat ( name, newSuffix );
+   return True;
+}
+
+
+/*---------------------------------------------*/
+static 
+void compress ( Char *name )
+{
+   FILE  *inStr;
+   FILE  *outStr;
+   Int32 n, i;
+   struct MY_STAT statBuf;
+
+   deleteOutputOnInterrupt = False;
+
+   if (name == NULL && srcMode != SM_I2O)
+      panic ( "compress: bad modes\n" );
+
+   switch (srcMode) {
+      case SM_I2O: 
+         copyFileName ( inName, (Char*)"(stdin)" );
+         copyFileName ( outName, (Char*)"(stdout)" ); 
+         break;
+      case SM_F2F: 
+         copyFileName ( inName, name );
+         copyFileName ( outName, name );
+         strcat ( outName, ".bz2" ); 
+         break;
+      case SM_F2O: 
+         copyFileName ( inName, name );
+         copyFileName ( outName, (Char*)"(stdout)" ); 
+         break;
+   }
+
+   if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) {
+      if (noisy)
+      fprintf ( stderr, "%s: There are no files matching `%s'.\n",
+                progName, inName );
+      setExit(1);
+      return;
+   }
+   if ( srcMode != SM_I2O && !fileExists ( inName ) ) {
+      fprintf ( stderr, "%s: Can't open input file %s: %s.\n",
+                progName, inName, strerror(errno) );
+      setExit(1);
+      return;
+   }
+   for (i = 0; i < BZ_N_SUFFIX_PAIRS; i++) {
+      if (hasSuffix(inName, zSuffix[i])) {
+         if (noisy)
+         fprintf ( stderr, 
+                   "%s: Input file %s already has %s suffix.\n",
+                   progName, inName, zSuffix[i] );
+         setExit(1);
+         return;
+      }
+   }
+   if ( srcMode == SM_F2F || srcMode == SM_F2O ) {
+      MY_STAT(inName, &statBuf);
+      if ( MY_S_ISDIR(statBuf.st_mode) ) {
+         fprintf( stderr,
+                  "%s: Input file %s is a directory.\n",
+                  progName,inName);
+         setExit(1);
+         return;
+      }
+   }
+   if ( srcMode == SM_F2F && !forceOverwrite && notAStandardFile ( inName )) {
+      if (noisy)
+      fprintf ( stderr, "%s: Input file %s is not a normal file.\n",
+                progName, inName );
+      setExit(1);
+      return;
+   }
+   if ( srcMode == SM_F2F && fileExists ( outName ) ) {
+      if (forceOverwrite) {
+	 remove(outName);
+      } else {
+	 fprintf ( stderr, "%s: Output file %s already exists.\n",
+		   progName, outName );
+	 setExit(1);
+	 return;
+      }
+   }
+   if ( srcMode == SM_F2F && !forceOverwrite &&
+        (n=countHardLinks ( inName )) > 0) {
+      fprintf ( stderr, "%s: Input file %s has %d other link%s.\n",
+                progName, inName, n, n > 1 ? "s" : "" );
+      setExit(1);
+      return;
+   }
+
+   if ( srcMode == SM_F2F ) {
+      /* Save the file's meta-info before we open it.  Doing it later
+         means we mess up the access times. */
+      saveInputFileMetaInfo ( inName );
+   }
+
+   switch ( srcMode ) {
+
+      case SM_I2O:
+         inStr = stdin;
+         outStr = stdout;
+         if ( isatty ( fileno ( stdout ) ) ) {
+            fprintf ( stderr,
+                      "%s: I won't write compressed data to a terminal.\n",
+                      progName );
+            fprintf ( stderr, "%s: For help, type: `%s --help'.\n",
+                              progName, progName );
+            setExit(1);
+            return;
+         };
+         break;
+
+      case SM_F2O:
+         inStr = fopen ( inName, "rb" );
+         outStr = stdout;
+         if ( isatty ( fileno ( stdout ) ) ) {
+            fprintf ( stderr,
+                      "%s: I won't write compressed data to a terminal.\n",
+                      progName );
+            fprintf ( stderr, "%s: For help, type: `%s --help'.\n",
+                              progName, progName );
+            if ( inStr != NULL ) fclose ( inStr );
+            setExit(1);
+            return;
+         };
+         if ( inStr == NULL ) {
+            fprintf ( stderr, "%s: Can't open input file %s: %s.\n",
+                      progName, inName, strerror(errno) );
+            setExit(1);
+            return;
+         };
+         break;
+
+      case SM_F2F:
+         inStr = fopen ( inName, "rb" );
+         outStr = fopen_output_safely ( outName, "wb" );
+         if ( outStr == NULL) {
+            fprintf ( stderr, "%s: Can't create output file %s: %s.\n",
+                      progName, outName, strerror(errno) );
+            if ( inStr != NULL ) fclose ( inStr );
+            setExit(1);
+            return;
+         }
+         if ( inStr == NULL ) {
+            fprintf ( stderr, "%s: Can't open input file %s: %s.\n",
+                      progName, inName, strerror(errno) );
+            if ( outStr != NULL ) fclose ( outStr );
+            setExit(1);
+            return;
+         };
+         break;
+
+      default:
+         panic ( "compress: bad srcMode" );
+         break;
+   }
+
+   if (verbosity >= 1) {
+      fprintf ( stderr,  "  %s: ", inName );
+      pad ( inName );
+      fflush ( stderr );
+   }
+
+   /*--- Now the input and output handles are sane.  Do the Biz. ---*/
+   outputHandleJustInCase = outStr;
+   deleteOutputOnInterrupt = True;
+   compressStream ( inStr, outStr );
+   outputHandleJustInCase = NULL;
+
+   /*--- If there was an I/O error, we won't get here. ---*/
+   if ( srcMode == SM_F2F ) {
+      applySavedTimeInfoToOutputFile ( outName );
+      deleteOutputOnInterrupt = False;
+      if ( !keepInputFiles ) {
+         IntNative retVal = remove ( inName );
+         ERROR_IF_NOT_ZERO ( retVal );
+      }
+   }
+
+   deleteOutputOnInterrupt = False;
+}
+
+
+/*---------------------------------------------*/
+static 
+void uncompress ( Char *name )
+{
+   FILE  *inStr;
+   FILE  *outStr;
+   Int32 n, i;
+   Bool  magicNumberOK;
+   Bool  cantGuess;
+   struct MY_STAT statBuf;
+
+   deleteOutputOnInterrupt = False;
+
+   if (name == NULL && srcMode != SM_I2O)
+      panic ( "uncompress: bad modes\n" );
+
+   cantGuess = False;
+   switch (srcMode) {
+      case SM_I2O: 
+         copyFileName ( inName, (Char*)"(stdin)" );
+         copyFileName ( outName, (Char*)"(stdout)" ); 
+         break;
+      case SM_F2F: 
+         copyFileName ( inName, name );
+         copyFileName ( outName, name );
+         for (i = 0; i < BZ_N_SUFFIX_PAIRS; i++)
+            if (mapSuffix(outName,zSuffix[i],unzSuffix[i]))
+               goto zzz; 
+         cantGuess = True;
+         strcat ( outName, ".out" );
+         break;
+      case SM_F2O: 
+         copyFileName ( inName, name );
+         copyFileName ( outName, (Char*)"(stdout)" ); 
+         break;
+   }
+
+   zzz:
+   if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) {
+      if (noisy)
+      fprintf ( stderr, "%s: There are no files matching `%s'.\n",
+                progName, inName );
+      setExit(1);
+      return;
+   }
+   if ( srcMode != SM_I2O && !fileExists ( inName ) ) {
+      fprintf ( stderr, "%s: Can't open input file %s: %s.\n",
+                progName, inName, strerror(errno) );
+      setExit(1);
+      return;
+   }
+   if ( srcMode == SM_F2F || srcMode == SM_F2O ) {
+      MY_STAT(inName, &statBuf);
+      if ( MY_S_ISDIR(statBuf.st_mode) ) {
+         fprintf( stderr,
+                  "%s: Input file %s is a directory.\n",
+                  progName,inName);
+         setExit(1);
+         return;
+      }
+   }
+   if ( srcMode == SM_F2F && !forceOverwrite && notAStandardFile ( inName )) {
+      if (noisy)
+      fprintf ( stderr, "%s: Input file %s is not a normal file.\n",
+                progName, inName );
+      setExit(1);
+      return;
+   }
+   if ( /* srcMode == SM_F2F implied && */ cantGuess ) {
+      if (noisy)
+      fprintf ( stderr, 
+                "%s: Can't guess original name for %s -- using %s\n",
+                progName, inName, outName );
+      /* just a warning, no return */
+   }   
+   if ( srcMode == SM_F2F && fileExists ( outName ) ) {
+      if (forceOverwrite) {
+	remove(outName);
+      } else {
+        fprintf ( stderr, "%s: Output file %s already exists.\n",
+                  progName, outName );
+        setExit(1);
+        return;
+      }
+   }
+   if ( srcMode == SM_F2F && !forceOverwrite &&
+        (n=countHardLinks ( inName ) ) > 0) {
+      fprintf ( stderr, "%s: Input file %s has %d other link%s.\n",
+                progName, inName, n, n > 1 ? "s" : "" );
+      setExit(1);
+      return;
+   }
+
+   if ( srcMode == SM_F2F ) {
+      /* Save the file's meta-info before we open it.  Doing it later
+         means we mess up the access times. */
+      saveInputFileMetaInfo ( inName );
+   }
+
+   switch ( srcMode ) {
+
+      case SM_I2O:
+         inStr = stdin;
+         outStr = stdout;
+         if ( isatty ( fileno ( stdin ) ) ) {
+            fprintf ( stderr,
+                      "%s: I won't read compressed data from a terminal.\n",
+                      progName );
+            fprintf ( stderr, "%s: For help, type: `%s --help'.\n",
+                              progName, progName );
+            setExit(1);
+            return;
+         };
+         break;
+
+      case SM_F2O:
+         inStr = fopen ( inName, "rb" );
+         outStr = stdout;
+         if ( inStr == NULL ) {
+            fprintf ( stderr, "%s: Can't open input file %s:%s.\n",
+                      progName, inName, strerror(errno) );
+            if ( inStr != NULL ) fclose ( inStr );
+            setExit(1);
+            return;
+         };
+         break;
+
+      case SM_F2F:
+         inStr = fopen ( inName, "rb" );
+         outStr = fopen_output_safely ( outName, "wb" );
+         if ( outStr == NULL) {
+            fprintf ( stderr, "%s: Can't create output file %s: %s.\n",
+                      progName, outName, strerror(errno) );
+            if ( inStr != NULL ) fclose ( inStr );
+            setExit(1);
+            return;
+         }
+         if ( inStr == NULL ) {
+            fprintf ( stderr, "%s: Can't open input file %s: %s.\n",
+                      progName, inName, strerror(errno) );
+            if ( outStr != NULL ) fclose ( outStr );
+            setExit(1);
+            return;
+         };
+         break;
+
+      default:
+         panic ( "uncompress: bad srcMode" );
+         break;
+   }
+
+   if (verbosity >= 1) {
+      fprintf ( stderr, "  %s: ", inName );
+      pad ( inName );
+      fflush ( stderr );
+   }
+
+   /*--- Now the input and output handles are sane.  Do the Biz. ---*/
+   outputHandleJustInCase = outStr;
+   deleteOutputOnInterrupt = True;
+   magicNumberOK = uncompressStream ( inStr, outStr );
+   outputHandleJustInCase = NULL;
+
+   /*--- If there was an I/O error, we won't get here. ---*/
+   if ( magicNumberOK ) {
+      if ( srcMode == SM_F2F ) {
+         applySavedTimeInfoToOutputFile ( outName );
+         deleteOutputOnInterrupt = False;
+         if ( !keepInputFiles ) {
+            IntNative retVal = remove ( inName );
+            ERROR_IF_NOT_ZERO ( retVal );
+         }
+      }
+   } else {
+      unzFailsExist = True;
+      deleteOutputOnInterrupt = False;
+      if ( srcMode == SM_F2F ) {
+         IntNative retVal = remove ( outName );
+         ERROR_IF_NOT_ZERO ( retVal );
+      }
+   }
+   deleteOutputOnInterrupt = False;
+
+   if ( magicNumberOK ) {
+      if (verbosity >= 1)
+         fprintf ( stderr, "done\n" );
+   } else {
+      setExit(2);
+      if (verbosity >= 1)
+         fprintf ( stderr, "not a bzip2 file.\n" ); else
+         fprintf ( stderr,
+                   "%s: %s is not a bzip2 file.\n",
+                   progName, inName );
+   }
+
+}
+
+
+/*---------------------------------------------*/
+static 
+void testf ( Char *name )
+{
+   FILE *inStr;
+   Bool allOK;
+   struct MY_STAT statBuf;
+
+   deleteOutputOnInterrupt = False;
+
+   if (name == NULL && srcMode != SM_I2O)
+      panic ( "testf: bad modes\n" );
+
+   copyFileName ( outName, (Char*)"(none)" );
+   switch (srcMode) {
+      case SM_I2O: copyFileName ( inName, (Char*)"(stdin)" ); break;
+      case SM_F2F: copyFileName ( inName, name ); break;
+      case SM_F2O: copyFileName ( inName, name ); break;
+   }
+
+   if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) {
+      if (noisy)
+      fprintf ( stderr, "%s: There are no files matching `%s'.\n",
+                progName, inName );
+      setExit(1);
+      return;
+   }
+   if ( srcMode != SM_I2O && !fileExists ( inName ) ) {
+      fprintf ( stderr, "%s: Can't open input %s: %s.\n",
+                progName, inName, strerror(errno) );
+      setExit(1);
+      return;
+   }
+   if ( srcMode != SM_I2O ) {
+      MY_STAT(inName, &statBuf);
+      if ( MY_S_ISDIR(statBuf.st_mode) ) {
+         fprintf( stderr,
+                  "%s: Input file %s is a directory.\n",
+                  progName,inName);
+         setExit(1);
+         return;
+      }
+   }
+
+   switch ( srcMode ) {
+
+      case SM_I2O:
+         if ( isatty ( fileno ( stdin ) ) ) {
+            fprintf ( stderr,
+                      "%s: I won't read compressed data from a terminal.\n",
+                      progName );
+            fprintf ( stderr, "%s: For help, type: `%s --help'.\n",
+                              progName, progName );
+            setExit(1);
+            return;
+         };
+         inStr = stdin;
+         break;
+
+      case SM_F2O: case SM_F2F:
+         inStr = fopen ( inName, "rb" );
+         if ( inStr == NULL ) {
+            fprintf ( stderr, "%s: Can't open input file %s:%s.\n",
+                      progName, inName, strerror(errno) );
+            setExit(1);
+            return;
+         };
+         break;
+
+      default:
+         panic ( "testf: bad srcMode" );
+         break;
+   }
+
+   if (verbosity >= 1) {
+      fprintf ( stderr, "  %s: ", inName );
+      pad ( inName );
+      fflush ( stderr );
+   }
+
+   /*--- Now the input handle is sane.  Do the Biz. ---*/
+   outputHandleJustInCase = NULL;
+   allOK = testStream ( inStr );
+
+   if (allOK && verbosity >= 1) fprintf ( stderr, "ok\n" );
+   if (!allOK) testFailsExist = True;
+}
+
+
+/*---------------------------------------------*/
+static 
+void license ( void )
+{
+   fprintf ( stderr,
+
+    "bzip2, a block-sorting file compressor.  "
+    "Version %s.\n"
+    "   \n"
+    "   Copyright (C) 1996-2019 by Julian Seward.\n"
+    "   \n"
+    "   This program is free software; you can redistribute it and/or modify\n"
+    "   it under the terms set out in the LICENSE file, which is included\n"
+    "   in the bzip2 source distribution.\n"
+    "   \n"
+    "   This program is distributed in the hope that it will be useful,\n"
+    "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+    "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
+    "   LICENSE file for more details.\n"
+    "   \n",
+    BZ2_bzlibVersion()
+   );
+}
+
+
+/*---------------------------------------------*/
+static 
+void usage ( Char *fullProgName )
+{
+   fprintf (
+      stderr,
+      "bzip2, a block-sorting file compressor.  "
+      "Version %s.\n"
+      "\n   usage: %s [flags and input files in any order]\n"
+      "\n"
+      "   -h --help           print this message\n"
+      "   -d --decompress     force decompression\n"
+      "   -z --compress       force compression\n"
+      "   -k --keep           keep (don't delete) input files\n"
+      "   -f --force          overwrite existing output files\n"
+      "   -t --test           test compressed file integrity\n"
+      "   -c --stdout         output to standard out\n"
+      "   -q --quiet          suppress noncritical error messages\n"
+      "   -v --verbose        be verbose (a 2nd -v gives more)\n"
+      "   -L --license        display software version & license\n"
+      "   -V --version        display software version & license\n"
+      "   -s --small          use less memory (at most 2500k)\n"
+      "   -1 .. -9            set block size to 100k .. 900k\n"
+      "   --fast              alias for -1\n"
+      "   --best              alias for -9\n"
+      "\n"
+      "   If invoked as `bzip2', default action is to compress.\n"
+      "              as `bunzip2',  default action is to decompress.\n"
+      "              as `bzcat', default action is to decompress to stdout.\n"
+      "\n"
+      "   If no file names are given, bzip2 compresses or decompresses\n"
+      "   from standard input to standard output.  You can combine\n"
+      "   short flags, so `-v -4' means the same as -v4 or -4v, &c.\n"
+#     if BZ_UNIX
+      "\n"
+#     endif
+      ,
+
+      BZ2_bzlibVersion(),
+      fullProgName
+   );
+}
+
+
+/*---------------------------------------------*/
+static 
+void redundant ( Char* flag )
+{
+   fprintf ( 
+      stderr, 
+      "%s: %s is redundant in versions 0.9.5 and above\n",
+      progName, flag );
+}
+
+
+/*---------------------------------------------*/
+/*--
+  All the garbage from here to main() is purely to
+  implement a linked list of command-line arguments,
+  into which main() copies argv[1 .. argc-1].
+
+  The purpose of this exercise is to facilitate 
+  the expansion of wildcard characters * and ? in 
+  filenames for OSs which don't know how to do it
+  themselves, like MSDOS, Windows 95 and NT.
+
+  The actual Dirty Work is done by the platform-
+  specific macro APPEND_FILESPEC.
+--*/
+
+typedef
+   struct zzzz {
+      Char        *name;
+      struct zzzz *link;
+   }
+   Cell;
+
+
+/*---------------------------------------------*/
+static 
+void *myMalloc ( Int32 n )
+{
+   void* p;
+
+   p = malloc ( (size_t)n );
+   if (p == NULL) outOfMemory ();
+   return p;
+}
+
+
+/*---------------------------------------------*/
+static 
+Cell *mkCell ( void )
+{
+   Cell *c;
+
+   c = (Cell*) myMalloc ( sizeof ( Cell ) );
+   c->name = NULL;
+   c->link = NULL;
+   return c;
+}
+
+
+/*---------------------------------------------*/
+static 
+Cell *snocString ( Cell *root, Char *name )
+{
+   if (root == NULL) {
+      Cell *tmp = mkCell();
+      tmp->name = (Char*) myMalloc ( 5 + strlen(name) );
+      strcpy ( tmp->name, name );
+      return tmp;
+   } else {
+      Cell *tmp = root;
+      while (tmp->link != NULL) tmp = tmp->link;
+      tmp->link = snocString ( tmp->link, name );
+      return root;
+   }
+}
+
+
+/*---------------------------------------------*/
+static 
+void addFlagsFromEnvVar ( Cell** argList, Char* varName ) 
+{
+   Int32 i, j, k;
+   Char *envbase, *p;
+
+   envbase = getenv(varName);
+   if (envbase != NULL) {
+      p = envbase;
+      i = 0;
+      while (True) {
+         if (p[i] == 0) break;
+         p += i;
+         i = 0;
+         while (isspace((Int32)(p[0]))) p++;
+         while (p[i] != 0 && !isspace((Int32)(p[i]))) i++;
+         if (i > 0) {
+            k = i; if (k > FILE_NAME_LEN-10) k = FILE_NAME_LEN-10;
+            for (j = 0; j < k; j++) tmpName[j] = p[j];
+            tmpName[k] = 0;
+            APPEND_FLAG(*argList, tmpName);
+         }
+      }
+   }
+}
+
+
+/*---------------------------------------------*/
+#define ISFLAG(s) (strcmp(aa->name, (s))==0)
+
+IntNative main ( IntNative argc, Char *argv[] )
+{
+   Int32  i, j;
+   Char   *tmp;
+   Cell   *argList;
+   Cell   *aa;
+   Bool   decode;
+
+   /*-- Be really really really paranoid :-) --*/
+   if (sizeof(Int32) != 4 || sizeof(UInt32) != 4  ||
+       sizeof(Int16) != 2 || sizeof(UInt16) != 2  ||
+       sizeof(Char)  != 1 || sizeof(UChar)  != 1)
+      configError();
+
+   /*-- Initialise --*/
+   outputHandleJustInCase  = NULL;
+   smallMode               = False;
+   keepInputFiles          = False;
+   forceOverwrite          = False;
+   noisy                   = True;
+   verbosity               = 0;
+   blockSize100k           = 9;
+   testFailsExist          = False;
+   unzFailsExist           = False;
+   numFileNames            = 0;
+   numFilesProcessed       = 0;
+   workFactor              = 30;
+   deleteOutputOnInterrupt = False;
+   exitValue               = 0;
+   i = j = 0; /* avoid bogus warning from egcs-1.1.X */
+
+   /*-- Set up signal handlers for mem access errors --*/
+   signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
+#  if BZ_UNIX
+#  ifndef __DJGPP__
+   signal (SIGBUS,  mySIGSEGVorSIGBUScatcher);
+#  endif
+#  endif
+
+   copyFileName ( inName,  (Char*)"(none)" );
+   copyFileName ( outName, (Char*)"(none)" );
+
+   copyFileName ( progNameReally, argv[0] );
+   progName = &progNameReally[0];
+   for (tmp = &progNameReally[0]; *tmp != '\0'; tmp++)
+      if (*tmp == PATH_SEP) progName = tmp + 1;
+
+
+   /*-- Copy flags from env var BZIP2, and 
+        expand filename wildcards in arg list.
+   --*/
+   argList = NULL;
+   addFlagsFromEnvVar ( &argList,  (Char*)"BZIP2" );
+   addFlagsFromEnvVar ( &argList,  (Char*)"BZIP" );
+   for (i = 1; i <= argc-1; i++)
+      APPEND_FILESPEC(argList, argv[i]);
+
+
+   /*-- Find the length of the longest filename --*/
+   longestFileName = 7;
+   numFileNames    = 0;
+   decode          = True;
+   for (aa = argList; aa != NULL; aa = aa->link) {
+      if (ISFLAG("--")) { decode = False; continue; }
+      if (aa->name[0] == '-' && decode) continue;
+      numFileNames++;
+      if (longestFileName < (Int32)strlen(aa->name) )
+         longestFileName = (Int32)strlen(aa->name);
+   }
+
+
+   /*-- Determine source modes; flag handling may change this too. --*/
+   if (numFileNames == 0)
+      srcMode = SM_I2O; else srcMode = SM_F2F;
+
+
+   /*-- Determine what to do (compress/uncompress/test/cat). --*/
+   /*-- Note that subsequent flag handling may change this. --*/
+   opMode = OM_Z;
+
+   if ( (strstr ( progName, "unzip" ) != 0) ||
+        (strstr ( progName, "UNZIP" ) != 0) )
+      opMode = OM_UNZ;
+
+   if ( (strstr ( progName, "z2cat" ) != 0) ||
+        (strstr ( progName, "Z2CAT" ) != 0) ||
+        (strstr ( progName, "zcat" ) != 0)  ||
+        (strstr ( progName, "ZCAT" ) != 0) )  {
+      opMode = OM_UNZ;
+      srcMode = (numFileNames == 0) ? SM_I2O : SM_F2O;
+   }
+
+
+   /*-- Look at the flags. --*/
+   for (aa = argList; aa != NULL; aa = aa->link) {
+      if (ISFLAG("--")) break;
+      if (aa->name[0] == '-' && aa->name[1] != '-') {
+         for (j = 1; aa->name[j] != '\0'; j++) {
+            switch (aa->name[j]) {
+               case 'c': srcMode          = SM_F2O; break;
+               case 'd': opMode           = OM_UNZ; break;
+               case 'z': opMode           = OM_Z; break;
+               case 'f': forceOverwrite   = True; break;
+               case 't': opMode           = OM_TEST; break;
+               case 'k': keepInputFiles   = True; break;
+               case 's': smallMode        = True; break;
+               case 'q': noisy            = False; break;
+               case '1': blockSize100k    = 1; break;
+               case '2': blockSize100k    = 2; break;
+               case '3': blockSize100k    = 3; break;
+               case '4': blockSize100k    = 4; break;
+               case '5': blockSize100k    = 5; break;
+               case '6': blockSize100k    = 6; break;
+               case '7': blockSize100k    = 7; break;
+               case '8': blockSize100k    = 8; break;
+               case '9': blockSize100k    = 9; break;
+               case 'V':
+               case 'L': license();            break;
+               case 'v': verbosity++; break;
+               case 'h': usage ( progName );
+                         exit ( 0 );
+                         break;
+               default:  fprintf ( stderr, "%s: Bad flag `%s'\n",
+                                   progName, aa->name );
+                         usage ( progName );
+                         exit ( 1 );
+                         break;
+            }
+         }
+      }
+   }
+   
+   /*-- And again ... --*/
+   for (aa = argList; aa != NULL; aa = aa->link) {
+      if (ISFLAG("--")) break;
+      if (ISFLAG("--stdout"))            srcMode          = SM_F2O;  else
+      if (ISFLAG("--decompress"))        opMode           = OM_UNZ;  else
+      if (ISFLAG("--compress"))          opMode           = OM_Z;    else
+      if (ISFLAG("--force"))             forceOverwrite   = True;    else
+      if (ISFLAG("--test"))              opMode           = OM_TEST; else
+      if (ISFLAG("--keep"))              keepInputFiles   = True;    else
+      if (ISFLAG("--small"))             smallMode        = True;    else
+      if (ISFLAG("--quiet"))             noisy            = False;   else
+      if (ISFLAG("--version"))           license();                  else
+      if (ISFLAG("--license"))           license();                  else
+      if (ISFLAG("--exponential"))       workFactor = 1;             else 
+      if (ISFLAG("--repetitive-best"))   redundant(aa->name);        else
+      if (ISFLAG("--repetitive-fast"))   redundant(aa->name);        else
+      if (ISFLAG("--fast"))              blockSize100k = 1;          else
+      if (ISFLAG("--best"))              blockSize100k = 9;          else
+      if (ISFLAG("--verbose"))           verbosity++;                else
+      if (ISFLAG("--help"))              { usage ( progName ); exit ( 0 ); }
+         else
+         if (strncmp ( aa->name, "--", 2) == 0) {
+            fprintf ( stderr, "%s: Bad flag `%s'\n", progName, aa->name );
+            usage ( progName );
+            exit ( 1 );
+         }
+   }
+
+   if (verbosity > 4) verbosity = 4;
+   if (opMode == OM_Z && smallMode && blockSize100k > 2) 
+      blockSize100k = 2;
+
+   if (opMode == OM_TEST && srcMode == SM_F2O) {
+      fprintf ( stderr, "%s: -c and -t cannot be used together.\n",
+                progName );
+      exit ( 1 );
+   }
+
+   if (srcMode == SM_F2O && numFileNames == 0)
+      srcMode = SM_I2O;
+
+   if (opMode != OM_Z) blockSize100k = 0;
+
+   if (srcMode == SM_F2F) {
+      signal (SIGINT,  mySignalCatcher);
+      signal (SIGTERM, mySignalCatcher);
+#     if BZ_UNIX
+      signal (SIGHUP,  mySignalCatcher);
+#     endif
+   }
+
+   if (opMode == OM_Z) {
+     if (srcMode == SM_I2O) {
+        compress ( NULL );
+     } else {
+        decode = True;
+        for (aa = argList; aa != NULL; aa = aa->link) {
+           if (ISFLAG("--")) { decode = False; continue; }
+           if (aa->name[0] == '-' && decode) continue;
+           numFilesProcessed++;
+           compress ( aa->name );
+        }
+     }
+   } 
+   else
+
+   if (opMode == OM_UNZ) {
+      unzFailsExist = False;
+      if (srcMode == SM_I2O) {
+         uncompress ( NULL );
+      } else {
+         decode = True;
+         for (aa = argList; aa != NULL; aa = aa->link) {
+            if (ISFLAG("--")) { decode = False; continue; }
+            if (aa->name[0] == '-' && decode) continue;
+            numFilesProcessed++;
+            uncompress ( aa->name );
+         }      
+      }
+      if (unzFailsExist) { 
+         setExit(2); 
+         exit(exitValue);
+      }
+   } 
+
+   else {
+      testFailsExist = False;
+      if (srcMode == SM_I2O) {
+         testf ( NULL );
+      } else {
+         decode = True;
+         for (aa = argList; aa != NULL; aa = aa->link) {
+	    if (ISFLAG("--")) { decode = False; continue; }
+            if (aa->name[0] == '-' && decode) continue;
+            numFilesProcessed++;
+            testf ( aa->name );
+	 }
+      }
+      if (testFailsExist) {
+	 if (noisy) {
+            fprintf ( stderr,
+               "\n"
+               "You can use the `bzip2recover' program to attempt to recover\n"
+               "data from undamaged sections of corrupted files.\n\n"
+            );
+	 }
+         setExit(2);
+         exit(exitValue);
+      }
+   }
+
+   /* Free the argument list memory to mollify leak detectors 
+      (eg) Purify, Checker.  Serves no other useful purpose.
+   */
+   aa = argList;
+   while (aa != NULL) {
+      Cell* aa2 = aa->link;
+      if (aa->name != NULL) free(aa->name);
+      free(aa);
+      aa = aa2;
+   }
+
+   return exitValue;
+}
+
+
+/*-----------------------------------------------------------*/
+/*--- end                                         bzip2.c ---*/
+/*-----------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.txt b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.txt
new file mode 100644
index 000000000..a50570bc2
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2.txt
@@ -0,0 +1,391 @@
+
+NAME
+       bzip2, bunzip2 - a block-sorting file compressor, v1.0.8
+       bzcat - decompresses files to stdout
+       bzip2recover - recovers data from damaged bzip2 files
+
+
+SYNOPSIS
+       bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ...  ]
+       bunzip2 [ -fkvsVL ] [ filenames ...  ]
+       bzcat [ -s ] [ filenames ...  ]
+       bzip2recover filename
+
+
+DESCRIPTION
+       bzip2  compresses  files  using  the Burrows-Wheeler block
+       sorting text compression algorithm,  and  Huffman  coding.
+       Compression  is  generally  considerably  better than that
+       achieved by more conventional LZ77/LZ78-based compressors,
+       and  approaches  the performance of the PPM family of sta-
+       tistical compressors.
+
+       The command-line options are deliberately very similar  to
+       those of GNU gzip, but they are not identical.
+
+       bzip2  expects  a list of file names to accompany the com-
+       mand-line flags.  Each file is replaced  by  a  compressed
+       version  of  itself,  with  the  name "original_name.bz2".
+       Each compressed file has the same modification date,  per-
+       missions, and, when possible, ownership as the correspond-
+       ing original, so that these properties  can  be  correctly
+       restored  at  decompression  time.   File name handling is
+       naive in the sense that there is no mechanism for preserv-
+       ing  original file names, permissions, ownerships or dates
+       in filesystems which lack these concepts, or have  serious
+       file name length restrictions, such as MS-DOS.
+
+       bzip2  and  bunzip2 will by default not overwrite existing
+       files.  If you want this to happen, specify the -f flag.
+
+       If no file names  are  specified,  bzip2  compresses  from
+       standard  input  to  standard output.  In this case, bzip2
+       will decline to write compressed output to a terminal,  as
+       this  would  be  entirely  incomprehensible  and therefore
+       pointless.
+
+       bunzip2 (or bzip2 -d) decompresses  all  specified  files.
+       Files which were not created by bzip2 will be detected and
+       ignored, and a warning issued.  bzip2  attempts  to  guess
+       the  filename  for  the decompressed file from that of the
+       compressed file as follows:
+
+              filename.bz2    becomes   filename
+              filename.bz     becomes   filename
+              filename.tbz2   becomes   filename.tar
+              filename.tbz    becomes   filename.tar
+              anyothername    becomes   anyothername.out
+
+       If the file does not end in one of the recognised endings,
+       .bz2,  .bz,  .tbz2 or .tbz, bzip2 complains that it cannot
+       guess the name of the original file, and uses the original
+       name with .out appended.
+
+       As  with compression, supplying no filenames causes decom-
+       pression from standard input to standard output.
+
+       bunzip2 will correctly decompress a file which is the con-
+       catenation of two or more compressed files.  The result is
+       the concatenation of the corresponding uncompressed files.
+       Integrity testing (-t) of concatenated compressed files is
+       also supported.
+
+       You can also compress or decompress files to the  standard
+       output  by giving the -c flag.  Multiple files may be com-
+       pressed and decompressed like this.  The resulting outputs
+       are  fed  sequentially to stdout.  Compression of multiple
+       files in this manner generates a stream containing  multi-
+       ple compressed file representations.  Such a stream can be
+       decompressed correctly only  by  bzip2  version  0.9.0  or
+       later.   Earlier  versions of bzip2 will stop after decom-
+       pressing the first file in the stream.
+
+       bzcat (or bzip2 -dc) decompresses all specified  files  to
+       the standard output.
+
+       bzip2  will  read arguments from the environment variables
+       BZIP2 and BZIP, in  that  order,  and  will  process  them
+       before  any  arguments  read  from the command line.  This
+       gives a convenient way to supply default arguments.
+
+       Compression is always performed, even  if  the  compressed
+       file  is slightly larger than the original.  Files of less
+       than about one hundred bytes tend to get larger, since the
+       compression  mechanism  has  a  constant  overhead  in the
+       region of 50 bytes.  Random data (including the output  of
+       most  file  compressors)  is  coded at about 8.05 bits per
+       byte, giving an expansion of around 0.5%.
+
+       As a self-check for your  protection,  bzip2  uses  32-bit
+       CRCs  to make sure that the decompressed version of a file
+       is identical to the original.  This guards against corrup-
+       tion  of  the compressed data, and against undetected bugs
+       in bzip2 (hopefully very unlikely).  The chances  of  data
+       corruption  going  undetected  is  microscopic,  about one
+       chance in four billion for each file processed.  Be aware,
+       though,  that  the  check occurs upon decompression, so it
+       can only tell you that something is wrong.  It can't  help
+       you  recover  the original uncompressed data.  You can use
+       bzip2recover to try to recover data from damaged files.
+
+       Return values: 0 for a normal exit,  1  for  environmental
+       problems  (file not found, invalid flags, I/O errors, &c),
+       2 to indicate a corrupt compressed file, 3 for an internal
+       consistency error (eg, bug) which caused bzip2 to panic.
+
+
+OPTIONS
+       -c --stdout
+              Compress or decompress to standard output.
+
+       -d --decompress
+              Force  decompression.  bzip2, bunzip2 and bzcat are
+              really the same program,  and  the  decision  about
+              what  actions to take is done on the basis of which
+              name is used.  This flag overrides that  mechanism,
+              and forces bzip2 to decompress.
+
+       -z --compress
+              The   complement   to   -d:   forces   compression,
+              regardless of the invocation name.
+
+       -t --test
+              Check integrity of the specified file(s), but don't
+              decompress  them.   This  really  performs  a trial
+              decompression and throws away the result.
+
+       -f --force
+              Force overwrite of output files.   Normally,  bzip2
+              will  not  overwrite  existing  output files.  Also
+              forces bzip2 to break hard links to files, which it
+              otherwise wouldn't do.
+
+              bzip2  normally  declines to decompress files which
+              don't have the  correct  magic  header  bytes.   If
+              forced  (-f),  however,  it  will  pass  such files
+              through unmodified.  This is how GNU gzip  behaves.
+
+       -k --keep
+              Keep  (don't delete) input files during compression
+              or decompression.
+
+       -s --small
+              Reduce memory usage, for compression, decompression
+              and  testing.   Files  are  decompressed and tested
+              using a modified algorithm which only requires  2.5
+              bytes  per  block byte.  This means any file can be
+              decompressed in 2300k of memory,  albeit  at  about
+              half the normal speed.
+
+              During  compression,  -s  selects  a  block size of
+              200k, which limits memory use to  around  the  same
+              figure,  at  the expense of your compression ratio.
+              In short, if your  machine  is  low  on  memory  (8
+              megabytes  or  less),  use  -s for everything.  See
+              MEMORY MANAGEMENT below.
+
+       -q --quiet
+              Suppress non-essential warning messages.   Messages
+              pertaining  to I/O errors and other critical events
+              will not be suppressed.
+
+       -v --verbose
+              Verbose mode -- show the compression ratio for each
+              file  processed.   Further  -v's  increase the ver-
+              bosity level, spewing out lots of information which
+              is primarily of interest for diagnostic purposes.
+
+       -L --license -V --version
+              Display  the  software  version,  license terms and
+              conditions.
+
+       -1 (or --fast) to -9 (or --best)
+              Set the block size to 100 k, 200 k ..  900  k  when
+              compressing.   Has  no  effect  when decompressing.
+              See MEMORY MANAGEMENT below.  The --fast and --best
+              aliases  are  primarily for GNU gzip compatibility.
+              In particular, --fast doesn't make things  signifi-
+              cantly  faster.   And  --best  merely  selects  the
+              default behaviour.
+
+       --     Treats all subsequent arguments as file names, even
+              if they start with a dash.  This is so you can han-
+              dle files with names beginning  with  a  dash,  for
+              example: bzip2 -- -myfilename.
+
+       --repetitive-fast --repetitive-best
+              These  flags  are  redundant  in versions 0.9.5 and
+              above.  They provided some coarse control over  the
+              behaviour  of the sorting algorithm in earlier ver-
+              sions, which was sometimes useful.  0.9.5 and above
+              have  an  improved  algorithm  which  renders these
+              flags irrelevant.
+
+
+MEMORY MANAGEMENT
+       bzip2 compresses large files in blocks.   The  block  size
+       affects  both  the  compression  ratio  achieved,  and the
+       amount of memory needed for compression and decompression.
+       The  flags  -1  through  -9  specify  the block size to be
+       100,000 bytes through 900,000 bytes (the default)  respec-
+       tively.   At  decompression  time, the block size used for
+       compression is read from  the  header  of  the  compressed
+       file, and bunzip2 then allocates itself just enough memory
+       to decompress the file.  Since block sizes are  stored  in
+       compressed  files,  it follows that the flags -1 to -9 are
+       irrelevant to and so ignored during decompression.
+
+       Compression and decompression requirements, in bytes,  can
+       be estimated as:
+
+              Compression:   400k + ( 8 x block size )
+
+              Decompression: 100k + ( 4 x block size ), or
+                             100k + ( 2.5 x block size )
+
+       Larger  block  sizes  give  rapidly  diminishing  marginal
+       returns.  Most of the compression comes from the first two
+       or  three hundred k of block size, a fact worth bearing in
+       mind when using bzip2  on  small  machines.   It  is  also
+       important  to  appreciate  that  the  decompression memory
+       requirement is set at compression time by  the  choice  of
+       block size.
+
+       For  files  compressed  with  the default 900k block size,
+       bunzip2 will require about 3700 kbytes to decompress.   To
+       support decompression of any file on a 4 megabyte machine,
+       bunzip2 has an option to  decompress  using  approximately
+       half this amount of memory, about 2300 kbytes.  Decompres-
+       sion speed is also halved, so you should use  this  option
+       only where necessary.  The relevant flag is -s.
+
+       In general, try and use the largest block size memory con-
+       straints  allow,  since  that  maximises  the  compression
+       achieved.   Compression and decompression speed are virtu-
+       ally unaffected by block size.
+
+       Another significant point applies to files which fit in  a
+       single  block  --  that  means  most files you'd encounter
+       using a large block  size.   The  amount  of  real  memory
+       touched is proportional to the size of the file, since the
+       file is smaller than a block.  For example, compressing  a
+       file  20,000  bytes  long  with the flag -9 will cause the
+       compressor to allocate around 7600k of  memory,  but  only
+       touch 400k + 20000 * 8 = 560 kbytes of it.  Similarly, the
+       decompressor will allocate 3700k but  only  touch  100k  +
+       20000 * 4 = 180 kbytes.
+
+       Here  is a table which summarises the maximum memory usage
+       for different block sizes.  Also  recorded  is  the  total
+       compressed  size for 14 files of the Calgary Text Compres-
+       sion Corpus totalling 3,141,622 bytes.  This column  gives
+       some  feel  for  how  compression  varies with block size.
+       These figures tend to understate the advantage  of  larger
+       block  sizes  for  larger files, since the Corpus is domi-
+       nated by smaller files.
+
+                  Compress   Decompress   Decompress   Corpus
+           Flag     usage      usage       -s usage     Size
+
+            -1      1200k       500k         350k      914704
+            -2      2000k       900k         600k      877703
+            -3      2800k      1300k         850k      860338
+            -4      3600k      1700k        1100k      846899
+            -5      4400k      2100k        1350k      845160
+            -6      5200k      2500k        1600k      838626
+            -7      6100k      2900k        1850k      834096
+            -8      6800k      3300k        2100k      828642
+            -9      7600k      3700k        2350k      828642
+
+
+RECOVERING DATA FROM DAMAGED FILES
+       bzip2 compresses files in blocks, usually 900kbytes  long.
+       Each block is handled independently.  If a media or trans-
+       mission error causes a multi-block  .bz2  file  to  become
+       damaged,  it  may  be  possible  to  recover data from the
+       undamaged blocks in the file.
+
+       The compressed representation of each block  is  delimited
+       by  a  48-bit pattern, which makes it possible to find the
+       block boundaries with reasonable  certainty.   Each  block
+       also  carries its own 32-bit CRC, so damaged blocks can be
+       distinguished from undamaged ones.
+
+       bzip2recover is a  simple  program  whose  purpose  is  to
+       search  for blocks in .bz2 files, and write each block out
+       into its own .bz2 file.  You can then use bzip2 -t to test
+       the integrity of the resulting files, and decompress those
+       which are undamaged.
+
+       bzip2recover takes a single argument, the name of the dam-
+       aged    file,    and    writes    a    number   of   files
+       "rec00001file.bz2",  "rec00002file.bz2",  etc,  containing
+       the   extracted   blocks.   The   output   filenames   are
+       designed  so  that the use of wildcards in subsequent pro-
+       cessing  -- for example, "bzip2 -dc  rec*file.bz2 > recov-
+       ered_data" -- processes the files in the correct order.
+
+       bzip2recover should be of most use dealing with large .bz2
+       files,  as  these will contain many blocks.  It is clearly
+       futile to use it on damaged single-block  files,  since  a
+       damaged  block  cannot  be recovered.  If you wish to min-
+       imise any potential data loss through media  or  transmis-
+       sion errors, you might consider compressing with a smaller
+       block size.
+
+
+PERFORMANCE NOTES
+       The sorting phase of compression gathers together  similar
+       strings  in  the  file.  Because of this, files containing
+       very long runs of  repeated  symbols,  like  "aabaabaabaab
+       ..."   (repeated  several hundred times) may compress more
+       slowly than normal.  Versions 0.9.5 and  above  fare  much
+       better  than previous versions in this respect.  The ratio
+       between worst-case and average-case compression time is in
+       the  region  of  10:1.  For previous versions, this figure
+       was more like 100:1.  You can use the -vvvv option to mon-
+       itor progress in great detail, if you want.
+
+       Decompression speed is unaffected by these phenomena.
+
+       bzip2  usually  allocates  several  megabytes of memory to
+       operate in, and then charges all over it in a fairly  ran-
+       dom  fashion.   This means that performance, both for com-
+       pressing and decompressing, is largely determined  by  the
+       speed  at  which  your  machine  can service cache misses.
+       Because of this, small changes to the code to  reduce  the
+       miss  rate  have  been observed to give disproportionately
+       large performance improvements.  I imagine bzip2 will per-
+       form best on machines with very large caches.
+
+
+CAVEATS
+       I/O  error  messages  are not as helpful as they could be.
+       bzip2 tries hard to detect I/O errors  and  exit  cleanly,
+       but  the  details  of  what  the problem is sometimes seem
+       rather misleading.
+
+       This manual page pertains to version 1.0.8 of bzip2.  Com-
+       pressed  data created by this version is entirely forwards
+       and  backwards  compatible  with   the   previous   public
+       releases,  versions  0.1pl2,  0.9.0,  0.9.5, 1.0.0, 1.0.1,
+       1.0.2 and above, but with the  following  exception: 0.9.0
+       and above can  correctly decompress  multiple concatenated
+       compressed files.  0.1pl2  cannot do this;  it  will  stop
+       after  decompressing just the first file in the stream.
+
+       bzip2recover  versions prior to 1.0.2 used 32-bit integers
+       to represent bit positions in compressed  files,  so  they
+       could  not handle compressed files more than 512 megabytes
+       long.  Versions 1.0.2 and above use 64-bit  ints  on  some
+       platforms  which  support them (GNU supported targets, and
+       Windows).  To establish whether or  not  bzip2recover  was
+       built  with  such  a limitation, run it without arguments.
+       In any event you can build yourself an  unlimited  version
+       if  you  can  recompile  it  with MaybeUInt64 set to be an
+       unsigned 64-bit integer.
+
+
+AUTHOR
+       Julian Seward, jseward@acm.org
+
+       https://sourceware.org/bzip2/
+
+       The ideas embodied in bzip2 are due to (at least) the fol-
+       lowing  people: Michael Burrows and David Wheeler (for the
+       block sorting transformation), David Wheeler  (again,  for
+       the Huffman coder), Peter Fenwick (for the structured cod-
+       ing model in the original bzip, and many refinements), and
+       Alistair  Moffat,  Radford  Neal  and  Ian Witten (for the
+       arithmetic  coder  in  the  original  bzip).   I  am  much
+       indebted for their help, support and advice.  See the man-
+       ual in the source distribution for pointers to sources  of
+       documentation.  Christian von Roques encouraged me to look
+       for faster sorting algorithms, so as to speed up  compres-
+       sion.  Bela Lubkin encouraged me to improve the worst-case
+       compression performance.  Donna Robinson XMLised the docu-
+       mentation.   The bz* scripts are derived from those of GNU
+       gzip.  Many people sent patches, helped  with  portability
+       problems,  lent  machines,  gave advice and were generally
+       helpful.
+
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2recover.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2recover.c
new file mode 100644
index 000000000..a8131e061
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzip2recover.c
@@ -0,0 +1,516 @@
+/*-----------------------------------------------------------*/
+/*--- Block recoverer program for bzip2                   ---*/
+/*---                                      bzip2recover.c ---*/
+/*-----------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+/* This program is a complete hack and should be rewritten properly.
+	 It isn't very complicated. */
+
+#include 
+#include 
+#include 
+#include 
+
+
+/* This program records bit locations in the file to be recovered.
+   That means that if 64-bit ints are not supported, we will not
+   be able to recover .bz2 files over 512MB (2^32 bits) long.
+   On GNU supported platforms, we take advantage of the 64-bit
+   int support to circumvent this problem.  Ditto MSVC.
+
+   This change occurred in version 1.0.2; all prior versions have
+   the 512MB limitation.
+*/
+#ifdef __GNUC__
+   typedef  unsigned long long int  MaybeUInt64;
+#  define MaybeUInt64_FMT "%Lu"
+#else
+#ifdef _MSC_VER
+   typedef  unsigned __int64  MaybeUInt64;
+#  define MaybeUInt64_FMT "%I64u"
+#else
+   typedef  unsigned int   MaybeUInt64;
+#  define MaybeUInt64_FMT "%u"
+#endif
+#endif
+
+typedef  unsigned int   UInt32;
+typedef  int            Int32;
+typedef  unsigned char  UChar;
+typedef  char           Char;
+typedef  unsigned char  Bool;
+#define True    ((Bool)1)
+#define False   ((Bool)0)
+
+
+#define BZ_MAX_FILENAME 2000
+
+Char inFileName[BZ_MAX_FILENAME];
+Char outFileName[BZ_MAX_FILENAME];
+Char progName[BZ_MAX_FILENAME];
+
+MaybeUInt64 bytesOut = 0;
+MaybeUInt64 bytesIn  = 0;
+
+
+/*---------------------------------------------------*/
+/*--- Header bytes                                ---*/
+/*---------------------------------------------------*/
+
+#define BZ_HDR_B 0x42                         /* 'B' */
+#define BZ_HDR_Z 0x5a                         /* 'Z' */
+#define BZ_HDR_h 0x68                         /* 'h' */
+#define BZ_HDR_0 0x30                         /* '0' */
+ 
+
+/*---------------------------------------------------*/
+/*--- I/O errors                                  ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------*/
+static void readError ( void )
+{
+   fprintf ( stderr,
+             "%s: I/O error reading `%s', possible reason follows.\n",
+            progName, inFileName );
+   perror ( progName );
+   fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n",
+             progName );
+   exit ( 1 );
+}
+
+
+/*---------------------------------------------*/
+static void writeError ( void )
+{
+   fprintf ( stderr,
+             "%s: I/O error reading `%s', possible reason follows.\n",
+            progName, inFileName );
+   perror ( progName );
+   fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n",
+             progName );
+   exit ( 1 );
+}
+
+
+/*---------------------------------------------*/
+static void mallocFail ( Int32 n )
+{
+   fprintf ( stderr,
+             "%s: malloc failed on request for %d bytes.\n",
+            progName, n );
+   fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n",
+             progName );
+   exit ( 1 );
+}
+
+
+/*---------------------------------------------*/
+static void tooManyBlocks ( Int32 max_handled_blocks )
+{
+   fprintf ( stderr,
+             "%s: `%s' appears to contain more than %d blocks\n",
+            progName, inFileName, max_handled_blocks );
+   fprintf ( stderr,
+             "%s: and cannot be handled.  To fix, increase\n",
+             progName );
+   fprintf ( stderr, 
+             "%s: BZ_MAX_HANDLED_BLOCKS in bzip2recover.c, and recompile.\n",
+             progName );
+   exit ( 1 );
+}
+
+
+
+/*---------------------------------------------------*/
+/*--- Bit stream I/O                              ---*/
+/*---------------------------------------------------*/
+
+typedef
+   struct {
+      FILE*  handle;
+      Int32  buffer;
+      Int32  buffLive;
+      Char   mode;
+   }
+   BitStream;
+
+
+/*---------------------------------------------*/
+static BitStream* bsOpenReadStream ( FILE* stream )
+{
+   BitStream *bs = malloc ( sizeof(BitStream) );
+   if (bs == NULL) mallocFail ( sizeof(BitStream) );
+   bs->handle = stream;
+   bs->buffer = 0;
+   bs->buffLive = 0;
+   bs->mode = 'r';
+   return bs;
+}
+
+
+/*---------------------------------------------*/
+static BitStream* bsOpenWriteStream ( FILE* stream )
+{
+   BitStream *bs = malloc ( sizeof(BitStream) );
+   if (bs == NULL) mallocFail ( sizeof(BitStream) );
+   bs->handle = stream;
+   bs->buffer = 0;
+   bs->buffLive = 0;
+   bs->mode = 'w';
+   return bs;
+}
+
+
+/*---------------------------------------------*/
+static void bsPutBit ( BitStream* bs, Int32 bit )
+{
+   if (bs->buffLive == 8) {
+      Int32 retVal = putc ( (UChar) bs->buffer, bs->handle );
+      if (retVal == EOF) writeError();
+      bytesOut++;
+      bs->buffLive = 1;
+      bs->buffer = bit & 0x1;
+   } else {
+      bs->buffer = ( (bs->buffer << 1) | (bit & 0x1) );
+      bs->buffLive++;
+   };
+}
+
+
+/*---------------------------------------------*/
+/*--
+   Returns 0 or 1, or 2 to indicate EOF.
+--*/
+static Int32 bsGetBit ( BitStream* bs )
+{
+   if (bs->buffLive > 0) {
+      bs->buffLive --;
+      return ( ((bs->buffer) >> (bs->buffLive)) & 0x1 );
+   } else {
+      Int32 retVal = getc ( bs->handle );
+      if ( retVal == EOF ) {
+         if (errno != 0) readError();
+         return 2;
+      }
+      bs->buffLive = 7;
+      bs->buffer = retVal;
+      return ( ((bs->buffer) >> 7) & 0x1 );
+   }
+}
+
+
+/*---------------------------------------------*/
+static void bsClose ( BitStream* bs )
+{
+   Int32 retVal;
+
+   if ( bs->mode == 'w' ) {
+      while ( bs->buffLive < 8 ) {
+         bs->buffLive++;
+         bs->buffer <<= 1;
+      };
+      retVal = putc ( (UChar) (bs->buffer), bs->handle );
+      if (retVal == EOF) writeError();
+      bytesOut++;
+      retVal = fflush ( bs->handle );
+      if (retVal == EOF) writeError();
+   }
+   retVal = fclose ( bs->handle );
+   if (retVal == EOF) {
+      if (bs->mode == 'w') writeError(); else readError();
+   }
+   free ( bs );
+}
+
+
+/*---------------------------------------------*/
+static void bsPutUChar ( BitStream* bs, UChar c )
+{
+   Int32 i;
+   for (i = 7; i >= 0; i--)
+      bsPutBit ( bs, (((UInt32) c) >> i) & 0x1 );
+}
+
+
+/*---------------------------------------------*/
+static void bsPutUInt32 ( BitStream* bs, UInt32 c )
+{
+   Int32 i;
+
+   for (i = 31; i >= 0; i--)
+      bsPutBit ( bs, (c >> i) & 0x1 );
+}
+
+
+/*---------------------------------------------*/
+static Bool endsInBz2 ( Char* name )
+{
+   Int32 n = strlen ( name );
+   if (n <= 4) return False;
+   return
+      (name[n-4] == '.' &&
+       name[n-3] == 'b' &&
+       name[n-2] == 'z' &&
+       name[n-1] == '2');
+}
+
+
+/*---------------------------------------------------*/
+/*---                                             ---*/
+/*---------------------------------------------------*/
+
+/* This logic isn't really right when it comes to Cygwin. */
+#ifdef _WIN32
+#  define  BZ_SPLIT_SYM  '\\'  /* path splitter on Windows platform */
+#else
+#  define  BZ_SPLIT_SYM  '/'   /* path splitter on Unix platform */
+#endif
+
+#define BLOCK_HEADER_HI  0x00003141UL
+#define BLOCK_HEADER_LO  0x59265359UL
+
+#define BLOCK_ENDMARK_HI 0x00001772UL
+#define BLOCK_ENDMARK_LO 0x45385090UL
+
+/* Increase if necessary.  However, a .bz2 file with > 50000 blocks
+   would have an uncompressed size of at least 40GB, so the chances
+   are low you'll need to up this.
+*/
+#define BZ_MAX_HANDLED_BLOCKS 50000
+
+MaybeUInt64 bStart [BZ_MAX_HANDLED_BLOCKS];
+MaybeUInt64 bEnd   [BZ_MAX_HANDLED_BLOCKS];
+MaybeUInt64 rbStart[BZ_MAX_HANDLED_BLOCKS];
+MaybeUInt64 rbEnd  [BZ_MAX_HANDLED_BLOCKS];
+
+Int32 main ( Int32 argc, Char** argv )
+{
+   FILE*       inFile;
+   FILE*       outFile;
+   BitStream*  bsIn, *bsWr;
+   Int32       b, wrBlock, currBlock, rbCtr;
+   MaybeUInt64 bitsRead;
+
+   UInt32      buffHi, buffLo, blockCRC;
+   Char*       p;
+
+   strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
+   progName[BZ_MAX_FILENAME-1]='\0';
+   inFileName[0] = outFileName[0] = 0;
+
+   fprintf ( stderr, 
+             "bzip2recover 1.0.8: extracts blocks from damaged .bz2 files.\n" );
+
+   if (argc != 2) {
+      fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
+                        progName, progName );
+      switch (sizeof(MaybeUInt64)) {
+         case 8:
+            fprintf(stderr, 
+                    "\trestrictions on size of recovered file: None\n");
+            break;
+         case 4:
+            fprintf(stderr, 
+                    "\trestrictions on size of recovered file: 512 MB\n");
+            fprintf(stderr, 
+                    "\tto circumvent, recompile with MaybeUInt64 as an\n"
+                    "\tunsigned 64-bit int.\n");
+            break;
+         default:
+            fprintf(stderr, 
+                    "\tsizeof(MaybeUInt64) is not 4 or 8 -- "
+                    "configuration error.\n");
+            break;
+      }
+      exit(1);
+   }
+
+   if (strlen(argv[1]) >= BZ_MAX_FILENAME-20) {
+      fprintf ( stderr, 
+                "%s: supplied filename is suspiciously (>= %d chars) long.  Bye!\n",
+                progName, (int)strlen(argv[1]) );
+      exit(1);
+   }
+
+   strcpy ( inFileName, argv[1] );
+
+   inFile = fopen ( inFileName, "rb" );
+   if (inFile == NULL) {
+      fprintf ( stderr, "%s: can't read `%s'\n", progName, inFileName );
+      exit(1);
+   }
+
+   bsIn = bsOpenReadStream ( inFile );
+   fprintf ( stderr, "%s: searching for block boundaries ...\n", progName );
+
+   bitsRead = 0;
+   buffHi = buffLo = 0;
+   currBlock = 0;
+   bStart[currBlock] = 0;
+
+   rbCtr = 0;
+
+   while (True) {
+      b = bsGetBit ( bsIn );
+      bitsRead++;
+      if (b == 2) {
+         if (bitsRead >= bStart[currBlock] &&
+            (bitsRead - bStart[currBlock]) >= 40) {
+            bEnd[currBlock] = bitsRead-1;
+            if (currBlock > 0)
+               fprintf ( stderr, "   block %d runs from " MaybeUInt64_FMT 
+                                 " to " MaybeUInt64_FMT " (incomplete)\n",
+                         currBlock,  bStart[currBlock], bEnd[currBlock] );
+         } else
+            currBlock--;
+         break;
+      }
+      buffHi = (buffHi << 1) | (buffLo >> 31);
+      buffLo = (buffLo << 1) | (b & 1);
+      if ( ( (buffHi & 0x0000ffff) == BLOCK_HEADER_HI 
+             && buffLo == BLOCK_HEADER_LO)
+           || 
+           ( (buffHi & 0x0000ffff) == BLOCK_ENDMARK_HI 
+             && buffLo == BLOCK_ENDMARK_LO)
+         ) {
+         if (bitsRead > 49) {
+            bEnd[currBlock] = bitsRead-49;
+         } else {
+            bEnd[currBlock] = 0;
+         }
+         if (currBlock > 0 &&
+	     (bEnd[currBlock] - bStart[currBlock]) >= 130) {
+            fprintf ( stderr, "   block %d runs from " MaybeUInt64_FMT 
+                              " to " MaybeUInt64_FMT "\n",
+                      rbCtr+1,  bStart[currBlock], bEnd[currBlock] );
+            rbStart[rbCtr] = bStart[currBlock];
+            rbEnd[rbCtr] = bEnd[currBlock];
+            rbCtr++;
+         }
+         if (currBlock >= BZ_MAX_HANDLED_BLOCKS)
+            tooManyBlocks(BZ_MAX_HANDLED_BLOCKS);
+         currBlock++;
+
+         bStart[currBlock] = bitsRead;
+      }
+   }
+
+   bsClose ( bsIn );
+
+   /*-- identified blocks run from 1 to rbCtr inclusive. --*/
+
+   if (rbCtr < 1) {
+      fprintf ( stderr,
+                "%s: sorry, I couldn't find any block boundaries.\n",
+                progName );
+      exit(1);
+   };
+
+   fprintf ( stderr, "%s: splitting into blocks\n", progName );
+
+   inFile = fopen ( inFileName, "rb" );
+   if (inFile == NULL) {
+      fprintf ( stderr, "%s: can't open `%s'\n", progName, inFileName );
+      exit(1);
+   }
+   bsIn = bsOpenReadStream ( inFile );
+
+   /*-- placate gcc's dataflow analyser --*/
+   blockCRC = 0; bsWr = 0;
+
+   bitsRead = 0;
+   outFile = NULL;
+   wrBlock = 0;
+   while (True) {
+      b = bsGetBit(bsIn);
+      if (b == 2) break;
+      buffHi = (buffHi << 1) | (buffLo >> 31);
+      buffLo = (buffLo << 1) | (b & 1);
+      if (bitsRead == 47+rbStart[wrBlock]) 
+         blockCRC = (buffHi << 16) | (buffLo >> 16);
+
+      if (outFile != NULL && bitsRead >= rbStart[wrBlock]
+                          && bitsRead <= rbEnd[wrBlock]) {
+         bsPutBit ( bsWr, b );
+      }
+
+      bitsRead++;
+
+      if (bitsRead == rbEnd[wrBlock]+1) {
+         if (outFile != NULL) {
+            bsPutUChar ( bsWr, 0x17 ); bsPutUChar ( bsWr, 0x72 );
+            bsPutUChar ( bsWr, 0x45 ); bsPutUChar ( bsWr, 0x38 );
+            bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
+            bsPutUInt32 ( bsWr, blockCRC );
+            bsClose ( bsWr );
+            outFile = NULL;
+         }
+         if (wrBlock >= rbCtr) break;
+         wrBlock++;
+      } else
+      if (bitsRead == rbStart[wrBlock]) {
+         /* Create the output file name, correctly handling leading paths. 
+            (31.10.2001 by Sergey E. Kusikov) */
+         Char* split;
+         Int32 ofs, k;
+         for (k = 0; k < BZ_MAX_FILENAME; k++) 
+            outFileName[k] = 0;
+         strcpy (outFileName, inFileName);
+         split = strrchr (outFileName, BZ_SPLIT_SYM);
+         if (split == NULL) {
+            split = outFileName;
+         } else {
+            ++split;
+	 }
+	 /* Now split points to the start of the basename. */
+         ofs  = split - outFileName;
+         sprintf (split, "rec%5d", wrBlock+1);
+         for (p = split; *p != 0; p++) if (*p == ' ') *p = '0';
+         strcat (outFileName, inFileName + ofs);
+
+         if ( !endsInBz2(outFileName)) strcat ( outFileName, ".bz2" );
+
+         fprintf ( stderr, "   writing block %d to `%s' ...\n",
+                           wrBlock+1, outFileName );
+
+         outFile = fopen ( outFileName, "wb" );
+         if (outFile == NULL) {
+            fprintf ( stderr, "%s: can't write `%s'\n",
+                      progName, outFileName );
+            exit(1);
+         }
+         bsWr = bsOpenWriteStream ( outFile );
+         bsPutUChar ( bsWr, BZ_HDR_B );    
+         bsPutUChar ( bsWr, BZ_HDR_Z );    
+         bsPutUChar ( bsWr, BZ_HDR_h );    
+         bsPutUChar ( bsWr, BZ_HDR_0 + 9 );
+         bsPutUChar ( bsWr, 0x31 ); bsPutUChar ( bsWr, 0x41 );
+         bsPutUChar ( bsWr, 0x59 ); bsPutUChar ( bsWr, 0x26 );
+         bsPutUChar ( bsWr, 0x53 ); bsPutUChar ( bsWr, 0x59 );
+      }
+   }
+
+   fprintf ( stderr, "%s: finished\n", progName );
+   return 0;
+}
+
+
+
+/*-----------------------------------------------------------*/
+/*--- end                                  bzip2recover.c ---*/
+/*-----------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.c
new file mode 100644
index 000000000..21786551b
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.c
@@ -0,0 +1,1572 @@
+
+/*-------------------------------------------------------------*/
+/*--- Library top-level functions.                          ---*/
+/*---                                               bzlib.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+/* CHANGES
+   0.9.0    -- original version.
+   0.9.0a/b -- no changes in this file.
+   0.9.0c   -- made zero-length BZ_FLUSH work correctly in bzCompress().
+     fixed bzWrite/bzRead to ignore zero-length requests.
+     fixed bzread to correctly handle read requests after EOF.
+     wrong parameter order in call to bzDecompressInit in
+     bzBuffToBuffDecompress.  Fixed.
+*/
+
+#include "bzlib_private.h"
+
+
+/*---------------------------------------------------*/
+/*--- Compression stuff                           ---*/
+/*---------------------------------------------------*/
+
+
+/*---------------------------------------------------*/
+#ifndef BZ_NO_STDIO
+void BZ2_bz__AssertH__fail ( int errcode )
+{
+   fprintf(stderr, 
+      "\n\nbzip2/libbzip2: internal error number %d.\n"
+      "This is a bug in bzip2/libbzip2, %s.\n"
+      "Please report it to: bzip2-devel@sourceware.org.  If this happened\n"
+      "when you were using some program which uses libbzip2 as a\n"
+      "component, you should also report this bug to the author(s)\n"
+      "of that program.  Please make an effort to report this bug;\n"
+      "timely and accurate bug reports eventually lead to higher\n"
+      "quality software.  Thanks.\n\n",
+      errcode,
+      BZ2_bzlibVersion()
+   );
+
+   if (errcode == 1007) {
+   fprintf(stderr,
+      "\n*** A special note about internal error number 1007 ***\n"
+      "\n"
+      "Experience suggests that a common cause of i.e. 1007\n"
+      "is unreliable memory or other hardware.  The 1007 assertion\n"
+      "just happens to cross-check the results of huge numbers of\n"
+      "memory reads/writes, and so acts (unintendedly) as a stress\n"
+      "test of your memory system.\n"
+      "\n"
+      "I suggest the following: try compressing the file again,\n"
+      "possibly monitoring progress in detail with the -vv flag.\n"
+      "\n"
+      "* If the error cannot be reproduced, and/or happens at different\n"
+      "  points in compression, you may have a flaky memory system.\n"
+      "  Try a memory-test program.  I have used Memtest86\n"
+      "  (www.memtest86.com).  At the time of writing it is free (GPLd).\n"
+      "  Memtest86 tests memory much more thorougly than your BIOSs\n"
+      "  power-on test, and may find failures that the BIOS doesn't.\n"
+      "\n"
+      "* If the error can be repeatably reproduced, this is a bug in\n"
+      "  bzip2, and I would very much like to hear about it.  Please\n"
+      "  let me know, and, ideally, save a copy of the file causing the\n"
+      "  problem -- without which I will be unable to investigate it.\n"
+      "\n"
+   );
+   }
+
+   exit(3);
+}
+#endif
+
+
+/*---------------------------------------------------*/
+static
+int bz_config_ok ( void )
+{
+   if (sizeof(int)   != 4) return 0;
+   if (sizeof(short) != 2) return 0;
+   if (sizeof(char)  != 1) return 0;
+   return 1;
+}
+
+
+/*---------------------------------------------------*/
+static
+void* default_bzalloc ( void* opaque, Int32 items, Int32 size )
+{
+   void* v = malloc ( items * size );
+   return v;
+}
+
+static
+void default_bzfree ( void* opaque, void* addr )
+{
+   if (addr != NULL) free ( addr );
+}
+
+
+/*---------------------------------------------------*/
+static
+void prepare_new_block ( EState* s )
+{
+   Int32 i;
+   s->nblock = 0;
+   s->numZ = 0;
+   s->state_out_pos = 0;
+   BZ_INITIALISE_CRC ( s->blockCRC );
+   for (i = 0; i < 256; i++) s->inUse[i] = False;
+   s->blockNo++;
+}
+
+
+/*---------------------------------------------------*/
+static
+void init_RL ( EState* s )
+{
+   s->state_in_ch  = 256;
+   s->state_in_len = 0;
+}
+
+
+static
+Bool isempty_RL ( EState* s )
+{
+   if (s->state_in_ch < 256 && s->state_in_len > 0)
+      return False; else
+      return True;
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzCompressInit) 
+                    ( bz_stream* strm, 
+                     int        blockSize100k,
+                     int        verbosity,
+                     int        workFactor )
+{
+   Int32   n;
+   EState* s;
+
+   if (!bz_config_ok()) return BZ_CONFIG_ERROR;
+
+   if (strm == NULL || 
+       blockSize100k < 1 || blockSize100k > 9 ||
+       workFactor < 0 || workFactor > 250)
+     return BZ_PARAM_ERROR;
+
+   if (workFactor == 0) workFactor = 30;
+   if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
+   if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
+
+   s = BZALLOC( sizeof(EState) );
+   if (s == NULL) return BZ_MEM_ERROR;
+   s->strm = strm;
+
+   s->arr1 = NULL;
+   s->arr2 = NULL;
+   s->ftab = NULL;
+
+   n       = 100000 * blockSize100k;
+   s->arr1 = BZALLOC( n                  * sizeof(UInt32) );
+   s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
+   s->ftab = BZALLOC( 65537              * sizeof(UInt32) );
+
+   if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
+      if (s->arr1 != NULL) BZFREE(s->arr1);
+      if (s->arr2 != NULL) BZFREE(s->arr2);
+      if (s->ftab != NULL) BZFREE(s->ftab);
+      if (s       != NULL) BZFREE(s);
+      return BZ_MEM_ERROR;
+   }
+
+   s->blockNo           = 0;
+   s->state             = BZ_S_INPUT;
+   s->mode              = BZ_M_RUNNING;
+   s->combinedCRC       = 0;
+   s->blockSize100k     = blockSize100k;
+   s->nblockMAX         = 100000 * blockSize100k - 19;
+   s->verbosity         = verbosity;
+   s->workFactor        = workFactor;
+
+   s->block             = (UChar*)s->arr2;
+   s->mtfv              = (UInt16*)s->arr1;
+   s->zbits             = NULL;
+   s->ptr               = (UInt32*)s->arr1;
+
+   strm->state          = s;
+   strm->total_in_lo32  = 0;
+   strm->total_in_hi32  = 0;
+   strm->total_out_lo32 = 0;
+   strm->total_out_hi32 = 0;
+   init_RL ( s );
+   prepare_new_block ( s );
+   return BZ_OK;
+}
+
+
+/*---------------------------------------------------*/
+static
+void add_pair_to_block ( EState* s )
+{
+   Int32 i;
+   UChar ch = (UChar)(s->state_in_ch);
+   for (i = 0; i < s->state_in_len; i++) {
+      BZ_UPDATE_CRC( s->blockCRC, ch );
+   }
+   s->inUse[s->state_in_ch] = True;
+   switch (s->state_in_len) {
+      case 1:
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         break;
+      case 2:
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         break;
+      case 3:
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         break;
+      default:
+         s->inUse[s->state_in_len-4] = True;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = (UChar)ch; s->nblock++;
+         s->block[s->nblock] = ((UChar)(s->state_in_len-4));
+         s->nblock++;
+         break;
+   }
+}
+
+
+/*---------------------------------------------------*/
+static
+void flush_RL ( EState* s )
+{
+   if (s->state_in_ch < 256) add_pair_to_block ( s );
+   init_RL ( s );
+}
+
+
+/*---------------------------------------------------*/
+#define ADD_CHAR_TO_BLOCK(zs,zchh0)               \
+{                                                 \
+   UInt32 zchh = (UInt32)(zchh0);                 \
+   /*-- fast track the common case --*/           \
+   if (zchh != zs->state_in_ch &&                 \
+       zs->state_in_len == 1) {                   \
+      UChar ch = (UChar)(zs->state_in_ch);        \
+      BZ_UPDATE_CRC( zs->blockCRC, ch );          \
+      zs->inUse[zs->state_in_ch] = True;          \
+      zs->block[zs->nblock] = (UChar)ch;          \
+      zs->nblock++;                               \
+      zs->state_in_ch = zchh;                     \
+   }                                              \
+   else                                           \
+   /*-- general, uncommon cases --*/              \
+   if (zchh != zs->state_in_ch ||                 \
+      zs->state_in_len == 255) {                  \
+      if (zs->state_in_ch < 256)                  \
+         add_pair_to_block ( zs );                \
+      zs->state_in_ch = zchh;                     \
+      zs->state_in_len = 1;                       \
+   } else {                                       \
+      zs->state_in_len++;                         \
+   }                                              \
+}
+
+
+/*---------------------------------------------------*/
+static
+Bool copy_input_until_stop ( EState* s )
+{
+   Bool progress_in = False;
+
+   if (s->mode == BZ_M_RUNNING) {
+
+      /*-- fast track the common case --*/
+      while (True) {
+         /*-- block full? --*/
+         if (s->nblock >= s->nblockMAX) break;
+         /*-- no input? --*/
+         if (s->strm->avail_in == 0) break;
+         progress_in = True;
+         ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); 
+         s->strm->next_in++;
+         s->strm->avail_in--;
+         s->strm->total_in_lo32++;
+         if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
+      }
+
+   } else {
+
+      /*-- general, uncommon case --*/
+      while (True) {
+         /*-- block full? --*/
+         if (s->nblock >= s->nblockMAX) break;
+         /*-- no input? --*/
+         if (s->strm->avail_in == 0) break;
+         /*-- flush/finish end? --*/
+         if (s->avail_in_expect == 0) break;
+         progress_in = True;
+         ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); 
+         s->strm->next_in++;
+         s->strm->avail_in--;
+         s->strm->total_in_lo32++;
+         if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
+         s->avail_in_expect--;
+      }
+   }
+   return progress_in;
+}
+
+
+/*---------------------------------------------------*/
+static
+Bool copy_output_until_stop ( EState* s )
+{
+   Bool progress_out = False;
+
+   while (True) {
+
+      /*-- no output space? --*/
+      if (s->strm->avail_out == 0) break;
+
+      /*-- block done? --*/
+      if (s->state_out_pos >= s->numZ) break;
+
+      progress_out = True;
+      *(s->strm->next_out) = s->zbits[s->state_out_pos];
+      s->state_out_pos++;
+      s->strm->avail_out--;
+      s->strm->next_out++;
+      s->strm->total_out_lo32++;
+      if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
+   }
+
+   return progress_out;
+}
+
+
+/*---------------------------------------------------*/
+static
+Bool handle_compress ( bz_stream* strm )
+{
+   Bool progress_in  = False;
+   Bool progress_out = False;
+   EState* s = strm->state;
+   
+   while (True) {
+
+      if (s->state == BZ_S_OUTPUT) {
+         progress_out |= copy_output_until_stop ( s );
+         if (s->state_out_pos < s->numZ) break;
+         if (s->mode == BZ_M_FINISHING && 
+             s->avail_in_expect == 0 &&
+             isempty_RL(s)) break;
+         prepare_new_block ( s );
+         s->state = BZ_S_INPUT;
+         if (s->mode == BZ_M_FLUSHING && 
+             s->avail_in_expect == 0 &&
+             isempty_RL(s)) break;
+      }
+
+      if (s->state == BZ_S_INPUT) {
+         progress_in |= copy_input_until_stop ( s );
+         if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) {
+            flush_RL ( s );
+            BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) );
+            s->state = BZ_S_OUTPUT;
+         }
+         else
+         if (s->nblock >= s->nblockMAX) {
+            BZ2_compressBlock ( s, False );
+            s->state = BZ_S_OUTPUT;
+         }
+         else
+         if (s->strm->avail_in == 0) {
+            break;
+         }
+      }
+
+   }
+
+   return progress_in || progress_out;
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
+{
+   Bool progress;
+   EState* s;
+   if (strm == NULL) return BZ_PARAM_ERROR;
+   s = strm->state;
+   if (s == NULL) return BZ_PARAM_ERROR;
+   if (s->strm != strm) return BZ_PARAM_ERROR;
+
+   preswitch:
+   switch (s->mode) {
+
+      case BZ_M_IDLE:
+         return BZ_SEQUENCE_ERROR;
+
+      case BZ_M_RUNNING:
+         if (action == BZ_RUN) {
+            progress = handle_compress ( strm );
+            return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;
+         } 
+         else
+	 if (action == BZ_FLUSH) {
+            s->avail_in_expect = strm->avail_in;
+            s->mode = BZ_M_FLUSHING;
+            goto preswitch;
+         }
+         else
+         if (action == BZ_FINISH) {
+            s->avail_in_expect = strm->avail_in;
+            s->mode = BZ_M_FINISHING;
+            goto preswitch;
+         }
+         else 
+            return BZ_PARAM_ERROR;
+
+      case BZ_M_FLUSHING:
+         if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR;
+         if (s->avail_in_expect != s->strm->avail_in) 
+            return BZ_SEQUENCE_ERROR;
+         progress = handle_compress ( strm );
+         if (s->avail_in_expect > 0 || !isempty_RL(s) ||
+             s->state_out_pos < s->numZ) return BZ_FLUSH_OK;
+         s->mode = BZ_M_RUNNING;
+         return BZ_RUN_OK;
+
+      case BZ_M_FINISHING:
+         if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR;
+         if (s->avail_in_expect != s->strm->avail_in) 
+            return BZ_SEQUENCE_ERROR;
+         progress = handle_compress ( strm );
+         if (!progress) return BZ_SEQUENCE_ERROR;
+         if (s->avail_in_expect > 0 || !isempty_RL(s) ||
+             s->state_out_pos < s->numZ) return BZ_FINISH_OK;
+         s->mode = BZ_M_IDLE;
+         return BZ_STREAM_END;
+   }
+   return BZ_OK; /*--not reached--*/
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzCompressEnd)  ( bz_stream *strm )
+{
+   EState* s;
+   if (strm == NULL) return BZ_PARAM_ERROR;
+   s = strm->state;
+   if (s == NULL) return BZ_PARAM_ERROR;
+   if (s->strm != strm) return BZ_PARAM_ERROR;
+
+   if (s->arr1 != NULL) BZFREE(s->arr1);
+   if (s->arr2 != NULL) BZFREE(s->arr2);
+   if (s->ftab != NULL) BZFREE(s->ftab);
+   BZFREE(strm->state);
+
+   strm->state = NULL;   
+
+   return BZ_OK;
+}
+
+
+/*---------------------------------------------------*/
+/*--- Decompression stuff                         ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzDecompressInit) 
+                     ( bz_stream* strm, 
+                       int        verbosity,
+                       int        small )
+{
+   DState* s;
+
+   if (!bz_config_ok()) return BZ_CONFIG_ERROR;
+
+   if (strm == NULL) return BZ_PARAM_ERROR;
+   if (small != 0 && small != 1) return BZ_PARAM_ERROR;
+   if (verbosity < 0 || verbosity > 4) return BZ_PARAM_ERROR;
+
+   if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
+   if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
+
+   s = BZALLOC( sizeof(DState) );
+   if (s == NULL) return BZ_MEM_ERROR;
+   s->strm                  = strm;
+   strm->state              = s;
+   s->state                 = BZ_X_MAGIC_1;
+   s->bsLive                = 0;
+   s->bsBuff                = 0;
+   s->calculatedCombinedCRC = 0;
+   strm->total_in_lo32      = 0;
+   strm->total_in_hi32      = 0;
+   strm->total_out_lo32     = 0;
+   strm->total_out_hi32     = 0;
+   s->smallDecompress       = (Bool)small;
+   s->ll4                   = NULL;
+   s->ll16                  = NULL;
+   s->tt                    = NULL;
+   s->currBlockNo           = 0;
+   s->verbosity             = verbosity;
+
+   return BZ_OK;
+}
+
+
+/*---------------------------------------------------*/
+/* Return  True iff data corruption is discovered.
+   Returns False if there is no problem.
+*/
+static
+Bool unRLE_obuf_to_output_FAST ( DState* s )
+{
+   UChar k1;
+
+   if (s->blockRandomised) {
+
+      while (True) {
+         /* try to finish existing run */
+         while (True) {
+            if (s->strm->avail_out == 0) return False;
+            if (s->state_out_len == 0) break;
+            *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
+            BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
+            s->state_out_len--;
+            s->strm->next_out++;
+            s->strm->avail_out--;
+            s->strm->total_out_lo32++;
+            if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
+         }
+
+         /* can a new run be started? */
+         if (s->nblock_used == s->save_nblock+1) return False;
+               
+         /* Only caused by corrupt data stream? */
+         if (s->nblock_used > s->save_nblock+1)
+            return True;
+   
+         s->state_out_len = 1;
+         s->state_out_ch = s->k0;
+         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         s->state_out_len = 2;
+         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         s->state_out_len = 3;
+         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         s->state_out_len = ((Int32)k1) + 4;
+         BZ_GET_FAST(s->k0); BZ_RAND_UPD_MASK; 
+         s->k0 ^= BZ_RAND_MASK; s->nblock_used++;
+      }
+
+   } else {
+
+      /* restore */
+      UInt32        c_calculatedBlockCRC = s->calculatedBlockCRC;
+      UChar         c_state_out_ch       = s->state_out_ch;
+      Int32         c_state_out_len      = s->state_out_len;
+      Int32         c_nblock_used        = s->nblock_used;
+      Int32         c_k0                 = s->k0;
+      UInt32*       c_tt                 = s->tt;
+      UInt32        c_tPos               = s->tPos;
+      char*         cs_next_out          = s->strm->next_out;
+      unsigned int  cs_avail_out         = s->strm->avail_out;
+      Int32         ro_blockSize100k     = s->blockSize100k;
+      /* end restore */
+
+      UInt32       avail_out_INIT = cs_avail_out;
+      Int32        s_save_nblockPP = s->save_nblock+1;
+      unsigned int total_out_lo32_old;
+
+      while (True) {
+
+         /* try to finish existing run */
+         if (c_state_out_len > 0) {
+            while (True) {
+               if (cs_avail_out == 0) goto return_notr;
+               if (c_state_out_len == 1) break;
+               *( (UChar*)(cs_next_out) ) = c_state_out_ch;
+               BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );
+               c_state_out_len--;
+               cs_next_out++;
+               cs_avail_out--;
+            }
+            s_state_out_len_eq_one:
+            {
+               if (cs_avail_out == 0) { 
+                  c_state_out_len = 1; goto return_notr;
+               };
+               *( (UChar*)(cs_next_out) ) = c_state_out_ch;
+               BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );
+               cs_next_out++;
+               cs_avail_out--;
+            }
+         }   
+         /* Only caused by corrupt data stream? */
+         if (c_nblock_used > s_save_nblockPP)
+            return True;
+
+         /* can a new run be started? */
+         if (c_nblock_used == s_save_nblockPP) {
+            c_state_out_len = 0; goto return_notr;
+         };   
+         c_state_out_ch = c_k0;
+         BZ_GET_FAST_C(k1); c_nblock_used++;
+         if (k1 != c_k0) { 
+            c_k0 = k1; goto s_state_out_len_eq_one; 
+         };
+         if (c_nblock_used == s_save_nblockPP) 
+            goto s_state_out_len_eq_one;
+   
+         c_state_out_len = 2;
+         BZ_GET_FAST_C(k1); c_nblock_used++;
+         if (c_nblock_used == s_save_nblockPP) continue;
+         if (k1 != c_k0) { c_k0 = k1; continue; };
+   
+         c_state_out_len = 3;
+         BZ_GET_FAST_C(k1); c_nblock_used++;
+         if (c_nblock_used == s_save_nblockPP) continue;
+         if (k1 != c_k0) { c_k0 = k1; continue; };
+   
+         BZ_GET_FAST_C(k1); c_nblock_used++;
+         c_state_out_len = ((Int32)k1) + 4;
+         BZ_GET_FAST_C(c_k0); c_nblock_used++;
+      }
+
+      return_notr:
+      total_out_lo32_old = s->strm->total_out_lo32;
+      s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out);
+      if (s->strm->total_out_lo32 < total_out_lo32_old)
+         s->strm->total_out_hi32++;
+
+      /* save */
+      s->calculatedBlockCRC = c_calculatedBlockCRC;
+      s->state_out_ch       = c_state_out_ch;
+      s->state_out_len      = c_state_out_len;
+      s->nblock_used        = c_nblock_used;
+      s->k0                 = c_k0;
+      s->tt                 = c_tt;
+      s->tPos               = c_tPos;
+      s->strm->next_out     = cs_next_out;
+      s->strm->avail_out    = cs_avail_out;
+      /* end save */
+   }
+   return False;
+}
+
+
+
+/*---------------------------------------------------*/
+__inline__ Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
+{
+   Int32 nb, na, mid;
+   nb = 0;
+   na = 256;
+   do {
+      mid = (nb + na) >> 1;
+      if (indx >= cftab[mid]) nb = mid; else na = mid;
+   }
+   while (na - nb != 1);
+   return nb;
+}
+
+
+/*---------------------------------------------------*/
+/* Return  True iff data corruption is discovered.
+   Returns False if there is no problem.
+*/
+static
+Bool unRLE_obuf_to_output_SMALL ( DState* s )
+{
+   UChar k1;
+
+   if (s->blockRandomised) {
+
+      while (True) {
+         /* try to finish existing run */
+         while (True) {
+            if (s->strm->avail_out == 0) return False;
+            if (s->state_out_len == 0) break;
+            *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
+            BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
+            s->state_out_len--;
+            s->strm->next_out++;
+            s->strm->avail_out--;
+            s->strm->total_out_lo32++;
+            if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
+         }
+   
+         /* can a new run be started? */
+         if (s->nblock_used == s->save_nblock+1) return False;
+
+         /* Only caused by corrupt data stream? */
+         if (s->nblock_used > s->save_nblock+1)
+            return True;
+   
+         s->state_out_len = 1;
+         s->state_out_ch = s->k0;
+         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         s->state_out_len = 2;
+         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         s->state_out_len = 3;
+         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
+         k1 ^= BZ_RAND_MASK; s->nblock_used++;
+         s->state_out_len = ((Int32)k1) + 4;
+         BZ_GET_SMALL(s->k0); BZ_RAND_UPD_MASK; 
+         s->k0 ^= BZ_RAND_MASK; s->nblock_used++;
+      }
+
+   } else {
+
+      while (True) {
+         /* try to finish existing run */
+         while (True) {
+            if (s->strm->avail_out == 0) return False;
+            if (s->state_out_len == 0) break;
+            *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
+            BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
+            s->state_out_len--;
+            s->strm->next_out++;
+            s->strm->avail_out--;
+            s->strm->total_out_lo32++;
+            if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
+         }
+   
+         /* can a new run be started? */
+         if (s->nblock_used == s->save_nblock+1) return False;
+
+         /* Only caused by corrupt data stream? */
+         if (s->nblock_used > s->save_nblock+1)
+            return True;
+   
+         s->state_out_len = 1;
+         s->state_out_ch = s->k0;
+         BZ_GET_SMALL(k1); s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         s->state_out_len = 2;
+         BZ_GET_SMALL(k1); s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         s->state_out_len = 3;
+         BZ_GET_SMALL(k1); s->nblock_used++;
+         if (s->nblock_used == s->save_nblock+1) continue;
+         if (k1 != s->k0) { s->k0 = k1; continue; };
+   
+         BZ_GET_SMALL(k1); s->nblock_used++;
+         s->state_out_len = ((Int32)k1) + 4;
+         BZ_GET_SMALL(s->k0); s->nblock_used++;
+      }
+
+   }
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
+{
+   Bool    corrupt;
+   DState* s;
+   if (strm == NULL) return BZ_PARAM_ERROR;
+   s = strm->state;
+   if (s == NULL) return BZ_PARAM_ERROR;
+   if (s->strm != strm) return BZ_PARAM_ERROR;
+
+   while (True) {
+      if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;
+      if (s->state == BZ_X_OUTPUT) {
+         if (s->smallDecompress)
+            corrupt = unRLE_obuf_to_output_SMALL ( s ); else
+            corrupt = unRLE_obuf_to_output_FAST  ( s );
+         if (corrupt) return BZ_DATA_ERROR;
+         if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) {
+            BZ_FINALISE_CRC ( s->calculatedBlockCRC );
+            if (s->verbosity >= 3) 
+               VPrintf2 ( " {0x%08x, 0x%08x}", s->storedBlockCRC, 
+                          s->calculatedBlockCRC );
+            if (s->verbosity >= 2) VPrintf0 ( "]" );
+            if (s->calculatedBlockCRC != s->storedBlockCRC)
+               return BZ_DATA_ERROR;
+            s->calculatedCombinedCRC 
+               = (s->calculatedCombinedCRC << 1) | 
+                    (s->calculatedCombinedCRC >> 31);
+            s->calculatedCombinedCRC ^= s->calculatedBlockCRC;
+            s->state = BZ_X_BLKHDR_1;
+         } else {
+            return BZ_OK;
+         }
+      }
+      if (s->state >= BZ_X_MAGIC_1) {
+         Int32 r = BZ2_decompress ( s );
+         if (r == BZ_STREAM_END) {
+            if (s->verbosity >= 3)
+               VPrintf2 ( "\n    combined CRCs: stored = 0x%08x, computed = 0x%08x", 
+                          s->storedCombinedCRC, s->calculatedCombinedCRC );
+            if (s->calculatedCombinedCRC != s->storedCombinedCRC)
+               return BZ_DATA_ERROR;
+            return r;
+         }
+         if (s->state != BZ_X_OUTPUT) return r;
+      }
+   }
+
+   AssertH ( 0, 6001 );
+
+   return 0;  /*NOTREACHED*/
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzDecompressEnd)  ( bz_stream *strm )
+{
+   DState* s;
+   if (strm == NULL) return BZ_PARAM_ERROR;
+   s = strm->state;
+   if (s == NULL) return BZ_PARAM_ERROR;
+   if (s->strm != strm) return BZ_PARAM_ERROR;
+
+   if (s->tt   != NULL) BZFREE(s->tt);
+   if (s->ll16 != NULL) BZFREE(s->ll16);
+   if (s->ll4  != NULL) BZFREE(s->ll4);
+
+   BZFREE(strm->state);
+   strm->state = NULL;
+
+   return BZ_OK;
+}
+
+
+#ifndef BZ_NO_STDIO
+/*---------------------------------------------------*/
+/*--- File I/O stuff                              ---*/
+/*---------------------------------------------------*/
+
+#define BZ_SETERR(eee)                    \
+{                                         \
+   if (bzerror != NULL) *bzerror = eee;   \
+   if (bzf != NULL) bzf->lastErr = eee;   \
+}
+
+typedef 
+   struct {
+      FILE*     handle;
+      Char      buf[BZ_MAX_UNUSED];
+      Int32     bufN;
+      Bool      writing;
+      bz_stream strm;
+      Int32     lastErr;
+      Bool      initialisedOk;
+   }
+   bzFile;
+
+
+/*---------------------------------------------*/
+static Bool myfeof ( FILE* f )
+{
+   Int32 c = fgetc ( f );
+   if (c == EOF) return True;
+   ungetc ( c, f );
+   return False;
+}
+
+
+/*---------------------------------------------------*/
+BZFILE* BZ_API(BZ2_bzWriteOpen) 
+                    ( int*  bzerror,      
+                      FILE* f, 
+                      int   blockSize100k, 
+                      int   verbosity,
+                      int   workFactor )
+{
+   Int32   ret;
+   bzFile* bzf = NULL;
+
+   BZ_SETERR(BZ_OK);
+
+   if (f == NULL ||
+       (blockSize100k < 1 || blockSize100k > 9) ||
+       (workFactor < 0 || workFactor > 250) ||
+       (verbosity < 0 || verbosity > 4))
+      { BZ_SETERR(BZ_PARAM_ERROR); return NULL; };
+
+   if (ferror(f))
+      { BZ_SETERR(BZ_IO_ERROR); return NULL; };
+
+   bzf = malloc ( sizeof(bzFile) );
+   if (bzf == NULL)
+      { BZ_SETERR(BZ_MEM_ERROR); return NULL; };
+
+   BZ_SETERR(BZ_OK);
+   bzf->initialisedOk = False;
+   bzf->bufN          = 0;
+   bzf->handle        = f;
+   bzf->writing       = True;
+   bzf->strm.bzalloc  = NULL;
+   bzf->strm.bzfree   = NULL;
+   bzf->strm.opaque   = NULL;
+
+   if (workFactor == 0) workFactor = 30;
+   ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, 
+                              verbosity, workFactor );
+   if (ret != BZ_OK)
+      { BZ_SETERR(ret); free(bzf); return NULL; };
+
+   bzf->strm.avail_in = 0;
+   bzf->initialisedOk = True;
+   return bzf;   
+}
+
+
+
+/*---------------------------------------------------*/
+void BZ_API(BZ2_bzWrite)
+             ( int*    bzerror, 
+               BZFILE* b, 
+               void*   buf, 
+               int     len )
+{
+   Int32 n, n2, ret;
+   bzFile* bzf = (bzFile*)b;
+
+   BZ_SETERR(BZ_OK);
+   if (bzf == NULL || buf == NULL || len < 0)
+      { BZ_SETERR(BZ_PARAM_ERROR); return; };
+   if (!(bzf->writing))
+      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
+   if (ferror(bzf->handle))
+      { BZ_SETERR(BZ_IO_ERROR); return; };
+
+   if (len == 0)
+      { BZ_SETERR(BZ_OK); return; };
+
+   bzf->strm.avail_in = len;
+   bzf->strm.next_in  = buf;
+
+   while (True) {
+      bzf->strm.avail_out = BZ_MAX_UNUSED;
+      bzf->strm.next_out = bzf->buf;
+      ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN );
+      if (ret != BZ_RUN_OK)
+         { BZ_SETERR(ret); return; };
+
+      if (bzf->strm.avail_out < BZ_MAX_UNUSED) {
+         n = BZ_MAX_UNUSED - bzf->strm.avail_out;
+         n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), 
+                       n, bzf->handle );
+         if (n != n2 || ferror(bzf->handle))
+            { BZ_SETERR(BZ_IO_ERROR); return; };
+      }
+
+      if (bzf->strm.avail_in == 0)
+         { BZ_SETERR(BZ_OK); return; };
+   }
+}
+
+
+/*---------------------------------------------------*/
+void BZ_API(BZ2_bzWriteClose)
+                  ( int*          bzerror, 
+                    BZFILE*       b, 
+                    int           abandon,
+                    unsigned int* nbytes_in,
+                    unsigned int* nbytes_out )
+{
+   BZ2_bzWriteClose64 ( bzerror, b, abandon, 
+                        nbytes_in, NULL, nbytes_out, NULL );
+}
+
+
+void BZ_API(BZ2_bzWriteClose64)
+                  ( int*          bzerror, 
+                    BZFILE*       b, 
+                    int           abandon,
+                    unsigned int* nbytes_in_lo32,
+                    unsigned int* nbytes_in_hi32,
+                    unsigned int* nbytes_out_lo32,
+                    unsigned int* nbytes_out_hi32 )
+{
+   Int32   n, n2, ret;
+   bzFile* bzf = (bzFile*)b;
+
+   if (bzf == NULL)
+      { BZ_SETERR(BZ_OK); return; };
+   if (!(bzf->writing))
+      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
+   if (ferror(bzf->handle))
+      { BZ_SETERR(BZ_IO_ERROR); return; };
+
+   if (nbytes_in_lo32 != NULL) *nbytes_in_lo32 = 0;
+   if (nbytes_in_hi32 != NULL) *nbytes_in_hi32 = 0;
+   if (nbytes_out_lo32 != NULL) *nbytes_out_lo32 = 0;
+   if (nbytes_out_hi32 != NULL) *nbytes_out_hi32 = 0;
+
+   if ((!abandon) && bzf->lastErr == BZ_OK) {
+      while (True) {
+         bzf->strm.avail_out = BZ_MAX_UNUSED;
+         bzf->strm.next_out = bzf->buf;
+         ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH );
+         if (ret != BZ_FINISH_OK && ret != BZ_STREAM_END)
+            { BZ_SETERR(ret); return; };
+
+         if (bzf->strm.avail_out < BZ_MAX_UNUSED) {
+            n = BZ_MAX_UNUSED - bzf->strm.avail_out;
+            n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), 
+                          n, bzf->handle );
+            if (n != n2 || ferror(bzf->handle))
+               { BZ_SETERR(BZ_IO_ERROR); return; };
+         }
+
+         if (ret == BZ_STREAM_END) break;
+      }
+   }
+
+   if ( !abandon && !ferror ( bzf->handle ) ) {
+      fflush ( bzf->handle );
+      if (ferror(bzf->handle))
+         { BZ_SETERR(BZ_IO_ERROR); return; };
+   }
+
+   if (nbytes_in_lo32 != NULL)
+      *nbytes_in_lo32 = bzf->strm.total_in_lo32;
+   if (nbytes_in_hi32 != NULL)
+      *nbytes_in_hi32 = bzf->strm.total_in_hi32;
+   if (nbytes_out_lo32 != NULL)
+      *nbytes_out_lo32 = bzf->strm.total_out_lo32;
+   if (nbytes_out_hi32 != NULL)
+      *nbytes_out_hi32 = bzf->strm.total_out_hi32;
+
+   BZ_SETERR(BZ_OK);
+   BZ2_bzCompressEnd ( &(bzf->strm) );
+   free ( bzf );
+}
+
+
+/*---------------------------------------------------*/
+BZFILE* BZ_API(BZ2_bzReadOpen) 
+                   ( int*  bzerror, 
+                     FILE* f, 
+                     int   verbosity,
+                     int   small,
+                     void* unused,
+                     int   nUnused )
+{
+   bzFile* bzf = NULL;
+   int     ret;
+
+   BZ_SETERR(BZ_OK);
+
+   if (f == NULL || 
+       (small != 0 && small != 1) ||
+       (verbosity < 0 || verbosity > 4) ||
+       (unused == NULL && nUnused != 0) ||
+       (unused != NULL && (nUnused < 0 || nUnused > BZ_MAX_UNUSED)))
+      { BZ_SETERR(BZ_PARAM_ERROR); return NULL; };
+
+   if (ferror(f))
+      { BZ_SETERR(BZ_IO_ERROR); return NULL; };
+
+   bzf = malloc ( sizeof(bzFile) );
+   if (bzf == NULL) 
+      { BZ_SETERR(BZ_MEM_ERROR); return NULL; };
+
+   BZ_SETERR(BZ_OK);
+
+   bzf->initialisedOk = False;
+   bzf->handle        = f;
+   bzf->bufN          = 0;
+   bzf->writing       = False;
+   bzf->strm.bzalloc  = NULL;
+   bzf->strm.bzfree   = NULL;
+   bzf->strm.opaque   = NULL;
+   
+   while (nUnused > 0) {
+      bzf->buf[bzf->bufN] = *((UChar*)(unused)); bzf->bufN++;
+      unused = ((void*)( 1 + ((UChar*)(unused))  ));
+      nUnused--;
+   }
+
+   ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small );
+   if (ret != BZ_OK)
+      { BZ_SETERR(ret); free(bzf); return NULL; };
+
+   bzf->strm.avail_in = bzf->bufN;
+   bzf->strm.next_in  = bzf->buf;
+
+   bzf->initialisedOk = True;
+   return bzf;   
+}
+
+
+/*---------------------------------------------------*/
+void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b )
+{
+   bzFile* bzf = (bzFile*)b;
+
+   BZ_SETERR(BZ_OK);
+   if (bzf == NULL)
+      { BZ_SETERR(BZ_OK); return; };
+
+   if (bzf->writing)
+      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
+
+   if (bzf->initialisedOk)
+      (void)BZ2_bzDecompressEnd ( &(bzf->strm) );
+   free ( bzf );
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzRead) 
+           ( int*    bzerror, 
+             BZFILE* b, 
+             void*   buf, 
+             int     len )
+{
+   Int32   n, ret;
+   bzFile* bzf = (bzFile*)b;
+
+   BZ_SETERR(BZ_OK);
+
+   if (bzf == NULL || buf == NULL || len < 0)
+      { BZ_SETERR(BZ_PARAM_ERROR); return 0; };
+
+   if (bzf->writing)
+      { BZ_SETERR(BZ_SEQUENCE_ERROR); return 0; };
+
+   if (len == 0)
+      { BZ_SETERR(BZ_OK); return 0; };
+
+   bzf->strm.avail_out = len;
+   bzf->strm.next_out = buf;
+
+   while (True) {
+
+      if (ferror(bzf->handle)) 
+         { BZ_SETERR(BZ_IO_ERROR); return 0; };
+
+      if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) {
+         n = fread ( bzf->buf, sizeof(UChar), 
+                     BZ_MAX_UNUSED, bzf->handle );
+         if (ferror(bzf->handle))
+            { BZ_SETERR(BZ_IO_ERROR); return 0; };
+         bzf->bufN = n;
+         bzf->strm.avail_in = bzf->bufN;
+         bzf->strm.next_in = bzf->buf;
+      }
+
+      ret = BZ2_bzDecompress ( &(bzf->strm) );
+
+      if (ret != BZ_OK && ret != BZ_STREAM_END)
+         { BZ_SETERR(ret); return 0; };
+
+      if (ret == BZ_OK && myfeof(bzf->handle) && 
+          bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0)
+         { BZ_SETERR(BZ_UNEXPECTED_EOF); return 0; };
+
+      if (ret == BZ_STREAM_END)
+         { BZ_SETERR(BZ_STREAM_END);
+           return len - bzf->strm.avail_out; };
+      if (bzf->strm.avail_out == 0)
+         { BZ_SETERR(BZ_OK); return len; };
+      
+   }
+
+   return 0; /*not reached*/
+}
+
+
+/*---------------------------------------------------*/
+void BZ_API(BZ2_bzReadGetUnused) 
+                     ( int*    bzerror, 
+                       BZFILE* b, 
+                       void**  unused, 
+                       int*    nUnused )
+{
+   bzFile* bzf = (bzFile*)b;
+   if (bzf == NULL)
+      { BZ_SETERR(BZ_PARAM_ERROR); return; };
+   if (bzf->lastErr != BZ_STREAM_END)
+      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
+   if (unused == NULL || nUnused == NULL)
+      { BZ_SETERR(BZ_PARAM_ERROR); return; };
+
+   BZ_SETERR(BZ_OK);
+   *nUnused = bzf->strm.avail_in;
+   *unused = bzf->strm.next_in;
+}
+#endif
+
+
+/*---------------------------------------------------*/
+/*--- Misc convenience stuff                      ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzBuffToBuffCompress) 
+                         ( char*         dest, 
+                           unsigned int* destLen,
+                           char*         source, 
+                           unsigned int  sourceLen,
+                           int           blockSize100k, 
+                           int           verbosity, 
+                           int           workFactor )
+{
+   bz_stream strm;
+   int ret;
+
+   if (dest == NULL || destLen == NULL || 
+       source == NULL ||
+       blockSize100k < 1 || blockSize100k > 9 ||
+       verbosity < 0 || verbosity > 4 ||
+       workFactor < 0 || workFactor > 250) 
+      return BZ_PARAM_ERROR;
+
+   if (workFactor == 0) workFactor = 30;
+   strm.bzalloc = NULL;
+   strm.bzfree = NULL;
+   strm.opaque = NULL;
+   ret = BZ2_bzCompressInit ( &strm, blockSize100k, 
+                              verbosity, workFactor );
+   if (ret != BZ_OK) return ret;
+
+   strm.next_in = source;
+   strm.next_out = dest;
+   strm.avail_in = sourceLen;
+   strm.avail_out = *destLen;
+
+   ret = BZ2_bzCompress ( &strm, BZ_FINISH );
+   if (ret == BZ_FINISH_OK) goto output_overflow;
+   if (ret != BZ_STREAM_END) goto errhandler;
+
+   /* normal termination */
+   *destLen -= strm.avail_out;   
+   BZ2_bzCompressEnd ( &strm );
+   return BZ_OK;
+
+   output_overflow:
+   BZ2_bzCompressEnd ( &strm );
+   return BZ_OUTBUFF_FULL;
+
+   errhandler:
+   BZ2_bzCompressEnd ( &strm );
+   return ret;
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzBuffToBuffDecompress) 
+                           ( char*         dest, 
+                             unsigned int* destLen,
+                             char*         source, 
+                             unsigned int  sourceLen,
+                             int           small,
+                             int           verbosity )
+{
+   bz_stream strm;
+   int ret;
+
+   if (dest == NULL || destLen == NULL || 
+       source == NULL ||
+       (small != 0 && small != 1) ||
+       verbosity < 0 || verbosity > 4) 
+          return BZ_PARAM_ERROR;
+
+   strm.bzalloc = NULL;
+   strm.bzfree = NULL;
+   strm.opaque = NULL;
+   ret = BZ2_bzDecompressInit ( &strm, verbosity, small );
+   if (ret != BZ_OK) return ret;
+
+   strm.next_in = source;
+   strm.next_out = dest;
+   strm.avail_in = sourceLen;
+   strm.avail_out = *destLen;
+
+   ret = BZ2_bzDecompress ( &strm );
+   if (ret == BZ_OK) goto output_overflow_or_eof;
+   if (ret != BZ_STREAM_END) goto errhandler;
+
+   /* normal termination */
+   *destLen -= strm.avail_out;
+   BZ2_bzDecompressEnd ( &strm );
+   return BZ_OK;
+
+   output_overflow_or_eof:
+   if (strm.avail_out > 0) {
+      BZ2_bzDecompressEnd ( &strm );
+      return BZ_UNEXPECTED_EOF;
+   } else {
+      BZ2_bzDecompressEnd ( &strm );
+      return BZ_OUTBUFF_FULL;
+   };      
+
+   errhandler:
+   BZ2_bzDecompressEnd ( &strm );
+   return ret; 
+}
+
+
+/*---------------------------------------------------*/
+/*--
+   Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
+   to support better zlib compatibility.
+   This code is not _officially_ part of libbzip2 (yet);
+   I haven't tested it, documented it, or considered the
+   threading-safeness of it.
+   If this code breaks, please contact both Yoshioka and me.
+--*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+/*--
+   return version like "0.9.5d, 4-Sept-1999".
+--*/
+const char * BZ_API(BZ2_bzlibVersion)(void)
+{
+   return BZ_VERSION;
+}
+
+
+#ifndef BZ_NO_STDIO
+/*---------------------------------------------------*/
+
+#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
+#   include 
+#   include 
+#   define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)
+#else
+#   define SET_BINARY_MODE(file)
+#endif
+static
+BZFILE * bzopen_or_bzdopen
+               ( const char *path,   /* no use when bzdopen */
+                 int fd,             /* no use when bzdopen */
+                 const char *mode,
+                 int open_mode)      /* bzopen: 0, bzdopen:1 */
+{
+   int    bzerr;
+   char   unused[BZ_MAX_UNUSED];
+   int    blockSize100k = 9;
+   int    writing       = 0;
+   char   mode2[10]     = "";
+   FILE   *fp           = NULL;
+   BZFILE *bzfp         = NULL;
+   int    verbosity     = 0;
+   int    workFactor    = 30;
+   int    smallMode     = 0;
+   int    nUnused       = 0; 
+
+   if (mode == NULL) return NULL;
+   while (*mode) {
+      switch (*mode) {
+      case 'r':
+         writing = 0; break;
+      case 'w':
+         writing = 1; break;
+      case 's':
+         smallMode = 1; break;
+      default:
+         if (isdigit((int)(*mode))) {
+            blockSize100k = *mode-BZ_HDR_0;
+         }
+      }
+      mode++;
+   }
+   strcat(mode2, writing ? "w" : "r" );
+   strcat(mode2,"b");   /* binary mode */
+
+   if (open_mode==0) {
+      if (path==NULL || strcmp(path,"")==0) {
+        fp = (writing ? stdout : stdin);
+        SET_BINARY_MODE(fp);
+      } else {
+        fp = fopen(path,mode2);
+      }
+   } else {
+#ifdef BZ_STRICT_ANSI
+      fp = NULL;
+#else
+      fp = fdopen(fd,mode2);
+#endif
+   }
+   if (fp == NULL) return NULL;
+
+   if (writing) {
+      /* Guard against total chaos and anarchy -- JRS */
+      if (blockSize100k < 1) blockSize100k = 1;
+      if (blockSize100k > 9) blockSize100k = 9; 
+      bzfp = BZ2_bzWriteOpen(&bzerr,fp,blockSize100k,
+                             verbosity,workFactor);
+   } else {
+      bzfp = BZ2_bzReadOpen(&bzerr,fp,verbosity,smallMode,
+                            unused,nUnused);
+   }
+   if (bzfp == NULL) {
+      if (fp != stdin && fp != stdout) fclose(fp);
+      return NULL;
+   }
+   return bzfp;
+}
+
+
+/*---------------------------------------------------*/
+/*--
+   open file for read or write.
+      ex) bzopen("file","w9")
+      case path="" or NULL => use stdin or stdout.
+--*/
+BZFILE * BZ_API(BZ2_bzopen)
+               ( const char *path,
+                 const char *mode )
+{
+   return bzopen_or_bzdopen(path,-1,mode,/*bzopen*/0);
+}
+
+
+/*---------------------------------------------------*/
+BZFILE * BZ_API(BZ2_bzdopen)
+               ( int fd,
+                 const char *mode )
+{
+   return bzopen_or_bzdopen(NULL,fd,mode,/*bzdopen*/1);
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzread) (BZFILE* b, void* buf, int len )
+{
+   int bzerr, nread;
+   if (((bzFile*)b)->lastErr == BZ_STREAM_END) return 0;
+   nread = BZ2_bzRead(&bzerr,b,buf,len);
+   if (bzerr == BZ_OK || bzerr == BZ_STREAM_END) {
+      return nread;
+   } else {
+      return -1;
+   }
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzwrite) (BZFILE* b, void* buf, int len )
+{
+   int bzerr;
+
+   BZ2_bzWrite(&bzerr,b,buf,len);
+   if(bzerr == BZ_OK){
+      return len;
+   }else{
+      return -1;
+   }
+}
+
+
+/*---------------------------------------------------*/
+int BZ_API(BZ2_bzflush) (BZFILE *b)
+{
+   /* do nothing now... */
+   return 0;
+}
+
+
+/*---------------------------------------------------*/
+void BZ_API(BZ2_bzclose) (BZFILE* b)
+{
+   int bzerr;
+   FILE *fp;
+   
+   if (b==NULL) {return;}
+   fp = ((bzFile *)b)->handle;
+   if(((bzFile*)b)->writing){
+      BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL);
+      if(bzerr != BZ_OK){
+         BZ2_bzWriteClose(NULL,b,1,NULL,NULL);
+      }
+   }else{
+      BZ2_bzReadClose(&bzerr,b);
+   }
+   if(fp!=stdin && fp!=stdout){
+      fclose(fp);
+   }
+}
+
+
+/*---------------------------------------------------*/
+/*--
+   return last error code 
+--*/
+static const char *bzerrorstrings[] = {
+       "OK"
+      ,"SEQUENCE_ERROR"
+      ,"PARAM_ERROR"
+      ,"MEM_ERROR"
+      ,"DATA_ERROR"
+      ,"DATA_ERROR_MAGIC"
+      ,"IO_ERROR"
+      ,"UNEXPECTED_EOF"
+      ,"OUTBUFF_FULL"
+      ,"CONFIG_ERROR"
+      ,"???"   /* for future */
+      ,"???"   /* for future */
+      ,"???"   /* for future */
+      ,"???"   /* for future */
+      ,"???"   /* for future */
+      ,"???"   /* for future */
+};
+
+
+const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum)
+{
+   int err = ((bzFile *)b)->lastErr;
+
+   if(err>0) err = 0;
+   *errnum = err;
+   return bzerrorstrings[err*-1];
+}
+#endif
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                           bzlib.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.h b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.h
new file mode 100644
index 000000000..8966a6c58
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib.h
@@ -0,0 +1,282 @@
+
+/*-------------------------------------------------------------*/
+/*--- Public header file for the library.                   ---*/
+/*---                                               bzlib.h ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+#ifndef _BZLIB_H
+#define _BZLIB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BZ_RUN               0
+#define BZ_FLUSH             1
+#define BZ_FINISH            2
+
+#define BZ_OK                0
+#define BZ_RUN_OK            1
+#define BZ_FLUSH_OK          2
+#define BZ_FINISH_OK         3
+#define BZ_STREAM_END        4
+#define BZ_SEQUENCE_ERROR    (-1)
+#define BZ_PARAM_ERROR       (-2)
+#define BZ_MEM_ERROR         (-3)
+#define BZ_DATA_ERROR        (-4)
+#define BZ_DATA_ERROR_MAGIC  (-5)
+#define BZ_IO_ERROR          (-6)
+#define BZ_UNEXPECTED_EOF    (-7)
+#define BZ_OUTBUFF_FULL      (-8)
+#define BZ_CONFIG_ERROR      (-9)
+
+typedef 
+   struct {
+      char *next_in;
+      unsigned int avail_in;
+      unsigned int total_in_lo32;
+      unsigned int total_in_hi32;
+
+      char *next_out;
+      unsigned int avail_out;
+      unsigned int total_out_lo32;
+      unsigned int total_out_hi32;
+
+      void *state;
+
+      void *(*bzalloc)(void *,int,int);
+      void (*bzfree)(void *,void *);
+      void *opaque;
+   } 
+   bz_stream;
+
+
+#ifndef BZ_IMPORT
+#define BZ_EXPORT
+#endif
+
+#ifndef BZ_NO_STDIO
+/* Need a definitition for FILE */
+#include 
+#endif
+
+#ifdef _WIN32
+#   include 
+#   ifdef small
+      /* windows.h define small to char */
+#      undef small
+#   endif
+#   ifdef BZ_EXPORT
+#   define BZ_API(func) WINAPI func
+#   define BZ_EXTERN extern
+#   else
+   /* import windows dll dynamically */
+#   define BZ_API(func) (WINAPI * func)
+#   define BZ_EXTERN
+#   endif
+#else
+#   define BZ_API(func) func
+#   define BZ_EXTERN extern
+#endif
+
+
+/*-- Core (low-level) library functions --*/
+
+BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( 
+      bz_stream* strm, 
+      int        blockSize100k, 
+      int        verbosity, 
+      int        workFactor 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzCompress) ( 
+      bz_stream* strm, 
+      int action 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( 
+      bz_stream* strm 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( 
+      bz_stream *strm, 
+      int       verbosity, 
+      int       small
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( 
+      bz_stream* strm 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( 
+      bz_stream *strm 
+   );
+
+
+
+/*-- High(er) level library functions --*/
+
+#ifndef BZ_NO_STDIO
+#define BZ_MAX_UNUSED 5000
+
+typedef void BZFILE;
+
+BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( 
+      int*  bzerror,   
+      FILE* f, 
+      int   verbosity, 
+      int   small,
+      void* unused,    
+      int   nUnused 
+   );
+
+BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( 
+      int*    bzerror, 
+      BZFILE* b 
+   );
+
+BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( 
+      int*    bzerror, 
+      BZFILE* b, 
+      void**  unused,  
+      int*    nUnused 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzRead) ( 
+      int*    bzerror, 
+      BZFILE* b, 
+      void*   buf, 
+      int     len 
+   );
+
+BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( 
+      int*  bzerror,      
+      FILE* f, 
+      int   blockSize100k, 
+      int   verbosity, 
+      int   workFactor 
+   );
+
+BZ_EXTERN void BZ_API(BZ2_bzWrite) ( 
+      int*    bzerror, 
+      BZFILE* b, 
+      void*   buf, 
+      int     len 
+   );
+
+BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( 
+      int*          bzerror, 
+      BZFILE*       b, 
+      int           abandon, 
+      unsigned int* nbytes_in, 
+      unsigned int* nbytes_out 
+   );
+
+BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( 
+      int*          bzerror, 
+      BZFILE*       b, 
+      int           abandon, 
+      unsigned int* nbytes_in_lo32, 
+      unsigned int* nbytes_in_hi32, 
+      unsigned int* nbytes_out_lo32, 
+      unsigned int* nbytes_out_hi32
+   );
+#endif
+
+
+/*-- Utility functions --*/
+
+BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( 
+      char*         dest, 
+      unsigned int* destLen,
+      char*         source, 
+      unsigned int  sourceLen,
+      int           blockSize100k, 
+      int           verbosity, 
+      int           workFactor 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( 
+      char*         dest, 
+      unsigned int* destLen,
+      char*         source, 
+      unsigned int  sourceLen,
+      int           small, 
+      int           verbosity 
+   );
+
+
+/*--
+   Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
+   to support better zlib compatibility.
+   This code is not _officially_ part of libbzip2 (yet);
+   I haven't tested it, documented it, or considered the
+   threading-safeness of it.
+   If this code breaks, please contact both Yoshioka and me.
+--*/
+
+BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
+      void
+   );
+
+#ifndef BZ_NO_STDIO
+BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
+      const char *path,
+      const char *mode
+   );
+
+BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
+      int        fd,
+      const char *mode
+   );
+         
+BZ_EXTERN int BZ_API(BZ2_bzread) (
+      BZFILE* b, 
+      void* buf, 
+      int len 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzwrite) (
+      BZFILE* b, 
+      void*   buf, 
+      int     len 
+   );
+
+BZ_EXTERN int BZ_API(BZ2_bzflush) (
+      BZFILE* b
+   );
+
+BZ_EXTERN void BZ_API(BZ2_bzclose) (
+      BZFILE* b
+   );
+
+BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
+      BZFILE *b, 
+      int    *errnum
+   );
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/*-------------------------------------------------------------*/
+/*--- end                                           bzlib.h ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib_private.h b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib_private.h
new file mode 100644
index 000000000..3755a6f70
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzlib_private.h
@@ -0,0 +1,509 @@
+
+/*-------------------------------------------------------------*/
+/*--- Private header file for the library.                  ---*/
+/*---                                       bzlib_private.h ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+#ifndef _BZLIB_PRIVATE_H
+#define _BZLIB_PRIVATE_H
+
+#include 
+
+#ifndef BZ_NO_STDIO
+#include 
+#include 
+#include 
+#endif
+
+#include "bzlib.h"
+
+
+
+/*-- General stuff. --*/
+
+#define BZ_VERSION  "1.0.8, 13-Jul-2019"
+
+typedef char            Char;
+typedef unsigned char   Bool;
+typedef unsigned char   UChar;
+typedef int             Int32;
+typedef unsigned int    UInt32;
+typedef short           Int16;
+typedef unsigned short  UInt16;
+
+#define True  ((Bool)1)
+#define False ((Bool)0)
+
+#ifndef __GNUC__
+#define __inline__  /* */
+#endif 
+
+#ifndef BZ_NO_STDIO
+
+extern void BZ2_bz__AssertH__fail ( int errcode );
+#define AssertH(cond,errcode) \
+   { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); }
+
+#if BZ_DEBUG
+#define AssertD(cond,msg) \
+   { if (!(cond)) {       \
+      fprintf ( stderr,   \
+        "\n\nlibbzip2(debug build): internal error\n\t%s\n", msg );\
+      exit(1); \
+   }}
+#else
+#define AssertD(cond,msg) /* */
+#endif
+
+#define VPrintf0(zf) \
+   fprintf(stderr,zf)
+#define VPrintf1(zf,za1) \
+   fprintf(stderr,zf,za1)
+#define VPrintf2(zf,za1,za2) \
+   fprintf(stderr,zf,za1,za2)
+#define VPrintf3(zf,za1,za2,za3) \
+   fprintf(stderr,zf,za1,za2,za3)
+#define VPrintf4(zf,za1,za2,za3,za4) \
+   fprintf(stderr,zf,za1,za2,za3,za4)
+#define VPrintf5(zf,za1,za2,za3,za4,za5) \
+   fprintf(stderr,zf,za1,za2,za3,za4,za5)
+
+#else
+
+extern void bz_internal_error ( int errcode );
+#define AssertH(cond,errcode) \
+   { if (!(cond)) bz_internal_error ( errcode ); }
+#define AssertD(cond,msg)                do { } while (0)
+#define VPrintf0(zf)                     do { } while (0)
+#define VPrintf1(zf,za1)                 do { } while (0)
+#define VPrintf2(zf,za1,za2)             do { } while (0)
+#define VPrintf3(zf,za1,za2,za3)         do { } while (0)
+#define VPrintf4(zf,za1,za2,za3,za4)     do { } while (0)
+#define VPrintf5(zf,za1,za2,za3,za4,za5) do { } while (0)
+
+#endif
+
+
+#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1)
+#define BZFREE(ppp)  (strm->bzfree)(strm->opaque,(ppp))
+
+
+/*-- Header bytes. --*/
+
+#define BZ_HDR_B 0x42   /* 'B' */
+#define BZ_HDR_Z 0x5a   /* 'Z' */
+#define BZ_HDR_h 0x68   /* 'h' */
+#define BZ_HDR_0 0x30   /* '0' */
+  
+/*-- Constants for the back end. --*/
+
+#define BZ_MAX_ALPHA_SIZE 258
+#define BZ_MAX_CODE_LEN    23
+
+#define BZ_RUNA 0
+#define BZ_RUNB 1
+
+#define BZ_N_GROUPS 6
+#define BZ_G_SIZE   50
+#define BZ_N_ITERS  4
+
+#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))
+
+
+
+/*-- Stuff for randomising repetitive blocks. --*/
+
+extern Int32 BZ2_rNums[512];
+
+#define BZ_RAND_DECLS                          \
+   Int32 rNToGo;                               \
+   Int32 rTPos                                 \
+
+#define BZ_RAND_INIT_MASK                      \
+   s->rNToGo = 0;                              \
+   s->rTPos  = 0                               \
+
+#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0)
+
+#define BZ_RAND_UPD_MASK                       \
+   if (s->rNToGo == 0) {                       \
+      s->rNToGo = BZ2_rNums[s->rTPos];         \
+      s->rTPos++;                              \
+      if (s->rTPos == 512) s->rTPos = 0;       \
+   }                                           \
+   s->rNToGo--;
+
+
+
+/*-- Stuff for doing CRCs. --*/
+
+extern UInt32 BZ2_crc32Table[256];
+
+#define BZ_INITIALISE_CRC(crcVar)              \
+{                                              \
+   crcVar = 0xffffffffL;                       \
+}
+
+#define BZ_FINALISE_CRC(crcVar)                \
+{                                              \
+   crcVar = ~(crcVar);                         \
+}
+
+#define BZ_UPDATE_CRC(crcVar,cha)              \
+{                                              \
+   crcVar = (crcVar << 8) ^                    \
+            BZ2_crc32Table[(crcVar >> 24) ^    \
+                           ((UChar)cha)];      \
+}
+
+
+
+/*-- States and modes for compression. --*/
+
+#define BZ_M_IDLE      1
+#define BZ_M_RUNNING   2
+#define BZ_M_FLUSHING  3
+#define BZ_M_FINISHING 4
+
+#define BZ_S_OUTPUT    1
+#define BZ_S_INPUT     2
+
+#define BZ_N_RADIX 2
+#define BZ_N_QSORT 12
+#define BZ_N_SHELL 18
+#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
+
+
+
+
+/*-- Structure holding all the compression-side stuff. --*/
+
+typedef
+   struct {
+      /* pointer back to the struct bz_stream */
+      bz_stream* strm;
+
+      /* mode this stream is in, and whether inputting */
+      /* or outputting data */
+      Int32    mode;
+      Int32    state;
+
+      /* remembers avail_in when flush/finish requested */
+      UInt32   avail_in_expect;
+
+      /* for doing the block sorting */
+      UInt32*  arr1;
+      UInt32*  arr2;
+      UInt32*  ftab;
+      Int32    origPtr;
+
+      /* aliases for arr1 and arr2 */
+      UInt32*  ptr;
+      UChar*   block;
+      UInt16*  mtfv;
+      UChar*   zbits;
+
+      /* for deciding when to use the fallback sorting algorithm */
+      Int32    workFactor;
+
+      /* run-length-encoding of the input */
+      UInt32   state_in_ch;
+      Int32    state_in_len;
+      BZ_RAND_DECLS;
+
+      /* input and output limits and current posns */
+      Int32    nblock;
+      Int32    nblockMAX;
+      Int32    numZ;
+      Int32    state_out_pos;
+
+      /* map of bytes used in block */
+      Int32    nInUse;
+      Bool     inUse[256];
+      UChar    unseqToSeq[256];
+
+      /* the buffer for bit stream creation */
+      UInt32   bsBuff;
+      Int32    bsLive;
+
+      /* block and combined CRCs */
+      UInt32   blockCRC;
+      UInt32   combinedCRC;
+
+      /* misc administratium */
+      Int32    verbosity;
+      Int32    blockNo;
+      Int32    blockSize100k;
+
+      /* stuff for coding the MTF values */
+      Int32    nMTF;
+      Int32    mtfFreq    [BZ_MAX_ALPHA_SIZE];
+      UChar    selector   [BZ_MAX_SELECTORS];
+      UChar    selectorMtf[BZ_MAX_SELECTORS];
+
+      UChar    len     [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+      Int32    code    [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+      Int32    rfreq   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+      /* second dimension: only 3 needed; 4 makes index calculations faster */
+      UInt32   len_pack[BZ_MAX_ALPHA_SIZE][4];
+
+   }
+   EState;
+
+
+
+/*-- externs for compression. --*/
+
+extern void 
+BZ2_blockSort ( EState* );
+
+extern void 
+BZ2_compressBlock ( EState*, Bool );
+
+extern void 
+BZ2_bsInitWrite ( EState* );
+
+extern void 
+BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 );
+
+extern void 
+BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
+
+
+
+/*-- states for decompression. --*/
+
+#define BZ_X_IDLE        1
+#define BZ_X_OUTPUT      2
+
+#define BZ_X_MAGIC_1     10
+#define BZ_X_MAGIC_2     11
+#define BZ_X_MAGIC_3     12
+#define BZ_X_MAGIC_4     13
+#define BZ_X_BLKHDR_1    14
+#define BZ_X_BLKHDR_2    15
+#define BZ_X_BLKHDR_3    16
+#define BZ_X_BLKHDR_4    17
+#define BZ_X_BLKHDR_5    18
+#define BZ_X_BLKHDR_6    19
+#define BZ_X_BCRC_1      20
+#define BZ_X_BCRC_2      21
+#define BZ_X_BCRC_3      22
+#define BZ_X_BCRC_4      23
+#define BZ_X_RANDBIT     24
+#define BZ_X_ORIGPTR_1   25
+#define BZ_X_ORIGPTR_2   26
+#define BZ_X_ORIGPTR_3   27
+#define BZ_X_MAPPING_1   28
+#define BZ_X_MAPPING_2   29
+#define BZ_X_SELECTOR_1  30
+#define BZ_X_SELECTOR_2  31
+#define BZ_X_SELECTOR_3  32
+#define BZ_X_CODING_1    33
+#define BZ_X_CODING_2    34
+#define BZ_X_CODING_3    35
+#define BZ_X_MTF_1       36
+#define BZ_X_MTF_2       37
+#define BZ_X_MTF_3       38
+#define BZ_X_MTF_4       39
+#define BZ_X_MTF_5       40
+#define BZ_X_MTF_6       41
+#define BZ_X_ENDHDR_2    42
+#define BZ_X_ENDHDR_3    43
+#define BZ_X_ENDHDR_4    44
+#define BZ_X_ENDHDR_5    45
+#define BZ_X_ENDHDR_6    46
+#define BZ_X_CCRC_1      47
+#define BZ_X_CCRC_2      48
+#define BZ_X_CCRC_3      49
+#define BZ_X_CCRC_4      50
+
+
+
+/*-- Constants for the fast MTF decoder. --*/
+
+#define MTFA_SIZE 4096
+#define MTFL_SIZE 16
+
+
+
+/*-- Structure holding all the decompression-side stuff. --*/
+
+typedef
+   struct {
+      /* pointer back to the struct bz_stream */
+      bz_stream* strm;
+
+      /* state indicator for this stream */
+      Int32    state;
+
+      /* for doing the final run-length decoding */
+      UChar    state_out_ch;
+      Int32    state_out_len;
+      Bool     blockRandomised;
+      BZ_RAND_DECLS;
+
+      /* the buffer for bit stream reading */
+      UInt32   bsBuff;
+      Int32    bsLive;
+
+      /* misc administratium */
+      Int32    blockSize100k;
+      Bool     smallDecompress;
+      Int32    currBlockNo;
+      Int32    verbosity;
+
+      /* for undoing the Burrows-Wheeler transform */
+      Int32    origPtr;
+      UInt32   tPos;
+      Int32    k0;
+      Int32    unzftab[256];
+      Int32    nblock_used;
+      Int32    cftab[257];
+      Int32    cftabCopy[257];
+
+      /* for undoing the Burrows-Wheeler transform (FAST) */
+      UInt32   *tt;
+
+      /* for undoing the Burrows-Wheeler transform (SMALL) */
+      UInt16   *ll16;
+      UChar    *ll4;
+
+      /* stored and calculated CRCs */
+      UInt32   storedBlockCRC;
+      UInt32   storedCombinedCRC;
+      UInt32   calculatedBlockCRC;
+      UInt32   calculatedCombinedCRC;
+
+      /* map of bytes used in block */
+      Int32    nInUse;
+      Bool     inUse[256];
+      Bool     inUse16[16];
+      UChar    seqToUnseq[256];
+
+      /* for decoding the MTF values */
+      UChar    mtfa   [MTFA_SIZE];
+      Int32    mtfbase[256 / MTFL_SIZE];
+      UChar    selector   [BZ_MAX_SELECTORS];
+      UChar    selectorMtf[BZ_MAX_SELECTORS];
+      UChar    len  [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+
+      Int32    limit  [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+      Int32    base   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+      Int32    perm   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+      Int32    minLens[BZ_N_GROUPS];
+
+      /* save area for scalars in the main decompress code */
+      Int32    save_i;
+      Int32    save_j;
+      Int32    save_t;
+      Int32    save_alphaSize;
+      Int32    save_nGroups;
+      Int32    save_nSelectors;
+      Int32    save_EOB;
+      Int32    save_groupNo;
+      Int32    save_groupPos;
+      Int32    save_nextSym;
+      Int32    save_nblockMAX;
+      Int32    save_nblock;
+      Int32    save_es;
+      Int32    save_N;
+      Int32    save_curr;
+      Int32    save_zt;
+      Int32    save_zn; 
+      Int32    save_zvec;
+      Int32    save_zj;
+      Int32    save_gSel;
+      Int32    save_gMinlen;
+      Int32*   save_gLimit;
+      Int32*   save_gBase;
+      Int32*   save_gPerm;
+
+   }
+   DState;
+
+
+
+/*-- Macros for decompression. --*/
+
+#define BZ_GET_FAST(cccc)                     \
+    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
+    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
+    s->tPos = s->tt[s->tPos];                 \
+    cccc = (UChar)(s->tPos & 0xff);           \
+    s->tPos >>= 8;
+
+#define BZ_GET_FAST_C(cccc)                   \
+    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
+    if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) return True; \
+    c_tPos = c_tt[c_tPos];                    \
+    cccc = (UChar)(c_tPos & 0xff);            \
+    c_tPos >>= 8;
+
+#define SET_LL4(i,n)                                          \
+   { if (((i) & 0x1) == 0)                                    \
+        s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else    \
+        s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4);  \
+   }
+
+#define GET_LL4(i)                             \
+   ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)
+
+#define SET_LL(i,n)                          \
+   { s->ll16[i] = (UInt16)(n & 0x0000ffff);  \
+     SET_LL4(i, n >> 16);                    \
+   }
+
+#define GET_LL(i) \
+   (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
+
+#define BZ_GET_SMALL(cccc)                            \
+    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
+    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
+    cccc = BZ2_indexIntoF ( s->tPos, s->cftab );    \
+    s->tPos = GET_LL(s->tPos);
+
+
+/*-- externs for decompression. --*/
+
+extern Int32 
+BZ2_indexIntoF ( Int32, Int32* );
+
+extern Int32 
+BZ2_decompress ( DState* );
+
+extern void 
+BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
+                           Int32,  Int32, Int32 );
+
+
+#endif
+
+
+/*-- BZ_NO_STDIO seems to make NULL disappear on some platforms. --*/
+
+#ifdef BZ_NO_STDIO
+#ifndef NULL
+#define NULL 0
+#endif
+#endif
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                   bzlib_private.h ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore
new file mode 100644
index 000000000..d31404340
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# Bzmore wrapped for bzip2, 
+# adapted from zmore by Philippe Troin  for Debian GNU/Linux.
+
+PATH="/usr/bin:$PATH"; export PATH
+
+prog=`echo $0 | sed 's|.*/||'`
+case "$prog" in
+	*less)	more=less	;;
+	*)	more=more       ;;
+esac
+
+if test "`echo -n a`" = "-n a"; then
+  # looks like a SysV system:
+  n1=''; n2='\c'
+else
+  n1='-n'; n2=''
+fi
+oldtty=`stty -g 2>/dev/null`
+if stty -cbreak 2>/dev/null; then
+  cb='cbreak'; ncb='-cbreak'
+else
+  # 'stty min 1' resets eof to ^a on both SunOS and SysV!
+  cb='min 1 -icanon'; ncb='icanon eof ^d'
+fi
+if test $? -eq 0 -a -n "$oldtty"; then
+   trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
+else
+   trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
+fi
+
+if test $# = 0; then
+    if test -t 0; then
+	echo usage: $prog files...
+    else
+	bzip2 -cdfq | eval $more
+    fi
+else
+    FIRST=1
+    for FILE
+    do
+	if test $FIRST -eq 0; then
+		echo $n1 "--More--(Next file: $FILE)$n2"
+		stty $cb -echo 2>/dev/null
+		ANS=`dd bs=1 count=1 2>/dev/null` 
+		stty $ncb echo 2>/dev/null
+		echo " "
+		if test "$ANS" = 'e' -o "$ANS" = 'q'; then
+			exit
+		fi
+	fi
+	if test "$ANS" != 's'; then
+		echo "------> $FILE <------"
+		bzip2 -cdfq "$FILE" | eval $more
+	fi
+	if test -t; then
+		FIRST=0
+	fi
+    done
+fi
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore.1 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore.1
new file mode 100644
index 000000000..b437d3b03
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/bzmore.1
@@ -0,0 +1,152 @@
+.\"Shamelessly copied from zmore.1 by Philippe Troin 
+.\"for Debian GNU/Linux
+.TH BZMORE 1
+.SH NAME
+bzmore, bzless \- file perusal filter for crt viewing of bzip2 compressed text
+.SH SYNOPSIS
+.B bzmore
+[ name ...  ]
+.br
+.B bzless
+[ name ...  ]
+.SH NOTE
+In the following description,
+.I bzless
+and
+.I less
+can be used interchangeably with
+.I bzmore
+and
+.I more.
+.SH DESCRIPTION
+.I  Bzmore
+is a filter which allows examination of compressed or plain text files
+one screenful at a time on a soft-copy terminal.
+.I bzmore
+works on files compressed with
+.I bzip2
+and also on uncompressed files.
+If a file does not exist,
+.I bzmore
+looks for a file of the same name with the addition of a .bz2 suffix.
+.PP
+.I Bzmore
+normally pauses after each screenful, printing --More--
+at the bottom of the screen.
+If the user then types a carriage return, one more line is displayed.
+If the user hits a space,
+another screenful is displayed.  Other possibilities are enumerated later.
+.PP
+.I Bzmore
+looks in the file
+.I /etc/termcap
+to determine terminal characteristics,
+and to determine the default window size.
+On a terminal capable of displaying 24 lines,
+the default window size is 22 lines.
+Other sequences which may be typed when
+.I bzmore
+pauses, and their effects, are as follows (\fIi\fP is an optional integer
+argument, defaulting to 1) :
+.PP
+.IP \fIi\|\fP
+display
+.I i
+more lines, (or another screenful if no argument is given)
+.PP
+.IP ^D
+display 11 more lines (a ``scroll'').
+If
+.I i
+is given, then the scroll size is set to \fIi\|\fP.
+.PP
+.IP d
+same as ^D (control-D)
+.PP
+.IP \fIi\|\fPz
+same as typing a space except that \fIi\|\fP, if present, becomes the new
+window size.  Note that the window size reverts back to the default at the
+end of the current file.
+.PP
+.IP \fIi\|\fPs
+skip \fIi\|\fP lines and print a screenful of lines
+.PP
+.IP \fIi\|\fPf
+skip \fIi\fP screenfuls and print a screenful of lines
+.PP
+.IP "q or Q"
+quit reading the current file; go on to the next (if any)
+.PP
+.IP "e or q"
+When the prompt --More--(Next file: 
+.IR file )
+is printed, this command causes bzmore to exit.
+.PP
+.IP s
+When the prompt --More--(Next file: 
+.IR file )
+is printed, this command causes bzmore to skip the next file and continue.
+.PP 
+.IP =
+Display the current line number.
+.PP
+.IP \fIi\|\fP/expr
+search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
+If the pattern is not found,
+.I bzmore
+goes on to the next file (if any).
+Otherwise, a screenful is displayed, starting two lines before the place
+where the expression was found.
+The user's erase and kill characters may be used to edit the regular
+expression.
+Erasing back past the first column cancels the search command.
+.PP
+.IP \fIi\|\fPn
+search for the \fIi\|\fP-th occurrence of the last regular expression entered.
+.PP
+.IP !command
+invoke a shell with \fIcommand\|\fP. 
+The character `!' in "command" are replaced with the
+previous shell command.  The sequence "\\!" is replaced by "!".
+.PP
+.IP ":q or :Q"
+quit reading the current file; go on to the next (if any)
+(same as q or Q).
+.PP
+.IP .
+(dot) repeat the previous command.
+.PP
+The commands take effect immediately, i.e., it is not necessary to
+type a carriage return.
+Up to the time when the command character itself is given,
+the user may hit the line kill character to cancel the numerical
+argument being formed.
+In addition, the user may hit the erase character to redisplay the
+--More-- message.
+.PP
+At any time when output is being sent to the terminal, the user can
+hit the quit key (normally control\-\\).
+.I Bzmore
+will stop sending output, and will display the usual --More--
+prompt.
+The user may then enter one of the above commands in the normal manner.
+Unfortunately, some output is lost when this is done, due to the
+fact that any characters waiting in the terminal's output queue
+are flushed when the quit signal occurs.
+.PP
+The terminal is set to
+.I noecho
+mode by this program so that the output can be continuous.
+What you type will thus not show on your terminal, except for the / and !
+commands.
+.PP
+If the standard output is not a teletype, then
+.I bzmore
+acts just like
+.I bzcat,
+except that a header is printed before each file.
+.SH FILES
+.DT
+/etc/termcap		Terminal data base
+.SH "SEE ALSO"
+more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1)
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/compress.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/compress.c
new file mode 100644
index 000000000..5dfa00231
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/compress.c
@@ -0,0 +1,672 @@
+
+/*-------------------------------------------------------------*/
+/*--- Compression machinery (not incl block sorting)        ---*/
+/*---                                            compress.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+/* CHANGES
+    0.9.0    -- original version.
+    0.9.0a/b -- no changes in this file.
+    0.9.0c   -- changed setting of nGroups in sendMTFValues() 
+                so as to do a bit better on small files
+*/
+
+#include "bzlib_private.h"
+
+
+/*---------------------------------------------------*/
+/*--- Bit stream I/O                              ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+void BZ2_bsInitWrite ( EState* s )
+{
+   s->bsLive = 0;
+   s->bsBuff = 0;
+}
+
+
+/*---------------------------------------------------*/
+static
+void bsFinishWrite ( EState* s )
+{
+   while (s->bsLive > 0) {
+      s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24);
+      s->numZ++;
+      s->bsBuff <<= 8;
+      s->bsLive -= 8;
+   }
+}
+
+
+/*---------------------------------------------------*/
+#define bsNEEDW(nz)                           \
+{                                             \
+   while (s->bsLive >= 8) {                   \
+      s->zbits[s->numZ]                       \
+         = (UChar)(s->bsBuff >> 24);          \
+      s->numZ++;                              \
+      s->bsBuff <<= 8;                        \
+      s->bsLive -= 8;                         \
+   }                                          \
+}
+
+
+/*---------------------------------------------------*/
+static
+__inline__
+void bsW ( EState* s, Int32 n, UInt32 v )
+{
+   bsNEEDW ( n );
+   s->bsBuff |= (v << (32 - s->bsLive - n));
+   s->bsLive += n;
+}
+
+
+/*---------------------------------------------------*/
+static
+void bsPutUInt32 ( EState* s, UInt32 u )
+{
+   bsW ( s, 8, (u >> 24) & 0xffL );
+   bsW ( s, 8, (u >> 16) & 0xffL );
+   bsW ( s, 8, (u >>  8) & 0xffL );
+   bsW ( s, 8,  u        & 0xffL );
+}
+
+
+/*---------------------------------------------------*/
+static
+void bsPutUChar ( EState* s, UChar c )
+{
+   bsW( s, 8, (UInt32)c );
+}
+
+
+/*---------------------------------------------------*/
+/*--- The back end proper                         ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+static
+void makeMaps_e ( EState* s )
+{
+   Int32 i;
+   s->nInUse = 0;
+   for (i = 0; i < 256; i++)
+      if (s->inUse[i]) {
+         s->unseqToSeq[i] = s->nInUse;
+         s->nInUse++;
+      }
+}
+
+
+/*---------------------------------------------------*/
+static
+void generateMTFValues ( EState* s )
+{
+   UChar   yy[256];
+   Int32   i, j;
+   Int32   zPend;
+   Int32   wr;
+   Int32   EOB;
+
+   /* 
+      After sorting (eg, here),
+         s->arr1 [ 0 .. s->nblock-1 ] holds sorted order,
+         and
+         ((UChar*)s->arr2) [ 0 .. s->nblock-1 ] 
+         holds the original block data.
+
+      The first thing to do is generate the MTF values,
+      and put them in
+         ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ].
+      Because there are strictly fewer or equal MTF values
+      than block values, ptr values in this area are overwritten
+      with MTF values only when they are no longer needed.
+
+      The final compressed bitstream is generated into the
+      area starting at
+         (UChar*) (&((UChar*)s->arr2)[s->nblock])
+
+      These storage aliases are set up in bzCompressInit(),
+      except for the last one, which is arranged in 
+      compressBlock().
+   */
+   UInt32* ptr   = s->ptr;
+   UChar* block  = s->block;
+   UInt16* mtfv  = s->mtfv;
+
+   makeMaps_e ( s );
+   EOB = s->nInUse+1;
+
+   for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0;
+
+   wr = 0;
+   zPend = 0;
+   for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
+
+   for (i = 0; i < s->nblock; i++) {
+      UChar ll_i;
+      AssertD ( wr <= i, "generateMTFValues(1)" );
+      j = ptr[i]-1; if (j < 0) j += s->nblock;
+      ll_i = s->unseqToSeq[block[j]];
+      AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" );
+
+      if (yy[0] == ll_i) { 
+         zPend++;
+      } else {
+
+         if (zPend > 0) {
+            zPend--;
+            while (True) {
+               if (zPend & 1) {
+                  mtfv[wr] = BZ_RUNB; wr++; 
+                  s->mtfFreq[BZ_RUNB]++; 
+               } else {
+                  mtfv[wr] = BZ_RUNA; wr++; 
+                  s->mtfFreq[BZ_RUNA]++; 
+               }
+               if (zPend < 2) break;
+               zPend = (zPend - 2) / 2;
+            };
+            zPend = 0;
+         }
+         {
+            register UChar  rtmp;
+            register UChar* ryy_j;
+            register UChar  rll_i;
+            rtmp  = yy[1];
+            yy[1] = yy[0];
+            ryy_j = &(yy[1]);
+            rll_i = ll_i;
+            while ( rll_i != rtmp ) {
+               register UChar rtmp2;
+               ryy_j++;
+               rtmp2  = rtmp;
+               rtmp   = *ryy_j;
+               *ryy_j = rtmp2;
+            };
+            yy[0] = rtmp;
+            j = ryy_j - &(yy[0]);
+            mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++;
+         }
+
+      }
+   }
+
+   if (zPend > 0) {
+      zPend--;
+      while (True) {
+         if (zPend & 1) {
+            mtfv[wr] = BZ_RUNB; wr++; 
+            s->mtfFreq[BZ_RUNB]++; 
+         } else {
+            mtfv[wr] = BZ_RUNA; wr++; 
+            s->mtfFreq[BZ_RUNA]++; 
+         }
+         if (zPend < 2) break;
+         zPend = (zPend - 2) / 2;
+      };
+      zPend = 0;
+   }
+
+   mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
+
+   s->nMTF = wr;
+}
+
+
+/*---------------------------------------------------*/
+#define BZ_LESSER_ICOST  0
+#define BZ_GREATER_ICOST 15
+
+static
+void sendMTFValues ( EState* s )
+{
+   Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;
+   Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;
+   Int32 nGroups, nBytes;
+
+   /*--
+   UChar  len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+   is a global since the decoder also needs it.
+
+   Int32  code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+   Int32  rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+   are also globals only used in this proc.
+   Made global to keep stack frame size small.
+   --*/
+
+
+   UInt16 cost[BZ_N_GROUPS];
+   Int32  fave[BZ_N_GROUPS];
+
+   UInt16* mtfv = s->mtfv;
+
+   if (s->verbosity >= 3)
+      VPrintf3( "      %d in block, %d after MTF & 1-2 coding, "
+                "%d+2 syms in use\n", 
+                s->nblock, s->nMTF, s->nInUse );
+
+   alphaSize = s->nInUse+2;
+   for (t = 0; t < BZ_N_GROUPS; t++)
+      for (v = 0; v < alphaSize; v++)
+         s->len[t][v] = BZ_GREATER_ICOST;
+
+   /*--- Decide how many coding tables to use ---*/
+   AssertH ( s->nMTF > 0, 3001 );
+   if (s->nMTF < 200)  nGroups = 2; else
+   if (s->nMTF < 600)  nGroups = 3; else
+   if (s->nMTF < 1200) nGroups = 4; else
+   if (s->nMTF < 2400) nGroups = 5; else
+                       nGroups = 6;
+
+   /*--- Generate an initial set of coding tables ---*/
+   { 
+      Int32 nPart, remF, tFreq, aFreq;
+
+      nPart = nGroups;
+      remF  = s->nMTF;
+      gs = 0;
+      while (nPart > 0) {
+         tFreq = remF / nPart;
+         ge = gs-1;
+         aFreq = 0;
+         while (aFreq < tFreq && ge < alphaSize-1) {
+            ge++;
+            aFreq += s->mtfFreq[ge];
+         }
+
+         if (ge > gs 
+             && nPart != nGroups && nPart != 1 
+             && ((nGroups-nPart) % 2 == 1)) {
+            aFreq -= s->mtfFreq[ge];
+            ge--;
+         }
+
+         if (s->verbosity >= 3)
+            VPrintf5( "      initial group %d, [%d .. %d], "
+                      "has %d syms (%4.1f%%)\n",
+                      nPart, gs, ge, aFreq, 
+                      (100.0 * (float)aFreq) / (float)(s->nMTF) );
+ 
+         for (v = 0; v < alphaSize; v++)
+            if (v >= gs && v <= ge) 
+               s->len[nPart-1][v] = BZ_LESSER_ICOST; else
+               s->len[nPart-1][v] = BZ_GREATER_ICOST;
+ 
+         nPart--;
+         gs = ge+1;
+         remF -= aFreq;
+      }
+   }
+
+   /*--- 
+      Iterate up to BZ_N_ITERS times to improve the tables.
+   ---*/
+   for (iter = 0; iter < BZ_N_ITERS; iter++) {
+
+      for (t = 0; t < nGroups; t++) fave[t] = 0;
+
+      for (t = 0; t < nGroups; t++)
+         for (v = 0; v < alphaSize; v++)
+            s->rfreq[t][v] = 0;
+
+      /*---
+        Set up an auxiliary length table which is used to fast-track
+	the common case (nGroups == 6). 
+      ---*/
+      if (nGroups == 6) {
+         for (v = 0; v < alphaSize; v++) {
+            s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
+            s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
+            s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
+	 }
+      }
+
+      nSelectors = 0;
+      totc = 0;
+      gs = 0;
+      while (True) {
+
+         /*--- Set group start & end marks. --*/
+         if (gs >= s->nMTF) break;
+         ge = gs + BZ_G_SIZE - 1; 
+         if (ge >= s->nMTF) ge = s->nMTF-1;
+
+         /*-- 
+            Calculate the cost of this group as coded
+            by each of the coding tables.
+         --*/
+         for (t = 0; t < nGroups; t++) cost[t] = 0;
+
+         if (nGroups == 6 && 50 == ge-gs+1) {
+            /*--- fast track the common case ---*/
+            register UInt32 cost01, cost23, cost45;
+            register UInt16 icv;
+            cost01 = cost23 = cost45 = 0;
+
+#           define BZ_ITER(nn)                \
+               icv = mtfv[gs+(nn)];           \
+               cost01 += s->len_pack[icv][0]; \
+               cost23 += s->len_pack[icv][1]; \
+               cost45 += s->len_pack[icv][2]; \
+
+            BZ_ITER(0);  BZ_ITER(1);  BZ_ITER(2);  BZ_ITER(3);  BZ_ITER(4);
+            BZ_ITER(5);  BZ_ITER(6);  BZ_ITER(7);  BZ_ITER(8);  BZ_ITER(9);
+            BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14);
+            BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19);
+            BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24);
+            BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29);
+            BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34);
+            BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39);
+            BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44);
+            BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49);
+
+#           undef BZ_ITER
+
+            cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16;
+            cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16;
+            cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
+
+         } else {
+	    /*--- slow version which correctly handles all situations ---*/
+            for (i = gs; i <= ge; i++) { 
+               UInt16 icv = mtfv[i];
+               for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
+            }
+         }
+ 
+         /*-- 
+            Find the coding table which is best for this group,
+            and record its identity in the selector table.
+         --*/
+         bc = 999999999; bt = -1;
+         for (t = 0; t < nGroups; t++)
+            if (cost[t] < bc) { bc = cost[t]; bt = t; };
+         totc += bc;
+         fave[bt]++;
+         s->selector[nSelectors] = bt;
+         nSelectors++;
+
+         /*-- 
+            Increment the symbol frequencies for the selected table.
+          --*/
+         if (nGroups == 6 && 50 == ge-gs+1) {
+            /*--- fast track the common case ---*/
+
+#           define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++
+
+            BZ_ITUR(0);  BZ_ITUR(1);  BZ_ITUR(2);  BZ_ITUR(3);  BZ_ITUR(4);
+            BZ_ITUR(5);  BZ_ITUR(6);  BZ_ITUR(7);  BZ_ITUR(8);  BZ_ITUR(9);
+            BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14);
+            BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19);
+            BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24);
+            BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29);
+            BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34);
+            BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39);
+            BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44);
+            BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49);
+
+#           undef BZ_ITUR
+
+         } else {
+	    /*--- slow version which correctly handles all situations ---*/
+            for (i = gs; i <= ge; i++)
+               s->rfreq[bt][ mtfv[i] ]++;
+         }
+
+         gs = ge+1;
+      }
+      if (s->verbosity >= 3) {
+         VPrintf2 ( "      pass %d: size is %d, grp uses are ", 
+                   iter+1, totc/8 );
+         for (t = 0; t < nGroups; t++)
+            VPrintf1 ( "%d ", fave[t] );
+         VPrintf0 ( "\n" );
+      }
+
+      /*--
+        Recompute the tables based on the accumulated frequencies.
+      --*/
+      /* maxLen was changed from 20 to 17 in bzip2-1.0.3.  See 
+         comment in huffman.c for details. */
+      for (t = 0; t < nGroups; t++)
+         BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]), 
+                                 alphaSize, 17 /*20*/ );
+   }
+
+
+   AssertH( nGroups < 8, 3002 );
+   AssertH( nSelectors < 32768 &&
+            nSelectors <= BZ_MAX_SELECTORS,
+            3003 );
+
+
+   /*--- Compute MTF values for the selectors. ---*/
+   {
+      UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;
+      for (i = 0; i < nGroups; i++) pos[i] = i;
+      for (i = 0; i < nSelectors; i++) {
+         ll_i = s->selector[i];
+         j = 0;
+         tmp = pos[j];
+         while ( ll_i != tmp ) {
+            j++;
+            tmp2 = tmp;
+            tmp = pos[j];
+            pos[j] = tmp2;
+         };
+         pos[0] = tmp;
+         s->selectorMtf[i] = j;
+      }
+   };
+
+   /*--- Assign actual codes for the tables. --*/
+   for (t = 0; t < nGroups; t++) {
+      minLen = 32;
+      maxLen = 0;
+      for (i = 0; i < alphaSize; i++) {
+         if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
+         if (s->len[t][i] < minLen) minLen = s->len[t][i];
+      }
+      AssertH ( !(maxLen > 17 /*20*/ ), 3004 );
+      AssertH ( !(minLen < 1),  3005 );
+      BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]), 
+                          minLen, maxLen, alphaSize );
+   }
+
+   /*--- Transmit the mapping table. ---*/
+   { 
+      Bool inUse16[16];
+      for (i = 0; i < 16; i++) {
+          inUse16[i] = False;
+          for (j = 0; j < 16; j++)
+             if (s->inUse[i * 16 + j]) inUse16[i] = True;
+      }
+     
+      nBytes = s->numZ;
+      for (i = 0; i < 16; i++)
+         if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);
+
+      for (i = 0; i < 16; i++)
+         if (inUse16[i])
+            for (j = 0; j < 16; j++) {
+               if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);
+            }
+
+      if (s->verbosity >= 3) 
+         VPrintf1( "      bytes: mapping %d, ", s->numZ-nBytes );
+   }
+
+   /*--- Now the selectors. ---*/
+   nBytes = s->numZ;
+   bsW ( s, 3, nGroups );
+   bsW ( s, 15, nSelectors );
+   for (i = 0; i < nSelectors; i++) { 
+      for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1);
+      bsW(s,1,0);
+   }
+   if (s->verbosity >= 3)
+      VPrintf1( "selectors %d, ", s->numZ-nBytes );
+
+   /*--- Now the coding tables. ---*/
+   nBytes = s->numZ;
+
+   for (t = 0; t < nGroups; t++) {
+      Int32 curr = s->len[t][0];
+      bsW ( s, 5, curr );
+      for (i = 0; i < alphaSize; i++) {
+         while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };
+         while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };
+         bsW ( s, 1, 0 );
+      }
+   }
+
+   if (s->verbosity >= 3)
+      VPrintf1 ( "code lengths %d, ", s->numZ-nBytes );
+
+   /*--- And finally, the block data proper ---*/
+   nBytes = s->numZ;
+   selCtr = 0;
+   gs = 0;
+   while (True) {
+      if (gs >= s->nMTF) break;
+      ge = gs + BZ_G_SIZE - 1; 
+      if (ge >= s->nMTF) ge = s->nMTF-1;
+      AssertH ( s->selector[selCtr] < nGroups, 3006 );
+
+      if (nGroups == 6 && 50 == ge-gs+1) {
+            /*--- fast track the common case ---*/
+            UInt16 mtfv_i;
+            UChar* s_len_sel_selCtr 
+               = &(s->len[s->selector[selCtr]][0]);
+            Int32* s_code_sel_selCtr
+               = &(s->code[s->selector[selCtr]][0]);
+
+#           define BZ_ITAH(nn)                      \
+               mtfv_i = mtfv[gs+(nn)];              \
+               bsW ( s,                             \
+                     s_len_sel_selCtr[mtfv_i],      \
+                     s_code_sel_selCtr[mtfv_i] )
+
+            BZ_ITAH(0);  BZ_ITAH(1);  BZ_ITAH(2);  BZ_ITAH(3);  BZ_ITAH(4);
+            BZ_ITAH(5);  BZ_ITAH(6);  BZ_ITAH(7);  BZ_ITAH(8);  BZ_ITAH(9);
+            BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14);
+            BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19);
+            BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24);
+            BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29);
+            BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34);
+            BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39);
+            BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44);
+            BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49);
+
+#           undef BZ_ITAH
+
+      } else {
+	 /*--- slow version which correctly handles all situations ---*/
+         for (i = gs; i <= ge; i++) {
+            bsW ( s, 
+                  s->len  [s->selector[selCtr]] [mtfv[i]],
+                  s->code [s->selector[selCtr]] [mtfv[i]] );
+         }
+      }
+
+
+      gs = ge+1;
+      selCtr++;
+   }
+   AssertH( selCtr == nSelectors, 3007 );
+
+   if (s->verbosity >= 3)
+      VPrintf1( "codes %d\n", s->numZ-nBytes );
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_compressBlock ( EState* s, Bool is_last_block )
+{
+   if (s->nblock > 0) {
+
+      BZ_FINALISE_CRC ( s->blockCRC );
+      s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31);
+      s->combinedCRC ^= s->blockCRC;
+      if (s->blockNo > 1) s->numZ = 0;
+
+      if (s->verbosity >= 2)
+         VPrintf4( "    block %d: crc = 0x%08x, "
+                   "combined CRC = 0x%08x, size = %d\n",
+                   s->blockNo, s->blockCRC, s->combinedCRC, s->nblock );
+
+      BZ2_blockSort ( s );
+   }
+
+   s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
+
+   /*-- If this is the first block, create the stream header. --*/
+   if (s->blockNo == 1) {
+      BZ2_bsInitWrite ( s );
+      bsPutUChar ( s, BZ_HDR_B );
+      bsPutUChar ( s, BZ_HDR_Z );
+      bsPutUChar ( s, BZ_HDR_h );
+      bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) );
+   }
+
+   if (s->nblock > 0) {
+
+      bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 );
+      bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 );
+      bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 );
+
+      /*-- Now the block's CRC, so it is in a known place. --*/
+      bsPutUInt32 ( s, s->blockCRC );
+
+      /*-- 
+         Now a single bit indicating (non-)randomisation. 
+         As of version 0.9.5, we use a better sorting algorithm
+         which makes randomisation unnecessary.  So always set
+         the randomised bit to 'no'.  Of course, the decoder
+         still needs to be able to handle randomised blocks
+         so as to maintain backwards compatibility with
+         older versions of bzip2.
+      --*/
+      bsW(s,1,0);
+
+      bsW ( s, 24, s->origPtr );
+      generateMTFValues ( s );
+      sendMTFValues ( s );
+   }
+
+
+   /*-- If this is the last block, add the stream trailer. --*/
+   if (is_last_block) {
+
+      bsPutUChar ( s, 0x17 ); bsPutUChar ( s, 0x72 );
+      bsPutUChar ( s, 0x45 ); bsPutUChar ( s, 0x38 );
+      bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 );
+      bsPutUInt32 ( s, s->combinedCRC );
+      if (s->verbosity >= 2)
+         VPrintf1( "    final combined CRC = 0x%08x\n   ", s->combinedCRC );
+      bsFinishWrite ( s );
+   }
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                        compress.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/crctable.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/crctable.c
new file mode 100644
index 000000000..2b33c2535
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/crctable.c
@@ -0,0 +1,104 @@
+
+/*-------------------------------------------------------------*/
+/*--- Table for doing CRCs                                  ---*/
+/*---                                            crctable.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+#include "bzlib_private.h"
+
+/*--
+  I think this is an implementation of the AUTODIN-II,
+  Ethernet & FDDI 32-bit CRC standard.  Vaguely derived
+  from code by Rob Warnock, in Section 51 of the
+  comp.compression FAQ.
+--*/
+
+UInt32 BZ2_crc32Table[256] = {
+
+   /*-- Ugly, innit? --*/
+
+   0x00000000L, 0x04c11db7L, 0x09823b6eL, 0x0d4326d9L,
+   0x130476dcL, 0x17c56b6bL, 0x1a864db2L, 0x1e475005L,
+   0x2608edb8L, 0x22c9f00fL, 0x2f8ad6d6L, 0x2b4bcb61L,
+   0x350c9b64L, 0x31cd86d3L, 0x3c8ea00aL, 0x384fbdbdL,
+   0x4c11db70L, 0x48d0c6c7L, 0x4593e01eL, 0x4152fda9L,
+   0x5f15adacL, 0x5bd4b01bL, 0x569796c2L, 0x52568b75L,
+   0x6a1936c8L, 0x6ed82b7fL, 0x639b0da6L, 0x675a1011L,
+   0x791d4014L, 0x7ddc5da3L, 0x709f7b7aL, 0x745e66cdL,
+   0x9823b6e0L, 0x9ce2ab57L, 0x91a18d8eL, 0x95609039L,
+   0x8b27c03cL, 0x8fe6dd8bL, 0x82a5fb52L, 0x8664e6e5L,
+   0xbe2b5b58L, 0xbaea46efL, 0xb7a96036L, 0xb3687d81L,
+   0xad2f2d84L, 0xa9ee3033L, 0xa4ad16eaL, 0xa06c0b5dL,
+   0xd4326d90L, 0xd0f37027L, 0xddb056feL, 0xd9714b49L,
+   0xc7361b4cL, 0xc3f706fbL, 0xceb42022L, 0xca753d95L,
+   0xf23a8028L, 0xf6fb9d9fL, 0xfbb8bb46L, 0xff79a6f1L,
+   0xe13ef6f4L, 0xe5ffeb43L, 0xe8bccd9aL, 0xec7dd02dL,
+   0x34867077L, 0x30476dc0L, 0x3d044b19L, 0x39c556aeL,
+   0x278206abL, 0x23431b1cL, 0x2e003dc5L, 0x2ac12072L,
+   0x128e9dcfL, 0x164f8078L, 0x1b0ca6a1L, 0x1fcdbb16L,
+   0x018aeb13L, 0x054bf6a4L, 0x0808d07dL, 0x0cc9cdcaL,
+   0x7897ab07L, 0x7c56b6b0L, 0x71159069L, 0x75d48ddeL,
+   0x6b93dddbL, 0x6f52c06cL, 0x6211e6b5L, 0x66d0fb02L,
+   0x5e9f46bfL, 0x5a5e5b08L, 0x571d7dd1L, 0x53dc6066L,
+   0x4d9b3063L, 0x495a2dd4L, 0x44190b0dL, 0x40d816baL,
+   0xaca5c697L, 0xa864db20L, 0xa527fdf9L, 0xa1e6e04eL,
+   0xbfa1b04bL, 0xbb60adfcL, 0xb6238b25L, 0xb2e29692L,
+   0x8aad2b2fL, 0x8e6c3698L, 0x832f1041L, 0x87ee0df6L,
+   0x99a95df3L, 0x9d684044L, 0x902b669dL, 0x94ea7b2aL,
+   0xe0b41de7L, 0xe4750050L, 0xe9362689L, 0xedf73b3eL,
+   0xf3b06b3bL, 0xf771768cL, 0xfa325055L, 0xfef34de2L,
+   0xc6bcf05fL, 0xc27dede8L, 0xcf3ecb31L, 0xcbffd686L,
+   0xd5b88683L, 0xd1799b34L, 0xdc3abdedL, 0xd8fba05aL,
+   0x690ce0eeL, 0x6dcdfd59L, 0x608edb80L, 0x644fc637L,
+   0x7a089632L, 0x7ec98b85L, 0x738aad5cL, 0x774bb0ebL,
+   0x4f040d56L, 0x4bc510e1L, 0x46863638L, 0x42472b8fL,
+   0x5c007b8aL, 0x58c1663dL, 0x558240e4L, 0x51435d53L,
+   0x251d3b9eL, 0x21dc2629L, 0x2c9f00f0L, 0x285e1d47L,
+   0x36194d42L, 0x32d850f5L, 0x3f9b762cL, 0x3b5a6b9bL,
+   0x0315d626L, 0x07d4cb91L, 0x0a97ed48L, 0x0e56f0ffL,
+   0x1011a0faL, 0x14d0bd4dL, 0x19939b94L, 0x1d528623L,
+   0xf12f560eL, 0xf5ee4bb9L, 0xf8ad6d60L, 0xfc6c70d7L,
+   0xe22b20d2L, 0xe6ea3d65L, 0xeba91bbcL, 0xef68060bL,
+   0xd727bbb6L, 0xd3e6a601L, 0xdea580d8L, 0xda649d6fL,
+   0xc423cd6aL, 0xc0e2d0ddL, 0xcda1f604L, 0xc960ebb3L,
+   0xbd3e8d7eL, 0xb9ff90c9L, 0xb4bcb610L, 0xb07daba7L,
+   0xae3afba2L, 0xaafbe615L, 0xa7b8c0ccL, 0xa379dd7bL,
+   0x9b3660c6L, 0x9ff77d71L, 0x92b45ba8L, 0x9675461fL,
+   0x8832161aL, 0x8cf30badL, 0x81b02d74L, 0x857130c3L,
+   0x5d8a9099L, 0x594b8d2eL, 0x5408abf7L, 0x50c9b640L,
+   0x4e8ee645L, 0x4a4ffbf2L, 0x470cdd2bL, 0x43cdc09cL,
+   0x7b827d21L, 0x7f436096L, 0x7200464fL, 0x76c15bf8L,
+   0x68860bfdL, 0x6c47164aL, 0x61043093L, 0x65c52d24L,
+   0x119b4be9L, 0x155a565eL, 0x18197087L, 0x1cd86d30L,
+   0x029f3d35L, 0x065e2082L, 0x0b1d065bL, 0x0fdc1becL,
+   0x3793a651L, 0x3352bbe6L, 0x3e119d3fL, 0x3ad08088L,
+   0x2497d08dL, 0x2056cd3aL, 0x2d15ebe3L, 0x29d4f654L,
+   0xc5a92679L, 0xc1683bceL, 0xcc2b1d17L, 0xc8ea00a0L,
+   0xd6ad50a5L, 0xd26c4d12L, 0xdf2f6bcbL, 0xdbee767cL,
+   0xe3a1cbc1L, 0xe760d676L, 0xea23f0afL, 0xeee2ed18L,
+   0xf0a5bd1dL, 0xf464a0aaL, 0xf9278673L, 0xfde69bc4L,
+   0x89b8fd09L, 0x8d79e0beL, 0x803ac667L, 0x84fbdbd0L,
+   0x9abc8bd5L, 0x9e7d9662L, 0x933eb0bbL, 0x97ffad0cL,
+   0xafb010b1L, 0xab710d06L, 0xa6322bdfL, 0xa2f33668L,
+   0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L
+};
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                        crctable.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/decompress.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/decompress.c
new file mode 100644
index 000000000..a1a0bac89
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/decompress.c
@@ -0,0 +1,652 @@
+
+/*-------------------------------------------------------------*/
+/*--- Decompression machinery                               ---*/
+/*---                                          decompress.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+#include "bzlib_private.h"
+
+
+/*---------------------------------------------------*/
+static
+void makeMaps_d ( DState* s )
+{
+   Int32 i;
+   s->nInUse = 0;
+   for (i = 0; i < 256; i++)
+      if (s->inUse[i]) {
+         s->seqToUnseq[s->nInUse] = i;
+         s->nInUse++;
+      }
+}
+
+
+/*---------------------------------------------------*/
+#define RETURN(rrr)                               \
+   { retVal = rrr; goto save_state_and_return; };
+
+#define GET_BITS(lll,vvv,nnn)                     \
+   case lll: s->state = lll;                      \
+   while (True) {                                 \
+      if (s->bsLive >= nnn) {                     \
+         UInt32 v;                                \
+         v = (s->bsBuff >>                        \
+             (s->bsLive-nnn)) & ((1 << nnn)-1);   \
+         s->bsLive -= nnn;                        \
+         vvv = v;                                 \
+         break;                                   \
+      }                                           \
+      if (s->strm->avail_in == 0) RETURN(BZ_OK);  \
+      s->bsBuff                                   \
+         = (s->bsBuff << 8) |                     \
+           ((UInt32)                              \
+              (*((UChar*)(s->strm->next_in))));   \
+      s->bsLive += 8;                             \
+      s->strm->next_in++;                         \
+      s->strm->avail_in--;                        \
+      s->strm->total_in_lo32++;                   \
+      if (s->strm->total_in_lo32 == 0)            \
+         s->strm->total_in_hi32++;                \
+   }
+
+#define GET_UCHAR(lll,uuu)                        \
+   GET_BITS(lll,uuu,8)
+
+#define GET_BIT(lll,uuu)                          \
+   GET_BITS(lll,uuu,1)
+
+/*---------------------------------------------------*/
+#define GET_MTF_VAL(label1,label2,lval)           \
+{                                                 \
+   if (groupPos == 0) {                           \
+      groupNo++;                                  \
+      if (groupNo >= nSelectors)                  \
+         RETURN(BZ_DATA_ERROR);                   \
+      groupPos = BZ_G_SIZE;                       \
+      gSel = s->selector[groupNo];                \
+      gMinlen = s->minLens[gSel];                 \
+      gLimit = &(s->limit[gSel][0]);              \
+      gPerm = &(s->perm[gSel][0]);                \
+      gBase = &(s->base[gSel][0]);                \
+   }                                              \
+   groupPos--;                                    \
+   zn = gMinlen;                                  \
+   GET_BITS(label1, zvec, zn);                    \
+   while (1) {                                    \
+      if (zn > 20 /* the longest code */)         \
+         RETURN(BZ_DATA_ERROR);                   \
+      if (zvec <= gLimit[zn]) break;              \
+      zn++;                                       \
+      GET_BIT(label2, zj);                        \
+      zvec = (zvec << 1) | zj;                    \
+   };                                             \
+   if (zvec - gBase[zn] < 0                       \
+       || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE)  \
+      RETURN(BZ_DATA_ERROR);                      \
+   lval = gPerm[zvec - gBase[zn]];                \
+}
+
+
+/*---------------------------------------------------*/
+Int32 BZ2_decompress ( DState* s )
+{
+   UChar      uc;
+   Int32      retVal;
+   Int32      minLen, maxLen;
+   bz_stream* strm = s->strm;
+
+   /* stuff that needs to be saved/restored */
+   Int32  i;
+   Int32  j;
+   Int32  t;
+   Int32  alphaSize;
+   Int32  nGroups;
+   Int32  nSelectors;
+   Int32  EOB;
+   Int32  groupNo;
+   Int32  groupPos;
+   Int32  nextSym;
+   Int32  nblockMAX;
+   Int32  nblock;
+   Int32  es;
+   Int32  N;
+   Int32  curr;
+   Int32  zt;
+   Int32  zn; 
+   Int32  zvec;
+   Int32  zj;
+   Int32  gSel;
+   Int32  gMinlen;
+   Int32* gLimit;
+   Int32* gBase;
+   Int32* gPerm;
+
+   if (s->state == BZ_X_MAGIC_1) {
+      /*initialise the save area*/
+      s->save_i           = 0;
+      s->save_j           = 0;
+      s->save_t           = 0;
+      s->save_alphaSize   = 0;
+      s->save_nGroups     = 0;
+      s->save_nSelectors  = 0;
+      s->save_EOB         = 0;
+      s->save_groupNo     = 0;
+      s->save_groupPos    = 0;
+      s->save_nextSym     = 0;
+      s->save_nblockMAX   = 0;
+      s->save_nblock      = 0;
+      s->save_es          = 0;
+      s->save_N           = 0;
+      s->save_curr        = 0;
+      s->save_zt          = 0;
+      s->save_zn          = 0;
+      s->save_zvec        = 0;
+      s->save_zj          = 0;
+      s->save_gSel        = 0;
+      s->save_gMinlen     = 0;
+      s->save_gLimit      = NULL;
+      s->save_gBase       = NULL;
+      s->save_gPerm       = NULL;
+   }
+
+   /*restore from the save area*/
+   i           = s->save_i;
+   j           = s->save_j;
+   t           = s->save_t;
+   alphaSize   = s->save_alphaSize;
+   nGroups     = s->save_nGroups;
+   nSelectors  = s->save_nSelectors;
+   EOB         = s->save_EOB;
+   groupNo     = s->save_groupNo;
+   groupPos    = s->save_groupPos;
+   nextSym     = s->save_nextSym;
+   nblockMAX   = s->save_nblockMAX;
+   nblock      = s->save_nblock;
+   es          = s->save_es;
+   N           = s->save_N;
+   curr        = s->save_curr;
+   zt          = s->save_zt;
+   zn          = s->save_zn; 
+   zvec        = s->save_zvec;
+   zj          = s->save_zj;
+   gSel        = s->save_gSel;
+   gMinlen     = s->save_gMinlen;
+   gLimit      = s->save_gLimit;
+   gBase       = s->save_gBase;
+   gPerm       = s->save_gPerm;
+
+   retVal = BZ_OK;
+
+   switch (s->state) {
+
+      GET_UCHAR(BZ_X_MAGIC_1, uc);
+      if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC);
+
+      GET_UCHAR(BZ_X_MAGIC_2, uc);
+      if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC);
+
+      GET_UCHAR(BZ_X_MAGIC_3, uc)
+      if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC);
+
+      GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8)
+      if (s->blockSize100k < (BZ_HDR_0 + 1) || 
+          s->blockSize100k > (BZ_HDR_0 + 9)) RETURN(BZ_DATA_ERROR_MAGIC);
+      s->blockSize100k -= BZ_HDR_0;
+
+      if (s->smallDecompress) {
+         s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) );
+         s->ll4  = BZALLOC( 
+                      ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) 
+                   );
+         if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR);
+      } else {
+         s->tt  = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) );
+         if (s->tt == NULL) RETURN(BZ_MEM_ERROR);
+      }
+
+      GET_UCHAR(BZ_X_BLKHDR_1, uc);
+
+      if (uc == 0x17) goto endhdr_2;
+      if (uc != 0x31) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_BLKHDR_2, uc);
+      if (uc != 0x41) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_BLKHDR_3, uc);
+      if (uc != 0x59) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_BLKHDR_4, uc);
+      if (uc != 0x26) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_BLKHDR_5, uc);
+      if (uc != 0x53) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_BLKHDR_6, uc);
+      if (uc != 0x59) RETURN(BZ_DATA_ERROR);
+
+      s->currBlockNo++;
+      if (s->verbosity >= 2)
+         VPrintf1 ( "\n    [%d: huff+mtf ", s->currBlockNo );
+ 
+      s->storedBlockCRC = 0;
+      GET_UCHAR(BZ_X_BCRC_1, uc);
+      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
+      GET_UCHAR(BZ_X_BCRC_2, uc);
+      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
+      GET_UCHAR(BZ_X_BCRC_3, uc);
+      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
+      GET_UCHAR(BZ_X_BCRC_4, uc);
+      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
+
+      GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1);
+
+      s->origPtr = 0;
+      GET_UCHAR(BZ_X_ORIGPTR_1, uc);
+      s->origPtr = (s->origPtr << 8) | ((Int32)uc);
+      GET_UCHAR(BZ_X_ORIGPTR_2, uc);
+      s->origPtr = (s->origPtr << 8) | ((Int32)uc);
+      GET_UCHAR(BZ_X_ORIGPTR_3, uc);
+      s->origPtr = (s->origPtr << 8) | ((Int32)uc);
+
+      if (s->origPtr < 0)
+         RETURN(BZ_DATA_ERROR);
+      if (s->origPtr > 10 + 100000*s->blockSize100k) 
+         RETURN(BZ_DATA_ERROR);
+
+      /*--- Receive the mapping table ---*/
+      for (i = 0; i < 16; i++) {
+         GET_BIT(BZ_X_MAPPING_1, uc);
+         if (uc == 1) 
+            s->inUse16[i] = True; else 
+            s->inUse16[i] = False;
+      }
+
+      for (i = 0; i < 256; i++) s->inUse[i] = False;
+
+      for (i = 0; i < 16; i++)
+         if (s->inUse16[i])
+            for (j = 0; j < 16; j++) {
+               GET_BIT(BZ_X_MAPPING_2, uc);
+               if (uc == 1) s->inUse[i * 16 + j] = True;
+            }
+      makeMaps_d ( s );
+      if (s->nInUse == 0) RETURN(BZ_DATA_ERROR);
+      alphaSize = s->nInUse+2;
+
+      /*--- Now the selectors ---*/
+      GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
+      if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR);
+      GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
+      if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
+      for (i = 0; i < nSelectors; i++) {
+         j = 0;
+         while (True) {
+            GET_BIT(BZ_X_SELECTOR_3, uc);
+            if (uc == 0) break;
+            j++;
+            if (j >= nGroups) RETURN(BZ_DATA_ERROR);
+         }
+         /* Having more than BZ_MAX_SELECTORS doesn't make much sense
+            since they will never be used, but some implementations might
+            "round up" the number of selectors, so just ignore those. */
+         if (i < BZ_MAX_SELECTORS)
+           s->selectorMtf[i] = j;
+      }
+      if (nSelectors > BZ_MAX_SELECTORS)
+        nSelectors = BZ_MAX_SELECTORS;
+
+      /*--- Undo the MTF values for the selectors. ---*/
+      {
+         UChar pos[BZ_N_GROUPS], tmp, v;
+         for (v = 0; v < nGroups; v++) pos[v] = v;
+   
+         for (i = 0; i < nSelectors; i++) {
+            v = s->selectorMtf[i];
+            tmp = pos[v];
+            while (v > 0) { pos[v] = pos[v-1]; v--; }
+            pos[0] = tmp;
+            s->selector[i] = tmp;
+         }
+      }
+
+      /*--- Now the coding tables ---*/
+      for (t = 0; t < nGroups; t++) {
+         GET_BITS(BZ_X_CODING_1, curr, 5);
+         for (i = 0; i < alphaSize; i++) {
+            while (True) {
+               if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR);
+               GET_BIT(BZ_X_CODING_2, uc);
+               if (uc == 0) break;
+               GET_BIT(BZ_X_CODING_3, uc);
+               if (uc == 0) curr++; else curr--;
+            }
+            s->len[t][i] = curr;
+         }
+      }
+
+      /*--- Create the Huffman decoding tables ---*/
+      for (t = 0; t < nGroups; t++) {
+         minLen = 32;
+         maxLen = 0;
+         for (i = 0; i < alphaSize; i++) {
+            if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
+            if (s->len[t][i] < minLen) minLen = s->len[t][i];
+         }
+         BZ2_hbCreateDecodeTables ( 
+            &(s->limit[t][0]), 
+            &(s->base[t][0]), 
+            &(s->perm[t][0]), 
+            &(s->len[t][0]),
+            minLen, maxLen, alphaSize
+         );
+         s->minLens[t] = minLen;
+      }
+
+      /*--- Now the MTF values ---*/
+
+      EOB      = s->nInUse+1;
+      nblockMAX = 100000 * s->blockSize100k;
+      groupNo  = -1;
+      groupPos = 0;
+
+      for (i = 0; i <= 255; i++) s->unzftab[i] = 0;
+
+      /*-- MTF init --*/
+      {
+         Int32 ii, jj, kk;
+         kk = MTFA_SIZE-1;
+         for (ii = 256 / MTFL_SIZE - 1; ii >= 0; ii--) {
+            for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
+               s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj);
+               kk--;
+            }
+            s->mtfbase[ii] = kk + 1;
+         }
+      }
+      /*-- end MTF init --*/
+
+      nblock = 0;
+      GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym);
+
+      while (True) {
+
+         if (nextSym == EOB) break;
+
+         if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) {
+
+            es = -1;
+            N = 1;
+            do {
+               /* Check that N doesn't get too big, so that es doesn't
+                  go negative.  The maximum value that can be
+                  RUNA/RUNB encoded is equal to the block size (post
+                  the initial RLE), viz, 900k, so bounding N at 2
+                  million should guard against overflow without
+                  rejecting any legitimate inputs. */
+               if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR);
+               if (nextSym == BZ_RUNA) es = es + (0+1) * N; else
+               if (nextSym == BZ_RUNB) es = es + (1+1) * N;
+               N = N * 2;
+               GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym);
+            }
+               while (nextSym == BZ_RUNA || nextSym == BZ_RUNB);
+
+            es++;
+            uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ];
+            s->unzftab[uc] += es;
+
+            if (s->smallDecompress)
+               while (es > 0) {
+                  if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+                  s->ll16[nblock] = (UInt16)uc;
+                  nblock++;
+                  es--;
+               }
+            else
+               while (es > 0) {
+                  if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+                  s->tt[nblock] = (UInt32)uc;
+                  nblock++;
+                  es--;
+               };
+
+            continue;
+
+         } else {
+
+            if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+
+            /*-- uc = MTF ( nextSym-1 ) --*/
+            {
+               Int32 ii, jj, kk, pp, lno, off;
+               UInt32 nn;
+               nn = (UInt32)(nextSym - 1);
+
+               if (nn < MTFL_SIZE) {
+                  /* avoid general-case expense */
+                  pp = s->mtfbase[0];
+                  uc = s->mtfa[pp+nn];
+                  while (nn > 3) {
+                     Int32 z = pp+nn;
+                     s->mtfa[(z)  ] = s->mtfa[(z)-1];
+                     s->mtfa[(z)-1] = s->mtfa[(z)-2];
+                     s->mtfa[(z)-2] = s->mtfa[(z)-3];
+                     s->mtfa[(z)-3] = s->mtfa[(z)-4];
+                     nn -= 4;
+                  }
+                  while (nn > 0) { 
+                     s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; 
+                  };
+                  s->mtfa[pp] = uc;
+               } else { 
+                  /* general case */
+                  lno = nn / MTFL_SIZE;
+                  off = nn % MTFL_SIZE;
+                  pp = s->mtfbase[lno] + off;
+                  uc = s->mtfa[pp];
+                  while (pp > s->mtfbase[lno]) { 
+                     s->mtfa[pp] = s->mtfa[pp-1]; pp--; 
+                  };
+                  s->mtfbase[lno]++;
+                  while (lno > 0) {
+                     s->mtfbase[lno]--;
+                     s->mtfa[s->mtfbase[lno]] 
+                        = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1];
+                     lno--;
+                  }
+                  s->mtfbase[0]--;
+                  s->mtfa[s->mtfbase[0]] = uc;
+                  if (s->mtfbase[0] == 0) {
+                     kk = MTFA_SIZE-1;
+                     for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) {
+                        for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
+                           s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj];
+                           kk--;
+                        }
+                        s->mtfbase[ii] = kk + 1;
+                     }
+                  }
+               }
+            }
+            /*-- end uc = MTF ( nextSym-1 ) --*/
+
+            s->unzftab[s->seqToUnseq[uc]]++;
+            if (s->smallDecompress)
+               s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]); else
+               s->tt[nblock]   = (UInt32)(s->seqToUnseq[uc]);
+            nblock++;
+
+            GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);
+            continue;
+         }
+      }
+
+      /* Now we know what nblock is, we can do a better sanity
+         check on s->origPtr.
+      */
+      if (s->origPtr < 0 || s->origPtr >= nblock)
+         RETURN(BZ_DATA_ERROR);
+
+      /*-- Set up cftab to facilitate generation of T^(-1) --*/
+      /* Check: unzftab entries in range. */
+      for (i = 0; i <= 255; i++) {
+         if (s->unzftab[i] < 0 || s->unzftab[i] > nblock)
+            RETURN(BZ_DATA_ERROR);
+      }
+      /* Actually generate cftab. */
+      s->cftab[0] = 0;
+      for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1];
+      for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
+      /* Check: cftab entries in range. */
+      for (i = 0; i <= 256; i++) {
+         if (s->cftab[i] < 0 || s->cftab[i] > nblock) {
+            /* s->cftab[i] can legitimately be == nblock */
+            RETURN(BZ_DATA_ERROR);
+         }
+      }
+      /* Check: cftab entries non-descending. */
+      for (i = 1; i <= 256; i++) {
+         if (s->cftab[i-1] > s->cftab[i]) {
+            RETURN(BZ_DATA_ERROR);
+         }
+      }
+
+      s->state_out_len = 0;
+      s->state_out_ch  = 0;
+      BZ_INITIALISE_CRC ( s->calculatedBlockCRC );
+      s->state = BZ_X_OUTPUT;
+      if (s->verbosity >= 2) VPrintf0 ( "rt+rld" );
+
+      if (s->smallDecompress) {
+
+         /*-- Make a copy of cftab, used in generation of T --*/
+         for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i];
+
+         /*-- compute the T vector --*/
+         for (i = 0; i < nblock; i++) {
+            uc = (UChar)(s->ll16[i]);
+            SET_LL(i, s->cftabCopy[uc]);
+            s->cftabCopy[uc]++;
+         }
+
+         /*-- Compute T^(-1) by pointer reversal on T --*/
+         i = s->origPtr;
+         j = GET_LL(i);
+         do {
+            Int32 tmp = GET_LL(j);
+            SET_LL(j, i);
+            i = j;
+            j = tmp;
+         }
+            while (i != s->origPtr);
+
+         s->tPos = s->origPtr;
+         s->nblock_used = 0;
+         if (s->blockRandomised) {
+            BZ_RAND_INIT_MASK;
+            BZ_GET_SMALL(s->k0); s->nblock_used++;
+            BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; 
+         } else {
+            BZ_GET_SMALL(s->k0); s->nblock_used++;
+         }
+
+      } else {
+
+         /*-- compute the T^(-1) vector --*/
+         for (i = 0; i < nblock; i++) {
+            uc = (UChar)(s->tt[i] & 0xff);
+            s->tt[s->cftab[uc]] |= (i << 8);
+            s->cftab[uc]++;
+         }
+
+         s->tPos = s->tt[s->origPtr] >> 8;
+         s->nblock_used = 0;
+         if (s->blockRandomised) {
+            BZ_RAND_INIT_MASK;
+            BZ_GET_FAST(s->k0); s->nblock_used++;
+            BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; 
+         } else {
+            BZ_GET_FAST(s->k0); s->nblock_used++;
+         }
+
+      }
+
+      RETURN(BZ_OK);
+
+
+
+    endhdr_2:
+
+      GET_UCHAR(BZ_X_ENDHDR_2, uc);
+      if (uc != 0x72) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_ENDHDR_3, uc);
+      if (uc != 0x45) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_ENDHDR_4, uc);
+      if (uc != 0x38) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_ENDHDR_5, uc);
+      if (uc != 0x50) RETURN(BZ_DATA_ERROR);
+      GET_UCHAR(BZ_X_ENDHDR_6, uc);
+      if (uc != 0x90) RETURN(BZ_DATA_ERROR);
+
+      s->storedCombinedCRC = 0;
+      GET_UCHAR(BZ_X_CCRC_1, uc);
+      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
+      GET_UCHAR(BZ_X_CCRC_2, uc);
+      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
+      GET_UCHAR(BZ_X_CCRC_3, uc);
+      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
+      GET_UCHAR(BZ_X_CCRC_4, uc);
+      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
+
+      s->state = BZ_X_IDLE;
+      RETURN(BZ_STREAM_END);
+
+      default: AssertH ( False, 4001 );
+   }
+
+   AssertH ( False, 4002 );
+
+   save_state_and_return:
+
+   s->save_i           = i;
+   s->save_j           = j;
+   s->save_t           = t;
+   s->save_alphaSize   = alphaSize;
+   s->save_nGroups     = nGroups;
+   s->save_nSelectors  = nSelectors;
+   s->save_EOB         = EOB;
+   s->save_groupNo     = groupNo;
+   s->save_groupPos    = groupPos;
+   s->save_nextSym     = nextSym;
+   s->save_nblockMAX   = nblockMAX;
+   s->save_nblock      = nblock;
+   s->save_es          = es;
+   s->save_N           = N;
+   s->save_curr        = curr;
+   s->save_zt          = zt;
+   s->save_zn          = zn;
+   s->save_zvec        = zvec;
+   s->save_zj          = zj;
+   s->save_gSel        = gSel;
+   s->save_gMinlen     = gMinlen;
+   s->save_gLimit      = gLimit;
+   s->save_gBase       = gBase;
+   s->save_gPerm       = gPerm;
+
+   return retVal;   
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                      decompress.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.c
new file mode 100644
index 000000000..4e27da280
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.c
@@ -0,0 +1,175 @@
+/*
+   minibz2
+      libbz2.dll test program.
+      by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
+      This file is Public Domain.  Welcome any email to me.
+
+   usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename]
+*/
+
+#define BZ_IMPORT
+#include 
+#include 
+#include "bzlib.h"
+#ifdef _WIN32
+#include 
+#endif
+
+
+#ifdef _WIN32
+
+#define BZ2_LIBNAME "libbz2-1.0.2.DLL" 
+
+#include 
+static int BZ2DLLLoaded = 0;
+static HINSTANCE BZ2DLLhLib;
+int BZ2DLLLoadLibrary(void)
+{
+   HINSTANCE hLib;
+
+   if(BZ2DLLLoaded==1){return 0;}
+   hLib=LoadLibrary(BZ2_LIBNAME);
+   if(hLib == NULL){
+      fprintf(stderr,"Can't load %s\n",BZ2_LIBNAME);
+      return -1;
+   }
+   BZ2_bzlibVersion=GetProcAddress(hLib,"BZ2_bzlibVersion");
+   BZ2_bzopen=GetProcAddress(hLib,"BZ2_bzopen");
+   BZ2_bzdopen=GetProcAddress(hLib,"BZ2_bzdopen");
+   BZ2_bzread=GetProcAddress(hLib,"BZ2_bzread");
+   BZ2_bzwrite=GetProcAddress(hLib,"BZ2_bzwrite");
+   BZ2_bzflush=GetProcAddress(hLib,"BZ2_bzflush");
+   BZ2_bzclose=GetProcAddress(hLib,"BZ2_bzclose");
+   BZ2_bzerror=GetProcAddress(hLib,"BZ2_bzerror");
+
+   if (!BZ2_bzlibVersion || !BZ2_bzopen || !BZ2_bzdopen
+       || !BZ2_bzread || !BZ2_bzwrite || !BZ2_bzflush
+       || !BZ2_bzclose || !BZ2_bzerror) {
+      fprintf(stderr,"GetProcAddress failed.\n");
+      return -1;
+   }
+   BZ2DLLLoaded=1;
+   BZ2DLLhLib=hLib;
+   return 0;
+
+}
+int BZ2DLLFreeLibrary(void)
+{
+   if(BZ2DLLLoaded==0){return 0;}
+   FreeLibrary(BZ2DLLhLib);
+   BZ2DLLLoaded=0;
+}
+#endif /* WIN32 */
+
+void usage(void)
+{
+   puts("usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename]");
+}
+
+int main(int argc,char *argv[])
+{
+   int decompress = 0;
+   int level = 9;
+   char *fn_r = NULL;
+   char *fn_w = NULL;
+
+#ifdef _WIN32
+   if(BZ2DLLLoadLibrary()<0){
+      fprintf(stderr,"Loading of %s failed.  Giving up.\n", BZ2_LIBNAME);
+      exit(1);
+   }
+   printf("Loading of %s succeeded.  Library version is %s.\n",
+          BZ2_LIBNAME, BZ2_bzlibVersion() );
+#endif
+   while(++argv,--argc){
+      if(**argv =='-' || **argv=='/'){
+         char *p;
+
+         for(p=*argv+1;*p;p++){
+            if(*p=='d'){
+               decompress = 1;
+            }else if('1'<=*p && *p<='9'){
+               level = *p - '0';
+            }else{
+               usage();
+               exit(1);
+            }
+         }
+      }else{
+         break;
+      }
+   }
+   if(argc>=1){
+      fn_r = *argv;
+      argc--;argv++;
+   }else{
+      fn_r = NULL;
+   }
+   if(argc>=1){
+      fn_w = *argv;
+      argc--;argv++;
+   }else{
+      fn_w = NULL;
+   }
+   {
+      int len;
+      char buff[0x1000];
+      char mode[10];
+
+      if(decompress){
+         BZFILE *BZ2fp_r = NULL;
+         FILE *fp_w = NULL;
+
+         if(fn_w){
+            if((fp_w = fopen(fn_w,"wb"))==NULL){
+               printf("can't open [%s]\n",fn_w);
+               perror("reason:");
+               exit(1);
+            }
+         }else{
+            fp_w = stdout;
+         }
+         if((fn_r == NULL && (BZ2fp_r = BZ2_bzdopen(fileno(stdin),"rb"))==NULL)
+            || (fn_r != NULL && (BZ2fp_r = BZ2_bzopen(fn_r,"rb"))==NULL)){
+            printf("can't bz2openstream\n");
+            exit(1);
+         }
+         while((len=BZ2_bzread(BZ2fp_r,buff,0x1000))>0){
+            fwrite(buff,1,len,fp_w);
+         }
+         BZ2_bzclose(BZ2fp_r);
+         if(fp_w != stdout) fclose(fp_w);
+      }else{
+         BZFILE *BZ2fp_w = NULL;
+         FILE *fp_r = NULL;
+
+         if(fn_r){
+            if((fp_r = fopen(fn_r,"rb"))==NULL){
+               printf("can't open [%s]\n",fn_r);
+               perror("reason:");
+               exit(1);
+            }
+         }else{
+            fp_r = stdin;
+         }
+         mode[0]='w';
+         mode[1] = '0' + level;
+         mode[2] = '\0';
+
+         if((fn_w == NULL && (BZ2fp_w = BZ2_bzdopen(fileno(stdout),mode))==NULL)
+            || (fn_w !=NULL && (BZ2fp_w = BZ2_bzopen(fn_w,mode))==NULL)){
+            printf("can't bz2openstream\n");
+            exit(1);
+         }
+         while((len=fread(buff,1,0x1000,fp_r))>0){
+            BZ2_bzwrite(BZ2fp_w,buff,len);
+         }
+         BZ2_bzclose(BZ2fp_w);
+         if(fp_r!=stdin)fclose(fp_r);
+      }
+   }
+#ifdef _WIN32
+   BZ2DLLFreeLibrary();
+#endif
+   return 0;
+}
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.dsp b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.dsp
new file mode 100644
index 000000000..04819a495
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/dlltest.dsp
@@ -0,0 +1,93 @@
+# Microsoft Developer Studio Project File - Name="dlltest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** ҏWȂł **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=dlltest - Win32 Debug
+!MESSAGE ͗LҲ̧قł͂܂B ۼުĂނ邽߂ɂ NMAKE gpĂB
+!MESSAGE [Ҳ̧ق̴߰] ނgpĎsĂ
+!MESSAGE 
+!MESSAGE NMAKE /f "dlltest.mak".
+!MESSAGE 
+!MESSAGE NMAKE ̎sɍ\wł܂
+!MESSAGE  ײݏϸۂ̐ݒ`܂B:
+!MESSAGE 
+!MESSAGE NMAKE /f "dlltest.mak" CFG="dlltest - Win32 Debug"
+!MESSAGE 
+!MESSAGE I”\ Ӱ:
+!MESSAGE 
+!MESSAGE "dlltest - Win32 Release" ("Win32 (x86) Console Application" p)
+!MESSAGE "dlltest - Win32 Debug" ("Win32 (x86) Console Application" p)
+!MESSAGE 
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "dlltest - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x411 /d "NDEBUG"
+# ADD RSC /l 0x411 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"minibz2.exe"
+
+!ELSEIF  "$(CFG)" == "dlltest - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "dlltest_"
+# PROP BASE Intermediate_Dir "dlltest_"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "dlltest_"
+# PROP Intermediate_Dir "dlltest_"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x411 /d "_DEBUG"
+# ADD RSC /l 0x411 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"minibz2.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "dlltest - Win32 Release"
+# Name "dlltest - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\bzlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\dlltest.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/entities.xml b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/entities.xml
new file mode 100644
index 000000000..dd699246f
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/entities.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/format.pl b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/format.pl
new file mode 100644
index 000000000..2734dede1
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/format.pl
@@ -0,0 +1,68 @@
+#!/usr/bin/perl -w
+#
+# ------------------------------------------------------------------
+# This file is part of bzip2/libbzip2, a program and library for
+# lossless, block-sorting data compression.
+#
+# bzip2/libbzip2 version 1.0.8 of 13 July 2019
+# Copyright (C) 1996-2019 Julian Seward 
+#
+# Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+# README file.
+#
+# This program is released under the terms of the license contained
+# in the file LICENSE.
+# ------------------------------------------------------------------
+#
+use strict;
+
+# get command line values:
+if ( $#ARGV !=1 ) {
+    die "Usage:  $0 xml_infile xml_outfile\n";
+}
+
+my $infile = shift;
+# check infile exists
+die "Can't find file \"$infile\""
+  unless -f $infile;
+# check we can read infile
+if (! -r $infile) {
+    die "Can't read input $infile\n";
+}
+# check we can open infile
+open( INFILE,"<$infile" ) or 
+    die "Can't input $infile $!";
+
+#my $outfile = 'fmt-manual.xml';
+my $outfile = shift;
+#print "Infile: $infile, Outfile: $outfile\n";
+# check we can write to outfile
+open( OUTFILE,">$outfile" ) or 
+    die "Can't output $outfile $! for writing";
+
+my ($prev, $curr, $str);
+$prev = ''; $curr = '';
+while (  ) {
+
+		print OUTFILE $prev;
+    $prev = $curr;
+    $curr = $_;
+    $str = '';
+
+    if ( $prev =~ /$|$/ ) {
+        chomp $prev;
+        $curr = join( '', $prev, "|<\/screen>/ ) {
+        chomp $prev;
+        $curr = join( '', $prev, "]]>", $curr );
+				$prev = '';
+        next;
+    }
+}
+print OUTFILE $curr;
+close INFILE;
+close OUTFILE;
+exit;
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/huffman.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/huffman.c
new file mode 100644
index 000000000..43a1899e4
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/huffman.c
@@ -0,0 +1,205 @@
+
+/*-------------------------------------------------------------*/
+/*--- Huffman coding low-level stuff                        ---*/
+/*---                                             huffman.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+   This file is part of bzip2/libbzip2, a program and library for
+   lossless, block-sorting data compression.
+
+   bzip2/libbzip2 version 1.0.8 of 13 July 2019
+   Copyright (C) 1996-2019 Julian Seward 
+
+   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
+   README file.
+
+   This program is released under the terms of the license contained
+   in the file LICENSE.
+   ------------------------------------------------------------------ */
+
+
+#include "bzlib_private.h"
+
+/*---------------------------------------------------*/
+#define WEIGHTOF(zz0)  ((zz0) & 0xffffff00)
+#define DEPTHOF(zz1)   ((zz1) & 0x000000ff)
+#define MYMAX(zz2,zz3) ((zz2) > (zz3) ? (zz2) : (zz3))
+
+#define ADDWEIGHTS(zw1,zw2)                           \
+   (WEIGHTOF(zw1)+WEIGHTOF(zw2)) |                    \
+   (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2)))
+
+#define UPHEAP(z)                                     \
+{                                                     \
+   Int32 zz, tmp;                                     \
+   zz = z; tmp = heap[zz];                            \
+   while (weight[tmp] < weight[heap[zz >> 1]]) {      \
+      heap[zz] = heap[zz >> 1];                       \
+      zz >>= 1;                                       \
+   }                                                  \
+   heap[zz] = tmp;                                    \
+}
+
+#define DOWNHEAP(z)                                   \
+{                                                     \
+   Int32 zz, yy, tmp;                                 \
+   zz = z; tmp = heap[zz];                            \
+   while (True) {                                     \
+      yy = zz << 1;                                   \
+      if (yy > nHeap) break;                          \
+      if (yy < nHeap &&                               \
+          weight[heap[yy+1]] < weight[heap[yy]])      \
+         yy++;                                        \
+      if (weight[tmp] < weight[heap[yy]]) break;      \
+      heap[zz] = heap[yy];                            \
+      zz = yy;                                        \
+   }                                                  \
+   heap[zz] = tmp;                                    \
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_hbMakeCodeLengths ( UChar *len, 
+                             Int32 *freq,
+                             Int32 alphaSize,
+                             Int32 maxLen )
+{
+   /*--
+      Nodes and heap entries run from 1.  Entry 0
+      for both the heap and nodes is a sentinel.
+   --*/
+   Int32 nNodes, nHeap, n1, n2, i, j, k;
+   Bool  tooLong;
+
+   Int32 heap   [ BZ_MAX_ALPHA_SIZE + 2 ];
+   Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];
+   Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ]; 
+
+   for (i = 0; i < alphaSize; i++)
+      weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
+
+   while (True) {
+
+      nNodes = alphaSize;
+      nHeap = 0;
+
+      heap[0] = 0;
+      weight[0] = 0;
+      parent[0] = -2;
+
+      for (i = 1; i <= alphaSize; i++) {
+         parent[i] = -1;
+         nHeap++;
+         heap[nHeap] = i;
+         UPHEAP(nHeap);
+      }
+
+      AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 );
+   
+      while (nHeap > 1) {
+         n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
+         n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
+         nNodes++;
+         parent[n1] = parent[n2] = nNodes;
+         weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]);
+         parent[nNodes] = -1;
+         nHeap++;
+         heap[nHeap] = nNodes;
+         UPHEAP(nHeap);
+      }
+
+      AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 );
+
+      tooLong = False;
+      for (i = 1; i <= alphaSize; i++) {
+         j = 0;
+         k = i;
+         while (parent[k] >= 0) { k = parent[k]; j++; }
+         len[i-1] = j;
+         if (j > maxLen) tooLong = True;
+      }
+      
+      if (! tooLong) break;
+
+      /* 17 Oct 04: keep-going condition for the following loop used
+         to be 'i < alphaSize', which missed the last element,
+         theoretically leading to the possibility of the compressor
+         looping.  However, this count-scaling step is only needed if
+         one of the generated Huffman code words is longer than
+         maxLen, which up to and including version 1.0.2 was 20 bits,
+         which is extremely unlikely.  In version 1.0.3 maxLen was
+         changed to 17 bits, which has minimal effect on compression
+         ratio, but does mean this scaling step is used from time to
+         time, enough to verify that it works.
+
+         This means that bzip2-1.0.3 and later will only produce
+         Huffman codes with a maximum length of 17 bits.  However, in
+         order to preserve backwards compatibility with bitstreams
+         produced by versions pre-1.0.3, the decompressor must still
+         handle lengths of up to 20. */
+
+      for (i = 1; i <= alphaSize; i++) {
+         j = weight[i] >> 8;
+         j = 1 + (j / 2);
+         weight[i] = j << 8;
+      }
+   }
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_hbAssignCodes ( Int32 *code,
+                         UChar *length,
+                         Int32 minLen,
+                         Int32 maxLen,
+                         Int32 alphaSize )
+{
+   Int32 n, vec, i;
+
+   vec = 0;
+   for (n = minLen; n <= maxLen; n++) {
+      for (i = 0; i < alphaSize; i++)
+         if (length[i] == n) { code[i] = vec; vec++; };
+      vec <<= 1;
+   }
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_hbCreateDecodeTables ( Int32 *limit,
+                                Int32 *base,
+                                Int32 *perm,
+                                UChar *length,
+                                Int32 minLen,
+                                Int32 maxLen,
+                                Int32 alphaSize )
+{
+   Int32 pp, i, j, vec;
+
+   pp = 0;
+   for (i = minLen; i <= maxLen; i++)
+      for (j = 0; j < alphaSize; j++)
+         if (length[j] == i) { perm[pp] = j; pp++; };
+
+   for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0;
+   for (i = 0; i < alphaSize; i++) base[length[i]+1]++;
+
+   for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];
+
+   for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0;
+   vec = 0;
+
+   for (i = minLen; i <= maxLen; i++) {
+      vec += (base[i+1] - base[i]);
+      limit[i] = vec-1;
+      vec <<= 1;
+   }
+   for (i = minLen + 1; i <= maxLen; i++)
+      base[i] = ((limit[i-1] + 1) << 1) - base[i];
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end                                         huffman.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.def b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.def
new file mode 100644
index 000000000..4f83fcc61
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.def
@@ -0,0 +1,27 @@
+LIBRARY			LIBBZ2
+DESCRIPTION		"libbzip2: library for data compression"
+EXPORTS
+	BZ2_bzCompressInit
+	BZ2_bzCompress
+	BZ2_bzCompressEnd
+	BZ2_bzDecompressInit
+	BZ2_bzDecompress
+	BZ2_bzDecompressEnd
+	BZ2_bzReadOpen
+	BZ2_bzReadClose
+	BZ2_bzReadGetUnused
+	BZ2_bzRead
+	BZ2_bzWriteOpen
+	BZ2_bzWrite
+	BZ2_bzWriteClose
+	BZ2_bzWriteClose64
+	BZ2_bzBuffToBuffCompress
+	BZ2_bzBuffToBuffDecompress
+	BZ2_bzlibVersion
+	BZ2_bzopen
+	BZ2_bzdopen
+	BZ2_bzread
+	BZ2_bzwrite
+	BZ2_bzflush
+	BZ2_bzclose
+	BZ2_bzerror
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.dsp b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.dsp
new file mode 100644
index 000000000..06c1d3762
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/libbz2.dsp
@@ -0,0 +1,130 @@
+# Microsoft Developer Studio Project File - Name="libbz2" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** ҏWȂł **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=libbz2 - Win32 Debug
+!MESSAGE ͗LҲ̧قł͂܂B ۼުĂނ邽߂ɂ NMAKE gpĂB
+!MESSAGE [Ҳ̧ق̴߰] ނgpĎsĂ
+!MESSAGE 
+!MESSAGE NMAKE /f "libbz2.mak".
+!MESSAGE 
+!MESSAGE NMAKE ̎sɍ\wł܂
+!MESSAGE  ײݏϸۂ̐ݒ`܂B:
+!MESSAGE 
+!MESSAGE NMAKE /f "libbz2.mak" CFG="libbz2 - Win32 Debug"
+!MESSAGE 
+!MESSAGE I”\ Ӱ:
+!MESSAGE 
+!MESSAGE "libbz2 - Win32 Release" ("Win32 (x86) Dynamic-Link Library" p)
+!MESSAGE "libbz2 - Win32 Debug" ("Win32 (x86) Dynamic-Link Library" p)
+!MESSAGE 
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "libbz2 - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
+# ADD BASE RSC /l 0x411 /d "NDEBUG"
+# ADD RSC /l 0x411 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"libbz2.dll"
+
+!ELSEIF  "$(CFG)" == "libbz2 - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
+# ADD BASE RSC /l 0x411 /d "_DEBUG"
+# ADD RSC /l 0x411 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"libbz2.dll" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "libbz2 - Win32 Release"
+# Name "libbz2 - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\blocksort.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\bzlib.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\bzlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\bzlib_private.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\compress.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crctable.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\decompress.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\huffman.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\libbz2.def
+# End Source File
+# Begin Source File
+
+SOURCE=.\randtable.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/makefile.msc b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/makefile.msc
new file mode 100644
index 000000000..6a628a753
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/makefile.msc
@@ -0,0 +1,63 @@
+# Makefile for Microsoft Visual C++ 6.0
+# usage: nmake -f makefile.msc
+# K.M. Syring (syring@gsf.de)
+# Fixed up by JRS for bzip2-0.9.5d release.
+
+CC=cl
+CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo
+
+OBJS= blocksort.obj  \
+      huffman.obj    \
+      crctable.obj   \
+      randtable.obj  \
+      compress.obj   \
+      decompress.obj \
+      bzlib.obj
+
+all: lib bzip2 test
+
+bzip2: lib
+	$(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj
+	$(CC) $(CFLAGS) -o bzip2recover bzip2recover.c
+
+lib: $(OBJS)
+	lib /out:libbz2.lib $(OBJS)
+
+test: bzip2
+	type words1
+	.\\bzip2 -1  < sample1.ref > sample1.rb2
+	.\\bzip2 -2  < sample2.ref > sample2.rb2
+	.\\bzip2 -3  < sample3.ref > sample3.rb2
+	.\\bzip2 -d  < sample1.bz2 > sample1.tst
+	.\\bzip2 -d  < sample2.bz2 > sample2.tst
+	.\\bzip2 -ds < sample3.bz2 > sample3.tst
+	@echo All six of the fc's should find no differences.
+	@echo If fc finds an error on sample3.bz2, this could be
+	@echo because WinZip's 'TAR file smart CR/LF conversion'
+	@echo is too clever for its own good.  Disable this option.
+	@echo The correct size for sample3.ref is 120,244.  If it
+	@echo is 150,251, WinZip has messed it up.
+	fc sample1.bz2 sample1.rb2 
+	fc sample2.bz2 sample2.rb2
+	fc sample3.bz2 sample3.rb2
+	fc sample1.tst sample1.ref
+	fc sample2.tst sample2.ref
+	fc sample3.tst sample3.ref
+
+
+
+clean: 
+	del *.obj
+	del libbz2.lib 
+	del bzip2.exe
+	del bzip2recover.exe
+	del sample1.rb2 
+	del sample2.rb2 
+	del sample3.rb2
+	del sample1.tst 
+	del sample2.tst
+	del sample3.tst
+
+.c.obj: 
+	$(CC) $(CFLAGS) -c $*.c -o $*.obj
+
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.html b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.html
new file mode 100644
index 000000000..2afa6780b
--- /dev/null
+++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.html
@@ -0,0 +1,2541 @@
+
+
+
+bzip2 and libbzip2, version 1.0.8
+
+
+  
+
+
+
+
+

+bzip2 and libbzip2, version 1.0.8

+

A program and library for data compression

+
+

+Julian Seward +

+
https://sourceware.org/bzip2/
+
+

Version 1.0.8 of 13 July 2019

+
+
+

This program, bzip2, the + associated library libbzip2, and + all documentation, are copyright © 1996-2019 Julian Seward. + All rights reserved.

+

Redistribution and use in source and binary forms, with + or without modification, are permitted provided that the + following conditions are met:

+
    +
  • Redistributions of source code must retain the + above copyright notice, this list of conditions and the + following disclaimer.

  • +
  • The origin of this software must not be + misrepresented; you must not claim that you wrote the original + software. If you use this software in a product, an + acknowledgment in the product documentation would be + appreciated but is not required.

  • +
  • Altered source versions must be plainly marked + as such, and must not be misrepresented as being the original + software.

  • +
  • The name of the author may not be used to + endorse or promote products derived from this software without + specific prior written permission.

  • +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE.

+

PATENTS: To the best of my knowledge, + bzip2 and + libbzip2 do not use any patented + algorithms. However, I do not have the resources to carry + out a patent search. Therefore I cannot give any guarantee of + the above statement. +

+
+
+
+
+ +
+

+1. Introduction

+

bzip2 compresses files +using the Burrows-Wheeler block-sorting text compression +algorithm, and Huffman coding. Compression is generally +considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of +the PPM family of statistical compressors.

+

bzip2 is built on top of +libbzip2, a flexible library for +handling compressed data in the +bzip2 format. This manual +describes both how to use the program and how to work with the +library interface. Most of the manual is devoted to this +library, not the program, which is good news if your interest is +only in the program.

+
    +
  • How to use bzip2 describes how to use + bzip2; this is the only part + you need to read if you just want to know how to operate the + program.

  • +
  • Programming with libbzip2 describes the + programming interfaces in detail, and

  • +
  • Miscellanea records some + miscellaneous notes which I thought ought to be recorded + somewhere.

  • +
+
+
+

+2. How to use bzip2

+ +

This chapter contains a copy of the +bzip2 man page, and nothing +else.

+
+

+2.1. NAME

+
    +
  • bzip2, + bunzip2 - a block-sorting file + compressor, v1.0.8

  • +
  • bzcat - + decompresses files to stdout

  • +
  • bzip2recover - + recovers data from damaged bzip2 files

  • +
+
+
+

+2.2. SYNOPSIS

+
    +
  • bzip2 [ + -cdfkqstvzVL123456789 ] [ filenames ... ]

  • +
  • bunzip2 [ + -fkvsVL ] [ filenames ... ]

  • +
  • bzcat [ -s ] [ + filenames ... ]

  • +
  • bzip2recover + filename

  • +
+
+
+

+2.3. DESCRIPTION

+

bzip2 compresses files +using the Burrows-Wheeler block sorting text compression +algorithm, and Huffman coding. Compression is generally +considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of +the PPM family of statistical compressors.

+

The command-line options are deliberately very similar to +those of GNU gzip, but they are +not identical.

+

bzip2 expects a list of +file names to accompany the command-line flags. Each file is +replaced by a compressed version of itself, with the name +original_name.bz2. Each +compressed file has the same modification date, permissions, and, +when possible, ownership as the corresponding original, so that +these properties can be correctly restored at decompression time. +File name handling is naive in the sense that there is no +mechanism for preserving original file names, permissions, +ownerships or dates in filesystems which lack these concepts, or +have serious file name length restrictions, such as +MS-DOS.

+

bzip2 and +bunzip2 will by default not +overwrite existing files. If you want this to happen, specify +the -f flag.

+

If no file names are specified, +bzip2 compresses from standard +input to standard output. In this case, +bzip2 will decline to write +compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless.

+

bunzip2 (or +bzip2 -d) decompresses all +specified files. Files which were not created by +bzip2 will be detected and +ignored, and a warning issued. +bzip2 attempts to guess the +filename for the decompressed file from that of the compressed +file as follows:

+
    +
  • filename.bz2 + becomes + filename

  • +
  • filename.bz + becomes + filename

  • +
  • filename.tbz2 + becomes + filename.tar

  • +
  • filename.tbz + becomes + filename.tar

  • +
  • anyothername + becomes + anyothername.out

  • +
+

If the file does not end in one of the recognised endings, +.bz2, +.bz, +.tbz2 or +.tbz, +bzip2 complains that it cannot +guess the name of the original file, and uses the original name +with .out appended.

+

As with compression, supplying no filenames causes +decompression from standard input to standard output.

+

bunzip2 will correctly +decompress a file which is the concatenation of two or more +compressed files. The result is the concatenation of the +corresponding uncompressed files. Integrity testing +(-t) of concatenated compressed +files is also supported.

+

You can also compress or decompress files to the standard +output by giving the -c flag. +Multiple files may be compressed and decompressed like this. The +resulting outputs are fed sequentially to stdout. Compression of +multiple files in this manner generates a stream containing +multiple compressed file representations. Such a stream can be +decompressed correctly only by +bzip2 version 0.9.0 or later. +Earlier versions of bzip2 will +stop after decompressing the first file in the stream.

+

bzcat (or +bzip2 -dc) decompresses all +specified files to the standard output.

+

bzip2 will read arguments +from the environment variables +BZIP2 and +BZIP, in that order, and will +process them before any arguments read from the command line. +This gives a convenient way to supply default arguments.

+

Compression is always performed, even if the compressed +file is slightly larger than the original. Files of less than +about one hundred bytes tend to get larger, since the compression +mechanism has a constant overhead in the region of 50 bytes. +Random data (including the output of most file compressors) is +coded at about 8.05 bits per byte, giving an expansion of around +0.5%.

+

As a self-check for your protection, +bzip2 uses 32-bit CRCs to make +sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, +and against undetected bugs in +bzip2 (hopefully very unlikely). +The chances of data corruption going undetected is microscopic, +about one chance in four billion for each file processed. Be +aware, though, that the check occurs upon decompression, so it +can only tell you that something is wrong. It can't help you +recover the original uncompressed data. You can use +bzip2recover to try to recover +data from damaged files.

+

Return values: 0 for a normal exit, 1 for environmental +problems (file not found, invalid flags, I/O errors, etc.), 2 +to indicate a corrupt compressed file, 3 for an internal +consistency error (eg, bug) which caused +bzip2 to panic.

+
+
+

+2.4. OPTIONS

+
+
-c --stdout
+

Compress or decompress to standard + output.

+
-d --decompress
+

Force decompression. + bzip2, + bunzip2 and + bzcat are really the same + program, and the decision about what actions to take is done on + the basis of which name is used. This flag overrides that + mechanism, and forces bzip2 to decompress.

+
-z --compress
+

The complement to + -d: forces compression, + regardless of the invokation name.

+
-t --test
+

Check integrity of the specified file(s), but + don't decompress them. This really performs a trial + decompression and throws away the result.

+
-f --force
+
+

Force overwrite of output files. Normally, + bzip2 will not overwrite + existing output files. Also forces + bzip2 to break hard links to + files, which it otherwise wouldn't do.

+

bzip2 normally declines + to decompress files which don't have the correct magic header + bytes. If forced (-f), + however, it will pass such files through unmodified. This is + how GNU gzip behaves.

+
+
-k --keep
+

Keep (don't delete) input files during + compression or decompression.

+
-s --small
+
+

Reduce memory usage, for compression, + decompression and testing. Files are decompressed and tested + using a modified algorithm which only requires 2.5 bytes per + block byte. This means any file can be decompressed in 2300k + of memory, albeit at about half the normal speed.

+

During compression, -s + selects a block size of 200k, which limits memory use to around + the same figure, at the expense of your compression ratio. In + short, if your machine is low on memory (8 megabytes or less), + use -s for everything. See + MEMORY MANAGEMENT below.

+
+
-q --quiet
+

Suppress non-essential warning messages. + Messages pertaining to I/O errors and other critical events + will not be suppressed.

+
-v --verbose
+

Verbose mode -- show the compression ratio for + each file processed. Further + -v's increase the verbosity + level, spewing out lots of information which is primarily of + interest for diagnostic purposes.

+
-L --license -V --version
+

Display the software version, license terms and + conditions.

+
-1 (or + --fast) to + -9 (or + -best)
+

Set the block size to 100 k, 200 k ... 900 k + when compressing. Has no effect when decompressing. See MEMORY MANAGEMENT below. The + --fast and + --best aliases are primarily + for GNU gzip compatibility. + In particular, --fast doesn't + make things significantly faster. And + --best merely selects the + default behaviour.

+
--
+

Treats all subsequent arguments as file names, + even if they start with a dash. This is so you can handle + files with names beginning with a dash, for example: + bzip2 -- + -myfilename.

+
+--repetitive-fast, --repetitive-best +
+

These flags are redundant in versions 0.9.5 and + above. They provided some coarse control over the behaviour of + the sorting algorithm in earlier versions, which was sometimes + useful. 0.9.5 and above have an improved algorithm which + renders these flags irrelevant.

+
+
+
+

+2.5. MEMORY MANAGEMENT

+

bzip2 compresses large +files in blocks. The block size affects both the compression +ratio achieved, and the amount of memory needed for compression +and decompression. The flags -1 +through -9 specify the block +size to be 100,000 bytes through 900,000 bytes (the default) +respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +bunzip2 then allocates itself +just enough memory to decompress the file. Since block sizes are +stored in compressed files, it follows that the flags +-1 to +-9 are irrelevant to and so +ignored during decompression.

+

Compression and decompression requirements, in bytes, can be +estimated as:

+
Compression:   400k + ( 8 x block size )
+
+Decompression: 100k + ( 4 x block size ), or
+               100k + ( 2.5 x block size )
+

Larger block sizes give rapidly diminishing marginal +returns. Most of the compression comes from the first two or +three hundred k of block size, a fact worth bearing in mind when +using bzip2 on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block +size.

+

For files compressed with the default 900k block size, +bunzip2 will require about 3700 +kbytes to decompress. To support decompression of any file on a +4 megabyte machine, bunzip2 has +an option to decompress using approximately half this amount of +memory, about 2300 kbytes. Decompression speed is also halved, +so you should use this option only where necessary. The relevant +flag is -s.

+

In general, try and use the largest block size memory +constraints allow, since that maximises the compression achieved. +Compression and decompression speed are virtually unaffected by +block size.

+

Another significant point applies to files which fit in a +single block -- that means most files you'd encounter using a +large block size. The amount of real memory touched is +proportional to the size of the file, since the file is smaller +than a block. For example, compressing a file 20,000 bytes long +with the flag -9 will cause the +compressor to allocate around 7600k of memory, but only touch +400k + 20000 * 8 = 560 kbytes of it. Similarly, the decompressor +will allocate 3700k but only touch 100k + 20000 * 4 = 180 +kbytes.

+

Here is a table which summarises the maximum memory usage +for different block sizes. Also recorded is the total compressed +size for 14 files of the Calgary Text Compression Corpus +totalling 3,141,622 bytes. This column gives some feel for how +compression varies with block size. These figures tend to +understate the advantage of larger block sizes for larger files, +since the Corpus is dominated by smaller files.

+
        Compress   Decompress   Decompress   Corpus
+Flag     usage      usage       -s usage     Size
+
+ -1      1200k       500k         350k      914704
+ -2      2000k       900k         600k      877703
+ -3      2800k      1300k         850k      860338
+ -4      3600k      1700k        1100k      846899
+ -5      4400k      2100k        1350k      845160
+ -6      5200k      2500k        1600k      838626
+ -7      6100k      2900k        1850k      834096
+ -8      6800k      3300k        2100k      828642
+ -9      7600k      3700k        2350k      828642
+
+
+

+2.6. RECOVERING DATA FROM DAMAGED FILES

+

bzip2 compresses files in +blocks, usually 900kbytes long. Each block is handled +independently. If a media or transmission error causes a +multi-block .bz2 file to become +damaged, it may be possible to recover data from the undamaged +blocks in the file.

+

The compressed representation of each block is delimited by +a 48-bit pattern, which makes it possible to find the block +boundaries with reasonable certainty. Each block also carries +its own 32-bit CRC, so damaged blocks can be distinguished from +undamaged ones.

+

bzip2recover is a simple +program whose purpose is to search for blocks in +.bz2 files, and write each block +out into its own .bz2 file. You +can then use bzip2 -t to test +the integrity of the resulting files, and decompress those which +are undamaged.

+

bzip2recover takes a +single argument, the name of the damaged file, and writes a +number of files rec0001file.bz2, +rec0002file.bz2, etc, containing +the extracted blocks. The output filenames are designed so that +the use of wildcards in subsequent processing -- for example, +bzip2 -dc rec*file.bz2 > +recovered_data -- lists the files in the correct +order.

+

bzip2recover should be of +most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly futile +to use it on damaged single-block files, since a damaged block +cannot be recovered. If you wish to minimise any potential data +loss through media or transmission errors, you might consider +compressing with a smaller block size.

+
+
+

+2.7. PERFORMANCE NOTES

+

The sorting phase of compression gathers together similar +strings in the file. Because of this, files containing very long +runs of repeated symbols, like "aabaabaabaab ..." (repeated +several hundred times) may compress more slowly than normal. +Versions 0.9.5 and above fare much better than previous versions +in this respect. The ratio between worst-case and average-case +compression time is in the region of 10:1. For previous +versions, this figure was more like 100:1. You can use the +-vvvv option to monitor progress +in great detail, if you want.

+

Decompression speed is unaffected by these +phenomena.

+

bzip2 usually allocates +several megabytes of memory to operate in, and then charges all +over it in a fairly random fashion. This means that performance, +both for compressing and decompressing, is largely determined by +the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss +rate have been observed to give disproportionately large +performance improvements. I imagine +bzip2 will perform best on +machines with very large caches.

+
+
+

+2.8. CAVEATS

+

I/O error messages are not as helpful as they could be. +bzip2 tries hard to detect I/O +errors and exit cleanly, but the details of what the problem is +sometimes seem rather misleading.

+

This manual page pertains to version 1.0.8 of +bzip2. Compressed data created by +this version is entirely forwards and backwards compatible with the +previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0, +1.0.1, 1.0.2 and 1.0.3, but with the following exception: 0.9.0 and +above can correctly decompress multiple concatenated compressed files. +0.1pl2 cannot do this; it will stop after decompressing just the first +file in the stream.

+

bzip2recover versions +prior to 1.0.2 used 32-bit integers to represent bit positions in +compressed files, so it could not handle compressed files more +than 512 megabytes long. Versions 1.0.2 and above use 64-bit ints +on some platforms which support them (GNU supported targets, and +Windows). To establish whether or not +bzip2recover was built with such +a limitation, run it without arguments. In any event you can +build yourself an unlimited version if you can recompile it with +MaybeUInt64 set to be an +unsigned 64-bit integer.

+
+
+

+2.9. AUTHOR

+

Julian Seward, +jseward@acm.org

+

The ideas embodied in +bzip2 are due to (at least) the +following people: Michael Burrows and David Wheeler (for the +block sorting transformation), David Wheeler (again, for the +Huffman coder), Peter Fenwick (for the structured coding model in +the original bzip, and many +refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +bzip). I am much indebted for +their help, support and advice. See the manual in the source +distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, +so as to speed up compression. Bela Lubkin encouraged me to +improve the worst-case compression performance. +Donna Robinson XMLised the documentation. +Many people sent +patches, helped with portability problems, lent machines, gave +advice and were generally helpful.

+
+
+
+

+3.  +Programming with libbzip2 +

+ +

This chapter describes the programming interface to +libbzip2.

+

For general background information, particularly about +memory use and performance aspects, you'd be well advised to read +How to use bzip2 as well.

+
+

+3.1. Top-level structure

+

libbzip2 is a flexible +library for compressing and decompressing data in the +bzip2 data format. Although +packaged as a single entity, it helps to regard the library as +three separate parts: the low level interface, and the high level +interface, and some utility functions.

+

The structure of +libbzip2's interfaces is similar +to that of Jean-loup Gailly's and Mark Adler's excellent +zlib library.

+

All externally visible symbols have names beginning +BZ2_. This is new in version +1.0. The intention is to minimise pollution of the namespaces of +library clients.

+

To use any part of the library, you need to +#include <bzlib.h> +into your sources.

+
+

+3.1.1. Low-level summary

+

This interface provides services for compressing and +decompressing data in memory. There's no provision for dealing +with files, streams or any other I/O mechanisms, just straight +memory-to-memory work. In fact, this part of the library can be +compiled without inclusion of +stdio.h, which may be helpful +for embedded applications.

+

The low-level part of the library has no global variables +and is therefore thread-safe.

+

Six routines make up the low level interface: +BZ2_bzCompressInit, +BZ2_bzCompress, and +BZ2_bzCompressEnd for +compression, and a corresponding trio +BZ2_bzDecompressInit, +BZ2_bzDecompress and +BZ2_bzDecompressEnd for +decompression. The *Init +functions allocate memory for compression/decompression and do +other initialisations, whilst the +*End functions close down +operations and release memory.

+

The real work is done by +BZ2_bzCompress and +BZ2_bzDecompress. These +compress and decompress data from a user-supplied input buffer to +a user-supplied output buffer. These buffers can be any size; +arbitrary quantities of data are handled by making repeated calls +to these functions. This is a flexible mechanism allowing a +consumer-pull style of activity, or producer-push, or a mixture +of both.

+
+
+

+3.1.2. High-level summary

+

This interface provides some handy wrappers around the +low-level interface to facilitate reading and writing +bzip2 format files +(.bz2 files). The routines +provide hooks to facilitate reading files in which the +bzip2 data stream is embedded +within some larger-scale file structure, or where there are +multiple bzip2 data streams +concatenated end-to-end.

+

For reading files, +BZ2_bzReadOpen, +BZ2_bzRead, +BZ2_bzReadClose and +BZ2_bzReadGetUnused are +supplied. For writing files, +BZ2_bzWriteOpen, +BZ2_bzWrite and +BZ2_bzWriteFinish are +available.

+

As with the low-level library, no global variables are used +so the library is per se thread-safe. However, if I/O errors +occur whilst reading or writing the underlying compressed files, +you may have to consult errno to +determine the cause of the error. In that case, you'd need a C +library which correctly supports +errno in a multithreaded +environment.

+

To make the library a little simpler and more portable, +BZ2_bzReadOpen and +BZ2_bzWriteOpen require you to +pass them file handles (FILE*s) +which have previously been opened for reading or writing +respectively. That avoids portability problems associated with +file operations and file attributes, whilst not being much of an +imposition on the programmer.

+
+
+

+3.1.3. Utility functions summary

+

For very simple needs, +BZ2_bzBuffToBuffCompress and +BZ2_bzBuffToBuffDecompress are +provided. These compress data in memory from one buffer to +another buffer in a single function call. You should assess +whether these functions fulfill your memory-to-memory +compression/decompression requirements before investing effort in +understanding the more general but more complex low-level +interface.

+

Yoshioka Tsuneo +(tsuneo@rr.iij4u.or.jp) has +contributed some functions to give better +zlib compatibility. These +functions are BZ2_bzopen, +BZ2_bzread, +BZ2_bzwrite, +BZ2_bzflush, +BZ2_bzclose, +BZ2_bzerror and +BZ2_bzlibVersion. You may find +these functions more convenient for simple file reading and +writing, than those in the high-level interface. These functions +are not (yet) officially part of the library, and are minimally +documented here. If they break, you get to keep all the pieces. +I hope to document them properly when time permits.

+

Yoshioka also contributed modifications to allow the +library to be built as a Windows DLL.

+
+
+
+

+3.2. Error handling

+

The library is designed to recover cleanly in all +situations, including the worst-case situation of decompressing +random data. I'm not 100% sure that it can always do this, so +you might want to add a signal handler to catch segmentation +violations during decompression if you are feeling especially +paranoid. I would be interested in hearing more about the +robustness of the library to corrupted compressed data.

+

Version 1.0.3 more robust in this respect than any +previous version. Investigations with Valgrind (a tool for detecting +problems with memory management) indicate +that, at least for the few files I tested, all single-bit errors +in the decompressed data are caught properly, with no +segmentation faults, no uses of uninitialised data, no out of +range reads or writes, and no infinite looping in the decompressor. +So it's certainly pretty robust, although +I wouldn't claim it to be totally bombproof.

+

The file bzlib.h contains +all definitions needed to use the library. In particular, you +should definitely not include +bzlib_private.h.

+

In bzlib.h, the various +return values are defined. The following list is not intended as +an exhaustive description of the circumstances in which a given +value may be returned -- those descriptions are given later. +Rather, it is intended to convey the rough meaning of each return +value. The first five actions are normal and not intended to +denote an error situation.

+
+
BZ_OK
+

The requested action was completed + successfully.

+
BZ_RUN_OK, BZ_FLUSH_OK, + BZ_FINISH_OK
+

In + BZ2_bzCompress, the requested + flush/finish/nothing-special action was completed + successfully.

+
BZ_STREAM_END
+

Compression of data was completed, or the + logical stream end was detected during + decompression.

+
+

The following return values indicate an error of some +kind.

+
+
BZ_CONFIG_ERROR
+

Indicates that the library has been improperly + compiled on your platform -- a major configuration error. + Specifically, it means that + sizeof(char), + sizeof(short) and + sizeof(int) are not 1, 2 and + 4 respectively, as they should be. Note that the library + should still work properly on 64-bit platforms which follow + the LP64 programming model -- that is, where + sizeof(long) and + sizeof(void*) are 8. Under + LP64, sizeof(int) is still 4, + so libbzip2, which doesn't + use the long type, is + OK.

+
BZ_SEQUENCE_ERROR
+

When using the library, it is important to call + the functions in the correct sequence and with data structures + (buffers etc) in the correct states. + libbzip2 checks as much as it + can to ensure this is happening, and returns + BZ_SEQUENCE_ERROR if not. + Code which complies precisely with the function semantics, as + detailed below, should never receive this value; such an event + denotes buggy code which you should + investigate.

+
BZ_PARAM_ERROR
+

Returned when a parameter to a function call is + out of range or otherwise manifestly incorrect. As with + BZ_SEQUENCE_ERROR, this + denotes a bug in the client code. The distinction between + BZ_PARAM_ERROR and + BZ_SEQUENCE_ERROR is a bit + hazy, but still worth making.

+
BZ_MEM_ERROR
+

Returned when a request to allocate memory + failed. Note that the quantity of memory needed to decompress + a stream cannot be determined until the stream's header has + been read. So + BZ2_bzDecompress and + BZ2_bzRead may return + BZ_MEM_ERROR even though some + of the compressed data has been read. The same is not true + for compression; once + BZ2_bzCompressInit or + BZ2_bzWriteOpen have + successfully completed, + BZ_MEM_ERROR cannot + occur.

+
BZ_DATA_ERROR
+

Returned when a data integrity error is + detected during decompression. Most importantly, this means + when stored and computed CRCs for the data do not match. This + value is also returned upon detection of any other anomaly in + the compressed data.

+
BZ_DATA_ERROR_MAGIC
+

As a special case of + BZ_DATA_ERROR, it is + sometimes useful to know when the compressed stream does not + start with the correct magic bytes ('B' 'Z' + 'h').

+
BZ_IO_ERROR
+

Returned by + BZ2_bzRead and + BZ2_bzWrite when there is an + error reading or writing in the compressed file, and by + BZ2_bzReadOpen and + BZ2_bzWriteOpen for attempts + to use a file for which the error indicator (viz, + ferror(f)) is set. On + receipt of BZ_IO_ERROR, the + caller should consult errno + and/or perror to acquire + operating-system specific information about the + problem.

+
BZ_UNEXPECTED_EOF
+

Returned by + BZ2_bzRead when the + compressed file finishes before the logical end of stream is + detected.

+
BZ_OUTBUFF_FULL
+

Returned by + BZ2_bzBuffToBuffCompress and + BZ2_bzBuffToBuffDecompress to + indicate that the output data will not fit into the output + buffer provided.

+
+
+
+

+3.3. Low-level interface

+
+

+3.3.1. BZ2_bzCompressInit

+
typedef struct {
+  char *next_in;
+  unsigned int avail_in;
+  unsigned int total_in_lo32;
+  unsigned int total_in_hi32;
+
+  char *next_out;
+  unsigned int avail_out;
+  unsigned int total_out_lo32;
+  unsigned int total_out_hi32;
+
+  void *state;
+
+  void *(*bzalloc)(void *,int,int);
+  void (*bzfree)(void *,void *);
+  void *opaque;
+} bz_stream;
+
+int BZ2_bzCompressInit ( bz_stream *strm, 
+                         int blockSize100k, 
+                         int verbosity,
+                         int workFactor );
+

Prepares for compression. The +bz_stream structure holds all +data pertaining to the compression activity. A +bz_stream structure should be +allocated and initialised prior to the call. The fields of +bz_stream comprise the entirety +of the user-visible data. state +is a pointer to the private data structures required for +compression.

+

Custom memory allocators are supported, via fields +bzalloc, +bzfree, and +opaque. The value +opaque is passed to as the first +argument to all calls to bzalloc +and bzfree, but is otherwise +ignored by the library. The call bzalloc ( +opaque, n, m ) is expected to return a pointer +p to n * +m bytes of memory, and bzfree ( +opaque, p ) should free that memory.

+

If you don't want to use a custom memory allocator, set +bzalloc, +bzfree and +opaque to +NULL, and the library will then +use the standard malloc / +free routines.

+

Before calling +BZ2_bzCompressInit, fields +bzalloc, +bzfree and +opaque should be filled +appropriately, as just described. Upon return, the internal +state will have been allocated and initialised, and +total_in_lo32, +total_in_hi32, +total_out_lo32 and +total_out_hi32 will have been +set to zero. These four fields are used by the library to inform +the caller of the total amount of data passed into and out of the +library, respectively. You should not try to change them. As of +version 1.0, 64-bit counts are maintained, even on 32-bit +platforms, using the _hi32 +fields to store the upper 32 bits of the count. So, for example, +the total amount of data in is (total_in_hi32 +<< 32) + total_in_lo32.

+

Parameter blockSize100k +specifies the block size to be used for compression. It should +be a value between 1 and 9 inclusive, and the actual block size +used is 100000 x this figure. 9 gives the best compression but +takes most memory.

+

Parameter verbosity should +be set to a number between 0 and 4 inclusive. 0 is silent, and +greater numbers give increasingly verbose monitoring/debugging +output. If the library has been compiled with +-DBZ_NO_STDIO, no such output +will appear for any verbosity setting.

+

Parameter workFactor +controls how the compression phase behaves when presented with +worst case, highly repetitive, input data. If compression runs +into difficulties caused by repetitive data, the library switches +from the standard sorting algorithm to a fallback algorithm. The +fallback is slower than the standard algorithm by perhaps a +factor of three, but always behaves reasonably, no matter how bad +the input.

+

Lower values of workFactor +reduce the amount of effort the standard algorithm will expend +before resorting to the fallback. You should set this parameter +carefully; too low, and many inputs will be handled by the +fallback algorithm and so compress rather slowly, too high, and +your average-to-worst case compression times can become very +large. The default value of 30 gives reasonable behaviour over a +wide range of circumstances.

+

Allowable values range from 0 to 250 inclusive. 0 is a +special case, equivalent to using the default value of 30.

+

Note that the compressed output generated is the same +regardless of whether or not the fallback algorithm is +used.

+

Be aware also that this parameter may disappear entirely in +future versions of the library. In principle it should be +possible to devise a good way to automatically choose which +algorithm to use. Such a mechanism would render the parameter +obsolete.

+

Possible return values:

+
BZ_CONFIG_ERROR
+  if the library has been mis-compiled
+BZ_PARAM_ERROR
+  if strm is NULL 
+  or blockSize < 1 or blockSize > 9
+  or verbosity < 0 or verbosity > 4
+  or workFactor < 0 or workFactor > 250
+BZ_MEM_ERROR 
+  if not enough memory is available
+BZ_OK 
+  otherwise
+

Allowable next actions:

+
BZ2_bzCompress
+  if BZ_OK is returned
+  no specific action needed in case of error
+
+
+

+3.3.2. BZ2_bzCompress

+
int BZ2_bzCompress ( bz_stream *strm, int action );
+

Provides more input and/or output buffer space for the +library. The caller maintains input and output buffers, and +calls BZ2_bzCompress to transfer +data between them.

+

Before each call to +BZ2_bzCompress, +next_in should point at the data +to be compressed, and avail_in +should indicate how many bytes the library may read. +BZ2_bzCompress updates +next_in, +avail_in and +total_in to reflect the number +of bytes it has read.

+

Similarly, next_out should +point to a buffer in which the compressed data is to be placed, +with avail_out indicating how +much output space is available. +BZ2_bzCompress updates +next_out, +avail_out and +total_out to reflect the number +of bytes output.

+

You may provide and remove as little or as much data as you +like on each call of +BZ2_bzCompress. In the limit, +it is acceptable to supply and remove data one byte at a time, +although this would be terribly inefficient. You should always +ensure that at least one byte of output space is available at +each call.

+

A second purpose of +BZ2_bzCompress is to request a +change of mode of the compressed stream.

+

Conceptually, a compressed stream can be in one of four +states: IDLE, RUNNING, FLUSHING and FINISHING. Before +initialisation +(BZ2_bzCompressInit) and after +termination (BZ2_bzCompressEnd), +a stream is regarded as IDLE.

+

Upon initialisation +(BZ2_bzCompressInit), the stream +is placed in the RUNNING state. Subsequent calls to +BZ2_bzCompress should pass +BZ_RUN as the requested action; +other actions are illegal and will result in +BZ_SEQUENCE_ERROR.

+

At some point, the calling program will have provided all +the input data it wants to. It will then want to finish up -- in +effect, asking the library to process any data it might have +buffered internally. In this state, +BZ2_bzCompress will no longer +attempt to read data from +next_in, but it will want to +write data to next_out. Because +the output buffer supplied by the user can be arbitrarily small, +the finishing-up operation cannot necessarily be done with a +single call of +BZ2_bzCompress.

+

Instead, the calling program passes +BZ_FINISH as an action to +BZ2_bzCompress. This changes +the stream's state to FINISHING. Any remaining input (ie, +next_in[0 .. avail_in-1]) is +compressed and transferred to the output buffer. To do this, +BZ2_bzCompress must be called +repeatedly until all the output has been consumed. At that +point, BZ2_bzCompress returns +BZ_STREAM_END, and the stream's +state is set back to IDLE. +BZ2_bzCompressEnd should then be +called.

+

Just to make sure the calling program does not cheat, the +library makes a note of avail_in +at the time of the first call to +BZ2_bzCompress which has +BZ_FINISH as an action (ie, at +the time the program has announced its intention to not supply +any more input). By comparing this value with that of +avail_in over subsequent calls +to BZ2_bzCompress, the library +can detect any attempts to slip in more data to compress. Any +calls for which this is detected will return +BZ_SEQUENCE_ERROR. This +indicates a programming mistake which should be corrected.

+

Instead of asking to finish, the calling program may ask +BZ2_bzCompress to take all the +remaining input, compress it and terminate the current +(Burrows-Wheeler) compression block. This could be useful for +error control purposes. The mechanism is analogous to that for +finishing: call BZ2_bzCompress +with an action of BZ_FLUSH, +remove output data, and persist with the +BZ_FLUSH action until the value +BZ_RUN is returned. As with +finishing, BZ2_bzCompress +detects any attempt to provide more input data once the flush has +begun.

+

Once the flush is complete, the stream returns to the +normal RUNNING state.

+

This all sounds pretty complex, but isn't really. Here's a +table which shows which actions are allowable in each state, what +action will be taken, what the next state is, and what the +non-error return values are. Note that you can't explicitly ask +what state the stream is in, but nor do you need to -- it can be +inferred from the values returned by +BZ2_bzCompress.

+
IDLE/any
+  Illegal.  IDLE state only exists after BZ2_bzCompressEnd or
+  before BZ2_bzCompressInit.
+  Return value = BZ_SEQUENCE_ERROR
+
+RUNNING/BZ_RUN
+  Compress from next_in to next_out as much as possible.
+  Next state = RUNNING
+  Return value = BZ_RUN_OK
+
+RUNNING/BZ_FLUSH
+  Remember current value of next_in. Compress from next_in
+  to next_out as much as possible, but do not accept any more input.
+  Next state = FLUSHING
+  Return value = BZ_FLUSH_OK
+
+RUNNING/BZ_FINISH
+  Remember current value of next_in. Compress from next_in
+  to next_out as much as possible, but do not accept any more input.
+  Next state = FINISHING
+  Return value = BZ_FINISH_OK
+
+FLUSHING/BZ_FLUSH
+  Compress from next_in to next_out as much as possible, 
+  but do not accept any more input.
+  If all the existing input has been used up and all compressed
+  output has been removed
+    Next state = RUNNING; Return value = BZ_RUN_OK
+  else
+    Next state = FLUSHING; Return value = BZ_FLUSH_OK
+
+FLUSHING/other     
+  Illegal.
+  Return value = BZ_SEQUENCE_ERROR
+
+FINISHING/BZ_FINISH
+  Compress from next_in to next_out as much as possible,
+  but to not accept any more input.  
+  If all the existing input has been used up and all compressed
+  output has been removed
+    Next state = IDLE; Return value = BZ_STREAM_END
+  else
+    Next state = FINISHING; Return value = BZ_FINISH_OK
+
+FINISHING/other
+  Illegal.
+  Return value = BZ_SEQUENCE_ERROR
+

That still looks complicated? Well, fair enough. The +usual sequence of calls for compressing a load of data is:

+
    +
  1. Get started with + BZ2_bzCompressInit.

  2. +
  3. Shovel data in and shlurp out its compressed form + using zero or more calls of + BZ2_bzCompress with action = + BZ_RUN.

  4. +
  5. Finish up. Repeatedly call + BZ2_bzCompress with action = + BZ_FINISH, copying out the + compressed output, until + BZ_STREAM_END is + returned.

  6. +
  7. Close up and go home. Call + BZ2_bzCompressEnd.

  8. +
+

If the data you want to compress fits into your input +buffer all at once, you can skip the calls of +BZ2_bzCompress ( ..., BZ_RUN ) +and just do the BZ2_bzCompress ( ..., BZ_FINISH +) calls.

+

All required memory is allocated by +BZ2_bzCompressInit. The +compression library can accept any data at all (obviously). So +you shouldn't get any error return values from the +BZ2_bzCompress calls. If you +do, they will be +BZ_SEQUENCE_ERROR, and indicate +a bug in your programming.

+

Trivial other possible return values:

+
BZ_PARAM_ERROR
+  if strm is NULL, or strm->s is NULL
+
+
+

+3.3.3. BZ2_bzCompressEnd

+
int BZ2_bzCompressEnd ( bz_stream *strm );
+

Releases all memory associated with a compression +stream.

+

Possible return values:

+
BZ_PARAM_ERROR  if strm is NULL or strm->s is NULL
+BZ_OK           otherwise
+
+
+

+3.3.4. BZ2_bzDecompressInit

+
int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
+

Prepares for decompression. As with +BZ2_bzCompressInit, a +bz_stream record should be +allocated and initialised before the call. Fields +bzalloc, +bzfree and +opaque should be set if a custom +memory allocator is required, or made +NULL for the normal +malloc / +free routines. Upon return, the +internal state will have been initialised, and +total_in and +total_out will be zero.

+

For the meaning of parameter +verbosity, see +BZ2_bzCompressInit.

+

If small is nonzero, the +library will use an alternative decompression algorithm which +uses less memory but at the cost of decompressing more slowly +(roughly speaking, half the speed, but the maximum memory +requirement drops to around 2300k). See How to use bzip2 +for more information on memory management.

+

Note that the amount of memory needed to decompress a +stream cannot be determined until the stream's header has been +read, so even if +BZ2_bzDecompressInit succeeds, a +subsequent BZ2_bzDecompress +could fail with +BZ_MEM_ERROR.

+

Possible return values:

+
BZ_CONFIG_ERROR
+  if the library has been mis-compiled
+BZ_PARAM_ERROR
+  if ( small != 0 && small != 1 )
+  or (verbosity <; 0 || verbosity > 4)
+BZ_MEM_ERROR
+  if insufficient memory is available
+

Allowable next actions:

+
BZ2_bzDecompress
+  if BZ_OK was returned
+  no specific action required in case of error
+
+
+

+3.3.5. BZ2_bzDecompress

+
int BZ2_bzDecompress ( bz_stream *strm );
+

Provides more input and/out output buffer space for the +library. The caller maintains input and output buffers, and uses +BZ2_bzDecompress to transfer +data between them.

+

Before each call to +BZ2_bzDecompress, +next_in should point at the +compressed data, and avail_in +should indicate how many bytes the library may read. +BZ2_bzDecompress updates +next_in, +avail_in and +total_in to reflect the number +of bytes it has read.

+

Similarly, next_out should +point to a buffer in which the uncompressed output is to be +placed, with avail_out +indicating how much output space is available. +BZ2_bzCompress updates +next_out, +avail_out and +total_out to reflect the number +of bytes output.

+

You may provide and remove as little or as much data as you +like on each call of +BZ2_bzDecompress. In the limit, +it is acceptable to supply and remove data one byte at a time, +although this would be terribly inefficient. You should always +ensure that at least one byte of output space is available at +each call.

+

Use of BZ2_bzDecompress is +simpler than +BZ2_bzCompress.

+

You should provide input and remove output as described +above, and repeatedly call +BZ2_bzDecompress until +BZ_STREAM_END is returned. +Appearance of BZ_STREAM_END +denotes that BZ2_bzDecompress +has detected the logical end of the compressed stream. +BZ2_bzDecompress will not +produce BZ_STREAM_END until all +output data has been placed into the output buffer, so once +BZ_STREAM_END appears, you are +guaranteed to have available all the decompressed output, and +BZ2_bzDecompressEnd can safely +be called.

+

If case of an error return value, you should call +BZ2_bzDecompressEnd to clean up +and release memory.

+

Possible return values:

+
BZ_PARAM_ERROR
+  if strm is NULL or strm->s is NULL
+  or strm->avail_out < 1
+BZ_DATA_ERROR
+  if a data integrity error is detected in the compressed stream
+BZ_DATA_ERROR_MAGIC
+  if the compressed stream doesn't begin with the right magic bytes
+BZ_MEM_ERROR
+  if there wasn't enough memory available
+BZ_STREAM_END
+  if the logical end of the data stream was detected and all
+  output in has been consumed, eg s-->avail_out > 0
+BZ_OK
+  otherwise
+

Allowable next actions:

+
BZ2_bzDecompress
+  if BZ_OK was returned
+BZ2_bzDecompressEnd
+  otherwise
+
+
+

+3.3.6. BZ2_bzDecompressEnd

+
int BZ2_bzDecompressEnd ( bz_stream *strm );
+

Releases all memory associated with a decompression +stream.

+

Possible return values:

+
BZ_PARAM_ERROR
+  if strm is NULL or strm->s is NULL
+BZ_OK
+  otherwise
+

Allowable next actions:

+
  None.
+
+
+
+

+3.4. High-level interface

+

This interface provides functions for reading and writing +bzip2 format files. First, some +general points.

+
    +
  • All of the functions take an + int* first argument, + bzerror. After each call, + bzerror should be consulted + first to determine the outcome of the call. If + bzerror is + BZ_OK, the call completed + successfully, and only then should the return value of the + function (if any) be consulted. If + bzerror is + BZ_IO_ERROR, there was an + error reading/writing the underlying compressed file, and you + should then consult errno / + perror to determine the cause + of the difficulty. bzerror + may also be set to various other values; precise details are + given on a per-function basis below.

  • +
  • If bzerror indicates + an error (ie, anything except + BZ_OK and + BZ_STREAM_END), you should + immediately call + BZ2_bzReadClose (or + BZ2_bzWriteClose, depending on + whether you are attempting to read or to write) to free up all + resources associated with the stream. Once an error has been + indicated, behaviour of all calls except + BZ2_bzReadClose + (BZ2_bzWriteClose) is + undefined. The implication is that (1) + bzerror should be checked + after each call, and (2) if + bzerror indicates an error, + BZ2_bzReadClose + (BZ2_bzWriteClose) should then + be called to clean up.

  • +
  • The FILE* arguments + passed to BZ2_bzReadOpen / + BZ2_bzWriteOpen should be set + to binary mode. Most Unix systems will do this by default, but + other platforms, including Windows and Mac, will not. If you + omit this, you may encounter problems when moving code to new + platforms.

  • +
  • Memory allocation requests are handled by + malloc / + free. At present there is no + facility for user-defined memory allocators in the file I/O + functions (could easily be added, though).

  • +
+
+

+3.4.1. BZ2_bzReadOpen

+
typedef void BZFILE;
+
+BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f, 
+                        int verbosity, int small,
+                        void *unused, int nUnused );
+

Prepare to read compressed data from file handle +f. +f should refer to a file which +has been opened for reading, and for which the error indicator +(ferror(f))is not set. If +small is 1, the library will try +to decompress using less memory, at the expense of speed.

+

For reasons explained below, +BZ2_bzRead will decompress the +nUnused bytes starting at +unused, before starting to read +from the file f. At most +BZ_MAX_UNUSED bytes may be +supplied like this. If this facility is not required, you should +pass NULL and +0 for +unused and +nUnused respectively.

+

For the meaning of parameters +small and +verbosity, see +BZ2_bzDecompressInit.

+

The amount of memory needed to decompress a file cannot be +determined until the file's header has been read. So it is +possible that BZ2_bzReadOpen +returns BZ_OK but a subsequent +call of BZ2_bzRead will return +BZ_MEM_ERROR.

+

Possible assignments to +bzerror:

+
BZ_CONFIG_ERROR
+  if the library has been mis-compiled
+BZ_PARAM_ERROR
+  if f is NULL
+  or small is neither 0 nor 1
+  or ( unused == NULL && nUnused != 0 )
+  or ( unused != NULL && !(0 <= nUnused <= BZ_MAX_UNUSED) )
+BZ_IO_ERROR
+  if ferror(f) is nonzero
+BZ_MEM_ERROR
+  if insufficient memory is available
+BZ_OK
+  otherwise.
+

Possible return values:

+
Pointer to an abstract BZFILE
+  if bzerror is BZ_OK
+NULL
+  otherwise
+

Allowable next actions:

+
BZ2_bzRead
+  if bzerror is BZ_OK
+BZ2_bzClose
+  otherwise
+
+
+

+3.4.2. BZ2_bzRead

+
int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
+

Reads up to len +(uncompressed) bytes from the compressed file +b into the buffer +buf. If the read was +successful, bzerror is set to +BZ_OK and the number of bytes +read is returned. If the logical end-of-stream was detected, +bzerror will be set to +BZ_STREAM_END, and the number of +bytes read is returned. All other +bzerror values denote an +error.

+

BZ2_bzRead will supply +len bytes, unless the logical +stream end is detected or an error occurs. Because of this, it +is possible to detect the stream end by observing when the number +of bytes returned is less than the number requested. +Nevertheless, this is regarded as inadvisable; you should instead +check bzerror after every call +and watch out for +BZ_STREAM_END.

+

Internally, BZ2_bzRead +copies data from the compressed file in chunks of size +BZ_MAX_UNUSED bytes before +decompressing it. If the file contains more bytes than strictly +needed to reach the logical end-of-stream, +BZ2_bzRead will almost certainly +read some of the trailing data before signalling +BZ_SEQUENCE_END. To collect the +read but unused data once +BZ_SEQUENCE_END has appeared, +call BZ2_bzReadGetUnused +immediately before +BZ2_bzReadClose.

+

Possible assignments to +bzerror:

+
BZ_PARAM_ERROR
+  if b is NULL or buf is NULL or len < 0
+BZ_SEQUENCE_ERROR
+  if b was opened with BZ2_bzWriteOpen
+BZ_IO_ERROR
+  if there is an error reading from the compressed file
+BZ_UNEXPECTED_EOF
+  if the compressed file ended before 
+  the logical end-of-stream was detected
+BZ_DATA_ERROR
+  if a data integrity error was detected in the compressed stream
+BZ_DATA_ERROR_MAGIC
+  if the stream does not begin with the requisite header bytes 
+  (ie, is not a bzip2 data file).  This is really 
+  a special case of BZ_DATA_ERROR.
+BZ_MEM_ERROR
+  if insufficient memory was available
+BZ_STREAM_END
+  if the logical end of stream was detected.
+BZ_OK
+  otherwise.
+

Possible return values:

+
number of bytes read
+  if bzerror is BZ_OK or BZ_STREAM_END
+undefined
+  otherwise
+

Allowable next actions:

+
collect data from buf, then BZ2_bzRead or BZ2_bzReadClose
+  if bzerror is BZ_OK
+collect data from buf, then BZ2_bzReadClose or BZ2_bzReadGetUnused
+  if bzerror is BZ_SEQUENCE_END
+BZ2_bzReadClose
+  otherwise
+
+
+

+3.4.3. BZ2_bzReadGetUnused

+
void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b, 
+                          void** unused, int* nUnused );
+

Returns data which was read from the compressed file but +was not needed to get to the logical end-of-stream. +*unused is set to the address of +the data, and *nUnused to the +number of bytes. *nUnused will +be set to a value between 0 and +BZ_MAX_UNUSED inclusive.

+

This function may only be called once +BZ2_bzRead has signalled +BZ_STREAM_END but before +BZ2_bzReadClose.

+

Possible assignments to +bzerror:

+
BZ_PARAM_ERROR
+  if b is NULL
+  or unused is NULL or nUnused is NULL
+BZ_SEQUENCE_ERROR
+  if BZ_STREAM_END has not been signalled
+  or if b was opened with BZ2_bzWriteOpen
+BZ_OK
+  otherwise
+

Allowable next actions:

+
BZ2_bzReadClose
+
+
+

+3.4.4. BZ2_bzReadClose

+
void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
+

Releases all memory pertaining to the compressed file +b. +BZ2_bzReadClose does not call +fclose on the underlying file +handle, so you should do that yourself if appropriate. +BZ2_bzReadClose should be called +to clean up after all error situations.

+

Possible assignments to +bzerror:

+
BZ_SEQUENCE_ERROR
+  if b was opened with BZ2_bzOpenWrite
+BZ_OK
+  otherwise
+

Allowable next actions:

+
none
+
+
+

+3.4.5. BZ2_bzWriteOpen

+
BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f, 
+                         int blockSize100k, int verbosity,
+                         int workFactor );
+

Prepare to write compressed data to file handle +f. +f should refer to a file which +has been opened for writing, and for which the error indicator +(ferror(f))is not set.

+

For the meaning of parameters +blockSize100k, +verbosity and +workFactor, see +BZ2_bzCompressInit.

+

All required memory is allocated at this stage, so if the +call completes successfully, +BZ_MEM_ERROR cannot be signalled +by a subsequent call to +BZ2_bzWrite.

+

Possible assignments to +bzerror:

+
BZ_CONFIG_ERROR
+  if the library has been mis-compiled
+BZ_PARAM_ERROR
+  if f is NULL
+  or blockSize100k < 1 or blockSize100k > 9
+BZ_IO_ERROR
+  if ferror(f) is nonzero
+BZ_MEM_ERROR
+  if insufficient memory is available
+BZ_OK
+  otherwise
+

Possible return values:

+
Pointer to an abstract BZFILE
+  if bzerror is BZ_OK
+NULL
+  otherwise
+

Allowable next actions:

+
BZ2_bzWrite
+  if bzerror is BZ_OK
+  (you could go directly to BZ2_bzWriteClose, but this would be pretty pointless)
+BZ2_bzWriteClose
+  otherwise
+
+
+

+3.4.6. BZ2_bzWrite

+
void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
+

Absorbs len bytes from the +buffer buf, eventually to be +compressed and written to the file.

+

Possible assignments to +bzerror:

+
BZ_PARAM_ERROR
+  if b is NULL or buf is NULL or len < 0
+BZ_SEQUENCE_ERROR
+  if b was opened with BZ2_bzReadOpen
+BZ_IO_ERROR
+  if there is an error writing the compressed file.
+BZ_OK
+  otherwise
+
+
+

+3.4.7. BZ2_bzWriteClose

+
void BZ2_bzWriteClose( int *bzerror, BZFILE* f,
+                       int abandon,
+                       unsigned int* nbytes_in,
+                       unsigned int* nbytes_out );
+
+void BZ2_bzWriteClose64( int *bzerror, BZFILE* f,
+                         int abandon,
+                         unsigned int* nbytes_in_lo32,
+                         unsigned int* nbytes_in_hi32,
+                         unsigned int* nbytes_out_lo32,
+                         unsigned int* nbytes_out_hi32 );
+

Compresses and flushes to the compressed file all data so +far supplied by BZ2_bzWrite. +The logical end-of-stream markers are also written, so subsequent +calls to BZ2_bzWrite are +illegal. All memory associated with the compressed file +b is released. +fflush is called on the +compressed file, but it is not +fclose'd.

+

If BZ2_bzWriteClose is +called to clean up after an error, the only action is to release +the memory. The library records the error codes issued by +previous calls, so this situation will be detected automatically. +There is no attempt to complete the compression operation, nor to +fflush the compressed file. You +can force this behaviour to happen even in the case of no error, +by passing a nonzero value to +abandon.

+

If nbytes_in is non-null, +*nbytes_in will be set to be the +total volume of uncompressed data handled. Similarly, +nbytes_out will be set to the +total volume of compressed data written. For compatibility with +older versions of the library, +BZ2_bzWriteClose only yields the +lower 32 bits of these counts. Use +BZ2_bzWriteClose64 if you want +the full 64 bit counts. These two functions are otherwise +absolutely identical.

+

Possible assignments to +bzerror:

+
BZ_SEQUENCE_ERROR
+  if b was opened with BZ2_bzReadOpen
+BZ_IO_ERROR
+  if there is an error writing the compressed file
+BZ_OK
+  otherwise
+
+
+

+3.4.8. Handling embedded compressed data streams

+

The high-level library facilitates use of +bzip2 data streams which form +some part of a surrounding, larger data stream.

+
    +
  • For writing, the library takes an open file handle, + writes compressed data to it, + fflushes it but does not + fclose it. The calling + application can write its own data before and after the + compressed data stream, using that same file handle.

  • +
  • Reading is more complex, and the facilities are not as + general as they could be since generality is hard to reconcile + with efficiency. BZ2_bzRead + reads from the compressed file in blocks of size + BZ_MAX_UNUSED bytes, and in + doing so probably will overshoot the logical end of compressed + stream. To recover this data once decompression has ended, + call BZ2_bzReadGetUnused after + the last call of BZ2_bzRead + (the one returning + BZ_STREAM_END) but before + calling + BZ2_bzReadClose.

  • +
+

This mechanism makes it easy to decompress multiple +bzip2 streams placed end-to-end. +As the end of one stream, when +BZ2_bzRead returns +BZ_STREAM_END, call +BZ2_bzReadGetUnused to collect +the unused data (copy it into your own buffer somewhere). That +data forms the start of the next compressed stream. To start +uncompressing that next stream, call +BZ2_bzReadOpen again, feeding in +the unused data via the unused / +nUnused parameters. Keep doing +this until BZ_STREAM_END return +coincides with the physical end of file +(feof(f)). In this situation +BZ2_bzReadGetUnused will of +course return no data.

+

This should give some feel for how the high-level interface +can be used. If you require extra flexibility, you'll have to +bite the bullet and get to grips with the low-level +interface.

+
+
+

+3.4.9. Standard file-reading/writing code

+

Here's how you'd write data to a compressed file:

+
FILE*   f;
+BZFILE* b;
+int     nBuf;
+char    buf[ /* whatever size you like */ ];
+int     bzerror;
+int     nWritten;
+
+f = fopen ( "myfile.bz2", "w" );
+if ( !f ) {
+ /* handle error */
+}
+b = BZ2_bzWriteOpen( &bzerror, f, 9 );
+if (bzerror != BZ_OK) {
+ BZ2_bzWriteClose ( b );
+ /* handle error */
+}
+
+while ( /* condition */ ) {
+ /* get data to write into buf, and set nBuf appropriately */
+ nWritten = BZ2_bzWrite ( &bzerror, b, buf, nBuf );
+ if (bzerror == BZ_IO_ERROR) { 
+   BZ2_bzWriteClose ( &bzerror, b );
+   /* handle error */
+ }
+}
+
+BZ2_bzWriteClose( &bzerror, b );
+if (bzerror == BZ_IO_ERROR) {
+ /* handle error */
+}
+

And to read from a compressed file:

+
FILE*   f;
+BZFILE* b;
+int     nBuf;
+char    buf[ /* whatever size you like */ ];
+int     bzerror;
+int     nWritten;
+
+f = fopen ( "myfile.bz2", "r" );
+if ( !f ) {
+  /* handle error */
+}
+b = BZ2_bzReadOpen ( &bzerror, f, 0, NULL, 0 );
+if ( bzerror != BZ_OK ) {
+  BZ2_bzReadClose ( &bzerror, b );
+  /* handle error */
+}
+
+bzerror = BZ_OK;
+while ( bzerror == BZ_OK && /* arbitrary other conditions */) {
+  nBuf = BZ2_bzRead ( &bzerror, b, buf, /* size of buf */ );
+  if ( bzerror == BZ_OK ) {
+    /* do something with buf[0 .. nBuf-1] */
+  }
+}
+if ( bzerror != BZ_STREAM_END ) {
+   BZ2_bzReadClose ( &bzerror, b );
+   /* handle error */
+} else {
+   BZ2_bzReadClose ( &bzerror, b );
+}
+
+
+
+

+3.5. Utility functions

+
+

+3.5.1. BZ2_bzBuffToBuffCompress

+
int BZ2_bzBuffToBuffCompress( char*         dest,
+                              unsigned int* destLen,
+                              char*         source,
+                              unsigned int  sourceLen,
+                              int           blockSize100k,
+                              int           verbosity,
+                              int           workFactor );
+

Attempts to compress the data in source[0 +.. sourceLen-1] into the destination buffer, +dest[0 .. *destLen-1]. If the +destination buffer is big enough, +*destLen is set to the size of +the compressed data, and BZ_OK +is returned. If the compressed data won't fit, +*destLen is unchanged, and +BZ_OUTBUFF_FULL is +returned.

+

Compression in this manner is a one-shot event, done with a +single call to this function. The resulting compressed data is a +complete bzip2 format data +stream. There is no mechanism for making additional calls to +provide extra input data. If you want that kind of mechanism, +use the low-level interface.

+

For the meaning of parameters +blockSize100k, +verbosity and +workFactor, see +BZ2_bzCompressInit.

+

To guarantee that the compressed data will fit in its +buffer, allocate an output buffer of size 1% larger than the +uncompressed data, plus six hundred extra bytes.

+

BZ2_bzBuffToBuffDecompress +will not write data at or beyond +dest[*destLen], even in case of +buffer overflow.

+

Possible return values:

+
BZ_CONFIG_ERROR
+  if the library has been mis-compiled
+BZ_PARAM_ERROR
+  if dest is NULL or destLen is NULL
+  or blockSize100k < 1 or blockSize100k > 9
+  or verbosity < 0 or verbosity > 4
+  or workFactor < 0 or workFactor > 250
+BZ_MEM_ERROR
+  if insufficient memory is available 
+BZ_OUTBUFF_FULL
+  if the size of the compressed data exceeds *destLen
+BZ_OK
+  otherwise
+
+
+

+3.5.2. BZ2_bzBuffToBuffDecompress

+
int BZ2_bzBuffToBuffDecompress( char*         dest,
+                                unsigned int* destLen,
+                                char*         source,
+                                unsigned int  sourceLen,
+                                int           small,
+                                int           verbosity );
+

Attempts to decompress the data in source[0 +.. sourceLen-1] into the destination buffer, +dest[0 .. *destLen-1]. If the +destination buffer is big enough, +*destLen is set to the size of +the uncompressed data, and BZ_OK +is returned. If the compressed data won't fit, +*destLen is unchanged, and +BZ_OUTBUFF_FULL is +returned.

+

source is assumed to hold +a complete bzip2 format data +stream. +BZ2_bzBuffToBuffDecompress tries +to decompress the entirety of the stream into the output +buffer.

+

For the meaning of parameters +small and +verbosity, see +BZ2_bzDecompressInit.

+

Because the compression ratio of the compressed data cannot +be known in advance, there is no easy way to guarantee that the +output buffer will be big enough. You may of course make +arrangements in your code to record the size of the uncompressed +data, but such a mechanism is beyond the scope of this +library.

+

BZ2_bzBuffToBuffDecompress +will not write data at or beyond +dest[*destLen], even in case of +buffer overflow.

+

Possible return values:

+
BZ_CONFIG_ERROR
+  if the library has been mis-compiled
+BZ_PARAM_ERROR
+  if dest is NULL or destLen is NULL
+  or small != 0 && small != 1
+  or verbosity < 0 or verbosity > 4
+BZ_MEM_ERROR
+  if insufficient memory is available 
+BZ_OUTBUFF_FULL
+  if the size of the compressed data exceeds *destLen
+BZ_DATA_ERROR
+  if a data integrity error was detected in the compressed data
+BZ_DATA_ERROR_MAGIC
+  if the compressed data doesn't begin with the right magic bytes
+BZ_UNEXPECTED_EOF
+  if the compressed data ends unexpectedly
+BZ_OK
+  otherwise
+
+
+
+

+3.6. zlib compatibility functions

+

Yoshioka Tsuneo has contributed some functions to give +better zlib compatibility. +These functions are BZ2_bzopen, +BZ2_bzread, +BZ2_bzwrite, +BZ2_bzflush, +BZ2_bzclose, +BZ2_bzerror and +BZ2_bzlibVersion. These +functions are not (yet) officially part of the library. If they +break, you get to keep all the pieces. Nevertheless, I think +they work ok.

+
typedef void BZFILE;
+
+const char * BZ2_bzlibVersion ( void );
+

Returns a string indicating the library version.

+
BZFILE * BZ2_bzopen  ( const char *path, const char *mode );
+BZFILE * BZ2_bzdopen ( int        fd,    const char *mode );
+

Opens a .bz2 file for +reading or writing, using either its name or a pre-existing file +descriptor. Analogous to fopen +and fdopen.

+
int BZ2_bzread  ( BZFILE* b, void* buf, int len );
+int BZ2_bzwrite ( BZFILE* b, void* buf, int len );
+

Reads/writes data from/to a previously opened +BZFILE. Analogous to +fread and +fwrite.

+
int  BZ2_bzflush ( BZFILE* b );
+void BZ2_bzclose ( BZFILE* b );
+

Flushes/closes a BZFILE. +BZ2_bzflush doesn't actually do +anything. Analogous to fflush +and fclose.

+
const char * BZ2_bzerror ( BZFILE *b, int *errnum )
+

Returns a string describing the more recent error status of +b, and also sets +*errnum to its numerical +value.

+
+
+

+3.7. Using the library in a stdio-free environment

+
+

+3.7.1. Getting rid of stdio

+

In a deeply embedded application, you might want to use +just the memory-to-memory functions. You can do this +conveniently by compiling the library with preprocessor symbol +BZ_NO_STDIO defined. Doing this +gives you a library containing only the following eight +functions:

+

BZ2_bzCompressInit, +BZ2_bzCompress, +BZ2_bzCompressEnd +BZ2_bzDecompressInit, +BZ2_bzDecompress, +BZ2_bzDecompressEnd +BZ2_bzBuffToBuffCompress, +BZ2_bzBuffToBuffDecompress

+

When compiled like this, all functions will ignore +verbosity settings.

+
+
+

+3.7.2. Critical error handling

+

libbzip2 contains a number +of internal assertion checks which should, needless to say, never +be activated. Nevertheless, if an assertion should fail, +behaviour depends on whether or not the library was compiled with +BZ_NO_STDIO set.

+

For a normal compile, an assertion failure yields the +message:

+
+

bzip2/libbzip2: internal error number N.

+

This is a bug in bzip2/libbzip2, 1.0.8 of 13 July 2019. +Please report it to: bzip2-devel@sourceware.org. If this happened +when you were using some program which uses libbzip2 as a +component, you should also report this bug to the author(s) +of that program. Please make an effort to report this bug; +timely and accurate bug reports eventually lead to higher +quality software. Thanks. +

+
+

where N is some error code +number. If N == 1007, it also +prints some extra text advising the reader that unreliable memory +is often associated with internal error 1007. (This is a +frequently-observed-phenomenon with versions 1.0.0/1.0.1).

+

exit(3) is then +called.

+

For a stdio-free library, +assertion failures result in a call to a function declared +as:

+
extern void bz_internal_error ( int errcode );
+

The relevant code is passed as a parameter. You should +supply such a function.

+

In either case, once an assertion failure has occurred, any +bz_stream records involved can +be regarded as invalid. You should not attempt to resume normal +operation with them.

+

You may, of course, change critical error handling to suit +your needs. As I said above, critical errors indicate bugs in +the library and should not occur. All "normal" error situations +are indicated via error return codes from functions, and can be +recovered from.

+
+
+
+

+3.8. Making a Windows DLL

+

Everything related to Windows has been contributed by +Yoshioka Tsuneo +(tsuneo@rr.iij4u.or.jp), so +you should send your queries to him (but please Cc: +bzip2-devel@sourceware.org).

+

My vague understanding of what to do is: using Visual C++ +5.0, open the project file +libbz2.dsp, and build. That's +all.

+

If you can't open the project file for some reason, make a +new one, naming these files: +blocksort.c, +bzlib.c, +compress.c, +crctable.c, +decompress.c, +huffman.c, +randtable.c and +libbz2.def. You will also need +to name the header files bzlib.h +and bzlib_private.h.

+

If you don't use VC++, you may need to define the +proprocessor symbol +_WIN32.

+

Finally, dlltest.c is a +sample program using the DLL. It has a project file, +dlltest.dsp.

+

If you just want a makefile for Visual C, have a look at +makefile.msc.

+

Be aware that if you compile +bzip2 itself on Win32, you must +set BZ_UNIX to 0 and +BZ_LCCWIN32 to 1, in the file +bzip2.c, before compiling. +Otherwise the resulting binary won't work correctly.

+

I haven't tried any of this stuff myself, but it all looks +plausible.

+
+
+
+

+4. Miscellanea

+ +

These are just some random thoughts of mine. Your mileage +may vary.

+
+

+4.1. Limitations of the compressed file format

+

bzip2-1.0.X, +0.9.5 and +0.9.0 use exactly the same file +format as the original version, +bzip2-0.1. This decision was +made in the interests of stability. Creating yet another +incompatible compressed file format would create further +confusion and disruption for users.

+

Nevertheless, this is not a painless decision. Development +work since the release of +bzip2-0.1 in August 1997 has +shown complexities in the file format which slow down +decompression and, in retrospect, are unnecessary. These +are:

+
    +
  • The run-length encoder, which is the first of the + compression transformations, is entirely irrelevant. The + original purpose was to protect the sorting algorithm from the + very worst case input: a string of repeated symbols. But + algorithm steps Q6a and Q6b in the original Burrows-Wheeler + technical report (SRC-124) show how repeats can be handled + without difficulty in block sorting.

  • +
  • +

    The randomisation mechanism doesn't really need to be + there. Udi Manber and Gene Myers published a suffix array + construction algorithm a few years back, which can be employed + to sort any block, no matter how repetitive, in O(N log N) + time. Subsequent work by Kunihiko Sadakane has produced a + derivative O(N (log N)^2) algorithm which usually outperforms + the Manber-Myers algorithm.

    +

    I could have changed to Sadakane's algorithm, but I find + it to be slower than bzip2's + existing algorithm for most inputs, and the randomisation + mechanism protects adequately against bad cases. I didn't + think it was a good tradeoff to make. Partly this is due to + the fact that I was not flooded with email complaints about + bzip2-0.1's performance on + repetitive data, so perhaps it isn't a problem for real + inputs.

    +

    Probably the best long-term solution, and the one I have + incorporated into 0.9.5 and above, is to use the existing + sorting algorithm initially, and fall back to a O(N (log N)^2) + algorithm if the standard algorithm gets into + difficulties.

    +
  • +
  • The compressed file format was never designed to be + handled by a library, and I have had to jump though some hoops + to produce an efficient implementation of decompression. It's + a bit hairy. Try passing + decompress.c through the C + preprocessor and you'll see what I mean. Much of this + complexity could have been avoided if the compressed size of + each block of data was recorded in the data stream.

  • +
  • An Adler-32 checksum, rather than a CRC32 checksum, + would be faster to compute.

  • +
+

It would be fair to say that the +bzip2 format was frozen before I +properly and fully understood the performance consequences of +doing so.

+

Improvements which I was able to incorporate into 0.9.0, +despite using the same file format, are:

+
    +
  • Single array implementation of the inverse BWT. This + significantly speeds up decompression, presumably because it + reduces the number of cache misses.

  • +
  • Faster inverse MTF transform for large MTF values. + The new implementation is based on the notion of sliding blocks + of values.

  • +
  • bzip2-0.9.0 now reads + and writes files with fread + and fwrite; version 0.1 used + putc and + getc. Duh! Well, you live + and learn.

  • +
+

Further ahead, it would be nice to be able to do random +access into files. This will require some careful design of +compressed file formats.

+
+
+

+4.2. Portability issues

+

After some consideration, I have decided not to use GNU +autoconf to configure 0.9.5 or +1.0.

+

autoconf, admirable and +wonderful though it is, mainly assists with portability problems +between Unix-like platforms. But +bzip2 doesn't have much in the +way of portability problems on Unix; most of the difficulties +appear when porting to the Mac, or to Microsoft's operating +systems. autoconf doesn't help +in those cases, and brings in a whole load of new +complexity.

+

Most people should be able to compile the library and +program under Unix straight out-of-the-box, so to speak, +especially if you have a version of GNU C available.

+

There are a couple of +__inline__ directives in the +code. GNU C (gcc) should be +able to handle them. If you're not using GNU C, your C compiler +shouldn't see them at all. If your compiler does, for some +reason, see them and doesn't like them, just +#define +__inline__ to be +/* */. One easy way to do this +is to compile with the flag +-D__inline__=, which should be +understood by most Unix compilers.

+

If you still have difficulties, try compiling with the +macro BZ_STRICT_ANSI defined. +This should enable you to build the library in a strictly ANSI +compliant environment. Building the program itself like this is +dangerous and not supported, since you remove +bzip2's checks against +compressing directories, symbolic links, devices, and other +not-really-a-file entities. This could cause filesystem +corruption!

+

One other thing: if you create a +bzip2 binary for public distribution, +please consider linking it statically (gcc +-static). This avoids all sorts of library-version +issues that others may encounter later on.

+

If you build bzip2 on +Win32, you must set BZ_UNIX to 0 +and BZ_LCCWIN32 to 1, in the +file bzip2.c, before compiling. +Otherwise the resulting binary won't work correctly.

+
+
+

+4.3. Reporting bugs

+

I tried pretty hard to make sure +bzip2 is bug free, both by +design and by testing. Hopefully you'll never need to read this +section for real.

+

Nevertheless, if bzip2 dies +with a segmentation fault, a bus error or an internal assertion +failure, it will ask you to email me a bug report. Experience from +years of feedback of bzip2 users indicates that almost all these +problems can be traced to either compiler bugs or hardware +problems.

+
    +
  • +

    Recompile the program with no optimisation, and + see if it works. And/or try a different compiler. I heard all + sorts of stories about various flavours of GNU C (and other + compilers) generating bad code for + bzip2, and I've run across two + such examples myself.

    +

    2.7.X versions of GNU C are known to generate bad code + from time to time, at high optimisation levels. If you get + problems, try using the flags + -O2 + -fomit-frame-pointer + -fno-strength-reduce. You + should specifically not use + -funroll-loops.

    +

    You may notice that the Makefile runs six tests as part + of the build process. If the program passes all of these, it's + a pretty good (but not 100%) indication that the compiler has + done its job correctly.

    +
  • +
  • +

    If bzip2 + crashes randomly, and the crashes are not repeatable, you may + have a flaky memory subsystem. + bzip2 really hammers your + memory hierarchy, and if it's a bit marginal, you may get these + problems. Ditto if your disk or I/O subsystem is slowly + failing. Yup, this really does happen.

    +

    Try using a different machine of the same type, and see + if you can repeat the problem.

    +
  • +
  • This isn't really a bug, but ... If + bzip2 tells you your file is + corrupted on decompression, and you obtained the file via FTP, + there is a possibility that you forgot to tell FTP to do a + binary mode transfer. That absolutely will cause the file to + be non-decompressible. You'll have to transfer it + again.

  • +
+

If you've incorporated +libbzip2 into your own program +and are getting problems, please, please, please, check that the +parameters you are passing in calls to the library, are correct, +and in accordance with what the documentation says is allowable. +I have tried to make the library robust against such problems, +but I'm sure I haven't succeeded.

+

Finally, if the above comments don't help, you'll have to +send me a bug report. Now, it's just amazing how many people +will send me a bug report saying something like:

+
bzip2 crashed with segmentation fault on my machine
+

and absolutely nothing else. Needless to say, a such a +report is totally, utterly, completely and +comprehensively 100% useless; a waste of your time, my time, and +net bandwidth. With no details at all, there's no way +I can possibly begin to figure out what the problem is.

+

The rules of the game are: facts, facts, facts. Don't omit +them because "oh, they won't be relevant". At the bare +minimum:

+
Machine type.  Operating system version.  
+Exact version of bzip2 (do bzip2 -V).  
+Exact version of the compiler used.  
+Flags passed to the compiler.
+

However, the most important single thing that will help me +is the file that you were trying to compress or decompress at the +time the problem happened. Without that, my ability to do +anything more than speculate about the cause, is limited.

+
+
+

+4.4. Did you get the right package?

+

bzip2 is a resource hog. +It soaks up large amounts of CPU cycles and memory. Also, it +gives very large latencies. In the worst case, you can feed many +megabytes of uncompressed data into the library before getting +any compressed output, so this probably rules out applications +requiring interactive behaviour.

+

These aren't faults of my implementation, I hope, but more +an intrinsic property of the Burrows-Wheeler transform +(unfortunately). Maybe this isn't what you want.

+

If you want a compressor and/or library which is faster, +uses less memory but gets pretty good compression, and has +minimal latency, consider Jean-loup Gailly's and Mark Adler's +work, zlib-1.2.1 and +gzip-1.2.4. Look for them at +http://www.zlib.org and +http://www.gzip.org +respectively.

+

For something faster and lighter still, you might try Markus F +X J Oberhumer's LZO real-time +compression/decompression library, at +http://www.oberhumer.com/opensource.

+
+
+

+4.5. Further Reading

+

bzip2 is not research +work, in the sense that it doesn't present any new ideas. +Rather, it's an engineering exercise based on existing +ideas.

+

Four documents describe essentially all the ideas behind +bzip2:

+

Michael Burrows and D. J. Wheeler:
+  "A block-sorting lossless data compression algorithm"
+   10th May 1994. 
+   Digital SRC Research Report 124.
+   ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz
+   If you have trouble finding it, try searching at the
+   New Zealand Digital Library, http://www.nzdl.org.
+
+Daniel S. Hirschberg and Debra A. LeLewer
+  "Efficient Decoding of Prefix Codes"
+   Communications of the ACM, April 1990, Vol 33, Number 4.
+   You might be able to get an electronic copy of this
+   from the ACM Digital Library.
+
+David J. Wheeler
+   Program bred3.c and accompanying document bred3.ps.
+   This contains the idea behind the multi-table Huffman coding scheme.
+   ftp://ftp.cl.cam.ac.uk/users/djw3/
+
+Jon L. Bentley and Robert Sedgewick
+  "Fast Algorithms for Sorting and Searching Strings"
+   Available from Sedgewick's web page,
+   www.cs.princeton.edu/~rs
+

+

The following paper gives valuable additional insights into +the algorithm, but is not immediately the basis of any code used +in bzip2.

+

Peter Fenwick:
+   Block Sorting Text Compression
+   Proceedings of the 19th Australasian Computer Science Conference,
+     Melbourne, Australia.  Jan 31 - Feb 2, 1996.
+   ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps

+

Kunihiko Sadakane's sorting algorithm, mentioned above, is +available from:

+

http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz
+

+

The Manber-Myers suffix array construction algorithm is +described in a paper available from:

+

http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps
+

+

Finally, the following papers document some +investigations I made into the performance of sorting +and decompression algorithms:

+

Julian Seward
+   On the Performance of BWT Sorting Algorithms
+   Proceedings of the IEEE Data Compression Conference 2000
+     Snowbird, Utah.  28-30 March 2000.
+
+Julian Seward
+   Space-time Tradeoffs in the Inverse B-W Transform
+   Proceedings of the IEEE Data Compression Conference 2001
+     Snowbird, Utah.  27-29 March 2001.
+

+
+
+
+ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.pdf b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.pdf new file mode 100644 index 000000000..ce62ac48f Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.pdf differ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.ps b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.ps new file mode 100644 index 000000000..7172dbdce --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.ps @@ -0,0 +1,216419 @@ +%!PS-Adobe-3.0 +%Produced by poppler pdftops version: 0.26.5 (http://poppler.freedesktop.org) +%%Creator: PassiveTeX 1.25 +%%LanguageLevel: 2 +%%DocumentSuppliedResources: (atend) +%%DocumentMedia: Letter 612 792 0 () () +%%BoundingBox: 0 0 612 792 +%%Pages: 38 +%%EndComments +%%BeginProlog +%%BeginResource: procset xpdf 3.00 0 +%%Copyright: Copyright 1996-2011 Glyph & Cog, LLC +/xpdf 75 dict def xpdf begin +% PDF special state +/pdfDictSize 15 def +/pdfSetup { + /setpagedevice where { + pop 2 dict begin + /Policies 1 dict dup begin /PageSize 6 def end def + { /Duplex true def } if + currentdict end setpagedevice + } { + pop + } ifelse +} def +/pdfSetupPaper { + % Change paper size, but only if different from previous paper size otherwise + % duplex fails. PLRM specifies a tolerance of 5 pts when matching paper size + % so we use the same when checking if the size changes. + /setpagedevice where { + pop currentpagedevice + /PageSize known { + 2 copy + currentpagedevice /PageSize get aload pop + exch 4 1 roll + sub abs 5 gt + 3 1 roll + sub abs 5 gt + or + } { + true + } ifelse + { + 2 array astore + 2 dict begin + /PageSize exch def + /ImagingBBox null def + currentdict end + setpagedevice + } { + pop pop + } ifelse + } { + pop + } ifelse +} def +/pdfStartPage { + pdfDictSize dict begin + /pdfFillCS [] def + /pdfFillXform {} def + /pdfStrokeCS [] def + /pdfStrokeXform {} def + /pdfFill [0] def + /pdfStroke [0] def + /pdfFillOP false def + /pdfStrokeOP false def + /pdfLastFill false def + /pdfLastStroke false def + /pdfTextMat [1 0 0 1 0 0] def + /pdfFontSize 0 def + /pdfCharSpacing 0 def + /pdfTextRender 0 def + /pdfPatternCS false def + /pdfTextRise 0 def + /pdfWordSpacing 0 def + /pdfHorizScaling 1 def + /pdfTextClipPath [] def +} def +/pdfEndPage { end } def +% PDF color state +/cs { /pdfFillXform exch def dup /pdfFillCS exch def + setcolorspace } def +/CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def + setcolorspace } def +/sc { pdfLastFill not { pdfFillCS setcolorspace } if + dup /pdfFill exch def aload pop pdfFillXform setcolor + /pdfLastFill true def /pdfLastStroke false def } def +/SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if + dup /pdfStroke exch def aload pop pdfStrokeXform setcolor + /pdfLastStroke true def /pdfLastFill false def } def +/op { /pdfFillOP exch def + pdfLastFill { pdfFillOP setoverprint } if } def +/OP { /pdfStrokeOP exch def + pdfLastStroke { pdfStrokeOP setoverprint } if } def +/fCol { + pdfLastFill not { + pdfFillCS setcolorspace + pdfFill aload pop pdfFillXform setcolor + pdfFillOP setoverprint + /pdfLastFill true def /pdfLastStroke false def + } if +} def +/sCol { + pdfLastStroke not { + pdfStrokeCS setcolorspace + pdfStroke aload pop pdfStrokeXform setcolor + pdfStrokeOP setoverprint + /pdfLastStroke true def /pdfLastFill false def + } if +} def +% build a font +/pdfMakeFont { + 4 3 roll findfont + 4 2 roll matrix scale makefont + dup length dict begin + { 1 index /FID ne { def } { pop pop } ifelse } forall + /Encoding exch def + currentdict + end + definefont pop +} def +/pdfMakeFont16 { + exch findfont + dup length dict begin + { 1 index /FID ne { def } { pop pop } ifelse } forall + /WMode exch def + currentdict + end + definefont pop +} def +% graphics state operators +/q { gsave pdfDictSize dict begin } def +/Q { + end grestore + /pdfLastFill where { + pop + pdfLastFill { + pdfFillOP setoverprint + } { + pdfStrokeOP setoverprint + } ifelse + } if +} def +/cm { concat } def +/d { setdash } def +/i { setflat } def +/j { setlinejoin } def +/J { setlinecap } def +/M { setmiterlimit } def +/w { setlinewidth } def +% path segment operators +/m { moveto } def +/l { lineto } def +/c { curveto } def +/re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } def +/h { closepath } def +% path painting operators +/S { sCol stroke } def +/Sf { fCol stroke } def +/f { fCol fill } def +/f* { fCol eofill } def +% clipping operators +/W { clip newpath } def +/W* { eoclip newpath } def +/Ws { strokepath clip newpath } def +% text state operators +/Tc { /pdfCharSpacing exch def } def +/Tf { dup /pdfFontSize exch def + dup pdfHorizScaling mul exch matrix scale + pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put + exch findfont exch makefont setfont } def +/Tr { /pdfTextRender exch def } def +/Tp { /pdfPatternCS exch def } def +/Ts { /pdfTextRise exch def } def +/Tw { /pdfWordSpacing exch def } def +/Tz { /pdfHorizScaling exch def } def +% text positioning operators +/Td { pdfTextMat transform moveto } def +/Tm { /pdfTextMat exch def } def +% text string operators +/xyshow where { + pop + /xyshow2 { + dup length array + 0 2 2 index length 1 sub { + 2 index 1 index 2 copy get 3 1 roll 1 add get + pdfTextMat dtransform + 4 2 roll 2 copy 6 5 roll put 1 add 3 1 roll dup 4 2 roll put + } for + exch pop + xyshow + } def +}{ + /xyshow2 { + currentfont /FontType get 0 eq { + 0 2 3 index length 1 sub { + currentpoint 4 index 3 index 2 getinterval show moveto + 2 copy get 2 index 3 2 roll 1 add get + pdfTextMat dtransform rmoveto + } for + } { + 0 1 3 index length 1 sub { + currentpoint 4 index 3 index 1 getinterval show moveto + 2 copy 2 mul get 2 index 3 2 roll 2 mul 1 add get + pdfTextMat dtransform rmoveto + } for + } ifelse + pop pop + } def +} ifelse +/cshow where { + pop + /xycp { + 0 3 2 roll + { + pop pop currentpoint 3 2 roll + 1 string dup 0 4 3 roll put false charpath moveto + 2 copy get 2 index 2 index 1 add get + pdfTextMat dtransform rmoveto + 2 add + } exch cshow + pop pop + } def +}{ + /xycp { + currentfont /FontType get 0 eq { + 0 2 3 index length 1 sub { + currentpoint 4 index 3 index 2 getinterval false charpath moveto + 2 copy get 2 index 3 2 roll 1 add get + pdfTextMat dtransform rmoveto + } for + } { + 0 1 3 index length 1 sub { + currentpoint 4 index 3 index 1 getinterval false charpath moveto + 2 copy 2 mul get 2 index 3 2 roll 2 mul 1 add get + pdfTextMat dtransform rmoveto + } for + } ifelse + pop pop + } def +} ifelse +/Tj { + fCol + 0 pdfTextRise pdfTextMat dtransform rmoveto + currentpoint 4 2 roll + pdfTextRender 1 and 0 eq { + 2 copy xyshow2 + } if + pdfTextRender 3 and dup 1 eq exch 2 eq or { + 3 index 3 index moveto + 2 copy + currentfont /FontType get 3 eq { fCol } { sCol } ifelse + xycp currentpoint stroke moveto + } if + pdfTextRender 4 and 0 ne { + 4 2 roll moveto xycp + /pdfTextClipPath [ pdfTextClipPath aload pop + {/moveto cvx} + {/lineto cvx} + {/curveto cvx} + {/closepath cvx} + pathforall ] def + currentpoint newpath moveto + } { + pop pop pop pop + } ifelse + 0 pdfTextRise neg pdfTextMat dtransform rmoveto +} def +/TJm { 0.001 mul pdfFontSize mul pdfHorizScaling mul neg 0 + pdfTextMat dtransform rmoveto } def +/TJmV { 0.001 mul pdfFontSize mul neg 0 exch + pdfTextMat dtransform rmoveto } def +/Tclip { pdfTextClipPath cvx exec clip newpath + /pdfTextClipPath [] def } def +/Tclip* { pdfTextClipPath cvx exec eoclip newpath + /pdfTextClipPath [] def } def +% Level 2/3 image operators +/pdfImBuf 100 string def +/pdfImStr { + 2 copy exch length lt { + 2 copy get exch 1 add exch + } { + () + } ifelse +} def +/skipEOD { + { currentfile pdfImBuf readline + not { pop exit } if + (%-EOD-) eq { exit } if } loop +} def +/pdfIm { image skipEOD } def +/pdfImM { fCol imagemask skipEOD } def +/pr { 2 index 2 index 3 2 roll putinterval 4 add } def +/pdfImClip { + gsave + 0 2 4 index length 1 sub { + dup 4 index exch 2 copy + get 5 index div put + 1 add 3 index exch 2 copy + get 3 index div put + } for + pop pop rectclip +} def +/pdfImClipEnd { grestore } def +% shading operators +/colordelta { + false 0 1 3 index length 1 sub { + dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt { + pop true + } if + } for + exch pop exch pop +} def +/funcCol { func n array astore } def +/funcSH { + dup 0 eq { + true + } { + dup 6 eq { + false + } { + 4 index 4 index funcCol dup + 6 index 4 index funcCol dup + 3 1 roll colordelta 3 1 roll + 5 index 5 index funcCol dup + 3 1 roll colordelta 3 1 roll + 6 index 8 index funcCol dup + 3 1 roll colordelta 3 1 roll + colordelta or or or + } ifelse + } ifelse + { + 1 add + 4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch + 6 index 6 index 4 index 4 index 4 index funcSH + 2 index 6 index 6 index 4 index 4 index funcSH + 6 index 2 index 4 index 6 index 4 index funcSH + 5 3 roll 3 2 roll funcSH pop pop + } { + pop 3 index 2 index add 0.5 mul 3 index 2 index add 0.5 mul + funcCol sc + dup 4 index exch mat transform m + 3 index 3 index mat transform l + 1 index 3 index mat transform l + mat transform l pop pop h f* + } ifelse +} def +/axialCol { + dup 0 lt { + pop t0 + } { + dup 1 gt { + pop t1 + } { + dt mul t0 add + } ifelse + } ifelse + func n array astore +} def +/axialSH { + dup 0 eq { + true + } { + dup 8 eq { + false + } { + 2 index axialCol 2 index axialCol colordelta + } ifelse + } ifelse + { + 1 add 3 1 roll 2 copy add 0.5 mul + dup 4 3 roll exch 4 index axialSH + exch 3 2 roll axialSH + } { + pop 2 copy add 0.5 mul + axialCol sc + exch dup dx mul x0 add exch dy mul y0 add + 3 2 roll dup dx mul x0 add exch dy mul y0 add + dx abs dy abs ge { + 2 copy yMin sub dy mul dx div add yMin m + yMax sub dy mul dx div add yMax l + 2 copy yMax sub dy mul dx div add yMax l + yMin sub dy mul dx div add yMin l + h f* + } { + exch 2 copy xMin sub dx mul dy div add xMin exch m + xMax sub dx mul dy div add xMax exch l + exch 2 copy xMax sub dx mul dy div add xMax exch l + xMin sub dx mul dy div add xMin exch l + h f* + } ifelse + } ifelse +} def +/radialCol { + dup t0 lt { + pop t0 + } { + dup t1 gt { + pop t1 + } if + } ifelse + func n array astore +} def +/radialSH { + dup 0 eq { + true + } { + dup 8 eq { + false + } { + 2 index dt mul t0 add radialCol + 2 index dt mul t0 add radialCol colordelta + } ifelse + } ifelse + { + 1 add 3 1 roll 2 copy add 0.5 mul + dup 4 3 roll exch 4 index radialSH + exch 3 2 roll radialSH + } { + pop 2 copy add 0.5 mul dt mul t0 add + radialCol sc + encl { + exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add + 0 360 arc h + dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add + 360 0 arcn h f + } { + 2 copy + dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add + a1 a2 arcn + dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add + a2 a1 arcn h + dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add + a1 a2 arc + dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add + a2 a1 arc h f + } ifelse + } ifelse +} def +end +%%EndResource +%%EndProlog +%%BeginSetup +xpdf begin +%%BeginResource: font PYRIYB+NimbusSanL-Bold +%!PS-AdobeFont-1.0: NimbusSanL-Bold 1.05 +%%CreationDate: Wed Dec 22 1999 +% Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +% (URW)++,Copyright 1999 by (URW)++ Design & Development +% See the file COPYING (GNU General Public License) for license conditions. +% As a special exception, permission is granted to include this font +% program in a Postscript or PDF file that consists of a document that +% contains text to be displayed or printed using this font, regardless +% of the conditions or license applying to the document itself. +12 dict begin +/FontInfo 10 dict dup begin +/version (1.05) readonly def +/Notice ((URW)++,Copyright 1999 by (URW)++ Design & Development. See the file COPYING (GNU General Public License) for license conditions. As a special exception, permission is granted to include this font program in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself.) readonly def +/Copyright (Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development) readonly def +/FullName (Nimbus Sans L Bold) readonly def +/FamilyName (Nimbus Sans L) readonly def +/Weight (Bold) readonly def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -155 def +/UnderlineThickness 69 def +end readonly def +/FontName /PYRIYB+NimbusSanL-Bold def +/PaintType 0 def +/WMode 0 def +/FontBBox {-173 -307 1003 949} readonly def +/FontType 1 def +/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def +/Encoding StandardEncoding def +currentdict end +currentfile eexec +d9d66f633b846a989b9974b0179fc6cc445bc2c03103c68570a7b354a4a280ae +6fbf7f9888e039ab60fcaf852eb4ce3afeb979d5ea70fde44a2ae5c8c0166c27 +bf9665eea11c7d2329c1a211dd26bb372be5822f5ea70d99eb578c7befd44cdf +045a363056e5e1cc51525ea6fc061dcebb337208eff729802376a2801424f670 +0e7e6397b28f15bc10b40012b0a3eaeb2693e8f7f627c4c9c7c6c5bff105c1e4 +1b2b9e8f09253b61177e95ea219474796072f4b363fd772dae3a9d9385cd2163 +c2c8062ef9af240bc02404e5411b401d68ee5d983d33df8a63b6da7ed443e71a +e94a32ce1db15d759113b684bdc92cb4c920e35cb677534219abcea434fba862 +2fbc8237219af7943fb467616d86b4251b350647c43c8df74289646adecf0367 +7c838d720affd234259e947e6ac432993323e8fc0b1c7609675558ae470b19fc +ba7b5ca1eff86dfe4d9ef0356f5d57d03f0b2d0f449d6165b92c78c00162b164 +648ca123b1ffa8c2bcdf125864ccc81c7d58f19374b71dcdacc3c43450bca81c +364753c7d444062a98ce202aa990c652d540b1dd09459bd4818f7675d21cd2e1 +45a0d2670c3136a6c56fed36fa640520c0a880f954cf4bea74789d14c9b7ca0a +e91f4ece020bb0d3cf1890cb79d94675c25c7ca667199195134e70ef0db9949a +416f0a0443f1191421f2323202445f5af44871eed6956d3a3de21a34e302d41b +d7eef2a4023a66862fef89ca6386a8e47ba55e6f89db590cc810feb27b68238a +205275e7573968693cfe1f8a60b5af3fc965dc05bbac5bbd6d2ef74c4f140423 +9fb13eda8457a5b26248ca5ca4d3f896b0a93b69a9045b0adc25b43df700e90b +820f28307cc6f6ff2fa4a06a8a6deb8cba4cb0d136da07593fabc1c8ba1149d9 +1c422f461a429ece40b7c90417320167d99ffa9490f9abc3101f2359bef6c6f2 +15c5585c8733ca06a9cb793d618247757063ff41c5fce1a209ea5a138777dad8 +943b73186bc17e03fb06ba658e5b3305e39078f5de984bfe093ab3d782150e2f +8545c9601bd2a531a8196e157f8f18017c0331881abf07d6c21931fcf9b81c51 +be05d2ace462ab8899e2929f0d821eddb18e9887cb7e8e3ae0beda34ccd0428a +38c4429417cebce5ef4bebf7f64eedca8769d004d2432ded2240b732481a6da7 +458cd26e4730c4aecdc1078ee3fbaf6cd275b426bbca2d0cbd42eb7b100b1c58 +f043391fc5929fca7ccb7d2188b6cec6bbdb78079e36d67129c17aef9fa72fa7 +5357dda5167e3c0ddb4f9266f3ef69c2ce9b6191ba911c1fc740549496aa76af +b86e4fddc0f31f92595f8bc0bdd3ac613b16426d722c0d27822944899572bdd7 +96d248b1adba5ec18a7f0cab096e134c36b2fcccd0b2104e43b2123936dbf7d6 +e0706616a7676da73a30a36cfe2231fba5e1fe69952a2f0ac15145c5cff411a8 +b57db37742efd6b78096d0fc69fbcdea39cb05d034f31c23b04ee90fcb4484ab +2053e8dd69a2eaf120a6bb64bd55409ab4b6a6e92d305e40974b0df80009f4d9 +8fe9e8aceddb346f8e75941c1189aeb685f4f02d20814ad6bbe3c4364bd1c64f +9c1f111790dd74d635520606a6bc978b65ccb6e8bcfd8fdbae26ea62e36d0317 +5564995f2a07393255d7c3450303f5a26b783afa95962e9438fc3b10239fc8be +7809f48340aa9a61ded2e1de62b8ece240dbd1dc8be3819ac3e9aacb6e165923 +4a264036c6017b46af959f7e574185e66a3a161eed1f99b8496a9fcfac13492d +fe3f21bf1c0c1dd432fb523701060720730e9f51b76082ef4e72d2f2ebae7a00 +ecc0e1a922d6ded5c4f0a76eef3f6e157210a3a46a4a30114f032ba029d8207a +5946b8242fc9b939559654b5c9831eab6bc2f1a8cd2779f95698f26bdfe2e421 +cccfadd7e6684364a8ce71574f2d675239e404f754237da4cb564bc7b23d7159 +5b1dd8a0b62d6bc044fe0bd2ea98458fb2188b8ab1af6438e9693ebf939c7c9e +db285c87698d8eb206cf58d89a05e74a150ae0f0f0300dc1b3bcf1f3d6b73bd4 +70e604c23d313121a4cdcfedcc834feec5b1894e5384979966f496fea5cbf1db +7f3645abc9a5e9fe04f056648f8b5882a5399fafad915207a1434b7184b48949 +43aa2c3ae059f96905277ec06fc91c4536efe679c6fa6e71167496cc0d2f297d +d07159b01a02731e578879fb16f9ffd84768207629ba38f902230a03fc844eee +f9fb458929cc8e1c988b486e9cdc3d00a84de8bf078ba4f1c73cf88a2cbb20a4 +e19a8c02d1bd767103c08b8ce14162a9cd99d167fd5cdbf53bc39fa14cab520b +2e91ef7a2952c936c9825e30e3ed350ce9ad799b27b1091a0b2f3be2208838d3 +1bcdb3aad13a1299bd93b3f1a972c04f117f05bd9e5029b6c799eb25e3e98734 +a0ca4a814d824ee4ca5383c6eb8c6c45882289cf2a52934fb7764f3556eaebba +2823e5007f83f6a3d3a6eb0f7fbc3b91320de755745ab44513deeb65d6d81c0d +838125bc1480d494b8cdecb253a230fb950df5fd1cfdf3b8b0c56aa0168b01aa +a690593f22c25e6ea9d2de70b8bb93cccde841d2b923b4a70c7cccfdc1c400e5 +d3d71cf640a201397f09e13d27faec5d041b9d904467c4c573c6fb1820a55c1a +8d0ec1f6ad502bbda597925ab353429a5bbdf3df01066e5cb3c2bf2d19e7df4c +285766c06ea868f915e051139ecfe22ac9b8466a5da38e4e2f92c01428ac9051 +4930a9e9420c49bb8dac35d2a7e9846b0c9c8db992bd5dd95fdc0c8d5bf2e7d0 +baefc4ce8fe265e57b7b6c8c91e1797db85d90eb1888170744db916ca7e353bc +4edb9fc4a1d42013ba275d3efc76259e25860a3549d104880157db843cc75fcd +5a14800ab8743fdacc4c5ff064cbf3ba6e737833850e618ad9674d0fb01918e8 +ba87eb21aab2c494c6f6ff275d1501d78a9a97d2774ef4d5fbc8032955669b04 +69e354b9984fcf4c0b890e4e8a7796d3b7b3855815f5565b13d95b139c32ee02 +4a2057235cef0b98b1c0bb84d64921dce789c2eccf58364e832cc2bef739d807 +012512769f57dfefa384083415b668285db3f6f9e5c850205dba7c66b2da0280 +f771183b302ff529a691590321a6b06dff8593a28e83a7c66008ae45b2989da0 +0455253031ed2da983e9f1ad6fbaaf85035b4715cc1525cc8d7f1a3c0ec40f9c +9eca905a50a0f4b1f5db072918617213f7863ef202c0adf926e3be1c8307b571 +2c94daf13b6a659d0f613cb319e8782a0a2781b3a61227424ff5e554eba32b55 +de5bae43483ff916e37a129c877f10f7c8c0ec1fee0fe10b3fc813d976e6e54c +8ea8aeaa179727d3335f86662bd318260fbc314986a2f97f919ccd564e001903 +eec90c13abbf988114cd330ccd7e9fde42e218a9484b565a0cd7e9c1807ada0e +e6a7f916c5a38d64dae17faae3e84822e6c63bf32148ae3dffc010920509491b +424d27fc1970abe5ac799936aac46c4a98cf4c66b3182e73df72431e53ab1f36 +460e6c6a9b2db27e38eda8972835ba64210b45dd04a778d59c5751b8478312b4 +38012796f5a8be056c8e3a9e656bfa909f7ebfb7f32fa1ae99dc291b0f002a0f +8873351e9684adbefe40d607631559c78f5688a708160ad3803db743282353bc +20098c6212dfad417f106d92527506ca0c9a8864c1eb61997dfedbbbf1d052d9 +81ea593f2a6c4a90676aec9354a6598436d1de7e15e4979344eb976a917471cf +c85e52ecf3437ebb4b6f8e9b292b7db33be0a9ead500b9353f3f367ceff8dd77 +32b67a559e56ffa3b5311fb52689c1e296c01a362a5c33bbf54b84624f2373bd +2c25e90644683376f03da577dad1fb9a9903c5ee9f531a5f9da82aadb2098e3d +15896c3c727d60ee5de0ee1cefa7e4aa3a5336ad2f1a845d16bb2ee58c50d2e8 +055e3e11272224b23c689f2e7ca0051d10ae4d4514b89483ed8d97c2a77894a5 +640d45bc86b1f66de1fd24b08034e70a443cf1c3ee17f2e7c7e11da524781c7a +75a1f69de55aad4a309e27fc8ae9b1ce1c7d52f94fc84c59f37165e35f0f721a +9d3d5c3bcead85d8150408c1387e5a348d1f0f376b3cc2d24346280af119df86 +b62f46e2ddf46f38db4aeaa456accf3f29082f73e9c5f003d77d99eea3d5156f +2043e9b573fe34694910236ef3a1ce03ffb205406f3466e028b635f3ec5173e7 +482c796060bcb0efae62308e3624c466df5b49b1dfd3445233a03cff1f58bf86 +0a2b46225d1784e91f65ecd52504c8605aaf2a5dca560db5b8ce7eb86187e6df +677c977ab4d1fec4f124324bc896ee7d669aa295897fec0b881221434fae3a4b +1a3a1f1457fca374bca91885e74543ee919b881181642cb1f6c34ff817fa8e81 +18aa5e21c994d8aa12e1fdf5d6ff6726dd3d075dcd056f046ddd86894235d7db +fc11532518f8d8695ae74dfbb769528840e8c30572ad06d6ef7b0ed471db9418 +11ea9cd32b4ba6205b5c198bd528b06092df3f50b9714fc1275aa5105a3a7422 +823d4a30d7fd19f77bb2cc4c5df23202d6a74092a710a9a855d8059031ec6ec9 +4d4fc86b37186c46a5cd183a81fc12a743c7168837953d2b5202ade986b4b00d +86e41a88fad5ba0d91c150f4a7c396a02aef1ae9b96c0cea83b3306785ab3ba5 +39c49d9f984a08a9e8c06d282af94d87606d5601296456b6a0ef4ea8c88a1fcb +96cd1b1bc0e287adfd1b9aa1a8c8a7d4a6b14ed3b04b1f0532ed5d40238ebf71 +5bd8c8b032afdccd26a940b19a1340b1e93041b2265b8534c099d14f00b82fbb +2b55d8dc64691c3e5a6dd7c0cdc1212d0c80be2f454a7d8613d0cf64ac5bcc7c +64d4166bfda12bc262de9cdfc614d7dc1bc569109bb84bf469071963e5a576db +b19f3e748799d49c30612c1d7fa918d72051db6cfba44520b5b5689c87541560 +292dd6bf1f40f6a5af97c3ff71b1fb57cb36234be973890a1a610551a724abb6 +b01bb5bd1fc5191c9f99b389b6445a99de978b0d81e4baa92e8b121a1e1b32b1 +601a34dbe6cd348e56f59a92af56caa782b3b416958a6f1bb73771f35000fb9e +a55a132f9b151bea59cafa3a1cc72f7cd60952852c53379530e0a6bd4e9545bd +f78da021349902332707106bbb5d307960ea2bd811adf35b869bb210e44a5717 +8893af229268d805262725a0904bcb5ea7c17a39552a1f26283f54ae45449943 +5270b17b9afe2e0c0729e5f10461a8ddb85efc35dc8a32bcfebfdb16a0642e5c +c69e5a25a661cfbd1f3a9386aa2433b68a356f36404f96d97fff817b42a58a62 +a5fcb5653373df412068876f541169bf642bce8458297fb6a6e936d80af2004c +e9a248e1c92fb63b3e53caadd749924c390fd9f542496cf2347a3a429cc25917 +c31fc437291fa9856a7d3b2b6a5644d82e23a14d0281ed4d8f9dd687e06f23a0 +d0e8a3dab5fe6ded172ebbcac68218092f4480c7ceabc55b059877d7e82d2846 +b4f9e82aabc56f397be2c6b67040dc71a9d1f39b1a60c33288bbae4e41457830 +f8d8c96c8dce7c01bc6efd70e021a0c2d160a61b906a3ea551b7e3fe8c1f9952 +7e9583c6b6010e0887560f1c3e19e0be82efe91f0114e726c888f580d6b514cb +a0933ccde04de0872dd0e07b1a7cede67bf9f4e73400d118a6d600e13debe6f2 +aa1d895dcc127c76ff82e579a06d8a3a323458808bad060afc953c2158d476d0 +fe0725dee6886bde038e2726886d255dec9052e9ba886a318c75b8c7a218edc5 +78783ab8dd90b738b16cfb47ef8610f428a4315c703763d6b3dda570cd0a89af +4e6c215ea5395b13a5c1f0883faa2eb2d6de918ec5fef99c21758e4b6bf72861 +b684a28787b63d3ae7f1096b1c56e4862e7f3650884d0803db03362c587e2ed7 +bf5c7f2847bebe35327f1f7fb76f3cf7e9fec9a5c057acedf6245c724a8e754b +d44e028181b75ad590b3989a7f340fd59c3b75cc4a8e28b155b5da0fbf3cc358 +375edb0992206514347924c69ab28e30c707f24199767937bd7990bc70bd5849 +5c335a752c06bdd9f0520c6d8b2f5fffce931b601151b37f1be9885e41864e31 +1ea0f33e17fb4b844425ee7de31d839ad3a8609bfc9e393079b9a7891e17b48f +2e5fed17943313afccc55826cc0144c2e7ac9784261bb40d51bbd4467103f432 +865cd4b821dd5be8fc760171b49b70141ce2042376e879013edf8180d185d988 +591f9084536cbf97816291ee77255315987422c2c2489d209d78e0a2fd3fa71c +28edfc1577db5c080e7881848222220a63605f00205c205b35d0a017013ca099 +deb71a9ffd511549c61f9ee36a63ee00b0610d1b290e073b8a067dd91bf52f9c +ab53a258ccd29d9220a659e44717f84062d39dd554294996c46e69608ca111e1 +088494c6c3c0b75cf06c2b39a08172700b35d1efd0526d78f2ca5388056b02d8 +28962b456a44b1348bc4c199c2425217cee4297873ba2018259ad02cdb518b24 +023f4ffc5fd7c2b7b022d8f61aecd1e97bf78c7d0448611c0af788af2447d5a7 +b66b496dfde8522f9dc0ff8513baf8b19b51256da57159b87df032545708fad8 +0b15a0764cb951263a5008d1a61a1b69f171a5d7449f1c1d2cba92e9ae340e13 +ee455edc278caf37e5733a34a5c1b2206833d4ec3c41db8e8c760624c6031550 +7124f71f9d18399c3df46c5023a753a08ecc991b61acb6ad781cd9c258af17ae +33a2f8c5a86b5dae8ae1061893bdbca4e76473fb073cc9c5c3389e525553a879 +16c23e3fb51d65f3cc3bf3e87f97a02eedfbb928cd37a770e7e7b5413cbfb0c1 +3281f30eac6290a85ffe8ebf68a7fe77b4a68982d010a2284051861a35230401 +234b3278bd810686b1ee0c63104adfeaeb7ec79e0a4fae757018fc05fb12db3d +81e0400f7760b46fa0ac5f9e52583f2af265843cbb2ec1d1392ee68c7410c9f5 +87351a0f3247036a01080242732f5453b54a88de2d7515b5b570d94bd2b97f2a +d3894658627178dc90029c8e7131855b422c912c9fb6141439042b1df9f3739f +063d8d054258cb1c9cc893aed8097aa06fbb7e923b3756409c61b7cff54c2c87 +51cc2f11c2b7bc0be6868584f64bbbc22a1e0ed325b6c2064cc0ef2fa8acfde8 +6fa40b544ab6d2c360b6786c29b69e80d20566e1e25cbb075f9a687b428f4ed2 +10c028936c8f5e7308d2a3984290d96e5c8df5c959a563b4be5b7ce15c24d5d2 +fd6dfeee85e0e9595f52ef13aa08f52db73e858a3932e9e913f5ba674289523d +0eaaefd670f3ba4fb5a0295816fcfc042f7141c64ce577b103558455dbd0852b +730b2acb37b3115ca4ff017602f9428879e96a621a760e7961c006801c5908c5 +f291981da07820a11aaafc3f4ae613c7cb4424b0e1b797094ddd88829d5d4eff +d8613b50b2df38eef34ad0b05a9f13dac5b3c31d44c06bcc58d737f7d239ebe3 +eee1a4f981b35641482b536ee869389888c2eb28b56a5d0864a7f451f7d362e3 +d56ef1ec01fc6eb85c40c78d791b16aedf904c7d75890bf99bfef9783fdff55d +ee19cdf9e0217133b8af29fd87ad09382b8f64a6690f4ece0ff8116d44bac576 +be9a602084c63bd4dbf56354dfe69300cfcbbb99ae3c8226d02b1bef022851fd +896d83549c594e8fa709d23465207626632319b253dbb32a74155939d9fa0631 +8aaeaf9c26c04a55e1fe935fc5d21f1d798107a625fc25cb90d2ca72c31b3eb2 +c2aef7615eeb8c7f0e7f767aa672ffc236271f98c01bf41acd72da9d108792e4 +66ed133eced633ba0fe7503aaf68ebb226ed6d0e18561eb03c9b9763680f9295 +7709b653d3940ddc7703da6c3fcd893ace04627cc6bd92b65b80cfba4d0a50c6 +d48c5239a76bdaa4319fa9f0382e5ff6bb51c5a390678ef4bcb6a56a13828f32 +fa51ba7bd7d6a11405b0873d4e96b93fc693f21bada72f9f257d89630711cca0 +c3a78e2a0e5735617e77a7a77881b37d77877df4eff9da9d465239f1f2dfb5dc +9351a5dd8216e98c15cf443250b85be6a463526d8aaed42fabc1cdc095ef9e42 +8f956a2abed2cb7fa127f49bd2b5accf7ed80cef4fe96fea42c0ed4991bbb734 +596379a991607836c6ea74bbc359ecf2eb52d015910b847534a519cfc32d5216 +9510940a9ded08ed2a83fe52ee1275b05d19666994836add094ad38cc0a3e081 +bed96e0cec2d8e17d51bbe3a63a34884da909733ab092c9ce8d8e411ca3b2831 +a022e5a3fd1abccb902647e484833b8181d1b9edcb5448098e13b5ad289c9aa5 +8e4726f0c2df0ceb089401871c26c7ddfc5d5cbeeae249871ac5604056b69e96 +3c1bf9b8ce006b701c9523b5b9b145be6f6c7b9e513973df94cc2d37694850ec +e54c80d2ce79309ce51515d2ba0d44855014654d1a999cad1a5e9dd53a34e44c +9cb32ea91176d5c3294e3064016e8554b9b6c6d2e6c03b4e655bf2a7957d95ff +01cae1dc020e577abe5775f656caf198f1073b7bfe06ea127ba3b1edf4784917 +51d41bea93204e6ad3aada6f2415a8bcd5c987b6629874253852ca417bf6a259 +27b0e7f34e0ed0f9dfbe1be2c64d805c2edf0bd62c77be4224613f2e788c56eb +0dccd0a467bb30d529610944338ea0b832d3ecedd85ad4da22ea2b47e799a1a1 +1cd56274f7dcd9a66a32d8509f3d0eb4c4a160a723a9e71f504da5549eab101c +70c73efbf1ee0805c0f8e394f94f3e6623eb2fb5896563404fe4a7f0d47e802f +698295ca19ad813ae552e8dce8d6f73a7e676308a07f230edb99902132ca5b6e +0e95558764ff3f6f854cc29b338a5e1bc14c9468b5528f5b5dc8bcce69bcd0b8 +e295f3ff96dff56779de49a1157c7d1fe777e3a94cf95e3c707d6c1fb41b279e +9abf7b4077fe611a1669c689c1d9a81c933e8075af7b5b440c24318b26a1206e +92266a64a0577abd20659d83fbc433621c7a01f74c6863d43b02651ea96fd0a1 +e1a553a05978a4fbff7d591254a5e3a2642c0eec9b4a0988e4aae449964323b7 +9bade117a3ce68969f62944d027dd0bf7ff0f73b0283c8843e9a3001bd096baa +f61833401353462890af71b05b84b2e8a8a3bce954febceeaf5c10ec704a68ff +24364e70e1749dbc2b1299887309e014f82b805c37aecf05fd413220403e48c3 +3cb49d0c265ec2511211833f8c475d7bdc3959c3378597773f02b5d41fbded8f +eb58a06037a79c3424e56d48a1cf82672026b3122e379a0012322a325bef16b1 +f95958c7b22cce273e8aaa1e8e40978abf5626000a2563577e164b89e24e4d06 +483f503454a37fac420c7945ad53a6c102f1713208c99ab6ccb0bb3e50a70b6a +38b38bce6444a7951cd669008776a1720790b0b6722be634f90120f42e3b5cdf +9007d9b8fcfeb1c2042367c5f7445e69bbc19cbea5b305b1bca2f6398211ca07 +96d5bd57d23639b1a7d7a5f50b609dff3c7622e922714dffc7dbd6b820460c67 +e8ea1c017e57fd172fa3cac1678df44f20e718542342847e33698d382ec37f60 +21b7d901ca384beec87374854e4a1372610ef8fe5c69a141b860b5a9c51af0be +8e33cd57dc6f1d2fe672e72fd0f370cef74a02fef6a0e6303b7445efa72758ff +b98b3549de42d525c166c92b652ef1e71c92b0ed3c1ba2418dd13a2d301ea894 +7b3d54d469676944a58f147851fcd8500747899ec3bd885f25e1631a3dedd10b +4eeb87c74ac62e316d2ebd3aa0ce027e91b39450ea3e30cb01baafab02ed0567 +cd83c482d6e92d7835fe387cd6c050d8f4f2f64b95fc44e1101d89e112b971e6 +61d975a98183617bc942f425b837e4e868136b17ecde0e1380ce8a52b95881da +2bf547a37f38c603e43ae53f32b5a347e4b43c0bb86d8aaf447bb5f4c983616e +be1a48c7dc636242f20e876baef484506e2888f0913d8b76b1086b60409a2a03 +e82ac9970d6c120a6621bd68250d88e95c01abb861af559132e6d9b8f5abbb66 +4152d65779019e678cc86909e31bee3d13a16d764998d94ae5df24f02fc8153d +72b41953605ca86a99bc3dd05ca620e7a28d51beddff28596ec8eb878c09c041 +74baef8d2fc52b3b0c55e95b7482dde018c706a3fb83b945d3df90cffeb1380b +09c4576040668f537083afc50a1e26d28c4d58bad52b17964871210ecb2f148c +daa07db5d3780ecd1635cc5d5dc23867a13e152872c78e20b95f11a4afb8508e +813f4c580f80546b2d5dcda546a6fa4b28a906511be9ae09f3adf926fa237825 +ac9f250d275294c5f21466af681e4e61ea6915d623c7d48837d0bbfd7f893a2c +d347cd7514ace7badbbff683aa9c6eef46d1c830afac64a9f64b95a6fba4bc48 +a33135b70cf12c2eb19c2af6a45b9be09619e4b89f47ef4b9d3d234466822c1f +3ce559a85fc52ac8aa947f981fb5fe7605a373f5484d4929932590eb79a504e5 +ec35c263a30ab3e50ca900c2488baf5f1c1c23cd42d6401bfd7b09172be16f1a +df93f41ab0b4465a4f1e2ab556078dbe76729d69434690fec8f59894a77d3b8b +bbd3a87346b6706fb127da2f6b458208befdd75d68207bc88ca1f2e36b65d170 +922071549c382790beee82ba0dfde07d7d5f58ebd02b19feeaeb6aaad59792cf +461d467665cb3a0cda48058fb5181273c8632075e2f11f8de7181373a9b73901 +a816cfde3e2029a04b1139eb306132f989f4a2e85cbebfdc52bda2e88bd8d1df +3f331602fe0fc1802abcb35b8e6dbe5bff9740a4af24077a725d17660fee662b +209db93c54baffeffbce92a9e2e696d5f56f5d7c81b29cd00a59ccaa389183b0 +ae2507f0ec1a9e224097be40e0db4c8099a96a858425c6a680365704f39a05cd +4887bf94f49e4f8efacdab96877a18272900237356ce576042dcb16e5851e1b9 +4fa0ef754cc9d84e91486d771871151a5983f158b7e05cecad73ba064c258397 +cd00cd6b8cecbb898c5d4609531d387ebf15a5c38b80efe629bedc9314736e90 +d4117c763f18dda7974d519ef1bef9824934159d0fe29edaea2173c69c56967e +ff9c37eea1e8b38eaed338699c6a3763c6353dfb2584f6da9923ab74b18cbe05 +278a5ed2936b193c75c986e8bfdcc63904a25ecb4a04e998ef8789e9c3ec618f +1fefe74fe5a23d368b563579e318bbe956f29d191748ee26bc883bec714e1f8c +88c98dc012b95385e894919f1de5afc62c9c513014d6105baf24ecaf88275909 +4d13079cccc3f103d6751b4f79b785577686abc760a6c56bf34db0f2ac3d0b82 +ee63f9e750c7790d7a3a1626d66e70d26617459a8103e08b6f14af71c017d3c4 +e5b4450986908ec345af9bfc4d650cf35f337026ae940513a9b3de95df3e16c0 +588a59a7f2f1d5e2a418410b5e2fcb4692998921834fa44f30f2117228005347 +9a3a82341434ea71f82d87e1bbcaed725ede9f6001ae4c8651da9afa36b3e6ef +07a8b311afe1bda98e3143c8e2417fc188bfd48627d9b6aae94f510054dab99c +12fa0d5d73069f48c86391d27e37265c91ab1c06ce4d4bf0af63db65e16e783f +7dc649a88967284c9d9fe861add619a3ffde0a31a5719bb456d1ab8010ccc8ec +89615ae875db7a321398ff923c088a6ab51ffe2fd21d3541474d79f07e536709 +46d1a8c65e8dd6ba6f19410b76ee7b5468462b9aadd9f8ddb68c32b08b0df0c4 +f3b909fe714f453bb1ebe914752c5eb5f68377a82e5d5b90abc19402bd589b43 +05f905efc12878733902c54391c267fd81aecb8cd692aaaac3218d34a4c1612a +5aa9844d171e6ebf94f4d8900236e8e27c5bd7460fa1e195c1077da5918afdc3 +90abc6db247885a42158c3cd36ee89d82cbf2471c6daf51120ba3f6937d537e9 +370af7ce73f3b50b742ade8264df9288120dd74094a064909c00764e9347d2f9 +a3f92bb53d8263053a3082809e04e9bc7c9f3b8a7c97c5cc1f9f886115676a18 +cc04c656aa33535e5893b8db3ba5d627f8810048b2a7a28e6d1374afd6af6980 +ace96ee05d890339773f6dbdc92f2f840b50770213bf6188dcdd1bad8d527e71 +9692ab1dfc47e7673c175a1b9841d56e2e0b30e8685b01a68ce561bfc6463a6a +d34557d05276f7befbc1fec7bd56a18bf0292cd25eae57450b3b590e60181258 +4b35e2004e7b1e27f3b26d7108a03c94dea662b7342e38f8300adbd92261809e +bee8ec971a7f2f59487c89357580f9aa8145a1825573f037a0ade5b98be24a86 +530435bcb82e17054f67fa873946c732c8840b9eaa9130bbd360ef27fe72ecfb +b421627d2d52578373ca7ef9fc6f850f4b7f22e6501378de0a9dd56f5f5815f2 +7ea81d8ee3a4f7b98e59ea1cb3159f5816fa703b18f03c5b0aafbbdcc979df41 +7258af2ed57f7da62871c0efdab55fafcbda5fbef92ce65aa0ff37b92ce6c953 +a9d92a8c6e02b8a1f9a9f0c66461c5a62097e12e9f656c87ae283e6f3b63ed10 +a6a723316b9beb28b62a55d372b9a22bdc669b51533c5690e593f2a409619b2a +d73655a40a33e83c65e66f18a40c8e77b048674fad760b9a7d86621181d498b5 +59707d36440af3e015851ce43cfad5d1d96e9274ad714ef46cac1a02974245a8 +d25d894caa256c320af31f954bf574dd95bf32e5841333063d32709b93b009fe +e680d5b2bb5f95275d118a085e98506d0272fd1b8220a2343979bb1467f9006a +1f17b2ae2941413683c3cbbaa1c0a3aa55193d46a2573f2cbb8b7adc7e74d0d0 +135dfa18405bfaeda37f3d4787a965192ca64e4462a0c701de5c361088b3319e +7b5d19a14337068661abc7c36002ff4dbe90e7b655b8e06bd70e283cad1c5d88 +de63628c638083b303ee6b038836893707f6e1121ef56292a75bd9301d987ae1 +ada2acdf61ef74f2b3dc4f87c6374254f865f6e8f6c0933c54265e9a5cc7ef62 +432baad5fa08dd485c3b1d0e75ffd5180e99df967b85861d9710ff294e93cfc3 +7ba6c006164690c10339aae9c1113cb48687672e8a2dd88ea9af6d0cae13ac05 +9b61095b999c87bc3c80748fe6722bb76818b2339223dc051a4938f435b92629 +4395dc3d2b9b3a0e370363535d960735fca855ffcba0aefe767732f7991c5977 +46fb683b9a0c11fcd6a3eb370bb56d6611e7c20dfa1d9fdb3b90ef31bf0a6aaa +d8bee6d7ceb116373e74f072d2c61b646f0da308955829be7578d1909b03c4d9 +307709be75ab3d72d0864af89bb713da0938f038ffb3459b793d06bb37d6efd5 +5d4e755f3403c32c28201fa5f979f51f3a9d4c521480e58ccf06cc60a056a5b1 +c48f27872ef36da126d580ec0520ee9d252cd27c207b6a12b27b1861ae0debbc +21e549144604b277ac8e7b4caaf5f7220d67fa9a985001488c128e1a4c9ebaa9 +de54a13cd4baedcd50653b73a6514ac47bb5411d8094854212c9219caa4e4c7c +447324ab35edc9ceeeef505fb71a2348c3be2082fba20b8ab572bf9276e84e2b +0b328828eb0c636750dc104e741c5df9caf3808a061484a23dd0aafcf5bfd1a7 +319c50d09cb55d73c87d3ab59e74e29de58723ea32cb96a0b497e2e530b54b9a +355a27d988ef4387d8260863e8beecbcc27e4b051961aeffcb8475d7da9bdec6 +42d6a55f06ae9af2450545811fc6486c6be309955c53121db95ac255263e93ef +3adb9e07e56b1133c491b550a511204ed55c8dd911e2fc0669c90fd904267f0e +79d56ddeb72895002a7f795349da2137b6eedcc300c1206dbdfdc3a52f71c86b +8141b63c3d33957c66a9e074bfa703ba2344d802028d787878f9fea87fa9ccdf +f4ed49f4daa6e6839fd64c91e60f99b8e10652bffdac46169c413a36e8105d8d +9343496c1a9b5bc33cb5e573166d4097fb4f3f5517b38f9298de2ac6d51121e2 +0eb9f07ecaf4d70c56a5280948c67e506e47fe9d3465c7cd156e5768b70f694c +57c11c80e7a4d1417c25690197d058d02216a81d7104ef27003dadb3ed10c742 +4b03f54aeba13d17f681fee3a8797754348b134d89572a2083225178a9db4466 +ababce914cf2777d3ae7effca5f4973eb2945672c0218c420173d8d2fdb8d60a +a1b40773a74f904955e7991bc973d12eb5bffc4dd0032b1a1397cb5ba3b431cf +92b76b1f7bf1f9eec8389e525553a8791692a9a9eb495822684df34bc5209953 +1b38bc4875beb62a391a8e0fdef5b0ad35190c44c782e374e3ca17b9f5e2f5b7 +c8566acd0df90ef22b50100f501a80c17a32ef4eb28da320c20ff407fa116404 +aef81d37037013406eb51aa024605e01257fd78c625bd120d4bbbed7bfd4f95f +a3c3088a0fb237d44fdf4aa0bff28254063416918e276e7b68c545def20f896e +509cdc2c31b65668200637bbfa587b547b77f81bad98ff0b70805d9c6fd17abd +f107e1d39d98d9ba1a7bcdf98ed607a3770508ada6bc25fcb63f5bb642a4e028 +bed525fcd1a9dbf1e1520c5164a53c0ddb1b3974366b8feaaf766f02a4085f57 +948854365bad4f6cf18fc871256f9ba3c60a79f3d08617f6a483fb6b50ef2dd5 +0755b2b824dad8935247fcff268b7cd152cab7e7a876b381491589f3d4c65c50 +3353d07c94786db7346cb89cf5350b585cf890fde7a891e7646e5fb912b71db0 +10e73de1100848dd1bd100d0daf43c4bef2b43440513be6281ea0359ae0be4ff +a861b07d06a311b97028daf2fcfb14eb8e8f713bca854befa5a46172dbc0dbd4 +448a8c20ce02a71d33457d4c52704733b90b005b03fe89fa90b73e747f273118 +4bc20d38fca2e51eb0d5bd5454a23e0fa6616a330d61e5a487aa516daa6ca1d7 +b8cfc260bedbfcdfd3d3d0c115359c73a67c1921df252899298bc9015a6c96dd +e70e6dee29597cc7c111a565a6877ec4efe425783478bd79ae97b5d1bac5d10f +5cf77c6c026966155264c7ff1dd30028f21bfe0b7948edb1710f30ee09747272 +81aa09b166177f5e507ce6a09a6368505a1d7b58d5aa2d63dac1b073442be702 +9b2ba6a5a6073bb8aa8c6f741e1b135a73675ef22ea810435f4b1a899d180e2e +be37106d4db6ac2c01d2d962117c4b6a62b1eafdd923d89cc830c00f4cacf98a +3e02d0863389d2dd73db37d8af50cee306da798989047e47c165d47926ec533d +5e1f5fd0d039ff2fb3e01c61509b3ddc62754cc30b7946c4a705d56f16730b99 +8a40275da604170fe8da1f8d8c5e4a393c701aa708f916fb66939adf2546097f +2ad583fd795ad2fd059e9450c6df7be3a22f36c359ddcd8de44e1106b1edeed8 +65e317c06382f6473e3d15fd731ee92b39d3a3dc42c9107ca046febf2ed214f8 +014ea9efdd078b94dfe6a53e5357dcb99a937583a89b90105349829575a5f474 +ce7519336dedef19083bf6d9312f19c78f09085db567895a10edb5a6cfbf3532 +5cec8e3db206815af7bd78c8dcde6a910eb9232eea4b9e68684be8083f335761 +916fc1f64c649fefda1b3fd499e851cdfa7ad22acd535a04986f35b62c2adf2e +74519f043c7c1864c6b3a9d5126fd87c105f123711b560531f46628f872b085d +ad00961bf770b386b416ca2c5a738ba54f7a7a2e234dd97b2918d007c135aabe +9ba541eaa0d19c216b5a6f245cd33a1666e26bcd5ece41bbd5bfb3aea9511bd7 +da27388e8b62f49f0b4db0b190c5dbb7bfdb1fec5a786bf43783cbecf09d8056 +15ce4179710883f8fe7bf4fde22e8a7b46273172e9a4751b4fdf6ec099e8d685 +32a4c9c4708902285df499de4a6b0e143d72c13b747461bda19f5e3a34f1dc8a +96dd2194b6083c75715f9f5261947ef0eb21c496effe37f407f45c5f66aadb99 +cf42aea5fab6694a64cd89daecab44bcc134280a3614f02c432b98054ff8be39 +7cb464de7b1ee896f798a90377bdd07afbc9394ba931c3fe490d11fc60506a3e +476d86bff5d3d850683942744d651355cb081b39d8d2147409a4bbf3ec699da2 +d79303ca40261fa3b6ab5b17ff331eb3d9f01896590905a2c7841d1f4b1f85a0 +b4afeb0183a61e21958ab3f541d321ac6bc81dafc5dc633cf1f4231b0e4dbc9e +bd3c +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F9_0 /PYRIYB+NimbusSanL-Bold 1 1 +[ /.notdef/.notdef/fi/fl/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon/semicolon/less/equal/greater/question + /at/A/B/C/D/E/F/G + /H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore + /quoteleft/a/b/c/d/e/f/g + /h/i/j/k/l/m/n/o + /p/q/r/s/t/u/v/w + /x/y/z/braceleft/bar/braceright/asciitilde/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/bullet/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/exclamdown/cent/sterling/fraction/yen/florin/section + /currency/copyright/quotedblleft/guillemotleft/guilsinglleft/guilsinglright/fi/fl + /.notdef/endash/dagger/daggerdbl/periodcentered/.notdef/paragraph/bullet + /quotesinglbase/quotedblbase/quotedblright/guillemotright/ellipsis/perthousand/.notdef/questiondown + /.notdef/grave/acute/circumflex/tilde/macron/breve/dotaccent + /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron + /emdash/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/AE/.notdef/ordfeminine/.notdef/.notdef/.notdef/.notdef + /Lslash/Oslash/OE/ordmasculine/.notdef/.notdef/.notdef/.notdef + /.notdef/ae/.notdef/.notdef/.notdef/dotlessi/.notdef/.notdef + /lslash/oslash/oe/germandbls/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +%%BeginResource: font XDVKOU+NimbusRomNo9L-Regu +%!PS-AdobeFont-1.0: NimbusRomNo9L-Regu 1.05 +%%CreationDate: Wed Dec 22 1999 +% Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +% (URW)++,Copyright 1999 by (URW)++ Design & Development +% See the file COPYING (GNU General Public License) for license conditions. +% As a special exception, permission is granted to include this font +% program in a Postscript or PDF file that consists of a document that +% contains text to be displayed or printed using this font, regardless +% of the conditions or license applying to the document itself. +12 dict begin +/FontInfo 10 dict dup begin +/version (1.05) readonly def +/Notice ((URW)++,Copyright 1999 by (URW)++ Design & Development. See the file COPYING (GNU General Public License) for license conditions. As a special exception, permission is granted to include this font program in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself.) readonly def +/Copyright (Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development) readonly def +/FullName (Nimbus Roman No9 L Regular) readonly def +/FamilyName (Nimbus Roman No9 L) readonly def +/Weight (Regular) readonly def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/FontName /XDVKOU+NimbusRomNo9L-Regu def +/PaintType 0 def +/WMode 0 def +/FontBBox {-168 -281 1000 924} readonly def +/FontType 1 def +/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def +/Encoding StandardEncoding def +currentdict end +currentfile eexec +d9d66f633b846a989b9974b0179fc6cc445bc2c03103c68570a7b354a4a280ae +6fbf7f9888e039ab60fcaf852eb4ce3afeb979d5ea70fde44a2ae5c8c0166c27 +bf9665eea11c7d2329c1a211dd26bb372be5822f5ea70d99eb578c7befd44cdf +045a363056e5e1cc51525ea6fc061dcebb337208eff729802376a2801424f670 +0e7e6397b28f15bc10b40012b0a3eaeb2693e8f7f627c4c9c7c6c5bff105c1e4 +1b2b9e8f09253b61177e95ea219474796072f4b363fe05fa763773acd59cb757 +ae119355777a1bfbd6751f24f58ee0133199ed331e67ff4101e33040d6628f4b +77ee87860b8e32a4923e2c1fca43cf544a5eb1bcd649ebd836daecb23e3a986b +9bd8398e690be6b48bd6479823a435defe1156284048c4d49b5a869164485630 +3810995159568b3dcf3734b11a3f25453e0e8b40b080c9aa94e140a58d5ebb74 +7d1e083dbe00ad5498c3b19deb502dc63d69032d8d31e6778af4713c30404059 +6a862aeb8cf607fa52a9348e3fe23c1a0296ddb41642aacd6aacd2c6d905073f +98b58ebd11af774beee32533fa19871148dd6db41f3a8c499f25f37cf3955eb7 +bf5bbdbe984535820dd33f60cfe7c2b44ba6e10879b3c65948beed00a84b093e +8e4ea07e34955aebfd0ed462afc5b4b42c5b8be85ce0ab1b9cba42969bbf8a36 +e2943b1d9b20f6ef3416e226763f55a196ca0d86788a6b0ed38ec5b0124ac901 +f55f2f67306ce94aae5809b2203bbb5a8b185b66b2f8a18a456d028f62d8e17f +4cfccddc0743fb02567f0294ab77dca0b9708b262570e3097c76769bd590a09f +ad1523e3bd1ed5fd8475c0b57b95011759d1a55c70b39970dccf76069cdb9690 +68a4626bc863ae1d579604011354cd3ebd51b54a1ba9789f7678546bdef64c9c +51cb6f654c25578c3b4b7c2bbfad476423ab58c57f48b2a54c9d44ad356d106d +8186a85f8578b1735610f6767883701431f5a2503341005020b639f45810440f +f341eda457f8ad2213058a3369016452185f849ee25140060264a04eda7e04b8 +afedf6924f2da0adf944e4ee346e33735f6e78691634e18c4179f28fdb673ec1 +6a2b093eec51a4611030ffe1d4c1a1456e3ead051b01c94e5d9ee94c855cf31b +b8e544e687f2e2a99fd8865ad44eb929430ed39ac0985e4a5c382e16aa2d6ec3 +3b396fe9643124dc587fde09d3d867e9efde49c283dd44fd33b04ba4eacded81 +b3e7d3f7c09d565a6412ac30fc8e81be8821a9031850579b02cefe615c8e7c22 +61a77e73f5382e58ae160043a5defca7470ea62b90e0260faaf5a97a7254b091 +2a187ace29ac6adfa49c7d6f35cdab93ad32553137363ba2f0dcbafd40fa8ffa +7747eb9bb51dcd01291bc073331531dbdcea7db24c9a0302c9896a1c2cd0191a +d88b33d0b0352b356c93987ed9613720cf2be3b164c6a4a3360bf41c9f178831 +62fb73ae514d9c57675572e8c1f93313fbd1b05302f57bbebaa2e76feefea0b8 +9c83d511164b53b481bc920f40d59d152bb1f5674344801f0dc7e71ca5de4e24 +cc79207c66d0b692fe7c1c258be75488f2a0bfd5c81ec5bd0585986d0c5d4575 +82e9ce40b7477b87facaa826ebf147bddb1dc60788dec671c199d18dcd2ca48a +4653963ca85e8944074c501c8143685306d4f133037fea449b0d1cb4ab3bce89 +04a311f9410984d754a3509f51d89a4ef73ffa7f9f3bccd80daa0a34e0e10912 +b7897005607925758237d0bd3b92ac9669b1a1dcf19ff0864f84a993bf7cf266 +1d1b3981fbc5e4fdc3a5b70bd79bce35c6fcfc0a5aca0006433bc0c120073e96 +dd4ae86f022260fcfe119fd4655c3bf00be48c470b0d86e721afca140fe6bf31 +836d578fdae49d71676c77ebe2d09016e1ab71d7c681c8c0565cff9b73d79920 +1ee2def2f16d65647262f96082dd5c44fa3993d3bd1d10c217ea56b73b38428c +767dd9b71530c5f01be2d2611cf9644c28f3f52fd814e463358d70de7bc6bafe +cd377b48633d0107b05ad2472ad6652a1ad30c39adce69ebde3aadb1c5fcdaa6 +96fa9b3c3e63a7c4dac907e3b5cb7a3713505c5ad53c8dd8710acdb3786a919f +b356cc2695cb227540a5f235ae1ba3c6f3547ff24606651e5887fe889cd8913d +de9f3b04019ce0d724c1f6521925bd4fd8154f6f4d640ff94a0b0b027e483f9a +bd1188942cdff486f1a234fdf8adeb552b7e7e10aa577ed3d559010aea480709 +fa1f644fe5b7ca3479599a7e708dcd3ba33a6b2d640f8e39492565965e3b7c74 +bc8c48f3ea9a6048e86197146abc446788a3c83782f797cd278ee1b740627726 +3e1703246bc561faa060de93d224ed3eb1bf548892bc64806c4e9186a2b276d0 +fed43a3021b5a54530de20db8168d44e1947cce7fa1dc8f7927a591d6798c5a2 +b51185c3e74bb6ac782af6f089a4204b6379298617c8f67e38900ac231610ab9 +79400dfaf270c91679c516d2062b949a8d91bd5c8c1a0af1e7401489ad6e8101 +b9103cb5f50dc53ddcf2b32afa218289e9f1b5e29e5c5a2a0f67238558343524 +78cb11a68006685e13f8b9ae54732c180b4949f09839b935b1f7a944f1d4bd84 +a5074b583202cc4aeccb4b8e18096e258bff705476440b9864e746f18703321e +5d5e2f8ca5e2d07b195779f6a0d6a731116f1a26a484fb0d9931dfaafef53b41 +e56e00f32e3952261c0205afbb6f2afaffee7cc1fd39b2e108841f39dc8df97c +0f776adaf41423b47c551d48add01398dad167f4590dccc3106a5a4386499462 +78831779383abaae807b3b03b5dbd4b973219f2d1d19369889dd72e446ec95e1 +37017fbf85f4064f81f27cdb4f9117be248a8d5a65225edca22e833df98da456 +98a428edafa84085c323399562865aaa8286eb5dc63dad6839b597386e0558d2 +11bc45d66e0e60a86c968519b8b305d5ba7ebc2fad7cb5004559544330668c1a +7b77dc9762baafb4190dcc1aae670824824e00f023c574e1c017e33650e24fb5 +d4ad701ab8d93f0fd91867bd21299867f966e93cd621ec0332fa04a2a691ae0b +179d1dd6364166f94716b69027d8d0bcfc6622a086dbe92198e5c625699d0bbf +a9dee06d20554b4d82584108208ca24d7509c4ea30e71ec44f014f8cd97b8eeb +f1322fd5b116009584559a3b0574e24329aef35d2964756d50ee8a0fdae1be91 +19e20fb52c3437ef677f37b549851cc9bb60c04cbee8d80b6f1442cd8676b0e7 +bc4b2c4883d212135bcde4fc15eff6d20269a6f4463b12c214d99e68f113c5c6 +7c2d25384d8e7b9eb31d79e2c4607421389827e2fac887dbf08a43a5ddbc5797 +797a1fd10143a4e97ad79bd0bd7f3f1205130061a6581a4d30183e71fe80d570 +42083823e3ecdb6d6352b6bd54413a9b6bbaab94a76d12ad93ff99f9433e3ec6 +bab36ccf8168cfb64c4b15987379cc129f6c7c1761df5d7dc46e0996e5588298 +b329b023056dd59f4befb792c4e43fa095d63df49b6e25f821b999b56ae05919 +16346777c2579ecd17b5a87f1505f4686ba2aad3045cb414cc65cde98b92c76f +20a9be4a42b77e077b9c00eaa3914709c3fc1a16787e639a2c7fd9a30d9e8ffa +1d5a900dc9cfd5c319ec34570cb758bae3a342d936a30915dbd5160922aaf241 +74c014836eb17224a681c1d7cae7fe0d0627bd5af08286c59e2640cadf9e33db +6636197d955a073214899ae76156146452d063a460fdc5a82df0eafe9ad88a24 +905f7db7dc8097c0d9b0f9319aea0aaf7aaed4a85c93979445e8d1e5a9bdd3b5 +4d74320a1b797ace38376db0b2f6566432b8a90ca4fc7842b90623603f7aa2e5 +a2f0298157822d42f334b8f9f80fb04c36bfde0eb1187c1b15ad0666031c5c09 +62bab12d2476f696939130c5b59fe70b61320e4510be29e04f13236cbcc78a8f +93bd11c24fcc4b45405a13a65ea47c13be1f82075662c316b4de144f89beb6aa +cfb84f0d288c67d488faed8dbfff92be9a24bed443e9db3f1deab63ae94eecef +43ae1d68455826cb3a48c456d7e9a849a9822c77503e5b9f029fe70168831ea5 +2ec0c2c4471627fb5f2d03bdf8726bcce14a8a162bd9bb26137253ba8b581941 +e759a7ca7917d4244da33f45df6684d3dc361bda88b4a0a02e5e55a1efb0d851 +b4e418bc6a0e213172a08b7596b1fd93aaf111f2778006da546ca1db88d5db98 +4ae9658c1d31adf6ecd3180c19791c85a0ddd1547fdb800479a6dfea56ff1e11 +9b3c1dc388c0f372a44712954373ab66cc420b2cc80a92c2fa011d91c441bab2 +f54dbbea462e186e0617b2f3921f1aa33dcd2c1c5eccbcc37dc50bc29d0ffb03 +e45372aefe3b44d8584035f3bf5ad94459a65fa170516c271b722a2f08bd241b +7816ae887856fef57292179987b26bbff4cf1da6cd2bb092df2f6ae3064d61b9 +e7bed1d13e534b991610a2c067a1c107ec6b0a8dfa6f6c4c2539c8747ad33057 +f5a9d083a689e34c8ca2957263786c1f78cff0347ba42730544865be79b7c461 +7ebf003f8cec1e4b6af75689fa6f6dcc317c7f6975df451eada5382583a1d1c6 +510ca60fd85e55c6e16ed39a86dea378d6f41c00beed05ff2f9f1a2219e6838c +819e9576e4ef216802c4a913de00062e70df8d83754166a27708337ec6b8a031 +04a426a1c31371eaf807c8d638d16e6515ef0693651bc2dfc870a1a7e340d504 +be0feabf24b5bc879e75801d188856be2225a82eae90a792fb4e0d66ca0c4a64 +a5064e1c9c2fbe84b5d6578c2af56fef340a49911a0a346813fd5da9e694726e +a0dea4f42008ef28f8d6ea9f974327fe71889fe76945b30fa99c4c8c7bd3c40c +ccaa4f19c0e0e0c4cc88611829bdca334cd69463228c2f83e1467125b7eb3c9e +812c62fdaf831871ea0af75efe4c81224eff156fb21bf1a27123d020beb9e1a4 +d72626ddf4dfd474b98694e87ef0691b71a8aa4d346d03eb56e0715d8f6148fc +424cc472407f00bbff0cb49d05b0b5923821fccfc27869a85fedae1ecd60b31b +1c8e8810879809ec069ca308454613df0f673b5516598fb5b822833fe3e0c0fd +1b3684f7a66ff0f9132de78d198fb6dd459c42208ddd13ecf433d4c9901b0aaf +4c8ca7685711deb49d9a2cfa4209a0d058aa8490963164652bbd3cf858e53975 +0af2b20db08bad60ac71809271597b65071e7946d81c02d8e8eac13adf5d5249 +ac0b42f5c602e16b6199dde3666d58abec0c1485ba6ba71086c36481229891a6 +89bd1c4d67e91e5ad6d75ae80420cac489198821227c1ac94954cd0c94098773 +ef4313cd8aa49aacd7d34bec814e77f9aa794e57bd14f678a5f3d9311036fcf3 +d39a94b0b23b982214469f645fdb728751627c28359d6613978a340b2b2ba9b6 +a0304f87a77389a09a36a660cc983072063683920005b2434951a9c8ff375cb8 +17ce6c78b6991ab5a5efd7dd4e8b3171133da1cb44af59bd84724150d09f13b4 +39a1046904d4d3ec3d2a90cf5275a9527f8c3c62a0ae24a60e9e7d1765eabd75 +cdfc9a14c4043fd34ea73afa2e08cec40386f048879987699fb8123ded9709a8 +75b020943bfafac56dcbe4a2101223949b0179cf7de6b550657c91bf3116ee7c +66e23e4ff64cedac326536ca1f75ed1bc7113f0267ea7a26fd44728714e2a1a3 +13e88daf24c9a46de29e3767648e961b346ddc72a6724a0857078c9a2ed39df9 +d17c65b89136a6cc0c954e0c46e9f23900c7ce91ae71d74237ea1128637a673c +f6ea0c8286ef99801cc6d45bb780e21c5a7464d16f77b45236bb9819ed3a8c4c +7e1b15400eac8a99511e77effdceaf8af6cef034b79862eaaaaa00bd02f5667a +c1a03c0188d09fe4d1fcc0b0d3354c880b2943b9666224238db22257a3873b36 +be9a8a55e01165f4e8d3c8eb3521ed57aa834a4f88b97f2fd77b3b3c39ae4bbe +869a24a4714476b3d396eff67982ba0a8f9ac34bf7b247951c0c241a01f347f7 +84bf841495d76f9fb2ac130779145677c799a07678eb8a3ea3de9fd00430d46c +b1b3b6c392afd853df1d0bcee9a053d6fecad859bb9bad0bf186a6196b89fcb8 +44799928b4da77817a8cd1c36cf9515090cbf63f373aaf151154a769cb58704c +2c0263028c641e1ae224235cdb17d89af5398f3d1daf44254089e6b4db47475a +1fc228e0151f244b025e5c14411c8834486e483e4cb4406752788fa99336d980 +a7a6e6f1afecbd87f2c615880f3a6bc21524abd7076eaba6ea1bae0f995fee85 +f938283c60a7a1dfdfc053a8353051b18bd03129dfe6b472e73958d11467aded +ced7829ddf6e7879dced36391a1d113cb87969b0465d64b96b5360f774a98596 +1272aefdb74ea23d85c8af588ae0f6b43ec47292c880217c0ad03d87e1cc22bd +8117ee06e36394a8fa5e72cab0825bc3af8bea7256e7f8abe7fcf57a38e38df6 +b60d783d56905a5d7794904c0cb95e2aa835145062e022b159fa7247af415890 +117a2c9a99674891b134760def15804badb8d4ae414a1410886eff8d5284b042 +9586db6610fc1e7c2ff53f19060e6b43dfb0d8bf8dd94efd5105ee20ae0bddd9 +58176c666d2ccdbaa1a3b0a8cda0b452409c8cf61b9e085d9a9164b7eac06dad +f878ef8ff5e36bbd6414aa86e1d73d211175ab042ed5ff72030b44aba32b970b +917282a1d69f3005b0a110f90942ea6f9cb2d9eb57a43000c48bfc2af2b572c3 +f8387ab21c90facde17d772ed98280b44061671ea4d98e901f33b8a8bf0f97a3 +d87d0c4d81d6e29d895f50c1552fcbef2df93a75e3b0046c794d20229d7eae01 +7f230053c4c2f463020d060b8552cfd6463018b4c03275dea0ac42977b3dbe97 +3d7efc22c9ddbf499f2a2358f6287a8c9946fd16e6e998dc763b5abaa6888484 +c2430f2fb9f2b0ae84984af32ba54cb191274f7b85695f5faa3cd5eb154b0f1b +fa2a0b9ae93d591648d33b6c23e27f9a18e0b8548bf1f45158ba7c171bd1136c +d045e9dd27e4f23dbfe5b29a66695628a87949cd0d4d15cd066916eeddc6cbc6 +f0a5c77201d4cd352584ae70d1b8e4ad2d5278a472d230997c7c03d16cb5ea0d +d04df0bccfc7a277a0ec9516e10134a9ff93b3e6267c5ede4e5b848bdeb76b87 +52249e458b602c175ce8717e89da05ceb850d2538c340ef6142f0b5cf5906f99 +c271b6e5b9e614d64a7c72372835ec4a99bb39a7aecbc41d021118dd56d21326 +c818bff4de332c9c00e96755e71288117c19e3b920c23766f249b1abf4ebb173 +3f9d38f1772128cad4514c4c06fee49abf401feaf2368edf5b4f78fb13336189 +5040b953d2ec56876cc72fdf69ea7692da01a508c2ff7096e17d78e2f61a04b5 +400d9c28610aa8d48b790edb4bd5cf08646923b0d5a86178956bf7940f291242 +1c4f3bc76fd991e36e18d40f813095c5b9165700cf94403b23b2b7887458c4d4 +4a4f160ceee87c7d50fb4ddc3d4e3242d9ac170b060d472889e553c988126096 +dd343532e74b54d664d63141b1eda0e6ffd1d82ce4d084352e97f09e2e05a17d +cd8bed5a8adc08494e5ba8b57ce522758413cbe5e5d74e6d3b251a6567fbea78 +5d838a9506c98691e0ee47be4421a95e6b02e8c66aa06f9c88b0ab94a1a32660 +fa0d8a24f2d5873ac94ff8e0670b96d4eb007ab89f1c77e0f1d1be46155fa2c4 +5930779b70c9a6d559a3646af2b83590b2f1ac3a3f1c9e8d465e145c69fc07cb +5df5093b7cda7f1780def8060d7daf747491b0486e7ca427857946d2f3d0e22e +018cf12b04b2ecfe3accb88e5e52dde2d9118a1747917e6a9f211c1d210b2b15 +8f31adac46b63cc00beed35638a2e8155805bc068a00b757d6f9dca2ae540883 +11ed782d682b511c557ab8c413e95ea8b6dd3a6c12ea9716d670fe4446629890 +d14a1ff76cdb4eb9e2ff314ed9094148bb33db76e4f6bbd5b6ec76aac13c6660 +38b1790d9c6ecf2f33b6d4ece409f012d58a75a1a4ef5e580986db61edcd97c9 +7ae81fa20bd7fcb07053311dbd6f3f73077ddd3949fa6dc327ad2fc056a8b798 +53b22c193126e73803c83fc4b7bd9cdc54c2fb1f6353ebddc027d3925bd32d89 +219a778cdc38e5f9621b41a27cb8fee8ffc1a2fc48ebd25828373b9bca8742c3 +0a58b2473a33b4805383415deeed7197a840f6c39267de16ecfcafe7d585f672 +b5ff6bb9d143e8e615d349ed779b847f2b5930aa83b08792e193d64aa163a090 +586a383d4ef4bc273f162164154d9abe6e68e23078cbbbd0a357a771bbc427c2 +3b6a3f24401e31edd9fd7091e8849c8e37d83ef396dc505f8f843f4ef305c505 +53776af2c088aaaa5a5efc05258cf692b579cba82efe7dd3f3394d985a5518cf +93c258a168969d01842a624f56b4a6e50fde64083aa7cd0a8f3c0eea6e6d9a06 +d24b1f96d34d66c2fed66cf844b490b537561865299d18dbea55e025643f78d0 +2419619759dbcd65ed0ac4a2866c61f37383902b4e1665b2fd9414d348b4d41f +ebaf2a1e4bc97f5497de6237170ec27597c98e6cdbefee9c6a7b106b3b6aff2f +7dbc6ba1b2d145285029bed2766715781b230aedca4dbe0c92945bb7954d9fd6 +1702f5a981dc0c5c876c28659d744803202a5929f03db99b32f776a794afbec5 +3f03ab51fbdf52c98de52fcae577c7ef0a72cb1f4170bffa48734f1df30ac772 +9f23e8541aed00a2cb2bfa219626421f669494c472c88e288e5698541185b862 +29881c30d6b6124b276110bca39fc496691eb1c61432cf296b055401f2f63e03 +22b0f37395a0489a031945a21fba843a881730d3298008bb4c023b24b195dd5a +1e30b76210c17a06095e3222bd39ff2b7f7b6366a173a9e0cb527172e1da2308 +5eb7568000e9e9fa521f977c341e7c4cefc883522696ab5617d6f6854bcaaafe +ccb82352f821fd30f6edbab80310bfff84779899bc62743894dd9e726c6a585d +b4a2883fddf1d1ccb7dc8242c6d0f16d008d551ee9e02cddd4a21a28cb56bba4 +0bcaaaf95dc41650643302346318e7eef6bba6f4fb6eb956f99457f2d2ebf601 +65b6b1e4405501ddedc0d2cce1a9cc7ee6282a2432e88ff45ac520a8155a2b4c +4bfbef1e1a860ac2a2f2d25c1bcbd864001a54be48c3686cf72e98856e8d4e4f +2b3f382c3e3a75bef479a567bab3764282da78b388d27a6dec10e31db5088362 +d3586e219c55ec4e24bdfcd77b920f5ea332d29630559785a900d05813400556 +d1d0721754258799fb25bb59a79699f6f4e56f0e58f6748bf8091d848e4bf22b +728c913b0db74e9bae863413ba5ba04ec732d6f50d838424dd1a47b29e51aaaf +8ee4831f52722e1627bc84cbc737535206f251d92549b8e2d24bc6b3d2cd5687 +9c4bdc972846bceecb47b5ad23df0a82cc481e37d74ff3389ad3535d0d6254d6 +d8ec450fa1e3b81b7be26897b75025a64f480dada26aa777cda828ed66cd65fc +9d02717638bdb88571460a45aaf9abe1b460659f7893c1c64008192e38cef686 +8a076a626165bb53e34766580ea78b2bb63e45d6fa0ec31687bc4f243760d452 +b459dbed951640b1f5083a19705a3384af93eaf503a000e3f2384062bb52559e +1e0d8bdaf66cdacfaaf91636d01f7a76dd5424b7b620a706304cae6fc50f0dd3 +8d395cf39dc796c7ec271721e13b1dcff35f06b5bf5cbb6b2eb908714f4fdd35 +9763585e39484118b080504f1bdb293321cfd1b2913fb217c7b41d7212b1daac +1c4d770cfe91a1f649d760c132fd77024f7a0a4e8d0cfb275f5435f3dd911be1 +1db381c01a9c04645631fd9e1c871c5d2c91ac39a18d8b9dc563633d709a909d +614024729bbb2824c33c216612efe88278d6b1082e18f486631fde76aefda526 +2a194ecb406ec7315a43695256b1f7503d323c8fcce1f572ce5410edc931f97a +fe2671156d0167b444ab02691b81fa57696d07e235dda15640ce4d2a936d1dbc +a0d1f41aff8f3ca1792ac1c146021056a40ba5b30278222286a89825638edeaf +429cfba89cc85ff869cc5d51e41a8ffe937e03744732e3fab250127c9eb21d53 +48e3f6fbfa7d4abb16dac3c45e68e355e43d59c67a717495a6acdff50208c2c9 +7ecc5243915c0ba12e420d4fbc39c5332db7d681e51158af491169d7f7212fdf +47b9a9dd0af18a2c28bf94199e0480f9cd97c2ed0e79a57a02adae4b0cd3c1c8 +f91521a111933abee28bfa1ee0810db409fe8dfa17195a9a7637f180ec400844 +e497a7f9cbafb57866834f37b2937cd71cfd5a88eb86b64a01e33e9a639ee133 +89460417242cec260f151b9613f6aca727b2578770e86b45b395b951caba7afd +94c3442bd844ff531d069b8a2bc52710d341882860864884714eacfe23bc1cb9 +e4823b3c2315c09342cf097030f14fd7e663c2d030d2d71079b6d53799e5917c +9798624793a0f850b6046e7c987f7b1b01b586a83e8fea61486dcbe8b1362ba3 +a2ddf29c622fa55d54800823824af57e426b41b6aeb440da475e13240445d467 +26a6d4518ca92a6003209d30974a40872e176ec005233706148979aa159c2b7e +dcd5136921bb9116855f20b0de9f99a919854a9fb381d71265dbe5375b06ffcd +490b11631704a069a04c0cf952ea0d9c4176d5acfbc48d8a48074357b1b4a8d7 +1a9bff215c77e14d23e09393eb10015a5474701d12005e66a31aaaafcae6a030 +34e2281bec8d06f7b41e9b2dabb7783daec99bc7a3a8dd48e90d36848efdde98 +c09309fb1c506f5a1c0af132020b07afb2a9b3c457cb0f1a66684e043872b794 +534308404c4d7faeb296d9f1561cac5fac91f4b02f89b429212c58c55cb96fc8 +bd812563b864833a0f9fd69422d24eb4a4acc9cb2bebc4ff8b9d8e891a63babe +c423cda2fcb7cd52a04774b3738108a19eeb1208256540bfcea23ba55f4dce15 +e1d176c21f166ddc1c2bb79b75d40e38050c6658a23c416650a1dadd17e15584 +b382a148d2df13b0d186484217ce6e11308856598534befb42a76389263e975b +0a17b79be1c651630970b99d5956213b5da9d41d160dfdbb14de1e25f83725df +ee7b04c5f1eb6cf4914ce25d050de1e1fd701490f5e4d82dd51b28cdd8cce9e9 +e39bba025c012e85b2b1c125c45943798f8b93c791b06f159bbbe9a3ab1e0fde +320164f98cb091b751a57d86d15a0fe812f9a8de5306b3cb033c9e7eaaba9054 +54af59e9d61518b06302c9aad9a4884c222a41898ed8e340c7b0163e5152a394 +ded4c2abb46fa6e763e27b55fad2c1f9c5e4ddf0bc39fb7178f9f5c84eb6d793 +04815fb8fe12ba84b91019d3c52d36febd917e5fc58c423b5c9e09ea31bf78f1 +da64ca6686189475dbdaa3fa111c24cd98c82e2a9f4c768969ca12ab4d160b85 +7aff1f4af235f5127e7735fd8a4e1f4023de13c477e98d7190bf7b6e45b4f867 +38f0c045e958f0e2e20fef19fe492044c0c04fa16a3a0d33dcdbded65d83cc01 +38ae67b6b6c82ce18705e39c04ad8308ff32f03939586fade451f2dc110ab4dc +fb3125e09d8edeeb9c0ebf3d289f9354973ed883cc9df86e126f0cdf91d07622 +8d14814c51a72aaf37bf555a0e2e8ea5eb932165a430a9d0364247f0ef15886d +fb61e13710f14ee5ff73120542ea256894a17034c5b5d2db4089ee4ae8a5aaa2 +cedfa0b8453c045c75ccf036b34d53f810c2a219e2765e0f6b1aa7c7d78dd6ed +27df905f4874e65d79c161371032be490231487d9b877b3a2c6e8a9840e8f421 +7c2a536aa271ac2f44ee7037758b75f5eccdf5ffc7cb94cb100a8710a118e0cd +cdee5ffe9a3cb0797b1015e78da676e14b78a252fe4f86deb0bda164d4058b46 +3cbc28247564d64fca96b4e6f54499e08714982e495918059ef68b396226aaeb +e5ea86f697256fbb59abc1c752d459d585ddeec5792b769e8f1c55c79f9dccf9 +cb52f236496e84fd5e9a7e4e63d037835b976d5cbad20aa538a07fca3e44ee5e +f03e7b4acf304a825c3d1783a46fe5c046e30f75e8935fd323a022161f2636d7 +287b209d2aff608abf3074cba61563cbe724afa0f51b8e2b49023d2165aba623 +aac35969666595b7f010b911eac958005ac45a5b756a9a1b711f79f2d64067a9 +d4258ff5e7b4fb2142de1e561d8d098a11d63934a065585dafb5693d7b9a546a +ec40b879bb5b7c167e85cc4e9df665cbf0ea67d12e230d9bd922af96eb39dfb5 +e7bf1751f575552d9df1da8402ef816ba3be8f3c19b8912004e1da13463baf48 +ff7b3b33a57aed2a3e9e9f145be50f2e84900daa0b996632263af132f7e6b374 +35d91cbcf393cb46649ff8ee35a93b7e27a9bf39734b53cf410ab3f3a2fc4027 +af2c873a42c13aff732acc9bb83bf2862e7da328eecac95b7c0f0bf79744ea95 +363f54a5b19fd37f0282ffc0c1779d733f531ff661381dc983de2858e791ff20 +17a15a90500c579a5f61209d9a1f503788babb313bfb33f3ca0732c984c398db +687dd0868699e20655fa21040c952224811bceceb52c86e3666430e4fec39c47 +4462ea17dbd53ce9feb02d52615b93ffd7928c8f6d24b3be92f7731b8b087c0c +1d51c663dba72b2a6879c6f55c1de28f339676d7bb9af94fbe12af5488d4b3f5 +b529a6a3474e3f0cc46869343243748527080265184bbfb93eb971bdcb298e54 +16030d4076d4402b653b180ca984be40eebf024d2a7faf3910fa14a5545c6242 +fc6d8a9b6380cae5e75df338e07b8784bcbbd5369ad30a2c6a7ec32cf5d78219 +41b18b7aa533b522565cfa592c54a428813751b5943328dcd2c6a622ebd2ba11 +c6d2d65f03b4f419ba4375c714e62974b83a5a5c4392c26da2650e0ef90e5905 +402cbcac72fe007cdc6dd09bab715b7776e327215024acc013cc55f0a3a26859 +2a02a0a9f87370cc81e5c185db2e6090b6b2e947170a41ebd0cc6d71a264f0ca +16eb08e781695fd8d35777542ba057443ec42bf0a822c27327b1e064af38db65 +9233639f837a74efb758b74a117ec8841779afda95ef3f0f916c97936ec16bbe +f2b917a8e8e686aca6930649129fbe9dfd1f8247b34dbc586678999dbff6a12a +c51c1881425432805a253cfeb23c5ea0cdf05c62f99d34aa7f73d90272af0969 +68ab75f3f1ebb30b5ddd6233202fdae3573f67a51662367833673f7ff1344346 +446dcd3e29699b9028c7bbed09471ebc899cb3139284a914b98fabb1d50119b2 +347ed0d201cfd78dee828badc1655fa2c70191b24e20e699454570fb31850dac +38ae12ca5cdbbe2b0f22f0de8ef8b927dc6c54ecf3801e5c2544710a2e8f726d +cf297becfb7a93b4b422089200aafafb934334704c3d384379d34147f7d163af +3cb42599ea902106ca1befeae26d641d49b7a3490f09bf16b8d17c026e40a2f0 +8d727fa2aefcbe4ac82dafeef86eb672a95f413b73858600c7d9dc544694e25f +259b039558da35ba48443e6c931f6cc6ed108e765c879314e532d888a79c1b2d +460204838fb662dc90465032792f03f18ceb654a379648ba449922c9447c00d5 +08b81dddf1fd0304b2b803785ee94ae63b9700b36fcc894782782f51f397ccff +2a1734032660685070d6d5fe94636e6de386bf347f063dff5819b6b8554ea416 +59da8bb46c01807fdc883e15a200a6cedd4b95810da0a805c3d71c6467d84899 +6b88c60191c3a5e3c4dff6863ff024a5c4d4092164792a397b7d390b4306b56d +b002e6533752ab431804dcd2ec8c9cf242efc7b93dd9c3fdb21824068d3abb6a +831d89d241613946e097ce77a82f68c92da11dfcbde58e3450f2830a3a049bdf +c6e9bdff298b4800f150ad3833a612643316cb420af3db29f008ba36a2ef0181 +f64b4bdbb6334233c58e0e68876a6d2048db062b61a9cd020ed7ef071525cdb9 +3880a24eaeadf171b5c077e4de8527b5ed5b7e5005f73c09b2279ecf72e1ec79 +a3e4837d33cfd614e6d82df617f77eab048e71b51b3ba4334d8be27798576a28 +a21ed866fa75cd39ad747a1fea7a57446111ca317372060aacb159ee90e5efbc +dc5fd16b41a5e63363b41f13c0160f719ce353b913d069e4126743b420562d52 +e56b970fe3e660f4a850e8ef45f7262128f936ab5610401756ebeb0d9b5dab1c +8ef2d95e0cbe3542bfe0c6f29febf3f5a39fbd16a5c27d652c4a0c542124855f +4b53071df5537a5fd5bcf653c0578b4e324bfd7587ed10318333382ea137d90b +f0f83b4eb5d4796e42fb7053d4cd9feeb842d909cb67ba4bedf8592c876a83cf +48e4a2f7e92558e57a5cc6c3c6a4eddd68bba96359eef224fd78f909e016c5f0 +ad7740a686e566386c4f000764c8b6e97a1f3e9e98b047f75cad6b84d502c377 +846904339303da4c0436f1f67fcefa9fc0581f769b319c38d4221576b74b949e +532b99ed1cc90a2de4189b346dab2d48777ba5bd5cfc80bb15f0c8d4f478d007 +b84aff3121f7c0cc0887dc20cf195b1d964e14685acd86aabdecf09337ac26bb +b0e45caec8be479279364fb840c6ff36d164b7be25f9f811a466ce04c2ce5a77 +4ee329b9bd773657737db17709d3a6913793de0357bdea11ddd259b5bdc94e1a +bf95d33b8396ae9b26342cc1d2a2831e95939a0ef5f13443a9150f35aac5623b +cbaf6cc5d24d51225c2920e3bcee9d09ca5c60f22b07f24a26dd856f8efec9ef +b184f8a92781ea228c2f15ad9ab1da75002c9b352316a588d00af46a86b73aac +feb16d461c9cf969977681a88806c8e6330c1e9e8d428c91de717fe3908802ec +38abd40d988b018fd7a4c02a20f2f3c18d8364fb18692c310d4d1977be4108a8 +56f807519b471ded405d1e7ed6c02676970c2a1df6cdcda3b38edad9b5cee11e +5b221716f3137083d4a433e6af2eafe4760b0cf8ccbd5c15af998b5d5785a3f9 +b79a81aeaa9a6706b2dcd217ed437b23de309a360ff60ca82a8251be5671a625 +a90de4daee9941d44d8d1e3a19399f13b93d9b567b2ab2f9cf2b71058ccd9776 +3b6a3f95ea470066f36b343c0429655f8f25c89e65074a52cc6047885f4105de +2ceb8f80846530a88228b1f44c73e8cf8ff1e99d5cdcd3c91487caba9cce19ac +bee693c2479d8dc2c8799895e188155502f957b20e26619874cebe43d125f6e8 +638092ae98ef4429bf719bf6cbd17b1f1fd9a7c90bbb6b0b34614b32234a7f4b +1c259e4b10ec72d3a2e5526473e551450a11d8537cd6d3dfc472576307ad3354 +b2a9c24ae22c90aa37b1ac70352969e2aeb30d0fa894724d5e47a87e7319bb35 +7b76e95d7f665952ce39e05815e5718a7ec0d09dfb566e589c3655e87588b6b6 +95a272aba75b07eff8041298b7a1bf6fd1b10c5ce008180940df9f4235fab68d +bc3d2ab597192b0912b5d9486b5c8f6cd5238cb94a0c807f4baabe7e81f072ca +0b626d0a5cb1b8254a4ef588149c84c53d27ca3cbc729416976bf6a20bbed57c +6c0fd85c86dabd7ade406b27a8890bef705bf3c5c8a59615d858ca2707c47404 +78f55c4d6da862b50f90997989ce492d884f97482166d5ddd4eae075395d7be3 +cb0dfed4d966b2fd24c41acb6ba9f1280ca84aa8cf607bf1d2cae3c6dae6871e +c5eb10a943c84b83095fe1b7b9bc3682b5681a850001be80a48a2b1bf22790ec +f53a1ddb50e2325392f118cd56727005b947495ae8ca6e46cab765670ea03488 +39275b5711fd6b227ed1a6b66c02c9f199c8d54b46609a0804fcffcfe0cc8b65 +0f1ec83354d395ae89ef02d548088674fcbc0ac0daed78ab47e3ed00df77c01f +2d0e5967da9348fc0434d71eaf90785c3666694604f48bf2043bd54dae61ea1d +3e2da8efc1ae867ecb0e7d11093ba20786413e80c8f05dabcf474d6d9a1149b1 +be96ad65eeb5b865f4b321de61ff8904a072092910bbfce7bd5a42f10c355e73 +c0890e342af2f2f4d7fac20c846d372877c7b12776b76756a9002723d5ee71fe +5b1c0e5fbed5c354cf4b9cfb843f01b9e378e90e7a56994325c7c447e5269204 +c83b98d99dafc77ddb6a3fcfbbf430f6d0ab8a832c262f879369fd9ddd33b1df +602f5462b9f2b29360f1a1b7d7eecacc4f10f188e7e2ba08005878b1d9c3762c +ab8a29d01c0c164efe8d37328deb51567d5f17b25c11590a1078d53a36bee786 +5813fee10723c1acefe111dbc08b796895f2e1bb190f3da6accd6dc6c884eb44 +ec4d78df308ae7e774cef87ed4d6200bde349c35d7262448f165a6706c33563d +24d04d409c69924949aae19c13d07ee64910d1c29d15ac711fb56e3dd05a980f +acc11d9c08863c32a28bf94eb2c8fd1fa0ee61b939ed944b017a46b681e95cbd +0365d77433a27195df9d20a3483ec94192fec56b9af5c656bfc2924ca0c19fef +ad23207ac6d0169a15cc273d66899cc044b5efca9ef4078b9bc1e91f83842624 +c08a91c1c0d20306b1479e749386cc50fed78f22a27579fcfe943b033738bd67 +db8c4cba7f60e8ebbefeb2ceba747c757e902b70dc09622aa4ba96347b6948fb +3ed5c54ac78148b5976001bd3f0474d93f4903d15a6cd68727714ebcda244345 +d9a4b0020bde3e2c74385736f244206da78d0331de35feb4960d8fcd0ef4bb75 +5ab20087c2aa1da104d16ade37b9159caa0f8bf528b55cc005f017d6823268d9 +b13d199ce47d3c95e492ac8067fc44b42ac8be86b639770a91c75b7f7a55ff60 +0181451587fca8bea1721f4950b3322dd9c8a09cf8e4d2abef3ec038c8302e9a +3194d54745d5798e3b3844696d3c4566b179c98b7adcff4bd2a4fb402ab275f4 +30f2c77eecfb3c473d2e7102592e101c3d38f79a08021227f8f782a59d20cdf9 +c9750a8c0ac70e34d983356c313f85acb56ced4467357e07e23a62ab3fb6ed71 +9f9bf85edd20af93c1c1736b6112dfc8447b6d06ca12202f84b34f892a1a13af +4423b723c13701aa57982dbf20ed6ca129b72f79f77f1705485967980db5df42 +c662f0ed38a02b55cf048e713c0c6a1a85c900acaeaf6d045dc96bea5d45ecf2 +8ae85d1accc9b38a45d6f516078c72388e5337b9c1a2023d086e97e3affd3f64 +517df9ece75c3afd0e3dc74e2ed3b4aef8a8c032cdd70127ec4698db19c78646 +58f9dcd6b98676dede88a1efae04d182ba73475290ba87fdc71cee2737057855 +c9b151917eb5b3cde9f70db961ab5c8a10443a7aff427bae1d1e720a604c39a0 +14de8b45e528237198f086421b5938871ef89008148eac965bfcc850ed7aeae5 +ec3e8e37b9762a8a6580c791cd89c4d25fcdbe778bae071bb1e18257fefe9771 +255f977611825be7f64134c3521ebe7c549741265838ef00f0687ce14c463d97 +884893e5c967d3ca5286b52d0aaca5ada20e778a4f4c807a9cd97f0c05ed4876 +1cb09c787085e213a86b7aaf33acf64552ce5d8c3459c261447024035997ae76 +85d1d4337cd1a1def984e185779b2a0a8a3c8da6212730f96174f4c3b104d096 +3e0e395fb85f918cdd5f98c77daeb09a64169dfac253730c7da4122a7025ef19 +dec6042fc24d4565a1f8a7b37da00d170b6c4be72475544dc73b111c775e5c20 +401ad5b382559c2dde0bc3ec0e46c07e42a08de477b3c07159666bda273e29d1 +8ef5b8e6d514e510d8210e0a998508c3062ae26b504abb3613f3d1f167c87bc6 +48308196ff8fe6ca97db5fe0baadbfa22593c01bfab9640edc31410fa037bc90 +f6ca35ea8010a6b3c031b43e19c38a010e84f1c5c97b73fb3330ac18268c16bb +88648034875df43ea61c877c3278caddd457ee47509154aef00a86d801f8ddb1 +44e43f5ee5683e3ae84b7f6ba7aaa51f038607beb96ad79183364c49793ff0c6 +98c2a8fb0ac71b8f38eb7479a4995e1fbac92278b9f3528261d822db91d5d4f1 +9876784d0651ec7291f19a5437e987cd727afdcd267f983eabe8e5f3879805d1 +3f2089d9fca9d35e4fbfae0d72d7d0021c386bf7608fbfaa87d26a57933bb6ec +95739fbc3f7229a82efe4343b679165df1ed79eb650fac11cb7f1e74d6fdc9b9 +a8847a85bd24f58e2d988aea2f26eaea9d27f5892d2cdd77669b849a92f8d0d7 +5c54ed9682ba9d0c7058e04997279bdb3454d2b6a44598267a269a814aa9e1f0 +abf598a1b6c2afb75e173eb6fc2634253c04fcee9cb2a896523aad92457ef0eb +321e0a037eb6cfe349911c148473f86b5aff5b8985533a5f6d3b406ddac73d35 +23071332a8fc34a4816171b2c8a19bf458b4ce7259270785060b9d673f3c4997 +2da999ce0f2e7ebc2b2cce6de818d40f020d5e53b882f0d3754c341d5740ae72 +2868f364a2faa97e8c8143de444a9f3ae27eab6c4f7c838f3a5f8b9600d70831 +cbc2dc64ed3189f33030d0b32211b757f6682949ab889db99693f4dea2f670cf +057032d3034aaa6c3e75a0bbdc092c5f4886b169e59ad2d7f4d41cf7ad2f5882 +77914fdb7253e198a40b2186b1a9a0aa958ba9fb99f21a074825e053e562c2af +8cd8866861ae914042dc4b8b5342089b21013d519c44c28482cb8801c73de3a4 +9d6dd060294e4ccdc55f000f0ab7900b088e141fc2d8ce68cf771a068541657a +8b41e95fd2b1b452949716ad5bb0b8c2ece99d07a41f3c3ec381212baf8cca9d +801a993c8a3926b0e0d60637618f69facf70c7b3e6af9762afde0deb9e5be5a9 +105c3164b4d8372414fbee3181066f1772d21da04d0b350c806935669fd69cf9 +6073c324b8ea582638b11e58e43267c3854fa35c3deb3160d7756d66b87c8385 +92f86ab8a97bc9d6260e2723d435769d15dce8cec387318add815687ddb99d5f +1980da44a5332e5c98c59c8d6ba28a995ef8d809d783a9b2510e1c6b820c25bb +90f52ccb9fa3fdeaa661a69921794a60a591fc9157e755c28aa399f30e93d298 +9e7b35fcce14d5fe6bedab37c173d384d3f67323e702b14ea74951c5c07917af +f9f9fcc450950a8232cfc4744dd38ba79b9fc41a37205c97f44ddac6ea5d423d +7af9883610084080de39e5a71db472081595235f72c7ccea69a20cac059f2357 +b4d60e158834ad26f85fc1e9bbc948db8fe7a03c5c401ac2ed880fef8803e464 +76b00961ff910f1fcc897e1fa4f6b697a616f07aa95f5616a313ca01f39aa99e +8a5a9fcd389c99d750ccfa38bdbdd9a0376452970f91859aefebe5b55779516e +665c6f786b3d22a1cc781a729e477c5f82a65027c87b54a97d9130bd4464956d +735fa5b8f710cea51eb9bb909e89716160cdb112e44876ac49494f62b8f46e63 +c978f80f3a57d99ede832bb7bc1ae59ad0025944669343f432bfeadf8d7408f0 +50c7568da4400df96139c1d243b8634b19f2134fd13c783fe9012a58a7e7843d +55bc3b7c768579bee6f5931f1ea9caa44bd6808b12bf4550c852c1ee3cfa72b3 +5c883f0b6a4f4e5d768f93aed79bb5c70b681c3a9d604b6eecb7026c1b22e28d +c184d2fdade4c6afb6b9fe8d7495abe07547d092bdd73c5701696e6f256cda8e +1a6e58f3335e51498df75cf37a7213fa50f6d9a7a4ea4a251c3cd004b75b8805 +8c8b8efba9f66bbe5e8f321981aa2d8f5d455b47347e368686689d00fa5f996a +b6922e325bf4e72ac9cb09fd5802f365e4a15045683884b45f15175cabb62651 +3e71fdf4e7ac9b4b91772644ca8e55c530a9459719e181f9f2d211601d1bc5d0 +55731eebc2964f4add0f713c6b22abd36bd9163902a147f5172c4e054ff44ff1 +1999337a57a673028374a04b65e7e77ef2ce24a75c90fa2bb48cad9e9fa77111 +24514b9400e2cadf75e9d7f62fb7993f82cc336c77716bea4c00c931ac21e95b +04f35462cee46670514510bfa22ded3ea18bbb8b511f42c637bbd06134280404 +05d4355a5d252d9bc291c14cc81d77c491f62a54387442b9a884b3d21e0adc5e +1c120ac2c0b03a0355204eda408570d379547d40314f5c61f8c97971b91c521c +a5e86c1c321a90ae21dfbed0688e8c7287e7a35a1f0807b0a9a811a6d2d68636 +0fe12a04126f19c9b0fbed1083265ef6b2f4d463563df3b1be5b9fd0d277d53f +f4f5ee43b113f580be21183338592a57e29c025bfcbd56dad49e4b5bef14363a +db5594baba9ec550bd4cda1759277595d677a71c91925e6e1960f31a24117609 +4213750579cf163fdf9b3590951bb5e2a8f117412025f1807584ce1a4cd382f0 +9da5d7b56954f85327c0eb4ae556b79c08048b127101d2fb38f16996f1b66fbe +0040841b5578762c35849b0641d3343d8290f2aba7f075a0e2721718e08f0a85 +1fc82805f23c2cb0cd67740ce3d5bc6b97f98f8818cd39ad76ea2779c48ce48d +43302c382ec8d61904242e9a5e28527ea6a3bfcf9dce17a9d36398152c7c47ed +777c944db9ba4bec4f30a1261a0096081ceb94708ebe98e7165ebcbd768240be +d03fa2a0904086e1a4fbae8788315c7f864754e63f2399702bf2dca498b2b352 +09ce951389384a9e8ec4f01b207f61112956e9a59c0bf46677b9b1f8459b41e1 +b8323e5bb1ecde22bf2c47938e0e2f548cb02758dc7135004e448d9e689cf431 +11d2fa0a98f3e31b3882cf8689c76d276b85177cb27357bcb2ff0de3cb032166 +c58f25e0ddec5971b6a81325abcad1fc2a27cf0b20332769e80028ea27b841aa +16506f7c22dd55171341687682311e1f884ef87494bccfec13f5b0b217333376 +fb86573ee65386e19628e78f49c6cd9fbe4cfdaf21ab25e6f62a99cba323ebbf +c5eeaa523613eddbf85de5dbb9c66de1748624c271d8fdbc16bb8f9196428516 +f85e26d904878f9da7bd61848e96250c225e09dbd4f15180759e3e5da86d0dc3 +f5f4c5df81625a466d31872b9644afa35c81cd8a84a052b954bbada87c1e50c2 +c39594078c068c9b0aed83074cf941bc7afa3afbbcf3f40f34e4e3d1f133a57e +9c10799313813684dc597fe5ae551cec1f61802dd873526fde81f323b6c62530 +0a5ad9bec4131b9cc9cf26a4554d6d64bbd5c7eb59024b2526f12f3f9352dad4 +7043446118b2339223dc051a4938bc6a2c691029d693b8bd3d35fcc458f7df7d +bc2e51ea969285ad222a233e5331f99ee402eaf6d76403f6fec3114e6315a2db +23659ff88a0cf2738c290fb6ccacc2472bcaa3e0ce03f9e9d8357b89580c95f6 +f97c1ef3f0bad43253b8e97e6613f0ac04f55f2f321b5688fbe4076558738b71 +b378712d45c48ff6ec34057bb2a0aa7086c27716aed9c3e6ca6703ffdcfc451a +0471ae9d6512f0fa82155ae17e133b685717138397757d0230b62cda0ab1ee9b +b1f0bb791daad5f3789ec0f22d13b44143b63250f09ac760e86ce3219292c6f1 +ca0e77313611d8282d8f62c986fd525baf75a8ab194038359f6e0217d1a5fde7 +ec7de056f4fc6893e740dd8c9efcd629fe529d5116db5482d12bf39b0e3a40bc +bf1b3f99f627cbe937656f38909e3924b89ef1478be176320b6fb8a7c750f41b +90dfa427229c900b51d806d959be3b8b2b6e6187fb1bd406fd179dac8af5e70d +be10e747e198dd6cb67872b48585f33aec68a3ca94a22224056a32a8139cdba7 +aa07ea5cecad1d2e1054cd265d35c6b2ec0a25a0dc415955186cffd2c4b6a86c +028129fe12b4fd07dde82836ded99925994f058cf323bd1b362a86a8b4ac5aa5 +dbad763abb2613b41ae6b947fb79a7edf3ad23eb7d732727376a1fa9ee0e8d79 +3b5871fc0e4535563bccef6ce24a71b717f90590a7317652d7978bfa78a72454 +353fcf512ec5e804ff6d2984c3e905401b69246e1b040693c581e794e6d57ed2 +5dba59acdedbc4114116da97b749c4007f51addf7dc9bec79c77cfe29b6a93c2 +61e2007b01a0b8d6f95a9e6c25551a20ed592c90c7ab5071280e5d85200d776d +938df156ecd2d863f8b1848dfbe5d3a40d4b817deab66d5c191b4b05035e0009 +5f04c4cdfa26de785889829564c27377ff1f2518da932d4559017881aa68a802 +5bdaacfd2611e101ac667d3b69e7895337d522e56b4d9698c4c5f9a0e83c2386 +f084f40a75282c72b2fcc12973e5edf34e810fd247f9c0317899fe6efc833822 +8a788d33265883fcb78366ce69783b9a15e8c041e4556293f61c571bcc985d69 +b1761aca9460781c4b9f9035370dda95c777de8d35e1d7aac234987fe1a8ff45 +37888fde3267d97e27c8fb6d95088f0d207e4b8d3e3d689172b2d89b8dc28b34 +43d14646b23e3807afeaf3c83a22f45cbfe9eabdcee160ab7b1a664bb5fdba38 +4446b84b6b863c892a6ecf33f7a569d82df118582e514c11314dc73fdb04be15 +b6bc9b3be801419d90b74cdc52ac40e1342167440621fcaaeaaf9db8f78f9e20 +045d3a26e1b51f2c786b23c09cb94f9cc91df0b5236e3f54062925ce8804113b +c93c3ab041948a2027d00e112043ef82ce54365fe241a2c503fa334df6973406 +3402fc6d246a8694f436b318bd5558f69c9f182746a25aea1bf1993f61ca48b3 +b04074f8a44206716d6a6d834ed3c455e272b41810c6d70133c455f246aa7764 +a104c482caff864d86eebb2e1764735775e78850006f959de537d66dfcea3f2a +45e24e7d905439a59ab155474bb3dc63897c1dcb7e8f298366dd49b9b1e42f94 +816a3c275460375dbdf175ca420b46df137a34bb1ad7983807677f093a05b90e +81fd0ee6b6de147a9813a1a1ec0c7d859777c0b2945edf2901f883b8b54aca59 +814b951e4c97fdbf48aaff19cb9fe7c6c0de6532f656e5b1f03193b58ee693f8 +4684114fdbbc86134a483ba1be41cf4fd823a23f5a52ceab00021c2954e5c04c +865ec7222d33d82f19e09375610ff6dfcea95e0a25a1cd3d6156b63bcfa13740 +63bfe1d8a5e45659b0c924eb81cb3d4e70e59515ca1be45f66faadb5993ec547 +966f70f5d761c8731063422a510984f7b4587efe6799d2f28d90236b49ac10b6 +fbc45ecb7d91017e16e4fbf716709b37120d3586363e33d94ac92b01d1349c00 +18825eddd5cd9cccbf8c70046ca295d885209aa3fb0b6209c5298ef4843c39ed +d64dc504c278334107d322cde4a388a4a079bd303c4d5588be979eaa6cbdf8b4 +942ffd0d27b2ebe1533f1d31b3da2c7fb5c8b663391151fe897cffda8c227d45 +e292e9113ed2538712b40601f1f0c8f3d0d69ccb584abe6db54b4044034791b7 +d7a0838aa9d80c971f45486b4304f20d68b76ebc6e55bb683dc20c356176006c +b1f902f8d0be642da9f9209703c23e48235c35778221689c16d426fbd2903d19 +7fd00e071a1989e8b2ccef17d51e7d73d7189c06adcda120cd3e849c603729f8 +85006337a3a1136ca31e0e41d674620f97f0101a297a1b731b1d0348c51d72c1 +4be0366a2667999067d102d7007d510f31074799ec5cf6ee355e59bb68dd85fe +3e3f553168c337afddf1bbf895c0df509355dd9120735dec0715fac5804075fd +cd57fda443cffeb9e9d8e6f24a3daf1d9523ddbd29532a6c5a79e6b1ea1f2b1e +55e0369cff1bf0c074873ac1226354a6a74e62faf42f1a15c863c0ba21c3c399 +b9c1ddc4ff6e9bc9a3ba58581b6bf67b89b7045b9542694b9c2dc3e185a1390b +67aacd3c344d37467671f728fddce8bb08e2c6b8cd4a8abc60de087fdd560130 +3f40599da3a1d4abe2e93cffc5628e62d972f034681db1c6b07cdd0e7f9963dc +0b146051fe8140004c5cb27f0f0411027ba88646baa9d6f02931a762300a8085 +7aba1853932d380a72753ebcf4c9c24a03fedbb2dc057c6f62f31695d35a7e8d +da73ea4a610f515fb52ad509605b8deed5e44c36b7210dbafb46cf2c5ca7f42e +00571a8a157a953226cc00a87592050135386c5e7fa1c5e3c023edb0359cc26e +96762eff0ea623651b10ff61835614486760930756e59d54919f0dfe0b8fe93b +9b28c474055246750aa1679389c5204657d283981a5cb160e21c1737503ab109 +044a661a3b3d100ec7f4581bf7b67b50970078319890d5a67d133bdc07265d22 +99504698a00ed8c9747feb1e747737e19850d39c03a837f0d504f9b43c8fe9a5 +725eba04ee6cd478f8416470ed154a11484aed5822bf9979b1ebd5e56af698f3 +4b865aecd29c67ca74814b0cd0109767f6d582205574670b0182e0ec6d23675a +11e489fcd58f0965af4c2f2b891aabd05185de26ba4e0a86b4fce3ba710d9c81 +3a97ecb07ce16ba156e2627048da3a2155ae68a5063f6c2eebc0091711290605 +b540ca4ddd10838e2a64835ba38ecba8043074be230baddd628d8b253734397a +a213b0a9bee70d623dd5411eb58e25855209b3648a42e4681f90d51b13354f28 +267d48d1b8aaec412be2dc199ea3ed041bc3edaace1af401d01e56b5762f7c71 +cadaf26892f3e1f6ab0438a4ba0e3f5ad953fb15a7d821f6444efc966c67082e +47e1af0e6e0d199189a994239c9716711f9ed82f6fc2fa1f923b4e3aa45e5ad8 +c0dc71bb5481fa6a105b90a77bf4b8b9b852714cdf4fa814e9d0d89d349ba57e +dce13210f79ceb8733526aff221386f826a435af47f027d81bfd4d263b84f8a2 +a807c55d1bada31a59649717a4ed8d560d4f5b81ae7f6943c66e9b2ba9739c3b +559d49fe652de7c968c64030d91099ceacb9ac69417e8210f64eeb6dbec7ab1e +fe4a3babea0a42ed49cba2e70a6db7018ea0ff1b2b0af498dc6b5e686eecd7a2 +a6b85e07401e08b825457e99d0b5fe48ef13a14fc0ceaea7bd7748b2c7414522 +59ef4ddcd6a12d5e84ad402badb6af6b8d50738250677ac12324e4e3c5d72887 +c3f36f99c04cc898704bada948b431f543765f3112175412fdb80af9850ac5cd +19b65b018df357498fb4255439913acd686e3edd9a3bed54235ca6a3d93ac968 +6ccc1400b8ecc647ad4fb7334eb768ee32d3213b8a30ac2caae37e99ebd9e903 +b319139533fffa9289c29424a030940ab2b43df031c3f72542e7a8227d56c29c +a3b07551a0be3cc4d406d2b0db792e9e72942777388d1dcb4d48704c64a99434 +885c4f4f170294c7179dd43944d60739ba9412245f2c34699d04f9815db6db1e +b3835adbf1d8d9cba2da0d217562a25e0adeaa51bd8258b9b49f1ab66fb1e72b +d0312788da672625511e07ba68cb0eaf05485044acd338305f55c7b67e52af4c +124e54d8e3bbd2c6ec6080dd3e191416acaef07bfecc0e77acc92236749ecd88 +96577190a9e86b7ee306b613e0b19015af7bd544e26c6a3e98c51d98cbef559b +29d79e6bc3ff0966663de38b24b2449d38846e6652159ea825303122ffb55333 +a108e242a05d015a9abb0089a5b9974cffa5eef0de271c243fd9a4f5ebed3b53 +324de92d22fae131fc7676b747460fdcf199076cb5d922e2098446275946481d +681674c97c00466e79ed31008c4f83626ac2dda6b0464b589f01082e5ed3d7b3 +1caaff1052012b1da1e37f3c0049623555b7d1525f44c0824a53903b54d4da9c +083d7acf2717e26be8596a07574661a53c504866959e13dfe3547fb8c5ee9c54 +e4d16952d25f0d32c103c1b2381a3b06ab7a26262f95755e2cef7a028266ffdf +3687304ec78638f3607e1d4c76af0cea8a30bdb7afd9fed23b79acabfe622c82 +9059c90c5bc732c53d8ae7e55f6385ab5d78e0c4e0b55bb9c5867ff9a498d3d8 +dbe4f0c548de9edc0944f1119bd9a2c33d5d1c8de7c5156bccf7d4e52265464e +5e58d93fd79f40f0ad593f50bafdad06a77fbb22982b35516497305e78f50471 +746076b77160149dd7a38f2fdd678ddc2a954ed788a19ddac34ba6ecfa9f0ed2 +f7bcb5f97eb077bf90e7c3852ea49b1a64b3a1e618cc83bffeabd15abb82fcd5 +38b644942b6b9741b3eff1409c67632c6a40d77c42ee0846d8edeedf56100f28 +ce8a9fb58b4aea6fd3fa0345832062d748ede2877fbe30187b635ae95227a7ae +e15f86beee2718058ee928c73d0e6f2bfba3c144d5fcabdfdcd499f8b8db426e +0553781a197bad1798327e3bdd32060bb55c660c24f3ea4e658d4e95f69fd589 +e9b35a2153bd45fde6f56e50a7cbdf803e26103a62824b24ee929b16add5f9d3 +5817264fbd1d0b3171fff576d67bf6aecb15eb25c5bc6024d558725718ea8406 +de77df6446ce372a13fc2d96fa72f65932fc34e7caf2ea065d3c94367070ad57 +84e94fef2858bcaf7c60f999caa4d0a483fcf77bfda5ead04c77b87c69a3bda4 +9e752456a8a91e78c89e72b3d805cddf729c8d13346df0c1150a7e16f37abdf4 +07f8a69b062fa83cc8996e8857d26bb0c09d5a5182cacc745772b78b584cde14 +6f5e78de240c5f6bc995606afd03afb003e0f8f07f4f62478caf38494a162a82 +ecbcedb9ba0d4f074611e68f0cb7bbfb76bb11615cf4cf26772a57d635613fbb +9fae0485183a90656c81750e962f35cb61689ec21f11539df17b2662006e2391 +b5d31851ae55c40d408649349ae3500bd52990f1ad042a09d0f31fef1a5c7c89 +5ea1118ea0c1576b630bdba01bc628ceded0ad35e6decc10c02be1a05be5259c +f318b84f4a0d5eeef0ef8d991e029c55213d73a07306160751c8fa142d010c1b +9e85dce81b6c4638de70603f7dddf7fc3a80540151b985066926c581d21cda9e +9a2a0b9f428fca992ef1970a985b3f5fa6e80e5923db4de6ed7898c508852a47 +439a8c50e416c2b75d7b3c8046513d91af6de66ee4b6f26f6b639d492b105b1c +9049b04aeb7962405871e868f15b6e1a8e8806253672c6eba1d9447c1b453d36 +59860fc02c285f5f2d773f0e76c75d5fb2493a5c26901d9559a9f3550411039c +129fa2d0fb9f5aa4d6a11f490488a08fb3de699fe868ce02120fa973fa0ae84f +fb524eb2d7823fe52ed58ebf40ef5c7609b7b8a5e1d47cdb9f624d53d35a40fe +c7ae7c17bc941a7fe4c9c50777595a97573e3ef83582033e1851577036e02f5a +65aea4282fe5171269ab39a07939b2a71890ca4043102dfd0afcd8688996a45e +7b6a858c30e54a6f32fb19bd71adabd584ab82ebb85535e53788081e553fa09a +d97345c2ff7e6b7dda5093bb78844783002adae6217581860729e94f5455e6bf +8050a1df07128cfd83f682b4d11696a62d204a7d7be0a43a653d1cb6f58a760e +cc565ef2e33662ddd7daf376653963f1485cd1c523d9341b1131d527ddc5e166 +f49f08b1bf9344bf9f7551a2688bb258cf46775a6a31a4e38dd1114fe2e44e5b +3b56d7f3d7f44e3c9f09c6e9e098d425370daf4dc3c638581a3f34336e80e8de +9016f94e65ef7664a4ffc441c52d073d47da7b90c39aea70ee619b199ef79773 +bbf5ad46ce9dd19afdb335492d31fe45cd69650eac723a9d6d0a3c9c00eea011 +daae00acdde96c901f111c402703f7b1732e1527aabdab32fe1355348e76081b +27491e40f472c84e26568e8fe043ae3b0813137b34205d5a005eecd8003b244c +20e0fd57bdb3755e7bed94304a77ddf69a9c6ad5f286bd2e95e4f4f37b6b6004 +b9f7436171c6a17af1136c05bea345577c488112c7c8cecfe7c57f2601265076 +dc5cbfd0d2e66b8587d92d02ecf628c297f4d08c149fb2efd989e9ad7a41cdea +03b48ae9853b03768a1528cef605f9d64045b1c1de64a5e0d26ec5af66ff278d +296f02349a6344767f0b0983530d314a370687f2019ef6c778654c011206e8a7 +c47e5572f904f2946372e8ce442bef2cca4fde1ada3a06580539088c11804c76 +e66c32e076f0e3de041e9c9950dab9d79886a404c081f61d1eb5e0bb4ff05df3 +8412f34b01dac78411e4cd8c6322b956fdce30b66dbaa9e8df62f797e553b83e +e379d96df6a2b11fa7edb9ea2f1fd8ec4b89b5ddf937bf91d3b574ea667a9847 +5737f2bce293b7f9ed9ae06ec39ca2befe1d4378b707e266ee3363acba05eef4 +7a9d71f8a205bbe81569ff184de2e187735829b17680534888904fe67fdadf4b +146c1d80f3453840667908b0bd497d22c8ffbfd1400fbd57e140afe219fa8f51 +c8354af1cb982ef423f250eb9e8aebf30166780d631400ec33bd84bf71140403 +f5cd03fe38b27f08167cbe99bcaa3fbca13d734c74148a4321627b672468905e +c93b528e396a0d2a917ce042d8dfa63eb2575723962063a2487f044c365462fc +907b42eee612f0fb4e34a3fe9ea1a0f168da2cb89cccc1b5422e81f09bfa175e +3479915053e90007ad92ab92a2a0644726bf022737f3b7b0ee7579fb7731ac29 +e7e043175277ef22942a9030e0bf91a1e775f9fa3f6d86ea3b72c8ddb42a670c +68694780e5a7ab25968592d823bdc6e812d19641c1e176e26351ea5355435739 +7f0f92c33c67 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F15_0 /XDVKOU+NimbusRomNo9L-Regu 1 1 +[ /.notdef/.notdef/fi/fl/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon/semicolon/less/equal/greater/question + /at/A/B/C/D/E/F/G + /H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore + /quoteleft/a/b/c/d/e/f/g + /h/i/j/k/l/m/n/o + /p/q/r/s/t/u/v/w + /x/y/z/braceleft/bar/braceright/asciitilde/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/bullet/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/exclamdown/cent/sterling/fraction/yen/florin/section + /currency/copyright/quotedblleft/guillemotleft/guilsinglleft/guilsinglright/fi/fl + /.notdef/endash/dagger/daggerdbl/periodcentered/.notdef/paragraph/bullet + /quotesinglbase/quotedblbase/quotedblright/guillemotright/ellipsis/perthousand/.notdef/questiondown + /.notdef/grave/acute/circumflex/tilde/macron/breve/dotaccent + /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron + /emdash/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/AE/.notdef/ordfeminine/.notdef/.notdef/.notdef/.notdef + /Lslash/Oslash/OE/ordmasculine/.notdef/.notdef/.notdef/.notdef + /.notdef/ae/.notdef/.notdef/.notdef/dotlessi/.notdef/.notdef + /lslash/oslash/oe/germandbls/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +%%BeginResource: font QYKIKI+NimbusMonL-Regu +%!PS-AdobeFont-1.0: NimbusMonL-Regu 1.05 +%%CreationDate: Wed Dec 22 1999 +% Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +% (URW)++,Copyright 1999 by (URW)++ Design & Development +% See the file COPYING (GNU General Public License) for license conditions. +% As a special exception, permission is granted to include this font +% program in a Postscript or PDF file that consists of a document that +% contains text to be displayed or printed using this font, regardless +% of the conditions or license applying to the document itself. +12 dict begin +/FontInfo 10 dict dup begin +/version (1.05) readonly def +/Notice ((URW)++,Copyright 1999 by (URW)++ Design & Development. See the file COPYING (GNU General Public License) for license conditions. As a special exception, permission is granted to include this font program in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself.) readonly def +/Copyright (Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development) readonly def +/FullName (Nimbus Mono L Regular) readonly def +/FamilyName (Nimbus Mono L) readonly def +/Weight (Regular) readonly def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/FontName /QYKIKI+NimbusMonL-Regu def +/PaintType 0 def +/WMode 0 def +/FontBBox {-12 -237 650 811} readonly def +/FontType 1 def +/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def +/Encoding StandardEncoding def +currentdict end +currentfile eexec +d9d66f633b846a989b9974b0179fc6cc445bc2c03103c68570a7b354a4a280ae +6fbf7f9888e039ab60fcaf852eb4ce3afeb979d5ea70fde44a2ae5c8c0166c27 +bf9665eea11c7d2329c1a211dd26bb372be5822f5ea70d99eb578c7befd44cdf +045a363056e5e1cc51525ea6fc061dcebb337208eff729802376a2801424f670 +0e7e6397b28f15bc10b40012b0a3eaeb2693e8f7f627c4c9c7c6c5bff105c1e4 +1b2b9e8f09253b61177e95ea219474796072f4b363fe05fa763777e13b518310 +ac032eeb94b88c7dc8741fef59c541b57b0441c6888237a2b66a182599d1517f +9ec474a9539f1632c9a5a1801fd646b529cec2b430f1cd205feff509b4092535 +29e0b7b372145ddf62052c9c08b7673d36dce58e3e78a8e4788b34e36eb543c0 +d68a36e2831e23c440c3e5f1ba2248633aec75ba8d6c9e7fc0da01af08776246 +9a8009a4f3a93241f2f34c72db3361e701c06538a631f6a8cc47b1b5df7cbf9e +9029d42fad4b90f81cdc2b4cf52c09864f657c7c357180375c0b64206515e472 +c6d71a2c5d03c5143600d0dd439998956b9896ffbcbbb77fc1b6675f1e428390 +144b29367ed224ea9e5f51cb3e349dd118422bda8b6adfe217a02320be72983f +d6fa232c9289e529552708746c4c76df4ff0c7b27fbca194c650679504c0fcaf +0c643c945a2563ed47cd8538edd441bfee93dc4160421cd9efe6cb32d81a8e1d +e1c446eb5ec2a6c855e4449731ed3da1c3ebbc3cfb6553c0f78fe88bea6edb14 +a4abb572eaea91681b7e9f6a2a08005164340dc1983f75b8abe75fc02747fc2f +0c5b31e0f9a8960410d5cc677ea77d0b1b28681ab5e6b3ac11368b1e493f594e +9d037f4fa4c47ee06351cb471af4c1966aad3e51415d70e57eb0d84ec3a655d2 +b0e3a818baebfcc472b485625414c4e20d63b9673b0a0780d8838b0b4004df79 +da0444405db6a534a7571cb1aaff7d4975ea8a578ac37044cb1395a056c7d9e1 +ccd617391a2e852a4d71101cdc3c9350e57657b376cfc7cf7e387414e4a017f9 +943ba9c3aa45e955812e6b8173acbb5e5fd0f0654868def282d134d0b4533159 +c2bf0fb6959689dde7e8e5d22618fe9c8a973a87ac0e853af5542de5b89e7b94 +44ad4496afb696be0eafc9dd7a421856b1c0baf95b5fa887669124ad3698b544 +5e82a4c5cfba4e5083784e52462f3724e7273de6e00e84a1d83b6a8c0e79afcd +1df167b97e2dd796b6826231d31fd02991e990dcf2dbbb0026f9a151c0720467 +e68e2cc0a5fce825564902efd08e2ce18896ca20df47d2df8928baa632825543 +d0f6a5c94630e63411a6adb264443eb7d0f6c3883d195661ca3a1bbaea7bcb41 +d5c18fee8453579ee23f1785112e31c6dfd8e9ecb8681b248f0ce3d77aef339f +b455f3817cf7182d1fb0c53589750be5bd6543beb9c341427d0a4107dd5d6ef6 +2197b85088749f3cafa40a6a3223d4ced495d6228b3398fbbd0d4765cad178a6 +f93c5217bd254777c20cbfbd33673c5ba58e2b021580d63c76bf196391815c05 +d05159b171c9034edbd0e861c5a26f2dd38736457fcd38003882a66a4cf8d7b1 +e2803ccfc1c9fc2abda0271c331247360b7f2cee58ad9cef1b325f62dbe2be6c +babe23a220f662247df70428c1f79c79684890324e6b7166b269b174b98ec8cf +f33b589cc3d3daf1aba6835a22aa2f59f8d386610bfe936a05794242e99cddea +8da5b4e5e56a875c49267e2d48ccae616053235b4b64ae53a573922009e8a05c +a56fe84205488200ac68b62fe4f07572392940638301363c4131ccb86462c242 +afa463e3f7f036f63e622243893261e7ef744ed489397030a6604318da3f592d +037a620fcdc10da51b8f31c816f91016d38efc65b6d463779720ebe8df03be2d +0ec52886ef9205fbfc6563ca80accfecb7c686f0212f85da5024129f01bd81b0 +bb90d58eefd17fb353ca143a4757421323238c5653a3bf9f28cabdce6ff9d946 +867a33fc9ffe0adabd3679b555a9ed3c181d3e108f776e13bb39794cb9f4edd7 +7a607e017fe054811b3ea3f5b02c95343a5eb449723c9fe7857441feab37cc93 +70c285d3d91df0a0e1bb21d022f68f0c0c8bfb311b8efd056f47c67b03b45dc9 +0bd78333d366796421469cda8df6f0095a5eee1a56621d055a5b12d6464cceee +9f5fb6a40ce44ab669786f4f0ff1f348c9d3712761a07eb8aac26c35c694e1cd +65b01b32a2319a381734864a06a349db71a2fba74ddd58010c94aeec901ddeb5 +41e0205df489d02664b4e2fa03a404c8aeeddd6d1506bfe56e2e8a6d3a83f79f +35f2d552dfff754bad59df45582e3aa87e6bd45725b2c44260e651b70af70186 +8b168e440bd70014be5c4ff89028997bde67279b107f9fec9b4b2f2dc112d811 +4dae65205429ffb3c9734df32328ede30565ad65d8a1aa620bd543286908d747 +d13cec2a2f19cafbd2ad480206f8b2b39524a2fee286cea20b22b67dde321e3e +3ed87d8f7d9b253a16c648de1c9c8cd84c4f2304510ee263083ac617954b7c9e +62f397daee458e60e6058addaa14ea573888162b6777c4b5e80c2fbfc8f75ebb +2026c01a1ea38b85c4fca949d15b9a470f36e0b697ef5dcee10c45f01230dc48 +728f50abafaa52ec5f2899b09db8b74f46ed55c8efbd3f54f6afb0691a992b15 +e1bfe3b6fcb6764227aabba94c4450183f139da7e12df63878b0aff0d07c51e5 +21a29ab9fa0482e9dcb043cf704f17bdc1fa1f79bac725d6fb01dda18a700eff +5d691d1573cb0ba677a9b1a62dc483fbbb7e4fb0ee0c87cd631f7145b710d181 +85d5bf85df1cff42d9dda4430a8f6f4b6f6c01d20055d8d9cf1d48f268e046a4 +9bc64bcbd7742d090608a1c025f39d44bad9a05ec2c7b5ea4b48959f1cab0974 +537bdbb8828a830843ecb3b6bac3589cb8a35fddf8a55fe4445ee3419ecb9dc1 +3c9a3045f5fa5264860b6e310854cfec5bf920061c6a4784d911fbd82c6b5353 +72cdc7ff3dba22cbd02303654e4d1ce6c5f03ea5719bb456d1ab804a6a9e08e1 +15d0ddbc46f2ff494f0703fcb9f6c079e5af3f4a7bb5a4546f9ef8d708732fbb +1bb4d11a942470e0a96d5c83d20343876d89fd6db3ae1fe60034cb97659382b8 +03a4c8ee4a01738285c8af5812c4de7a97b1eae85315c9497c082b28990e232d +7603a06ade5075fa217ef86ed78492c31ce4082f14a6952e0d07ca9d8e15589e +7c3f49cfde17055e8695923477b71b4c09986c62875e25576dfc3a3854c1cf5f +73004b97da00a3deef1be0aec1920342613d3e4f805eda2ac121809b02a42d3f +de9e9245943a23627ae0c1c34b5e6bb1504ceb67966e9b6f104fddff62e82b16 +cbe3d401aaff4d9b44236ef0d04b7edf16eb08b7d19862effe88b696d05008ae +ffbfd118722a55a1597604e232416c2190b36c30928f82b208006c26b85d7428 +7153fccc92a65f04229c8d7b2c27ac4294034a051b45f6ed5b0fa3e23af3b5a3 +5f996bb65cf298c4e15e98d228a719e1c968e7d5d0a75a9bc3cdf8b5c4a136cd +a6995d94f5dbe307ae1ca6beb56dfd09a6683bb1437fdcd537e43cb1633a72bc +1e72a5f98497227072d863dee990660c137064f8f73d78d9c5a40096dcff10a9 +4e3c9dff0d2bb80c429e2c135895b2b3c5be663adb1bf39e3125e4017a6050c5 +d4dac24a8149a6166cf87493f766d9706e13a4c3b443722d7ddedf777c5d0bdd +780e839b10a61dcbb8c06caf2246feccc66c6fbaaaf8270e06a4838391d7ba0a +a3d35b278235fff9a707e8da8344c078d88e8eb2b5e2f8cd8f2134d458221623 +1dd96524af97b92662292f6e1759e004e2255dbdc4e0a9fe007e550144af357a +32cd32e348fd2e60d4c10c33d032fc02ff8a897c4b4b5c35992e6caa8bc4c966 +6a520e2e98184efcb59e2d534fa34c428bb51998e68e91dc9382e28798845da1 +ae9d6e418c2e3b05373fe26901654e1e1a7849431681479cf05e0c19392ac9e0 +562794d94316670bdf9afe2d368fdc31fc2a2a98dc8f23bc236690d897e209b1 +c6048724f4ad378857640140a356919180b348fd6ceeb5da8e4b3f9dae1cda65 +fc155e10b53a271f23c65397711cedf404dc45dcfd9d3c87d57c1365cf9e6f9d +64a11df0f71f72ff52a8a4c899879f38e797867570844ce904c3104e28f1b85c +e31f5e4dc09852f5b47b4fcf2b1fb394f4a8c9cc8b807eaa9ad4d8ddd816a28d +7bdea3811e47722cb0a11f3967bfdc501f5f19f5b7f925455da271243465b55f +56030748235d6c1e8cda657c5fb7c1ef58427b148713c569d2fa172a2d32e50f +7440f4cb961d34feff587acfc3009b39005f8ef1b91c28718601d140034b4030 +05dcca93b5d4a0778cfc1a3fbf7e489221c88c27e05652d3c3aacae2cbcd9b5a +439d3687e32bdaa54a317a6f70833c88af86056dcd68e8546832e7662713ce20 +98e5bd9dcfee48545391246e794e408adbeba57fc3a3ba4e18e487abd6f26a3d +085eed9bf8e30a77c85271294eff2f8e3def17482c5455dd60fb942f85dc73ec +9f57db31ce83e7e3574e17004ebe6fd903f485e5ea88c8294ac48ed09afa41d3 +80ea17e2cd33190477a0492a51ba20be31a367e6260d0dbab050cedae7659cf5 +a67d94540d7022178ae1d4463f84630d51af81054a6b7ecf1229d9ba0a6773c8 +e3aa1a9d95416fbeea9ed901f1dab166058080d42f90499b415ad8aafd99ac0b +7220401edb7a32b298bd9b9010679a1f9369a5bbe7cbe04b2c395f1159c2a2fe +b4a85292714a8f491e29c703932acd583f6405828ca8331612f5f580c049da26 +22a27b7aef2806c427af57147beef345e56a2ad82b0fa3662a31828bab7f6b6a +abf00d5bdcf2d595ef576d7da2ea634a82458444145803d443560553a7d17313 +b67ce7fa22fe118e9e8187dae14e79860b371c83ae2ae787210a86a6fdcb95d0 +c05f1b2ac98eaf239af2469397fd8afa989eb8ba0c15412b9f90c1555cbef583 +25c0999b1b10ce4345e6e949b375a91ec348eda0b0d418ad25ae482e02cb47d9 +ec19b444406d720a45986bdf85b4181b8064872f65e7a93bde15ff80ebe555dd +8adfc28b6ab58525a6a72bbe50cde6461edd83ac9359c0042709e63ffda54a50 +a5a6e72058b498b7c494b2a7e68014bf1c354506c4dda52d7173e6530340f834 +7db62785ac8e70a8f560574249630f3f89c159f31ce437b8a86cac7f5b25ccfd +b2fc41fc8392430c296146477d501ea752cf52ec9bfbf462d12b39291f49ae74 +28485eec80df5a1fa01806b3013bda44477e671e87e82f58fab32ffc10c111cb +76e7099f297d6a67a7374e26109f751361768ef8118dca742c8f20774549a2d4 +da72d15706888cec1edbfba70bb8149b54655eba7caaa85529df4bea9ce0c633 +38837abff2597c6b75bd058dfe7091d3719efc3964d1a386b7c6b93d491b02ac +86b08ff115b548abdb68f67de3b6cd280ee1544ddf344782fe30913a21eadc6e +314f3ea2ab3d9a3783d5f9be76c4caed815af7def664098cf1a167444f31cf02 +b9229bfdd8109322df0cce8fe0405d523bd8020753f3d80f49365d5006829fed +63cb9571b219b3869dddfdc2212f0fd468aa3a8c78d06f58fc6be0753bf19eb2 +b014e28d06053e931257185ff8a46b2c443b163f9d9997cd2225a33ec6bef513 +41aeafb9f384bdb7f3c78de5d4adb511c16259b1916b29440fd8cc01dde8ccf4 +e8bf0a4dc53a1e26c020f813cab07eda515e7d395348ecbf8c64186fa5a81390 +7653da3f3143382a374b96398d14bf60fcc5f7603512bed7e8b33e7b20529244 +187795b01754b61d5aaab742be9be4532ddcbe6b88671076aa9551ffd58e4930 +1f3fa48529d85586f1e197dd896f91f0c64ce80bd48519f8c1bf9c4816622cad +d9cbbb97e7628a64f96b6816c5b0312bb98a23715c3de2a797015203e2787aa5 +ef40b3e17cac398805fe76a33819d4825f80654270445ba955779204f5e8fb5f +418edf66b627b992cd3db5f04b18b5dd3f742689b3182d41760bfe95be97e313 +ed97e32ecdc16d3d574a2ba1092408b5ad6c165a39eb148b2513bcdd01141a77 +0720028f31693360e9909897d85bcb5364188d391e34dc98d86d4909fb41a13a +cd4e43c7f943889aaf1d430714d1b0f3302432135a39b11be63f77d04780a191 +cb686729a89c7badec30d3a9b416c32350eb416fbd37104d038b0252a8b91f77 +45b543618155a76f06274dfcc284bfea8726e55ee8b47df6b4760e22c8f2020c +e0da1fbba9564cd974075c1670bbbfa32b5b1598d198a1a9b82d87a7814f5d6a +e5a97d890ae6e9307f3147d78d4fa40f5388b9759429acdb0e20d9ddc923f4cf +f2865f95a8fc0595724b0043e90091a2315ea8c071ab631ccd04c3ea77541646 +b2fae2bd69c5bb80849b85fcc583ed6bc743c7ab0e83634e9625262ca557911a +3715e19e727337fd16171908a75e44fd7f6ba76157167a214f11c228bb1f132a +b6cb965beb1aeb597276e4e1bf52614076a37eb859f9d61669257c195560586b +b567183114c9895464a71774bae8eb31e9de3c11e0011f85024f749a571a3e2f +0fa7d8ce0d53deb20fd2f10895bb8aed95ac89f8956a8c93e809536e9087cca8 +09106a42a59417359e0ec681c5905a6024bd3208fed44320b723392e3f900e90 +767a6af4c4e67b407b215422a6f409d59c309d1999f973fd9b3746d983b0bb9e +1675aa41b9f6713630710faa59328b3659f559a5e547451191d88e336863256e +d43a577b77f81bad982c3d06cbe5a12321cf45da2d300346d8534c4ed6f449e5 +14ad627693dd361913862aa14548113a553b5558f8da4f5fe5cce86ef8b6efec +00b188a5fa1ac6cf819110e6feb793411cfac4f900a379178c2d7990f8adfe06 +4d741594d2134678e7f9789fd72e87985334ce7e531f0855525b9dcac36196cd +2d75d8bbe2b02ad9b20184d54e9ac6bbcfdb0d13367e2b4b4310b9f89172d59c +385866af42d06f9477dbb56e8d3bc8ee8c129849080ced3d7b83d9dc1a32da0d +b79f6e1760b7b836e2d9a0b59dc7312a3cd10932fc771d14f0f2278479e7168f +2f4e058c0177456811b2de2b5358ef33a162bdbd4d908e3332930d0e1bfdcf35 +ebaad4210a5f80a39279c5faad2803a748d96651778d0ce97289bb70ba010d93 +60ca05073141c30ee35fb9b8d9eb3ba37cb97fe42fdeef382fd604a1cccbee9a +65716ccdb777bee502ce3b654612362291ab13fcb507ab797d697f4f32d85763 +39b9cf437eb119eba024e775fe01501a8e7982d266531a5a9316abcbaf5b9672 +8ffdd900cd9814cf82b9ee6e789309cbf1dfc11f715b1a201dda33cf7527da51 +cff0e36d2f4856808b522d5344596058508302f36554419f9654f941ca0804e6 +b38a6d596ca3fd660901d1c3553aa92bcc95703219cdb0cc8bb540c2e60ce0ad +0eaeab36ac18b3ae477967bf586ddc3a45b5949ca5fad78910e834d8c83faed8 +3cd8b0546efd2575a42e8d4e44c80f375c9d960686e6885a6cd283ad3c1f1a9e +8e0cd7ed0590ffcad9da423285a26c04960dfbde0a5315d81e5170ae081644b0 +2aee581ab984fc189b5adbfb155a52d9f7ed759091062e9d2b2c2b03c9272ebc +a0101422d252aeba66664b23a123ab5fb05da5c62e83934c10f7a9489fe6a26e +72ae45fa17dfe3c1badf296c09a375d2451b7b7ed5dfd262a7c74fa4a9a4f5d1 +f431bfd1e79decc99db3f7eddfa78dfc46a47c0881f500f8fdb96aeb4fc4dcaa +ae0f9687e6edb2519ea85fef772477c3e33ddb52900657f018ff227701992647 +c9db8e4802cb0d6976b1cb0e3dccbc573bfb38ecc9db8a95bed9c4d90c97d3b7 +0f87ecba2fc8b03a7088f1eb02875c27cbfa32efbbf38ddfa77ab23c8fb36d1b +ce1112bfc0de7f911f1b096461faf86cc41be0bf61ef31581847b1b478fe28c2 +cf6a34770e43a95e08ba67e429545a65bb9e6e18a6c4dd2a34ca9cfbdba9cfe6 +63826142391f15c543076928f9867bde8b2b1acefe68c777fbcb70707f4f91e4 +7eff73b0c3c26986d1ca582bd05873f4e40179723271d1799dc4fc5e3dd9cf77 +64e41b8aa8dfb907abf53e3a0007a714d6c941114f5beaac82c46927441e3402 +36c2fb70de002ae35627ee5119577ad7fcb9fe5deefc239aa09e6bef15aee873 +db24b3cd614565415a3077b20c1b095a5726ae475c889cd9341c93d4a1984709 +5ffa8e8ef4f31ea7dcf6375177f319a05e551a8905bb47c9f23cc5c0e5fcd8e0 +29b3072632a060e6891f2b77bc1da20cf7da33173db210baaaf8270e0315b6ff +3fd6c2207b1a429577d5d9d66a0f8268d4aaeb29681a21f7319ab813e2a1eadc +39b8eb7aec1c33cc62809a10ef560d2453ed7551f097960efb4e4708858d5729 +6307189fdfd3ab62c75a7c501fada7428e157752fcabfe629902715193acb11f +ca4aff2b0ed13442450e4f2a4873d5cc3689f7d4f7e372326e2f7093bd7df4d0 +ca957794a61a2e813e24155ee3a67c4312a06c72f84acba679e67e6c71f43027 +cdf8a21da3bb5f68e576405c1283016e541a3e9eadd67a20ff9ad7a658a8b831 +2f30c18c451f553c1149960156b201304263eff2f2549fef2e4906909c1b4904 +ced62fd9c0c973b82dd66044bfcd36e1991e0b6b84b6102258e205a458952aa9 +53832d094e6915c3a1669d4f532132424fc707dce60bf9ee9e06d4035394192d +922641adf5777d563ae7960c8cd6175dafb255747737b02c40687953c766601e +caf56e747afdc67f8163de81bec4dbd48b3712c0d24e92747d98d5d1da952de3 +eb9ccb3a132121cb1c9b2de42fe1417bea313043b5aec119bb0d1e3058a82087 +bea4d00203fefed8ac113723b1081e92ca7e91363b86eec7bb5dc2e123e41c66 +577dce271c93c667cd8665372d5d3b906070bd229489a91867551f3127591bca +b1ce86d7d9bbd5f265bebdca4c58af03023e9ba2c291d78b629ef48bdd731c45 +591edf98d4eae6290a00c331780943d1c6671ac237a2844cbb84082c06d39cd6 +b04a2e5819d27a25da749ee7c94488fff5f59eb0a3789522ea85eb999c66f359 +d1ecc77cfe14774fd76b97270e30e95bec696aef56f99123db82304bc662d8d4 +6b342e53171a512e7d435f3009de3613d91a6f32f9ec2e11bc98b09c4dc4d516 +8a2ed64ac351109e5e38a68caac84ab583421eafafee02980bf8d8fc700f1a00 +129564d5efcd4f7896130e76fbcc6c6ad66411285958e3d17c2d408960cecab4 +02c5068c43df99d4de6b9876ec4fa2128d9ddcb0f10aa89aa8935f22c9445804 +4c1b0ce6cd07c272cfaddab0719ef5cc8c597960b7eea7b4cb5a10c826bed1b8 +219d464d72a0be58ae80de6edf876c04dd2abdca41253efcefc0552989dea491 +9605795e6ecbac4ffbc39307ce1fc794d4bd78b64ae38b2750546b8613378f70 +7c5c29640874f1bc3549f9a381ec1d13ab38b1c20d59f90dbd2397a573ffc9df +525a4d4e995618a58148687c5c949e14c0879316236284a571a5a386fc94cb2c +c5f7327f9269996e2483e9c4f22a813db3ba38cd036a454d335497f53d654d6f +e28e4583febc2fe34cac50be37bb6e42b8f92f694cfd4f805c6423089bba4461 +8e36e92d90a06f749d8a1dfd93bd0645dc66cd18ee797ffc06d4938ed9fe7959 +ee2ee5daac4e5f2e15a8b4c311eff43f5ea1a13fb288ac57267b71bd0ae02964 +f1901a7b5005a834e366399eae62532648625bbc13c64c006c372491878ef7fc +645667f249fc7ba564e152012e485320fb3c5dffbfcd936a93916045e0ddf257 +992e927120370994664643e2d57678fb19f0754ec4c483a8b6ceae60d39703d9 +f309e68388cf20bc752caee575c86ba39575a07528b65400cbe9fdae6a5f307a +b199a54aaf70c5889bc64a30d5cce65c2276ed1d9fb30bcdc94a65941a2b0e76 +3940f7d243c8de8120b5b2f2995d2ec3c7be6421aa1f7a5f8b6050c17771c5f9 +d61330fb818df90f3062f9f21c23fd0a59d6ad28e023e0d3d7eb4dfbcf0c6bc9 +9fdfb74f740579c8460fa6755dfc800c5327da99e494d9e18efc6752f1e6eb31 +5e399606ddfe98339d085bf92634d2f557d2a07db440f45fc2e60732c51fc4c3 +047f9f6dfaccaea71a9b14ae1e22223987cfc33856fa6d78be0c8b4cfbd8d608 +96c0699ff248a80af31d111d3d7437427688430782e1e99858a2379852ca04de +bf7d0922b11865b5771d902dae865c3ff7aba28da86ce91a6c031a647b6d5676 +672480a7ea057dd805ade4318482e9f5c7e2592df1672342b98c8b67cf25dda2 +f69d55e28f1c35b070acca2e4c5100c18b102164f534b151375bf8e9ec27cd8e +e43a7a23cca2c5462ea92b202d9eaae4da36f8df69c38a4689b04ba3e6e6a2a7 +8b06763decd52595b21d5348e3f6fbfa775f8b88330a4f35bc3213a5ba19d277 +4fa8c256d06787e6aced43124b422d3ed2ca884c64da93933135926880b21cac +35e222c4b6076bb2b391357e0c643f04d209788fc140c7303c90a3c3faf5fccc +046d3b268154e017f1e4082819de8a5bef0c1725f008b936a243b2eb850d0900 +4560651003c30ae5fd462d8e68e4ae51d17b636bf9d45c7fe07255e470d2748e +f9720203181e528304f71c1fa2fdde7872ccfe55bb77c8a04b529cc5ff114c64 +544c4896f091965dafaa0eef5e8671d258f4303512567dfe2eacc764f0ab9a78 +206ddb0942d1dc868d52241185e7c830c57f31ca9c08453c6a8f35bfd7220a52 +3e3148beb6fca0c2d56048b7755f068220d59d4fc713056bde03b1146e8e4b37 +cb5cb8a90858920236e561fa21f179c12f7be7cb63eba15759bf0b6299ef3835 +b8d41edd37c1f1098fa2bf3cbbfe0f7a98620e7b072f5ce1c90bdb8d5f6fa9e7 +8629f3c6b4bfb047c9ac1869daf234e4a95bc0bb73f036de76595dcfa2d5e856 +22b48bec72edc8a798ae673dd434b01e89019a908f59089c9789f58b8350a43d +b00ca1fe192390daa4e85e7235492ce567dc403ae5fe8f0761274973e07ec119 +1b0ae1cb7f6f31076771d896139920861da5c58d3403a416f243f1b58cf54e94 +f3dbc9351633887e8d7ea6f88fc4a0dc6d2a471a78f98ebdc2a98613499a80fe +b166a4b803b7b4ed05ccabefb2405745f1ff28921a05a0245bfae09355910031 +180305de2f64f071a7abb75a72eff13539eecbc4cf54ff0bc87f6d72d8a742cf +5073aaf7942a137ab2f273e22391ad1d0dec9dafd58ec68553be5fc4e6c4936f +a3e67a86f4ec045cf294a1cb7f9a60ebe5178026fda700042cf5bfadac3d7ad3 +17f9bfb62ebd5946992569e9aedbdce9f3abfaecd6d8fee82559f0888d48f794 +697c54b805026ceb1d708751d88af0e5cf88332068833ceeb24223f5b5025384 +066f67ce49e586ebc4249bfb15074cb522c3626bf2571af43f0164b044b5aa66 +9d8217230edeae2453fe02f018bf8a8043cfd63d744388c12cc8430ca4157c81 +e7018b963021ef43aeb42f1f5246eedde76ad7507e65225430f2ed40877214ad +78a2e199f951e52790e30ca09c0ea8bb318756137639532e638661228e314364 +1b1d60aefb5222a3b724674ab6fbbc3445b878f99b629de47e52e36693dc4060 +9fcb048910f3d70211659cdbce05f0733af96afad264d1841b2fe33f3df5262a +92e98f7a5873f70b931a7c78863dbaacfde460906281d5ba5accd188edb2924a +bfc1c6313cf0cd29ac91d2d374734280adb1ec4b2dac9b53da1134b7ef26d10e +e05685ea4b31e5396c4281ba371b59b12516816675ef303fe4f01f1f84de922d +69edc0d18568c06d4dc79be0b9754b8f88632fc3a74fa418833aa2943c05c912 +b7b60343a7dc7a3f6f1aea9d83011afcc00619ca95cd8f97ea85176570bcb441 +e9b74ce8b100efa22290b3dc8113db1b383ec98f8367eca2844bf1742d752d29 +7cca604ed822c3f7b560300b39afe9fc8d9340735a718b09064157fd10d43dbf +96302c60195fa1d5bde0c68c4f235184898d0381849a6011239ed7d6c47814e0 +a163b82e56389248e7594fb9f4a2522ccea4eca0d36e1295b3ef67aead84cc8b +c297009eb5d21eaad7ab4176a443acadee13915c5ca44ff41ccc2bb9abb47fd9 +6461ec3d38876df77e5fa9993a300c39813f788e17320de56592806658b42a04 +dbcdaf7bd0684f445884e6f1a574467e52019ee8fc129ff3fe74fb03a5d67047 +80155de767defb2964317f6d058d5b8cc35324368469291ebb15cd320d566b96 +c5079d12493a8f84dda5005f8f3fd7038c40d1e704b4faade3ccbbdc7e90903d +fd3da3bfeb37ba41db2557640f2bbd6f3f49d9e37925007cb97f98c6e365d06d +282a433e1aa95dbef41be2facde3f5a08254a366a74b7a2f5c14898881d4be99 +aec4b0ee10022dcc55501637ef6f6570d437dc8120e63045002d7419057e5c15 +6a5539ebefa7d632d343a41df8804a6f855eaa3186b3f97fb7f79fe1377f5472 +04e186f1a97011fb950ecfbdeec1ff992b1ebc6837afbc0d9362c1712b114bb4 +4747c291759e7fee3f81b000f9ce65feaed5c16287f5e812f152ec27815bc6aa +35aaa245c882c9176baabcbb81548b5f271c42169287da48a7c6140af35f09a6 +b82abdc84b8220577cbf0ecf0d8edfd303f468ab9d6a2b89d806b3e19297eb13 +eedade8e405ae9e0e9412525f95e6a7716948fa2ac037dce19d67a156c5b813c +0af189b9b778bbfdf730c2050091018865e23d6cff0ea4fc0d26a0cc510ddf5f +456f6aa4f1c33fe7b40f5f8576b477970d6487275389ce7b2444f09e3fa5c426 +9090dc59354fba985544a261230fb1758bac67e142c4a1e71664d7f66eafd525 +22b83d1f2cbb5f97f04924e8cc4645b27331eae812266982efccbccc4ee93bed +e1e0ae7e88768e690cfaa0abba98973caff66daa632834527b26260e0a4b1655 +3994bdc9c729f2d45f72ba1c510a000b731ac3d9191e1faa5c9cbb7b94056d90 +f65df04c47abd4bc12b9ba0c1f84e4d77081d773a9dd939ba4c4b32785bbb337 +ab4df32d20ce0df7ef0374dcbf88be107e8813b5a769d530cded5649ec7de7de +0f7f373f006ce997b6f7bef0c52d49b8a62a620a37069ee851e7d23244f6a014 +4d50911d347551a63f9ea59cfe0159797af521c09bdf75e12a4a8e4c38ede4c4 +4e7a9712340d42110b7cbf4061ba2f2a5ddcf67a39eef57345975a9198fb8573 +f34b9a350845815873e4ddb7866c702ba7193fb92d21bb74d8bb4c49f2f3c7fc +3b703bcee9e7745fa637a9383786fc2729c73c29d2efa5ea274d9573265df506 +c1ddb510c9f3fdcd3a80c0ab90748651537efa2d8e0bf374472b5c7bb50b0101 +7263ffae7f90a979c3e5f3cd8a5cea478627890536251c4c16c0f63c1c822efa +66a75e01a68758fd97c5928bb2b1df6f2b74d2950015f2eacca793e7888c26ee +723e78f3cd926b1979bdf422bc83b4b51d1a0ae3ce120540e9b653728d769265 +c03c0a3cbee6240c0de90646e7ab730e5e0cf1124566bc16ec17989c1052f8e1 +84590223348e5b4510204322929d8632c4bd136c89169d45718a88babd7f2cda +62afba21cc46bb3207676b96695d911fb99bbf37b375ff4fb8be949fcc4b0481 +3776a3451fe65a47d623565160358c977d4bebce7aadea5648814b8769dfbaee +b8bc2da767da69b10daaff6a50b6a7006ab74f8bd0ec64e5681199b7f3bafeb9 +bd0ebd1a79554e8cf3e5896956d279d4d27202a4667afbc46b84c6b9873e8ef6 +9d5b0777a750a5c8ce86f3d5851cf3203e8b47edaabcc6c6256872f31ff228d5 +7b686b38b35d5dca23c755a5ab9e661630e61d1d376a46466b1f0100f66affcb +fd1d6befb5b196143998848e48119456d6f5791bf1473a2cacb9973bb80421fa +781d90e0c1e6912dcff9ff07ebe821aaff09597bdea4e71e72136c4e37946f0c +146b9d507ee79dc7a715cf4d65db2614cd87c5709112938acf9bb2e01187fc03 +5cea0fd5c2ca980adb6bbf5b9eb427971bed47970a13775be150a7a87bb2b8df +a92f8c86b98a36ab956ece9f5c562071306642d74f177ea0ebc1eadf96cda6ee +4c53703763505ff273c296a11adf59c4919f63c78f9b7c2fa998f5befc631ab5 +4dfec01d96fbd7d076357fd85f26eef6c10aaf99a7639c5111b3a13bd144bdfa +daf1fa9633b69feb2590a878ce4621251a2b860b3e1ad8d7a6ac1a896380f206 +158dbd525bde081e9e7c58f7aba0ba68a22065d3fb7638ab4b2027cfdf4dd926 +0f624b197d19691e1219f705d63781d6eac4ed8bddc3cbe2e7c735f73aabbfa8 +01081532536832bb4455483b827fa9f37d547a4d2cfc98707e5a4efe77037671 +faafb5489b64ea22fa51f2df96a89e8f986b3fa39e113be69438f1a4bb1b5d1f +33ed7ca77228938a98bf47fa54eeb2da8d81ecedec102f71c278d824c2bf5bb5 +37cde6342b1ac156946de7f6c4c12e1d639d83cbe78d8775cce11584a4edbcf4 +59c05abd0b590172401b83fe9cd49b347c01671277ea43400b1ff4212b3d02fa +cc6d384f815d7fdb652ab34d7bacca2e9b2b120de79e3532f81d778b6081d631 +32c88f10184f07abe8830a3f5efe712e7e3cac875f3b157ca3a0dd8a0417d512 +9554ac58171e09ae6ad91f69d3235be00c67d41e00b6988b7df3a07e5d65538b +6f600988178e4c98db360c5ded8f7f8b7866e6d3168a085ca9a823a347519ab3 +5f4fb80774aa4bcee175c02cbe39ea9a0ca56044f50ffb2fd637f925339d30ba +8f4f7fd7ea5a606dfd7b82ba69b4724c960a5cb49ad40f1900a0969cd912957f +345c08603ed7e8292789984bcfafc504dcfc19eadb79ee198dcb6539164db7bd +4d210c9bde5bfe4207c363af21967146511d70f7a0fd682afb045cf22a37bfaa +edf500dc18251dd086a8d2a91ceb979d2a1e9cb45a6b59afedf66174b764dfc1 +1048356c96b585d142f943ec97c62de95f9b8a8253ee0d6b2b0153c445563826 +787921b9a60417cd4075922332dfd82be6d45b581b581c24c4548ac5782f726b +0bf70d2d08493e9a96668054bccea2db3f66cfa6a4d37b36418f9fc8d8058c9f +e713810483a5e75b3f61cfc012dae494dfc2b717cc59e417e25e8c0e21f62186 +acab4158cdf47343ad8b73dc8e43dc792dd29897d8aa1fbb977e9a3dd20fd247 +d0ceb53d2fcc627179dabb49f2920cf8a1fa4d57f39da7e5ca0a94d377cbb20e +2c98445881201bebff5e33ce17d8089f552c3dea96bc70b99cdad2289a3686dc +b5aea099076ae9450c3aa43f18a3d98d711e43835c31f566866ca556b2945738 +f359ef7e7ade8e1f56bfbb0317fc2d08846163cf343c919adbe19686ab94f7b0 +7a06f3d97d5545df781e11a06b06b175fbdd1316580a66af1d94f4247f158c59 +d8e1fee6ecb6ad565e772fdcfead3898a5be123f2d0303ddda02b8e86c7baeea +70eca3cbd43509a85b853eb3286deae9e29921782ed417b13cf1e6775921b2dc +ff5b2424f98bf14408d446d0ab530d88f49d231315c6739ccd0cc8d01cfdc259 +f47bedfe7a53dd893cd5be51674e6ba162e1a8aeb2b21ad54819bd3d648318e5 +4d651933c280e81a327934ef0eebb83b795b3b384a129c16536bdb05bb2ea560 +72241eeb5f35e10fa050fc0f05fe4deb3e2e8eb52a97450c56594746d0278802 +9559abdc108ddd3431c2cea2da1886ebc7a973ef73038004fa13752c80a35ee2 +8e5772676df858dc9ff0d05c735576262b80e3e49751d78f2febd65ae4c1d0d7 +66cb53656583299d2c058bc94f272d398f72728e72368362a69f69af06a708f7 +ceac24a0846496457635fdfae466621eb4e0755230abb71bb5abe293abf7cc5f +8ea2fc15c66a5b2fc6a6d510a6730d9fb678a485616374f5c1c01b2ce834add5 +6f8dba31a95983c97af9e9ec5b8406fc67dc045c551ddf6131834edd18f79d55 +983aec1d18d5fb2209e87f1157df947772de42d04da8085d3691dc7010505c0f +a9724190d9a82611cf435b360971bdcd2e569629d98d439da052bda080ce1e33 +bfa5ebd35ef2e7dd77bd517f1cae2250b13a031c69bfe0d147919c53ad773024 +142ecb1a3ba1ab50a941fb54e63ef49edf844306f7e5d12c9090d2819dc6e450 +42936015482c7bd75693e910eaae10f04385f624083d00276d0499cf9891cecc +d31b06128a7afa49154eed960f37e7fc260e1372f1d4559062471db4f0db6faf +efd3e6e06b578e2ba8ffa1e9c3f5a787124a22e0111ae960bd85fb1d62b6ca5c +b2b3a87e3081470706237fcf936e37dc5b408d0c41299f921d810e01b5052751 +cfcc27024185194c147fe01bc1c4409c520b3e3a5c0f5514aea4cc899ca9e9ff +7834dfe5bb0b4b0b019c1e8163f294fb6ee50b05fec276b53f04160fce3defca +2c33ff34f6b1515705ecaba0aebd40a99fba99942bd8d451e1c1e489655daf7d +39437b97be715b11ff28fb291b972b143da98f5c66b2d02a47850765017bf4e9 +82e2bb732dc64b51fd4fdd3d8144d1231548dcc29bb9927280492da505dfe82a +dd17fb67b02ef0804bc82339d60dcc1c0f8789074747a805a7250f494dd1e9b9 +173110c4b3f2154e865371295ebad4e321f15826b3d3e61a400bdcd15ead2adc +2a5f00bc25e36413e46e195eab01069a35f34fe5c00f46b90d2e444c8d5e8a53 +bfaf1fa61745cec24611b2854a7ee8532b54b40ad523f955a4fa2a9c546dea87 +e6d9e2de21fc4b3b2da747fb3075a641b29f6d6cfc3ecd725f26972e31594686 +111bfe80caba23be92b04171b738c1709bad40060fb0b603d3a2ed6e7d49daa2 +627ea6916d3fc19815fbd0fcbe5d1ec8a8c7a6a7488b465973d3c1991664bf71 +003353d2b025d571348227ec1700407e16fc5bda2cae07dbe55bcd7dd0207219 +f4e61479f22c8b7aaa0ec7281e933379b5d25a6ad9ce46a1c67a488cbb315f2c +08fece286194bb86c66bfcda0fbc668b8b84c2af3e9cc85d065e17f55863529c +d1668f07dcd6e51caca4eca02811c1ffb9a4eaea01a41e8bbb12b1d23cdd10a4 +97d1a6b9ad43927837f9b12b9f703d414070ee06729c1e0f78d5f63629739f5d +95cbfaa9a695db4862149ee51c566b8f94f79ef9a3de87c0ebfd3bcdf4940bfb +314e1bcd17595f3d041b65e4e7765b60a192c4ed917b8361ba0b5fb4fce8f49c +b09412a1ae8f99d878a8fbdd375de3631a63119042e11e6d742f909fcd775784 +1f5a40a168b4da3dddc65d947ad0950a1a275fc72a923422db5fda3d54e4ed03 +a1ae04ab0f59134abf88aa65d6944affa2bd46ed8c5596062e4d32536d2c8ffd +e5cee1bf927d1affbf9dd4e214ef0f323a9f48af8ce0ef87e858edac7a6cbc3f +9ee530f7609cf023032a19298b334306ab3f5ed123b7652aaf77ef421dfa4ea2 +e1dbc68390082b50940aef52f583767e8a5d9eb33142f9883ec9dd26a4c0a446 +31e1b1e55031a9defc48060e783c7a56426e4f690aa6cd006c5a9fa76310d351 +9f8ba5c79c301bb370d30c7b3adcab60adb70e4b4cb9b9dbeac8bb08f07aba62 +3fa6c7805a38a4cf9c5b7f2ddd6dd510b174f7c63b2d5f4e391005bacb81b7e8 +5249518ce22a99e8811376e7a464e22fbdc4574ab3684b416dab3526b3bd0c75 +0acea306c0d448fc4942d2c61d44566f8a058ab93651eb319affdd9ecf2655c1 +d00500943b59360b6c75b780beaa2f1b98165ce2ea6a64aa9435ad5b4d57a089 +0fb6274b5f137ff957e2dc801dfcc8f778fec72a96b31e7457f421399dbd9dfa +c99e611405a24bdf0bdce785d6ade5a5c09ffb66f787bcc2ca4b7e0f5dad5453 +b3d87e5ba383065143952a9364df8cf4063b2f7b3ab30c263e5b92ec64c43c30 +502894c1b01fee36aac472a6e2adbb9b74129074e25e4cfa3c70e8ac2b3d645c +8f54f45ba3ed89629cb4f2f35c418ef74a194c496c4b2518429067932d57bc0f +7569bf4fcac26e621327db71e19eeb5335d8a6f25c99d6aea57bc6ca73238c6f +ea54a43c09c65c83d5319231adc05299a668372a9f77833064c460b312fd39e7 +49426fa209cb1f5d3d90c043603c8f997470de5cded5bef35daf0145f5dca5da +50de2bb8b678e6f36c53643aa97f3fb0bfb3191ef20abf0022d160732455237d +45d23239e4700ca5d7b71231d537bd032c3f2e7fee61b5e32caafd5de34b2a31 +9a4745e6e94da94286497233f66637586af51856552b0430710606bb3aefe457 +acaae21b8cdcd140b2bc4ff16705fcc80d04e0bd9b6a3207d933388b624893fc +349fce3e420690841637e1ce83247d5de15a109350c60944853a42fc3adabeeb +69e78bb11a5143fd2c465be7f72c9478a96883d1369414bcbc5b20bb60457eb5 +22e748594f23e082c29689369e48e01187efc53b3637218a36813cc4da7faa36 +9e29596f5de513074eb3a364b82e1af8a0cdcc513ec66d60f1173dd50937ee3f +dc888950c9a6b86ceebd3bf64b6319eee63db2199b824dc84e53553442b80e6a +6f29d9ed68d767c3d1ae78037e2c7835800e08a67c5be8f57571a71426c25e30 +a80439f9976ba351cc64a15249905b04742ab07e98b867d4985444e7a9096346 +8f70bfe63fe94f0a4f23257703e8793d059ffdc798ef3cf642a870aa311abca2 +c2a19fcbe68054c2bc94e2d030e8bede94db3c839e3d85302c297369903b9c9a +fc45596809d3c3f2be2c287d8b49273640d1dde3c7a4000616cb0821a01ee775 +e7e1b96c796acb7764ce16478e2c98547840df255eb133fe407b5081d808f368 +c575cc039dfd5fcc9e332e629e8565cf227079d25627dcd5e4d6a0710b486b00 +7189b9cc441a094d4be628d1990b63cbc5cb7fa127f49bd2b5ac659115bbb018 +dfb667d4154218d907abe558d4fa3ea3c753aef0e05b94772e6ddba0b88961ce +49d8d6f1d85930efde0fbd9dfa0682c5a8adb81d8d0be2fcd209238765af1977 +dcb18c4f80bbafa42b4cccb09f9da4db574398d30754f0c2870f0ff1d628dd4c +b57e3791ffd27ee4a9793f3ee5e105a917cbf9b6dc9fb7a32c752519b8334b71 +8fbdd41eb77d5e6c5438c6cb200559b914cb5b562cb914d777f889dc0af180a0 +3d2c2036358f8a105ec2a6f6313155cb96c5d792e2dd3c2fec6c56084f295047 +c1ef4ce1317930046ee382913d7df30626801fc5f6d1501fa31e643345128e7c +1f9dbd43ba580ef2bffd9af99a7a325a4e39f02f4ff5d372fd1ad895c3741914 +b1b944da9fefbe268e9a4763767718dae9d44728591c4e60845231f31ee5e929 +30f7c26c3235548323c5d14c3d7bc73033940071739c215441a9e72f2ff242f5 +5c65173ef32f00001340a53936c3f926a54e0818aa8cb28dd6fe9fd1c62ea09e +141fd00782dc1203b43dadebeb2104286082a14af250bf64ec9bc75371a9542a +2d27f971d3ff426371bfaae72a51d2aba44e859625120ccdfb350ba1c7f31413 +4669405f69b8515e23b0e305f3cfb9b0f29b410d26062bc8a1930ca753184e1e +dc97b40c9769450780c4a742ece35d726475e7d5ca91700e23cd325c7853b6c2 +b9b439ea12ea4576d7267e7e19baa00665f42d0cd312715e3b92493bb6a3a6db +54afd1f4c5e7f7bb20be232591b37778de18eecb0d6cfd30d247240b777501c8 +82b269a8959952836bf7d26713019f7677937a97354fd1106f6ee6d09f6c75d0 +296b22831ecac76882f68bb9434dfeef9d18f0d5b8ff6615dcafb348ec7a9866 +6fd749afbcf651be1ed1ca671a6013ce0c183f1ea86566dc9159cd9383b9e5ea +9900ae6c384ce3409aa4db1603fdc010083db0f0ee139b27c6090b8135799e8b +420f8f7b10e7334d53df7a0b1581485bc449776ca4b2678a490f9d0ec5207514 +de7bf64d8cf9711cbaef78b6b599d518d77b4544434b8cd95d04149e1b546204 +32b266a48da343d0704d10661485e4c11d4fd05fb727ab2db4975482edbc7c42 +b9b3af2806828da2173a304f83b9cff0ac4c5d4f553fe7276caec477bef48321 +ba153884a05e23002239cef2f5c95d8f6e99dc9554ea767409ce0108e73b76a4 +273aa49f123dfd32d27fb45f80622c7f61bc3242b8e00e6f50ea21d0b2c35f0f +10308818835feeb760d0ae64c755aae98e40eacb8f0ce744c8aa6d6b5c1d256a +0a476118f5f2d1de2bf12a0dfa68ca2a2e99f5cc0fb1aeb3e56cd8ee3221dd3d +5ad1fd57901727acb63a9aac3aef6c753f57e34aec57d0876b442066c2e324cf +b6637243db0a9cb9d2fe8e82e0dd2d513ad2b33f99bdf99b5c551cc0114da38e +392ac1ba0d3f536963f6e078a6a123f973395ae4846dbd335e30af20c3c23134 +91e2bc5987f44b6d377af7c5242e4f9ffb43517017dc7340f54460977dd8f8b5 +d1461c6707040c47de84d198d4164ddd7e7715a70abd458507fb336b824ba24c +ac0e6901295372b2863c119d0ee2fab224f7c0b56af33c8b82436ba9303cc0ee +3a809129e3c15b8c7a45538ec88fd1597406f696adc7ecdce383d3715325bcec +7563f1f4baaad70af9d24dbe272710dbff77d95c3462aec9e75a1e24e9f0f716 +2f82f1410d4b77344983fcae866279a98112d6718ff23da33bf16255c1b10736 +e8f98e8ef876d73ab139009bda89836d18dd03dfb13e332c50227032ff403ec7 +26dc8fa78d77aaef79bee7e0656275fbb6cc6aba6bec4920167380a1b07f8ede +5fa970f56f530ea2cb06be96def3b5327ff0f35d2d2152d23d712013bfb47b1f +e34f9339712f75c84d90df05f9ba2e8ab689f7804c588e5e075942b6dd11d875 +c56c016d18f48d569ff5ddcf4e323fd9fe03d5c702da6b98776601e925c73ff1 +7943756f5a4867c8d9c3f0a23280e873a891a6371c258e1cca3c4dd8be44e16c +267512e5fcf49a6db090e47da0f7a2f56804992df1c5387639b67aea74912727 +2d54a49823165ad330dd59020f1351f22d2172d018383555b8bd88bd50d5f715 +0839576ac6b14c3d651b54411167189c9b93f44e1783880a4c1b31f671988e19 +be05d3e519b72857420d6053ee7e459e98b31ee77dbe9242fb65d39e7065b67d +4c4b6619bb0a8bf1f860b98111710a61e2038d8ecf06c4f825322a66d327a631 +0bc1e8941fc36ff52d7286dfa8d2c38b76864f062457c198ee7335602cd975ec +1958a3930918b4959aeee256b98e0bbba1c370c9ea62913e9ef33ec799bcccea +de68997283d202476f1f065861c7d611478ffca395677e4152bc82e9686bc4fa +a82c0cc2a7e8b025eabf0fdc11e0564eab69bcdd8c4a05e5c249164c117ba859 +3b0d1c7293455320b0dd104b95afbfde7a03c0ec5b25f9d9ac6accc4de9ce736 +eab4c6726b23a116ff885b29258a57981be31f03ea5c5bf6db8c9ba21b831f37 +41c32223133c36127a0b3ea1d378a31002722f439564eaa70bf9c6465c3a7d03 +da8deaf66b1534bf11654562b6f4ee776d5fd7f3d288b51bb1e78808d261120b +b367cab8ac4ad2e910abe6bd80f9d421127cacdd282116a4bd376ff6999746f1 +4202272291588b6acc250700f32398d7ca3229bdad1e2244fa8d5a93af30fd0b +98f114afb0e4f4f917aa0935f735ec4d5d3293ba3c9d70af980d3fc9b9ba6db0 +ec2d4038a4c9872775c3ff227583bf4a0bb3baa3a14fa3757b01c461b2f6b1c9 +4e549e58ea596670aa747ee95f8b881391593f409cf52daeed278831aaede2f4 +b7dc53a8ea279127c7ac74bd500f97c86a513e546e05b343a3d590b7081df88a +3acc4d21a3c8bb060bd4ac8cf01971a8ba33d1e7828a5e64453028be2731bb48 +dec51bd85a6114c8dbb2f6ee87ed07af749318c90fb75a672b2b9c656c0b760c +ee4c6c462f9d6fae1d26469b37a043720fc710031abe62cf4deb987749340f27 +43a142310687a8b5822724b7b0657e7b291e803d14d2eee8b795b432a983f54e +53b17161d32c7a2d937fc8151c37866d3e25469c346b59c13930312fbbed651b +3019b9f09ef2c2a217780eebe098bb92f43e86c1062e161110d23b17b9b92682 +e32feb15891454b1c6201c375d58c4f66bb0a322fa8cdcdb2ad5556a9b6f0eea +2b3066c1c89a44adf94a7ee1cf4e15d51ae4c17052ac66df51d27e2b1cc36871 +14867d0fc33ea44338e9823c1016ee6263b1bf8365b900d2acdf2dc41b53429c +b64e9e89bf148370f62822b51bc4faf675fac2c9cf47a29f34f37628a471c4e3 +6daa47bc0b23ea7c1933d849ed2cec6eecc3ca56cc93a14a4258ce5148c0dc0c +f4f236316363140a32b91a4a7d78f7bd49e9e138b037621e52dd5e8e30062fb4 +1c537aac83e2e85b2e57cb43102568966d75c37fedd7799108a24de96670fd6a +4e5d9b9b778b6d25d0030070ba7329e482c82696e65df223e0579823f0db7323 +e7ff8a4bbe8ed37afde9a15deb7fc8521a1179e9197e2d3e6640e591c50606e9 +11815ea278b0809d5b7ed1dac77d333638b027e340fb624e9f1d6fdc40ad7cf5 +bc8b03e4cae755be841a9c72c86930024006b17f89f9d4ee22bef17b5baf4cd1 +364f889aecf94c1cce61909dd22f6d35a389136125d44a6b4c27efac337d8e46 +6d657a804eefea97ad0b436468e088a93764365d2481aa2d5e79ab437ecde035 +43f6023c3b75a1eb4c5b1685bf0eb3b9e3944a78c9aa0d410d20f7e366670095 +8f17d09d8b713ba121c46774ce83b09ce675193b845ace5496ed1ed96bd0f1bf +505353ed69f2aab2eef00169531e57f8ae498ec78d5d01aa45f4d7e2c96c486b +e14a1b21a1b61f6e73c970630692e385184d32c08036af05fe240976397d06e1 +18892245ebace16be7ad3445945b9edfd4794f190bc4bdd159813aba09f80544 +58a0c5d5b5624fe081c09dcf2b1707890dbc43def71d3222f8f853a5d169fdaa +95a33d1667b9e9bd7bf5883cdab58f17708bed530ebf7eee4acb2c9bae6b8337 +f1b4cb61b37c32cc0b3e390fdf35df5bb198a2d704ffbee24e27c4c1248f3f85 +606de45396611b4ba6ddbe1e9434e7e48273365ec73dd8df8aa378822e6f1f6f +8f35454c47ac054c77d62fddaa17b41f60997bb9f1ba5b700e7f840f1cbad1cd +e2305a92564e0f4c88bc4f3ccc6ee1175af3b2f83cbc57fcf10f0e63e7f635e7 +1e428064be1542f59407f2a18f70adb7d0eeff6baf6ed415d7a2a0237d17a726 +e84344dd77c48b43f47451142ae90d22b0e90e993715c55d0be8c808944f24d7 +d3b167f8f6f6469aba9fba2bde048298e85784ade8d96fe228ae328a0c8532b8 +1d97be36095fb1a3930417db8c50713f86e647113b607c7c93bfb424316e1aa4 +4f8543880efeb8b9be6fc7b978a4acaae9782a2721757f32173cc39142103963 +9da323208310b292114a62ff42e3cc0c986f709f986e07b9364634fad4a3be7a +8a63cb7b26036eb8515b8ae6af058874ca36054c184f2626ec2683bf21304e1b +5fde01772a0895de5ae8caa031125b614a83b949bf40681252218b10f5d4ec6c +21e8190dafab34551a3b8712b13d195ad6c934cf96b9da70302e84b34e6f8bc0 +ef3d383ccb7adb2e5d67ee464f9b2124cd034dd4ffb20962a6abd3764694e07f +4b4d244fad6fcee6167f5f44f943a02caa9b326726e949a8424496a79f5acb37 +d8c7c3b10d5fec76b568ee77b02061eec7bfc67c9e75ea1784e15ecaf2bade6b +48a80532beea72fbe2ce5062da978663984b2cfcf067ddef4de6155f60a6c34b +b469c3db6fdc40e5f79f3562cf6f8bc43ff8032692ec0f95a03263e2cd7cbfe7 +5b2f4a7c4dc6b8445dbecf16b800f43a6835ba3226b5b112cb09a18bb0161210 +4ab91a24919291406a436f4cafde0ed998da1b99718d003d3afa3729203b5999 +a87df0b91c5adda6e678039344bb36495fb1b5e5965fcfc86f6f61763d48c0d3 +7c55d221b1fded8a9a359371f8c08c778e269334c2af994b75186f3b75b7f61f +6d6d48def0aa6856962f7b9c468c795abec3b622ed16241f4c506963acf2cb36 +29ab91296d06193741f36343fe0f315877a090df94858d93c527d44670760ba5 +68b61609a3d750e4153c0f17dcd5f870b3a38b7d2272ee60a24668afc2b54084 +63664a6fff7ebdf7d2bdf9b1636b17041bb12f49ee3cda336f84c77746fb5036 +61b18775cf02fbb4c635fd09886798b09085b8cdb795bab93438ad36f4e9c23b +b30e1fcff1bab17fe49566f755ff904cbc11da5e966a545c6c7d7259ba4c729a +391ae47953a99bc4d500d68420204e23a07f6c0e137bd1a7034d670e1e9d8804 +1bc039653a023a6edcae8f73c93ddcd8a2e85396f5debed0d0565be384f21c5f +1171e37ce2443cd8ea5b20da6bab9b62ce5e8f1f485a4b3fd7fb22ba4bdd28df +f76493059c56b7a5c65209ee98f2e81ab6e25cd0a0f81cb511004e9da7fcd65a +8e73b549ee33577db68adc05e0b24e820500cd50523470eb760844155d4ffcd1 +759d5f50b803888f3bb3a616f99aad9a18a745fc6c248684c2b0df40e38234fe +1d21017d2a7a1def67c9dd2884d2239e9e1790910a8486e5cd001d2aed32e05c +bf6fd016f4e70e6af610330f47048bfc8d0a490e60b9e27cc75098a74147b30f +267ca6983b5940b8ce47d4fdbfc3a7f89f78ff4c35ec0a50228aed5907e05dd7 +ea33ef10c079981b1ab1c361d78f58f78fcbb3d9d4a569e0c8e1f86067bd61a6 +cdcc34c490078ea150b792d466b7a6a1a4ed7c46f4ca2e46800f5498820464f2 +c88c8e6ea79bac3535fe2c12f9e121a07588426e60067e13e77999939ac6e36d +9b63c024d67d2dd1a1e7172a6441a051b2e1405877aea4ad0e78cabb4cff67cb +82535954d4ba25bbffaf67dfa0d2a889592d2ba5718168b3a620ed8fcc10720f +b25da0cabd8265af47ce144b68c6058350d643d8f0746c43ace3b7445efebca4 +8d48d6f46c9154a95a4f4b8962fe1392418ab22e84ffe824554c74679bfd6662 +09b79c6d147858aa4ea978389503c1b8f0dd5ce10af89739f19a42a932c3cc14 +25882a16c505ddd2547572b93581ae8f0eea2c7725f91b8b2bddfed70ce9b39c +398a0beb2d83471822dc81039695f6fda204907ea0078d854dc4b86318921169 +c744ac7d846af8980e123b6219f8663b9fdbaa3416e6cba8ae367755309372ee +84b812650858053cd0f7f2d4e62d8905b0cd349112adac19953517ac36219044 +3cfb831fbe6e045dc567c182337d4148036e6e715a366a7e2be5bf0da704808d +7bf418275826e99d696b0c296e7b5a15f5e63f9c90c5ac093822290c8d254e7e +828104afc3ef7c5a8d8fe631f191e266434f34d9e10619a7f4b7df6566c86463 +a86f6dfff94f01f8b4c7688e999f306a65628679ab9123af6dca39e88808dfe3 +e99107b918a8dbb02b1d5ed0f6bb82d115cb36889e5aa14c9cef78bf09d3b429 +c1e3cf2ff96d289a6279d186130ec5cfcdd5a7dea4d23124f012646dca173108 +2ad555c142a587d98fca7b8308cccf3856b0901dbb3ca53082b368cd2850613b +32da388cffd23ab28d932eeff2a7388295286539aaf03746f35eb28338ad23f9 +f4fb3c91c79ab2fef1e061cdf2aa1f2a991b39fd0afa1063cd54dae5d31d2f44 +516cd6be0ee051bbb0201cc747a04d5b171d4f13686e77b9ebf9ba2236886c4a +505461037b7a5f2ee8db790e6fdfd047033354f60786c1f2c00aa6847c8fa0f6 +3ab3215c78229d47364fc91ac88f98eec9e5d96ecaf41c0aedb88dc216964a52 +54bf9f88a7bc9f5ed16fd210252dd2f8e7f54ca4b4ef4a7356023556fb69a31e +72df664882f57b786417d6955b17783e9c206fd33064f6d9a9e23ca274189782 +1c18375d12d1ee22e74713f6911c3ab08b1d7f35f00f18f5e9b669ad15d4e1ad +0831fb8edaa74fc257fcc5ab9ade88ed85a19cc22d32b2a9e2ff3830e76caa2d +15f5c1fe3fc21bd1eb96d1d35e8966ac563d1ea40d6d3d2b79a9c602bafadceb +31cc10aa90012955cef8982620ae3d6d01ce14bc184f5dcdbebf94cfb5b10c42 +d174ae261dbed22fb969fcf1bb64f2bdfe0e43ef54eacce5fb5e537e872eb1bd +d7070d3bee6768186c4bc824cb828830b8696af783d3410a62fca2b996aaafab +4ee639122e65f121b941485cfb581c57df7e0c5b7e4c912b75eb6409352ff5c0 +33b1c7e4dca272245235cd8b23a5e9452652d212fad18eaa899935b90bebf320 +3c50b223eb1caaa160a4ce8469a1311c69ba2ae787edc9ee304f32afa013a0e9 +092d80c29dde16413909f3d00f9844e86dc234442748128e96b3ee0d243ac8a8 +00d872aba50e81604e5270aa9972e57b021dbb1eac08a064d250df6acf727c6a +098c99b2074af3b4bf14913fe867707fe0f9b058e05c38205d1603925f7fe1a2 +54eaa39ce49ff00bfb494cbfeec9b738750b53feaead8bce2bfa1e20cedb5e2f +d815755c40352198c1daa5d092c700d3745eaf183bc281b86e7762985bb5f730 +baa1ffa889dbb0e2f7aee08d5abc2180466eecef7c588a1c0f78453685526911 +165bcbf5cf3e9e +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F17_0 /QYKIKI+NimbusMonL-Regu 1 1 +[ /.notdef/.notdef/fi/fl/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon/semicolon/less/equal/greater/question + /at/A/B/C/D/E/F/G + /H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore + /quoteleft/a/b/c/d/e/f/g + /h/i/j/k/l/m/n/o + /p/q/r/s/t/u/v/w + /x/y/z/braceleft/bar/braceright/asciitilde/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/bullet/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/exclamdown/cent/sterling/fraction/yen/florin/section + /currency/copyright/quotedblleft/guillemotleft/guilsinglleft/guilsinglright/fi/fl + /.notdef/endash/dagger/daggerdbl/periodcentered/.notdef/paragraph/bullet + /quotesinglbase/quotedblbase/quotedblright/guillemotright/ellipsis/perthousand/.notdef/questiondown + /.notdef/grave/acute/circumflex/tilde/macron/breve/dotaccent + /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron + /emdash/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/AE/.notdef/ordfeminine/.notdef/.notdef/.notdef/.notdef + /Lslash/Oslash/OE/ordmasculine/.notdef/.notdef/.notdef/.notdef + /.notdef/ae/.notdef/.notdef/.notdef/dotlessi/.notdef/.notdef + /lslash/oslash/oe/germandbls/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +%%BeginResource: font BITXNG+CMMI10 +%!PS-AdobeFont-1.0: CMMI10 003.002 +%%Title: CMMI10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMMI10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI10 known{/CMMI10 findfont dup/UniqueID known{dup +/UniqueID get 5087385 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /BITXNG+CMMI10 def +/FontBBox {-32 -250 1048 750 }readonly def +/UniqueID 5087385 def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI10.) readonly def +/FullName (CMMI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 45 /arrowhookright put +dup 58 /period put +readonly def +currentdict end +currentfile eexec +d9d66f633b846ab284bcf8b0411b772de5ce3c05ef98f858322dcea45e0874c5 +45d25fe192539d9cda4baa46d9c431465e6abf4e4271f89eded7f37be4b31fb4 +7934f62d1f46e8671f6290d6fff601d4937bf71c22d60fb800a15796421e3aa7 +72c500501d8b10c0093f6467c553250f7c27b2c3d893772614a846374a85bc4e +bec0b0a89c4c161c3956ece25274b962c854e535f418279fe26d8f83e38c5c89 +974e9a224b3cbef90a9277af10e0c7cac8dc11c41dc18b814a7682e5f0248674 +11453bc81c443407af56dca20efc9fa776eb9a127b62471340eb64c5abdf2996 +f8b24ef268e4f2eb5d212894c037686094668c31ec7af91d1170dc14429872a0 +a3e68a64db9e871f03b7c73e93f77356c3996948c2deade21d6b4a87854b79da +d4c3d1e0fc754b97495bcfc684282c4d923dfeace4ec7db525bd8d76668602ba +27b09611e4452b169c29ea7d6683a2c6246c9ddcf62885d457325b389868bc54 +3ea6dc3984ba80581133330d766998ae550e2fb5e7c707a559f67b7a34fea2f3 +bebe4226da71af8b6e8d128c7ae0b3dc7c9aa4a1faef312fc9b46399b18c437a +776de1f67caf78e15d4cc76d6fa57dad7abc6d35ede0d7118e8c6f3a201f9ea9 +eabf8a848d182eba8922addbe3c488f51eac02906400a84ea0abfaf48116cdc6 +6fbc00330a76a8818cfaeb7afdeb029a204e0a70b47a05aa50153b56d2bf6736 +c7a2c50b023ed92cfff13eba974f804a346d4130ccfd5233b6d6b92a14c87bbe +2ba216bae4123911e1856975e5cf4d94e44f400f687d2d13db288e0d821451c8 +83e9928f8cbc41e0f4b99f8b29d3b11bd4ed0cbca83d81082e39a9e79cebf433 +671b1af39c3d0e1f5bbe5f1fff62ff6f5f15f0421c56a4dffac682cb07b6f257 +221fed1902e4b69d9bc2e061f2e96f5a46734f91298494a425ef6432f2b9778c +4ebbadd3483ef5447df5f008db9d91c559950ebcedb4b1316a5aae8367a80e06 +bf3162beb99c4aaa617c60be688da7627f29c1775983ef635b26306a94f0b258 +003779f8670a1398681953b785a226057f7d1270fe2dd2ea66d65e2061fbd65f +0ac51b6c347a56e9f3e86e52f3e0bf1d5f8d6540afb32a027a7c96919557692e +b739cc298ec7999b4286538edf7333cf8f8f6ba02c5e8c62929af07acbb90861 +0bcb85345f4206e3ea130512dcfbc6cefa31ef2bd1da11d3010fec57b5b232ca +706f9c44fb9cab8903be783eca66d748b3fa5b1f5d5445f6c16a9a52c88a7e2f +2bfb0be4e416ea209a9810dd6c38e47a58dc9270b2f49f9b9d482156f7dc8164 +b621b6803b6434a2a354a50fd9353a2ce3fa761423634b8f2adcd63b2b7acf15 +07588caf127a0d6b2017a451d3df77c53e6171c66236e5318d49fab9ce4b1026 +853f65d0d5f7913d88ea66b9b63cf06a4bfc8ed3246bb86cf6de255ff46d245d +109939e32dc483a0e5176b614ccb7f1adcf99854cf50317bd081131a146ea089 +8ed59e46da7b6254bdccbc660686e2eda0ad7b894cd2eb2688c0c00aca589d39 +e3caa6e0faf7eeb5df3e3f8113dae4b454a0d8c86fee52779ad3e13a0a871e9b +65b9ef0a2ff20989bae81d1cc1181679fbedb80e7d84a08774e6da58a283ba22 +3780f2717484e066fa7dc012e6d19429b08638045352d358957917123c9c73b4 +326a954f5ebce183ba1025c00c8f559dba85e07b3ed48d2fa0acafa9436d6fdf +e530ce25ac7da170db1764e77b6816343e8a128a075e7744a6f0406551f4640e +c403ea61696459d15ee040bfb53f08700c69333b1cb28142c5b9411d65fbfb1e +c7f4f50c03d122ad4b63e9e65f0a0af43efcc9fc546fd13da42a1c13b8c9cbfa +79a480d923701306249955ce1c61a680b2809d3551325a333a189db71bc83c59 +47d17b31f8ff63564919b00336285f724d22f889748564808083ddaa4eeb8632 +5d636961e1f634f3ff3def1dcd7299bb7679dbaf685e2ac1484bd9b17c5cf4d8 +59897713b51a4deba3332c2ab5c48a76357d2eaaa539a617b09f223661bcb411 +0e6559e99a7d900336a9327d4b8330ee5f56b016cebb8c07dbcc2fa736c07ecb +8930f26b429288c6fe6cee3e7792de58ea3ce248598db0c604787612bd137d80 +e4462d249b229b62142128b57a6b44515262743bb3c70ee96aa4b8c49d6b0be4 +4e19f634add30634f999f4dfb3dcff6a412a9b6067d28751aab1b20928a6e73b +cb81b0510d551f84437062e8cd403bf8c343003965e926465b288b0aa2fc85f9 +90f9a63fce188d72008aed98bcba5ff4ae850711d2664f0857ded002e3a89fa8 +75f930ddf7918d6b2f92ae26af35f50cc9d2a8f9b5d5d80981b12ddf4c59565a +aa62ec34589e5bcc3075cc6a163e45d46bb280b22158c5c04c90beb6f8a1c791 +5597b0f69be3204d876cfa54481cc86ed2fe799bc46555c6c6fffc73854104dc +9c8a6f85331fce7c5d1f20af5d99e4e61b7ab981dd4eae26951a9447d5553140 +b5862e2f39023bc7d14901eacf467a9424a6be8055d82f4b02036cd766367871 +e0a01d09790ab2777db18248482fb32a25fadb62956b93affc59b1796f78d0b6 +6aaeee9778a3b253bd98035c79b5296e173fba9e56e8824ab6191ef9062b1fc8 +1b6b6185a05b167adccc6698b1801297d766492add5b66193d024d121633d329 +25bcf1a9ae109371aaaeb64f2805bf5c2d5a218c191e9eeb4ac30a48291c7251 +f690b51d5135f6a37f5418624c7d2f3ece356b12ec18f73d5177a24ffe371635 +fc88231b3a95d72ca2555f164c503f91b5c7ca174e43aee6534df6d569efd50d +da3e950e11c6cff788e50ce5f1332ad76a2357c39d44ea38e88b24f2d37cf29e +21b7468adfcacc8ab8fe1ae9da4c933b5f7f0a6451964a4924b6ba96c359c828 +d818166d5271e813f7a34a5b18927e66d61003392c96ab36b3e2175f31faa3d3 +7e77200bbbeba91c532c053f318f3f83080bf3d641d4c5df796c2882e34c01b9 +cf74bba01f03ef559012eeece809c019ab6d40d22a16fb9054143990db45b902 +a5574f672dda96d6c18c0fb048e970e6180e6148061e22085c7aa4fdc2102fd2 +d31e84456a56057b9d3189f331cc8354b195564cfdd23579574b7c7a80d2f3e3 +97f07cdab67407a46a4264e985563dae7ad933dac054d64a7ebce65bb2beb5fe +d53360fd76a0fe706e7283550c4d5657aa9bf62ee713592d74e89998e9b0adb2 +327a9dd5f19184a500870a3c53367431b56cc4dd60bb629ae68a009fba0049eb +16d11d5f299d5a99f3d45f6510450e53740da5556335eccd43e1408b826fc535 +10c7784c44cdbf41988ab67ffdc54ea61dd05208204c8bed9c66c678e6324428 +9682cc6ea0b2dad69cdb69dc8daacfd1a98c730dc3d9bc8d83e2fa2e72de08b0 +031ef3455ba92d03acfdb7ecf50ee883a8817abd96e58f72ae050feae0d224a5 +42aa0b4c022f8a90e73ab84216f520d6ded72680471b9ed2ce317536305d7360 +810a92f4957c9aba9328b116349fdfa728e9f042b2fd2d116bbcbbb99ec6966b +a5e1f4fbbb4b1eae6d8bdd40de5fa44127e6d7c05abad3c012082c245265096d +d4445b03ad8dc08d707ecbf0aef0890b0658dc9341fd386d417ad9f5e79c0464 +be4e3b22e4997e1806d192a8be70dfbcf69715b8194347a60e80934ed09fb08e +c4df7c3b204b07ee3610c041dff7d4c76060e4be6a3a2f0b0217005ab38f80ff +fe55a6252afa361b5cd8f3b642e6e193da913ccaeae5508c2470036aad80c0c6 +e977c374852b69a8de69aea44aaad49eb7fcd420bd55a5c5cbf073e859ba9d6a +857da20a5cc2744843ea07efcaf91e992f0a44e1e520bbca097b6965c4e30c99 +03ac3ca1af1bbeeacffd7cc22e7b9763b0876cf8308ea38828a716da7f430898 +2beecd1cb81cd95ab8fe70242026f11061a70fb42445aa9246488d6d0029df17 +dea43305ac74df52e5699b6c243025786b21fd43993a8039e9e75fce2dbb7d6b +7e4cd140e7edacc20dcb473dc45eab68d8ea296baf9bb969093862d391f84073 +5e17f87847ff2e9186080feb184ff7869a5a8bee6aafe3461454dcbcd00d2c24 +61ef831a52dbb0fa736694b4a3a4d85c6d80636b316fb12be67f0887cce6df04 +80c145ea8762ef8b2c43ae71f3c32686fd5813eb49a39bc6d4980472bd5cdbb6 +c282c9ffe2fb52656f607692e1ba726417703feccfd4aeaf9c66d543ce1506b1 +a9d6b95705f67086d4f36b06a283cec841a01f1028d95d4de419d7110f091014 +f6dc905e81add1d54f95b16cddcfd0793d1cf4a85e7a35458c81197a24fe82cb +63edde30cb6b538a708fbd41f00268a772730b85bd8860054acd93fe6b8bbcb9 +cc474568d426e83f15838520a313e0ae1b60959de340398b21986f5c404c9361 +54975d52740bec0f7abfaf271a2ac1f7553b862d45d11ae585936fbb5462e2dd +bf35e4afb7bffcbd3294be3eabec4b787133c3a5e0c95f74a71dad9be990d07c +d157d7258830a3cc3de6459140afba942eef325ee072b3a53a9f281d483eac65 +e8da50ccddb3d43baff7d8c7d7a1847d6d579ce92df1b54de141ce7a73607362 +7d909e8cd9fdc373b840145f9373bc2f02979ee34688bf840f4f9245c2ab976c +ee8bde685c47606201f6611e38a49ab72428def2c85e553313af719ab4d4f5ef +e3f3430522abff76bf8bb8f56afe11008d3f989ffadccb411dd3b7e6352ea873 +3abe5dc71b3b4832ae85bdb23f6cbfb4b2631412e4fe0050a5f7f4216508a3db +ea2d74318ed82f1a2fc791623c869593dcfd6bfb2fe57bdf06e9d1946f9bcea0 +13848fcdc603e3eca5384725118970cebcc9ebc6b74df13ad395fa6efdc22463 +5380eb1b3521aa929eba30958ae2da40852196b67ee44409d323383b0c7fa1f2 +b4fff373041d9f5eeab03d6743f0a291b481dd3ff9e8ebd77a073b8d5f5d93bc +727e6566204893af892f74fc0bc3f3e83643a93747678eb998f9c91b3a0ff942 +3d3924f507f1c7eb18249b2ab73691f5fac868720ff52183091f65ac3be8cb0e +80d257c52ea8647ef747fe304598e1ce0900a4de4031e4b6a58d7869b08a56aa +710c91ccb8afab94ad10d670e767a44e0177795ddfd65c9cdc7332716deefe3f +9e2ed8a54bb6faf63b7bf5f554b934821086c09fc28fa74ea2efd410e006be6b +ebe0c464e078c14968453dc783a788a55d925d72205492c07d0dbaee4982fbed +9b32dd19ae230da5870499feeac55b09b0970ad5926375fd79b95552816be003 +90515262b5ca891babcd81bf86847cbc5850d4a056bdc528e97aded1ea6d7b76 +bd8ec34e742a9fccf19a6310004499b1cc1a920b5f3b746bd4de2d9b9dea341d +25a7a7b60546a8f9ef99190cf8ddedb21a0103414f9f28ae8673c966b12528dc +fb70ce44db4822322605982d708a0b4bef7eb08962e3f433213d7545f351e994 +970828eb443c3bb36ab0c4cab7fadfd949e5f93273141da2b6dffb41b4678647 +93cd4e53c78a63c632d4fcbad772122e86dde337d5438e5e4342a0e18be8b014 +3ddd7290d16096f2149c6c71ad28325dddbf994e651b9d4be89430b31dec3fa7 +d2703196f7f10b5e8d98f20e14151160507e53ff1f3d4bddff3f45f9e64b1b9b +9b26b32bf389a3725c243209245bd78c2f78d67033be00ebe25955a1ac718305 +b52a0260a07220a9f7410bad935538c6c7c56f902a70730c1cf90d45a5f66c6b +a762406e512bf3cc3b52918c6e9e92893279cf86af1684d9b67d1ebbe84be9d8 +4b56548323ab381ae18c9e9570453abe77ca9d9ed1164563120b939fc3acc33d +49f5e989a74ac760f0c99458295278efde92e99003c4780935d12eda68a82308 +ba444819ea9fd930c80263b57ec1b9164aa50ce386b8ef81a53a710416c6c868 +794bddb4fe463b3c59ff9fd085fc7ec37cf2abb7df09d41113f4542f72bffda6 +1fafef41c462eabcc7a3b4fbe46cac256c7af4309a617e73e7934450434e344b +5cb6ddf2e63f4523f1526ed2f79522eae16b23dd9ff4924053a0fa7c4a0b29ff +f4485c041b06147d2c94d276553f443c2980cb96ef5da49bfda4ee95bbf092ac +e2dee947d0c711c1930500b79a5424e8494df6e1798b009a3816342f4d1d7cb0 +b7bf239f3d60361ac605020591740d13ce386bca1e69a2e8063c62f9959c9fb9 +010ae39f18882b1e3b3d0d9b0447db7f7f7a3810375372702686b224896bf5e4 +cd40e308b5a6988b614d8088c296171423cab2657cfb98f462afe21e990b0c74 +4c8738d1b13097ca887ccfd3eabe4f1e29df71d0e51046957409964f9f02a33d +78b2a5bac5058bda0dd8a65fe6c53dff9310fd2b97afd24f39e586417dcc18a1 +5c0be1795e0f2c3d785f8cc1ab5505bb8fc0dfa1364f08876a42dae3383f853f +84e7e54405bb8d00911c5b8ef4794494d9bf076d57a65f2392628b61ff967c77 +29114960e00fadc36961617c61c673bd2d2e4a9d54702233c8414026e67940bd +ed16e2d3822f06068502c0966f2ff68f74d11a0b780b95f3f52bcc162a37b6ef +48cf5ff8513cf4183176734f80b9835401b3db6bd53597645873fa96488eb183 +646b577037e5717952d23cc71ee1780b3df42d9c768804fc47cf147db059b9ee +7a6399d4f4afcf2d296902f16d56d6df28ac4c9a96e357678ba901fe72ce3d2f +b10fbf263146547d455df1bc33a1dfa753251c264db8798da35943a4940962f9 +e3b8a68d2b094177154ba30af7bd201cad919c09a34536e41d6c5772873c0634 +fef84dca5f1a5d5488997e279876af1dfb3f51790a6ae085d09ea4e1947fc10b +987c2db0634c100484f4b45404119fee7a7ec81111029cff1b4cfa1a8637d4a5 +ad472b5ac0cb9f428cb1df8abfea3db8082a26cc815437ab387e7f87902398d2 +e0c6bf6c95c2381f15b61fb2c5bdb8684afbb7a6c1a01ca2286a8dff62e52a16 +3d7c748c1b2c63d2933012c5306cb7efb0b4cd733c56ba7700acc731d294f7a1 +1f2a1f8f461983f2972da8c3dbb3f9117f7a6f3583c8a5dcabb364ac0310457f +93fbca26c31482d806c6a7a4f87f4cb92e3f30b4dd2dd5e3da5360430c008237 +7165549aa416a73c62a50b707074b2b7ded2b07454574f60861cd2f0342e4f78 +24789278e711f18ef858b819a0accb67384b47145fee30b32181d66ff47aa657 +83f0cccb693ac70657bc2bf204974bb3bcbffcd6540477e7a973718754acbe68 +823672daeaf24c93263a57598ac4bc999120e367aaa4b54c643e8c8987024b07 +9b0d40fb33d55cee534e3a38a1a316276704e9a6df08553fde29e4d4526225d1 +fbda6f8cb78098e83e8a360de3c4c77e2998094f920aaba9c7587735cd2f22cb +e17c6b99a8286519242f18de4aabbe470bb8e0931ec7f5c19e1c304df56f2368 +70d154e925c4f2e5012d52a0283ea52acefa09d2a8ecc832358868bce8efba7c +492e3575c1605150a3f7d6822960f1a9975151c7b6e928fc07f73493351895b3 +5ea783de8482144ddfaf6f881d0835472a603fcd52464da80de0c380fed5cc67 +e38eea70c066dadf026e03fe00be35c6310f64aca4b991ed4bc4eb125b4c0a79 +b87109b442c0b624c340271988ca36e92157ebe00ace90fa4515b6c649b9ef36 +f82cfb4954c124878dfece799bd987ee930148967069b9e6ff5663689e5d186c +26dbdfa146c3dd3ab9c2104fa4e92423c88a0821443aa8008b11008525290207 +146118e39b4d7893fdc8c7225f4c97fa3f1cc264122afa3a87d630ef325d3778 +28ecba34700bae5038bc2a1c2e0476351d9e73cb623cf58eb35d4c518630ef2a +f8b64bed95d72bb7403e652e2dda6faad38fe8fe4319ae190f0496a1c6806cca +10efc6d15c7e19522b152476c36f9644a599da6786df08fe7981f9eaa0e8611f +880ce7444e6e72e82aefccf6ae7aa0ae68f883d9f85b8126a6c52687c0ffe6d4 +fc712eae8bcaf81dbfddd0a58717c4cea5ebc76c94567833f5549daa0cf6254c +627a1a0662537ad3b43c6f3a90d553bd6e7e841769777c502e4dd5fb8b15431a +61ad9b26cd69b5d7d2b28776074e7b7beb25da2d5b8ce39e2d982b9fb9122e6f +401cdba8684365458bd82680150de4ea9c386dc6666e613f4de18bcf4540ce5e +663a6f3de86e8ff97339085dd62fc33bdaed076740de76c1830a14618ced99f8 +07519a5526f787b5f96e8086ff187ddc36ab3b385520dd23ceb0b0a779c97537 +496cdcbd8b82bc87bd2473acc490c6a86a6e6f85496a2dabbe2c92f4394c23bb +714c0cdce7c02a397f2a66862ac165931eadc3dd374873357e315c8cd99f00b9 +20d3c62c04401d15413d4c640c2aa4caf5fa5db6eecf4ecf43478b2ed317e06f +cdbab783a6921463b346d8bf72e98a4d7fbe011cbe565cb54a7157af3fa4d5c9 +d6a36c7600f5a884595278efddf5085f74c3d7d8e9beb3be3f7f6131e8233b08 +4b16dfda9cc778dc10adda42786156d707750d12c920cc297e8f58578d5084a8 +6d68a5180a +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F123_0 /BITXNG+CMMI10 1 1 +[ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/arrowhookright/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/period/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +%%BeginResource: font ZWXELK+NimbusMonL-Bold +%!PS-AdobeFont-1.0: NimbusMonL-Bold 1.05 +%%CreationDate: Wed Dec 22 1999 +% Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +% (URW)++,Copyright 1999 by (URW)++ Design & Development +% See the file COPYING (GNU General Public License) for license conditions. +% As a special exception, permission is granted to include this font +% program in a Postscript or PDF file that consists of a document that +% contains text to be displayed or printed using this font, regardless +% of the conditions or license applying to the document itself. +12 dict begin +/FontInfo 10 dict dup begin +/version (1.05) readonly def +/Notice ((URW)++,Copyright 1999 by (URW)++ Design & Development. See the file COPYING (GNU General Public License) for license conditions. As a special exception, permission is granted to include this font program in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself.) readonly def +/Copyright (Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development) readonly def +/FullName (Nimbus Mono L Bold) readonly def +/FamilyName (Nimbus Mono L) readonly def +/Weight (Bold) readonly def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/FontName /ZWXELK+NimbusMonL-Bold def +/PaintType 0 def +/WMode 0 def +/FontBBox {-43 -278 681 871} readonly def +/FontType 1 def +/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def +/Encoding StandardEncoding def +currentdict end +currentfile eexec +d9d66f633b846a989b9974b0179fc6cc445bc2c03103c68570a7b354a4a280ae +6fbf7f9888e039ab60fcaf852eb4ce3afeb979d5ea70fde44a2ae5c8c0166c27 +bf9665eea11c7d2329c1a211dd26bb372be5822f5ea70d99eb578c7befd44cdf +045a363056e5e1cc51525ea6fc061dcebb337208eff729802376a2801424f670 +0e7e6397b28f15bc10b40012b0a3eaeb2693e8f7f627c4c9c7c6c5bff105c1e4 +1b2b9e8f09253b61177e95ea219474796072f4b363fe05fa7637750ee32abe88 +6f7c1368d9ce6c8e0c490dfce9b86d093c646a926013616599be4a08eeab1ef9 +4d9066aa43407ce8754ca1bb33035af23db30794e2d3368c4fa14ccccbdeaf01 +2caf3cd75f4a9430011661c1bf054a530ddc57f032ecffb56ef20be97a76074d +a40f2ab5f5ca4b83c12482c76211aebb54d996a3771a33008145b436f16e5100 +3c766da4e9fc3ac88ac60879f47b0d72099a606f615cd397a05aed4a92a6e86b +6a9685a3fce4cb303371639026c74f19dd67a353e70a7f40b4d317f830c0342a +9f2fec7a3304e4c4009e2bc3f0dcee97c8381bc7682c6d3f80d93a69ce5d74bb +b3ae9b016bca6cf044056c8ab210f7f1ab28c6b4c457d0184278951c4e2bd743 +41f9c9c8fafb9f11da77c2ce9f820e65ba3b7184d08598f9ecc956d38ffa3d71 +0ef485905434474fbb7cf4b43b193a537efe076c26a9251d45d06ff575a5b9a6 +20ec66effcfa67a9e089a1a78ab7331d3841898dd7476d70a2a97c8f6c283fae +4010a9eb770604ba65878fa2105d063a44c56e21bd4847b542af04cec1cfc7d5 +ec2b1ee2103bd35e162f2dc6d1f224925a0d7eb5b883a6eff782245605bb8fcc +1e0453694af4725205d9225ffa329bbdd4392fcccb8dac6a0e8be2059177757e +2fc359426f4e1ed2e19ca9b5311c2e77ef9f97618b0c337a906ff39926d2b0b7 +883abba6508102d9f4fb0387d88d82973b53718c98d58c9b83d2a62386b74c16 +9cb5c33dda965420dd78aa19ff23f88bd2355f93ebaca543d8b18ea36b4ee8fc +b5924e01f73a9501819be812383107d361fe8c805163a6957de6aa4af7fa6963 +e77ac8e5d39349be33448d2f6258da61aaf47917c66c7c5ae99a990b727c6c70 +20f14175225efea39202b489cb6623c51f41fe9a5f6d3be27796e51be6945774 +6cdc1ec49ed6114400f4724ecff05fe0bed476dd3d5650ce735475ff6f232456 +5918f9ed222319d2a544aa4a74be19f45cd466fcf191e7ea641ea38f9d3133f8 +872bafe19691dcdf0bce48ed6fd0e0ee9a81faa6dff8b239874ffe2072a73107 +0ffb5095f90a653a1690655a9b4287545138b8049e04eeb928256a05a73edf71 +4e0c8692f37cf1d7e3defd43b2b428f853f35bd79f3811fa7bf788d1c1cf4a61 +65b8eebc60521fac324403d3bca11817c9d15012e0be84e194435fd27361e68d +79b52b6c9a96c1a40596f048a31c49088b883ee21d9bd24b48e4d1e03e7378c0 +5b62dc00623f9c5dbe5087eb9122de23199ac72b491ff847674d6141ca7facd9 +6bdbfc373e1e1f87881fd7bc3a7d64292c55a687f3837424612103bd6be8fe2c +0b3f529ff61d27d3fe8cbb25636f48e6a41f205d04a802e50fd974cfa67f94ec +19c3ec32aa714e650af284926ec5f2e29bb880efc696d77d210536d7d1148ac9 +ea9263bc02d2ba97369f2ab531944e132484c3f2c2638b01fc97731f1b39a492 +4822b5265773a5e86a17a41e7346b7c4c48029f58450663e0d09836d75ca7f8a +d9a78eeea4f41976945501f32bb383455467d217777e642f32777bbd74cff9c7 +97041d0a982ab1c0d4999077201cc9ab52a92cf959cafd2e6790ab45f6927c7e +96f24481280a0242e823e22a4e32669bc829ef1b7ec3fa34e9cdd920b0f7e2c3 +8f138ee0922fbdd3d7bec614805aa562591c3969760019c54ede008db2c2f8af +bc66034e5810bc32c823b819eb39a15c0f25be8f2dfe5a01b90848a5adcc95de +49241dc602f4b71f8901fbb38725ee7ff097f769c017f16598b835a0b93cc6aa +c437310f1a7d586cc05048684af27ef3c09f72ac62adb2f4fe7f99d1340d27c4 +479c144afdc37e4131d8fc6479afbb1004ba15e3e5d0ee470b9811a0f51294c6 +dee3fa7431267cb6ec7a96c590ebc1cc7333a103eddc21219f392ddbea601d6d +dce7a8645953235a0ab6d46578e8e438ffc41be6b509b844b73e586131f694bf +f0ed77a7847f7c747410cbba2473f5869eda83ec8118d800f3b2a7b5ea03e16b +204962bc68ac47bcc5d29f88aee951c2452d22aa967d32c3f37a91ba88baad3d +bc74cf2c7fbf0c76faa4eb347390dd08303b439cb1f1a3363d265fec5734c81c +bf1af913f88820cc29f4a3b54c712e006e1d6bd993668999c3ad54676c71fda5 +e29df4c794a4fa812b13ad32b28bc57e05c7908b8334bd4fe842d57b04423fd0 +db3a43eb047f86eb925dfe31a012031f36d5f6099187724b0e2203ca1da764db +623d1e0a59b9fe47d7d4d67c241d297bc5a6641770f5e9f75c572675ae6e69e7 +ae37627c1e4d3ba60b95605da55c67c5f6ef7ae2049ea3d1246a0c03309ebd39 +951a398883fc919a711e8e891d914459d4296bc3a584610663af1c2ff053c137 +9f447f918ca55c5dd4a52a060d1725c26e6940371eb4fd9d254749d04ebc0f11 +06f62a30d3f714a33e4f65f4dd0b20daaa10aa02b9a6e6eeec07fd93d19f9c0a +6cd6bde1d7ccd1a973bf297fe6a8821e03a381c468b9adfde87a4b7f484a55ff +a5b83052ac23f4b3644234d935485f912cba1c84227a609b32509552ad1d7ce4 +6f564f7f9da1e131d9921befbf53cad1adfee699702cb6bc949688b30f0b4f3f +d3afc9caa04a796e5afe2aa8f8e14a7959731a74dc4b215d7ec095ebe86a3863 +ef6d7975c3d2edc2e7c2f5d2c8cfc5f6fda37368a54dc07a7026ebe9e2d290b1 +eedfe0322838aad2f5be5c299a658f47d0487584b1f9e7def39aaddd212138e0 +8a8d2479be76477e5193944353796d86aa5e2ebce0a453bae8cd9bc976a14910 +93b30d44f25a29808227330b98bb42bad91b4964f6832f2946b0ff1701853c49 +dc522636d5b7fb6ef764097a17da725c3af793585d24c91627f49e83271b7498 +cbd67abde015c94f5f24579852564ef01dc4ad98f15d522bd15fb9043b241350 +2b1f128d874c1d119798ebb0e11be341f78db622204aef7778aa81055bf4b7e8 +c455a6398d7d5dac94a5007b4f76265bc8875392b5354bd38ddc111dbb8b5b92 +15beaf72f041f17d55b49b81f3d1279bb7a5ccb1a9daaf125e79d5ad7dab0595 +9e694040bce7da09f795dd3cd508b405c6bd07cc7ee9bfe298156ff2620bc3cb +cc7b27d9618e04a2ee6e3744d7a344f6554e0baa2290b2082f996026adc420c6 +76ad5978868e062323522240a388179de4d224f19182ba7a35c3aa952844df49 +f6c532d429e5c86f89d1e697fce1b50861cca95504dd63423bf603b14459b7c6 +91bf64bed93e5ca158ed057c9bf9160f61584608ee366e3be548bf2dc46c219e +9e0acdbaaca1a5b02770bbf21dede6a80f3af65ae92a9089683dce3ec5e6ec68 +9de2dc208f7304afddf88f35e1f428dbe74e7042766346ec02e1eda87b8c246f +89a0eb22d1c6fdb17142af0c8c0b565ab6db819d2ae2bb3bad7c7778c53b2686 +72191116278357d8659bcc81753c2906eac08fc3fb966aa5ded522da2a5edf40 +9a3eeb5735617e77a7a77009cd38c2b62bcb89ab73052cce4526f4f02bbec777 +e6ca65c90ff5931dadf03da48afb8561fc2e71008fb1d1d4343512ada1b78e71 +0a10079f211faa5227eb0b30588e9e03fad6d901dca2b6bac956eb8cd2ccfad8 +80e8cb37e31fa6a8206f6a9a2a9e1cfff1205345019a0feaecde57fb0fa418c6 +f4cb83025e7180e50394f52064d8ea0383b80482e48ac91c24d10c7ddabe98b2 +13eaacad917275e916fc0803796efc1f9597f8952547d27dee1fad9ac1fa6d10 +27127514e0f2dcdf9ca30393cefc7cda027c85e53d10ce53796529fb13b079c2 +0c7402109235a0c25965b3b7d741e90e500ec2476c5dd11dfae57d6f57b218c4 +b9cce956161aff0a55a52eb58a59d7a62d90b110f9a0dd26b8c902122271a38b +7923957a15d11cf1427ce56323c7e4428d2ee1ec6b1c465be35668b0a7ac8eb8 +af1f080a993c3c74871e4b7bdb2602d07587aed96ddb05374c2aadaa24486f9a +831ba1179b2ea3602d071411f1756b58168f9ffb572d787b2ffe01bc07c04d48 +f893271ee576454a86a0c216b224e0de81d66ace456d352a5b2537eb96be26e0 +342e4165d30208448c9314ec962ac31ee36f887d0cf61a575444b31180850172 +10ce125407e77e5c63c947fa320845efd26c85ae8813a99e518d679137ae1dfa +9e9f19c49b461da073dc1be4a9d32f6ad62d05afdcdce4e33091132d471edcae +38607b7f5a17e7340b4e1a110bf7ed2bbbb9ad9b8ab909430f29f87b1db0a04f +a4a80796d144bc1875a846990df6fb3f14a1457be695a3cf1a5c16878d44be38 +107e327ec4096cd66caa90efb30bf9837ad04d995c4f9165b1ef14d394b71ff1 +281b0d67d4d3cd375c79603efa6e0830183be17f77e7d5423dbe0776fa1387d7 +df0dccfbda67f6ada4d87dc8c6325f0460690be677aa6db7e0250b5196b420d0 +cc8d66fec329d81a7584a5d001c2c3e42350eb22313f036b5ae64868fc6aeed9 +af95ec8f2aeefe4a95e69cc77f321fb7e7aeaa45b2f56d92d0956bf321ad859b +d2e2bbe984b17fe9303f13428a68d6a1959288ffb63d800c11ffb6226920324f +6517eb5373f2b8f058be35adbc7ff15a2b0a81683aea4ff11071451a49efd1cc +f15664182fc26672cf89416da86a3b8cfb45510e1ebbe11060963434bcb7581c +4816bbd63c6d79dbdca7dcf26a4217bff8060ad7955402af67fe4743997a028c +c33d49847b57712e0e23a1c5b72da33198426130a132be52890df4423fe21d4d +2625e646ce72588478bf941f1f74e875812f7d7ac9c54d0ddcd12178abf50bcf +f5131713cf9c42d0faf6cde696534896406a8a5234a8ac19bfd531ca934c35e1 +576099082701fce199811dd294cc46ca147d5a187c3737d3d128ee8d437a2afb +114183da45b49ddc768c31e35c395c3bf67a79f8b1ac292f38ab2ef721453256 +523e9dc08e80bedabece9bc9af135276c819140d7a0e966156dea6e2f7aae463 +c634c4de83feff86407b556651a455077d64b52c5ff4b80250d312dbdf83dc0e +b9ebd541aa9fbfddef1f775be0c411788b054aad44c85d8723ca7d2a6b00cca2 +4ac55e90ec48e4acc15be17b9544bb71ad967c4b8437470e4d020fc6e8677251 +92e2307b51148b2cf46fc1b7f2b149ebc1ebb02c33477b4c56e56a9f06566377 +d2de31c00d90ff5ddb509f8ed457e915c6fee8103da73b5d782bffad7f7c029e +12e1930e95fd7b7bb37c48b7cc48d99dc9aa79388c90bf6c7c0b83c7f7fc0935 +8fd5f673dcc906c7e0fa7711abe8258828289ef48a40723e39b7ec79f2d3822c +6f45a6ae0745413ce860467d7cc0aef52c680b8cf1767915d3550d9813b5bde7 +1c21b0f7b7119bb0e1eae6a7874ff0588adf14626d101b4e117c63f2e7a60627 +dc40cb9ab16032434469f390804b9039e21f1afc9380f26571e3b2c64a86c851 +74fc32a61b787769985079d60cf71131977accec6954da9032b1333396fd5450 +00e364e7e6a79bdbc9f1e842e222ca480f1f22089a38079692312519392296ef +08f00707ec53e1cf114795631e3b14687b9e351f1b7bd44d6f7d41ac91e8404d +8ae952c3c78e4a6bc9ad64ac1baeb952053c409cfad43a877a7c420006ce3e9e +0278a33cebd6d9d9737432c982165ed82c45d26f55c133162a41be27005cd6fd +e60cc41bc098314a5a1619dedc6bd9acc637f398219f9a3c543f8421ad4c4e58 +9265d23edb6cb45f2273a908ca416ad8c32c2992d9efa95d86e631ac8fad778f +ef9936c2dff4053cfb253c24c65bd20fd534d6509c0c141a358d4ad95bd9b5af +8abb5cacb94788cbf6c43bb54d52751d05a1a2e6848c33ab9b769ca9bccd8e3b +ee742c0d93ecba4c5c31c1d32a567d4213522f2a5687b014351cc01a42c14208 +69ef5852aa703ba076abcd4c6653fe6c4100bfbe047e34d4d6e9c62a6e5532e3 +f9ac9e7cac24e076546134c226f38ad0f51f8f2dd8501a001b5c0da65d9286eb +3560b947ee38fa27a502e87f8c99ffcd54b1d128096360be6c5b6f3e536c57e9 +1acffa0392e87026f5acadd1d81295d54155ac6154e247d95bad5d9ace11215a +e0ca996979f6dd8e94e7567ea17b8827ea4d5d5c9a8484ca568332bac134f993 +91505c7fbd8ba336f9c37d6dedd17261483c232995658b078fe8f1a312cf74ca +de87453964bc73a936a0ea09f74e9b0822b8336cc888f0f1f399061c342c8b18 +1d93b17a0afe2a2a69acf2f91ecbc8441db2aa35091968a0408b2abbfa35e4cc +77208f81b76a199312d8b3c3426e49e08f8359e6ceb694550f4b8fb113f2b977 +937eb20585083e72e0abd60e60ca4ac0f216b65b7a9bcbe1005c5b8bbddb702d +ca9da36f1fd416315266905f3ca5ed221be1ec496c5b16070bbe38ea094ae5ef +be93eb0eacb95603d7c36ba04f606a11ad22580b1ee5498ffae48f218108b774 +d71bde64b7de26f696d95abd3c13853aa368cd2582f2b03be9b7ac59e9bf0207 +df0ad55054c594811c5e89277d3804d058e1fa5419b15d11605066742d284108 +7411f111e7375c6710060d26e0b60f6aa8387f348cf2bcc5762c16ef320e24c1 +755f88376f5f2ec00b4121861518c97145a7105bd0d571454c177da407fbfbc3 +4a93ee4852b09cb436f682f9f84da4d61ecf72f8f801a548a9304f19163d6bb8 +12f5de6e1f2b4ccc494015627416d54877ee71221b95fe357bf67271242a8f17 +a4eb4be3b7a649c234524b2554a8fd24210b7acefdecb2198265167b8bb28593 +07ed7a654e9a6e2119e6dd14fb33faa084c71e930b8035952b87fe8b4a297dc0 +e4a89d17214cf1063caac03d4bdd5b4fd62bfa6897811c3494ec3018c558282c +2efa94538edde156727152eea21c6e3f88f68a0176aaee333b79e6b37344bfe2 +77292544c72d4023a3728c2e39d2841c2450465852d02503fe0a871700b470c1 +a73d8c1db644db39e9c1ce3ccbf2149625e915599ecc3091e15e0a74768ed5b1 +8271fc242e10bd83e73b4636cf874ca6e6d756e707e671d99fc43d61ce6bf80c +3a3be178d9f5d3cb32ca669cf99b70b10dad7d270d0cd85a9865d60df07fdd94 +cd +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F335_0 /ZWXELK+NimbusMonL-Bold 1 1 +[ /.notdef/.notdef/fi/fl/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon/semicolon/less/equal/greater/question + /at/A/B/C/D/E/F/G + /H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore + /quoteleft/a/b/c/d/e/f/g + /h/i/j/k/l/m/n/o + /p/q/r/s/t/u/v/w + /x/y/z/braceleft/bar/braceright/asciitilde/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/bullet/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/exclamdown/cent/sterling/fraction/yen/florin/section + /currency/copyright/quotedblleft/guillemotleft/guilsinglleft/guilsinglright/fi/fl + /.notdef/endash/dagger/daggerdbl/periodcentered/.notdef/paragraph/bullet + /quotesinglbase/quotedblbase/quotedblright/guillemotright/ellipsis/perthousand/.notdef/questiondown + /.notdef/grave/acute/circumflex/tilde/macron/breve/dotaccent + /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron + /emdash/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/AE/.notdef/ordfeminine/.notdef/.notdef/.notdef/.notdef + /Lslash/Oslash/OE/ordmasculine/.notdef/.notdef/.notdef/.notdef + /.notdef/ae/.notdef/.notdef/.notdef/dotlessi/.notdef/.notdef + /lslash/oslash/oe/germandbls/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +%%BeginResource: font FRBTTO+CMSY10 +%!PS-AdobeFont-1.0: CMSY10 003.002 +%%Title: CMSY10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSY10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSY10 known{/CMSY10 findfont dup/UniqueID known{dup +/UniqueID get 5096651 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /FRBTTO+CMSY10 def +/FontBBox {-29 -960 1116 775 }readonly def +/UniqueID 5096651 def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSY10.) readonly def +/FullName (CMSY10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 32 /arrowleft put +readonly def +currentdict end +currentfile eexec +d9d66f633b846ab284bcf8b0411b772de5cd06dfe1be899059c588357426d7a0 +7b684c079a47d271426064ad18cb9750d8a986d1d67c1b2aeef8ce785cc19c81 +de96489f740045c5e342f02da1c9f9f3c167651e646f1a67cf379789e311ef91 +511d0f605b045b279357d6fc8537c233e7aee6a4fdbe73e75a39eb206d20a6f6 +1021961b748d419ebeeb028b592124e174ca595c108e12725b9875544955cffd +028b698ef742bc8c19f979e35b8e99caddddc89cc6c59733f2a24bc3af36ad86 +1319147a4a219ecb92c71915919c4ab77300264235f643a995902219a56d8626 +de036037defbd3a2c6bb91c73375b5674e43810b4f7eccb675b36f35d63d9ec2 +def21c5fe49b54f92f0d18b89289682cb097244225af6400f6ca98efaf336c9f +c304161e2006b3bedbff4dd36fa7a8f7594c02dab68c077e83335ee6d018f860 +8d9a9131325d953d6c38c7e0a34236506c1e70cb6657dafc3c9520131a251350 +49034e216ae175cb232c2ef5a3c569ab581f936ef4e8b8c8bccac287f06f24ee +1d15d2819058bd9aebc4ea91b74935f6d411562a453674b14bd76fbf5f298f9e +8fd37f529f9e0450bbbe473b5a4039d8d0228f56330fa15411d7544ce700984e +09593a854180d3100e136beea91daedaac36cca03d82b83d953880307edbd0f0 +014451ec8f10b1e30b51c2f9055e906272f02f32085e4b9fbe5a6860a74e274a +74349069b6eb90fce84259d281f037d6de9f42fe557f5f13a87e5c9f668dfb8e +f5e7f4b5ef9f5841b3885a6c8994bfd27fe35fa3cc1dbd5ac68e1c98c0d0ecc3 +bd2795e77848b5faf604f01362ca473ac72284a56cabb68f35ba43ddc6158955 +5bc6614cbcf4b80872c2cc66b6f4f90c315bf73b34e481705ee8b54eef70fbaa +71424420120f27d8853933e3ad4d8026397b040c88567f440df538120d61d0b5 +8232d66e2e006866b60ae46c3f4bda16a2eb5b248bb88a11b3fa4770f0f6c31c +dd13bab11c2f4ac77a63f703a5824638fb765033dce02f584f36c879416fbfb1 +ee7eebe75d57711b44824db906885934dfa7f386b811a2598fd5cca2585045f0 +4cfd32e35f32b90badb9a96f48957b0a311778d21914c9ea27bfbc75197cbb6f +0df8f6fa574e1f1d529a4594f2a6ed99b98fd302f4fb2694e3986c1f46ff165c +7f4c1102526831ae1e469e62f1a6adcf7d2b876c0d43f85d20a6a5dbc2280884 +1c7666d56f832b66cf189c4debed1fb37df76c3f1c632ade8822eead5e7f52ac +e65daa6d86e410d469a7844baa4fc9d28e21490b8cb2d3b2fbe718f55211fe5f +74d3573b99bfccf198c775402823aa742acca713d30b55a09c7b7ce3f5f5517d +6133e546a86c0395bef3387804ac1b07a4d27492485741a8c2ade23bb321da56 +ded0fe0d43baca1483566fb397db76ba9eec923fc2b3941f3b949cb13dcbdc3e +2c84c6e3a7abbe5c22abf9b6959a17d152ed0576524395d8a5049c5144680a19 +0ed3405f2c9ec716cb9c0fbd6b12168d62666ce74149f8505e02aab39977d99a +13a66449c9487a6b2863f7338378fb901e8ac981ec53ca555049b3667b4bcea9 +cd731a850ceecd59afbca1ed2fec76c18fcf5ba1b9fbd81eb84c254fa140eb99 +48838693123cde50278e4aa3cbdb7f7691d52cc624b4226855a74d3ff4b3eb3f +e193702ad68437760ed7173ddb5031737de3470f9340a44e92355ef033958954 +e5b33866ba86201a7951a68783b94f2984b40dac3037d3e6d2250e850984470c +a4fa92527aa313f3f366e97b87d05e114468dcf43ce4a27b9999e24295cbead6 +7dfac0c6d99e7332662743f379dee2b05fc7aed3ae405d631e3893b16e1a3771 +278319e6014b88fc346b4f3d17edfeab40d6552092a8dc6c2cdd506f458bde17 +e66b02d4992a0e370871035bda2106ecf7fab7ced8e8d35c6fbb825ed724b726 +8ce5f3f25d11386c958fe4b773b9268484c12f90e2e25e299a2154e5c480610d +f302e1aceed9d0b3e11681bd5322a13b8fe895fc755e0053890a4135f2993642 +3d11dba2766edb9954e308ad998fb1cfbc2285d1f7a9135d2f06cd2d7f7d7b88 +d1c6c9409fd3962b8b1c9a690e01fda96361ce706ec9dbe3b4d3e0d57baa0d4e +a98200ef682573f9aae9f09e2000b9d7e14ea41682e4e5ac56dae4cec783bf61 +a99a5df4e83fd52c0c02edf26274a16c939868103691ff4f8876c25fa70652e9 +ccb3399053205e0350ed215170f709c1901bf7b97236f7bcc13ba5b35a96e8bf +c6e476d81e396b0c79118e16b5489279703b1a44c9d7e320936a19ed319cd03a +f052845dacdd9b627a47433f2225827c65dda57721e8b196cd368dcba55250e8 +24e6b7b93affbdd429c9bd8e4523d8e8a56427acc3e5bf1b2db9b60cc832002f +1bc52025f18e7d87d9bf1b8cd8dc170c6dcb85af5afc1ac4a24c0e38cfc0f4d9 +8d63cbf3b5cf6f14d902ac8a9b4c48a5d4ba4bdcf4f3b69e2998f507719e2bd7 +db63597995c5cdbba59f9b010a135f4dcc8cfd602d40b30730125606fd1b27f4 +9ccfb1d0f6a97453a8c9a40f643fddb1581504132883598385c4f76b4e57b559 +c0ed46d83ce8427db396e96bb3dbc307df52ed28dad5cf5e32d82510300241fc +fdec6d84bb008cce0fe96c7c6d836fd3c8eca9341951e5ba15ad84a1799d137c +938fda761f12ef2b7e90a49f1ec49445b5638ed4b2d903924dc6ebd72fadf61d +16eb74d88503fc48659a86d95043b4e9764eeee72247367d0ca6ec0dee079f9e +5db531a1411790c08c942b7ce7b028e4b956d5f1df8a47a8ac6c37824b661b57 +147ade729f5fed3dfb47227b27aa34cb86584d20a628bf18c395b186ef197a2f +dcb3b6d97ad24cc35a847cb98944011ec6342d0ff9e13045ed70b68a1a5a53fa +b8f341c7e187ac0888b3c8e119d8b841e494b9c1bd746cbeb1ce48fda15b0054 +817873ce4da21d8550892ab4a06565a98fa666a6be00776bda87181ef8483129 +3708a88f69228dd0c3ef8224301dd8fe81b4abc3563f69bf1212897af3e738c6 +c57cbfa53e64ff6a79549a8d81c3b5566dc7e697e11971a7cc6743ca1991f391 +efd8c0ba9a01397a05bbe5548843de7f2fc4747eba91c5988605a76f1d2aed97 +398cc672cfd5498ba16f6aaf55ed4bf613786aa1ba2e092c06cdf82b6231b0d6 +b2f10cc3499b6c444cef515a033381f7b6502d6e6ff4bcf2bd273cd059bddf06 +652dec312ff80e8c9f37818c2a453523976487f1a46f8e967b5d43aa3e24fe03 +46097a6721d0882aa36fba00d3056a8ad42d4efb81edcda5cdad6ff2388fc54b +775167dd8d709c2a315e130e822ed68a889dcec2ebb10c4c56897ef4c8fffcf8 +6d0d146c61ce0d5d2514ec2e22a66090bba95fae51b7691c7f1ae470c0f6c58e +1eca070773920235792e58838f031cd2cdae29f1e61ca254a1ed00a6f664314b +9fa26bababcc8a6add7faba2081b6e307a17aa47ae1de11f7189b78feb61a957 +51e9257a84d3184ab2b9d858a41aa2c23374497930c4bea32e04d32389c55b93 +23a41d83442345d482927070af462aaba8f5b1de9876ef724fd364ce6e376e0b +a411d2036639832aaf1bec583af5bee73ec7bc9a3a2acdde4c1d6602cd8d15c3 +39922661926a3b2b1d7b15bb30870929d0da419267c3b04b2aea81584bc202db +56b6277ad95af3cc411dda29096eeef6cf0bb3d554bc9411c39990db4ccedf0e +4aebeff2e95e4469a8fd5ba6f03a733c9ddcb832c221f114de5587fa7c9b0096 +2306f9355684eb66d1558aea7150817df7fcd27c3dff8c9abbbe47c2354f7c50 +c306e8739a39f1a71e8e7de4e5932a0a1d2b677041802cb02cc13d7c6aab3235 +1143c982379bf5d50c92ef96afb597d81c107f2ee92f46a81b1bc9b9cb30a296 +74529ce1ba8a022e221c77650c681a19bf0e5080a065e4d66d70f2ee4a876fb4 +40b0b1e29681ff5ff0ea41d27f33a7e25115e9bf421e56f47e24f03945a2ba16 +906a3d0a8b5d3f20abe89d7b7705af5f0f3533f7a546ee67d3bfb3349d4299e8 +e49bec41a8ab12e1bd71b2cff0cb0f1fdfc0ded134b5078a1e87a490d0ee31ae +506618d409acf32cd653c59f36f4e3bc051ca072a4a75b91ddc17660e00cbcb5 +b1fb8d17f4bf7f78f74724ff9f1b84a5eacf2e7da1b9ce0bcc94b7a817dccfbe +46cd999463b0b19a91823d18adc1662117011f2acbbdaa2e062fe77706c48952 +38ba2840d9d98b9a7a0d63b8bd40c34e26496d979edda33e5821c86d9565f1ca +40ce6c160e57ff22d2564348e8f89d38d46b17d591053c79f89c4e750d619407 +eaa5a8bdc52ea6c6ef02744eb4a5c4886c32b210b86b41495d8729174df80f7f +b653a2e6ff5996d96eb51a828d0606998fd526a82a5e8e1dc79127fc6340000f +e218fc26b7c97c3cdfcec5a497f7be1ed11aedb012ffead9aa2b94630ead80b6 +3ca17e79276dec733c9955e9813970215fbe02a751bcdaf5e427a64e9b47b4ef +e105983e0e02c5a8cdc06a5db4126ef333583e4aa17a3fd944ed803d4ef88501 +bd626e0d1d8d7b71176259283e22d9382ae88bbec9cd6ba87933f86fe28af800 +dc2080f38948e3c20d8f4477e2b9f85da4800cbd1b9015eb64a07b459215caa5 +c38b7781d919e199112e241556e1e7681a749cf67a6b246b6b245d34ebaf1504 +f06366b8a1faaf10bb4304579640f2cbf3fb339df697701f6c51afa09351e699 +890462e1a8152f70f301b5f3a01c549371be46d138045ffed5411192bf6eeb13 +51d407ffa26d4b8e7b267a3b3cd5bf9e06816df2e35b6937cccf16b4eb9ca3f1 +272a16fd71588054016ef2743c1bd58c6bf22f083fa9326d19299ecbcf66f4b9 +afed95e1e2a2f8792328e3af6025da7baa1b10a721bc511e9c2f302673df78b9 +f466e742ab2bacd5728bef45dfef5b74d1da674f4b1c8d51a324fa24b23d141a +e082d79c3fea6440336329105d33aa1a960eead51cd500252a4d7d481cc31a99 +e9a59e3b4364a3e19805c97270bd19b031146afd9f46111a10bf886385731d74 +95ed4727f7e2435c96ba702904ad29f606fe9c5f1f9a11a229b1d528b9fa9ba5 +b50b4d4dba0ab5b3840d71c67626b6afcaf743dfe5334e00b64c5a73b3775450 +757b911673bcbacfb0f8509e8b2b2d9dada9a1558b97b146f555f85022bb4bce +86862babbcd259be6537133f30ab2895f60869641b1b9a4cb43b676b0739c112 +2859492d908c6c60aef5ee3b60d515e7e641d008483ab4aea0e159481d623193 +b5e2bb48c77bb87783c7525e59d19a190e2c0aa02446a8d4964844d9f2561a3f +70f20779d197b91450de25463dbb82c2c7c6428706f6d9f6a1474bd85068b37e +4eb45bb80449ca5fea88804308f054167aded26609e7093cd396948cfc810160 +347c6d834531d64a27bcfde1dd24607d5209060f8207da7f5ca88011e24e326b +66a261f36f754a37339d7f10eab4f276e1eabff47f4bdb577b9c4dd3de333fd7 +8f8da94df25df93a57193b1411761f908510980558e23b0584421f920989a758 +138f2e50e1493b3f9f2154a488202e0bb77316ec03f6555de4ae83923dd1588a +fe0bfd9235b4c08a8072804d743e793daf862ae381624303be7e5e0dbd74c51b +4172b1a16c27b6f8c5a695fcf3015cf4f7d89fc91c4c8102eb83a15093263774 +740f02f675477a3b4b6734daf3d18d1e3bb7752922e9b33bfadc539596c276bd +cbf0fcf5437eb33fbf4a83bb2f92462236552eb0303ee70602f42bdc4b51d384 +301922cad3abd13deb81f173e9deed83786f4a5de1d7aa21cc77fc364fdd2e7d +8b9e8074ebcb7f3511f0a256e2cba9b32bac11a5b7acadc0fc1d378ab3557382 +9aaed6a9c679e7e5cac49307549f8c4335fc477267e25506c41035cc248f8797 +8c267cb08fb5bf8a087e95dd47aae4d8389e97ea0da1af064d76e5df286a1774 +a783e3df200df1cfa26ef1ed9b5dce5dc55102cc5718854fd8911a886d0e2e8c +a38eadf009525bbe17d0986f4e3c6a23e608fe2782e7c4bc31ad13d80ec03b7d +1f0ff0855c4d7f9d63d6283ad8658fb13ff68586e3135a99341e4b88678704a9 +c5e8a4c2a9e70f13408c9c54ac9420d52761f62225c64b7c60514b7de0a2c8e3 +f27544869c93890e7df32680fdc438392efdd6a7bbe7621a7642632b7f45bf2b +3f0cc935a688266c39f458b9503ed06e67f4094946e73a3fc27494d890065355 +4fce63c60e6a32436d5ba5e0ab4f373e816b57fa6ba5a2a9bd02cb58af2783b2 +ee1da6169c0f15c23c55a7b2d74edb384c6f646adb73d70e3310873e0c99231b +1af196d1742758956415392b4537b1f04ee4060899648c387bc55df28c6db99d +2f87190bc6f1109ebbd78e15a5641a76198b590286065996f6fe1f776f7013f4 +e999219945c4509d37463f6f18cfc46a500f39e2f2ad229bc16793428a9d8cce +c5d950ee8ef43b425e518f4fa99333f9bf2a420b33b383756ebb0324b7df49c6 +0eeaff9f5f4f0665fe60d40a1f9824c0df60827d2d3915512fc4a5e54db36580 +9e3fd8c1c7c9ead2b0b5011e10ec68e4035d8aa662f0bf09fde9bbeaab5fea32 +3cd1f8cd96c62b0410ec741cc2aab05bcf9cb188194aa1fea94f40a4254d9149 +82dee90d74a6b5d876068386d55c1ab92f62e3d1c3f24d564615ca3035ffce2b +6b49e53257393e66967da9b72010d0f8c4b6f4337487b6abffbaa16aaa86a6c3 +7c22a7b4e6f4ee90d60a9fc7c95b15d34c8a689f028e591215b329d86f35376b +15dffe9323257f0748925c002cac78ce7cf473af7378eda5489e3c464b11e3e4 +87d805cded68a70bb95a36d01885006d2cded168532d575a128f0e03ce4a1827 +b7b0f7ca3da8e4dc774ee59db3616caa3a8924f84f35df50e48477c35fd08945 +308a214bde3389d0cb225ee5d1f96771fe3930b16645c6283b70223dfeca6663 +d72e9b6b4773edd543cbeb81e38a094ff9f1eb6012ca08a77092987bb8dfa849 +361743964bfd43032f77b09d6d1407abdcca53d424ae51fb1ed1434cf4a2f391 +b81678987709e0bea61d8546b8de9b05260d7e2284e445933ecd867cb63b6004 +0fc50c76fb25f81fdaaf545bed63d6065def8265028a224797551a6a8ddfab06 +84798af0747678d53a7564519116755a795f14b254642293aaa3622be7c14f86 +5dd86caf78e0273677f2e33658b24310bf444b1e4f0719c187669b286740775d +66a65699cbc25bea7f7eeb8c3146f9e91e5e0f413376ac09c7e24f9b76d2af1c +b63201760c0a7afae554b8defacb30d9dd146223f69b015b9b7a79cf92d52404 +6531acdb6bd53597645241ec6028c585407b903d0579573ebff088e43efa91af +e77940e6c5ffb955e1fa083b949cb13dc3483bc7637b96f03c79426237a96c21 +26788fbaf00540a987d4ef95082d64a104dbbd75e4ea5c00c2cd02e622987ff7 +2775eeca7c15213edb33fb30b48d17c3bca35ed5ae941829d5992d7bb74f8fb9 +b04fd6fa321052a8c2b40f78c8e8eb081f8851c508f4774267d091e2bcfd53fd +bb9e9b22d7aa6c9b62f0f67a3bb9b1984979d55c45d705c1cbea897072a86b4d +0cb7400640c26526c0a03395986cc3ca897453f7e6c4251d81ed29e82f7052c7 +f8ded9c0aa221832b5750a9845659235f82bc4d9b073a75af2271a0814b1b9a7 +f598e0e7628851b21af4f0b0536c129f6ac5f62090191a7a0776190010de80e2 +7e252e134b7a5c4e14a18a84e7fce3f71645ea072ce3655632d2113d4d176f13 +29142d814a63c756e0a43ad21a55d932d1b83ec93188d7c893220fbf5157baa0 +834ffdf5d191342a4f7afbba2e63b8f36a6394ab5926fcdfdcd8d8cf138fecea +3deb371294591899b4f6f8c8f0ea2c41356eca49df468a952f9c3ffccc8a99e1 +0d5d61732eb44e2ae7b254bab320d13990ffcdb63f3d541ed21ae022e86ddf20 +1eac6701a072aaf27664dd4e7874c4e428682c44de9d9b14c25fa8c2e8760acd +79f11c13e198602be9d9573f6f04643b80abae1cb6269e00c8ab419d49c3606b +11b1f8f46e7977789b19ee83c5bc35bfc48da6d32dd4d16c1303b0799dfe98fa +0cf8531205195af9e992dac76c6cb79ef51865e6b012f29df6d3333daae56b36 +8ede2fc26a580344fdedcdf9c61366f5887fb1e7300f7898e38de35b4dac436d +c4f79f7b365cdf9b6a32d842b6f8494b7b6c91c122af116dd8a3c3c1a35a21a9 +509f5c0c8479c5e57b2c0e175fbb4a85d3b52c927a20fd0cfdf3e2273ec8726b +58c23b0d4f56d69ec2c59d8ce896ea7dd86cea423c2f7250170a09991fdba4f2 +40a6df094cd170ee83bab69d4b8706441730cf417284c8206c646b5105d592da +9274bc54d07e141fcdcd130e51bacc353ea2e99dfae63ecfb9138e0aaa07178e +de98a4f4d365375190585c8579e73929b840667afbc659f5ba4b9f25fe55c75a +2a42fe330a4b90f3a088202806baa50fa1e99fb32973f23819fba8 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F430_0 /FRBTTO+CMSY10 1 1 +[ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /arrowleft/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +%%BeginResource: font AMYDOG+NimbusRomNo9L-ReguItal +%!PS-AdobeFont-1.0: NimbusRomNo9L-ReguItal 1.05 +%%CreationDate: Wed Dec 22 1999 +% Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +% (URW)++,Copyright 1999 by (URW)++ Design & Development +% See the file COPYING (GNU General Public License) for license conditions. +% As a special exception, permission is granted to include this font +% program in a Postscript or PDF file that consists of a document that +% contains text to be displayed or printed using this font, regardless +% of the conditions or license applying to the document itself. +12 dict begin +/FontInfo 10 dict dup begin +/version (1.05) readonly def +/Notice ((URW)++,Copyright 1999 by (URW)++ Design & Development. See the file COPYING (GNU General Public License) for license conditions. As a special exception, permission is granted to include this font program in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself.) readonly def +/Copyright (Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development) readonly def +/FullName (Nimbus Roman No9 L Regular Italic) readonly def +/FamilyName (Nimbus Roman No9 L) readonly def +/Weight (Regular) readonly def +/ItalicAngle -15.5 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/FontName /AMYDOG+NimbusRomNo9L-ReguItal def +/PaintType 0 def +/WMode 0 def +/FontBBox {-169 -270 1010 924} readonly def +/FontType 1 def +/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def +/Encoding StandardEncoding def +currentdict end +currentfile eexec +d9d66f633b846a989b9974b0179fc6cc445bc2c03103c68570a7b354a4a280ae +6fbf7f9888e039ab60fcaf852eb4ce3afeb979d5ea70fde44a2ae5c8c0166c27 +bf9665eea11c7d2329c1a211dd26bb372be5822f5ea70d99eb578c7befd44cdf +045a363056e5e1cc51525ea6fc061dcebb337208eff729802376a2801424f670 +0e7e6397b28f15bc10b40012b0a3eaeb2693e8f7f627c4c9c7c6c5bff105c1e4 +1b2b9e8f09253b61177e95ea219474796072f4b363fe05fa7637750b770d7b13 +99fd7523816e22986f43b17ad2f9328028bba7f383ce5c429773b3d968b4307a +efc6f468433d2320871c85fc9a377c8146b0238e6386f2f010e4c23bf50f301c +95de2b4a559abd765880f5b3d8960d7c462f28339aec4978f261a05761583468 +b73b46da2852db1d9b0b53f6427551b6e87f1a1492a19dd774ccc6a1d0bf8d1f +afb24bc1b3a56e452791e8fb9206a2c9df1677e848a67c4dc754cd0833116c84 +25127a919ffae922f6ec724252ae53662f3eeab1dba230a6ab6ad98cf27afcb2 +6837487ece5214be13a113d27d5ec449ac017cc7f12ff7b731b6aea24462f3bf +e743debd18a99eda36d085ad3602ee939e3c2a40fb9551f4e5e904578e8df0ae +a6e10910d5205c917b45b0d0f44caa993ea6fc2e17ea43b83e62abb31717b3cf +d783d25486084caa1c642a4d9719906889510d7e60c8ba0b48b9d40222d36a01 +1aa4c8148ba57f165bb7181534df0a597bcd1df98fd644fd3e3a09a21bb018bf +637e620e494eeb843c575bdc71016214e19d0d3d030b8a9eaea88822ee97d8ba +ffbd2f522d3ac2f34927961e189b0c163c365ebb410088e95a5bd200e62bd5b5 +e846bdf4c127018a54a78bce6dc744c4c1aec0087df470d72e461c8079f1e8a5 +12794d770d391a02d428fccaaa4fc4ce3eefcf12b553d8fc59588b922565aba2 +c179b29dcecea5254dd73f388bb94a7ea4f16c0ea0278deaa11f2be56dadb4b0 +43bf781fb5151a4d2491bfa2d439082e8cf7a05cbc84393aa92f1d09af1e69f1 +692065dfb293c7d7bb552469bead4b1479ad1b75e552af4c162d37027dda9863 +5e1ff0b4c3ba9cdb41e9c292e901446d40a10906ca0c3f649f7968b4ffd2c653 +650bb2320e55fa19938e4c3775f286a05a1011cff4e4c7f353bfdd88ce318584 +799cd9350da919e462621dc3556b48bf53edce91940eab01870741f0fbbebd2b +c6a26e593fd78e7ab5d05af43231c262477a5309acf964c0fbc114419c98df24 +279612da5ae02b2db3eb07c329891aeab0da742593183a92a619912d6e53b33e +f9489dfb011045b4f20c79a7038e473f435dcc8dfed5b9071acab5a322d4e4b9 +f225eef68b8281688882693085432c16d81dbadaa3df3c2ed508a5547c4b8b18 +2cbe2aab5bfd98acf80d5927a07da8a3aa987a899e28e69a49aca9aa960b45b0 +53079246f09b1f8be89a5912784ef566497df949ac722c37b8b4c641f602217d +e1c7fcd757c04c263aa2a4a08d7e08055e5b922d850c2a898cf32baf2418e0a1 +fa6e54e2459ef6283fbcdd406b9079950669763106c9d8b16d0aac8815fe894b +e1c7af9702ca13b36325fdd90110f1b8a03ce3e7aff614a0a2b1b15a1041800b +b72ceea17cf4a939410c53d5bac0b89eeeb9e2f9cfc6bcdfd9a438c109784adf +9d2843fc809a040b9287f0c71d93f7c2b3273d39c5ed535a8e130b46d3c97f4d +e0bf14ef07eec07f1c747a6b5d294cf4d47ac12f1d9282d2de0f808a4c609e4a +0e2a68646e9583b6b9a75c95840bab3fe259ad8846a82af91f44923f25bac677 +3c8ad0a810731fafb0a95a5445b5800d0be0378909aec60f544c3e7438760b6b +feb2b9b16652caab36f65ac444ce9358670e060a90cc422043b8ea8f0b065446 +0b4ed94690003cc77027d8a3c0a06a48bccdf5d6d6770402b4f44ed2673b1329 +06d4f88bf12a3445794fc9db3f1bb4afb8d380def7dc1dc78624c748192fa321 +c96b32dc26b30e54dffe770165d1759d82a5542cfc4a772d8c2cadcd2e2fb1ca +1517ac15deb0bccf94ce83436e989adba2903489abb6b2eb9f977f3f4d690b31 +e8f6e27faa56bde2c4fd331ceb502ad286857dd67d898f8b86e13a98044f77c9 +ef13c7b14a754fd0e07c68a90940f3fe3594afe83c605102c08ccb046b807975 +e69c165c9b833f41da40d17653b80730495803061fe194ca599d53a3367ba3c2 +8db6183ae68f6564178dc0372c58a103da58de056b7b0f8795cccb1cbd4239ee +a2b6af7eeec2f7da99f12110e07d663dfbdc0645dbf9e051f91924855405f022 +13933f1c51af2ca7a39ae3204ed31d68b15f2b74914bf86548d87316170a909e +e9638b25282a209e9d8bbea3ecfa3ed46c2dba5cb3b38d8fadd66baf9417f5cb +6b3a9186e34d1710c011e3a16fe8f9dbc207edeaa72c2f7d4b7b7112bfdd1b0a +1330a7f88ee867f55c828a9154dda3c57b6e596b830b33ff636e46d8d00fb39e +cc497f82e037ae6f7975a36876d66694e3dfccdd4a5f9ee70883fde704969531 +9cf38a1bbe0c7fbea056326e41636e17d93850a1df92ee50089f30f3c4ade4d3 +07305271d998208c7ac0f998b96ab3e3e182e29b819fd861e52b04e00f9b6be0 +8f5766fa4f3557d0ccc9edf31bf84531d664fc186ae2e7f9c81fe8c4f9f1f2ae +3b9560c9df5fe69d969a0d6c120a6621bd68991fd5593f3197223c9f09613eb7 +1ae0c78d9ffad6be1e36df5885f657994ffb6eefb5e0949674c34768f001827f +12f1ba77ae821657e3e96f17de324f9355152cd28c7bc3bb93b0bd0d40d17d35 +2b303f2518e05cfdc4dfa697683ecbd6a949a2eab9cce57b8b14c53ba2265a49 +5c28d22dab35e36b5b02d2fc02738aa6fa7c4cc66c88f5bf25b2be88a4987cfd +39ca40be4ebe0174ba827e7dba9579fe52b869142fe488f9ea5cff30111d6400 +ac3cdd3e1476468fb113f2b977937e70b7214069a06007d987d0f3ade59460c4 +35361b9ee2378b0b2365178ce4fdaff19dc8e52a4eba7cea25387a2e330bea1f +dac191c9e385c837ee253220a279f05876328864c9c2248258814f7a16030c60 +5a0da56b130757b262ba58ab68340b32d30ba67ae01efd748994a6510bdfb15b +50c31f5dedaa1866ee9123cfc235591e6516e8210dc0157687a8f081c3aae846 +7481d16e8af6d8caa9c8596c801dd5948cf7361cafb8e01268eaf0cb40ae29d0 +de3bb879970e06fea94930ffce9d4a15ff822de7486a4023fb6bcf27d496e0a5 +2c73d409ed6aea6923de8e6ddcd7615d76b5af4f2be2cee210bb781fd622574e +042b2fa03ff6e45cbefae7dfb53447fc56da42938717098806352776208567e1 +f07e8372e0bd8a19332de3a09320e82dfb6ac58689a65ec1fb97808e3ecfc84c +1173378bbcabc629bb8d4f2642cfbe1bfa1a25137db295526810f349baa1e4fe +9bc755f32a1ed330171ada792e10540d41b177bffbd9b94c2c008ff74a20138b +eb2d0b23fcdc136e434d7fc5e7710559b91756ad1171ed3bae249960384eb4b8 +4ec4c71e91d872b1db3b7ee412aa9b4e66c8e5a03d5f1d98de47ab51dd77014c +2926ab5e994a095d9ee5fb336746bba506603279bfa91724f6cc868abb2ce5b2 +c145dae2b6128e6c913c8814a5a0b4134c30edc7f97908ddc6e7bb65cf8a58de +88ffab9273afe5819be1d31040559f763e95cfe230d48681d0b4103ebb92a3f8 +01177bde9bdd61e288e9c5dbd18163eac0a67899acfc1c386f8b261fabd320ab +89fe9be450e41549b3753c32e2cd3069e82101530513728dc24d8c2c25b06ae0 +91db97dcde55f701a63895445c0bcce07ccf4c82b318494f42c776d9482c8c19 +46fce4e987e770a4a7512b5276e36ec3072c6dc9812e56e11b34baaaf9bed596 +e52d1ac1768e8e0a8b20b94f320d56406f4ea3202920fe665809102ba71932b5 +51ad5c83f6f34b1e87272e8ac300761cb99c9104a20557c09df9cf7ac51625ab +05c5a60689321d8cef7eb8edd092b9feaba272a94e133aa84a9b7cded15c6824 +3f7ef11eee530323afe1153fbd6285b2302588252609824ed75c05416beae011 +98155779dec43c2e7fc92532951a1ce0dd6613afb3f9c73055f528f993a342c2 +3ea326391cb99feae1d61d95af36536b1c53d0a2c19709f7c85f07715f95a98a +cdb7722e297692fc187c000a9e64bdfb0c56852bf7ff946f932852d3931043f2 +60b7beabb6b6faf76bd8ff3f2a6fca03fb36ef04f59a9f67d26da5ddbc23bf20 +d82e99326a41155cfc7b4fedb80f69d361c31826743ec395b7aa83c10f9b5eed +80044f3c258d7e2052d2cfe08f6046189bd0022ad8e6e7890cd31848b2477ecd +095ba2ca9f4e9ad4bc8c7b2dae33d20d4cd01885c2f172052c1f8bcea593fff3 +4821540e79f626f4d7fa64c0bb4cc5485309e67071d0277a61369645ad3a4d8c +fbfb1722ef6011fa6b2095aa4e5b32746f64c16af093df2e9bc175409949d440 +795f6f2b72a69435be1621154ade8d4dfb1bfbb0e28da8f08c76cd0521ff176a +d2e7dd44916af6a1dfa3ecd6194189190b428cb56e2ef4a1bdc5d739ff1cbefc +39eac4b5934d3707bd30caf67adb3612b37056151b45e9eb73c3bde4b4350148 +23c3ea6ad5be04886842418ea1872bc169f92a890670fe0b8bdd86421400b49d +57e5ae8fdded5d706eebe573a5a172004e59b9c81fc990d2cf7036344c4335b1 +842a5c879354a84cc837d76b2babf981d4e60c857649054fc69fc59bf14aea72 +51210ac8babc95d58f4f3b497d5db3395a638fe339c5149f284b8dfd340c0b0c +1984d43b5951b7bdb82423182dce8af2baad5eb25e037c5d976b534a3459f742 +751b5ed1c5bbe4915a7b281d1b1c806c58bbf900d5ca092fe2119ce099e52872 +0e5c8231dd6d7ed8fa5d2c953bd8bdc13781119d2b31a94bf39948d4b3688e58 +8aeae48e2d66e17935058ed16528d28e50e37bbeb1d155450364517018b1b44d +bb0703befedb3681a2b609063302129628fcc24d88653589b431fb84e4ddb650 +c2f783594de613ebdad8a1324574cad1fd05a37844799928b4da778710e3a4cf +b85afd46ed46ccad840106074f69ae7c306abf4cead6c66f4fbc0fdeef002570 +25305004426efca887ed5b4f2ef6dcb912ff552089f383d270c1312811b510f4 +11622aab22c5add53e1979fa80a9ac5ab80b3255c901cda700904e4254725a18 +6925971163b35469c55ddf9d36d2e690c988678e2be17e2668807c0fee64d264 +5a8f26899ceae3abc5553bc58674333d43f27d0ead9297619e8169554512d7f2 +9984c12dd44285a3d8a75dd20ebdb5280b95471bcbe5473447fcf750c3b061ba +bf491a61adf487ccefc79cc514569978f12a7a3420ee046e1c28776c96c550e7 +fb0e2b46b3e57b2b8a6ae7d306fd0eaeb026beb5b13b8c980828f78905369fad +aa7ac9c3b91df9a4d1be00b3aea709995849ae4ece16c126b99c3d0fc0bdc084 +f8486d70022e0d5a8e50a27e9439e37d3bc175c3a3bb19914a4bded2feb81ec1 +fa7e274b027f4f4bfb331bf4fcb58fcdd1b999a775bd2a9002e846d7fe61c6d2 +e29fedf3121af6edcef90f23f54b128efad5fcc3e2236e1f9f59218994460d1a +f21eb9a2999501fc489873e9eafb986d9e9e780b4eddf332aa72697ec956f63a +4307133ed0fd2dfafe283677469b7b14b155b17a8da4a81cbce56da716149124 +bb3b20fa7a2b64b58d6eab90dbaff1d560e5e5492f17615b7308cf7670f09a04 +6115d454937c733ed45b1156c2e7d0ed43c093d6416b91533637d5d5f649bca5 +50a5ca5522b0f8362042caa30a4bc87a4a4339710e2de9b2c0c84baebedd073f +25cacf0e4c4bdba46f4c545e27d20536827ea4a4d5f5e19518fae6ba2d45b5e0 +b247f20752a795594d9ce548b5c0217ef480cc5a0be6794178fc7c017aa8a3bd +74686310f635ae6153d9e18a0514882d4ccfe9d7dae9f24b393985e8da776880 +1d9a6515ed7bfad3cabd1e13f2a9be17d42dda60f38dc5dd5412b03b938bed86 +0f9cc900eba7eb281e619edc39b5413af1e242ab56171d3a01203c76788d9024 +2f72c89b7adb10f5caf6851acd3a4369972f796d5a1a9816023f5a454dbf5bfa +5ea34c00df81a76fd79a0198e91ea01efbf7d89d78f9da5253250bb29770c4e8 +df955af85d48c33fbdff3845d6868920a3b09ceb0b7de798354e80d1f3ec05d6 +3ceeb37751ab5f9d5f7e682958235c0fb224551296108eeded2e000bf86193ad +5f290f698375727743a699633867f03f2d7801b18627f25628c0b65ace0e766e +ed22bae384ad0305bbba6a3cbb913641106259e2947e77caa437856febd8b604 +7621e8be93bf909cf3893cb2e0b4c75afabcac6ee9ebfa30dc6ba5e9bb572318 +ba844429bd3b5bec550ebf2b7a3776f11dcb71c930489a792bbad9f6a1679b6e +22a32048d0652fe2e3c1dfebce17cf97281087ed892b5d02d83a97dba1b3b221 +4f52eaa45592670902f979905281d7e92e9bbeebb909d5152f97aa49068d3b2e +8ce26b784b48936a3f8e569e5d96d8f3cf19335c7ca5f139815f26b62ef0be05 +2f436d3d7ad037451cef14021a15b0b10a07048ffd4cc4b4ca987cde5290318d +7100cdfb146fa044c694c79f3ff3ac98f1067bcdddc054cb3867af0b7e340e39 +81cc10ba0763901afa3f492590664fbddc6fe2ef568d6765579eaa5ff1501a1e +6b6b303c415557a70b4d60994b9841785a8791b51814f08ce8f0b048c690dc05 +fce223f392df0b93c030960e7a4717203c957f428fa52cf5d206eac92a7ec569 +b1353585ae6a14877eebbd8c402163bec563feab67ed764809e5205bc3f50fcb +557af616a430215a7f9915872478572a2335fa3817abd8ff113020f023c513b4 +202a3015e22d173b07d87e6d6eeeb3e0b0891c00831843c6a2613c15bfbcaf5a +8bad5d9e69a88eed3a1965e1876b223b74dedd8f16a2302c7f70ed7c8b5e60e2 +25c39cd88e4b559888007abc4f48955fe377c69b00be16bf9eec8248ebeb6808 +5a80b2f60ae03c29fa29b91f30efb4ca29bc51fb2bc09a7343d0b107ffd02a03 +b26ffb1c6b1d2b5adb3647d37bdb45420e8a115beadb142e3aeedbcc8d0ecd93 +8777fb9ee661d5db7088e3faf04e91f1865418e2723565fe2617d2d8e106a230 +a2dcb6a4502528d22457a4399cb7f9e4f788a03d6c8b5757cf59267fd86ac4f9 +21675f6da1a90156bbdfa77facf6df331491cd2cde707e509b8e5d03ba1b6781 +eacd2ac3eeabb5f5ac4d0d8f5b10676e7357557c23bd6412c625d7944302c969 +561c704f937fe5304e1704b20352a758d6237e52c4a356a08f9893743a5c20da +6a817899bb2edbadbf4234e1ece52b9b3f3e29095f0975259c931b67595f0ce0 +db8e4ccd5f6fdfdda07663d252bd05fd4ca58fa54a9fa6acceabd97f2313c59d +195cbc3bfb55f9050d5e3ec4e42f883635f18d17efb2a0ab333e09c2521705be +aa147b6717c816e57d38adfb2f4658249a3a345b337251b7537cd305c6424dbf +b204417f4c36086edaa8da348dc065aa5a7f68a0ad3e3676a7c240e76ddc8786 +96b56cd4e70c28c3009185ae13ad4e96c8522735074ad649cabf39201903e974 +12967a45b574790d727dc68222dff726fd162dbfee4964afbe6549abeead5264 +a033fb29e70f1d17fe58934bfdd5ee6defe6056ea4a0e39a39b7fc1a6da06713 +f952bc20c689bdddb94bd67997f60f31fa6239387089deee5b687455a5c06fa9 +fe941781f0d9835d8d020cc6286c2fb8ed5906eccffacadd71ee0b7c7b67d8c7 +aaa95f9cb24fd22bea989e0e0919a4ea35fac630a9090346da895bb5b6e1c1ba +ff90f1e16665998ab7612444979edefd96f1f701d13950e0ca2daa7787735fc8 +4b268e36cba6d7de0506dc5353f3d13ad666cba8f8c56e27e44b57873adee581 +fafd1f33a85b6169d4794b1d73940c134f11dfde03ccc5709f6d806cfffdb6fd +f9361520d0023ac6aa3c93b843d8cd8a652a665eb31d6b75d752e7679a9e1327 +d0adf92820acc78b0793b9f0307c776c201a408a883f99f9d2ade3960b1e62e2 +db5d6ca4115a028f87f77651c95bd71456ba087709827b05a80ff78746cd3c09 +72eec0baa7ebc8a05043e18e63517fb66e333973dfa6bc796af520e8efbae640 +a2f4b94f244d365b76fb3e229726dd7c61478dff4d616cdceaec1ad70d9cefd6 +0e9e6affa41f34b777da7174b3281acda204977bcedb3f5f9f0c5d77607237a6 +9d6780dd18cef875257fd719d237a35864498978239cc0933a9ad0fb8ac74f3d +869fab0c30e8001a2df0ada8f56de43c5e9a7dc78220720dae05f0fff948adf9 +0e8319eafa3fc8e936c9c040b1498e7eafc36f03bb4cd11a6fed37b7a8d05b1d +00b5f36799e9556526f5e5f2205dd641ee39a4bd6c8ec20a36473eadfe1a499e +88284d2fb544b7bdb637868345ae4b3dca6bc0754bad59df4558d2d608faf166 +68daeac6bfb73db431a3146628d371c2d158a1ba65c8d2d47ceec7addae77864 +042ef587a6d6c04dce664bf83492d164d2fc00c1313c220bfdd7a30dede201c5 +1e84d9573c79235a8d847d0a4c231fe009058f5848c775e343c61835c7c8e025 +44dbe77ccfff9e9c950ace49091771604234e586c1335904da22349a847ade3c +060aec69c2987eb1f3332d8b66e59be53edab3da137d59cc6efa0f579f8a1d03 +882c720c27834570c10bf892f79b30340ead8535881b11171b2040fb6637140b +e927369f803a4ff311d78d7e68f4b5f8628fdcfa2cc376442d78e6f47cb378eb +31f079902cd32d6aec688f02a7365b66797de1ea022afec2f3aae36fe01a3e5e +6cc49c79ca23dc10ed8071eea3a0f8924a0dcc610f842e4e30c1104f859ac970 +06c7490195599c65393be11269c8dd7247c96d632523256f59edeb144329b8da +b35303c922432e92394a95196dad464e35858f00e6a27320cf515b7b8af90d06 +82e89f09afb605862d14eab6a99218b3f66f11ea2f345629c402bd9aeb25e3e9 +8734a0ca4a814d824ee4ca5383c6eb8ff1458c767dd9b71530c5f01be2d2611c +f9644c28f3f52ac748749b54eb652f76630e3a62b63a3562a54144c306beddfd +557e154c7d4931bafe9a9136c3aae071b00e7204150cece0d45e10bd736b633c +8abf3817168828ba17b23c8ef8ee35119c43cd7fe068e1f016aadc734d4338d7 +8abd60567f307d6ec471f99b03cc7b5e8140dc07f726303c2185590f9f2224c1 +52bf01b038ae1e963098a309edf98ce5ba1ab235e1190ba23732e42841b2bf69 +36560701e1653df36a29c8c3254d402d0140f5ffeda15ded4728c176e3f39c35 +48b5a2be25266587b52bda256f255c940adddbfcaf37ba2500213239f12dc7e0 +0b61230190a4380917962c18effc6774f6db08b799c5966ca7133fadfd7e2b25 +75116286d1c2a40545f973870cbb5cf97691afe304ca7b586f198c426a71dfa8 +cedbe3d94bda4267b9b5ff1454ac7d54f59c5d94588bb274601cee186b9ee892 +5f359ec5bc402442bba33b2663d564461ca130d7f1405b0467027ec1e27bbec4 +8d51c674c81b66ec733c4c57410956520f9c16708aaee0d9ae34f1050f6412c7 +7a23c8c3364dad8e407319772c9b201c49b75dea4685566d9c912acdb47aece3 +f9786e47398891c07b0269e74e2eb935991c9d7a835eb88bc04eb2b195ddeb02 +38dcd1e4bb773e269ad58fa9e2f5482db94a661f065bfafee3ccc1c812e9fac3 +31fd70975e3a0c72d37207d6c90f998103a821c35734f0153950e5f72ff6a8ac +cb831f57267142dcc4079c915a4d01807fdc883e15a15b67e8cea1ef8d26e4fc +b55c69418d7a4dcef51473a037050cc43e204fc7de2392905800993bbccaf459 +3bd84187fd1c295d111867930dd068988631f5d0abb9adc48b7ca8134f8a3baf +3569f5ffbf19291022b3e13fdabbf0ddf64fef601cf97dc70ed2e4355de38f1c +0ca81966adfc95cf03e794d875025af92bbeaacd9ee58b49c3f0b67d72b13a0a +971076819781d91814c47a0a3b53f767b7630fb55df3d2706d834b127d56fc95 +b9b30ab934839b8324c9ee0147f0bbec998eb1b2939a2102c59c896b9f57c9b2 +fc138cfd94fd5c512bd83e30e8356e983cceb0de72224f78b3c8a98359e46f22 +c19ab808b70c4287397eade3b28a311244385d3d49fb80adc4f90f32366fcf42 +eaea8d05392164a48f03184563922bcbeb78376f512b9a289325a61c0c357e40 +bb3dbeebf870ec12ef096a8997bb6ec55251ad55bd881ebdda84056556380935 +b0b8eb1f74ef96bf02375a30dc53795da638252a12a2e9bc18bfd7ff5aa7a8f4 +4a6bb4a34f1c94a781a129fc975823bd16a6df7c5d75b7f6dff55ac5f82e3e2f +572f339f48024e93f0c59fb1fc95bacf7bf5fd7c683c9b159c3b5d937c3a2110 +e78889021ebbbbe76b1f984317d310ea61f7b5cdb4ed1754a35adc9c6924c3e0 +2e3b157261eea5092e0e7a914a259eea2b14192343680a18710db9f82e54c920 +369587bcdeed8f8acb72d2565ca89ea92b6b58bb861012ccab7270200ed5cef3 +9bdc58f4831161e8ce4ef5c6fc839deb8216482d906d60c1a3292de191b40c79 +85529eae01de8fadd442ec8bfa775366070a9e193138a4c6f6eca7ff554c57a0 +19346015d6ed5dfe8b9dd876a207e7247deaa1e42a41c3edccb32d47e5fa97c0 +9bf3f8324a366856d6c6df8f295da2a9164a99b6e66adf4247dd79bbf54525dd +bcf518651fd8b374cbca6ac532ed443a1c952ce148a67cc655d92b670ab76c64 +cba90089f1d252ab55d93cfd0ec1545e79b65c5337fc57e46ad6ddcf5ca56204 +867e467d3982d77c2e603fee7ec4b57bd8718e5be9203666459815b7428679b2 +134188b7c2c89f64b7426e0dde73f586a7a86a4cc4136bcd5b09b2482aaf3ea2 +6a9c99cdc852ae0a7262b57c06143f1a6528b02cdd69b9fd5edc635873997b4d +7c5644daa467783e154ad0a787e72bf5a627f712267198d9368b480a4e764627 +b268d7f1500b8e155615bf9e59bedc125774802dcbe33451e222f6a9ba24afc1 +92933742c74822f138baac4bddcfbf447dea77a4e913028db069e802014b5d57 +b0c7d6b7a727742eebb6a7c7a2231c94d63fbe66fa8030f3b378006027ceb4b2 +74d8d75d001c7b4d0225ec9cb04ca7f5e1668b44682847a8b14dda4ecd87fda2 +6b1694a2810f90537c403ff242d0accc8b73fa0088d668fb4fd50c4a0b0aafe3 +0dddc6e893c1bb127147fd1b35254e2ef659f023cd826cbf5e400dfba85f4df9 +f70b30a42df485bf5dd6c620e37c82bedef5841131716bc5eeb40aefec8c0379 +f9348a1d7ad0618a422d85300bc0f4208a5b4baf9dd1f568da943f0023eec988 +21187716ec2104282a7fed77b0c5b01e78d5d9d5d99994a9f232859ce68a62a9 +e6960f557f153d7101dd98b7836d7841d3180be3b34a99d4434af82db181de42 +e7f3fd86d86678ea86c4ea4d0af845955141ca4f9266f3ef69c2ce9b73ae1558 +9dd98a8a0802572fba00fc509918a64f1dcabd06286039e75042d53d472ae66e +38ecb6e6795e3dd12757255e786909f306fc17d14ed432f5107aac6cc50236b7 +d381ad2c4da239669d94cb276610a846e991f508a75e1a3a851be789b9a3f75b +f5d7dfde15eadd55e7710d79b5a4127b5e9f85f6bceace031aa9ad412541848d +59dd3f66886672db5d90f51fd15334eb973e64baa4181186cc3c090b2a5bbb70 +e9e1fd9420a31674e9e517b1dc0196fcb5624668785a65dfa60a0944386beda0 +66e2a3d871913d23001c0b5f22c4136fa48e6fbd636fe0bbc104cba53ecd15b7 +0034db9200070b7924ab31ea318cffc35cb44bbda45e04f64516b48bbaceed37 +56a2aaa5d5c0a2d06f71a5ca689c8c8afc991638fff960d060555d9ee7a13868 +434853e22d4d9aed6231039517aa713e67e7c08467c687a21bfb00e6c99c9b15 +51859fb8f437c77bca2b0fc97a36ee9b552645b83ddcd2ae48049085693c356c +53b214b9216d5466852340dbb92eadc60bb6225d9c08bb9f5e9f50e40dfb7c12 +2b5126c6e11393d04691831af2707bf11e0c4e887511a59442469df76bc8eb2e +d2e97d09b6b2f1b533ac64d85d454f57702af92cc88d5ddc46388d6c203ba06a +f57846d420ef1727d97d964da29018245d91f1e37e3e3f9f04e02d997b0c28fe +4c99293e87c978606c3a0c7ca1d121c60ac58fad627be407057eae2ebc2074dd +fd2bd9fb017ad048ead3d1243b7634701508034a934c81a9f63a05b7319676d7 +bb9af94fbe826f84d4149e81b46424e482c8c1c655affecb4393177d768eaa24 +a68a71e4faf578e57865b15f459315a26ddf6e39bd3d16958a3a8cbeab793eaa +533eaa3d89e78d292fe37f0c23e32abfd50b2c9fba8261331c66458340bb4cd5 +4e7a7cac3df5ca530fbffd93789357877ad2fe127377b899340416d6100e2165 +64c62ed803d484656ef5ff7587902285671f280de39228b9432ba46c3ecbdd23 +46222998ef3c528cec6da555eb72092d97664cf35ea21e31ffb70e8b8102ddf6 +0203d3dddaa7593a8dc0b1c6af796d891e80860e6bba501e4c38dd5c6b5a6f35 +a38ef0c7cd4ab7cce0e17fae913eec2572565070169cce8517c37b21699fe4d3 +58439dcec0066047253d42a74ba564d2fc7ccf34b3b4e77fbac09d950c3c134c +5671c64b9964c124d123a299d2070826fde61b7f637bf87739e7a0de70ef82af +c901821eabb31969a27596e9826dd506912d05918ddd2981d5fb153526683f83 +04bbb13678af6d8a65aaae58240688caf7a8419f7bacf078dae7495ab646fc40 +c9004cbabf4c76143e33fe49fed460a102129b9f6cdda0797e53df9b9db99890 +7dc89ecb49ee18cd7556b44b096c9337f6a5618b589c6d7c87ea0f292bb446fe +c901b120180e3b514e3e7e32e52028a30cfd6879068a68b7ef5db202f575a6f3 +52748c45a3509d747d672b446efd09b0dcab7b3f8808c011a0470eb5c9d8d632 +0f413186fdf227c7f9c45c403ef93db5fb63819de4ca368f1b9387dfb0f039e8 +2c47f56fa0d3073c901393803ae628eba7313821a01b07918efa4d901aca044e +90d0227813c537cdc2c906e44140bdcb8717e95b7597ad7c01b51b7dac732e65 +fa3870fe8865ae6dbc96b5a984e2e363c4b67a3a07fe4eb42044112ecfff74f4 +09329f03a55e1f57656f88a08e597bfccb97a2b0bc0c26db9aa5bc5f1d1bafa3 +65f32c6ae5de5f798233ed6878583d8335e8988021438e992be94f6b73608413 +b83693b45e539261664f851652bd9458e643bd60628d0acb48a0edd350749e13 +9e480bb10cfb50b4fa0e37348d2f5ebc3e3f3457128b9793ef1359076da9e92d +e3bbd59ccc0c0327867bd7895a19cb93fdcd6ef8d459ccabadb1e0bc6896b456 +b13cab755da348b349da1b485947a23d05e9bb5dfeb8300f8fef30d7f09d288f +681ee6e23d21f76f806440680e7913d323a264fd6d69d4be33527e050856f8d7 +20fcf33f81e5021271c2cefd7b1c6a2dc9e207140be0030fd866fb65e33cf5fb +8879dd70eed5e887537c45d136be8bb191bd9dc4cea400137903a12b66dcd359 +9b6c2e43306759110af0878c8f37c8daf847657c2bd68d5c3ca105b332d18d5e +03269eedc1ae92f4e45c79915981c1f32b5a39c46c358708460301ca4298bbb4 +5b91e0d45fd1de756c6885545bdf5bce1cd40bb0c92c481a629b0d8dafb6b895 +995c6777d9355af0b03720d3c7456ad60eaa5a80549bb54c0820e000eb30a3e6 +f81c1cdc55b70d902a432d13a233c63ae54f98718d6ddae3c6aabebc65760e59 +d87abb67a5171a4ec2b2377bb5a39f +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +/F496_0 /AMYDOG+NimbusRomNo9L-ReguItal 1 1 +[ /.notdef/.notdef/fi/fl/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright + /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash + /zero/one/two/three/four/five/six/seven + /eight/nine/colon/semicolon/less/equal/greater/question + /at/A/B/C/D/E/F/G + /H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W + /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore + /quoteleft/a/b/c/d/e/f/g + /h/i/j/k/l/m/n/o + /p/q/r/s/t/u/v/w + /x/y/z/braceleft/bar/braceright/asciitilde/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/bullet/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/exclamdown/cent/sterling/fraction/yen/florin/section + /currency/copyright/quotedblleft/guillemotleft/guilsinglleft/guilsinglright/fi/fl + /.notdef/endash/dagger/daggerdbl/periodcentered/.notdef/paragraph/bullet + /quotesinglbase/quotedblbase/quotedblright/guillemotright/ellipsis/perthousand/.notdef/questiondown + /.notdef/grave/acute/circumflex/tilde/macron/breve/dotaccent + /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron + /emdash/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/AE/.notdef/ordfeminine/.notdef/.notdef/.notdef/.notdef + /Lslash/Oslash/OE/ordmasculine/.notdef/.notdef/.notdef/.notdef + /.notdef/ae/.notdef/.notdef/.notdef/dotlessi/.notdef/.notdef + /lslash/oslash/oe/germandbls/.notdef/.notdef/.notdef/.notdef] +pdfMakeFont +false pdfSetup +%%EndSetup +%%Page: 1 1 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +117.435 701.916 Td +/F9_0 24.7902 Tf +(bzip2) +[15.146812 +0 +12.3951 +0 +6.891676 +0 +15.146812 +0 +13.783351 +0] Tj +-278 TJm +(and) +[13.783351 +0 +15.146812 +0 +15.146812 +0] Tj +-278 TJm +(libbzip2,) +[6.891676 +0 +6.891676 +0 +15.146812 +0 +15.146812 +0 +12.3951 +0 +6.891676 +0 +15.146812 +0 +13.783351 +0 +6.891676 +0] Tj +-278 TJm +(ver) +[13.783351 +0 +13.783351 +0 +9.643388 +0] Tj +15 TJm +(sion) +[13.783351 +0 +6.891676 +0 +15.146812 +0 +15.146812 +0] Tj +-278 TJm +(1.0.8) +[13.783351 +0 +6.891676 +0 +13.783351 +0 +6.891676 +0 +13.783351 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +90.493 661.631 Td +/F9_0 20.6585 Tf +(A) +[14.915437 +0] Tj +-278 TJm +(pr) +[12.622344 +0 +8.036157 +0] Tj +20 TJm +(ogram) +[12.622344 +0 +12.622344 +0 +8.036157 +0 +11.486126 +0 +18.365407 +0] Tj +-278 TJm +(and) +[11.486126 +0 +12.622344 +0 +12.622344 +0] Tj +-278 TJm +(librar) +[5.743063 +0 +5.743063 +0 +12.622344 +0 +8.036157 +0 +11.486126 +0 +8.036157 +0] Tj +-10 TJm +(y) +[11.486126 +0] Tj +-278 TJm +(f) +[6.879281 +0] Tj +20 TJm +(or) +[12.622344 +0 +8.036157 +0] Tj +-278 TJm +(data) +[12.622344 +0 +11.486126 +0 +6.879281 +0 +11.486126 +0] Tj +-278 TJm +(compression) +[11.486126 +0 +12.622344 +0 +18.365407 +0 +12.622344 +0 +8.036157 +0 +11.486126 +0 +11.486126 +0 +11.486126 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +179.946 503.285 Td +/F9_0 11.9552 Tf +(J) +[6.647091 +0] Tj +20 TJm +(ulian) +[7.304627 +0 +3.323546 +0 +3.323546 +0 +6.647091 +0 +7.304627 +0] Tj +-278 TJm +(Se) +[7.974118 +0 +6.647091 +0] Tj +15 TJm +(war) +[9.301146 +0 +6.647091 +0 +4.650573 +0] Tj +20 TJm +(d,) +[7.304627 +0 +3.323546 +0] Tj +-278 TJm +(https://sour) +[7.304627 +0 +3.981082 +0 +3.981082 +0 +7.304627 +0 +6.647091 +0 +3.981082 +0 +3.323546 +0 +3.323546 +0 +6.647091 +0 +7.304627 +0 +7.304627 +0 +4.650573 +0] Tj +20 TJm +(ce) +[6.647091 +0 +6.647091 +0] Tj +15 TJm +(ware) +[9.301146 +0 +6.647091 +0 +4.650573 +0 +6.647091 +0] Tj +-20 TJm +(.or) +[3.323546 +0 +7.304627 +0 +4.650573 +0] Tj +15 TJm +(g/bzip2/) +[7.304627 +0 +3.323546 +0 +7.304627 +0 +5.9776 +0 +3.323546 +0 +7.304627 +0 +6.647091 +0 +3.323546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 2 2 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 709.534 Td +/F9_0 14.3462 Tf +(bzip2) +[8.765528 +0 +7.1731 +0 +3.988244 +0 +8.765528 +0 +7.976487 +0] Tj +-489 TJm +(and) +[7.976487 +0 +8.765528 +0 +8.765528 +0] Tj +-488 TJm +(libbzip2,) +[3.988244 +0 +3.988244 +0 +8.765528 +0 +8.765528 +0 +7.1731 +0 +3.988244 +0 +8.765528 +0 +7.976487 +0 +3.988244 +0] Tj +-542 TJm +(ver) +[7.976487 +0 +7.976487 +0 +5.580672 +0] Tj +15 TJm +(sion) +[7.976487 +0 +3.988244 +0 +8.765528 +0 +8.765528 +0] Tj +-488 TJm +(1.0.8:) +[7.976487 +0 +3.988244 +0 +7.976487 +0 +3.988244 +0 +7.976487 +0 +4.777285 +0] Tj +-766 TJm +(A) +[10.357956 +0] Tj +-488 TJm +(pr) +[8.765528 +0 +5.580672 +0] Tj +20 TJm +(ogram) +[8.765528 +0 +8.765528 +0 +5.580672 +0 +7.976487 +0 +12.753772 +0] Tj +-489 TJm +(and) +[7.976487 +0 +8.765528 +0 +8.765528 +0] Tj +-489 TJm +(librar) +[3.988244 +0 +3.988244 +0 +8.765528 +0 +5.580672 +0 +7.976487 +0 +5.580672 +0] Tj +-10 TJm +(y) +[7.976487 +0] Tj +-488 TJm +(f) +[4.777285 +0] Tj +20 TJm +(or) +[8.765528 +0 +5.580672 +0] Tj +-489 TJm +(data) +[8.765528 +0 +7.976487 +0 +4.777285 +0 +7.976487 +0] Tj +72 692.319 Td +(compression) +[7.976487 +0 +8.765528 +0 +12.753772 +0 +8.765528 +0 +5.580672 +0 +7.976487 +0 +7.976487 +0 +7.976487 +0 +3.988244 +0 +8.765528 +0 +8.765528 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 680.364 Td +/F15_0 9.9626 Tf +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(Julian) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(Se) +[5.539206 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ard) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 663.427 Td +(V) +[7.192997 +0] Tj +111 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(1.0.8) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(13) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(July) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(2019) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 651.472 Td +(Cop) +[6.645054 +0 +4.9813 +0 +4.9813 +0] Tj +10 TJm +(yright) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(\251) +[7.571576 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(1996-2019) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(Julian) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(Se) +[5.539206 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ard) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 633.938 Td +/F15_0 7.9701 Tf +(This) +[4.869731 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0] Tj +-250 TJm +(program,) +[3.98505 +0 +2.654043 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +6.200738 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +119.151 633.938 Td +/F17_0 7.9701 Tf +(bzip2) +[4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +143.061 633.938 Td +/F15_0 7.9701 Tf +(,) +[1.992525 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(associated) +[3.538724 +0 +3.100369 +0 +3.100369 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(library) +[2.215688 +0 +2.215688 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +2.654043 +0 +3.98505 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +216.768 633.938 Td +/F17_0 7.9701 Tf +(libbzip2) +[4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +255.025 633.938 Td +/F15_0 7.9701 Tf +(,) +[1.992525 +0] Tj +-250 TJm +(and) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(all) +[3.538724 +0 +2.215688 +0 +2.215688 +0] Tj +-250 TJm +(documentation,) +[3.98505 +0 +3.98505 +0 +3.538724 +0 +3.98505 +0 +6.200738 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +1.992525 +0] Tj +-250 TJm +(are) +[3.538724 +0 +2.654043 +0 +3.538724 +0] Tj +-250 TJm +(cop) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +10 TJm +(yright) +[3.98505 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(\251) +[6.057276 +0] Tj +-250 TJm +(1996-2019) +[3.98505 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(Julian) +[3.100369 +0 +3.98505 +0 +2.215688 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(Se) +[4.431376 +0 +3.538724 +0] Tj +25 TJm +(w) +[5.754412 +0] Tj +10 TJm +(ard.) +[3.538724 +0 +2.654043 +0 +3.98505 +0 +1.992525 +0] Tj +-310 TJm +(All) +[5.754412 +0 +2.215688 +0 +2.215688 +0] Tj +-250 TJm +(rights) +[2.654043 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0] Tj +-250 TJm +(reserv) +[2.654043 +0 +3.538724 +0 +3.100369 +0 +3.538724 +0 +2.654043 +0 +3.98505 +0] Tj +15 TJm +(ed.) +[3.538724 +0 +3.98505 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 616.404 Td +(Redistrib) +[5.316057 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0 +2.215688 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0] Tj +20 TJm +(ution) +[3.98505 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(and) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(use) +[3.98505 +0 +3.100369 +0 +3.538724 +0] Tj +-250 TJm +(in) +[2.215688 +0 +3.98505 +0] Tj +-250 TJm +(source) +[3.100369 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.538724 +0] Tj +-250 TJm +(and) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(binary) +[3.98505 +0 +2.215688 +0 +3.98505 +0 +3.538724 +0 +2.654043 +0 +3.98505 +0] Tj +-250 TJm +(forms,) +[2.654043 +0 +3.98505 +0 +2.654043 +0 +6.200738 +0 +3.100369 +0 +1.992525 +0] Tj +-250 TJm +(with) +[5.754412 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0] Tj +-250 TJm +(or) +[3.98505 +0 +2.654043 +0] Tj +-250 TJm +(without) +[5.754412 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(modi\002cation,) +[6.200738 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0 +4.431376 +0 +3.538724 +0 +3.538724 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +1.992525 +0] Tj +-250 TJm +(are) +[3.538724 +0 +2.654043 +0 +3.538724 +0] Tj +-250 TJm +(permitted) +[3.98505 +0 +3.538724 +0 +2.654043 +0 +6.200738 +0 +2.215688 +0 +2.215688 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(pro) +[3.98505 +0 +2.654043 +0 +3.98505 +0] Tj +15 TJm +(vided) +[3.98505 +0 +2.215688 +0 +3.98505 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(that) +[2.215688 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(follo) +[2.654043 +0 +3.98505 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0] Tj +25 TJm +(wing) +[5.754412 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(conditions) +[3.538724 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +3.100369 +0] Tj +-250 TJm +(are) +[3.538724 +0 +2.654043 +0 +3.538724 +0] Tj +-250 TJm +(met:) +[6.200738 +0 +3.538724 +0 +2.215688 +0 +2.215688 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +73.993 590.899 Td +(\225) +[2.789535 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(Redistrib) +[5.316057 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0 +2.215688 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0] Tj +20 TJm +(utions) +[3.98505 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +3.100369 +0] Tj +-250 TJm +(of) +[3.98505 +0 +2.654043 +0] Tj +-250 TJm +(source) +[3.100369 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.538724 +0] Tj +-250 TJm +(code) +[3.538724 +0 +3.98505 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(must) +[6.200738 +0 +3.98505 +0 +3.100369 +0 +2.215688 +0] Tj +-250 TJm +(retain) +[2.654043 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +3.98505 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(abo) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +15 TJm +(v) +[3.98505 +0] Tj +15 TJm +(e) +[3.538724 +0] Tj +-250 TJm +(cop) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +10 TJm +(yright) +[3.98505 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(notice,) +[3.98505 +0 +3.98505 +0 +2.215688 +0 +2.215688 +0 +3.538724 +0 +3.538724 +0 +1.992525 +0] Tj +-250 TJm +(this) +[2.215688 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0] Tj +-250 TJm +(list) +[2.215688 +0 +2.215688 +0 +3.100369 +0 +2.215688 +0] Tj +-250 TJm +(of) +[3.98505 +0 +2.654043 +0] Tj +-250 TJm +(conditions) +[3.538724 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +3.100369 +0] Tj +-250 TJm +(and) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(follo) +[2.654043 +0 +3.98505 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0] Tj +25 TJm +(wing) +[5.754412 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(disclaimer) +[3.98505 +0 +2.215688 +0 +3.100369 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +6.200738 +0 +3.538724 +0 +2.654043 +0] Tj +55 TJm +(.) +[1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +73.993 573.365 Td +(\225) +[2.789535 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(The) +[4.869731 +0 +3.98505 +0 +3.538724 +0] Tj +-285 TJm +(origin) +[3.98505 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0 +2.215688 +0 +3.98505 +0] Tj +-284 TJm +(of) +[3.98505 +0 +2.654043 +0] Tj +-285 TJm +(this) +[2.215688 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0] Tj +-285 TJm +(softw) +[3.100369 +0 +3.98505 +0 +2.654043 +0 +2.215688 +0 +5.754412 +0] Tj +10 TJm +(are) +[3.538724 +0 +2.654043 +0 +3.538724 +0] Tj +-284 TJm +(must) +[6.200738 +0 +3.98505 +0 +3.100369 +0 +2.215688 +0] Tj +-285 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-285 TJm +(be) +[3.98505 +0 +3.538724 +0] Tj +-285 TJm +(misrepresente) +[6.200738 +0 +2.215688 +0 +3.100369 +0 +2.654043 +0 +3.538724 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.100369 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0] Tj +1 TJm +(d;) +[3.98505 +0 +2.215688 +0] Tj +-303 TJm +(you) +[3.98505 +0 +3.98505 +0 +3.98505 +0] Tj +-284 TJm +(must) +[6.200738 +0 +3.98505 +0 +3.100369 +0 +2.215688 +0] Tj +-285 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-285 TJm +(claim) +[3.538724 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +6.200738 +0] Tj +-284 TJm +(that) +[2.215688 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0] Tj +-285 TJm +(you) +[3.98505 +0 +3.98505 +0 +3.98505 +0] Tj +-285 TJm +(wrote) +[5.754412 +0 +2.654043 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0] Tj +-284 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-285 TJm +(original) +[3.98505 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0 +2.215688 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0] Tj +-285 TJm +(softw) +[3.100369 +0 +3.98505 +0 +2.654043 +0 +2.215688 +0 +5.754412 +0] Tj +10 TJm +(are.) +[3.538724 +0 +2.654043 +0 +3.538724 +0 +1.992525 +0] Tj +-828 TJm +(If) +[2.654043 +0 +2.654043 +0] Tj +-285 TJm +(you) +[3.98505 +0 +3.98505 +0 +3.98505 +0] Tj +-285 TJm +(use) +[3.98505 +0 +3.100369 +0 +3.538724 +0] Tj +-284 TJm +(this) +[2.215688 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0] Tj +-285 TJm +(softw) +[3.100369 +0 +3.98505 +0 +2.654043 +0 +2.215688 +0 +5.754412 +0] Tj +10 TJm +(are) +[3.538724 +0 +2.654043 +0 +3.538724 +0] Tj +-285 TJm +(in) +[2.215688 +0 +3.98505 +0] Tj +-284 TJm +(a) +[3.538724 +0] Tj +79.97 563.801 Td +(product,) +[3.98505 +0 +2.654043 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0 +1.992525 +0] Tj +-250 TJm +(an) +[3.538724 +0 +3.98505 +0] Tj +-250 TJm +(ackno) +[3.538724 +0 +3.538724 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0] Tj +25 TJm +(wledgment) +[5.754412 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0 +3.98505 +0 +6.200738 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(in) +[2.215688 +0 +3.98505 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(product) +[3.98505 +0 +2.654043 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0] Tj +-250 TJm +(documentation) +[3.98505 +0 +3.98505 +0 +3.538724 +0 +3.98505 +0 +6.200738 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(w) +[5.754412 +0] Tj +10 TJm +(ould) +[3.98505 +0 +3.98505 +0 +2.215688 +0 +3.98505 +0] Tj +-250 TJm +(be) +[3.98505 +0 +3.538724 +0] Tj +-250 TJm +(appreciated) +[3.538724 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(b) +[3.98505 +0] Tj +20 TJm +(ut) +[3.98505 +0 +2.215688 +0] Tj +-250 TJm +(is) +[2.215688 +0 +3.100369 +0] Tj +-250 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(required.) +[2.654043 +0 +3.538724 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0 +2.654043 +0 +3.538724 +0 +3.98505 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +73.993 546.267 Td +(\225) +[2.789535 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(Altered) +[5.754412 +0 +2.215688 +0 +2.215688 +0 +3.538724 +0 +2.654043 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(source) +[3.100369 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.538724 +0] Tj +-250 TJm +(v) +[3.98505 +0] Tj +15 TJm +(ersions) +[3.538724 +0 +2.654043 +0 +3.100369 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +3.100369 +0] Tj +-250 TJm +(must) +[6.200738 +0 +3.98505 +0 +3.100369 +0 +2.215688 +0] Tj +-250 TJm +(be) +[3.98505 +0 +3.538724 +0] Tj +-250 TJm +(plainly) +[3.98505 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +3.98505 +0 +2.215688 +0 +3.98505 +0] Tj +-250 TJm +(mark) +[6.200738 +0 +3.538724 +0 +2.654043 +0 +3.98505 +0] Tj +10 TJm +(ed) +[3.538724 +0 +3.98505 +0] Tj +-250 TJm +(as) +[3.538724 +0 +3.100369 +0] Tj +-250 TJm +(such,) +[3.100369 +0 +3.98505 +0 +3.538724 +0 +3.98505 +0 +1.992525 +0] Tj +-250 TJm +(and) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(must) +[6.200738 +0 +3.98505 +0 +3.100369 +0 +2.215688 +0] Tj +-250 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(be) +[3.98505 +0 +3.538724 +0] Tj +-250 TJm +(misrepresented) +[6.200738 +0 +2.215688 +0 +3.100369 +0 +2.654043 +0 +3.538724 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.100369 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(as) +[3.538724 +0 +3.100369 +0] Tj +-250 TJm +(being) +[3.98505 +0 +3.538724 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(original) +[3.98505 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0 +2.215688 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0] Tj +-250 TJm +(softw) +[3.100369 +0 +3.98505 +0 +2.654043 +0 +2.215688 +0 +5.754412 +0] Tj +10 TJm +(are.) +[3.538724 +0 +2.654043 +0 +3.538724 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +73.993 528.733 Td +(\225) +[2.789535 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(The) +[4.869731 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(name) +[3.98505 +0 +3.538724 +0 +6.200738 +0 +3.538724 +0] Tj +-250 TJm +(of) +[3.98505 +0 +2.654043 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(author) +[3.538724 +0 +3.98505 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0] Tj +-250 TJm +(may) +[6.200738 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(be) +[3.98505 +0 +3.538724 +0] Tj +-250 TJm +(used) +[3.98505 +0 +3.100369 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(to) +[2.215688 +0 +3.98505 +0] Tj +-250 TJm +(endorse) +[3.538724 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.100369 +0 +3.538724 +0] Tj +-250 TJm +(or) +[3.98505 +0 +2.654043 +0] Tj +-250 TJm +(promote) +[3.98505 +0 +2.654043 +0 +3.98505 +0 +6.200738 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0] Tj +-250 TJm +(products) +[3.98505 +0 +2.654043 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +3.538724 +0 +2.215688 +0 +3.100369 +0] Tj +-250 TJm +(deri) +[3.98505 +0 +3.538724 +0 +2.654043 +0 +2.215688 +0] Tj +25 TJm +(v) +[3.98505 +0] Tj +15 TJm +(ed) +[3.538724 +0 +3.98505 +0] Tj +-250 TJm +(from) +[2.654043 +0 +2.654043 +0 +3.98505 +0 +6.200738 +0] Tj +-250 TJm +(this) +[2.215688 +0 +3.98505 +0 +2.215688 +0 +3.100369 +0] Tj +-250 TJm +(softw) +[3.100369 +0 +3.98505 +0 +2.654043 +0 +2.215688 +0 +5.754412 +0] Tj +10 TJm +(are) +[3.538724 +0 +2.654043 +0 +3.538724 +0] Tj +-250 TJm +(without) +[5.754412 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(speci\002c) +[3.100369 +0 +3.98505 +0 +3.538724 +0 +3.538724 +0 +2.215688 +0 +4.431376 +0 +3.538724 +0] Tj +-250 TJm +(prior) +[3.98505 +0 +2.654043 +0 +2.215688 +0 +3.98505 +0 +2.654043 +0] Tj +-250 TJm +(written) +[5.754412 +0 +2.654043 +0 +2.215688 +0 +2.215688 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-250 TJm +(permission.) +[3.98505 +0 +3.538724 +0 +2.654043 +0 +6.200738 +0 +2.215688 +0 +3.100369 +0 +3.100369 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 511.198 Td +(THIS) +[4.869731 +0 +5.754412 +0 +2.654043 +0 +4.431376 +0] Tj +-401 TJm +(SOFTW) +[4.431376 +0 +5.754412 +0 +4.431376 +0 +4.869731 +0 +7.523774 +0] Tj +120 TJm +(ARE) +[5.754412 +0 +5.316057 +0 +4.869731 +0] Tj +-401 TJm +(IS) +[2.654043 +0 +4.431376 +0] Tj +-400 TJm +(PR) +[4.431376 +0 +5.316057 +0] Tj +40 TJm +(O) +[5.754412 +0] Tj +50 TJm +(VIDED) +[5.754412 +0 +2.654043 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0] Tj +-401 TJm +(BY) +[5.316057 +0 +5.754412 +0] Tj +-401 TJm +(THE) +[4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-401 TJm +(A) +[5.754412 +0] Tj +55 TJm +(UTHOR) +[5.754412 +0 +4.869731 +0 +5.754412 +0 +5.754412 +0 +5.316057 +0] Tj +-401 TJm +("AS) +[3.251801 +0 +5.754412 +0 +4.431376 +0] Tj +-401 TJm +(IS") +[2.654043 +0 +4.431376 +0 +3.251801 +0] Tj +-401 TJm +(AND) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-400 TJm +(ANY) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-401 TJm +(EXPRESS) +[4.869731 +0 +5.754412 +0 +4.431376 +0 +5.316057 +0 +4.869731 +0 +4.431376 +0 +4.431376 +0] Tj +-401 TJm +(OR) +[5.754412 +0 +5.316057 +0] Tj +-401 TJm +(IMPLIED) +[2.654043 +0 +7.085419 +0 +4.431376 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0] Tj +-401 TJm +(W) +[7.523774 +0] Tj +120 TJm +(ARRANTIES,) +[5.754412 +0 +5.316057 +0 +5.316057 +0 +5.754412 +0 +5.754412 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +4.431376 +0 +1.992525 +0] Tj +-401 TJm +(INCLUDING,) +[2.654043 +0 +5.754412 +0 +5.316057 +0 +4.869731 +0 +5.754412 +0 +5.754412 +0 +2.654043 +0 +5.754412 +0 +5.754412 +0 +1.992525 +0] Tj +-401 TJm +(B) +[5.316057 +0] Tj +11 TJm +(UT) +[5.754412 +0 +4.869731 +0] Tj +72 501.634 Td +(NO) +[5.754412 +0 +5.754412 +0] Tj +40 TJm +(T) +[4.869731 +0] Tj +-304 TJm +(LIMITED) +[4.869731 +0 +2.654043 +0 +7.085419 +0 +2.654043 +0 +4.869731 +0 +4.869731 +0 +5.754412 +0] Tj +-304 TJm +(T) +[4.869731 +0] Tj +18 TJm +(O,) +[5.754412 +0 +1.992525 +0] Tj +-305 TJm +(THE) +[4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-304 TJm +(IMPLIED) +[2.654043 +0 +7.085419 +0 +4.431376 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0] Tj +-304 TJm +(W) +[7.523774 +0] Tj +120 TJm +(ARRANTIES) +[5.754412 +0 +5.316057 +0 +5.316057 +0 +5.754412 +0 +5.754412 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +4.431376 +0] Tj +-304 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-304 TJm +(MERCHANT) +[7.085419 +0 +4.869731 +0 +5.316057 +0 +5.316057 +0 +5.754412 +0 +5.754412 +0 +5.754412 +0 +4.869731 +0] Tj +93 TJm +(ABILITY) +[5.754412 +0 +5.316057 +0 +2.654043 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0] Tj +-304 TJm +(AND) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-305 TJm +(FITNESS) +[4.431376 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +4.431376 +0 +4.431376 +0] Tj +-304 TJm +(FOR) +[4.431376 +0 +5.754412 +0 +5.316057 +0] Tj +-304 TJm +(A) +[5.754412 +0] Tj +-304 TJm +(P) +[4.431376 +0] Tj +92 TJm +(AR) +[5.754412 +0 +5.316057 +0] Tj +60 TJm +(TICULAR) +[4.869731 +0 +2.654043 +0 +5.316057 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0 +5.316057 +0] Tj +-304 TJm +(PURPOSE) +[4.431376 +0 +5.754412 +0 +5.316057 +0 +4.431376 +0 +5.754412 +0 +4.431376 +0 +4.869731 +0] Tj +-304 TJm +(ARE) +[5.754412 +0 +5.316057 +0 +4.869731 +0] Tj +-305 TJm +(DIS) +[5.754412 +0 +2.654043 +0 +4.431376 +0] Tj +1 TJm +(-) +[2.654043 +0] Tj +72 492.07 Td +(CLAIMED.) +[5.316057 +0 +4.869731 +0 +5.754412 +0 +2.654043 +0 +7.085419 +0 +4.869731 +0 +5.754412 +0 +1.992525 +0] Tj +-576 TJm +(IN) +[2.654043 +0 +5.754412 +0] Tj +-287 TJm +(NO) +[5.754412 +0 +5.754412 +0] Tj +-288 TJm +(EVENT) +[4.869731 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-288 TJm +(SHALL) +[4.431376 +0 +5.754412 +0 +5.754412 +0 +4.869731 +0 +4.869731 +0] Tj +-288 TJm +(THE) +[4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-287 TJm +(A) +[5.754412 +0] Tj +55 TJm +(UTHOR) +[5.754412 +0 +4.869731 +0 +5.754412 +0 +5.754412 +0 +5.316057 +0] Tj +-288 TJm +(BE) +[5.316057 +0 +4.869731 +0] Tj +-288 TJm +(LIABLE) +[4.869731 +0 +2.654043 +0 +5.754412 +0 +5.316057 +0 +4.869731 +0 +4.869731 +0] Tj +-288 TJm +(FOR) +[4.431376 +0 +5.754412 +0 +5.316057 +0] Tj +-288 TJm +(ANY) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-287 TJm +(DIRECT) +[5.754412 +0 +2.654043 +0 +5.316057 +0 +4.869731 +0 +5.316057 +0 +4.869731 +0] Tj +74 TJm +(,) +[1.992525 +0] Tj +-288 TJm +(INDIRECT) +[2.654043 +0 +5.754412 +0 +5.754412 +0 +2.654043 +0 +5.316057 +0 +4.869731 +0 +5.316057 +0 +4.869731 +0] Tj +74 TJm +(,) +[1.992525 +0] Tj +-288 TJm +(INCIDENT) +[2.654043 +0 +5.754412 +0 +5.316057 +0 +2.654043 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +93 TJm +(AL,) +[5.754412 +0 +4.869731 +0 +1.992525 +0] Tj +-288 TJm +(SPECIAL,) +[4.431376 +0 +4.431376 +0 +4.869731 +0 +5.316057 +0 +2.654043 +0 +5.754412 +0 +4.869731 +0 +1.992525 +0] Tj +-288 TJm +(EXEMPLAR) +[4.869731 +0 +5.754412 +0 +4.869731 +0 +7.085419 +0 +4.431376 +0 +4.869731 +0 +5.754412 +0 +5.316057 +0] Tj +65 TJm +(Y) +[5.754412 +0] Tj +129 TJm +(,) +[1.992525 +0] Tj +72 482.506 Td +(OR) +[5.754412 +0 +5.316057 +0] Tj +-299 TJm +(CONSEQ) +[5.316057 +0 +5.754412 +0 +5.754412 +0 +4.431376 +0 +4.869731 +0 +5.754412 +0] Tj +10 TJm +(UENTIAL) +[5.754412 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +2.654043 +0 +5.754412 +0 +4.869731 +0] Tj +-300 TJm +(D) +[5.754412 +0] Tj +40 TJm +(AMA) +[5.754412 +0 +7.085419 +0 +5.754412 +0] Tj +40 TJm +(GES) +[5.754412 +0 +4.869731 +0 +4.431376 +0] Tj +-299 TJm +(\(INCLUDING,) +[2.654043 +0 +2.654043 +0 +5.754412 +0 +5.316057 +0 +4.869731 +0 +5.754412 +0 +5.754412 +0 +2.654043 +0 +5.754412 +0 +5.754412 +0 +1.992525 +0] Tj +-299 TJm +(B) +[5.316057 +0] Tj +10 TJm +(UT) +[5.754412 +0 +4.869731 +0] Tj +-299 TJm +(NO) +[5.754412 +0 +5.754412 +0] Tj +40 TJm +(T) +[4.869731 +0] Tj +-300 TJm +(LIMITED) +[4.869731 +0 +2.654043 +0 +7.085419 +0 +2.654043 +0 +4.869731 +0 +4.869731 +0 +5.754412 +0] Tj +-299 TJm +(T) +[4.869731 +0] Tj +18 TJm +(O,) +[5.754412 +0 +1.992525 +0] Tj +-299 TJm +(PR) +[4.431376 +0 +5.316057 +0] Tj +40 TJm +(OCUREMENT) +[5.754412 +0 +5.316057 +0 +5.754412 +0 +5.316057 +0 +4.869731 +0 +7.085419 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-299 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-300 TJm +(SUBSTITUTE) +[4.431376 +0 +5.754412 +0 +5.316057 +0 +4.431376 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +4.869731 +0] Tj +-299 TJm +(GOODS) +[5.754412 +0 +5.754412 +0 +5.754412 +0 +5.754412 +0 +4.431376 +0] Tj +-299 TJm +(OR) +[5.754412 +0 +5.316057 +0] Tj +-300 TJm +(SER) +[4.431376 +0 +4.869731 +0 +5.316057 +0] Tj +80 TJm +(VICES) +[5.754412 +0 +2.654043 +0 +5.316057 +0 +4.869731 +0 +4.431376 +0] Tj +1 TJm +(;) +[2.215688 +0] Tj +72 472.942 Td +(LOSS) +[4.869731 +0 +5.754412 +0 +4.431376 +0 +4.431376 +0] Tj +-360 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-360 TJm +(USE,) +[5.754412 +0 +4.431376 +0 +4.869731 +0 +1.992525 +0] Tj +-360 TJm +(D) +[5.754412 +0] Tj +40 TJm +(A) +[5.754412 +0] Tj +111 TJm +(T) +[4.869731 +0] Tj +93 TJm +(A,) +[5.754412 +0 +1.992525 +0] Tj +-360 TJm +(OR) +[5.754412 +0 +5.316057 +0] Tj +-359 TJm +(PR) +[4.431376 +0 +5.316057 +0] Tj +40 TJm +(OFITS;) +[5.754412 +0 +4.431376 +0 +2.654043 +0 +4.869731 +0 +4.431376 +0 +2.215688 +0] Tj +-360 TJm +(OR) +[5.754412 +0 +5.316057 +0] Tj +-360 TJm +(B) +[5.316057 +0] Tj +10 TJm +(USINESS) +[5.754412 +0 +4.431376 +0 +2.654043 +0 +5.754412 +0 +4.869731 +0 +4.431376 +0 +4.431376 +0] Tj +-360 TJm +(INTERR) +[2.654043 +0 +5.754412 +0 +4.869731 +0 +4.869731 +0 +5.316057 +0 +5.316057 +0] Tj +40 TJm +(UPTION\)) +[5.754412 +0 +4.431376 +0 +4.869731 +0 +2.654043 +0 +5.754412 +0 +5.754412 +0 +2.654043 +0] Tj +-360 TJm +(HO) +[5.754412 +0 +5.754412 +0] Tj +35 TJm +(WEVER) +[7.523774 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +5.316057 +0] Tj +-360 TJm +(CA) +[5.316057 +0 +5.754412 +0] Tj +55 TJm +(USED) +[5.754412 +0 +4.431376 +0 +4.869731 +0 +5.754412 +0] Tj +-359 TJm +(AND) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-360 TJm +(ON) +[5.754412 +0 +5.754412 +0] Tj +-360 TJm +(ANY) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-360 TJm +(THEOR) +[4.869731 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0 +5.316057 +0] Tj +65 TJm +(Y) +[5.754412 +0] Tj +-360 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-360 TJm +(LIABI) +[4.869731 +0 +2.654043 +0 +5.754412 +0 +5.316057 +0 +2.654043 +0] Tj +1 TJm +(LITY) +[4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0] Tj +128 TJm +(,) +[1.992525 +0] Tj +72 463.378 Td +(WHETHER) +[7.523774 +0 +5.754412 +0 +4.869731 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +5.316057 +0] Tj +-247 TJm +(IN) +[2.654043 +0 +5.754412 +0] Tj +-247 TJm +(CONTRA) +[5.316057 +0 +5.754412 +0 +5.754412 +0 +4.869731 +0 +5.316057 +0 +5.754412 +0] Tj +40 TJm +(CT) +[5.316057 +0 +4.869731 +0] Tj +74 TJm +(,) +[1.992525 +0] Tj +-247 TJm +(STRICT) +[4.431376 +0 +4.869731 +0 +5.316057 +0 +2.654043 +0 +5.316057 +0 +4.869731 +0] Tj +-247 TJm +(LIABILITY) +[4.869731 +0 +2.654043 +0 +5.754412 +0 +5.316057 +0 +2.654043 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0] Tj +129 TJm +(,) +[1.992525 +0] Tj +-247 TJm +(O) +[5.754412 +0] Tj +1 TJm +(R) +[5.316057 +0] Tj +-247 TJm +(T) +[4.869731 +0] Tj +18 TJm +(OR) +[5.754412 +0 +5.316057 +0] Tj +60 TJm +(T) +[4.869731 +0] Tj +-247 TJm +(\(INCLUDING) +[2.654043 +0 +2.654043 +0 +5.754412 +0 +5.316057 +0 +4.869731 +0 +5.754412 +0 +5.754412 +0 +2.654043 +0 +5.754412 +0 +5.754412 +0] Tj +-247 TJm +(NEGLIGENCE) +[5.754412 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +2.654043 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0 +5.316057 +0 +4.869731 +0] Tj +-247 TJm +(OR) +[5.754412 +0 +5.316057 +0] Tj +-247 TJm +(O) +[5.754412 +0] Tj +40 TJm +(THER) +[4.869731 +0 +5.754412 +0 +4.869731 +0 +5.316057 +0] Tj +55 TJm +(WISE\)) +[7.523774 +0 +2.654043 +0 +4.431376 +0 +4.869731 +0 +2.654043 +0] Tj +-247 TJm +(ARISING) +[5.754412 +0 +5.316057 +0 +2.654043 +0 +4.431376 +0 +2.654043 +0 +5.754412 +0 +5.754412 +0] Tj +-247 TJm +(IN) +[2.654043 +0 +5.754412 +0] Tj +-247 TJm +(ANY) +[5.754412 +0 +5.754412 +0 +5.754412 +0] Tj +-247 TJm +(W) +[7.523774 +0] Tj +120 TJm +(A) +[5.754412 +0] Tj +105 TJm +(Y) +[5.754412 +0] Tj +-247 TJm +(OUT) +[5.754412 +0 +5.754412 +0 +4.869731 +0] Tj +72 453.814 Td +(OF) +[5.754412 +0 +4.431376 +0] Tj +-250 TJm +(THE) +[4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-250 TJm +(USE) +[5.754412 +0 +4.431376 +0 +4.869731 +0] Tj +-250 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-250 TJm +(THIS) +[4.869731 +0 +5.754412 +0 +2.654043 +0 +4.431376 +0] Tj +-250 TJm +(SOFTW) +[4.431376 +0 +5.754412 +0 +4.431376 +0 +4.869731 +0 +7.523774 +0] Tj +120 TJm +(ARE,) +[5.754412 +0 +5.316057 +0 +4.869731 +0 +1.992525 +0] Tj +-250 TJm +(EVEN) +[4.869731 +0 +5.754412 +0 +4.869731 +0 +5.754412 +0] Tj +-250 TJm +(IF) +[2.654043 +0 +4.431376 +0] Tj +-250 TJm +(AD) +[5.754412 +0 +5.754412 +0] Tj +40 TJm +(VISED) +[5.754412 +0 +2.654043 +0 +4.431376 +0 +4.869731 +0 +5.754412 +0] Tj +-250 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-250 TJm +(THE) +[4.869731 +0 +5.754412 +0 +4.869731 +0] Tj +-250 TJm +(POSSIBILITY) +[4.431376 +0 +5.754412 +0 +4.431376 +0 +4.431376 +0 +2.654043 +0 +5.316057 +0 +2.654043 +0 +4.869731 +0 +2.654043 +0 +4.869731 +0 +5.754412 +0] Tj +-250 TJm +(OF) +[5.754412 +0 +4.431376 +0] Tj +-250 TJm +(SUCH) +[4.431376 +0 +5.754412 +0 +5.316057 +0 +5.754412 +0] Tj +-250 TJm +(D) +[5.754412 +0] Tj +40 TJm +(AMA) +[5.754412 +0 +7.085419 +0 +5.754412 +0] Tj +40 TJm +(GE.) +[5.754412 +0 +4.869731 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 436.279 Td +(P) +[4.431376 +0] Tj +92 TJm +(A) +[5.754412 +0] Tj +111 TJm +(TENTS:) +[4.869731 +0 +4.869731 +0 +5.754412 +0 +4.869731 +0 +4.431376 +0 +2.215688 +0] Tj +-296 TJm +(T) +[4.869731 +0] Tj +80 TJm +(o) +[3.98505 +0] Tj +-295 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-296 TJm +(best) +[3.98505 +0 +3.538724 +0 +3.100369 +0 +2.215688 +0] Tj +-295 TJm +(of) +[3.98505 +0 +2.654043 +0] Tj +-296 TJm +(my) +[6.200738 +0 +3.98505 +0] Tj +-295 TJm +(kno) +[3.98505 +0 +3.98505 +0 +3.98505 +0] Tj +25 TJm +(wledge,) +[5.754412 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0 +3.98505 +0 +3.538724 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +208.544 436.279 Td +/F17_0 7.9701 Tf +(bzip2) +[4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +234.81 436.279 Td +/F15_0 7.9701 Tf +(and) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +248.674 436.279 Td +/F17_0 7.9701 Tf +(libbzip2) +[4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0 +4.78206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +289.286 436.279 Td +/F15_0 7.9701 Tf +(do) +[3.98505 +0 +3.98505 +0] Tj +-296 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-295 TJm +(use) +[3.98505 +0 +3.100369 +0 +3.538724 +0] Tj +-296 TJm +(an) +[3.538724 +0 +3.98505 +0] Tj +15 TJm +(y) +[3.98505 +0] Tj +-295 TJm +(patented) +[3.98505 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0] Tj +-296 TJm +(algorithms.) +[3.538724 +0 +2.215688 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +2.215688 +0 +2.215688 +0 +3.98505 +0 +6.200738 +0 +3.100369 +0 +1.992525 +0] Tj +-893 TJm +(Ho) +[5.754412 +0 +3.98505 +0] Tj +25 TJm +(we) +[5.754412 +0 +3.538724 +0] Tj +25 TJm +(v) +[3.98505 +0] Tj +15 TJm +(er) +[3.538724 +0 +2.654043 +0] Tj +40 TJm +(,) +[1.992525 +0] Tj +-307 TJm +(I) +[2.654043 +0] Tj +-295 TJm +(do) +[3.98505 +0 +3.98505 +0] Tj +-296 TJm +(not) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-295 TJm +(ha) +[3.98505 +0 +3.538724 +0] Tj +20 TJm +(v) +[3.98505 +0] Tj +15 TJm +(e) +[3.538724 +0] Tj +-296 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-295 TJm +(resources) +[2.654043 +0 +3.538724 +0 +3.100369 +0 +3.98505 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0 +3.538724 +0 +3.100369 +0] Tj +-296 TJm +(to) +[2.215688 +0 +3.98505 +0] Tj +72 426.715 Td +(carry) +[3.538724 +0 +3.538724 +0 +2.654043 +0 +2.654043 +0 +3.98505 +0] Tj +-250 TJm +(out) +[3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(a) +[3.538724 +0] Tj +-250 TJm +(patent) +[3.98505 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(search.) +[3.100369 +0 +3.538724 +0 +3.538724 +0 +2.654043 +0 +3.538724 +0 +3.98505 +0 +1.992525 +0] Tj +-620 TJm +(Therefore) +[4.869731 +0 +3.98505 +0 +3.538724 +0 +2.654043 +0 +3.538724 +0 +2.654043 +0 +3.98505 +0 +2.654043 +0 +3.538724 +0] Tj +-250 TJm +(I) +[2.654043 +0] Tj +-250 TJm +(cannot) +[3.538724 +0 +3.538724 +0 +3.98505 +0 +3.98505 +0 +3.98505 +0 +2.215688 +0] Tj +-250 TJm +(gi) +[3.98505 +0 +2.215688 +0] Tj +25 TJm +(v) +[3.98505 +0] Tj +15 TJm +(e) +[3.538724 +0] Tj +-250 TJm +(an) +[3.538724 +0 +3.98505 +0] Tj +15 TJm +(y) +[3.98505 +0] Tj +-250 TJm +(guarantee) +[3.98505 +0 +3.98505 +0 +3.538724 +0 +2.654043 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +3.538724 +0 +3.538724 +0] Tj +-250 TJm +(of) +[3.98505 +0 +2.654043 +0] Tj +-250 TJm +(the) +[2.215688 +0 +3.98505 +0 +3.538724 +0] Tj +-250 TJm +(abo) +[3.538724 +0 +3.98505 +0 +3.98505 +0] Tj +15 TJm +(v) +[3.98505 +0] Tj +15 TJm +(e) +[3.538724 +0] Tj +-250 TJm +(statement.) +[3.100369 +0 +2.215688 +0 +3.538724 +0 +2.215688 +0 +3.538724 +0 +6.200738 +0 +3.538724 +0 +3.98505 +0 +2.215688 +0 +1.992525 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 3 3 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 707.441 Td +/F9_0 17.2154 Tf +(T) +[10.518609 +0] Tj +80 TJm +(ab) +[9.571762 +0 +10.518609 +0] Tj +10 TJm +(le) +[4.785881 +0 +9.571762 +0] Tj +-278 TJm +(of) +[10.518609 +0 +5.732728 +0] Tj +-278 TJm +(Contents) +[12.429519 +0 +10.518609 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 686.878 Td +/F15_0 9.9626 Tf +(1.) +[4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Introduction) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +144.488 686.878 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 686.878 Td +/F15_0 9.9626 Tf +(1) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 674.923 Td +(2.) +[4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +163.595 674.923 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 674.923 Td +/F15_0 9.9626 Tf +(2) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 662.968 Td +(2.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(N) +[7.192997 +0] Tj +35 TJm +(AME) +[7.192997 +0 +8.856751 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +131.445 662.968 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 662.968 Td +/F15_0 9.9626 Tf +(2) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 651.013 Td +(2.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(SYNOPSIS) +[5.539206 +0 +7.192997 +0 +7.192997 +0 +7.192997 +0 +5.539206 +0 +5.539206 +0 +3.317546 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +149.337 651.013 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 651.013 Td +/F15_0 9.9626 Tf +(2) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 639.058 Td +(2.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(DESCRIPTION) +[7.192997 +0 +6.087149 +0 +5.539206 +0 +6.645054 +0 +6.645054 +0 +3.317546 +0 +5.539206 +0 +6.087149 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +167.044 639.058 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 639.058 Td +/F15_0 9.9626 Tf +(3) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 627.103 Td +(2.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(OPTIONS) +[7.192997 +0 +5.539206 +0 +6.087149 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +144.627 627.103 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 627.103 Td +/F15_0 9.9626 Tf +(4) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 615.147 Td +(2.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(MEMOR) +[8.856751 +0 +6.087149 +0 +8.856751 +0 +7.192997 +0 +6.645054 +0] Tj +65 TJm +(Y) +[7.192997 +0] Tj +-250 TJm +(MAN) +[8.856751 +0 +7.192997 +0 +7.192997 +0] Tj +35 TJm +(A) +[7.192997 +0] Tj +40 TJm +(GEMENT) +[7.192997 +0 +6.087149 +0 +8.856751 +0 +6.087149 +0 +7.192997 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +220.167 615.147 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 615.147 Td +/F15_0 9.9626 Tf +(5) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 603.192 Td +(2.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(RECO) +[6.645054 +0 +6.087149 +0 +6.645054 +0 +7.192997 +0] Tj +50 TJm +(VERING) +[7.192997 +0 +6.087149 +0 +6.645054 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +-250 TJm +(D) +[7.192997 +0] Tj +40 TJm +(A) +[7.192997 +0] Tj +111 TJm +(T) +[6.087149 +0] Tj +93 TJm +(A) +[7.192997 +0] Tj +-250 TJm +(FR) +[5.539206 +0 +6.645054 +0] Tj +40 TJm +(OM) +[7.192997 +0 +8.856751 +0] Tj +-250 TJm +(D) +[7.192997 +0] Tj +40 TJm +(AMA) +[7.192997 +0 +8.856751 +0 +7.192997 +0] Tj +40 TJm +(GED) +[7.192997 +0 +6.087149 +0 +7.192997 +0] Tj +-250 TJm +(FILES) +[5.539206 +0 +3.317546 +0 +6.087149 +0 +6.087149 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.005 603.192 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 603.192 Td +/F15_0 9.9626 Tf +(6) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 591.237 Td +(2.7.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(PERFORMANCE) +[5.539206 +0 +6.087149 +0 +6.645054 +0 +5.539206 +0 +7.192997 +0 +6.645054 +0 +8.856751 +0 +7.192997 +0 +7.192997 +0 +6.645054 +0 +6.087149 +0] Tj +-250 TJm +(NO) +[7.192997 +0 +7.192997 +0] Tj +40 TJm +(TES) +[6.087149 +0 +6.087149 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.713 591.237 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 591.237 Td +/F15_0 9.9626 Tf +(6) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 579.282 Td +(2.8.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(CA) +[6.645054 +0 +7.192997 +0] Tj +135 TJm +(VEA) +[7.192997 +0 +6.087149 +0 +7.192997 +0] Tj +111 TJm +(TS) +[6.087149 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +145.34 579.282 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 579.282 Td +/F15_0 9.9626 Tf +(7) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 567.327 Td +(2.9.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(A) +[7.192997 +0] Tj +55 TJm +(UTHOR) +[7.192997 +0 +6.087149 +0 +7.192997 +0 +7.192997 +0 +6.645054 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +141.861 567.327 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 567.327 Td +/F15_0 9.9626 Tf +(7) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 555.372 Td +(3.) +[4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +160.049 555.372 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +221.397 555.372 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 555.372 Td +/F15_0 9.9626 Tf +(8) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 543.416 Td +(3.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(T) +[6.087149 +0] Tj +80 TJm +(op-le) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(structure) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.538 543.416 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 543.416 Td +/F15_0 9.9626 Tf +(8) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 531.461 Td +(3.1.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Lo) +[6.087149 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(summary) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.406 531.461 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 531.461 Td +/F15_0 9.9626 Tf +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 519.506 Td +(3.1.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(High-le) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(summary) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +190.363 519.506 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 519.506 Td +/F15_0 9.9626 Tf +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 507.551 Td +(3.1.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Utility) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(summary) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +215.337 507.551 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 507.551 Td +/F15_0 9.9626 Tf +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 495.596 Td +(3.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Error) +[6.087149 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.366 495.596 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 495.596 Td +/F15_0 9.9626 Tf +(10) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 483.64 Td +(3.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Lo) +[6.087149 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +179.8 483.64 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 483.64 Td +/F15_0 9.9626 Tf +(11) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 471.685 Td +(3.3.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzCompressInit) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +194.302 471.685 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 471.685 Td +/F15_0 9.9626 Tf +(11) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 459.73 Td +(3.3.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzCompress) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.742 459.73 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 459.73 Td +/F15_0 9.9626 Tf +(13) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 447.775 Td +(3.3.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzCompressEnd) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +197.622 447.775 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 447.775 Td +/F15_0 9.9626 Tf +(16) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 435.82 Td +(3.3.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzDecompressInit) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +205.641 435.82 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 435.82 Td +/F15_0 9.9626 Tf +(16) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 423.865 Td +(3.3.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzDecompress) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.867 423.865 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 423.865 Td +/F15_0 9.9626 Tf +(17) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 411.909 Td +(3.3.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzDecompressEnd) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +206.747 411.909 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 411.909 Td +/F15_0 9.9626 Tf +(18) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 399.954 Td +(3.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(High-le) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.757 399.954 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 399.954 Td +/F15_0 9.9626 Tf +(18) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 387.999 Td +(3.4.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzReadOpen) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +184.057 387.999 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 387.999 Td +/F15_0 9.9626 Tf +(19) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 376.044 Td +(3.4.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzRead) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.198 376.044 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 376.044 Td +/F15_0 9.9626 Tf +(20) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 364.089 Td +(3.4.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzReadGetUnused) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.192997 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +206.747 364.089 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 364.089 Td +/F15_0 9.9626 Tf +(21) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 352.134 Td +(3.4.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzReadClose) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +6.645054 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +184.614 352.134 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 352.134 Td +/F15_0 9.9626 Tf +(22) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 340.178 Td +(3.4.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzWriteOpen) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +9.404694 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +185.162 340.178 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 340.178 Td +/F15_0 9.9626 Tf +(22) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 328.223 Td +(3.4.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzWrite) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +9.404694 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +163.303 328.223 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 328.223 Td +/F15_0 9.9626 Tf +(23) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 316.268 Td +(3.4.7.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzWriteClose) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +9.404694 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +6.645054 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +187.934 316.268 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 316.268 Td +/F15_0 9.9626 Tf +(23) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 304.313 Td +(3.4.8.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Handling) +[7.192997 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(embedded) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(streams) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +291.142 304.313 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 304.313 Td +/F15_0 9.9626 Tf +(24) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 292.358 Td +(3.4.9.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Standard) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(\002le-reading/writing) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +246.318 292.358 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 292.358 Td +/F15_0 9.9626 Tf +(25) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 280.403 Td +(3.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Utility) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +167.186 280.403 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 280.403 Td +/F15_0 9.9626 Tf +(26) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 268.447 Td +(3.5.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzBuf) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fT) +[3.317546 +0 +6.087149 +0] Tj +80 TJm +(oBuf) +[4.9813 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fCompress) +[3.317546 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +228.243 268.447 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 268.447 Td +/F15_0 9.9626 Tf +(26) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 256.492 Td +(3.5.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzBuf) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fT) +[3.317546 +0 +6.087149 +0] Tj +80 TJm +(oBuf) +[4.9813 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fDecompress) +[3.317546 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +237.368 256.492 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 256.492 Td +/F15_0 9.9626 Tf +(27) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 244.537 Td +(3.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(zlib) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(compatibility) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +211.601 244.537 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 244.537 Td +/F15_0 9.9626 Tf +(28) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 232.582 Td +(3.7.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Using) +[7.192997 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(stdio-free) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +40 TJm +(vironment) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +278.633 232.582 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 232.582 Td +/F15_0 9.9626 Tf +(28) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 220.627 Td +(3.7.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Getting) +[7.192997 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(rid) +[3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(stdio) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +185.033 220.627 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 220.627 Td +/F15_0 9.9626 Tf +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 208.671 Td +(3.7.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Critical) +[6.645054 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +198.17 208.671 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 208.671 Td +/F15_0 9.9626 Tf +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 196.716 Td +(3.8.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Making) +[8.856751 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(W) +[9.404694 +0] Tj +40 TJm +(indo) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-250 TJm +(DLL) +[7.192997 +0 +6.087149 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +201.998 196.716 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 196.716 Td +/F15_0 9.9626 Tf +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 184.761 Td +(4.) +[4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Miscellanea) +[8.856751 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +143.653 184.761 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 184.761 Td +/F15_0 9.9626 Tf +(31) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 172.806 Td +(4.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Limitations) +[6.087149 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +267.908 172.806 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 172.806 Td +/F15_0 9.9626 Tf +(31) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 160.851 Td +(4.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Portability) +[5.539206 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(issues) +[2.769603 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +170.784 160.851 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 160.851 Td +/F15_0 9.9626 Tf +(32) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 148.896 Td +(4.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Reporting) +[6.645054 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ugs) +[4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.656 148.896 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 148.896 Td +/F15_0 9.9626 Tf +(32) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 136.94 Td +(4.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Did) +[7.192997 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(right) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(package?) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +227.565 136.94 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 136.94 Td +/F15_0 9.9626 Tf +(33) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 124.985 Td +(4.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Further) +[5.539206 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(Reading) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +166.902 124.985 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 124.985 Td +/F15_0 9.9626 Tf +(34) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +536.068 50.852 Td +(iii) +[2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 1 4 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 701.916 Td +/F9_0 24.7902 Tf +(1.) +[13.783351 +0 +6.891676 +0] Tj +-278 TJm +(Intr) +[6.891676 +0 +15.146812 +0 +8.255137 +0 +9.643388 +0] Tj +20 TJm +(oduction) +[15.146812 +0 +15.146812 +0 +15.146812 +0 +13.783351 +0 +8.255137 +0 +6.891676 +0 +15.146812 +0 +15.146812 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 679.998 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.507 679.998 Td +/F15_0 9.9626 Tf +(compresses) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-263 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-263 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-262 TJm +(Burro) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws-Wheeler) +[7.192997 +0 +3.875451 +0 +3.317546 +0 +9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-263 TJm +(block-sorting) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(te) +[2.769603 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-263 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(algorithm,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-266 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(Huf) +[7.192997 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fman) +[3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-263 TJm +(coding.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +72 668.043 Td +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-203 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-204 TJm +(generally) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-203 TJm +(considerably) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-203 TJm +(better) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-204 TJm +(t) +[2.769603 +0] Tj +1 TJm +(han) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-204 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-203 TJm +(achie) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +-203 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-204 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-203 TJm +(con) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(entional) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-203 TJm +(LZ77/LZ78-based) +[6.087149 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +6.087149 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-204 TJm +(compressors,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +72 656.087 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(approaches) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(PPM) +[5.539206 +0 +5.539206 +0 +8.856751 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(amily) +[4.423394 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(statistical) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(compressors.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 634.17 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +105.074 634.17 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-320 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uilt) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-319 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-320 TJm +(top) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-320 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.712 634.17 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +224.533 634.17 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-337 TJm +(a) +[4.423394 +0] Tj +-320 TJm +(\003e) +[5.539206 +0 +4.423394 +0] Tj +15 TJm +(xible) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-320 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-319 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-320 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-320 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-320 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-319 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-320 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +449.816 634.17 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +482.889 634.17 Td +/F15_0 9.9626 Tf +(format.) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-1039 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +72 622.214 Td +(manual) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-316 TJm +(describes) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-316 TJm +(both) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-317 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-316 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-316 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-316 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-316 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-316 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-317 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-316 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-316 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-316 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-316 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-317 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-316 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace.) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-1017 TJm +(Most) +[8.856751 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-316 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-316 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-317 TJm +(manual) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-316 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 610.259 Td +(de) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +20 TJm +(oted) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(program,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(good) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-250 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-250 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(interest) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(program.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 578.379 Td +(\225) +[3.48691 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-450 TJm +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-278 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-278 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-277 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-278 TJm +([2]) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-278 TJm +(describes) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-278 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-278 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-278 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +256.282 578.379 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +286.17 578.379 Td +/F15_0 9.9626 Tf +(;) +[2.769603 +0] Tj +-292 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-278 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-277 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-278 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-278 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-278 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-278 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-277 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-278 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-278 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-278 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-277 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-278 TJm +(kno) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +81.963 566.424 Td +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(operate) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(program.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 544.506 Td +(\225) +[3.48691 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-450 TJm +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(libbzip2) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +([8]) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(describes) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(programming) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(aces) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(detail,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 522.588 Td +(\225) +[3.48691 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-450 TJm +(Miscellanea) +[8.856751 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +([31]) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(records) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(miscellaneous) +[7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(notes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(I) +[3.317546 +0] Tj +-250 TJm +(thought) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(ought) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(recorded) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +25 TJm +(where.) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.852 Td +(1) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 2 5 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 701.916 Td +/F9_0 24.7902 Tf +(2.) +[13.783351 +0 +6.891676 +0] Tj +-278 TJm +(Ho) +[17.898524 +0 +15.146812 +0] Tj +15 TJm +(w) +[19.286776 +0] Tj +-278 TJm +(to) +[8.255137 +0 +15.146812 +0] Tj +-278 TJm +(use) +[15.146812 +0 +13.783351 +0 +13.783351 +0] Tj +-278 TJm +(bzip2) +[15.146812 +0 +12.3951 +0 +6.891676 +0 +15.146812 +0 +13.783351 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 656.35 Td +/F9_0 17.2154 Tf +(T) +[10.518609 +0] Tj +80 TJm +(ab) +[9.571762 +0 +10.518609 +0] Tj +10 TJm +(le) +[4.785881 +0 +9.571762 +0] Tj +-278 TJm +(of) +[10.518609 +0 +5.732728 +0] Tj +-278 TJm +(Contents) +[12.429519 +0 +10.518609 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 635.788 Td +/F15_0 9.9626 Tf +(2.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(N) +[7.192997 +0] Tj +35 TJm +(AME) +[7.192997 +0 +8.856751 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +131.445 635.788 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 635.788 Td +/F15_0 9.9626 Tf +(2) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 623.832 Td +(2.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(SYNOPSIS) +[5.539206 +0 +7.192997 +0 +7.192997 +0 +7.192997 +0 +5.539206 +0 +5.539206 +0 +3.317546 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +149.337 623.832 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 623.832 Td +/F15_0 9.9626 Tf +(2) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 611.877 Td +(2.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(DESCRIPTION) +[7.192997 +0 +6.087149 +0 +5.539206 +0 +6.645054 +0 +6.645054 +0 +3.317546 +0 +5.539206 +0 +6.087149 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +167.044 611.877 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 611.877 Td +/F15_0 9.9626 Tf +(3) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 599.922 Td +(2.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(OPTIONS) +[7.192997 +0 +5.539206 +0 +6.087149 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +144.627 599.922 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 599.922 Td +/F15_0 9.9626 Tf +(4) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 587.967 Td +(2.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(MEMOR) +[8.856751 +0 +6.087149 +0 +8.856751 +0 +7.192997 +0 +6.645054 +0] Tj +65 TJm +(Y) +[7.192997 +0] Tj +-250 TJm +(MAN) +[8.856751 +0 +7.192997 +0 +7.192997 +0] Tj +35 TJm +(A) +[7.192997 +0] Tj +40 TJm +(GEMENT) +[7.192997 +0 +6.087149 +0 +8.856751 +0 +6.087149 +0 +7.192997 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +220.167 587.967 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 587.967 Td +/F15_0 9.9626 Tf +(5) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 576.012 Td +(2.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(RECO) +[6.645054 +0 +6.087149 +0 +6.645054 +0 +7.192997 +0] Tj +50 TJm +(VERING) +[7.192997 +0 +6.087149 +0 +6.645054 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +-250 TJm +(D) +[7.192997 +0] Tj +40 TJm +(A) +[7.192997 +0] Tj +111 TJm +(T) +[6.087149 +0] Tj +93 TJm +(A) +[7.192997 +0] Tj +-250 TJm +(FR) +[5.539206 +0 +6.645054 +0] Tj +40 TJm +(OM) +[7.192997 +0 +8.856751 +0] Tj +-250 TJm +(D) +[7.192997 +0] Tj +40 TJm +(AMA) +[7.192997 +0 +8.856751 +0 +7.192997 +0] Tj +40 TJm +(GED) +[7.192997 +0 +6.087149 +0 +7.192997 +0] Tj +-250 TJm +(FILES) +[5.539206 +0 +3.317546 +0 +6.087149 +0 +6.087149 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.005 576.012 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 576.012 Td +/F15_0 9.9626 Tf +(6) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 564.057 Td +(2.7.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(PERFORMANCE) +[5.539206 +0 +6.087149 +0 +6.645054 +0 +5.539206 +0 +7.192997 +0 +6.645054 +0 +8.856751 +0 +7.192997 +0 +7.192997 +0 +6.645054 +0 +6.087149 +0] Tj +-250 TJm +(NO) +[7.192997 +0 +7.192997 +0] Tj +40 TJm +(TES) +[6.087149 +0 +6.087149 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.713 564.057 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 564.057 Td +/F15_0 9.9626 Tf +(6) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 552.101 Td +(2.8.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(CA) +[6.645054 +0 +7.192997 +0] Tj +135 TJm +(VEA) +[7.192997 +0 +6.087149 +0 +7.192997 +0] Tj +111 TJm +(TS) +[6.087149 +0 +5.539206 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +145.34 552.101 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 552.101 Td +/F15_0 9.9626 Tf +(7) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 540.146 Td +(2.9.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(A) +[7.192997 +0] Tj +55 TJm +(UTHOR) +[7.192997 +0 +6.087149 +0 +7.192997 +0 +7.192997 +0 +6.645054 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +141.861 540.146 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 540.146 Td +/F15_0 9.9626 Tf +(7) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 508.266 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(chapter) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(contains) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(cop) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +10 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +213.837 508.266 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +246.215 508.266 Td +/F15_0 9.9626 Tf +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(page,) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(nothing) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(else.) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 473.513 Td +/F9_0 20.6585 Tf +(2.1.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(NAME) +[14.915437 +0 +14.915437 +0 +17.208531 +0 +13.77922 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 441.632 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 441.632 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +112.349 441.632 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +117.33 441.632 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.664 441.632 Td +/F15_0 9.9626 Tf +(-) +[3.317546 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(block-sorting) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(compressor) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(v1.0.8) +[4.9813 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 419.715 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 419.715 Td +/F17_0 9.9626 Tf +(bzcat) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +114.839 419.715 Td +/F15_0 9.9626 Tf +(-) +[3.317546 +0] Tj +-250 TJm +(decompresses) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(stdout) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 397.797 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 397.797 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +156.682 397.797 Td +/F15_0 9.9626 Tf +(-) +[3.317546 +0] Tj +-250 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ers) +[4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(damaged) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 353.081 Td +/F9_0 20.6585 Tf +(2.2.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(SYNOPSIS) +[13.77922 +0 +13.77922 +0 +14.915437 +0 +16.072313 +0 +13.77922 +0 +13.77922 +0 +5.743063 +0 +13.77922 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 321.201 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 321.201 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +114.839 321.201 Td +/F15_0 9.9626 Tf +([) +[3.317546 +0] Tj +-250 TJm +(-cdfkqstvzVL123456789) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(]) +[3.317546 +0] Tj +-250 TJm +([) +[3.317546 +0] Tj +-250 TJm +(\002lenames) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(...) +[2.49065 +0 +2.49065 +0 +2.49065 +0] Tj +-620 TJm +(]) +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 299.283 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 299.283 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +126.795 299.283 Td +/F15_0 9.9626 Tf +([) +[3.317546 +0] Tj +-250 TJm +(-fkvsVL) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +7.192997 +0 +6.087149 +0] Tj +-250 TJm +(]) +[3.317546 +0] Tj +-250 TJm +([) +[3.317546 +0] Tj +-250 TJm +(\002lenames) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(...) +[2.49065 +0 +2.49065 +0 +2.49065 +0] Tj +-620 TJm +(]) +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 277.365 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 277.365 Td +/F17_0 9.9626 Tf +(bzcat) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +114.839 277.365 Td +/F15_0 9.9626 Tf +([) +[3.317546 +0] Tj +-250 TJm +(-s) +[3.317546 +0 +3.875451 +0] Tj +-250 TJm +(]) +[3.317546 +0] Tj +-250 TJm +([) +[3.317546 +0] Tj +-250 TJm +(\002lenames) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(...) +[2.49065 +0 +2.49065 +0 +2.49065 +0] Tj +-620 TJm +(]) +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 255.447 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 255.447 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +156.683 255.447 Td +/F15_0 9.9626 Tf +(\002lename) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.852 Td +(2) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 3 6 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +477.109 749.245 Td +/F15_0 9.9626 Tf +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 704.93 Td +/F9_0 20.6585 Tf +(2.3.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(DESCRIPTION) +[14.915437 +0 +13.77922 +0 +13.77922 +0 +14.915437 +0 +14.915437 +0 +5.743063 +0 +13.77922 +0 +12.622344 +0 +5.743063 +0 +16.072313 +0 +14.915437 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 683.012 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.56 683.012 Td +/F15_0 9.9626 Tf +(compresses) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-268 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-268 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-269 TJm +(Burro) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws-Wheeler) +[7.192997 +0 +3.875451 +0 +3.317546 +0 +9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-268 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-268 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(te) +[2.769603 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-268 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(algorithm,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-273 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(Huf) +[7.192997 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fman) +[3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-268 TJm +(coding.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +72 671.057 Td +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-203 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-204 TJm +(generally) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-203 TJm +(considerably) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-203 TJm +(better) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-204 TJm +(t) +[2.769603 +0] Tj +1 TJm +(han) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-204 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-203 TJm +(achie) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +-203 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-204 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-203 TJm +(con) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(entional) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-203 TJm +(LZ77/LZ78-based) +[6.087149 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +6.087149 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-204 TJm +(compressors,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +72 659.101 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(approaches) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(PPM) +[5.539206 +0 +5.539206 +0 +8.856751 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(amily) +[4.423394 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(statistical) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(compressors.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 637.184 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(command-line) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(options) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(deliberately) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(similar) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(those) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +364.869 637.184 Td +/F17_0 9.9626 Tf +(gzip) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +388.779 637.184 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(identical.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 615.266 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +105.175 615.266 Td +/F15_0 9.9626 Tf +(e) +[4.423394 +0] Tj +15 TJm +(xpects) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-330 TJm +(a) +[4.423394 +0] Tj +-330 TJm +(list) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-330 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-330 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-329 TJm +(names) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-330 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-330 TJm +(accompan) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-330 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-330 TJm +(command-line) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-330 TJm +(\003ags.) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-1099 TJm +(Each) +[6.087149 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-330 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-330 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-330 TJm +(replaced) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-330 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-330 TJm +(a) +[4.423394 +0] Tj +-330 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +72 603.311 Td +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-349 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-348 TJm +(itself,) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +2.49065 +0] Tj +-373 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-349 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-349 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +204.444 603.311 Td +/F17_0 9.9626 Tf +(original_name.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +306.063 603.311 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1212 TJm +(Each) +[6.087149 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-348 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-349 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-348 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-349 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-348 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-349 TJm +(modi\002cation) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-349 TJm +(date,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +72 591.356 Td +(permissions,) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-344 TJm +(and,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-344 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-325 TJm +(possible,) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-344 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wnership) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-325 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-325 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-326 TJm +(corresponding) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-325 TJm +(original,) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-344 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-325 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-325 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-325 TJm +(properties) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-325 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-326 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-325 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +72 579.4 Td +(restored) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-308 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-308 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-307 TJm +(time.) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-484 TJm +(File) +[5.539206 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-308 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-308 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-308 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-307 TJm +(nai) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-308 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-308 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-308 TJm +(sense) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-308 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-308 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-307 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-308 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-308 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-308 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-308 TJm +(preserving) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 567.445 Td +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-334 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-333 TJm +(names,) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-355 TJm +(permissions,) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-355 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wnerships) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-333 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-334 TJm +(dates) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-334 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-333 TJm +(\002lesystems) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-334 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-334 TJm +(lack) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-333 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-334 TJm +(concepts,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-355 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-333 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-334 TJm +(serious) +[3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-334 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +72 555.49 Td +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(length) +[2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(restrictions,) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(MS-DOS.) +[8.856751 +0 +5.539206 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0 +5.539206 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 533.572 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.379 533.572 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +121.255 533.572 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +165.589 533.572 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erwrite) +[4.423394 +0 +3.317546 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xisting) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-620 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(happen,) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(specify) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +495.977 533.572 Td +/F17_0 9.9626 Tf +(-f) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +510.423 533.572 Td +/F15_0 9.9626 Tf +(\003ag.) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 511.654 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-284 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-285 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-284 TJm +(names) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-284 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-284 TJm +(speci\002ed,) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +193.935 511.654 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +226.655 511.654 Td +/F15_0 9.9626 Tf +(compresses) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-284 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-285 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-284 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-284 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-284 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-285 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-825 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-285 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-284 TJm +(case,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +491.778 511.654 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +524.499 511.654 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +72 499.699 Td +(decline) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(terminal,) +[2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(entirely) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(incomprehensible) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(therefore) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(pointless.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 477.781 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +116.176 477.781 Td +/F15_0 9.9626 Tf +(\(or) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +130.125 477.781 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(-d) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +177.946 477.781 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-234 TJm +(decompresses) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-234 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-234 TJm +(speci\002ed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +-235 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-609 TJm +(Files) +[5.539206 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-234 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-234 TJm +(were) +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-234 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-235 TJm +(created) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-234 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +445.012 477.781 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +477.233 477.781 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-234 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-234 TJm +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +72 465.826 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(i) +[2.769603 +0] Tj +1 TJm +(gnored,) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-287 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(a) +[4.423394 +0] Tj +-279 TJm +(w) +[7.192997 +0] Tj +10 TJm +(arning) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(issued.) +[2.769603 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +216.033 465.826 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +248.705 465.826 Td +/F15_0 9.9626 Tf +(attempts) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-279 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-280 TJm +(guess) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-279 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-280 TJm +(\002lename) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-279 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-280 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-280 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-279 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-280 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-279 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-280 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 453.871 Td +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(ws:) +[7.192997 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 421.991 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 421.991 Td +/F17_0 9.9626 Tf +(filename.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.66 421.991 Td +/F15_0 9.9626 Tf +(becomes) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.01 421.991 Td +/F17_0 9.9626 Tf +(filename) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 400.073 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 400.073 Td +/F17_0 9.9626 Tf +(filename.bz) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +156.682 400.073 Td +/F15_0 9.9626 Tf +(becomes) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +194.032 400.073 Td +/F17_0 9.9626 Tf +(filename) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 378.155 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 378.155 Td +/F17_0 9.9626 Tf +(filename.tbz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.66 378.155 Td +/F15_0 9.9626 Tf +(becomes) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.01 378.155 Td +/F17_0 9.9626 Tf +(filename.tar) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 356.237 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 356.237 Td +/F17_0 9.9626 Tf +(filename.tbz) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.66 356.237 Td +/F15_0 9.9626 Tf +(becomes) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.01 356.237 Td +/F17_0 9.9626 Tf +(filename.tar) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 334.319 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 334.319 Td +/F17_0 9.9626 Tf +(anyothername) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.66 334.319 Td +/F15_0 9.9626 Tf +(becomes) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.01 334.319 Td +/F17_0 9.9626 Tf +(anyothername.out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 312.402 Td +/F15_0 9.9626 Tf +(If) +[3.317546 +0 +3.317546 +0] Tj +-342 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-342 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-342 TJm +(does) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-342 TJm +(n) +[4.9813 +0] Tj +-1 TJm +(ot) +[4.9813 +0 +2.769603 +0] Tj +-342 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-342 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-342 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-342 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-342 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-342 TJm +(recognised) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-342 TJm +(endings,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +309.305 312.402 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +333.215 312.402 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +339.344 312.402 Td +/F17_0 9.9626 Tf +(.bz) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +357.276 312.402 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.405 312.402 Td +/F17_0 9.9626 Tf +(.tbz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +396.702 312.402 Td +/F15_0 9.9626 Tf +(or) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +408.409 312.402 Td +/F17_0 9.9626 Tf +(.tbz) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +432.319 312.402 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +438.448 312.402 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +471.744 312.402 Td +/F15_0 9.9626 Tf +(complains) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-342 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-342 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +72 300.446 Td +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(guess) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +370.009 300.446 Td +/F17_0 9.9626 Tf +(.out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +396.41 300.446 Td +/F15_0 9.9626 Tf +(appended.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 278.529 Td +(As) +[7.192997 +0 +3.875451 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(compression,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(supplying) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(\002lenames) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(causes) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 256.611 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +116.409 256.611 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-257 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-258 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-257 TJm +(a) +[4.423394 +0] Tj +-258 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-257 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-258 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-257 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-258 TJm +(concatenation) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-257 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-258 TJm +(tw) +[2.769603 +0 +7.192997 +0] Tj +10 TJm +(o) +[4.9813 +0] Tj +-258 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-257 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-258 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-257 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-665 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-258 TJm +(result) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-257 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 244.656 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-239 TJm +(concatenation) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-238 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-239 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-239 TJm +(corresponding) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-239 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-238 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-613 TJm +(Inte) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(grity) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-238 TJm +(testing) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-239 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +382.247 244.656 Td +/F17_0 9.9626 Tf +(-t) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +394.202 244.656 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-239 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-238 TJm +(concatenated) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-239 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-239 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-239 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 232.7 Td +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-250 TJm +(supported.) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 210.783 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-399 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-399 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-399 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-400 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-399 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-399 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-399 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-399 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-399 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-399 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-399 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-400 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(ving) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-399 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +409.67 210.783 Td +/F17_0 9.9626 Tf +(-c) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +425.602 210.783 Td +/F15_0 9.9626 Tf +(\003ag.) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-757 TJm +(Multiple) +[8.856751 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-400 TJm +(\002l) +[5.539206 +0 +2.769603 +0] Tj +1 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-400 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-399 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +72 198.827 Td +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-367 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-367 TJm +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-367 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-367 TJm +(this.) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-1321 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-367 TJm +(resulting) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-367 TJm +(outputs) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-367 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-367 TJm +(fed) +[3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-367 TJm +(sequentially) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-366 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-367 TJm +(stdout.) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-1322 TJm +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-367 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +72 186.872 Td +(multiple) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-289 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-289 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-289 TJm +(manner) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-288 TJm +(generates) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-289 TJm +(a) +[4.423394 +0] Tj +-289 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-289 TJm +(containing) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(multiple) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(representations.) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-853 TJm +(Such) +[5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(a) +[4.423394 +0] Tj +-289 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +72 174.917 Td +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-391 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-391 TJm +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-390 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-391 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-391 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +238.116 174.917 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +271.898 174.917 Td +/F15_0 9.9626 Tf +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-391 TJm +(0.9.0) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-391 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-390 TJm +(later) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-733 TJm +(Earlier) +[6.087149 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-391 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-391 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +448.071 174.917 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +481.852 174.917 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-391 TJm +(stop) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-391 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +72 162.962 Td +(decompressing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 141.044 Td +/F17_0 9.9626 Tf +(bzcat) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.379 141.044 Td +/F15_0 9.9626 Tf +(\(or) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +118.486 141.044 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(-dc) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +172.284 141.044 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-250 TJm +(decompresses) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(speci\002ed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 119.126 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.866 119.126 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-299 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-299 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(guments) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-299 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-299 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-299 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +40 TJm +(vironment) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-298 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ariables) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +316.903 119.126 Td +/F17_0 9.9626 Tf +(BZIP2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +349.769 119.126 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +367.133 119.126 Td +/F17_0 9.9626 Tf +(BZIP) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +391.043 119.126 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-299 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-299 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-299 TJm +(order) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-311 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-299 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-299 TJm +(process) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-299 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +72 107.171 Td +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(guments) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(command) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(line.) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-310 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(con) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(enient) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(supply) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(guments.) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 85.253 Td +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-294 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-294 TJm +(al) +[4.423394 +0 +2.769603 +0] Tj +10 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ays) +[4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-294 TJm +(performed,) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-305 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-294 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-294 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-294 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-293 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-294 TJm +(slightly) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-294 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-294 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-294 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(original.) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-884 TJm +(Files) +[5.539206 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-294 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-294 TJm +(less) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-294 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 73.298 Td +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-246 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-246 TJm +(hundred) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-245 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-246 TJm +(tend) +[2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-246 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-246 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-246 TJm +(l) +[2.769603 +0] Tj +1 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-247 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-246 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-246 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-245 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-246 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-246 TJm +(a) +[4.423394 +0] Tj +-246 TJm +(constant) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-246 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erhead) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-245 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-246 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-246 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(gion) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-246 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.951 Td +(3) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 4 7 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +477.109 749.245 Td +/F15_0 9.9626 Tf +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(50) +[4.9813 +0 +4.9813 +0] Tj +-264 TJm +(bytes.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-351 TJm +(Random) +[6.645054 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0] Tj +-264 TJm +(dat) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +1 TJm +(a) +[4.423394 +0] Tj +-264 TJm +(\(including) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-264 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-263 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-264 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-264 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-263 TJm +(compressors\)) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +3.317546 +0] Tj +-264 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-264 TJm +(coded) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-263 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-264 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-264 TJm +(8.05) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(bits) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-264 TJm +(per) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-264 TJm +(byte,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-267 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(ving) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +72 698.082 Td +(e) +[4.423394 +0] Tj +15 TJm +(xpansion) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(around) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(0.5%.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +8.298846 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 676.283 Td +(As) +[7.192997 +0 +3.875451 +0] Tj +-268 TJm +(a) +[4.423394 +0] Tj +-268 TJm +(self-check) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-269 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-268 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-268 TJm +(protection,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +217.273 676.283 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +249.833 676.283 Td +/F15_0 9.9626 Tf +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-268 TJm +(32-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-268 TJm +(CRCs) +[6.645054 +0 +6.645054 +0 +6.645054 +0 +3.875451 +0] Tj +-269 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-268 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-268 TJm +(sure) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-268 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-268 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-269 TJm +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-268 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-268 TJm +(a) +[4.423394 +0] Tj +-268 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-269 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 664.328 Td +(identical) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-200 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-199 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-200 TJm +(original.) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-586 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-200 TJm +(guards) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-199 TJm +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ainst) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-200 TJm +(corruption) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-199 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-200 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-200 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-199 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-210 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-199 TJm +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ainst) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-200 TJm +(undetected) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-200 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ugs) +[4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-199 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +510.112 664.328 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 652.373 Td +/F15_0 9.9626 Tf +(\(hopefully) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-275 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-274 TJm +(unlik) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(ely\).) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +-384 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-275 TJm +(chances) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-275 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-275 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-274 TJm +(corruption) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-275 TJm +(going) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-275 TJm +(undetected) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-274 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-275 TJm +(microscopic,) +[7.750903 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-281 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-275 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-274 TJm +(chance) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-275 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-275 TJm +(four) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +72 640.417 Td +(billion) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-279 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-280 TJm +(processed.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-795 TJm +(Be) +[6.645054 +0 +4.423394 +0] Tj +-279 TJm +(a) +[4.423394 +0] Tj +15 TJm +(w) +[7.192997 +0] Tj +10 TJm +(are,) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-286 TJm +(though,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-287 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-279 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(check) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(occurs) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-279 TJm +(upon) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(decompression,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-287 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-279 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-279 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-280 TJm +(tell) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-279 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +72 628.462 Td +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-237 TJm +(something) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-236 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-237 TJm +(wrong.) +[7.192997 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-611 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-237 TJm +(can') +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-237 TJm +(help) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-237 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-236 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-237 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-237 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-237 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-236 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-612 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-236 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-237 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +458.159 628.462 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +532.249 628.462 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +72 616.507 Td +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(damaged) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 594.708 Td +(Return) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-298 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-406 TJm +(0) +[4.9813 +0] Tj +-298 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-298 TJm +(a) +[4.423394 +0] Tj +-298 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-298 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xit,) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-310 TJm +(1) +[4.9813 +0] Tj +-298 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-297 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +40 TJm +(vironmental) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-298 TJm +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-298 TJm +(\(\002le) +[3.317546 +0 +5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-298 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-298 TJm +(found,) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alid) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-298 TJm +(\003ags,) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-310 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-298 TJm +(errors,) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +-310 TJm +(etc.\),) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0 +3.317546 +0 +2.49065 +0] Tj +-310 TJm +(2) +[4.9813 +0] Tj +-298 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 582.753 Td +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(corrupt) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(3) +[4.9813 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(consistenc) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(\(e) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g,) +[4.9813 +0 +2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug\)) +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(caused) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +443.065 582.753 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +475.444 582.753 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(panic.) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 548.118 Td +/F9_0 20.6585 Tf +(2.4.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(OPTIONS) +[16.072313 +0 +13.77922 +0 +12.622344 +0 +5.743063 +0 +16.072313 +0 +14.915437 +0 +13.77922 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 516.475 Td +/F17_0 9.9626 Tf +(-c) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--stdout) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 504.52 Td +/F15_0 9.9626 Tf +(Compress) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 478.854 Td +/F17_0 9.9626 Tf +(-d) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--decompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 466.899 Td +/F15_0 9.9626 Tf +(F) +[5.539206 +0] Tj +15 TJm +(orce) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-296 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.214 466.899 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +230.102 466.899 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +235.659 466.899 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +280.454 466.899 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +297.791 466.899 Td +/F17_0 9.9626 Tf +(bzcat) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +330.631 466.899 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-296 TJm +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-296 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-297 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-296 TJm +(program,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-308 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-296 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-296 TJm +(decision) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +108 454.944 Td +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-303 TJm +(actions) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-303 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-303 TJm +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-303 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-303 TJm +(done) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-303 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-304 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-303 TJm +(basis) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-303 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-303 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-303 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-303 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-303 TJm +(used.) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-939 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-303 TJm +(\003ag) +[5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +-303 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(errides) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-303 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-303 TJm +(mechanism,) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0 +2.49065 +0] Tj +-316 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +108 442.988 Td +(forces) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(decompress.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 417.323 Td +/F17_0 9.9626 Tf +(-z) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 405.368 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(complement) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +187.969 405.368 Td +/F17_0 9.9626 Tf +(-d) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +199.924 405.368 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +-310 TJm +(forces) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(compression,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(ardless) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +20 TJm +(okation) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(name.) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 379.702 Td +/F17_0 9.9626 Tf +(-t) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--test) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 367.747 Td +/F15_0 9.9626 Tf +(Check) +[6.645054 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-270 TJm +(inte) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(grity) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-271 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-270 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-271 TJm +(speci\002ed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +-270 TJm +(\002le\(s\),) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +3.317546 +0 +2.49065 +0] Tj +-276 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-270 TJm +(don') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-270 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-271 TJm +(them.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-742 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-271 TJm +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-270 TJm +(performs) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0] Tj +-270 TJm +(a) +[4.423394 +0] Tj +-271 TJm +(trial) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-270 TJm +(decompres-) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.317546 +0] Tj +108 355.792 Td +(sion) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(thro) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +15 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(result.) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 330.126 Td +/F17_0 9.9626 Tf +(-f) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--force) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 318.171 Td +/F15_0 9.9626 Tf +(F) +[5.539206 +0] Tj +15 TJm +(orce) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-338 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erwrite) +[4.423394 +0 +3.317546 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-339 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-338 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-338 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-1150 TJm +(Normally) +[7.192997 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +289.831 318.171 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +323.089 318.171 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-338 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-339 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erwrite) +[4.423394 +0 +3.317546 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-338 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xisting) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-338 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-338 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-1150 TJm +(Also) +[7.192997 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-339 TJm +(forces) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 306.215 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +140.379 306.215 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(break) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(hard) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(links) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(otherwise) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +7.192997 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ouldn') +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(do.) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 284.416 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +141.211 284.416 Td +/F15_0 9.9626 Tf +(normally) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-334 TJm +(declines) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-333 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-334 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-333 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-334 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-333 TJm +(don') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-334 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-333 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-334 TJm +(correct) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-333 TJm +(magic) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-334 TJm +(header) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-333 TJm +(bytes.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-561 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-334 TJm +(forced) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +108 272.461 Td +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +111.318 272.461 Td +/F17_0 9.9626 Tf +(-f) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +123.273 272.461 Td +/F15_0 9.9626 Tf +(\),) +[3.317546 +0 +2.49065 +0] Tj +-250 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(we) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(pass) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(through) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(unmodi\002ed.) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +412.585 272.461 Td +/F17_0 9.9626 Tf +(gzip) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +438.986 272.461 Td +/F15_0 9.9626 Tf +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es.) +[4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 246.795 Td +/F17_0 9.9626 Tf +(-k) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--keep) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 234.84 Td +/F15_0 9.9626 Tf +(K) +[7.192997 +0] Tj +25 TJm +(eep) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\(don') +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(delete\)) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(during) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 209.174 Td +/F17_0 9.9626 Tf +(-s) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 197.219 Td +/F15_0 9.9626 Tf +(Reduce) +[6.645054 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-347 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-347 TJm +(usage,) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-371 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-346 TJm +(compression,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-371 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-347 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-347 TJm +(testing.) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1201 TJm +(Files) +[5.539206 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-347 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-347 TJm +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-346 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-347 TJm +(tested) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +108 185.264 Td +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-388 TJm +(a) +[4.423394 +0] Tj +-388 TJm +(modi\002ed) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +-388 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-389 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-388 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-388 TJm +(requires) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +-388 TJm +(2.5) +[4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-388 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-388 TJm +(per) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-388 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-389 TJm +(byte.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-1448 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-389 TJm +(means) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-388 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-388 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-388 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-388 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +108 173.309 Td +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(2300k) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(albeit) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(half) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(speed.) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 151.51 Td +(During) +[7.192997 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-252 TJm +(compr) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0] Tj +1 TJm +(ession,) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +194.091 151.51 Td +/F17_0 9.9626 Tf +(-s) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +208.551 151.51 Td +/F15_0 9.9626 Tf +(selects) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-252 TJm +(a) +[4.423394 +0] Tj +-251 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-252 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-251 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-252 TJm +(200k,) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-251 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-252 TJm +(limits) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-251 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-252 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-251 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-252 TJm +(around) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-252 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-251 TJm +(\002gure,) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-252 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +108 139.554 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xpense) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-287 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-288 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-287 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-287 TJm +(ratio.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-843 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-287 TJm +(short,) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.49065 +0] Tj +-297 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-287 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-287 TJm +(machine) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-287 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-287 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-288 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-287 TJm +(\(8) +[3.317546 +0 +4.9813 +0] Tj +-287 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(abytes) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-287 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-287 TJm +(less\),) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +2.49065 +0] Tj +108 127.599 Td +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +123.771 127.599 Td +/F17_0 9.9626 Tf +(-s) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +138.217 127.599 Td +/F15_0 9.9626 Tf +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erything.) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-620 TJm +(See) +[5.539206 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +(MEMOR) +[8.856751 +0 +6.087149 +0 +8.856751 +0 +7.192997 +0 +6.645054 +0] Tj +65 TJm +(Y) +[7.192997 +0] Tj +-250 TJm +(MAN) +[8.856751 +0 +7.192997 +0 +7.192997 +0] Tj +35 TJm +(A) +[7.192997 +0] Tj +40 TJm +(GEMENT) +[7.192997 +0 +6.087149 +0 +8.856751 +0 +6.087149 +0 +7.192997 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +([5]) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(belo) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 101.933 Td +/F17_0 9.9626 Tf +(-q) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--quiet) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 89.978 Td +/F15_0 9.9626 Tf +(Suppress) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-221 TJm +(non-essential) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-220 TJm +(w) +[7.192997 +0] Tj +10 TJm +(arning) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-221 TJm +(messages.) +[7.750903 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-300 TJm +(Messages) +[8.856751 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-221 TJm +(pertaining) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-221 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-220 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-221 TJm +(errors) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-221 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-220 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-221 TJm +(critical) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-221 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ents) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-221 TJm +(wi) +[7.192997 +0 +2.769603 +0] Tj +1 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-221 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +108 78.023 Td +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(suppressed.) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.852 Td +(4) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 5 8 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +477.109 749.245 Td +/F15_0 9.9626 Tf +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F17_0 9.9626 Tf +(-v) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--verbose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 698.082 Td +/F15_0 9.9626 Tf +(V) +[7.192997 +0] Tj +111 TJm +(erbose) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-323 TJm +(mode) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-322 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-323 TJm +(sho) +[3.875451 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-322 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-323 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-323 TJm +(ratio) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-322 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-323 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-323 TJm +(processed.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1056 TJm +(Further) +[5.539206 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +430.015 698.082 Td +/F17_0 9.9626 Tf +(-v) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +441.97 698.082 Td +/F15_0 9.9626 Tf +(') +[3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-323 TJm +(increase) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-322 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-323 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erbosity) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +108 686.127 Td +(le) +[2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el,) +[4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(spe) +[3.875451 +0 +4.9813 +0 +4.423394 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(lots) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(information) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(primarily) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(interest) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(diagnostic) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(purposes.) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 660.224 Td +/F17_0 9.9626 Tf +(-L) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--license) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(-V) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--version) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 648.269 Td +/F15_0 9.9626 Tf +(Display) +[7.192997 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(softw) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +10 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion,) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(license) +[2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(terms) +[2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(conditions.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 622.366 Td +/F17_0 9.9626 Tf +(-1) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +86.446 622.366 Td +/F15_0 9.9626 Tf +(\(or) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +100.553 622.366 Td +/F17_0 9.9626 Tf +(--fast) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +136.418 622.366 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +152.468 622.366 Td +/F17_0 9.9626 Tf +(-9) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +166.914 622.366 Td +/F15_0 9.9626 Tf +(\(or) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +181.021 622.366 Td +/F17_0 9.9626 Tf +(-best) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.909 622.366 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 610.411 Td +(Set) +[5.539206 +0 +4.423394 +0 +2.769603 +0] Tj +-288 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-288 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-288 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-288 TJm +(100) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(k,) +[4.9813 +0 +2.49065 +0] Tj +-298 TJm +(200) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-288 TJm +(k) +[4.9813 +0] Tj +-288 TJm +(...) +[2.49065 +0 +2.49065 +0 +2.49065 +0] Tj +-850 TJm +(900) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-288 TJm +(k) +[4.9813 +0] Tj +-288 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(compressing.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-849 TJm +(Has) +[7.192997 +0 +4.423394 +0 +3.875451 +0] Tj +-289 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-288 TJm +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(fect) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-288 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-288 TJm +(decompressing.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-850 TJm +(See) +[5.539206 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +108 598.456 Td +(MEMOR) +[8.856751 +0 +6.087149 +0 +8.856751 +0 +7.192997 +0 +6.645054 +0] Tj +65 TJm +(Y) +[7.192997 +0] Tj +-297 TJm +(MAN) +[8.856751 +0 +7.192997 +0 +7.192997 +0] Tj +35 TJm +(A) +[7.192997 +0] Tj +40 TJm +(GEMENT) +[7.192997 +0 +6.087149 +0 +8.856751 +0 +6.087149 +0 +7.192997 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-297 TJm +([5]) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-298 TJm +(belo) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-904 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +297.278 598.456 Td +/F17_0 9.9626 Tf +(--fast) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +336.106 598.456 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +353.454 598.456 Td +/F17_0 9.9626 Tf +(--best) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +392.281 598.456 Td +/F15_0 9.9626 Tf +(aliases) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-297 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-298 TJm +(primarily) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-297 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-297 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +516.09 598.456 Td +/F17_0 9.9626 Tf +(gzip) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 586.501 Td +/F15_0 9.9626 Tf +(compatibility) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-356 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-265 TJm +(particular) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +220.423 586.501 Td +/F17_0 9.9626 Tf +(--fast) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +258.932 586.501 Td +/F15_0 9.9626 Tf +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-265 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-266 TJm +(things) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-265 TJm +(signi\002cantly) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-265 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aster) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-712 TJm +(And) +[7.192997 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +444.622 586.501 Td +/F17_0 9.9626 Tf +(--best) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +483.131 586.501 Td +/F15_0 9.9626 Tf +(merely) +[7.750903 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-265 TJm +(selects) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +108 574.545 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 548.643 Td +/F17_0 9.9626 Tf +(--) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 536.688 Td +/F15_0 9.9626 Tf +(T) +[6.087149 +0] Tj +35 TJm +(reats) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-261 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-261 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-260 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(guments) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-261 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-261 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-261 TJm +(names,) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-263 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-261 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-261 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-260 TJm +(start) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-261 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-261 TJm +(a) +[4.423394 +0] Tj +-261 TJm +(dash.) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.49065 +0] Tj +-685 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-260 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-261 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-261 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-261 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-260 TJm +(handle) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-261 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +108 524.732 Td +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(names) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(ginning) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(dash,) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xample:) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +302.27 524.732 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(--) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(-myfilename) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +421.821 524.732 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 498.83 Td +/F17_0 9.9626 Tf +(--repetitive-fast) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +178.6 498.83 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +188.563 498.83 Td +/F17_0 9.9626 Tf +(--repetitive-best) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 486.874 Td +/F15_0 9.9626 Tf +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-207 TJm +(\003ags) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-206 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-207 TJm +(redundant) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-207 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-206 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-207 TJm +(0.9.5) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-207 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-206 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e.) +[4.423394 +0 +2.49065 +0] Tj +-591 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-207 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vided) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-207 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-207 TJm +(coa) +[4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +1 TJm +(rse) +[3.317546 +0 +3.875451 +0 +4.423394 +0] Tj +-207 TJm +(control) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-207 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-207 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-206 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +108 474.919 Td +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-251 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-251 TJm +(earlier) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions,) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-251 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(sometimes) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(useful.) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-622 TJm +(0.9.5) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-251 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-251 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(impro) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +108 462.964 Td +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(renders) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-250 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(\003ags) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(irrele) +[2.769603 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ant.) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 414.264 Td +/F9_0 20.6585 Tf +(2.5.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(MEMOR) +[17.208531 +0 +13.77922 +0 +17.208531 +0 +16.072313 +0 +14.915437 +0] Tj +50 TJm +(Y) +[13.77922 +0] Tj +-278 TJm +(MANA) +[17.208531 +0 +14.915437 +0 +14.915437 +0 +14.915437 +0] Tj +50 TJm +(GEMENT) +[16.072313 +0 +13.77922 +0 +17.208531 +0 +13.77922 +0 +14.915437 +0 +12.622344 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 392.346 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.454 392.346 Td +/F15_0 9.9626 Tf +(compresses) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-258 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-257 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-258 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-257 TJm +(blocks.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-666 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-257 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-258 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-258 TJm +(af) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(fects) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-257 TJm +(both) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-258 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-257 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(ratio) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-257 TJm +(achie) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ed,) +[4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-260 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-257 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +72 380.391 Td +(of) +[4.9813 +0 +3.317546 +0] Tj +-215 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-215 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-215 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-215 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-214 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-215 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-597 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-215 TJm +(\003ags) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +337.719 380.391 Td +/F17_0 9.9626 Tf +(-1) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +351.815 380.391 Td +/F15_0 9.9626 Tf +(through) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +384.95 380.391 Td +/F17_0 9.9626 Tf +(-9) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +399.046 380.391 Td +/F15_0 9.9626 Tf +(specify) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-215 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-215 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-215 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-215 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-214 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-215 TJm +(100,000) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +72 368.435 Td +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-278 TJm +(through) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-277 TJm +(900,000) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-278 TJm +(\(the) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-277 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault\)) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +-278 TJm +(respecti) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ely) +[4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-786 TJm +(At) +[7.192997 +0 +2.769603 +0] Tj +-278 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(time,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-284 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-278 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-278 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-277 TJm +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-278 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-278 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 356.48 Td +(is) +[2.769603 +0 +3.875451 +0] Tj +-243 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-242 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-243 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(header) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-243 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-242 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-243 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-242 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-244 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +275.174 356.48 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +319.433 356.48 Td +/F15_0 9.9626 Tf +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-243 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(o) +[4.9813 +0] Tj +-1 TJm +(c) +[4.423394 +0] Tj +1 TJm +(ates) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-243 TJm +(itself) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-242 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-243 TJm +(enough) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-242 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-243 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +72 344.525 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-303 TJm +(\002le.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-940 TJm +(Since) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-304 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-303 TJm +(sizes) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-303 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-303 TJm +(stored) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-304 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-303 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-303 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-317 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-303 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-304 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-303 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-303 TJm +(\003ags) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +406.35 344.525 Td +/F17_0 9.9626 Tf +(-1) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +421.327 344.525 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +432.1 344.525 Td +/F17_0 9.9626 Tf +(-9) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +447.077 344.525 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-303 TJm +(irrele) +[2.769603 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-304 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-303 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-303 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +72 332.57 Td +(ignored) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(during) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 310.652 Td +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(requirements,) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(bytes,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(estimated) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(as:) +[4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 247.723] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 299.131 Td +/F17_0 9.9626 Tf +(Compression:) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1278 TJm +(400k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(+) +[5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(8) +[5.97756 +0] Tj +-426 TJm +(x) +[5.97756 +0] Tj +-426 TJm +(block) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +90 275.22 Td +(Decompression:) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(+) +[5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(4) +[5.97756 +0] Tj +-426 TJm +(x) +[5.97756 +0] Tj +-426 TJm +(block) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\),) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +153.66 263.265 Td +(100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(+) +[5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(2.5) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(x) +[5.97756 +0] Tj +-426 TJm +(block) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 225.805 Td +/F15_0 9.9626 Tf +(Lar) +[6.087149 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-292 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-292 TJm +(sizes) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-291 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-292 TJm +(rapidly) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-292 TJm +(diminishing) +[4.9813 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-292 TJm +(mar) +[7.750903 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ginal) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-291 TJm +(returns.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-871 TJm +(Most) +[8.856751 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-292 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-291 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-292 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-292 TJm +(comes) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-292 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-291 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-292 TJm +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-292 TJm +(tw) +[2.769603 +0 +7.192997 +0] Tj +10 TJm +(o) +[4.9813 +0] Tj +-292 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +72 213.85 Td +(three) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-232 TJm +(hundred) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-232 TJm +(k) +[4.9813 +0] Tj +-232 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-232 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-232 TJm +(size,) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-235 TJm +(a) +[4.423394 +0] Tj +-232 TJm +(f) +[3.317546 +0] Tj +10 TJm +(act) +[4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-232 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orth) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-232 TJm +(bearing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-232 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-232 TJm +(mind) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-232 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-231 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +354.025 213.85 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +386.223 213.85 Td +/F15_0 9.9626 Tf +(on) +[4.9813 +0 +4.9813 +0] Tj +-232 TJm +(small) +[3.875451 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-232 TJm +(machines.) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-304 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-232 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-232 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-231 TJm +(important) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +72 201.895 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(appreciate) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(requirement) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(choice) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(size.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 179.977 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-388 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-389 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-388 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-389 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-388 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-389 TJm +(900k) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-388 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-389 TJm +(size,) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +302.002 179.977 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +347.716 179.977 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-388 TJm +(require) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-389 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-388 TJm +(3700) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-389 TJm +(kbytes) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-388 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-389 TJm +(decompress.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +72 168.022 Td +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-424 TJm +(support) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-425 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-424 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-424 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-425 TJm +(\002l) +[5.539206 +0 +2.769603 +0] Tj +1 TJm +(e) +[4.423394 +0] Tj +-425 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-424 TJm +(a) +[4.423394 +0] Tj +-424 TJm +(4) +[4.9813 +0] Tj +-425 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(abyte) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-424 TJm +(machine,) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +348.272 168.022 Td +/F17_0 9.9626 Tf +(bunzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +394.342 168.022 Td +/F15_0 9.9626 Tf +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-424 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-425 TJm +(option) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-424 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-424 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-424 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 156.067 Td +(approximately) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-281 TJm +(half) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-281 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-280 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-281 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-281 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-288 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-281 TJm +(2300) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-281 TJm +(kbytes.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-805 TJm +(Decompression) +[7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(speed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-281 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-281 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-281 TJm +(halv) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +15 TJm +(ed,) +[4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-288 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-281 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-281 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +72 144.112 Td +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(option) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(where) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(necessary) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-620 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(rele) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(\003ag) +[5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.024 144.112 Td +/F17_0 9.9626 Tf +(-s) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +316.979 144.112 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 122.194 Td +(In) +[3.317546 +0 +4.9813 +0] Tj +-204 TJm +(general,) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-214 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-204 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-205 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-204 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-204 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(gest) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-205 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-204 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-205 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-204 TJm +(constraints) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-204 TJm +(allo) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-214 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-204 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-205 TJm +(maximises) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-204 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-204 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-205 TJm +(achie) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ed.) +[4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 110.239 Td +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(speed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(virtually) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(unaf) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +25 TJm +(fected) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(size.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 88.321 Td +(Another) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-296 TJm +(signi\002cant) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-296 TJm +(point) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-295 TJm +(applies) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-296 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-296 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-296 TJm +(\002t) +[5.539206 +0 +2.769603 +0] Tj +-296 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(a) +[4.423394 +0] Tj +-295 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-296 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-296 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-296 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-296 TJm +(means) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-296 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-295 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-296 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +50 TJm +(d) +[4.9813 +0] Tj +-296 TJm +(encounter) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-296 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-296 TJm +(a) +[4.423394 +0] Tj +72 76.366 Td +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-290 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(size.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-859 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-290 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-290 TJm +(real) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-290 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-289 TJm +(touched) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-290 TJm +(proportional) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-290 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-290 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-300 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-290 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-290 TJm +(smaller) +[3.875451 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.951 Td +(5) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 6 9 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +477.109 749.245 Td +/F15_0 9.9626 Tf +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-362 TJm +(a) +[4.423394 +0] Tj +-362 TJm +(block.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1293 TJm +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-362 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xample,) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-390 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-362 TJm +(a) +[4.423394 +0] Tj +-362 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-362 TJm +(20,000) +[4.9813 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-362 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-362 TJm +(long) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-362 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-362 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-362 TJm +(\003ag) +[5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +406.528 710.037 Td +/F17_0 9.9626 Tf +(-9) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +422.09 710.037 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-362 TJm +(cause) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-362 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-362 TJm +(compressor) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +-362 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 698.082 Td +(allocate) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-271 TJm +(around) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(7600k) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-271 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-272 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-277 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-271 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-272 TJm +(touch) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-271 TJm +(400k) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(+) +[5.618906 +0] Tj +-271 TJm +(20000) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(*) +[4.9813 +0] Tj +-271 TJm +(8) +[4.9813 +0] Tj +-272 TJm +(=) +[5.618906 +0] Tj +-271 TJm +(560) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(kbytes) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-271 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-272 TJm +(it.) +[2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-748 TJm +(Similarly) +[5.539206 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-277 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-272 TJm +(decompressor) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +72 686.127 Td +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(allocate) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(3700k) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(touch) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(100k) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(+) +[5.618906 +0] Tj +-250 TJm +(20000) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(*) +[4.9813 +0] Tj +-250 TJm +(4) +[4.9813 +0] Tj +-250 TJm +(=) +[5.618906 +0] Tj +-250 TJm +(180) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(kbytes.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 664.209 Td +(Here) +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-293 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-294 TJm +(a) +[4.423394 +0] Tj +-293 TJm +(table) +[2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-294 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-293 TJm +(summarises) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-294 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-293 TJm +(maximum) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +7.750903 +0] Tj +-294 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-293 TJm +(usage) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-293 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(ferent) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-294 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-293 TJm +(sizes.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-881 TJm +(Also) +[7.192997 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-293 TJm +(recorded) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-294 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-293 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(total) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +72 652.254 Td +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-289 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-289 TJm +(14) +[4.9813 +0 +4.9813 +0] Tj +-289 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-290 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(Calg) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +5 TJm +(ary) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-289 TJm +(T) +[6.087149 +0] Tj +70 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-289 TJm +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(Corpus) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-289 TJm +(totalling) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(3,141,622) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(bytes.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-854 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-290 TJm +(column) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0] Tj +-289 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +72 640.299 Td +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-253 TJm +(feel) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-253 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-253 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-253 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-253 TJm +(v) +[4.9813 +0] Tj +25 TJm +(aries) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-253 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-253 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-253 TJm +(size.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-638 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-253 TJm +(\002gures) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +-253 TJm +(tend) +[2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-254 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-253 TJm +(understate) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-253 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-253 TJm +(adv) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(antage) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-253 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-253 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-253 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 628.344 Td +(sizes) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(Corpus) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(dominated) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(smaller) +[3.875451 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 469.773] cm +0 0 468 155.417 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +123.952 616.822 Td +/F17_0 9.9626 Tf +(Compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1278 TJm +(Decompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1278 TJm +(Decompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1278 TJm +(Corpus) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 604.867 Td +(Flag) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(usage) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(usage) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2982 TJm +(-s) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(usage) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(Size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 580.957 Td +(-1) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(1200k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2982 TJm +(500k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3834 TJm +(350k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(914704) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 569.001 Td +(-2) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(2000k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2982 TJm +(900k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3834 TJm +(600k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(877703) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 557.046 Td +(-3) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(2800k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(1300k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3834 TJm +(850k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(860338) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 545.091 Td +(-4) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(3600k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(1700k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(1100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(846899) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 533.136 Td +(-5) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(4400k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(2100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(1350k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(845160) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 521.181 Td +(-6) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(5200k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(2500k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(1600k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(838626) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 509.225 Td +(-7) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(6100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(2900k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(1850k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(834096) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 497.27 Td +(-8) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(6800k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(3300k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(2100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(828642) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +94.244 485.315 Td +(-9) +[5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(7600k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(3700k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(2350k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2556 TJm +(828642) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 435.021 Td +/F9_0 20.6585 Tf +(2.6.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(RECO) +[14.915437 +0 +13.77922 +0 +14.915437 +0 +16.072313 +0] Tj +50 TJm +(VERING) +[13.77922 +0 +13.77922 +0 +14.915437 +0 +5.743063 +0 +14.915437 +0 +16.072313 +0] Tj +-278 TJm +(D) +[14.915437 +0] Tj +40 TJm +(A) +[14.915437 +0] Tj +90 TJm +(T) +[12.622344 +0] Tj +90 TJm +(A) +[14.915437 +0] Tj +-278 TJm +(FR) +[12.622344 +0 +14.915437 +0] Tj +20 TJm +(OM) +[16.072313 +0 +17.208531 +0] Tj +-278 TJm +(D) +[14.915437 +0] Tj +40 TJm +(AMA) +[14.915437 +0 +17.208531 +0 +14.915437 +0] Tj +50 TJm +(GED) +[16.072313 +0 +13.77922 +0 +14.915437 +0] Tj +72 410.23 Td +(FILES) +[12.622344 +0 +5.743063 +0 +12.622344 +0 +13.77922 +0 +13.77922 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 388.312 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +105.138 388.312 Td +/F15_0 9.9626 Tf +(compresses) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-326 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-326 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-326 TJm +(blocks,) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-346 TJm +(usually) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-326 TJm +(900kbytes) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-326 TJm +(long.) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1077 TJm +(Each) +[6.087149 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-326 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-326 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-327 TJm +(handled) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-326 TJm +(independently) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-1077 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-326 TJm +(a) +[4.423394 +0] Tj +-326 TJm +(media) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-326 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +72 376.357 Td +(transmission) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-319 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-318 TJm +(causes) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-319 TJm +(a) +[4.423394 +0] Tj +-318 TJm +(multi-block) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +234.519 376.357 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +261.603 376.357 Td +/F15_0 9.9626 Tf +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-319 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-318 TJm +(become) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-319 TJm +(damaged,) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-336 TJm +(i) +[2.769603 +0] Tj +1 TJm +(t) +[2.769603 +0] Tj +-319 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-319 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-318 TJm +(possible) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-319 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-318 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-319 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-319 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-318 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 364.402 Td +(undamaged) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(blocks) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002le.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 342.484 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-358 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-357 TJm +(representation) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-358 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-357 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-358 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-358 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-357 TJm +(delimited) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-358 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-357 TJm +(a) +[4.423394 +0] Tj +-358 TJm +(48-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-358 TJm +(pattern,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-384 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-358 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-357 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-358 TJm +(possible) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-357 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-358 TJm +(\002nd) +[5.539206 +0 +4.9813 +0 +4.9813 +0] Tj +-358 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 330.529 Td +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(boundaries) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-286 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-285 TJm +(reasonable) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-286 TJm +(certainty) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-835 TJm +(Each) +[6.087149 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-286 TJm +(carries) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-286 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-285 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-286 TJm +(32-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-286 TJm +(CRC,) +[6.645054 +0 +6.645054 +0 +6.645054 +0 +2.49065 +0] Tj +-286 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-285 TJm +(damaged) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(blocks) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-286 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +72 318.574 Td +(distinguished) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(undamaged) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(ones.) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 296.656 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +146.448 296.656 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-273 TJm +(a) +[4.423394 +0] Tj +-272 TJm +(simple) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-273 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-273 TJm +(whose) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-272 TJm +(purpose) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-273 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-273 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-272 TJm +(search) +[3.875451 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-273 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-273 TJm +(blocks) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-272 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +392.655 296.656 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +419.282 296.656 Td +/F15_0 9.9626 Tf +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-278 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-273 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-272 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-273 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +72 284.701 Td +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-255 TJm +(i) +[2.769603 +0] Tj +1 TJm +(ts) +[2.769603 +0 +3.875451 +0] Tj +-255 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +121.429 284.701 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +147.875 284.701 Td +/F15_0 9.9626 Tf +(\002le.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-647 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-255 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-254 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-255 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +240.01 284.701 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(-t) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +290.367 284.701 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-254 TJm +(test) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-255 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-254 TJm +(inte) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(grity) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-255 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-254 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-255 TJm +(resulting) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-254 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-256 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-255 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-254 TJm +(those) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +72 272.746 Td +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(undamaged.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 250.828 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +150.099 250.828 Td +/F15_0 9.9626 Tf +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-639 TJm +(a) +[4.423394 +0] Tj +-639 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-639 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(gument,) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-737 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-639 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-639 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-639 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-639 TJm +(damaged) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-639 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-737 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-639 TJm +(writes) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-639 TJm +(a) +[4.423394 +0] Tj +-639 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-639 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-640 TJm +(\002) +[5.539206 +0] Tj +1 TJm +(les) +[2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 238.873 Td +/F17_0 9.9626 Tf +(rec0001file.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.664 238.873 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.072 238.873 Td +/F17_0 9.9626 Tf +(rec0002file.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +258.736 238.873 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-494 TJm +(etc,) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-493 TJm +(containing) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-445 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-445 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xtracted) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-445 TJm +(blocks.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-1789 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-445 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-445 TJm +(\002lenames) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-445 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +72 226.918 Td +(designed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-337 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-337 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-337 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-337 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-337 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-337 TJm +(wildc) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +1 TJm +(ards) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-337 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-337 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-337 TJm +(processing) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-337 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-337 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-337 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xample,) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +396.538 226.918 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(-dc) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(rec) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +474.247 225.174 Td +(*) +[5.97756 +0] Tj +480.224 226.918 Td +(file.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(>) +[5.97756 +0] Tj +72 214.962 Td +(recovered_data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +158.177 214.962 Td +/F15_0 9.9626 Tf +(--) +[3.317546 +0 +3.317546 +0] Tj +-250 TJm +(lists) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(correct) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(order) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 193.045 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +145.93 193.045 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-221 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-220 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-221 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-221 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-220 TJm +(dealing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-221 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-221 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +307.229 193.045 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +333.338 193.045 Td +/F15_0 9.9626 Tf +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-227 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-220 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-221 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-221 TJm +(contain) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-220 TJm +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-221 TJm +(blocks.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-600 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-221 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-221 TJm +(clearly) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +72 181.089 Td +(futile) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-289 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-289 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-289 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-289 TJm +(damaged) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(single-block) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +1 TJm +(,) +[2.49065 +0] Tj +-299 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-289 TJm +(a) +[4.423394 +0] Tj +-290 TJm +(damaged) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-289 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-289 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ered.) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-854 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-289 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(wish) +[7.192997 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-289 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-289 TJm +(minimise) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +72 169.134 Td +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-320 TJm +(potential) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-320 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-319 TJm +(loss) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0] Tj +-320 TJm +(through) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-320 TJm +(media) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-320 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-319 TJm +(transmission) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-320 TJm +(errors,) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +-337 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-320 TJm +(might) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-320 TJm +(consider) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-320 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-319 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-320 TJm +(a) +[4.423394 +0] Tj +-320 TJm +(smaller) +[3.875451 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-320 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 157.179 Td +(size.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 122.426 Td +/F9_0 20.6585 Tf +(2.7.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(PERFORMANCE) +[13.77922 +0 +13.77922 +0 +14.915437 +0 +12.622344 +0 +16.072313 +0 +14.915437 +0 +17.208531 +0 +14.915437 +0 +14.915437 +0 +14.915437 +0 +13.77922 +0] Tj +-278 TJm +(NO) +[14.915437 +0 +16.072313 +0] Tj +40 TJm +(TES) +[12.622344 +0 +13.77922 +0 +13.77922 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 100.508 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-305 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-304 TJm +(phase) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-305 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-304 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-305 TJm +(g) +[4.9813 +0] Tj +5 TJm +(athers) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-304 TJm +(together) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-305 TJm +(similar) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-304 TJm +(strings) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-305 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-304 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-305 TJm +(\002le.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-947 TJm +(Because) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-305 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-304 TJm +(this,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-319 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-304 TJm +(containing) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-305 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +72 88.553 Td +(long) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-286 TJm +(runs) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-285 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-286 TJm +(repeated) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(symbols,) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-295 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-286 TJm +("aabaabaabaab) +[4.064741 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(...") +[2.49065 +0 +2.49065 +0 +2.49065 +0 +4.064741 +0] Tj +-571 TJm +(\(repeated) +[3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(se) +[3.875451 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(eral) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-286 TJm +(hundred) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(times\)) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0 +3.317546 +0] Tj +-286 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(com) +[4.423394 +0 +4.9813 +0 +7.750903 +0] Tj +1 TJm +(press) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-286 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-286 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wly) +[7.192997 +0 +2.769603 +0 +4.9813 +0] Tj +72 76.598 Td +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(normal.) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-524 TJm +(V) +[7.192997 +0] Tj +111 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-322 TJm +(0.9.5) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-321 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-322 TJm +(f) +[3.317546 +0] Tj +10 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-321 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(better) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-321 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(vious) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-321 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-322 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-322 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-321 TJm +(respect.) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-1050 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-321 TJm +(ratio) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-322 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.951 Td +(6) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 7 10 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +477.109 749.245 Td +/F15_0 9.9626 Tf +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(w) +[7.192997 +0] Tj +10 TJm +(orst-case) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-289 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erage-case) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-289 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-289 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-290 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(gion) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-289 TJm +(10:1.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-857 TJm +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-290 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(vious) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-289 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions,) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-299 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-290 TJm +(\002gure) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-289 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-290 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +72 698.082 Td +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(100:1.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-620 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +186.002 698.082 Td +/F17_0 9.9626 Tf +(-vvvv) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +218.38 698.082 Td +/F15_0 9.9626 Tf +(option) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(monitor) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(progress) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(great) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(detail,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant.) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 676.164 Td +(Decompression) +[7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(speed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(unaf) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +25 TJm +(fected) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(phenomena.) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 654.247 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.863 654.247 Td +/F15_0 9.9626 Tf +(usually) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-299 TJm +(allocates) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-298 TJm +(se) +[3.875451 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(eral) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-299 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(abytes) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-298 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-299 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-299 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-298 TJm +(operate) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-299 TJm +(in,) +[2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-311 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-298 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-299 TJm +(char) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ges) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-298 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-299 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-299 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-298 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-299 TJm +(a) +[4.423394 +0] Tj +-298 TJm +(f) +[3.317546 +0] Tj +10 TJm +(airly) +[4.423394 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-299 TJm +(random) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0] Tj +72 642.291 Td +(f) +[3.317546 +0] Tj +10 TJm +(ashion.) +[4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-743 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-270 TJm +(means) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-271 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-270 TJm +(performance,) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-276 TJm +(both) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-270 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-271 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-270 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-271 TJm +(decompressing,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-275 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-271 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(gely) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-270 TJm +(determined) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-271 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-270 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-271 TJm +(speed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 630.336 Td +(at) +[4.423394 +0 +2.769603 +0] Tj +-294 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-294 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-294 TJm +(machine) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-295 TJm +(ca) +[4.423394 +0 +4.423394 +0] Tj +1 TJm +(n) +[4.9813 +0] Tj +-295 TJm +(service) +[3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-294 TJm +(cache) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(misses.) +[7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-442 TJm +(Because) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-294 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-294 TJm +(this,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-306 TJm +(small) +[3.875451 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-294 TJm +(changes) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-294 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-294 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-294 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-294 TJm +(reduce) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-294 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-295 TJm +(miss) +[7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0] Tj +-294 TJm +(rate) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +72 618.381 Td +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-253 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-253 TJm +(observ) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +-253 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-253 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-253 TJm +(disproportionately) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-253 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-253 TJm +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-253 TJm +(impro) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ements.) +[4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-639 TJm +(I) +[3.317546 +0] Tj +-253 TJm +(imagine) +[2.769603 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +438.909 618.381 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +471.318 618.381 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-253 TJm +(perform) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +-253 TJm +(best) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +72 606.426 Td +(on) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(machines) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(caches.) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 571.673 Td +/F9_0 20.6585 Tf +(2.8.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(CA) +[14.915437 +0 +14.915437 +0] Tj +80 TJm +(VEA) +[13.77922 +0 +13.77922 +0 +14.915437 +0] Tj +90 TJm +(TS) +[12.622344 +0 +13.77922 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 549.755 Td +/F15_0 9.9626 Tf +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-268 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-267 TJm +(messages) +[7.750903 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-268 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-268 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-268 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-267 TJm +(helpful) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-268 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-268 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-267 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-268 TJm +(be.) +[4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +293.313 549.755 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +325.868 549.755 Td +/F15_0 9.9626 Tf +(tries) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-268 TJm +(hard) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-267 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-268 TJm +(detect) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-268 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-268 TJm +(errors) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-267 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xit) +[4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-268 TJm +(cleanly) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-272 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-268 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 537.8 Td +(details) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(problem) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(sometimes) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(seem) +[3.875451 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(rather) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(misleading.) +[7.750903 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 515.882 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-280 TJm +(manual) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-279 TJm +(page) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-280 TJm +(pertains) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-280 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-279 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(1.0.8) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-280 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +256.84 515.882 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +286.728 515.882 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-798 TJm +(Compressed) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-280 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-279 TJm +(created) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-280 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-280 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-279 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-280 TJm +(entirely) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-279 TJm +(forw) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.192997 +0] Tj +10 TJm +(ards) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +72 503.927 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-294 TJm +(backw) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.192997 +0] Tj +10 TJm +(ards) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-293 TJm +(compatible) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-294 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-294 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-293 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(vious) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-294 TJm +(public) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-294 TJm +(releases,) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-304 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-294 TJm +(0.1pl2,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-305 TJm +(0.9.0) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-293 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-294 TJm +(0.9.5,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-305 TJm +(1.0.0,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-304 TJm +(1.0.1,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-305 TJm +(1.0.2) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-294 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 491.972 Td +(1.0.3,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-263 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-260 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-260 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-260 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-260 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xception:) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-330 TJm +(0.9.0) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-260 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-260 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-260 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-260 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-260 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-260 TJm +(multiple) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-260 TJm +(concatenated) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-260 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +72 480.017 Td +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-310 TJm +(0.1pl2) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(this;) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(stop) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(decompressing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 458.099 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +146.174 458.099 Td +/F15_0 9.9626 Tf +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-245 TJm +(prior) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-245 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-245 TJm +(1.0.2) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-246 TJm +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-245 TJm +(32-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-245 TJm +(inte) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(gers) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-245 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-245 TJm +(represent) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-245 TJm +(bit) +[4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-246 TJm +(positions) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-245 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-245 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-245 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-246 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-245 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-245 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +72 446.144 Td +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-384 TJm +(handle) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-383 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-384 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-383 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-384 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-383 TJm +(512) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-384 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(abytes) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-383 TJm +(long.) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1421 TJm +(V) +[7.192997 +0] Tj +111 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-384 TJm +(1.0.2) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-383 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-384 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-384 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-383 TJm +(64-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-384 TJm +(ints) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-383 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-384 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +72 434.189 Td +(platforms) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0] Tj +-245 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-246 TJm +(support) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-245 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-246 TJm +(\(GNU) +[3.317546 +0 +7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +-245 TJm +(supported) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-245 TJm +(tar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(gets,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-247 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-245 TJm +(W) +[9.404694 +0] Tj +40 TJm +(indo) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws\).) +[7.192997 +0 +3.875451 +0 +3.317546 +0 +2.49065 +0] Tj +-309 TJm +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-245 TJm +(establish) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-245 TJm +(whether) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-246 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-245 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +468.269 434.189 Td +/F17_0 9.9626 Tf +(bzip2recover) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 422.233 Td +/F15_0 9.9626 Tf +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-255 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uilt) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-255 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-255 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-255 TJm +(a) +[4.423394 +0] Tj +-255 TJm +(limitation,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-256 TJm +(run) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +-255 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-255 TJm +(without) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-255 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(guments.) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-325 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-255 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-256 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ent) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-255 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-255 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-255 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uild) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-255 TJm +(yourself) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-255 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-255 TJm +(unlimited) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-255 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-255 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +72 410.278 Td +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(recompile) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.318 410.278 Td +/F17_0 9.9626 Tf +(MaybeUInt64) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +244.562 410.278 Td +/F15_0 9.9626 Tf +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(unsigned) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(64-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(inte) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 375.525 Td +/F9_0 20.6585 Tf +(2.9.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(A) +[14.915437 +0] Tj +50 TJm +(UTHOR) +[14.915437 +0 +12.622344 +0 +14.915437 +0 +16.072313 +0 +14.915437 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 353.607 Td +/F15_0 9.9626 Tf +(Julian) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(Se) +[5.539206 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ard,) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +132.801 353.607 Td +/F17_0 9.9626 Tf +(jseward@acm.org) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 331.69 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-299 TJm +(ideas) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-300 TJm +(embodied) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-299 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +166.942 331.69 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +199.813 331.69 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-299 TJm +(du) +[4.9813 +0 +4.9813 +0] Tj +-1 TJm +(e) +[4.423394 +0] Tj +-299 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-299 TJm +(\(at) +[3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-300 TJm +(least\)) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0] Tj +-299 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-300 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-299 TJm +(people:) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-409 TJm +(Michael) +[8.856751 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-300 TJm +(Burro) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-299 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-300 TJm +(Da) +[7.192997 +0 +4.423394 +0] Tj +20 TJm +(vid) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-299 TJm +(Wheeler) +[9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-299 TJm +(\(for) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +72 319.735 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-312 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-313 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-312 TJm +(transformation\),) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +-328 TJm +(Da) +[7.192997 +0 +4.423394 +0] Tj +20 TJm +(vid) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-312 TJm +(Wheeler) +[9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-313 TJm +(\(ag) +[3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +5 TJm +(ain,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-327 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-313 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-312 TJm +(Huf) +[7.192997 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fman) +[3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-312 TJm +(coder\),) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +2.49065 +0] Tj +-328 TJm +(Peter) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-313 TJm +(Fenwick) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +7.192997 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-312 TJm +(\(for) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-312 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-313 TJm +(structured) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +72 307.779 Td +(coding) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-325 TJm +(model) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-326 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-325 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-326 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +191.156 307.779 Td +/F17_0 9.9626 Tf +(bzip) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +215.067 307.779 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-344 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-326 TJm +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-325 TJm +(re\002nements\),) +[3.317546 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +3.317546 +0 +2.49065 +0] Tj +-345 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-325 TJm +(Alistair) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-326 TJm +(Mof) +[8.856751 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(f) +[3.317546 +0] Tj +10 TJm +(at,) +[4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-344 TJm +(Radford) +[6.645054 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-325 TJm +(Neal) +[7.192997 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-326 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-325 TJm +(Ian) +[3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-326 TJm +(W) +[9.404694 +0] Tj +40 TJm +(itten) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-325 TJm +(\(for) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +72 295.824 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-277 TJm +(arithmetic) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-277 TJm +(coder) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-277 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-277 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-277 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +214.171 295.824 Td +/F17_0 9.9626 Tf +(bzip) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +238.082 295.824 Td +/F15_0 9.9626 Tf +(\).) +[3.317546 +0 +2.49065 +0] Tj +-782 TJm +(I) +[3.317546 +0] Tj +-277 TJm +(am) +[4.423394 +0 +7.750903 +0] Tj +-276 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-277 TJm +(indebted) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-277 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-277 TJm +(their) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-277 TJm +(help,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-284 TJm +(support) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-277 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-277 TJm +(advice.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-781 TJm +(See) +[5.539206 +0 +4.423394 +0 +4.423394 +0] Tj +-277 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-277 TJm +(manual) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +72 283.869 Td +(in) +[2.769603 +0 +4.9813 +0] Tj +-330 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-330 TJm +(source) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-330 TJm +(distrib) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(ution) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-330 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-329 TJm +(pointers) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-330 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-330 TJm +(sources) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-330 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-330 TJm +(documentation.) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1099 TJm +(Christian) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-330 TJm +(v) +[4.9813 +0] Tj +20 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-330 TJm +(Roques) +[6.645054 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-330 TJm +(encouraged) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-330 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +-330 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-330 TJm +(look) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +72 271.914 Td +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-271 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aster) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-271 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-271 TJm +(algorithms,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-276 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-272 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-271 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-271 TJm +(speed) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-271 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-271 TJm +(compression.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-746 TJm +(Bela) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-271 TJm +(Lubkin) +[6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-271 TJm +(encouraged) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-271 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +-272 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-271 TJm +(impro) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-271 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-271 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orst-case) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +72 259.959 Td +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-340 TJm +(performance.) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-580 TJm +(Donna) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-339 TJm +(Robinson) +[6.645054 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0] Tj +-340 TJm +(XMLised) +[7.192997 +0 +8.856751 +0 +6.087149 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-340 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-340 TJm +(documentation.) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-580 TJm +(Man) +[8.856751 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-340 TJm +(people) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-340 TJm +(sent) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-339 TJm +(patches,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-363 TJm +(helped) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-340 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +72 248.003 Td +(portability) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(problems,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(lent) +[2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(machines,) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(g) +[4.9813 +0] Tj +5 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(advice) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(were) +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(generally) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(helpful.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +539.395 50.951 Td +(7) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 8 11 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 75.786 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 701.916 Td +/F9_0 24.7902 Tf +(3.) +[13.783351 +0 +6.891676 +0] Tj +-556 TJm +(Pr) +[16.535063 +0 +9.643388 +0] Tj +20 TJm +(ogramming) +[15.146812 +0 +15.146812 +0 +9.643388 +0 +13.783351 +0 +22.038488 +0 +22.038488 +0 +6.891676 +0 +15.146812 +0 +15.146812 +0] Tj +-278 TJm +(with) +[19.286776 +0 +6.891676 +0 +8.255137 +0 +15.146812 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +330.484 701.916 Td +/F335_0 24.7902 Tf +(libbzip2) +[14.87412 +0 +14.87412 +0 +14.87412 +0 +14.87412 +0 +14.87412 +0 +14.87412 +0 +14.87412 +0 +14.87412 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 656.35 Td +/F9_0 17.2154 Tf +(T) +[10.518609 +0] Tj +80 TJm +(ab) +[9.571762 +0 +10.518609 +0] Tj +10 TJm +(le) +[4.785881 +0 +9.571762 +0] Tj +-278 TJm +(of) +[10.518609 +0 +5.732728 +0] Tj +-278 TJm +(Contents) +[12.429519 +0 +10.518609 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 635.788 Td +/F15_0 9.9626 Tf +(3.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(T) +[6.087149 +0] Tj +80 TJm +(op-le) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(structure) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.538 635.788 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 635.788 Td +/F15_0 9.9626 Tf +(8) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 623.832 Td +(3.1.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Lo) +[6.087149 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(summary) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.406 623.832 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 623.832 Td +/F15_0 9.9626 Tf +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 611.877 Td +(3.1.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(High-le) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(summary) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +190.363 611.877 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 611.877 Td +/F15_0 9.9626 Tf +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 599.922 Td +(3.1.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Utility) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(summary) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +215.337 599.922 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.108 599.922 Td +/F15_0 9.9626 Tf +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 587.967 Td +(3.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Error) +[6.087149 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.366 587.967 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 587.967 Td +/F15_0 9.9626 Tf +(10) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 576.012 Td +(3.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Lo) +[6.087149 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +179.8 576.012 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 576.012 Td +/F15_0 9.9626 Tf +(11) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 564.057 Td +(3.3.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzCompressInit) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +194.302 564.057 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 564.057 Td +/F15_0 9.9626 Tf +(11) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 552.101 Td +(3.3.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzCompress) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.742 552.101 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 552.101 Td +/F15_0 9.9626 Tf +(13) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 540.146 Td +(3.3.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzCompressEnd) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +197.622 540.146 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 540.146 Td +/F15_0 9.9626 Tf +(16) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 528.191 Td +(3.3.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzDecompressInit) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +205.641 528.191 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 528.191 Td +/F15_0 9.9626 Tf +(16) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 516.236 Td +(3.3.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzDecompress) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.867 516.236 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 516.236 Td +/F15_0 9.9626 Tf +(17) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 504.281 Td +(3.3.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzDecompressEnd) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +206.747 504.281 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 504.281 Td +/F15_0 9.9626 Tf +(18) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 492.325 Td +(3.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(High-le) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.757 492.325 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 492.325 Td +/F15_0 9.9626 Tf +(18) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 480.37 Td +(3.4.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzReadOpen) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +184.057 480.37 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 480.37 Td +/F15_0 9.9626 Tf +(19) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 468.415 Td +(3.4.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzRead) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.198 468.415 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 468.415 Td +/F15_0 9.9626 Tf +(20) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 456.46 Td +(3.4.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzReadGetUnused) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.192997 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +206.747 456.46 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 456.46 Td +/F15_0 9.9626 Tf +(21) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 444.505 Td +(3.4.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzReadClose) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +6.645054 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +184.614 444.505 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 444.505 Td +/F15_0 9.9626 Tf +(22) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 432.55 Td +(3.4.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzWriteOpen) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +9.404694 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +185.162 432.55 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 432.55 Td +/F15_0 9.9626 Tf +(22) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 420.594 Td +(3.4.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzWrite) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +9.404694 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +163.303 420.594 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 420.594 Td +/F15_0 9.9626 Tf +(23) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 408.639 Td +(3.4.7.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzWriteClose) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +9.404694 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +6.645054 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +187.934 408.639 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 408.639 Td +/F15_0 9.9626 Tf +(23) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 396.684 Td +(3.4.8.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Handling) +[7.192997 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(embedded) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(streams) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +291.142 396.684 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 396.684 Td +/F15_0 9.9626 Tf +(24) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 384.729 Td +(3.4.9.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Standard) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(\002le-reading/writing) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +246.318 384.729 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 384.729 Td +/F15_0 9.9626 Tf +(25) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 372.774 Td +(3.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Utility) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +167.186 372.774 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 372.774 Td +/F15_0 9.9626 Tf +(26) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 360.819 Td +(3.5.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzBuf) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fT) +[3.317546 +0 +6.087149 +0] Tj +80 TJm +(oBuf) +[4.9813 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fCompress) +[3.317546 +0 +6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +228.243 360.819 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 360.819 Td +/F15_0 9.9626 Tf +(26) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 348.863 Td +(3.5.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(BZ2_bzBuf) +[6.645054 +0 +6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fT) +[3.317546 +0 +6.087149 +0] Tj +80 TJm +(oBuf) +[4.9813 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(fDecompress) +[3.317546 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +237.368 348.863 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 348.863 Td +/F15_0 9.9626 Tf +(27) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 336.908 Td +(3.6.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(zlib) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(compatibility) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +211.601 336.908 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 336.908 Td +/F15_0 9.9626 Tf +(28) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 324.953 Td +(3.7.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Using) +[7.192997 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(stdio-free) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +40 TJm +(vironment) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +278.633 324.953 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 324.953 Td +/F15_0 9.9626 Tf +(28) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 312.998 Td +(3.7.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Getting) +[7.192997 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(rid) +[3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(stdio) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +185.033 312.998 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 312.998 Td +/F15_0 9.9626 Tf +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 301.043 Td +(3.7.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Critical) +[6.645054 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +198.17 301.043 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 301.043 Td +/F15_0 9.9626 Tf +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 289.088 Td +(3.8.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Making) +[8.856751 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(W) +[9.404694 +0] Tj +40 TJm +(indo) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-250 TJm +(DLL) +[7.192997 +0 +6.087149 +0 +6.087149 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +201.998 289.088 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 289.088 Td +/F15_0 9.9626 Tf +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 257.207 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(chapter) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(describes) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(programming) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +282.448 257.207 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +330.269 257.207 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 235.289 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-273 TJm +(general) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-272 TJm +(background) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(information,) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-278 TJm +(particularly) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-273 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-273 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-272 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-273 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-272 TJm +(aspects,) +[4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-279 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +50 TJm +(d) +[4.9813 +0] Tj +-272 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-273 TJm +(well) +[7.192997 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-273 TJm +(advised) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +72 223.334 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +([2]) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(well.) +[7.192997 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 188.581 Td +/F9_0 20.6585 Tf +(3.1.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(T) +[12.622344 +0] Tj +80 TJm +(op-le) +[12.622344 +0 +12.622344 +0 +6.879281 +0 +5.743063 +0 +11.486126 +0] Tj +15 TJm +(vel) +[11.486126 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(structure) +[11.486126 +0 +6.879281 +0 +8.036157 +0 +12.622344 +0 +11.486126 +0 +6.879281 +0 +12.622344 +0 +8.036157 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 166.663 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +123.608 166.663 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-380 TJm +(a) +[4.423394 +0] Tj +-380 TJm +(\003e) +[5.539206 +0 +4.423394 +0] Tj +15 TJm +(xible) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-381 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-380 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-380 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-380 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-380 TJm +(decompressing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-380 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-381 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +405.291 166.663 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +438.966 166.663 Td +/F15_0 9.9626 Tf +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-380 TJm +(format.) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-1401 TJm +(Although) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +72 154.708 Td +(packaged) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-284 TJm +(a) +[4.423394 +0] Tj +-285 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-285 TJm +(entity) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-293 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-285 TJm +(helps) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-285 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-284 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(ard) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-285 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-285 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-284 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-285 TJm +(three) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-285 TJm +(separate) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-284 TJm +(parts:) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-285 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-284 TJm +(le) +[2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-285 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace,) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-293 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-285 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-285 TJm +(high) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 142.753 Td +(le) +[2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace,) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(utility) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(functions.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 120.835 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-349 TJm +(structure) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-349 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +141.082 120.835 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +188.903 120.835 Td +/F15_0 9.9626 Tf +(') +[3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-349 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(aces) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-349 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-349 TJm +(similar) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-349 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-349 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-349 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-349 TJm +(Jean-loup) +[3.875451 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-349 TJm +(Gailly') +[7.192997 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-349 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-349 TJm +(Mark) +[8.856751 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-349 TJm +(Adler') +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-349 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xcellent) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +516.09 120.835 Td +/F17_0 9.9626 Tf +(zlib) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 108.88 Td +/F15_0 9.9626 Tf +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 86.962 Td +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-242 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xternally) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-242 TJm +(visible) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-241 TJm +(symbols) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-242 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-242 TJm +(names) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-242 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(ginning) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +284.687 86.962 Td +/F17_0 9.9626 Tf +(BZ2_) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +308.597 86.962 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-615 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-241 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-242 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-242 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-242 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-242 TJm +(1.0.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-614 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(intention) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-242 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-241 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-242 TJm +(minimise) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +72 75.007 Td +(pollution) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(namespaces) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(clients.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +541.288 50.951 Td +(8) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 9 12 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +420.96 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +498.449 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 75.786 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +240.567 710.037 Td +/F17_0 9.9626 Tf +(#include) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +350.654 710.037 Td +/F15_0 9.9626 Tf +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(sources.) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 679.416 Td +/F9_0 17.2154 Tf +(3.1.1.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(Lo) +[10.518609 +0 +10.518609 +0] Tj +15 TJm +(w-le) +[13.393581 +0 +5.732728 +0 +4.785881 +0 +9.571762 +0] Tj +15 TJm +(vel) +[9.571762 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(summar) +[9.571762 +0 +10.518609 +0 +15.304491 +0 +15.304491 +0 +9.571762 +0 +6.696791 +0] Tj +-10 TJm +(y) +[9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 657.498 Td +/F15_0 9.9626 Tf +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-212 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-212 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vides) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-212 TJm +(services) +[3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-212 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-212 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-212 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-212 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +1 TJm +(ing) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-212 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-212 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-212 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-595 TJm +(There') +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-212 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-212 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vision) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-212 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-212 TJm +(dealing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 645.543 Td +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-213 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-220 TJm +(streams) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-213 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-213 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-213 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-213 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-213 TJm +(mechanisms,) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-221 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-213 TJm +(straight) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-213 TJm +(memory-to-memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-213 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-595 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-213 TJm +(f) +[3.317546 +0] Tj +10 TJm +(act,) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-221 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-213 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-213 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-213 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-213 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +72 633.588 Td +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compiled) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(without) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(inclusion) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +222.534 633.588 Td +/F17_0 9.9626 Tf +(stdio.h) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +264.377 633.588 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(helpful) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(embedded) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(applications.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 611.67 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(global) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ariables) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(therefore) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(thread-safe.) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 589.752 Td +(Six) +[5.539206 +0 +2.769603 +0 +4.9813 +0] Tj +-875 TJm +(routines) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-876 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-875 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-876 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-875 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-876 TJm +(le) +[2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-875 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace:) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +308.791 589.752 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +416.387 589.752 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +429.158 589.752 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +512.844 589.752 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-1032 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 577.797 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +186.15 577.797 Td +/F15_0 9.9626 Tf +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-1258 TJm +(compression,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1510 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-1257 TJm +(a) +[4.423394 +0] Tj +-1258 TJm +(corresponding) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-1258 TJm +(trio) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +417.958 577.797 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 577.797 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 565.842 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +172.707 565.842 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +192.158 565.842 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +310.798 565.842 Td +/F15_0 9.9626 Tf +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-508 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-2171 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +431.918 564.099 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +437.895 565.842 Td +(Init) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +466.871 565.842 Td +/F15_0 9.9626 Tf +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-508 TJm +(allocate) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +72 553.887 Td +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-574 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-573 TJm +(compression/decompression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-574 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-574 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-573 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-574 TJm +(initialisations,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-654 TJm +(whilst) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-574 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +419.503 552.143 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +425.48 553.887 Td +(End) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +449.128 553.887 Td +/F15_0 9.9626 Tf +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-574 TJm +(close) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-573 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +72 541.932 Td +(operations) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(release) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 520.014 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-303 TJm +(real) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-303 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-303 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-303 TJm +(done) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-303 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.892 520.014 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +263.598 520.014 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +281.003 520.014 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +376.645 520.014 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-939 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-303 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-303 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-303 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-303 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +72 508.059 Td +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-205 TJm +(a) +[4.423394 +0] Tj +-205 TJm +(user) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-supplied) +[3.317546 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-205 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-206 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-205 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-205 TJm +(a) +[4.423394 +0] Tj +-205 TJm +(user) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-supplied) +[3.317546 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-205 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-205 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-591 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-205 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fers) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-205 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-205 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-205 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-205 TJm +(size;) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-220 TJm +(arbitrary) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-206 TJm +(quantities) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-205 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +72 496.104 Td +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-258 TJm +(handled) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-258 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-257 TJm +(making) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(repeated) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-258 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-258 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-258 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-258 TJm +(functions.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-667 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-258 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-258 TJm +(a) +[4.423394 +0] Tj +-257 TJm +(\003e) +[5.539206 +0 +4.423394 +0] Tj +15 TJm +(xible) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-258 TJm +(allo) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(a) +[4.423394 +0] Tj +-258 TJm +(consumer) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-pull) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +72 484.148 Td +(style) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(acti) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(vity) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(producer) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-push,) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(mixture) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(both.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 453.527 Td +/F9_0 17.2154 Tf +(3.1.2.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(High-le) +[12.429519 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0 +5.732728 +0 +4.785881 +0 +9.571762 +0] Tj +15 TJm +(vel) +[9.571762 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(summar) +[9.571762 +0 +10.518609 +0 +15.304491 +0 +15.304491 +0 +9.571762 +0 +6.696791 +0] Tj +-10 TJm +(y) +[9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 431.609 Td +/F15_0 9.9626 Tf +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-284 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-284 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vides) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-285 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-284 TJm +(handy) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-284 TJm +(wrappers) +[7.192997 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-284 TJm +(around) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-284 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-284 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-285 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-284 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-284 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acilitate) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-284 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-284 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-285 TJm +(writ) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(ing) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +510.112 431.609 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 419.654 Td +/F15_0 9.9626 Tf +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-347 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-346 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +125.391 419.654 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +152.754 419.654 Td +/F15_0 9.9626 Tf +(\002les\).) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.317546 +0 +2.49065 +0] Tj +-1200 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-346 TJm +(routines) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-347 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vide) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-346 TJm +(hooks) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-347 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-346 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acilitate) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-347 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-347 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-346 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-347 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-346 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +460.049 419.654 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +493.39 419.654 Td +/F15_0 9.9626 Tf +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-347 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +72 407.699 Td +(is) +[2.769603 +0 +3.875451 +0] Tj +-339 TJm +(embedded) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-339 TJm +(within) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-339 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-339 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-scale) +[3.317546 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-339 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-339 TJm +(structure,) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-361 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-340 TJm +(wher) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +1 TJm +(e) +[4.423394 +0] Tj +-340 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-339 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-339 TJm +(multiple) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +400.941 407.699 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +434.207 407.699 Td +/F15_0 9.9626 Tf +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-339 TJm +(streams) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-339 TJm +(concatenated) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +72 395.744 Td +(end-to-end.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 373.826 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-332 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-333 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +144.803 373.826 Td +/F17_0 9.9626 Tf +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +228.489 373.826 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +234.496 373.826 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +294.272 373.826 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +300.279 373.826 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +393.253 373.826 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +410.951 373.826 Td +/F17_0 9.9626 Tf +(BZ2_bzReadGetUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +527.836 373.826 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +72 361.871 Td +(supplied.) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-620 TJm +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(writing) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +183.471 361.871 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +273.135 361.871 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +278.116 361.871 Td +/F17_0 9.9626 Tf +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +346.36 361.871 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.237 361.871 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteFinish) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +467.346 361.871 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 339.953 Td +(As) +[7.192997 +0 +3.875451 +0] Tj +-374 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-374 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-375 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-374 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-405 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-374 TJm +(global) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-374 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ariables) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-375 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-374 TJm +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-374 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-374 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-374 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-375 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-374 TJm +(per) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-374 TJm +(se) +[3.875451 +0 +4.423394 +0] Tj +-374 TJm +(thread-safe.) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-1365 TJm +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(we) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-406 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-374 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +72 327.998 Td +(errors) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-267 TJm +(occur) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +-267 TJm +(whilst) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-267 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-267 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-267 TJm +(writing) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-267 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-268 TJm +(underlying) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-267 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-267 TJm +(\002les,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-271 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-267 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-267 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-267 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-267 TJm +(consult) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +457.199 327.998 Td +/F17_0 9.9626 Tf +(errno) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +489.748 327.998 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-267 TJm +(determine) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 316.043 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-366 TJm +(cause) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-365 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-366 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-365 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-1314 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-366 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-365 TJm +(case,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-395 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +50 TJm +(d) +[4.9813 +0] Tj +-366 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-365 TJm +(a) +[4.423394 +0] Tj +-366 TJm +(C) +[6.645054 +0] Tj +-365 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-366 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-366 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-365 TJm +(supports) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +431.668 316.043 Td +/F17_0 9.9626 Tf +(errno) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +465.199 316.043 Td +/F15_0 9.9626 Tf +(in) +[2.769603 +0 +4.9813 +0] Tj +-366 TJm +(a) +[4.423394 +0] Tj +-365 TJm +(multithreaded) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 304.088 Td +(en) +[4.423394 +0 +4.9813 +0] Tj +40 TJm +(vironment.) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 282.17 Td +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-243 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-243 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-243 TJm +(a) +[4.423394 +0] Tj +-243 TJm +(little) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-242 TJm +(simpler) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-243 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-243 TJm +(portable,) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +289.263 282.17 Td +/F17_0 9.9626 Tf +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +375.368 282.17 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +392.172 282.17 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +484.254 282.17 Td +/F15_0 9.9626 Tf +(require) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-243 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 270.215 Td +(pass) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-247 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-248 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-247 TJm +(handles) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-247 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +165.421 270.215 Td +/F17_0 9.9626 Tf +(FILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +189.331 268.471 Td +(*) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +195.309 270.215 Td +/F15_0 9.9626 Tf +(s\)) +[3.875451 +0 +3.317546 +0] Tj +-247 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-248 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-247 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(viously) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +-247 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-248 TJm +(opened) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-247 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-247 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-247 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-248 TJm +(writing) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-247 TJm +(respecti) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ely) +[4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-618 TJm +(That) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-248 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +20 TJm +(oids) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +72 258.259 Td +(portability) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-272 TJm +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-273 TJm +(associated) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-272 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-272 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-273 TJm +(operations) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-272 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-273 TJm +(attrib) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(utes,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-278 TJm +(whilst) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-272 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-272 TJm +(being) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-272 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-273 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-272 TJm +(imposition) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-273 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 246.304 Td +(programmer) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 215.683 Td +/F9_0 17.2154 Tf +(3.1.3.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(Utility) +[12.429519 +0 +5.732728 +0 +4.785881 +0 +4.785881 +0 +4.785881 +0 +5.732728 +0 +9.571762 +0] Tj +-278 TJm +(functions) +[5.732728 +0 +10.518609 +0 +10.518609 +0 +9.571762 +0 +5.732728 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0 +9.571762 +0] Tj +-278 TJm +(summar) +[9.571762 +0 +10.518609 +0 +15.304491 +0 +15.304491 +0 +9.571762 +0 +6.696791 +0] Tj +-10 TJm +(y) +[9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 193.765 Td +/F15_0 9.9626 Tf +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-273 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-273 TJm +(simple) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-273 TJm +(needs,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +165.929 193.765 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +312.112 193.765 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +329.219 193.765 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +487.357 193.765 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-273 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vided.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 181.81 Td +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-374 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-373 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-374 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-373 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-374 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-373 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-374 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-373 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-374 TJm +(another) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-374 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-373 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-374 TJm +(a) +[4.423394 +0] Tj +-373 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-374 TJm +(function) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-373 TJm +(call.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-1362 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-373 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-374 TJm +(assess) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +72 169.855 Td +(whether) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-344 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-343 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-344 TJm +(ful\002ll) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +2.769603 +0 +2.769603 +0] Tj +-344 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-343 TJm +(memory-to-memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-344 TJm +(compression/decompression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-343 TJm +(requirements) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-344 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-344 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(esting) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 157.9 Td +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(fort) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(understanding) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(general) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(comple) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(x) +[4.9813 +0] Tj +-250 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace.) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 135.982 Td +(Y) +[7.192997 +0] Tj +110 TJm +(oshioka) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-423 TJm +(Tsuneo) +[6.087149 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-422 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +150.161 135.982 Td +/F17_0 9.9626 Tf +(tsuneo@rr.iij4u.or.jp) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +275.69 135.982 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-423 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-422 TJm +(contrib) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(uted) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-423 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-423 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-422 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-423 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-423 TJm +(better) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +476.462 135.982 Td +/F17_0 9.9626 Tf +(zlib) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +504.583 135.982 Td +/F15_0 9.9626 Tf +(compati-) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +72 124.027 Td +(bility) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-1446 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-388 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-387 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +193.914 124.027 Td +/F17_0 9.9626 Tf +(BZ2_bzopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +253.689 124.027 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +260.385 124.027 Td +/F17_0 9.9626 Tf +(BZ2_bzread) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +320.161 124.027 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +326.857 124.027 Td +/F17_0 9.9626 Tf +(BZ2_bzwrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +392.611 124.027 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +399.307 124.027 Td +/F17_0 9.9626 Tf +(BZ2_bzflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +465.06 124.027 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +471.756 124.027 Td +/F17_0 9.9626 Tf +(BZ2_bzclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 124.027 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 112.072 Td +/F17_0 9.9626 Tf +(BZ2_bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +140.408 112.072 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +157.449 112.072 Td +/F17_0 9.9626 Tf +(BZ2_bzlibVersion) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +253.091 112.072 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-719 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-266 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-267 TJm +(\002nd) +[5.539206 +0 +4.9813 +0 +4.9813 +0] Tj +-266 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-267 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-266 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-267 TJm +(con) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(enient) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-266 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-267 TJm +(simple) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-266 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-267 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 100.116 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-270 TJm +(writ) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(ing,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-275 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-269 TJm +(those) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-270 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-269 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-270 TJm +(high-le) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-269 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace.) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-737 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-270 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-269 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-270 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-269 TJm +(\(yet\)) +[3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-270 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(\002cially) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-269 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-270 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-269 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-270 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-274 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-270 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +72 88.161 Td +(minimally) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-291 TJm +(documented) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-291 TJm +(here.) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-867 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-291 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-291 TJm +(break,) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-301 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-291 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-292 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-291 TJm +(k) +[4.9813 +0] Tj +10 TJm +(eep) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-291 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-291 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-291 TJm +(pieces.) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-433 TJm +(I) +[3.317546 +0] Tj +-291 TJm +(hope) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-291 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-291 TJm +(document) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-292 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-291 TJm +(properly) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-291 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 76.206 Td +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(permits.) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +541.288 51.071 Td +(9) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 10 13 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(Y) +[7.192997 +0] Tj +110 TJm +(oshioka) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-250 TJm +(contrib) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(uted) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(modi\002cations) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(allo) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uilt) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(W) +[9.404694 +0] Tj +40 TJm +(indo) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-250 TJm +(DLL.) +[7.192997 +0 +6.087149 +0 +6.087149 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 675.504 Td +/F9_0 20.6585 Tf +(3.2.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Err) +[13.77922 +0 +8.036157 +0 +8.036157 +0] Tj +20 TJm +(or) +[12.622344 +0 +8.036157 +0] Tj +-278 TJm +(handling) +[12.622344 +0 +11.486126 +0 +12.622344 +0 +12.622344 +0 +5.743063 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 653.805 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-214 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-215 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-214 TJm +(designed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-215 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-214 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-215 TJm +(cleanly) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-214 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-215 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-214 TJm +(situations,) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-222 TJm +(including) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-214 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-215 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orst-case) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-214 TJm +(situation) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-215 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-214 TJm +(decompressing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-215 TJm +(random) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0] Tj +72 641.85 Td +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-764 TJm +(I'm) +[3.317546 +0 +3.317546 +0 +7.750903 +0] Tj +-274 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-275 TJm +(100%) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +8.298846 +0] Tj +-274 TJm +(sure) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-274 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-274 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-274 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-274 TJm +(al) +[4.423394 +0 +2.769603 +0] Tj +10 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ays) +[4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-274 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-274 TJm +(this,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-280 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-274 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(might) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-274 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-274 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-274 TJm +(add) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(a) +[4.423394 +0] Tj +-275 TJm +(s) +[3.875451 +0] Tj +1 TJm +(ignal) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-275 TJm +(handler) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-274 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-274 TJm +(catch) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-274 TJm +(se) +[3.875451 +0 +4.423394 +0] Tj +15 TJm +(gmentation) +[4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 629.895 Td +(violations) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-273 TJm +(during) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-273 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-273 TJm +(feeling) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(especiall) +[4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(y) +[4.9813 +0] Tj +-274 TJm +(paranoid.) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-758 TJm +(I) +[3.317546 +0] Tj +-273 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-273 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-273 TJm +(interested) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-273 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-274 TJm +(hearing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-273 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-273 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +72 617.939 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(rob) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +20 TJm +(ustness) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(corrupted) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 596.241 Td +(V) +[7.192997 +0] Tj +111 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(1.0.3) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-251 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-251 TJm +(rob) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +20 TJm +(ust) +[4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-251 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-251 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-251 TJm +(respect) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-252 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-251 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-251 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(vious) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-251 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion.) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-626 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(estig) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +5 TJm +(ations) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-251 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-251 TJm +(V) +[7.192997 +0] Tj +111 TJm +(algrind) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(\(a) +[3.317546 +0 +4.423394 +0] Tj +-252 TJm +(tool) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-251 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-251 TJm +(detecting) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 584.285 Td +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-422 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-421 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-422 TJm +(management\)) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +-421 TJm +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-422 TJm +(that,) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-464 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-422 TJm +(least) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-421 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-422 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-422 TJm +(f) +[3.317546 +0] Tj +1 TJm +(e) +[4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-422 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-422 TJm +(I) +[3.317546 +0] Tj +-421 TJm +(tested,) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-464 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-422 TJm +(single-bit) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-422 TJm +(errors) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-421 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-422 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 572.33 Td +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-342 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-341 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-342 TJm +(caught) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-342 TJm +(properly) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-365 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-341 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-342 TJm +(se) +[3.875451 +0 +4.423394 +0] Tj +15 TJm +(gmentation) +[4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-342 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aults,) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-365 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-341 TJm +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-342 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-342 TJm +(uninitialised) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-342 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-364 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-342 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-342 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-342 TJm +(range) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +72 560.375 Td +(reads) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-261 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-260 TJm +(writes,) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-263 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-261 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-261 TJm +(in\002nit) +[2.769603 +0 +4.9813 +0 +5.539206 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(e) +[4.423394 +0] Tj +-261 TJm +(looping) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-261 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-260 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-261 TJm +(decompressor) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-342 TJm +(So) +[5.539206 +0 +4.9813 +0] Tj +-260 TJm +(it') +[2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-261 TJm +(certainly) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-260 TJm +(pretty) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-261 TJm +(rob) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +20 TJm +(ust,) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +2.49065 +0] Tj +-263 TJm +(although) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-261 TJm +(I) +[3.317546 +0] Tj +-260 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ouldn') +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-261 TJm +(claim) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +7.750903 +0] Tj +72 548.42 Td +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(totally) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(bombproof.) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 526.721 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-282 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +105.84 526.721 Td +/F17_0 9.9626 Tf +(bzlib.h) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +150.491 526.721 Td +/F15_0 9.9626 Tf +(contains) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-282 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-282 TJm +(de\002nitions) +[4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-282 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-281 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-282 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-282 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-282 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-811 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-282 TJm +(particular) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-290 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-282 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-281 TJm +(de\002nitely) +[4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-282 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-282 TJm +(include) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 514.766 Td +/F17_0 9.9626 Tf +(bzlib_private.h) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.664 514.766 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 493.067 Td +(In) +[3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.807 493.067 Td +/F17_0 9.9626 Tf +(bzlib.h) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +124.651 493.067 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-252 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-252 TJm +(v) +[4.9813 +0] Tj +25 TJm +(arious) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-252 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-252 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-251 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-252 TJm +(de\002ned.) +[4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-631 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-252 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-252 TJm +(list) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-251 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-252 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-252 TJm +(intended) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-252 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-251 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-252 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xhausti) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-252 TJm +(description) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-252 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +72 481.112 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-236 TJm +(circumstances) +[4.423394 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-236 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-237 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-236 TJm +(a) +[4.423394 +0] Tj +-236 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-236 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-236 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-237 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-236 TJm +(returned) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-236 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-236 TJm +(those) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-236 TJm +(descriptions) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-236 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-237 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-236 TJm +(later) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-305 TJm +(Rather) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-239 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-236 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-237 TJm +(intended) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-236 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 469.157 Td +(con) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-266 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-265 TJm +(rough) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-266 TJm +(meaning) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-265 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-266 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-265 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-714 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-265 TJm +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-266 TJm +(\002) +[5.539206 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-265 TJm +(actions) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-266 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-266 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-265 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-266 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-265 TJm +(intended) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-266 TJm +(denote) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-265 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-266 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +72 457.202 Td +(situation.) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 425.759 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 413.804 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(requested) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(completed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(successfully) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 388.34 Td +/F17_0 9.9626 Tf +(BZ_RUN_OK,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(BZ_FLUSH_OK,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(BZ_FINISH_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 376.384 Td +/F15_0 9.9626 Tf +(In) +[3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +118.789 376.384 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +202.476 376.384 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(requested) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\003ush/\002nish/nothing-special) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(completed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(successfully) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 350.92 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 338.965 Td +/F15_0 9.9626 Tf +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(completed,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(during) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 303.756 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(kind.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 272.314 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 260.359 Td +/F15_0 9.9626 Tf +(Indicates) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-386 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-385 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-386 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-386 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-386 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-385 TJm +(improperly) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-386 TJm +(compiled) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-386 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-386 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-385 TJm +(platform) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +-386 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-386 TJm +(a) +[4.423394 +0] Tj +-386 TJm +(major) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-385 TJm +(con\002guration) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-386 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +108 248.404 Td +(Speci\002cally) +[5.539206 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-481 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-435 TJm +(means) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-435 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +220.614 248.404 Td +/F17_0 9.9626 Tf +(sizeof\(char\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +292.345 248.404 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +299.628 248.404 Td +/F17_0 9.9626 Tf +(sizeof\(short\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +381.669 248.404 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +400.388 248.404 Td +/F17_0 9.9626 Tf +(sizeof\(int\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +470.474 248.404 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-435 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-435 TJm +(1,) +[4.9813 +0 +2.49065 +0] Tj +-481 TJm +(2) +[4.9813 +0] Tj +-435 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +108 236.448 Td +(4) +[4.9813 +0] Tj +-389 TJm +(respecti) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ely) +[4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-424 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-390 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-389 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-389 TJm +(be.) +[4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-1456 TJm +(Note) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-389 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-389 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-389 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-390 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-389 TJm +(still) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-389 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-389 TJm +(properly) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-390 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-389 TJm +(64-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-389 TJm +(platforms) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0] Tj +108 224.493 Td +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-292 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-292 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-292 TJm +(LP64) +[6.087149 +0 +5.539206 +0 +4.9813 +0 +4.9813 +0] Tj +-292 TJm +(programming) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-293 TJm +(model) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-292 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-292 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-292 TJm +(is,) +[2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-303 TJm +(where) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +355.279 224.493 Td +/F17_0 9.9626 Tf +(sizeof\(long\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +429.92 224.493 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +447.217 224.493 Td +/F17_0 9.9626 Tf +(sizeof\(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +512.97 222.75 Td +(*) +[5.97756 +0] Tj +518.948 224.493 Td +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +527.836 224.493 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +108 212.538 Td +(8.) +[4.9813 +0 +2.49065 +0] Tj +-620 TJm +(Under) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(LP64,) +[6.087149 +0 +5.539206 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +175.606 212.538 Td +/F17_0 9.9626 Tf +(sizeof\(int\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +243.85 212.538 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(still) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(4,) +[4.9813 +0 +2.49065 +0] Tj +-250 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +291.74 212.538 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +339.561 212.538 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +433.458 212.538 Td +/F17_0 9.9626 Tf +(long) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +459.859 212.538 Td +/F15_0 9.9626 Tf +(type,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(OK.) +[7.192997 +0 +7.192997 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 187.073 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 175.118 Td +/F15_0 9.9626 Tf +(When) +[9.404694 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-291 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-291 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-300 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-291 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-290 TJm +(important) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-291 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-290 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-291 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-291 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-291 TJm +(correct) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-290 TJm +(sequence) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-291 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-291 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-290 TJm +(structures) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +108 163.163 Td +(\(b) +[3.317546 +0 +4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fers) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-206 TJm +(etc\)) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-205 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-206 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-205 TJm +(correct) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-206 TJm +(states.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +239.409 163.163 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +289.278 163.163 Td +/F15_0 9.9626 Tf +(checks) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-206 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-205 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-206 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-206 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-205 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-206 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-205 TJm +(ensure) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-206 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-206 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-205 TJm +(happening,) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-215 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-205 TJm +(returns) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 151.208 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +213.27 151.208 Td +/F15_0 9.9626 Tf +(if) +[2.769603 +0 +3.317546 +0] Tj +-367 TJm +(not.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-659 TJm +(Code) +[6.645054 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-367 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-367 TJm +(complies) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-366 TJm +(precisely) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-367 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-366 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-367 TJm +(function) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-366 TJm +(semantics,) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-396 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-367 TJm +(detailed) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +108 139.253 Td +(belo) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-250 TJm +(recei) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue;) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ent) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(denotes) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uggy) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(estig) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +5 TJm +(ate.) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 113.788 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 101.833 Td +/F15_0 9.9626 Tf +(Returned) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-434 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-434 TJm +(a) +[4.423394 +0] Tj +-434 TJm +(parameter) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-434 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-434 TJm +(a) +[4.423394 +0] Tj +-433 TJm +(function) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-434 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-434 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-434 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-434 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-434 TJm +(range) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-434 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-434 TJm +(otherwise) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +7.192997 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-434 TJm +(manifestly) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-434 TJm +(incorrect.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-1723 TJm +(As) +[7.192997 +0 +3.875451 +0] Tj +108 89.878 Td +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +131.644 89.878 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +233.263 89.878 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-595 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-596 TJm +(denotes) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-595 TJm +(a) +[4.423394 +0] Tj +-595 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-596 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-595 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-595 TJm +(client) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-595 TJm +(code.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-2692 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-596 TJm +(distinction) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-595 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 77.923 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +194.177 77.923 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +211.054 77.923 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +315.163 77.923 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(bit) +[4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(hazy) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(still) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orth) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(making.) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(10) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 11 14 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F17_0 9.9626 Tf +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 698.082 Td +/F15_0 9.9626 Tf +(Returned) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-227 TJm +(a) +[4.423394 +0] Tj +-228 TJm +(request) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-227 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-228 TJm +(allocate) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-228 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-227 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ailed.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-605 TJm +(Note) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-228 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-228 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-227 TJm +(quantity) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-228 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-227 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-228 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-227 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +108 686.127 Td +(a) +[4.423394 +0] Tj +-351 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-352 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-351 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-352 TJm +(determined) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-351 TJm +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-352 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-351 TJm +(stream') +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-351 TJm +(header) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-352 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-351 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-352 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1228 TJm +(So) +[5.539206 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +426.471 686.127 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +525.614 686.127 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 674.172 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +172.13 674.172 Td +/F15_0 9.9626 Tf +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-437 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +221.784 674.172 Td +/F17_0 9.9626 Tf +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +297.867 674.172 Td +/F15_0 9.9626 Tf +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-437 TJm +(though) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-437 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-437 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-437 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-437 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-437 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-437 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-437 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-437 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +108 662.217 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-479 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-478 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-479 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-478 TJm +(true) +[2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0] Tj +-479 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-479 TJm +(compression;) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-593 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +301.675 662.217 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +414.04 662.217 Td +/F15_0 9.9626 Tf +(or) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +427.107 662.217 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +521.539 662.217 Td +/F15_0 9.9626 Tf +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +108 650.261 Td +(successfully) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(completed,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +205.672 650.261 Td +/F17_0 9.9626 Tf +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +279.894 650.261 Td +/F15_0 9.9626 Tf +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(occur) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 624.359 Td +/F17_0 9.9626 Tf +(BZ_DATA_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 612.404 Td +/F15_0 9.9626 Tf +(Returned) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-265 TJm +(a) +[4.423394 +0] Tj +-266 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-265 TJm +(inte) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(grity) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-266 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-266 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-265 TJm +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(during) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-265 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-714 TJm +(Most) +[8.856751 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-266 TJm +(importantl) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(y) +[4.9813 +0] Tj +64 TJm +(,) +[2.49065 +0] Tj +-269 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-266 TJm +(means) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-265 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +108 600.448 Td +(stored) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-222 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-223 TJm +(computed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-222 TJm +(CRCs) +[6.645054 +0 +6.645054 +0 +6.645054 +0 +3.875451 +0] Tj +-222 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-222 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-223 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-222 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-222 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-222 TJm +(match.) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-602 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-222 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-222 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-223 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-222 TJm +(returned) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-222 TJm +(upon) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(detection) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-223 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-222 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-222 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +108 588.493 Td +(anomaly) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 562.59 Td +/F17_0 9.9626 Tf +(BZ_DATA_ERROR_MAGIC) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 550.635 Td +/F15_0 9.9626 Tf +(As) +[7.192997 +0 +3.875451 +0] Tj +-306 TJm +(a) +[4.423394 +0] Tj +-306 TJm +(special) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-306 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-307 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +191.852 550.635 Td +/F17_0 9.9626 Tf +(BZ_DATA_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +269.561 550.635 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-306 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-306 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-306 TJm +(sometimes) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-306 TJm +(useful) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-307 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-306 TJm +(kno) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-306 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-306 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-306 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-306 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-306 TJm +(does) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +108 538.68 Td +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(start) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(correct) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(magic) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +261.562 538.68 Td +/F17_0 9.9626 Tf +('B') +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +('Z') +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +('h') +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +327.316 538.68 Td +/F15_0 9.9626 Tf +(\).) +[3.317546 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 512.777 Td +/F17_0 9.9626 Tf +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 500.822 Td +/F15_0 9.9626 Tf +(Returned) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-233 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.123 500.822 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +221.218 500.822 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +237.922 500.822 Td +/F17_0 9.9626 Tf +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.995 500.822 Td +/F15_0 9.9626 Tf +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-233 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-232 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-233 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-233 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-233 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-232 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-233 TJm +(writing) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-233 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-233 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-232 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +108 488.867 Td +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-384 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-357 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +158.511 488.867 Td +/F17_0 9.9626 Tf +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +245.755 488.867 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +263.698 488.867 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +356.92 488.867 Td +/F15_0 9.9626 Tf +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-357 TJm +(attempts) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-357 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-357 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-357 TJm +(a) +[4.423394 +0] Tj +-357 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-357 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-358 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-357 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-357 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +108 476.912 Td +(indicator) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-260 TJm +(\(viz,) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +166.603 476.912 Td +/F17_0 9.9626 Tf +(ferror\(f\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +220.401 476.912 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-260 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-260 TJm +(set.) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-680 TJm +(On) +[7.192997 +0 +4.9813 +0] Tj +-259 TJm +(receipt) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-260 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +311.223 476.912 Td +/F17_0 9.9626 Tf +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +376.976 476.912 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-260 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-260 TJm +(caller) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-260 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-260 TJm +(consult) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +482.068 476.912 Td +/F17_0 9.9626 Tf +(errno) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +514.546 476.912 Td +/F15_0 9.9626 Tf +(and/or) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 464.956 Td +/F17_0 9.9626 Tf +(perror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +146.356 464.956 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(acquire) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(operating-system) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(speci\002c) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0] Tj +-250 TJm +(information) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(problem.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 439.054 Td +/F17_0 9.9626 Tf +(BZ_UNEXPECTED_EOF) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 427.099 Td +/F15_0 9.9626 Tf +(Returned) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.467 427.099 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +221.733 427.099 Td +/F15_0 9.9626 Tf +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(\002nishes) +[5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(detected.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 401.196 Td +/F17_0 9.9626 Tf +(BZ_OUTBUFF_FULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +108 389.241 Td +/F15_0 9.9626 Tf +(Returned) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-258 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.632 389.241 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.668 389.241 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +322.627 389.241 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +480.617 389.241 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-258 TJm +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-259 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +108 377.285 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(\002t) +[5.539206 +0 +2.769603 +0] Tj +-250 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vided.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 328.585 Td +/F9_0 20.6585 Tf +(3.3.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Lo) +[12.622344 +0 +12.622344 +0] Tj +15 TJm +(w-le) +[16.072313 +0 +6.879281 +0 +5.743063 +0 +11.486126 +0] Tj +15 TJm +(vel) +[11.486126 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(interface) +[5.743063 +0 +12.622344 +0 +6.879281 +0 +11.486126 +0 +8.036157 +0 +6.879281 +0 +11.486126 +0 +11.486126 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 297.964 Td +/F9_0 17.2154 Tf +(3.3.1.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzCompressInit) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0 +4.785881 +0 +10.518609 +0 +4.785881 +0 +5.732728 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.852 Td +/F15_0 9.9626 Tf +(11) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 12 15 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 445.031] cm +0 0 468 274.969 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(typedef) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(struct) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +98.488 699.676 Td +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +126.642 697.933 Td +(*) +[5.97756 +0] Tj +132.62 699.676 Td +(next_in;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 687.721 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(avail_in;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(total_in_lo32;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 663.811 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(total_in_hi32;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 639.9 Td +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +126.642 638.157 Td +(*) +[5.97756 +0] Tj +132.62 639.9 Td +(next_out;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 627.945 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(avail_out;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 615.99 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(total_out_lo32;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 604.035 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(total_out_hi32;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 580.124 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +126.642 578.381 Td +(*) +[5.97756 +0] Tj +132.62 580.124 Td +(state;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 556.214 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +126.642 554.471 Td +(*) +[5.97756 +0] Tj +132.62 556.214 Td +(\() +[5.97756 +0] Tj +138.597 554.471 Td +(*) +[5.97756 +0] Tj +144.575 556.214 Td +(bzalloc\)\(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +226.528 554.471 Td +(*) +[5.97756 +0] Tj +232.505 556.214 Td +(,int,int\);) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 544.259 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +132.62 542.515 Td +(*) +[5.97756 +0] Tj +138.597 544.259 Td +(bzfree\)\(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +214.572 542.515 Td +(*) +[5.97756 +0] Tj +220.55 544.259 Td +(,void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +254.682 542.515 Td +(*) +[5.97756 +0] Tj +260.659 544.259 Td +(\);) +[5.97756 +0 +5.97756 +0] Tj +98.488 532.304 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +126.642 530.56 Td +(*) +[5.97756 +0] Tj +132.62 532.304 Td +(opaque;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 520.349 Td +(}) +[5.97756 +0] Tj +-426 TJm +(bz_stream;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 496.438 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +292.281 494.695 Td +(*) +[5.97756 +0] Tj +298.259 496.438 Td +(strm,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 484.483 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize100k,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 472.528 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 460.573 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 423.113 Td +/F15_0 9.9626 Tf +(Prepares) +[5.539206 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +-356 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-356 TJm +(compression.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1256 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +209.41 423.113 Td +/F17_0 9.9626 Tf +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +266.754 423.113 Td +/F15_0 9.9626 Tf +(structure) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-356 TJm +(holds) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-356 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-356 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-356 TJm +(pertaining) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-356 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-356 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-356 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-355 TJm +(acti) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(vity) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-1256 TJm +(A) +[7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 411.158 Td +/F17_0 9.9626 Tf +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +128.581 411.158 Td +/F15_0 9.9626 Tf +(structure) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-279 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-280 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-279 TJm +(allocated) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(initialised) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(prior) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-279 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-279 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-280 TJm +(call.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-796 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(\002elds) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-279 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +431.939 411.158 Td +/F17_0 9.9626 Tf +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +488.52 411.158 Td +/F15_0 9.9626 Tf +(comprise) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-279 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 399.203 Td +(entirety) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(user) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-visible) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +204.422 399.203 Td +/F17_0 9.9626 Tf +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +236.8 399.203 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(pointer) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(pri) +[4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ate) +[4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(structures) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(required) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(compression.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 377.285 Td +(Custom) +[6.645054 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-372 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-372 TJm +(allocators) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-372 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-372 TJm +(supported,) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-403 TJm +(via) +[4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-372 TJm +(\002elds) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +288.908 377.285 Td +/F17_0 9.9626 Tf +(bzalloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +330.751 377.285 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +337.253 377.285 Td +/F17_0 9.9626 Tf +(bzfree) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +373.118 377.285 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-403 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +397.714 377.285 Td +/F17_0 9.9626 Tf +(opaque) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +433.579 377.285 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1353 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-372 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +493.782 377.285 Td +/F17_0 9.9626 Tf +(opaque) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +533.355 377.285 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +72 365.33 Td +(passed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-306 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-306 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-306 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-306 TJm +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-306 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(gument) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-306 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-306 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-306 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-305 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +253.941 365.33 Td +/F17_0 9.9626 Tf +(bzalloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +298.832 365.33 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +316.266 365.33 Td +/F17_0 9.9626 Tf +(bzfree) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +352.132 365.33 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-320 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-306 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-306 TJm +(otherwise) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +7.192997 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-306 TJm +(ignored) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-306 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-306 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-306 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-955 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +72 353.375 Td +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +89.431 353.375 Td +/F17_0 9.9626 Tf +(bzalloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(\() +[5.97756 +0] Tj +-600 TJm +(opaque,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(n,) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(m) +[5.97756 +0] Tj +-600 TJm +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +235.938 353.375 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-306 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xpected) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-305 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-306 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-306 TJm +(a) +[4.423394 +0] Tj +-305 TJm +(pointer) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +360.3 353.375 Td +/F17_0 9.9626 Tf +(p) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +369.322 353.375 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +380.118 353.375 Td +/F17_0 9.9626 Tf +(n) +[5.97756 +0] Tj +392.073 351.631 Td +(*) +[5.97756 +0] Tj +404.029 353.375 Td +(m) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +413.051 353.375 Td +/F15_0 9.9626 Tf +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-306 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-305 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-320 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +504.135 353.375 Td +/F17_0 9.9626 Tf +(bzfree) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +72 341.42 Td +(\() +[5.97756 +0] Tj +-600 TJm +(opaque,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(p) +[5.97756 +0] Tj +-600 TJm +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +152.199 341.42 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(free) +[3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 319.502 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-280 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(don') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-280 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-279 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-280 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-280 TJm +(a) +[4.423394 +0] Tj +-280 TJm +(custom) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-280 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-279 TJm +(allocator) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-288 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +299.9 319.502 Td +/F17_0 9.9626 Tf +(bzalloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +341.743 319.502 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +347.096 319.502 Td +/F17_0 9.9626 Tf +(bzfree) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +385.749 319.502 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +402.923 319.502 Td +/F17_0 9.9626 Tf +(opaque) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +441.576 319.502 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +452.115 319.502 Td +/F17_0 9.9626 Tf +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +476.025 319.502 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-280 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-280 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-280 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +72 307.547 Td +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.318 307.547 Td +/F17_0 9.9626 Tf +(malloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +214.674 307.547 Td +/F15_0 9.9626 Tf +(/) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +219.934 307.547 Td +/F17_0 9.9626 Tf +(free) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +246.335 307.547 Td +/F15_0 9.9626 Tf +(routines.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 285.629 Td +(Before) +[6.645054 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-362 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +133.438 285.629 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +241.035 285.629 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-390 TJm +(\002elds) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +272.606 285.629 Td +/F17_0 9.9626 Tf +(bzalloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +314.449 285.629 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +320.825 285.629 Td +/F17_0 9.9626 Tf +(bzfree) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +360.296 285.629 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +378.289 285.629 Td +/F17_0 9.9626 Tf +(opaque) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +417.76 285.629 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-362 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-362 TJm +(\002lled) +[5.539206 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-362 TJm +(appropriately) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +72 273.674 Td +(as) +[4.423394 +0 +3.875451 +0] Tj +-322 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-323 TJm +(described.) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1055 TJm +(Upon) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(return,) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-341 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-322 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-323 TJm +(state) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-322 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-323 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-322 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-323 TJm +(allocated) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-323 TJm +(initialised,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-340 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +459.801 273.674 Td +/F17_0 9.9626 Tf +(total_in_lo32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 273.674 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 261.718 Td +/F17_0 9.9626 Tf +(total_in_hi32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +149.709 261.718 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +155.006 261.718 Td +/F17_0 9.9626 Tf +(total_out_lo32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +241.435 261.718 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +258.564 261.718 Td +/F17_0 9.9626 Tf +(total_out_hi32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +344.994 261.718 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-275 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-276 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-275 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-275 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-276 TJm +(zero.) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-772 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-275 TJm +(four) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-275 TJm +(\002elds) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-276 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +72 249.763 Td +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-340 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-339 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-340 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-339 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-340 TJm +(inform) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +-339 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-340 TJm +(caller) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-339 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-340 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-339 TJm +(total) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-340 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-339 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-340 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-340 TJm +(passed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-339 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-340 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-339 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-340 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-339 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-340 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-362 TJm +(respecti) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ely) +[4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +72 237.808 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-376 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-377 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-376 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-376 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-377 TJm +(change) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-376 TJm +(them.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-1378 TJm +(As) +[7.192997 +0 +3.875451 +0] Tj +-377 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-376 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-377 TJm +(1.0,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-408 TJm +(64-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-376 TJm +(counts) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-376 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-377 TJm +(maintained,) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-408 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-376 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-376 TJm +(32-bit) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-377 TJm +(platforms,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +72 225.853 Td +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-371 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +113.148 225.853 Td +/F17_0 9.9626 Tf +(_hi32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +146.729 225.853 Td +/F15_0 9.9626 Tf +(\002elds) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-371 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-370 TJm +(store) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-371 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-371 TJm +(upper) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-370 TJm +(32) +[4.9813 +0 +4.9813 +0] Tj +-371 TJm +(bits) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-370 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-371 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-371 TJm +(count.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-1344 TJm +(So,) +[5.539206 +0 +4.9813 +0 +2.49065 +0] Tj +-400 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-371 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xample,) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-401 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-371 TJm +(total) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-370 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-371 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-370 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-371 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-371 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 213.898 Td +/F17_0 9.9626 Tf +(\(total_in_hi32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(<<) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(32\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(+) +[5.97756 +0] Tj +-600 TJm +(total_in_lo32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +293.171 213.898 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 191.98 Td +(P) +[5.539206 +0] Tj +15 TJm +(arameter) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +115.367 191.98 Td +/F17_0 9.9626 Tf +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +196.205 191.98 Td +/F15_0 9.9626 Tf +(speci\002es) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +3.875451 +0] Tj +-314 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-314 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-314 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-314 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-314 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-314 TJm +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-314 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-314 TJm +(compression.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1004 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-314 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-314 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-314 TJm +(a) +[4.423394 +0] Tj +-315 TJm +(v) +[4.9813 +0] Tj +25 TJm +(al) +[4.423394 +0 +2.769603 +0] Tj +1 TJm +(u) +[4.9813 +0] Tj +-1 TJm +(e) +[4.423394 +0] Tj +-314 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-314 TJm +(1) +[4.9813 +0] Tj +72 180.025 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(9) +[4.9813 +0] Tj +-289 TJm +(inclusi) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +-299 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(actual) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-289 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-289 TJm +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-289 TJm +(100000) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(x) +[4.9813 +0] Tj +-289 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-289 TJm +(\002gure.) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-854 TJm +(9) +[4.9813 +0] Tj +-290 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(best) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-289 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-289 TJm +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-289 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +72 168.07 Td +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 146.152 Td +(P) +[5.539206 +0] Tj +15 TJm +(arameter) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +115.095 146.152 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +171.75 146.152 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-287 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-286 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-287 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-287 TJm +(a) +[4.423394 +0] Tj +-287 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-286 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-287 TJm +(0) +[4.9813 +0] Tj +-287 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-287 TJm +(4) +[4.9813 +0] Tj +-286 TJm +(inclusi) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e.) +[4.423394 +0 +2.49065 +0] Tj +-841 TJm +(0) +[4.9813 +0] Tj +-286 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-287 TJm +(silent,) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-296 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-287 TJm +(greater) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-287 TJm +(numbers) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-286 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +72 134.197 Td +(increasingly) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-342 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erbose) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-342 TJm +(monitoring/deb) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +20 TJm +(ugging) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-342 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-1173 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-343 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-342 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-342 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-342 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-342 TJm +(compiled) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-342 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +446.429 134.197 Td +/F17_0 9.9626 Tf +(-DBZ_NO_STDIO) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +524.138 134.197 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-342 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +72 122.241 Td +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(appear) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erbosity) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(setting.) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 100.324 Td +(P) +[5.539206 +0] Tj +15 TJm +(arameter) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +116.619 100.324 Td +/F17_0 9.9626 Tf +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.775 100.324 Td +/F15_0 9.9626 Tf +(controls) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-440 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-439 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-440 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-439 TJm +(phase) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-440 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-440 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-439 TJm +(presented) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-440 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-440 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orst) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-439 TJm +(case,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-487 TJm +(highly) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +72 88.368 Td +(repetiti) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +-433 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-396 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-1496 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-396 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-396 TJm +(runs) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-397 TJm +(i) +[2.769603 +0] Tj +1 TJm +(nto) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-397 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(\002culties) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-396 TJm +(caused) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-396 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-396 TJm +(repetiti) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-396 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-432 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-397 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-396 TJm +(switches) +[3.875451 +0 +7.192997 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-396 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.852 Td +(12) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 13 16 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-255 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-254 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-255 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-254 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-255 TJm +(a) +[4.423394 +0] Tj +-255 TJm +(f) +[3.317546 +0] Tj +10 TJm +(allback) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-254 TJm +(algorithm.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-648 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-255 TJm +(f) +[3.317546 +0] Tj +10 TJm +(allback) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-254 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-255 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wer) +[7.192997 +0 +4.423394 +0 +3.317546 +0] Tj +-255 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-254 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-255 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-254 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-255 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-255 TJm +(perhaps) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +72 698.082 Td +(a) +[4.423394 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(actor) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(three,) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(al) +[4.423394 +0 +2.769603 +0] Tj +10 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ays) +[4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(reasonably) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(matter) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(bad) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(input.) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 676.268 Td +(Lo) +[6.087149 +0 +4.9813 +0] Tj +25 TJm +(wer) +[7.192997 +0 +4.423394 +0 +3.317546 +0] Tj +-240 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-239 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +138.421 676.268 Td +/F17_0 9.9626 Tf +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.585 676.268 Td +/F15_0 9.9626 Tf +(reduce) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-239 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-240 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-240 TJm +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(fort) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-239 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-240 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-240 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-240 TJm +(wi) +[7.192997 +0 +2.769603 +0] Tj +1 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-240 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xpend) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-240 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-240 TJm +(resorting) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-239 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 664.313 Td +(f) +[3.317546 +0] Tj +10 TJm +(allback.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-618 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-248 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-247 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-248 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-247 TJm +(parameter) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-248 TJm +(carefully;) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-248 TJm +(too) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-248 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-248 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-247 TJm +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-248 TJm +(inputs) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-248 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-247 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-248 TJm +(handled) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-247 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-248 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-247 TJm +(f) +[3.317546 +0] Tj +10 TJm +(allback) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-248 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +72 652.358 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-308 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-308 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-308 TJm +(rather) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-309 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wly) +[7.192997 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-322 TJm +(too) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-309 TJm +(high,) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-322 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-308 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-309 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erage-to-w) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +7.192997 +0] Tj +10 TJm +(orst) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-308 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-308 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-308 TJm +(times) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +3.875451 +0] Tj +-308 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-308 TJm +(become) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-309 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-308 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge.) +[4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +72 640.402 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(30) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(reasonable) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(wide) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(range) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(circumstances.) +[4.423394 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 618.588 Td +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(range) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(0) +[4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(250) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(inclusi) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e.) +[4.423394 +0 +2.49065 +0] Tj +-620 TJm +(0) +[4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(special) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(case,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(equi) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alent) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(30.) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 596.774 Td +(Note) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(generated) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(ardless) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(whether) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(allback) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(used.) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 574.96 Td +(Be) +[6.645054 +0 +4.423394 +0] Tj +-303 TJm +(a) +[4.423394 +0] Tj +15 TJm +(w) +[7.192997 +0] Tj +10 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-303 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-303 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-303 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-304 TJm +(parameter) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-303 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-303 TJm +(disappear) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0] Tj +-303 TJm +(entirely) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-303 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-303 TJm +(future) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-303 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-303 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-303 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-304 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-938 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-303 TJm +(principle) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-303 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-304 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-303 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +72 563.005 Td +(possible) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-270 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-270 TJm +(de) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(vise) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-270 TJm +(a) +[4.423394 +0] Tj +-270 TJm +(good) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-270 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-270 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-271 TJm +(automat) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +1 TJm +(ically) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-271 TJm +(choose) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-270 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-270 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-270 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-270 TJm +(use.) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-740 TJm +(Such) +[5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-270 TJm +(a) +[4.423394 +0] Tj +-270 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-271 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-270 TJm +(render) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-270 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 551.049 Td +(parameter) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(obsolete.) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 529.235 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 384.677] cm +0 0 468 143.462 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 519.771 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 507.816 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(library) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(mis-compiled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 495.86 Td +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 483.905 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 471.95 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(9) +[5.97756 +0] Tj +98.488 459.995 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(4) +[5.97756 +0] Tj +98.488 448.04 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(250) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 436.085 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 424.129 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(enough) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 412.174 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 400.219 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 362.863 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 313.947] cm +0 0 468 47.821 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 353.399 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 341.444 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(returned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 329.488 Td +(no) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(specific) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(action) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(needed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(case) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 283.429 Td +/F9_0 17.2154 Tf +(3.3.2.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzCompress) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 254.959] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 270.501 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +268.371 268.757 Td +(*) +[5.97756 +0] Tj +274.348 270.501 Td +(strm,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(action) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 233.145 Td +/F15_0 9.9626 Tf +(Pro) +[5.539206 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vides) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-222 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-221 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-222 TJm +(and/or) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-222 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-222 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-221 TJm +(space) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-222 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-222 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-221 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-601 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-222 TJm +(caller) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-222 TJm +(maintains) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-222 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-221 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-222 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fers,) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +-227 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 221.19 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +158.177 221.19 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(transfer) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(them.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 199.375 Td +(Before) +[6.645054 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-212 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-213 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-212 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +147.961 199.375 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +231.647 199.375 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +236.329 199.375 Td +/F17_0 9.9626 Tf +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +280.288 199.375 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-212 TJm +(point) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-213 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-212 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-213 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-212 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-213 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-212 TJm +(compressed,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-220 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +463.493 199.375 Td +/F17_0 9.9626 Tf +(avail_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +513.43 199.375 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +72 187.42 Td +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-246 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-247 TJm +(m) +[7.750903 +0] Tj +1 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +14 TJm +(y) +[4.9813 +0] Tj +-246 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-246 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-246 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-247 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-246 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +259.242 187.42 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +345.382 187.42 Td +/F15_0 9.9626 Tf +(updates) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +378.271 187.42 Td +/F17_0 9.9626 Tf +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +420.114 187.42 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +425.066 187.42 Td +/F17_0 9.9626 Tf +(avail_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +475.34 187.42 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +492.179 187.42 Td +/F17_0 9.9626 Tf +(total_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 175.465 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(re\003ect) +[3.317546 +0 +4.423394 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 153.651 Td +(Similarly) +[5.539206 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +113.611 153.651 Td +/F17_0 9.9626 Tf +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +164.072 153.651 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-265 TJm +(point) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-265 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-265 TJm +(a) +[4.423394 +0] Tj +-265 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-265 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-265 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-265 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-265 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-265 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-265 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-265 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-265 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-265 TJm +(placed,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-269 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +464.742 153.651 Td +/F17_0 9.9626 Tf +(avail_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +521.181 153.651 Td +/F15_0 9.9626 Tf +(indi-) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +72 141.696 Td +(cating) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-209 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-209 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-209 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-209 TJm +(space) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-209 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-210 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +243.087 141.696 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +328.856 141.696 Td +/F15_0 9.9626 Tf +(updates) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +361.375 141.696 Td +/F17_0 9.9626 Tf +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +409.196 141.696 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +413.851 141.696 Td +/F17_0 9.9626 Tf +(avail_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +469.732 141.696 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +486.202 141.696 Td +/F17_0 9.9626 Tf +(total_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 129.74 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(re\003ect) +[3.317546 +0 +4.423394 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 107.926 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-272 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-272 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vide) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-272 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-272 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-272 TJm +(little) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-272 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-272 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-272 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-271 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-272 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-272 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-272 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-272 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-272 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-272 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +399.123 107.926 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +482.809 107.926 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-752 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-272 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-272 TJm +(limit,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +72 95.971 Td +(it) +[2.769603 +0 +2.769603 +0] Tj +-266 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-265 TJm +(acceptable) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-266 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-266 TJm +(supply) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-266 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-265 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-266 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-266 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-265 TJm +(byte) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-266 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-266 TJm +(a) +[4.423394 +0] Tj +-266 TJm +(time,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-269 TJm +(although) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-266 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-266 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-265 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-266 TJm +(terribly) +[2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-266 TJm +(inef) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +25 TJm +(\002cient.) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-714 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-266 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +72 84.016 Td +(al) +[4.423394 +0 +2.769603 +0] Tj +10 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ays) +[4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(ensure) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(least) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(byte) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(space) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(call.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(13) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 14 17 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(A) +[7.192997 +0] Tj +-250 TJm +(second) +[3.875451 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(purpose) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +156.662 710.037 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +242.839 710.037 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(request) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(change) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(mode) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 688.12 Td +(Conceptually) +[6.645054 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-217 TJm +(a) +[4.423394 +0] Tj +-210 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-209 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-209 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-209 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-210 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-209 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-209 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-209 TJm +(four) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-210 TJm +(states:) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-289 TJm +(IDLE,) +[3.317546 +0 +7.192997 +0 +6.087149 +0 +6.087149 +0 +2.49065 +0] Tj +-209 TJm +(R) +[6.645054 +0] Tj +40 TJm +(UNNING,) +[7.192997 +0 +7.192997 +0 +7.192997 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0 +2.49065 +0] Tj +-210 TJm +(FLUSHING) +[5.539206 +0 +6.087149 +0 +7.192997 +0 +5.539206 +0 +7.192997 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +-209 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-209 TJm +(FINISHING.) +[5.539206 +0 +3.317546 +0 +7.192997 +0 +3.317546 +0 +5.539206 +0 +7.192997 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0 +2.49065 +0] Tj +-419 TJm +(Be-) +[6.645054 +0 +4.423394 +0 +3.317546 +0] Tj +72 676.164 Td +(fore) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-264 TJm +(initialisation) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +146.434 676.164 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +254.031 676.164 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-264 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-264 TJm +(termination) +[2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +349.75 676.164 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +451.369 676.164 Td +/F15_0 9.9626 Tf +(\),) +[3.317546 +0 +2.49065 +0] Tj +-267 TJm +(a) +[4.423394 +0] Tj +-264 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-264 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-263 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(arded) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 664.209 Td +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(IDLE.) +[3.317546 +0 +7.192997 +0 +6.087149 +0 +6.087149 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 642.291 Td +(Upon) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-389 TJm +(initialisation) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-390 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +155.036 642.291 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +262.632 642.291 Td +/F15_0 9.9626 Tf +(\),) +[3.317546 +0 +2.49065 +0] Tj +-424 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-390 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-389 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-390 TJm +(placed) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-389 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-389 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-390 TJm +(R) +[6.645054 +0] Tj +40 TJm +(UNNING) +[7.192997 +0 +7.192997 +0 +7.192997 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +-389 TJm +(state.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-1457 TJm +(Subsequent) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-389 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +72 630.336 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +83.818 630.336 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +171.571 630.336 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-408 TJm +(pass) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +223.431 630.336 Td +/F17_0 9.9626 Tf +(BZ_RUN) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +263.362 630.336 Td +/F15_0 9.9626 Tf +(as) +[4.423394 +0 +3.875451 +0] Tj +-408 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-409 TJm +(request) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +1 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +-409 TJm +(action;) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-487 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-408 TJm +(actions) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-409 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-408 TJm +(ille) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(al) +[4.423394 +0 +2.769603 +0] Tj +-408 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-408 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-408 TJm +(result) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-409 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 618.381 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +173.619 618.381 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 596.463 Td +(At) +[7.192997 +0 +2.769603 +0] Tj +-279 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-279 TJm +(point,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-286 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-279 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-279 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-278 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +14 TJm +(vi) +[4.9813 +0 +2.769603 +0] Tj +1 TJm +(ded) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-279 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-279 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-279 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-279 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ants) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-279 TJm +(to.) +[2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-793 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-279 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-279 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-279 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-279 TJm +(\002nish) +[5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-279 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-279 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +72 584.508 Td +(in) +[2.769603 +0 +4.9813 +0] Tj +-287 TJm +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(fect,) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-297 TJm +(asking) +[4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-288 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-287 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-288 TJm +(process) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-287 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-288 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-287 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-287 TJm +(might) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-288 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-287 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fered) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-288 TJm +(internally) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-844 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-288 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-287 TJm +(state,) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +456.314 584.508 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 572.553 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-258 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-257 TJm +(longer) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-258 TJm +(attempt) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0] Tj +-258 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-258 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-257 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +234.208 572.553 Td +/F17_0 9.9626 Tf +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +276.051 572.553 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-260 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-257 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-258 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-258 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-257 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-258 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +407.082 572.553 Td +/F17_0 9.9626 Tf +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +454.902 572.553 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-666 TJm +(Because) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-258 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-258 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +72 560.598 Td +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-228 TJm +(supplied) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-229 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-228 TJm +(user) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0] Tj +-228 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-228 TJm +(arbitrarily) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-229 TJm +(sma) +[3.875451 +0 +7.750903 +0 +4.423394 +0] Tj +1 TJm +(ll,) +[2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-233 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-228 TJm +(\002nishing-up) +[5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +-228 TJm +(operation) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-229 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-228 TJm +(necessarily) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-228 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-228 TJm +(done) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-228 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-229 TJm +(a) +[4.423394 +0] Tj +-228 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +72 548.642 Td +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +99.666 548.642 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +183.352 548.642 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 526.725 Td +(Instead,) +[3.317546 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-346 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-327 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-326 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-327 TJm +(passes) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +218.231 526.725 Td +/F17_0 9.9626 Tf +(BZ_FINISH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +275.284 526.725 Td +/F15_0 9.9626 Tf +(as) +[4.423394 +0 +3.875451 +0] Tj +-327 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-327 TJm +(acti) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-327 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +338.109 526.725 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +421.795 526.725 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1081 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-326 TJm +(changes) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-327 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-327 TJm +(stream') +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +72 514.77 Td +(state) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-291 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-290 TJm +(FINISHING.) +[5.539206 +0 +3.317546 +0 +7.192997 +0 +3.317546 +0 +5.539206 +0 +7.192997 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0 +2.49065 +0] Tj +-581 TJm +(An) +[7.192997 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-291 TJm +(remaining) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-291 TJm +(\(ie,) +[3.317546 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +264.452 514.77 Td +/F17_0 9.9626 Tf +(next_in[0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(..) +[5.97756 +0 +5.97756 +0] Tj +-1200 TJm +(avail_in-1]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +413.892 514.77 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-291 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-290 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-291 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(transferred) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +72 502.814 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-421 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-421 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-421 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-1646 TJm +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-421 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-422 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +1 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +222.339 502.814 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +310.22 502.814 Td +/F15_0 9.9626 Tf +(must) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-421 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-421 TJm +(called) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-421 TJm +(repeatedly) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-421 TJm +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-421 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-421 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-421 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-421 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-421 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 490.859 Td +(consumed.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1397 TJm +(At) +[7.192997 +0 +2.769603 +0] Tj +-379 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-380 TJm +(point,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +188.346 490.859 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +275.813 490.859 Td +/F15_0 9.9626 Tf +(returns) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +307.259 490.859 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +384.968 490.859 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-379 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-379 TJm +(stream') +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-380 TJm +(state) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-379 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-380 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-379 TJm +(back) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-379 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 478.904 Td +(IDLE.) +[3.317546 +0 +7.192997 +0 +6.087149 +0 +6.087149 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +99.666 478.904 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +203.776 478.904 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(called.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 456.986 Td +(Just) +[3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-380 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-380 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-379 TJm +(sure) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-380 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-380 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-379 TJm +(does) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-380 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-380 TJm +(cheat,) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-412 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-380 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-380 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-379 TJm +(a) +[4.423394 +0] Tj +-380 TJm +(note) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-380 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +415.708 456.986 Td +/F17_0 9.9626 Tf +(avail_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +467.312 456.986 Td +/F15_0 9.9626 Tf +(at) +[4.423394 +0 +2.769603 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-380 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-379 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 445.031 Td +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-286 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-286 TJm +(t) +[2.769603 +0] Tj +1 TJm +(o) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +118.179 445.031 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +204.713 445.031 Td +/F15_0 9.9626 Tf +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +248.035 445.031 Td +/F17_0 9.9626 Tf +(BZ_FINISH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +304.68 445.031 Td +/F15_0 9.9626 Tf +(as) +[4.423394 +0 +3.875451 +0] Tj +-286 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-286 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-285 TJm +(\(ie,) +[3.317546 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-295 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-286 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-286 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-285 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-286 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-286 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-286 TJm +(announced) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +72 433.076 Td +(intention) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-292 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-292 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-291 TJm +(supply) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-292 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-292 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-292 TJm +(input\).) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.49065 +0] Tj +-870 TJm +(By) +[6.645054 +0 +4.9813 +0] Tj +-292 TJm +(comparing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-292 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-292 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-291 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-292 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-292 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +392.862 433.076 Td +/F17_0 9.9626 Tf +(avail_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +443.589 433.076 Td +/F15_0 9.9626 Tf +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-292 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-292 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-291 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 421.121 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +155.686 421.121 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-247 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-247 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-246 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-247 TJm +(detect) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-246 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-247 TJm +(attem) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +1 TJm +(p) +[4.9813 +0] Tj +-1 TJm +(t) +[2.769603 +0] Tj +1 TJm +(s) +[3.875451 +0] Tj +-247 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-246 TJm +(slip) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-247 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-246 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-247 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-246 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-247 TJm +(compress.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-617 TJm +(An) +[7.192997 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-247 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-246 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-247 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-246 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-247 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 409.165 Td +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +151.959 409.165 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +253.578 409.165 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-500 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(indicates) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(programming) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(mistak) +[7.750903 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(corrected.) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 387.248 Td +(Instead) +[3.317546 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-224 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-223 TJm +(asking) +[4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-224 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-223 TJm +(\002nish,) +[5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.49065 +0] Tj +-229 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-224 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-223 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-224 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-224 TJm +(ask) +[4.423394 +0 +3.875451 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +293.282 387.248 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +379.196 387.248 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-224 TJm +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-223 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-224 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-223 TJm +(remaining) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-224 TJm +(input,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-229 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +72 375.293 Td +(it) +[2.769603 +0 +2.769603 +0] Tj +-278 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(terminate) +[2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-278 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-278 TJm +(current) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-277 TJm +(\(Burro) +[3.317546 +0 +6.645054 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws-Wheeler\)) +[7.192997 +0 +3.875451 +0 +3.317546 +0 +9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +-278 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(block.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-787 TJm +(Th) +[6.087149 +0 +4.9813 +0] Tj +-1 TJm +(i) +[2.769603 +0] Tj +1 TJm +(s) +[3.875451 +0] Tj +-278 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-278 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-278 TJm +(useful) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-278 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-278 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-278 TJm +(control) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-278 TJm +(purposes.) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +72 363.337 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-328 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-328 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-328 TJm +(analogous) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-328 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-328 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-328 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-328 TJm +(\002nishing:) +[5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-466 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +297.049 363.337 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +384.003 363.337 Td +/F15_0 9.9626 Tf +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-328 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-328 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-328 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +456.841 363.337 Td +/F17_0 9.9626 Tf +(BZ_FLUSH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +504.662 363.337 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-328 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +72 351.382 Td +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-445 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-494 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-446 TJm +(persist) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-445 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-445 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +213.94 351.382 Td +/F17_0 9.9626 Tf +(BZ_FLUSH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +266.195 351.382 Td +/F15_0 9.9626 Tf +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-445 TJm +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-445 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-446 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +360.062 351.382 Td +/F17_0 9.9626 Tf +(BZ_RUN) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +400.362 351.382 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-445 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1792 TJm +(As) +[7.192997 +0 +3.875451 +0] Tj +-445 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-445 TJm +(\002nishing,) +[5.539206 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 339.427 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +158.177 339.427 Td +/F15_0 9.9626 Tf +(detects) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(attempt) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vide) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\003ush) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0] Tj +-250 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(gun.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 317.509 Td +(Once) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\003ush) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(complete,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(returns) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(R) +[6.645054 +0] Tj +40 TJm +(UNNING) +[7.192997 +0 +7.192997 +0 +7.192997 +0 +3.317546 +0 +7.192997 +0 +7.192997 +0] Tj +-250 TJm +(state.) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 295.591 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-344 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-343 TJm +(sounds) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-344 TJm +(pretty) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-344 TJm +(comple) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(x,) +[4.9813 +0 +2.49065 +0] Tj +-367 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-344 TJm +(isn') +[2.769603 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-344 TJm +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-1182 TJm +(Here') +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-344 TJm +(a) +[4.423394 +0] Tj +-344 TJm +(table) +[2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-343 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-344 TJm +(sho) +[3.875451 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-344 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-344 TJm +(actions) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-343 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-344 TJm +(allo) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-344 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-344 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 283.636 Td +(state,) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-281 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-274 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-275 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-274 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-275 TJm +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(en,) +[4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-280 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-275 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-274 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-275 TJm +(state) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-274 TJm +(is,) +[2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-281 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-275 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-275 TJm +(non-error) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-274 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-275 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-274 TJm +(are.) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-767 TJm +(Note) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-275 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-274 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-275 TJm +(can') +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +72 271.681 Td +(e) +[4.423394 +0] Tj +15 TJm +(xplicitly) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-347 TJm +(ask) +[4.423394 +0 +3.875451 +0 +4.9813 +0] Tj +-348 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-347 TJm +(state) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-348 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-347 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-348 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-347 TJm +(in,) +[2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-372 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-347 TJm +(nor) +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-348 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-347 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-348 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-347 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-348 TJm +(--) +[3.317546 +0 +3.317546 +0] Tj +-347 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-348 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-347 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-347 TJm +(inferred) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-348 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-347 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-348 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-347 TJm +(returned) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-348 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 259.726 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +155.686 259.726 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.852 Td +(14) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 15 18 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 146.152] cm +0 0 468 573.848 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(IDLE/any) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(Illegal.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(IDLE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(only) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(exists) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(after) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +98.488 687.721 Td +(before) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzCompressInit.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 651.856 Td +(RUNNING/BZ_RUN) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 639.9 Td +(Compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(much) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(possible.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 627.945 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(RUNNING) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 615.99 Td +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_RUN_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 592.08 Td +(RUNNING/BZ_FLUSH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 580.124 Td +(Remember) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(current) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 568.169 Td +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(much) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(possible,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(but) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(do) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(accept) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(any) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(more) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(input.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 556.214 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(FLUSHING) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 544.259 Td +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_FLUSH_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 520.349 Td +(RUNNING/BZ_FINISH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 508.393 Td +(Remember) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(current) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 496.438 Td +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(much) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(possible,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(but) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(do) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(accept) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(any) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(more) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(input.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 484.483 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(FINISHING) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 472.528 Td +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_FINISH_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 448.618 Td +(FLUSHING/BZ_FLUSH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 436.662 Td +(Compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(much) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(possible,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 424.707 Td +(but) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(do) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(accept) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(any) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(more) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(input.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 412.752 Td +(If) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(all) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(existing) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(input) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(used) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(up) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(all) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 400.797 Td +(output) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(removed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +106.976 388.842 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(RUNNING;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_RUN_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 376.887 Td +(else) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +106.976 364.931 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(FLUSHING;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_FLUSH_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 341.021 Td +(FLUSHING/other) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 329.066 Td +(Illegal.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 317.111 Td +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 293.2 Td +(FINISHING/BZ_FINISH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 281.245 Td +(Compress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(much) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(as) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(possible,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 269.29 Td +(but) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(accept) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(any) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(more) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(input.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 257.335 Td +(If) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(all) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(existing) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(input) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(used) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(up) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(all) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 245.38 Td +(output) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(removed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +106.976 233.424 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(IDLE;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 221.469 Td +(else) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +106.976 209.514 Td +(Next) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(state) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(FINISHING;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_FINISH_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 185.604 Td +(FINISHING/other) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 173.649 Td +(Illegal.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 161.693 Td +(Return) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(value) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 124.234 Td +/F15_0 9.9626 Tf +(That) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(still) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(looks) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(complicated?) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-620 TJm +(W) +[9.404694 +0] Tj +80 TJm +(ell,) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(air) +[4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-250 TJm +(enough.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-620 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(usual) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(sequence) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(load) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(is:) +[2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 92.353 Td +(1.) +[4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-510 TJm +(Get) +[7.192997 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(started) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +153.175 92.353 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +260.771 92.353 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(15) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 16 19 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +74.491 710.037 Td +/F15_0 9.9626 Tf +(2.) +[4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-510 TJm +(Sho) +[5.539206 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-267 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-268 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-267 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(shlurp) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-267 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-268 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-267 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-267 TJm +(form) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +-268 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-267 TJm +(zero) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-268 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-267 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-268 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(s) +[3.875451 +0] Tj +-268 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +400.64 710.037 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +486.991 710.037 Td +/F15_0 9.9626 Tf +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-267 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(=) +[5.618906 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +83.955 698.082 Td +/F17_0 9.9626 Tf +(BZ_RUN) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +119.821 698.082 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 676.164 Td +(3.) +[4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-510 TJm +(Finish) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-276 TJm +(up.) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-387 TJm +(Repeatedly) +[6.645054 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-276 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +195.722 676.164 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +282.156 676.164 Td +/F15_0 9.9626 Tf +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-276 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-276 TJm +(=) +[5.618906 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +338.079 676.164 Td +/F17_0 9.9626 Tf +(BZ_FINISH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +391.877 676.164 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-276 TJm +(cop) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +10 TJm +(ying) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-276 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-275 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-276 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-276 TJm +(output,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +83.955 664.209 Td +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.717 664.209 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +184.916 664.209 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 642.291 Td +(4.) +[4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-510 TJm +(Close) +[6.645054 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(go) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(home.) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-620 TJm +(Call) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +203.914 642.291 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.533 642.291 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 620.374 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-269 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-270 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-269 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-270 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-269 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-270 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-269 TJm +(\002ts) +[5.539206 +0 +2.769603 +0 +3.875451 +0] Tj +-270 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-269 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-270 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-269 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-270 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-269 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-270 TJm +(once,) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-274 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-269 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-270 TJm +(skip) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-269 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-270 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-269 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +456.314 620.374 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +72 608.418 Td +(\() +[5.97756 +0] Tj +-600 TJm +(...,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(BZ_RUN) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +164.154 608.418 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +225.036 608.418 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(\() +[5.97756 +0] Tj +-600 TJm +(...,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(BZ_FINISH) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +424.786 608.418 Td +/F15_0 9.9626 Tf +(calls.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 586.501 Td +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-278 TJm +(required) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-277 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-278 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-277 TJm +(allocated) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-278 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +220.295 586.501 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +327.891 586.501 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-785 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-278 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-277 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-278 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-277 TJm +(accept) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-278 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-277 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-278 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-278 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +72 574.545 Td +(\(ob) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(viously\).) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +-612 TJm +(So) +[5.539206 +0 +4.9813 +0] Tj +-238 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-237 TJm +(shouldn') +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-238 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-238 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-237 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-238 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-238 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-238 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-237 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +339.287 574.545 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +425.342 574.545 Td +/F15_0 9.9626 Tf +(calls.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-612 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-237 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-238 TJm +(do,) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-238 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-238 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 562.59 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +173.619 562.59 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(programming.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 540.672 Td +(T) +[6.087149 +0] Tj +35 TJm +(ri) +[3.317546 +0 +2.769603 +0] Tj +25 TJm +(vial) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(possible) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 501.654] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 529.151 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 517.196 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm->s) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 471.033 Td +/F9_0 17.2154 Tf +(3.3.3.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzCompressEnd) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0 +11.482672 +0 +10.518609 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 442.563] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 458.104 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +286.303 456.361 Td +(*) +[5.97756 +0] Tj +292.281 458.104 Td +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 420.645 Td +/F15_0 9.9626 Tf +(Releases) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(associated) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 398.727 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 361.766] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 389.263 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm->s) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 377.307 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-4686 TJm +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 331.145 Td +/F9_0 17.2154 Tf +(3.3.4.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzDecompressInit) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0 +4.785881 +0 +10.518609 +0 +4.785881 +0 +5.732728 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 302.674] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 318.216 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzDecompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +304.236 316.473 Td +(*) +[5.97756 +0] Tj +310.214 318.216 Td +(strm,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 280.757 Td +/F15_0 9.9626 Tf +(Prepares) +[5.539206 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +-351 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-351 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-1228 TJm +(As) +[7.192997 +0 +3.875451 +0] Tj +-351 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +235.177 280.757 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +342.773 280.757 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-377 TJm +(a) +[4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +356.937 280.757 Td +/F17_0 9.9626 Tf +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +414.235 280.757 Td +/F15_0 9.9626 Tf +(record) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-351 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-351 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-352 TJm +(allocated) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-351 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 268.801 Td +(initialised) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-306 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-305 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-306 TJm +(call.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-953 TJm +(Fields) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +211.833 268.801 Td +/F17_0 9.9626 Tf +(bzalloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +253.676 268.801 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +259.35 268.801 Td +/F17_0 9.9626 Tf +(bzfree) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +298.26 268.801 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +315.69 268.801 Td +/F17_0 9.9626 Tf +(opaque) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +354.6 268.801 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-306 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-305 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-306 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-305 TJm +(a) +[4.423394 +0] Tj +-306 TJm +(custom) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-305 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-306 TJm +(allocator) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-306 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 256.846 Td +(required,) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-350 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-331 TJm +(made) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +147.635 256.846 Td +/F17_0 9.9626 Tf +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +174.836 256.846 Td +/F15_0 9.9626 Tf +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-330 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-331 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +236.722 256.846 Td +/F17_0 9.9626 Tf +(malloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +275.878 256.846 Td +/F15_0 9.9626 Tf +(/) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +281.938 256.846 Td +/F17_0 9.9626 Tf +(free) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +309.139 256.846 Td +/F15_0 9.9626 Tf +(routines.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-1102 TJm +(Upon) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-330 TJm +(return,) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-350 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-331 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-330 TJm +(state) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-330 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-330 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-331 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 244.891 Td +(initialised,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +133.16 244.891 Td +/F17_0 9.9626 Tf +(total_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +183.471 244.891 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.348 244.891 Td +/F17_0 9.9626 Tf +(total_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +256.637 244.891 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(zero.) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 222.973 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(meaning) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(parameter) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +192.756 222.973 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +246.554 222.973 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +266.748 222.973 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +374.345 222.973 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 201.055 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.497 201.055 Td +/F17_0 9.9626 Tf +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +114.248 201.055 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-287 TJm +(nonzero,) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-297 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-288 TJm +(wil) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(l) +[2.769603 +0] Tj +-288 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-287 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-287 TJm +(alternati) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-288 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-287 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-287 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-288 TJm +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-287 TJm +(less) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-287 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-287 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-288 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-287 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 189.1 Td +(cost) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-289 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-290 TJm +(decompressing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-289 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wly) +[7.192997 +0 +2.769603 +0 +4.9813 +0] Tj +-290 TJm +(\(roughly) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-289 TJm +(speaking,) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-299 TJm +(half) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(speed,) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-299 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(maximum) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +7.750903 +0] Tj +-289 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-289 TJm +(requirement) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-290 TJm +(drops) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +72 177.145 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(around) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(2300k\).) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +-620 TJm +(See) +[5.539206 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +([2]) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(information) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(management.) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 155.227 Td +(Note) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-289 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-289 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-290 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-289 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-289 TJm +(a) +[4.423394 +0] Tj +-290 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-289 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-289 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-289 TJm +(determined) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(stream') +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-289 TJm +(header) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-290 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +72 143.272 Td +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-342 TJm +(read,) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-366 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-342 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-342 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.081 143.272 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +284.043 143.272 Td +/F15_0 9.9626 Tf +(succeeds,) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-365 TJm +(a) +[4.423394 +0] Tj +-343 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +381.098 143.272 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +480.149 143.272 Td +/F15_0 9.9626 Tf +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-342 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ail) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-343 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 131.317 Td +/F17_0 9.9626 Tf +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +143.731 131.317 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 109.399 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(16) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 17 20 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 624.359] cm +0 0 468 95.641 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(library) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(mis-compiled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 687.721 Td +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(&&) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +98.488 663.811 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<;) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(||) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(4\)) +[5.97756 +0 +5.97756 +0] Tj +90 651.856 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 639.9 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(insufficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 602.441 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 553.524] cm +0 0 468 47.821 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 592.976 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 581.021 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(returned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 569.066 Td +(no) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(specific) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(action) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(required) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(case) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 522.903 Td +/F9_0 17.2154 Tf +(3.3.5.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzDecompress) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 494.433] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 509.975 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +280.326 508.231 Td +(*) +[5.97756 +0] Tj +286.303 509.975 Td +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 472.515 Td +/F15_0 9.9626 Tf +(Pro) +[5.539206 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vides) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-301 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-302 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-301 TJm +(and/out) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-302 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-301 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-301 TJm +(space) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-302 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-301 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-302 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-928 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-301 TJm +(caller) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-302 TJm +(maintains) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-301 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-302 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-301 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-301 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fers,) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +-315 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 460.56 Td +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +91.646 460.56 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.778 460.56 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(transfer) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(them.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 438.642 Td +(Before) +[6.645054 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-498 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-499 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-498 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.356 438.642 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +254.997 438.642 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +263.071 438.642 Td +/F17_0 9.9626 Tf +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +309.879 438.642 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-498 TJm +(point) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-499 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-498 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-498 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-499 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-560 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +492.179 438.642 Td +/F17_0 9.9626 Tf +(avail_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 426.687 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-308 TJm +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-308 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-309 TJm +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-308 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-308 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-308 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-308 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-309 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +294.955 426.687 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +393.667 426.687 Td +/F15_0 9.9626 Tf +(updates) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +427.173 426.687 Td +/F17_0 9.9626 Tf +(next_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +469.016 426.687 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +474.723 426.687 Td +/F17_0 9.9626 Tf +(avail_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +525.614 426.687 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 414.732 Td +/F17_0 9.9626 Tf +(total_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +122.311 414.732 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(re\003ect) +[3.317546 +0 +4.423394 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 392.814 Td +(Similarly) +[5.539206 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +113.799 392.814 Td +/F17_0 9.9626 Tf +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +164.41 392.814 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-280 TJm +(point) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-280 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-280 TJm +(a) +[4.423394 +0] Tj +-280 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-281 TJm +(i) +[2.769603 +0] Tj +1 TJm +(n) +[4.9813 +0] Tj +-281 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-280 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-280 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-280 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-280 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-280 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-280 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-280 TJm +(placed,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-288 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +486.202 392.814 Td +/F17_0 9.9626 Tf +(avail_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 380.859 Td +/F15_0 9.9626 Tf +(indicating) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-525 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-524 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-525 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-524 TJm +(space) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-525 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-525 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +285.792 380.859 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +374.705 380.859 Td +/F15_0 9.9626 Tf +(updates) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +410.367 380.859 Td +/F17_0 9.9626 Tf +(next_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +458.188 380.859 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +466.589 380.859 Td +/F17_0 9.9626 Tf +(avail_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +525.614 380.859 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 368.904 Td +/F17_0 9.9626 Tf +(total_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +128.289 368.904 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(re\003ect) +[3.317546 +0 +4.423394 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(output.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 346.986 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-320 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-321 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vide) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-320 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-321 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-320 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-321 TJm +(little) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-320 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-320 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-321 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-320 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-321 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-320 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-321 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-320 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-320 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-321 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-320 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +407.816 346.986 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +503.457 346.986 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1043 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-320 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 335.031 Td +(limit,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-295 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-286 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-287 TJm +(acceptable) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-286 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-286 TJm +(supply) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-286 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-287 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-286 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-286 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-286 TJm +(byte) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-287 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-286 TJm +(a) +[4.423394 +0] Tj +-286 TJm +(time,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-295 TJm +(although) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-286 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-287 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-286 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-286 TJm +(terribly) +[2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-286 TJm +(inef) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +25 TJm +(\002cient.) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-838 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +72 323.076 Td +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(al) +[4.423394 +0 +2.769603 +0] Tj +10 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ays) +[4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(ensure) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(least) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(byte) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(space) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(call.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 301.158 Td +(Use) +[7.192997 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +100.772 301.158 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +198.904 301.158 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(simpler) +[3.875451 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +260.064 301.158 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +343.75 301.158 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 279.24 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-346 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-347 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vide) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-346 TJm +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-346 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-346 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-347 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-346 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-346 TJm +(described) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-346 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +-371 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-346 TJm +(repeatedly) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-346 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +422.638 279.24 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +521.729 279.24 Td +/F15_0 9.9626 Tf +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 267.285 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +152.314 267.285 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-262 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-344 TJm +(Appearance) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-262 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +261.767 267.285 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +342.081 267.285 Td +/F15_0 9.9626 Tf +(denotes) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-262 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +392.672 267.285 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +490.919 267.285 Td +/F15_0 9.9626 Tf +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-262 TJm +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +72 255.33 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-212 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-212 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-211 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-212 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-212 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-212 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +237.858 255.33 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +335.609 255.33 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-212 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-212 TJm +(produce) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +402.263 255.33 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +482.082 255.33 Td +/F15_0 9.9626 Tf +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-212 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-212 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +72 243.375 Td +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-256 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-256 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-255 TJm +(placed) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-256 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-256 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-256 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-256 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-257 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-256 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +278.979 243.375 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +359.236 243.375 Td +/F15_0 9.9626 Tf +(appears,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +-257 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-256 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-256 TJm +(guaranteed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-256 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-255 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-256 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +72 231.419 Td +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(decompressed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(output,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +205.369 231.419 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +321.433 231.419 Td +/F15_0 9.9626 Tf +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(safely) +[3.875451 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(called.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 209.502 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-250 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +261.259 209.502 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +377.323 209.502 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(clean) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(release) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 187.584 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(17) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 18 21 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 540.672] cm +0 0 468 179.328 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm->s) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 687.721 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm->avail_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +90 675.766 Td +(BZ_DATA_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 663.811 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(a) +[5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(integrity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(detected) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 651.856 Td +(BZ_DATA_ERROR_MAGIC) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 639.9 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(doesn't) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(begin) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(right) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(magic) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bytes) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 627.945 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 615.99 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(there) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(wasn't) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(enough) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 604.035 Td +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 592.08 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(logical) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(end) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(detected) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(all) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 580.124 Td +(output) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(consumed,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(eg) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(s-->avail_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +90 568.169 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 556.214 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 518.755 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 457.883] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 509.29 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 497.335 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(returned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 485.38 Td +(BZ2_bzDecompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 473.425 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 427.262 Td +/F9_0 17.2154 Tf +(3.3.6.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzDecompressEnd) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0 +11.482672 +0 +10.518609 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 398.792] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 414.334 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzDecompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +298.259 412.59 Td +(*) +[5.97756 +0] Tj +304.236 414.334 Td +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 376.874 Td +/F15_0 9.9626 Tf +(Releases) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(associated) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 354.956 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 294.085] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 345.492 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 333.537 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(strm->s) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 321.581 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 309.626 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 272.167 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 247.161] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +98.488 262.702 Td +/F17_0 9.9626 Tf +(None.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 212.408 Td +/F9_0 20.6585 Tf +(3.4.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(High-le) +[14.915437 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0 +6.879281 +0 +5.743063 +0 +11.486126 +0] Tj +15 TJm +(vel) +[11.486126 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(interface) +[5.743063 +0 +12.622344 +0 +6.879281 +0 +11.486126 +0 +8.036157 +0 +6.879281 +0 +11.486126 +0 +11.486126 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 190.49 Td +/F15_0 9.9626 Tf +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vides) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(writing) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +300.292 190.49 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +332.67 190.49 Td +/F15_0 9.9626 Tf +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-620 TJm +(First,) +[5.539206 +0 +2.769603 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(general) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(points.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 158.609 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-353 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-352 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-353 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-352 TJm +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-353 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +199.726 158.609 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.658 156.866 Td +(*) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +227.149 158.609 Td +/F15_0 9.9626 Tf +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-353 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(gument,) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +289.871 158.609 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +331.715 158.609 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1236 TJm +(After) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-352 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-353 TJm +(call,) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +413.457 158.609 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +458.813 158.609 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-353 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-352 TJm +(consulted) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +81.963 146.654 Td +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-371 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-371 TJm +(determine) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-372 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-371 TJm +(outcome) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-371 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-371 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-372 TJm +(call.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-1347 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +278.539 146.654 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +324.081 146.654 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +334.424 146.654 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +364.312 146.654 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-371 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-372 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-371 TJm +(completed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-371 TJm +(successfully) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-402 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-371 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +81.963 134.699 Td +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-292 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-293 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-292 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-292 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-293 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-292 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-292 TJm +(function) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-293 TJm +(\(if) +[3.317546 +0 +2.769603 +0 +3.317546 +0] Tj +-292 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y\)) +[4.9813 +0 +3.317546 +0] Tj +-292 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-293 TJm +(consulted.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-874 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.994 134.699 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +408.749 134.699 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +418.307 134.699 Td +/F17_0 9.9626 Tf +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +484.06 134.699 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-292 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-293 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-292 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +81.963 122.744 Td +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-279 TJm +(reading/writ) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(ing) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(underlying) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-278 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-285 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-278 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(consult) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +412.785 122.744 Td +/F17_0 9.9626 Tf +(errno) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +445.448 122.744 Td +/F15_0 9.9626 Tf +(/) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +450.993 122.744 Td +/F17_0 9.9626 Tf +(perror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +489.634 122.744 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-279 TJm +(determine) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +81.963 110.789 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-376 TJm +(cause) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-376 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-377 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-376 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(\002culty) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +203.58 110.789 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +249.171 110.789 Td +/F15_0 9.9626 Tf +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-376 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-376 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-377 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-376 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-376 TJm +(v) +[4.9813 +0] Tj +25 TJm +(arious) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-376 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-377 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues;) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-439 TJm +(precise) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-376 TJm +(details) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-376 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-377 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-376 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-376 TJm +(a) +[4.423394 +0] Tj +81.963 98.834 Td +(per) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-function) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(basis) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(belo) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(18) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 19 22 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +74.491 710.037 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +91.793 710.037 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +136.332 710.037 Td +/F15_0 9.9626 Tf +(indicates) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-271 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-270 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-271 TJm +(\(ie,) +[3.317546 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-276 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(ything) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-271 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xcept) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +290.317 710.037 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +322.901 710.037 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +339.984 710.037 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +417.693 710.037 Td +/F15_0 9.9626 Tf +(\),) +[3.317546 +0 +2.49065 +0] Tj +-271 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-270 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-271 TJm +(immediately) +[2.769603 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-271 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 698.082 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +173.971 698.082 Td +/F15_0 9.9626 Tf +(\(or) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +187.932 698.082 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +283.573 698.082 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-238 TJm +(depending) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-236 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-235 TJm +(whether) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-235 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-236 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-235 TJm +(attempting) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-235 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-236 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-235 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-235 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-236 TJm +(write\)) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-235 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +81.963 686.127 Td +(free) +[3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-309 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-309 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-309 TJm +(resources) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-310 TJm +(associated) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-309 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-309 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-309 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-975 TJm +(Once) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-309 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-310 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-309 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-309 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-309 TJm +(indicated,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-324 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-309 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-309 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-310 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-309 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xcept) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 674.172 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +175.035 674.172 Td +/F15_0 9.9626 Tf +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +178.352 674.172 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +273.994 674.172 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-342 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-342 TJm +(unde\002ned.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1173 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-342 TJm +(implication) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-342 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-342 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-342 TJm +(\(1\)) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +455.366 674.172 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +500.617 674.172 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-342 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +81.963 662.217 Td +(check) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +-331 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-331 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-331 TJm +(call,) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-351 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-331 TJm +(\(2\)) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-331 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +223.255 662.217 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +268.396 662.217 Td +/F15_0 9.9626 Tf +(indicates) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-331 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-331 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +344.762 662.217 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +437.724 662.217 Td +/F15_0 9.9626 Tf +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +441.041 662.217 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +536.682 662.217 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +81.963 650.261 Td +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(called) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(clean) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(up.) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 628.344 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +100.186 628.344 Td +/F17_0 9.9626 Tf +(FILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +124.097 626.6 Td +(*) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +132.308 628.344 Td +/F15_0 9.9626 Tf +(ar) +[4.423394 +0 +3.317546 +0] Tj +18 TJm +(guments) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-224 TJm +(passed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-224 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +214.645 628.344 Td +/F17_0 9.9626 Tf +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +300.565 628.344 Td +/F15_0 9.9626 Tf +(/) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.569 628.344 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +397.466 628.344 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-224 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-224 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-225 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-224 TJm +(binary) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-224 TJm +(mode.) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-603 TJm +(Most) +[8.856751 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +81.963 616.389 Td +(Unix) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-269 TJm +(systems) +[3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-270 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-269 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-269 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-270 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-269 TJm +(def) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +10 TJm +(ault,) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-274 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-270 TJm +(ot) +[4.9813 +0 +2.769603 +0] Tj +1 TJm +(her) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-270 TJm +(platforms,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-274 TJm +(including) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-269 TJm +(W) +[9.404694 +0] Tj +40 TJm +(indo) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-270 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-269 TJm +(Mac,) +[8.856751 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-274 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-270 TJm +(not.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-736 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-269 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-269 TJm +(omit) +[4.9813 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0] Tj +-270 TJm +(this,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +81.963 604.433 Td +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(encounter) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-250 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(mo) +[7.750903 +0 +4.9813 +0] Tj +15 TJm +(ving) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(platforms.) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 582.516 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(Memory) +[8.856751 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-369 TJm +(allocation) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-370 TJm +(requests) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-369 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-370 TJm +(handled) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-369 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +264.468 582.516 Td +/F17_0 9.9626 Tf +(malloc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +304.014 582.516 Td +/F15_0 9.9626 Tf +(/) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +310.465 582.516 Td +/F17_0 9.9626 Tf +(free) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +334.376 582.516 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1337 TJm +(At) +[7.192997 +0 +2.769603 +0] Tj +-370 TJm +(present) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-369 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-370 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-369 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-370 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acility) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-369 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-370 TJm +(user) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-de\002ned) +[3.317546 +0 +4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +81.963 570.56 Td +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(allocators) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(\(could) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(easily) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(added,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(though\).) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 529.977 Td +/F9_0 17.2154 Tf +(3.4.1.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzReadOpen) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +13.393581 +0 +10.518609 +0 +9.571762 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 453.686] cm +0 0 468 71.731 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 517.048 Td +/F17_0 9.9626 Tf +(typedef) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 493.138 Td +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +130.109 491.394 Td +(*) +[5.97756 +0] Tj +136.087 493.138 Td +(BZ2_bzReadOpen\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +252.171 491.394 Td +(*) +[5.97756 +0] Tj +258.149 493.138 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(FILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +338.368 491.394 Td +(*) +[5.97756 +0] Tj +344.346 493.138 Td +(f,) +[5.97756 +0 +5.97756 +0] Tj +191.855 481.183 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(small,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +191.855 469.228 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +220.01 467.484 Td +(*) +[5.97756 +0] Tj +225.987 469.228 Td +(unused,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 431.768 Td +/F15_0 9.9626 Tf +(Prepare) +[5.539206 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-290 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-289 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-290 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(handle) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +272.697 431.768 Td +/F17_0 9.9626 Tf +(f) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +278.675 431.768 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +285.439 431.768 Td +/F17_0 9.9626 Tf +(f) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +294.302 431.768 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-290 TJm +(refer) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-289 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-290 TJm +(a) +[4.423394 +0] Tj +-290 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-289 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-290 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(opened) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-290 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-289 TJm +(reading,) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-300 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 419.813 Td +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-306 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-305 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-306 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-306 TJm +(indicator) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-305 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +193.457 419.813 Td +/F17_0 9.9626 Tf +(ferror\(f\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +247.255 419.813 Td +/F15_0 9.9626 Tf +(\)is) +[3.317546 +0 +2.769603 +0 +3.875451 +0] Tj +-306 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-305 TJm +(set.) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-954 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +308.784 419.813 Td +/F17_0 9.9626 Tf +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +341.717 419.813 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-306 TJm +(1,) +[4.9813 +0 +2.49065 +0] Tj +-319 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-306 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-306 TJm +(wil) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(l) +[2.769603 +0] Tj +-306 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-306 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-305 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-306 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-306 TJm +(less) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +72 407.858 Td +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xpense) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(speed.) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 385.94 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-227 TJm +(reasons) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-227 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xplained) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(belo) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.193 385.94 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +251.232 385.94 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-227 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-227 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +332.732 385.94 Td +/F17_0 9.9626 Tf +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +376.838 385.94 Td +/F15_0 9.9626 Tf +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-227 TJm +(starting) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-227 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +441.74 385.94 Td +/F17_0 9.9626 Tf +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +477.605 385.94 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-232 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-227 TJm +(starting) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 373.985 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-280 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-280 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-279 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +155.094 373.985 Td +/F17_0 9.9626 Tf +(f) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.072 373.985 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-797 TJm +(At) +[7.192997 +0 +2.769603 +0] Tj +-280 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +206.414 373.985 Td +/F17_0 9.9626 Tf +(BZ_MAX_UNUSED) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +286.907 373.985 Td +/F15_0 9.9626 Tf +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-280 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-280 TJm +(supplied) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-279 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-280 TJm +(this.) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-797 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-279 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-280 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acility) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-279 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-280 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-279 TJm +(required,) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 362.03 Td +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(pass) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +138.141 362.03 Td +/F17_0 9.9626 Tf +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +164.542 362.03 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +181.419 362.03 Td +/F17_0 9.9626 Tf +(0) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.887 362.03 Td +/F15_0 9.9626 Tf +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +203.994 362.03 Td +/F17_0 9.9626 Tf +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +242.35 362.03 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(n) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +264.208 362.03 Td +/F17_0 9.9626 Tf +(Unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +302.565 362.03 Td +/F15_0 9.9626 Tf +(respecti) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ely) +[4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 340.112 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(meaning) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(parameters) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +196.631 340.112 Td +/F17_0 9.9626 Tf +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +229.01 340.112 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +245.887 340.112 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +299.685 340.112 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +319.879 340.112 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +439.431 340.112 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 318.194 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-402 TJm +(amount) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-402 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-402 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-402 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-402 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-402 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-402 TJm +(a) +[4.423394 +0] Tj +-401 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-402 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-402 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-402 TJm +(determined) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-402 TJm +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-402 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-402 TJm +(\002le') +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-402 TJm +(header) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-402 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-402 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-402 TJm +(read.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 306.239 Td +(So) +[5.539206 +0 +4.9813 +0] Tj +-492 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-491 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-492 TJm +(possible) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-492 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +166.797 306.239 Td +/F17_0 9.9626 Tf +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +255.381 306.239 Td +/F15_0 9.9626 Tf +(returns) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +287.946 306.239 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +322.729 306.239 Td +/F15_0 9.9626 Tf +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-492 TJm +(a) +[4.423394 +0] Tj +-491 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-492 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-492 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +431.135 306.239 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +495.81 306.239 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-492 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 294.284 Td +/F17_0 9.9626 Tf +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +143.731 294.284 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 272.366 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 272.366 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 272.366 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 101.84] cm +0 0 468 167.372 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 260.844 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 248.889 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(library) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(mis-compiled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 236.934 Td +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 224.979 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(f) +[5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 213.023 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(neither) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(nor) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +98.488 201.068 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(==) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(&&) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +98.488 189.113 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(&&) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!\(0) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_MAX_UNUSED\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +90 177.158 Td +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 165.203 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(ferror\(f\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nonzero) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 153.248 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 141.292 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(insufficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 129.337 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 117.382 Td +(otherwise.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 79.922 Td +/F15_0 9.9626 Tf +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 51.071 Td +(19) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 20 23 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 660.224] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(Pointer) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(an) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(abstract) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 687.721 Td +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 638.306 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 577.435] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 628.842 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 616.887 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 604.932 Td +(BZ2_bzClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 592.976 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 546.814 Td +/F9_0 17.2154 Tf +(3.4.2.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzRead) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 519.841] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 535.383 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +208.595 533.639 Td +(*) +[5.97756 +0] Tj +214.572 535.383 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +306.747 533.639 Td +(*) +[5.97756 +0] Tj +312.724 535.383 Td +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +357.078 533.639 Td +(*) +[5.97756 +0] Tj +363.055 535.383 Td +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 497.923 Td +/F15_0 9.9626 Tf +(Reads) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-285 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-284 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +122.569 497.923 Td +/F17_0 9.9626 Tf +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +143.337 497.923 Td +/F15_0 9.9626 Tf +(\(uncompressed\)) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +-285 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-284 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-285 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-284 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +336.319 497.923 Td +/F17_0 9.9626 Tf +(b) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +345.132 497.923 Td +/F15_0 9.9626 Tf +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-285 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-284 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +405.205 497.923 Td +/F17_0 9.9626 Tf +(buf) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +423.137 497.923 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-828 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-284 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-285 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-285 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-284 TJm +(successful,) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 485.968 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +117.36 485.968 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-353 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-353 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +153.374 485.968 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +186.778 485.968 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-353 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-353 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-353 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-353 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-353 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-353 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-353 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1238 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-353 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-353 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-353 TJm +(end-of-stream) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-353 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-353 TJm +(detected,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 474.013 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +116.795 474.013 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-296 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-297 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-296 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +172.328 474.013 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +250.037 474.013 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-296 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-296 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-296 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-297 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-296 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-296 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-296 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-898 TJm +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-297 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +470 474.013 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +514.795 474.013 Td +/F15_0 9.9626 Tf +(v) +[4.9813 +0] Tj +25 TJm +(alues) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +72 462.058 Td +(denote) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 440.14 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +134.224 440.14 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-246 TJm +(supply) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +181.193 440.14 Td +/F17_0 9.9626 Tf +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +201.575 440.14 Td +/F15_0 9.9626 Tf +(bytes,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-247 TJm +(unless) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-245 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-246 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-246 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-246 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-245 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-246 TJm +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-246 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-246 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-245 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-246 TJm +(occurs.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +-617 TJm +(Because) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-246 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-246 TJm +(this,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-247 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +72 428.185 Td +(is) +[2.769603 +0 +3.875451 +0] Tj +-231 TJm +(possible) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-231 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-231 TJm +(detect) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-231 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-231 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-231 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-232 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-231 TJm +(observing) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-231 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-231 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-231 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-231 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-231 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-231 TJm +(returned) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-231 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-231 TJm +(less) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-231 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-232 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-231 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-231 TJm +(requested.) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 416.23 Td +(Ne) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ertheless,) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-309 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-297 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-298 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(arded) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-297 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-297 TJm +(inadvisable;) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-321 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-298 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-297 TJm +(instead) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-297 TJm +(check) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +360.631 416.23 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +405.437 416.23 Td +/F15_0 9.9626 Tf +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-297 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-298 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-297 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(w) +[7.192997 +0] Tj +10 TJm +(atch) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-298 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-297 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 404.275 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +149.709 404.275 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 382.357 Td +(Internally) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +117.541 382.357 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +181.786 382.357 Td +/F15_0 9.9626 Tf +(copies) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-449 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-448 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-449 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-448 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-449 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-449 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-448 TJm +(chunks) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-449 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-448 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +419.602 382.357 Td +/F17_0 9.9626 Tf +(BZ_MAX_UNUSED) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +501.778 382.357 Td +/F15_0 9.9626 Tf +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-449 TJm +(be-) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +72 370.402 Td +(fore) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-414 TJm +(decompressing) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-414 TJm +(it.) +[2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-1605 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-415 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-414 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-414 TJm +(contains) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-414 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-414 TJm +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-415 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-414 TJm +(strictly) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-414 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-414 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-414 TJm +(reach) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-414 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-415 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-414 TJm +(end-of-stream,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 358.446 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +134.749 358.446 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-298 TJm +(almost) +[4.423394 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-299 TJm +(certainly) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-298 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-299 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-298 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-299 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-298 TJm +(trailing) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-299 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-298 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-298 TJm +(signalling) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +413.162 358.446 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +502.826 358.446 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-597 TJm +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-298 TJm +(col-) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +72 346.491 Td +(lect) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-242 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-243 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-242 TJm +(unused) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-242 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-242 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +208.759 346.491 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +300.835 346.491 Td +/F15_0 9.9626 Tf +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-242 TJm +(appeared,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-244 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +374.201 346.491 Td +/F17_0 9.9626 Tf +(BZ2_bzReadGetUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +490.188 346.491 Td +/F15_0 9.9626 Tf +(immediately) +[2.769603 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +72 334.536 Td +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +99.935 334.536 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +189.599 334.536 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 312.618 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 312.618 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 312.618 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(20) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 21 24 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 456.986] cm +0 0 468 263.014 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +90 687.721 Td +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(opened) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 663.811 Td +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 651.856 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(there) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(an) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(reading) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(file) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 639.9 Td +(BZ_UNEXPECTED_EOF) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 627.945 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(file) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(ended) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(before) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 615.99 Td +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(logical) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(end-of-stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(detected) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 604.035 Td +(BZ_DATA_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 592.08 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(a) +[5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(integrity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(detected) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 580.124 Td +(BZ_DATA_ERROR_MAGIC) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 568.169 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(does) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(begin) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(requisite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(header) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bytes) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 556.214 Td +(\(ie,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(a) +[5.97756 +0] Tj +-426 TJm +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(file\).) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(This) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(really) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 544.259 Td +(a) +[5.97756 +0] Tj +-426 TJm +(special) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(case) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_DATA_ERROR.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 532.304 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 520.349 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(insufficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 508.393 Td +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 496.438 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(logical) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(end) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(detected.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 484.483 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 472.528 Td +(otherwise.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 435.068 Td +/F15_0 9.9626 Tf +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 374.197] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 425.604 Td +/F17_0 9.9626 Tf +(number) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bytes) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(read) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 413.649 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 401.694 Td +(undefined) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 389.739 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 352.279 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 267.497] cm +0 0 468 83.686 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 342.815 Td +/F17_0 9.9626 Tf +(collect) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(then) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 330.859 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 318.904 Td +(collect) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(then) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadGetUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 306.949 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_SEQUENCE_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 294.994 Td +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 283.039 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 236.876 Td +/F9_0 17.2154 Tf +(3.4.3.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzReadGetUn) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +13.393581 +0 +9.571762 +0 +5.732728 +0 +12.429519 +0 +10.518609 +0] Tj +10 TJm +(used) +[10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 197.948] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 225.445 Td +/F17_0 9.9626 Tf +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadGetUnused\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +259.883 223.702 Td +(*) +[5.97756 +0] Tj +270.104 225.445 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +362.278 223.702 Td +(*) +[5.97756 +0] Tj +368.256 225.445 Td +(b,) +[5.97756 +0 +5.97756 +0] Tj +200.343 213.49 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +224.254 211.747 Td +(**) +[5.97756 +0 +5.97756 +0] Tj +240.453 213.49 Td +(unused,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +304.473 211.747 Td +(*) +[5.97756 +0] Tj +314.694 213.49 Td +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 176.031 Td +/F15_0 9.9626 Tf +(Returns) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-435 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-435 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-435 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-435 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-435 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-435 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-435 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-435 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-435 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-435 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-435 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-435 TJm +(needed) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-435 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-435 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-435 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-435 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-435 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-435 TJm +(end-of-stream.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 162.332 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +77.978 164.075 Td +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +117.2 164.075 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-337 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-337 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-337 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-337 TJm +(address) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-337 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-336 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-337 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-359 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +269.089 162.332 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +275.067 164.075 Td +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +320.267 164.075 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-337 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-337 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-337 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-337 TJm +(bytes.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +427.247 162.332 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +433.225 164.075 Td +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +478.425 164.075 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-337 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-337 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-337 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-337 TJm +(a) +[4.423394 +0] Tj +72 152.12 Td +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +131.506 152.12 Td +/F17_0 9.9626 Tf +(0) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +139.975 152.12 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +156.851 152.12 Td +/F17_0 9.9626 Tf +(BZ_MAX_UNUSED) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +237.05 152.12 Td +/F15_0 9.9626 Tf +(inclusi) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e.) +[4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 130.202 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-882 TJm +(function) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-883 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-882 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-883 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-882 TJm +(called) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-883 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +271.332 130.202 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +339.9 130.202 Td +/F15_0 9.9626 Tf +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-882 TJm +(signalled) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +406.737 130.202 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +493.231 130.202 Td +/F15_0 9.9626 Tf +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-882 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 118.247 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.664 118.247 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 96.329 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 96.329 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 96.329 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.852 Td +(21) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 22 25 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 612.403] cm +0 0 468 107.597 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 687.721 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 675.766 Td +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 663.811 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(not) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(signalled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 651.856 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(opened) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzWriteOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 639.9 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 627.945 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 590.486 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 565.48] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 581.021 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 534.858 Td +/F9_0 17.2154 Tf +(3.4.4.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzReadClose) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +12.429519 +0 +4.785881 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 507.886] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 523.428 Td +/F17_0 9.9626 Tf +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +244.46 521.684 Td +(*) +[5.97756 +0] Tj +250.438 523.428 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +342.612 521.684 Td +(*) +[5.97756 +0] Tj +348.59 523.428 Td +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 485.968 Td +/F15_0 9.9626 Tf +(Releases) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-430 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-429 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-430 TJm +(pertaining) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-429 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-430 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-429 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-430 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +304.352 485.968 Td +/F17_0 9.9626 Tf +(b) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +310.33 485.968 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +321.276 485.968 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +415.22 485.968 Td +/F15_0 9.9626 Tf +(does) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-430 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-429 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +473.438 485.968 Td +/F17_0 9.9626 Tf +(fclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +513.583 485.968 Td +/F15_0 9.9626 Tf +(on) +[4.9813 +0 +4.9813 +0] Tj +-430 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 474.013 Td +(underlying) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-264 TJm +(handle,) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-267 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-264 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-264 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-264 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-264 TJm +(yourself) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-264 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-263 TJm +(appropriate.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +348.653 474.013 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +440.946 474.013 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-264 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-264 TJm +(called) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-264 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-264 TJm +(clean) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 462.058 Td +(up) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(situations.) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 440.14 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 440.14 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 440.14 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 377.211] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 428.618 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 416.663 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(opened) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzOpenWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 404.708 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 392.753 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 355.293 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 330.287] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 345.829 Td +/F17_0 9.9626 Tf +(none) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 299.666 Td +/F9_0 17.2154 Tf +(3.4.5.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzWriteOpen) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +16.251338 +0 +6.696791 +0 +4.785881 +0 +5.732728 +0 +9.571762 +0 +13.393581 +0 +10.518609 +0 +9.571762 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 247.286] cm +0 0 468 47.821 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 286.738 Td +/F17_0 9.9626 Tf +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +130.109 284.994 Td +(*) +[5.97756 +0] Tj +136.087 286.738 Td +(BZ2_bzWriteOpen\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +258.149 284.994 Td +(*) +[5.97756 +0] Tj +264.127 286.738 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(FILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +344.346 284.994 Td +(*) +[5.97756 +0] Tj +350.323 286.738 Td +(f,) +[5.97756 +0 +5.97756 +0] Tj +196.099 274.783 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize100k,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 262.827 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 225.368 Td +/F15_0 9.9626 Tf +(Prepare) +[5.539206 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-268 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-269 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-268 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-269 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-268 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-269 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-268 TJm +(handle) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +262.72 225.368 Td +/F17_0 9.9626 Tf +(f) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +268.698 225.368 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +274.829 225.368 Td +/F17_0 9.9626 Tf +(f) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +283.481 225.368 Td +/F15_0 9.9626 Tf +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-268 TJm +(refer) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-269 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-268 TJm +(a) +[4.423394 +0] Tj +-269 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-268 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-269 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-268 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-269 TJm +(opened) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-268 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-269 TJm +(writing,) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-273 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-268 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +72 213.413 Td +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(indicator) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.577 213.413 Td +/F17_0 9.9626 Tf +(ferror\(f\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +230.375 213.413 Td +/F15_0 9.9626 Tf +(\)is) +[3.317546 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(set.) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 191.495 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-223 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-224 TJm +(meaning) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-223 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-224 TJm +(parameters) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +195.306 191.495 Td +/F17_0 9.9626 Tf +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +273.015 191.495 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +277.784 191.495 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +333.808 191.495 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +350.42 191.495 Td +/F17_0 9.9626 Tf +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +410.196 191.495 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-229 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +429.913 191.495 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 191.495 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 169.577 Td +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-382 TJm +(required) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-382 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-382 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-382 TJm +(allocated) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-383 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-382 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-382 TJm +(stage,) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-415 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-382 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-382 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-382 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-382 TJm +(completes) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-382 TJm +(successfully) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +424.691 169.577 Td +/F17_0 9.9626 Tf +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +500.228 169.577 Td +/F15_0 9.9626 Tf +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-382 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +72 157.622 Td +(signalled) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +203.715 157.622 Td +/F17_0 9.9626 Tf +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +269.468 157.622 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 135.704 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 135.704 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 135.704 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.852 Td +(22) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 23 26 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 576.538] cm +0 0 468 143.462 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(library) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(mis-compiled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 687.721 Td +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(f) +[5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 663.811 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(9) +[5.97756 +0] Tj +90 651.856 Td +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 639.9 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(ferror\(f\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nonzero) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 627.945 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 615.99 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(insufficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 604.035 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 592.08 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 554.62 Td +/F15_0 9.9626 Tf +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 493.749] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 545.156 Td +/F17_0 9.9626 Tf +(Pointer) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(an) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(abstract) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 533.201 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 521.245 Td +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 509.29 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 471.831 Td +/F15_0 9.9626 Tf +(Allo) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(actions:) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 387.049] cm +0 0 468 83.686 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 462.366 Td +/F17_0 9.9626 Tf +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 450.411 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 438.456 Td +(\(you) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(could) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(go) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(directly) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzWriteClose,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(but) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(this) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(would) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(be) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(pretty) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +485.506 434.212 Td +/F430_0 9.9626 Tf +( ) +[9.9626 +0] Tj +493.808 434.212 Td +/F123_0 9.9626 Tf +(-) +[2.76761 +0] Tj +90 426.501 Td +/F17_0 9.9626 Tf +(pointless\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 414.546 Td +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 402.59 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 356.428 Td +/F9_0 17.2154 Tf +(3.4.6.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzWrite) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +16.251338 +0 +6.696791 +0 +4.785881 +0 +5.732728 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 329.455] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 344.997 Td +/F17_0 9.9626 Tf +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +220.55 343.254 Td +(*) +[5.97756 +0] Tj +226.528 344.997 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +318.702 343.254 Td +(*) +[5.97756 +0] Tj +324.679 344.997 Td +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +369.033 343.254 Td +(*) +[5.97756 +0] Tj +375.01 344.997 Td +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 307.537 Td +/F15_0 9.9626 Tf +(Absorbs) +[7.192997 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +107.696 307.537 Td +/F17_0 9.9626 Tf +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +128.119 307.537 Td +/F15_0 9.9626 Tf +(bytes) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +214.544 307.537 Td +/F17_0 9.9626 Tf +(buf) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +232.477 307.537 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(entually) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(written) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002le.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 285.62 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 285.62 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 285.62 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 174.87] cm +0 0 468 107.597 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 274.098 Td +/F17_0 9.9626 Tf +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 262.143 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +90 250.188 Td +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 238.232 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(opened) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 226.277 Td +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 214.322 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(there) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(an) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(writing) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(file.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 202.367 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 190.412 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 144.249 Td +/F9_0 17.2154 Tf +(3.4.7.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzWriteClose) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +16.251338 +0 +6.696791 +0 +4.785881 +0 +5.732728 +0 +9.571762 +0 +12.429519 +0 +4.785881 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +/F15_0 9.9626 Tf +(23) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 24 27 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 576.538] cm +0 0 468 143.462 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzWriteClose\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +246.194 709.888 Td +(*) +[5.97756 +0] Tj +252.172 711.631 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +340.102 709.888 Td +(*) +[5.97756 +0] Tj +350.323 711.631 Td +(f,) +[5.97756 +0 +5.97756 +0] Tj +187.611 699.676 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(abandon,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +187.611 687.721 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +257.609 685.978 Td +(*) +[5.97756 +0] Tj +267.83 687.721 Td +(nbytes_in,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +187.611 675.766 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +257.609 674.022 Td +(*) +[5.97756 +0] Tj +267.83 675.766 Td +(nbytes_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 651.856 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzWriteClose64\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +258.149 650.112 Td +(*) +[5.97756 +0] Tj +264.127 651.856 Td +(bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +352.057 650.112 Td +(*) +[5.97756 +0] Tj +362.278 651.856 Td +(f,) +[5.97756 +0 +5.97756 +0] Tj +196.099 639.9 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(abandon,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 627.945 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +266.097 626.202 Td +(*) +[5.97756 +0] Tj +276.318 627.945 Td +(nbytes_in_lo32,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 615.99 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +266.097 614.247 Td +(*) +[5.97756 +0] Tj +276.318 615.99 Td +(nbytes_in_hi32,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 604.035 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +266.097 602.291 Td +(*) +[5.97756 +0] Tj +276.318 604.035 Td +(nbytes_out_lo32,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +196.099 592.08 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +266.097 590.336 Td +(*) +[5.97756 +0] Tj +276.318 592.08 Td +(nbytes_out_hi32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 554.62 Td +/F15_0 9.9626 Tf +(Compresses) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-403 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-402 TJm +(\003ushes) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-403 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-403 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-402 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-403 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-402 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-403 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-403 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-402 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ar) +[4.423394 +0 +3.317546 +0] Tj +-403 TJm +(supplied) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-403 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +384.152 554.62 Td +/F17_0 9.9626 Tf +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +449.906 554.62 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-768 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-403 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-402 TJm +(end-of-) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0] Tj +72 542.665 Td +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-352 TJm +(mark) +[7.750903 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +10 TJm +(ers) +[4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-352 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-353 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-352 TJm +(written,) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-378 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-352 TJm +(subsequent) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-352 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-352 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +300.456 542.665 Td +/F17_0 9.9626 Tf +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +369.718 542.665 Td +/F15_0 9.9626 Tf +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-352 TJm +(ille) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(al.) +[4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-1234 TJm +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-352 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-352 TJm +(associated) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-352 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +72 530.71 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +151.411 530.71 Td +/F17_0 9.9626 Tf +(b) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.88 530.71 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(released.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +207.231 530.71 Td +/F17_0 9.9626 Tf +(fflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +245.587 530.71 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(called) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +422.771 530.71 Td +/F17_0 9.9626 Tf +(fclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +458.636 530.71 Td +/F15_0 9.9626 Tf +(') +[3.317546 +0] Tj +50 TJm +(d.) +[4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 508.792 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.574 508.792 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.155 508.792 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-295 TJm +(called) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-295 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-295 TJm +(clean) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-295 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-295 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-295 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-295 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-306 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-295 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-295 TJm +(action) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-295 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-295 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-295 TJm +(release) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-295 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-295 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-891 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-295 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +72 496.837 Td +(records) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-289 TJm +(codes) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-289 TJm +(issued) +[2.769603 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-289 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(vious) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-289 TJm +(calls,) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-299 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-289 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-289 TJm +(situation) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-289 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-289 TJm +(detected) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(automatically) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-427 TJm +(There) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-289 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-289 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-289 TJm +(attempt) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0] Tj +72 484.882 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-263 TJm +(complete) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-262 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-263 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(operation,) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-265 TJm +(nor) +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-263 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +258.308 484.882 Td +/F17_0 9.9626 Tf +(fflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +296.79 484.882 Td +/F15_0 9.9626 Tf +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-263 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-262 TJm +(\002le.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-696 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-263 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-263 TJm +(force) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-262 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-263 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-263 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-262 TJm +(happen) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +72 472.926 Td +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(passing) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(nonzero) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +305.015 472.926 Td +/F17_0 9.9626 Tf +(abandon) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +346.858 472.926 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 451.009 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +80.597 451.009 Td +/F17_0 9.9626 Tf +(nbytes_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +136.358 451.009 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-197 TJm +(non-null,) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +183.287 449.265 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +189.265 451.009 Td +(nbytes_in) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +245.025 451.009 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-197 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-197 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-197 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-197 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-197 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-197 TJm +(total) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-197 TJm +(v) +[4.9813 +0] Tj +20 TJm +(olume) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-197 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-197 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-197 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-197 TJm +(handled.) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-584 TJm +(Similarly) +[5.539206 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 439.053 Td +/F17_0 9.9626 Tf +(nbytes_out) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +134.716 439.053 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-295 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-295 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-295 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-295 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-295 TJm +(total) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-295 TJm +(v) +[4.9813 +0] Tj +20 TJm +(olume) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-295 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-296 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-295 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-295 TJm +(written.) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-890 TJm +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-295 TJm +(compatibility) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-295 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-295 TJm +(older) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-295 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-296 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +72 427.098 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-283 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +118.294 427.098 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +216.753 427.098 Td +/F15_0 9.9626 Tf +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-283 TJm +(yields) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-283 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-282 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(wer) +[7.192997 +0 +4.423394 +0 +3.317546 +0] Tj +-283 TJm +(32) +[4.9813 +0 +4.9813 +0] Tj +-283 TJm +(bits) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-283 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-283 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-282 TJm +(counts.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-817 TJm +(Use) +[7.192997 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +423.499 427.098 Td +/F17_0 9.9626 Tf +(BZ2_bzWriteClose64) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +533.913 427.098 Td +/F15_0 9.9626 Tf +(if) +[2.769603 +0 +3.317546 +0] Tj +72 415.143 Td +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(full) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(64) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(bit) +[4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(counts.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-620 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(tw) +[2.769603 +0 +7.192997 +0] Tj +10 TJm +(o) +[4.9813 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(otherwise) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +7.192997 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(absolutely) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(identical.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 393.225 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(assignments) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +169.144 393.225 Td +/F17_0 9.9626 Tf +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.987 393.225 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 306.386] cm +0 0 468 83.686 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 381.704 Td +/F17_0 9.9626 Tf +(BZ_SEQUENCE_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 369.749 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(opened) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 357.793 Td +(BZ_IO_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 345.838 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(there) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(an) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(writing) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(file) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 333.883 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 321.928 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 275.765 Td +/F9_0 17.2154 Tf +(3.4.8.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(Handling) +[12.429519 +0 +9.571762 +0 +10.518609 +0 +10.518609 +0 +4.785881 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0] Tj +-278 TJm +(embed) +[9.571762 +0 +15.304491 +0 +10.518609 +0 +9.571762 +0 +10.518609 +0] Tj +10 TJm +(ded) +[10.518609 +0 +9.571762 +0 +10.518609 +0] Tj +-278 TJm +(compressed) +[9.571762 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0] Tj +-278 TJm +(data) +[10.518609 +0 +9.571762 +0 +5.732728 +0 +9.571762 +0] Tj +-278 TJm +(streams) +[9.571762 +0 +5.732728 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +15.304491 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 253.847 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-203 TJm +(high-le) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-203 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-203 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acilitates) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-203 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-203 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +226.404 253.847 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +258.316 253.847 Td +/F15_0 9.9626 Tf +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-203 TJm +(streams) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-203 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-203 TJm +(form) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +-203 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-203 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-203 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-203 TJm +(a) +[4.423394 +0] Tj +-204 TJm +(surrounding,) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-212 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-203 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-203 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 221.967 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-264 TJm +(writing,) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-267 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-264 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-264 TJm +(tak) +[2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-264 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-264 TJm +(open) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-264 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-264 TJm +(handle,) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-267 TJm +(writes) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-264 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-264 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-264 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-264 TJm +(it,) +[2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +397.758 221.967 Td +/F17_0 9.9626 Tf +(fflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +433.624 221.967 Td +/F15_0 9.9626 Tf +(es) +[4.423394 +0 +3.875451 +0] Tj +-264 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-264 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-264 TJm +(does) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-264 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +504.135 221.967 Td +/F17_0 9.9626 Tf +(fclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 210.012 Td +/F15_0 9.9626 Tf +(it.) +[2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-675 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-259 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-260 TJm +(a) +[4.423394 +0] Tj +1 TJm +(pp) +[4.9813 +0 +4.9813 +0] Tj +-1 TJm +(l) +[2.769603 +0] Tj +1 TJm +(ication) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-260 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-259 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-259 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-259 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-259 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-260 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-259 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-259 TJm +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-259 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-259 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-260 TJm +(dat) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +1 TJm +(a) +[4.423394 +0] Tj +-260 TJm +(stream,) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-261 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-259 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-260 TJm +(sam) +[3.875451 +0 +4.423394 +0 +7.750903 +0] Tj +1 TJm +(e) +[4.423394 +0] Tj +-260 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +81.963 198.056 Td +(handle.) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 176.139 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(Reading) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-259 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-258 TJm +(comple) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(x,) +[4.9813 +0 +2.49065 +0] Tj +-261 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-258 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acilities) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-259 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-258 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-258 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-259 TJm +(general) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-258 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-259 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-258 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-258 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-259 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-258 TJm +(generality) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-259 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-258 TJm +(hard) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-258 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-259 TJm +(reconcile) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +81.963 164.183 Td +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-432 TJm +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(\002cienc) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +161.767 164.183 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +225.847 164.183 Td +/F15_0 9.9626 Tf +(reads) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-432 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-432 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-432 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-432 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-432 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-432 TJm +(blocks) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-432 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-432 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +434.467 164.183 Td +/F17_0 9.9626 Tf +(BZ_MAX_UNUSED) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +516.479 164.183 Td +/F15_0 9.9626 Tf +(bytes,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +81.963 152.228 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-436 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-435 TJm +(doing) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-436 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-436 TJm +(probably) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-436 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-435 TJm +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ershoot) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-436 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-436 TJm +(logical) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-435 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-436 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-436 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-436 TJm +(s) +[3.875451 +0] Tj +1 TJm +(tream.) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-1735 TJm +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-436 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-435 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-436 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-436 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +81.963 140.273 Td +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-290 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-289 TJm +(ended,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-300 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +207.321 140.273 Td +/F17_0 9.9626 Tf +(BZ2_bzReadGetUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +323.782 140.273 Td +/F15_0 9.9626 Tf +(after) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-290 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(last) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-290 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-290 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +405.164 140.273 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +467.826 140.273 Td +/F15_0 9.9626 Tf +(\(the) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-290 TJm +(returning) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 128.318 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.671 128.318 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(calling) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +238.047 128.318 Td +/F17_0 9.9626 Tf +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +327.71 128.318 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.852 Td +(24) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 25 28 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-271 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-272 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-271 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-271 TJm +(easy) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0] Tj +-271 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-272 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-271 TJm +(multiple) +[7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +293.313 710.037 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +325.903 710.037 Td +/F15_0 9.9626 Tf +(streams) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-271 TJm +(placed) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-272 TJm +(end-to-end.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-374 TJm +(As) +[7.192997 +0 +3.875451 +0] Tj +-271 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-271 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-271 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-272 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-271 TJm +(stream,) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +72 698.082 Td +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +96.195 698.082 Td +/F17_0 9.9626 Tf +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +158.586 698.082 Td +/F15_0 9.9626 Tf +(returns) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +188.868 698.082 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +266.577 698.082 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-263 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +288.685 698.082 Td +/F17_0 9.9626 Tf +(BZ2_bzReadGetUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +404.875 698.082 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-263 TJm +(coll) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(ect) +[4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-263 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-263 TJm +(unused) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-262 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-263 TJm +(\(cop) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +10 TJm +(y) +[4.9813 +0] Tj +-262 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +72 686.127 Td +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-265 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-265 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-265 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-265 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +25 TJm +(where\).) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +2.49065 +0] Tj +-711 TJm +(That) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-265 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-265 TJm +(forms) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0] Tj +-265 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-265 TJm +(start) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-265 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-265 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-265 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-265 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-265 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-711 TJm +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-265 TJm +(start) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-265 TJm +(uncompressing) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 674.172 Td +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-246 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-246 TJm +(stream,) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-247 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +157.205 674.172 Td +/F17_0 9.9626 Tf +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +243.344 674.172 Td +/F15_0 9.9626 Tf +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ain,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-247 TJm +(feeding) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-246 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-246 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-247 TJm +(unused) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-246 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-246 TJm +(via) +[4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-246 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +405.967 674.172 Td +/F17_0 9.9626 Tf +(unused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +444.286 674.172 Td +/F15_0 9.9626 Tf +(/) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +449.508 674.172 Td +/F17_0 9.9626 Tf +(nUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +493.804 674.172 Td +/F15_0 9.9626 Tf +(parameters.) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +72 662.217 Td +(K) +[7.192997 +0] Tj +25 TJm +(eep) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-263 TJm +(doing) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-264 TJm +(until) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +158.622 662.217 Td +/F17_0 9.9626 Tf +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +238.952 662.217 Td +/F15_0 9.9626 Tf +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-263 TJm +(coincides) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-263 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-264 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-263 TJm +(ph) +[4.9813 +0 +4.9813 +0] Tj +5 TJm +(ysical) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-263 TJm +(end) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-263 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-263 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +423.124 662.217 Td +/F17_0 9.9626 Tf +(feof\(f\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +464.968 662.217 Td +/F15_0 9.9626 Tf +(\).) +[3.317546 +0 +2.49065 +0] Tj +-699 TJm +(In) +[3.317546 +0 +4.9813 +0] Tj +-263 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-263 TJm +(situation) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 650.261 Td +/F17_0 9.9626 Tf +(BZ2_bzReadGetUnused) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +188.065 650.261 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(course) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 628.344 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-240 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-241 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-240 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-241 TJm +(feel) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-240 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-241 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-240 TJm +(high-le) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-241 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace) +[4.423394 +0 +4.423394 +0 +4.423394 +0] Tj +-240 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-241 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-240 TJm +(used.) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-614 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-240 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-241 TJm +(require) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-240 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xtra) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-241 TJm +(\003e) +[5.539206 +0 +4.423394 +0] Tj +15 TJm +(xibi) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +1 TJm +(lity) +[2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-243 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +10 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-240 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-241 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 616.389 Td +(bite) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ullet) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(grips) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace.) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 585.767 Td +/F9_0 17.2154 Tf +(3.4.9.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(Standar) +[11.482672 +0 +5.732728 +0 +9.571762 +0 +10.518609 +0 +10.518609 +0 +9.571762 +0 +6.696791 +0] Tj +20 TJm +(d) +[10.518609 +0] Tj +-278 TJm +(\002le-reading/writing) +[10.518609 +0 +4.785881 +0 +9.571762 +0 +5.732728 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0 +4.785881 +0 +13.393581 +0 +6.696791 +0 +4.785881 +0 +5.732728 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0] Tj +-278 TJm +(code) +[9.571762 +0 +10.518609 +0 +10.518609 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 563.85 Td +/F15_0 9.9626 Tf +(Here') +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-250 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +50 TJm +(d) +[4.9813 +0] Tj +-250 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le:) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 190.086] cm +0 0 468 370.61 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 552.328 Td +/F17_0 9.9626 Tf +(FILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +113.91 550.584 Td +(*) +[5.97756 +0] Tj +132.62 552.328 Td +(f;) +[5.97756 +0 +5.97756 +0] Tj +90 540.373 Td +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +125.866 538.629 Td +(*) +[5.97756 +0] Tj +136.087 540.373 Td +(b;) +[5.97756 +0 +5.97756 +0] Tj +90 528.418 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(nBuf;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 516.462 Td +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1704 TJm +(buf[) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(/) +[5.97756 +0] Tj +165.018 514.719 Td +(*) +[5.97756 +0] Tj +175.24 516.462 Td +(whatever) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(you) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(like) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +305.79 514.719 Td +(*) +[5.97756 +0] Tj +311.767 516.462 Td +(/) +[5.97756 +0] Tj +-426 TJm +(];) +[5.97756 +0 +5.97756 +0] Tj +90 504.507 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(bzerror;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 492.552 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(nWritten;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 468.642 Td +(f) +[5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(fopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +("myfile.bz2",) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +("w") +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 456.687 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(!f) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +94.244 444.731 Td +(/) +[5.97756 +0] Tj +100.222 442.988 Td +(*) +[5.97756 +0] Tj +110.443 444.731 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +184.684 442.988 Td +(*) +[5.97756 +0] Tj +190.662 444.731 Td +(/) +[5.97756 +0] Tj +90 432.776 Td +(}) +[5.97756 +0] Tj +90 420.821 Td +(b) +[5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ2_bzWriteOpen\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(f,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(9) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 408.866 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +94.244 396.911 Td +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +94.244 384.955 Td +(/) +[5.97756 +0] Tj +100.222 383.212 Td +(*) +[5.97756 +0] Tj +110.443 384.955 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +184.684 383.212 Td +(*) +[5.97756 +0] Tj +190.662 384.955 Td +(/) +[5.97756 +0] Tj +90 373 Td +(}) +[5.97756 +0] Tj +90 349.09 Td +(while) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(/) +[5.97756 +0] Tj +140.331 347.346 Td +(*) +[5.97756 +0] Tj +150.553 349.09 Td +(condition) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +208.595 347.346 Td +(*) +[5.97756 +0] Tj +214.572 349.09 Td +(/) +[5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +94.244 337.135 Td +(/) +[5.97756 +0] Tj +100.222 335.391 Td +(*) +[5.97756 +0] Tj +110.443 337.135 Td +(get) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(write) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(into) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(set) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nBuf) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(appropriately) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +421.874 335.391 Td +(*) +[5.97756 +0] Tj +427.852 337.135 Td +(/) +[5.97756 +0] Tj +94.244 325.18 Td +(nWritten) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ2_bzWrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nBuf) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +94.244 313.224 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(==) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_IO_ERROR\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +102.732 301.269 Td +(BZ2_bzWriteClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +102.732 289.314 Td +(/) +[5.97756 +0] Tj +108.71 287.571 Td +(*) +[5.97756 +0] Tj +118.931 289.314 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +193.172 287.571 Td +(*) +[5.97756 +0] Tj +199.15 289.314 Td +(/) +[5.97756 +0] Tj +94.244 277.359 Td +(}) +[5.97756 +0] Tj +90 265.404 Td +(}) +[5.97756 +0] Tj +90 241.493 Td +(BZ2_bzWriteClose\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 229.538 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(==) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_IO_ERROR\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +94.244 217.583 Td +(/) +[5.97756 +0] Tj +100.222 215.84 Td +(*) +[5.97756 +0] Tj +110.443 217.583 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +184.684 215.84 Td +(*) +[5.97756 +0] Tj +190.662 217.583 Td +(/) +[5.97756 +0] Tj +90 205.628 Td +(}) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 168.168 Td +/F15_0 9.9626 Tf +(And) +[7.192997 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le:) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(25) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 26 29 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 349.39] cm +0 0 468 370.61 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(FILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +113.91 709.888 Td +(*) +[5.97756 +0] Tj +132.62 711.631 Td +(f;) +[5.97756 +0 +5.97756 +0] Tj +90 699.676 Td +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +125.866 697.933 Td +(*) +[5.97756 +0] Tj +136.087 699.676 Td +(b;) +[5.97756 +0 +5.97756 +0] Tj +90 687.721 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(nBuf;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 675.766 Td +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1704 TJm +(buf[) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(/) +[5.97756 +0] Tj +165.018 674.022 Td +(*) +[5.97756 +0] Tj +175.24 675.766 Td +(whatever) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(you) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(like) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +305.79 674.022 Td +(*) +[5.97756 +0] Tj +311.767 675.766 Td +(/) +[5.97756 +0] Tj +-426 TJm +(];) +[5.97756 +0 +5.97756 +0] Tj +90 663.811 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(bzerror;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 651.856 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-2130 TJm +(nWritten;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 627.945 Td +(f) +[5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(fopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +("myfile.bz2",) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +("r") +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 615.99 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(!f) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +98.488 604.035 Td +(/) +[5.97756 +0] Tj +104.466 602.291 Td +(*) +[5.97756 +0] Tj +114.687 604.035 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +188.928 602.291 Td +(*) +[5.97756 +0] Tj +194.906 604.035 Td +(/) +[5.97756 +0] Tj +90 592.08 Td +(}) +[5.97756 +0] Tj +90 580.125 Td +(b) +[5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ2_bzReadOpen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(f,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 568.169 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +98.488 556.214 Td +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +98.488 544.259 Td +(/) +[5.97756 +0] Tj +104.466 542.516 Td +(*) +[5.97756 +0] Tj +114.687 544.259 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +188.928 542.516 Td +(*) +[5.97756 +0] Tj +194.906 544.259 Td +(/) +[5.97756 +0] Tj +90 532.304 Td +(}) +[5.97756 +0] Tj +90 508.393 Td +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ_OK;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 496.438 Td +(while) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(==) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(&&) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(/) +[5.97756 +0] Tj +252.948 494.695 Td +(*) +[5.97756 +0] Tj +263.17 496.438 Td +(arbitrary) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(other) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(conditions) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +419.364 494.695 Td +(*) +[5.97756 +0] Tj +425.341 496.438 Td +(/\)) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +98.488 484.483 Td +(nBuf) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(=) +[5.97756 +0] Tj +-426 TJm +(BZ2_bzRead) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(/) +[5.97756 +0] Tj +319.478 482.74 Td +(*) +[5.97756 +0] Tj +329.7 484.483 Td +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +396.23 482.74 Td +(*) +[5.97756 +0] Tj +402.208 484.483 Td +(/) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +98.488 472.528 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(==) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +106.976 460.573 Td +(/) +[5.97756 +0] Tj +112.953 458.829 Td +(*) +[5.97756 +0] Tj +123.175 460.573 Td +(do) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(something) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(buf[0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(..) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(nBuf-1]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +321.989 458.829 Td +(*) +[5.97756 +0] Tj +327.966 460.573 Td +(/) +[5.97756 +0] Tj +98.488 448.618 Td +(}) +[5.97756 +0] Tj +90 436.662 Td +(}) +[5.97756 +0] Tj +90 424.707 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ_STREAM_END) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +102.732 412.752 Td +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +102.732 400.797 Td +(/) +[5.97756 +0] Tj +108.71 399.053 Td +(*) +[5.97756 +0] Tj +118.931 400.797 Td +(handle) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +193.172 399.053 Td +(*) +[5.97756 +0] Tj +199.15 400.797 Td +(/) +[5.97756 +0] Tj +90 388.842 Td +(}) +[5.97756 +0] Tj +-426 TJm +(else) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +({) +[5.97756 +0] Tj +102.732 376.887 Td +(BZ2_bzReadClose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(&bzerror,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 364.931 Td +(}) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 314.637 Td +/F9_0 20.6585 Tf +(3.5.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Utility) +[14.915437 +0 +6.879281 +0 +5.743063 +0 +5.743063 +0 +5.743063 +0 +6.879281 +0 +11.486126 +0] Tj +-278 TJm +(functions) +[6.879281 +0 +12.622344 +0 +12.622344 +0 +11.486126 +0 +6.879281 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 284.016 Td +/F9_0 17.2154 Tf +(3.5.1.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzBuffT) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +10.518609 +0 +5.732728 +0 +5.732728 +0 +10.518609 +0] Tj +80 TJm +(oBuffCompress) +[10.518609 +0 +12.429519 +0 +10.518609 +0 +5.732728 +0 +5.732728 +0 +12.429519 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 183.815] cm +0 0 468 95.641 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 271.087 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzBuffToBuffCompress\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +289.771 269.344 Td +(*) +[5.97756 +0] Tj +333.944 271.087 Td +(dest,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.319 259.132 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +287.317 257.389 Td +(*) +[5.97756 +0] Tj +297.538 259.132 Td +(destLen,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.319 247.177 Td +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +241.23 245.434 Td +(*) +[5.97756 +0] Tj +285.403 247.177 Td +(source,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.319 235.222 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(sourceLen,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.319 223.267 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-4686 TJm +(blockSize100k,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.319 211.312 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-4686 TJm +(verbosity,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +217.319 199.356 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-4686 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 161.897 Td +/F15_0 9.9626 Tf +(Attempts) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-442 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-442 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-443 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-442 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-442 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +216.87 161.897 Td +/F17_0 9.9626 Tf +(source[0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(..) +[5.97756 +0 +5.97756 +0] Tj +-1200 TJm +(sourceLen-1]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +370.715 161.897 Td +/F15_0 9.9626 Tf +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-442 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-443 TJm +(dest) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +1 TJm +(ination) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-443 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +486.202 161.897 Td +/F17_0 9.9626 Tf +(dest[0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(..) +[5.97756 +0 +5.97756 +0] Tj +72 148.198 Td +(*) +[5.97756 +0] Tj +77.978 149.942 Td +(destLen-1]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +137.753 149.942 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1393 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-379 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-379 TJm +(destination) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-379 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-378 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-379 TJm +(big) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-379 TJm +(enough,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +318.487 148.198 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +324.464 149.942 Td +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +370.082 149.942 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-379 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-379 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-378 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-379 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-379 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-379 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-379 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-379 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +72 137.986 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +89.527 137.986 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +122.556 137.986 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-315 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1012 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-315 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-316 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-315 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-315 TJm +(w) +[7.192997 +0] Tj +10 TJm +(on') +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-316 TJm +(\002t,) +[5.539206 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +313.323 136.243 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +319.3 137.986 Td +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +364.285 137.986 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-315 TJm +(unchanged,) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-332 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +440.551 137.986 Td +/F17_0 9.9626 Tf +(BZ_OUTBUFF_FULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +533.355 137.986 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +72 126.031 Td +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 104.113 Td +(Compression) +[6.645054 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-297 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-297 TJm +(manner) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-297 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-297 TJm +(a) +[4.423394 +0] Tj +-297 TJm +(one-shot) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-297 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ent,) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-309 TJm +(done) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-297 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-297 TJm +(a) +[4.423394 +0] Tj +-297 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-297 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-297 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-297 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-297 TJm +(function.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-903 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-297 TJm +(resulting) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +72 92.158 Td +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-296 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-296 TJm +(a) +[4.423394 +0] Tj +-296 TJm +(complete) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +147.988 92.158 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +180.825 92.158 Td +/F15_0 9.9626 Tf +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-296 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-296 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-897 TJm +(There) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-296 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-296 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-296 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-296 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-296 TJm +(making) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-296 TJm +(additional) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-296 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-296 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(pro) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(vide) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-296 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xtra) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +72 80.203 Td +(input) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(data.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-620 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(kind) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(mechanism,) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0 +2.49065 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(lo) +[2.769603 +0 +4.9813 +0] Tj +25 TJm +(w-le) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +-250 TJm +(interf) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +10 TJm +(ace.) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(26) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 27 30 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-223 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-224 TJm +(meaning) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-223 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-224 TJm +(parameters) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +195.306 710.037 Td +/F17_0 9.9626 Tf +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +273.015 710.037 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +277.784 710.037 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +333.808 710.037 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +350.42 710.037 Td +/F17_0 9.9626 Tf +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +410.196 710.037 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-229 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +429.913 710.037 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 710.037 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 688.12 Td +(T) +[6.087149 +0] Tj +80 TJm +(o) +[4.9813 +0] Tj +-410 TJm +(guarantee) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-410 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-410 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-410 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-410 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-410 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-410 TJm +(\002t) +[5.539206 +0 +2.769603 +0] Tj +-410 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-410 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-410 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-450 TJm +(allocate) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-410 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-410 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-410 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-411 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-410 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-410 TJm +(1%) +[4.9813 +0 +8.298846 +0] Tj +-410 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ger) +[4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-410 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-410 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 676.164 Td +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(plus) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(six) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(hundred) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xtra) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(bytes.) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 654.247 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +230.553 654.247 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-315 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-315 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-314 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-315 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-315 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-315 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(yond) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +362.484 654.247 Td +/F17_0 9.9626 Tf +(dest[) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +392.372 652.503 Td +(*) +[5.97756 +0] Tj +398.349 654.247 Td +(destLen]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +446.17 654.247 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-331 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-315 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-315 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-314 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-315 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +72 642.291 Td +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er\003o) +[4.423394 +0 +3.317546 +0 +5.539206 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 620.374 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 451.905] cm +0 0 468 167.372 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 610.909 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 598.954 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(library) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(mis-compiled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 586.999 Td +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 575.044 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(dest) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 563.089 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(blockSize100k) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(9) +[5.97756 +0] Tj +98.488 551.133 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(4) +[5.97756 +0] Tj +98.488 539.178 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(workFactor) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(250) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 527.223 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 515.268 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(insufficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 503.313 Td +(BZ_OUTBUFF_FULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 491.357 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(exceeds) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +341.655 489.614 Td +(*) +[5.97756 +0] Tj +347.633 491.357 Td +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 479.402 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 467.447 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 421.284 Td +/F9_0 17.2154 Tf +(3.5.2.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(BZ2_bzBuffT) +[12.429519 +0 +10.518609 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +8.6077 +0 +12.429519 +0 +10.518609 +0 +5.732728 +0 +5.732728 +0 +10.518609 +0] Tj +80 TJm +(oBuffDecompress) +[10.518609 +0 +12.429519 +0 +10.518609 +0 +5.732728 +0 +5.732728 +0 +12.429519 +0 +9.571762 +0 +9.571762 +0 +10.518609 +0 +15.304491 +0 +10.518609 +0 +6.696791 +0 +9.571762 +0 +9.571762 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 333.038] cm +0 0 468 83.686 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 408.356 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzBuffToBuffDecompress\() +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +301.726 406.612 Td +(*) +[5.97756 +0] Tj +345.899 408.356 Td +(dest,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +225.807 396.401 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +295.805 394.657 Td +(*) +[5.97756 +0] Tj +306.026 396.401 Td +(destLen,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +225.807 384.446 Td +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +249.717 382.702 Td +(*) +[5.97756 +0] Tj +293.891 384.446 Td +(source,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +225.807 372.49 Td +(unsigned) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(sourceLen,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +225.807 360.535 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-4686 TJm +(small,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +225.807 348.58 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-4686 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 311.12 Td +/F15_0 9.9626 Tf +(Attempts) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-358 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-359 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-358 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-358 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-359 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +221.259 311.12 Td +/F17_0 9.9626 Tf +(source[0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(..) +[5.97756 +0 +5.97756 +0] Tj +-1200 TJm +(sourceLen-1]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +374.268 311.12 Td +/F15_0 9.9626 Tf +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-358 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-359 TJm +(destination) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-358 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +486.202 311.12 Td +/F17_0 9.9626 Tf +(dest[0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-600 TJm +(..) +[5.97756 +0 +5.97756 +0] Tj +72 297.422 Td +(*) +[5.97756 +0] Tj +77.978 299.165 Td +(destLen-1]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +137.753 299.165 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1123 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-334 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-334 TJm +(destination) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-334 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-334 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-334 TJm +(big) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-334 TJm +(enough,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +312.554 297.422 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +318.531 299.165 Td +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.701 299.165 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-334 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +-334 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-334 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-334 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-333 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-334 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-334 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-334 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +72 287.21 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +89.527 287.21 Td +/F17_0 9.9626 Tf +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +122.556 287.21 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-315 TJm +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1012 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-315 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-316 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-315 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-315 TJm +(w) +[7.192997 +0] Tj +10 TJm +(on') +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-316 TJm +(\002t,) +[5.539206 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +313.323 285.467 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +319.3 287.21 Td +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +364.285 287.21 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-315 TJm +(unchanged,) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-332 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +440.551 287.21 Td +/F17_0 9.9626 Tf +(BZ_OUTBUFF_FULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +533.355 287.21 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +72 275.255 Td +(returned.) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 253.337 Td +/F17_0 9.9626 Tf +(source) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +110.981 253.337 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-313 TJm +(assumed) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-312 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-313 TJm +(hold) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-313 TJm +(a) +[4.423394 +0] Tj +-313 TJm +(complete) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +237.04 253.337 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +270.044 253.337 Td +/F15_0 9.9626 Tf +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-313 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-312 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +353.446 253.337 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +511.978 253.337 Td +/F15_0 9.9626 Tf +(tries) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-313 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 241.382 Td +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(entirety) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(stream) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 219.464 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(meaning) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(parameters) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +196.631 219.464 Td +/F17_0 9.9626 Tf +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +229.01 219.464 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +245.887 219.464 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +299.685 219.464 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +319.879 219.464 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +439.431 219.464 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 197.546 Td +(Because) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-249 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(ratio) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-249 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-249 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-249 TJm +(cannot) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(kno) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-249 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(adv) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ance,) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-249 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-249 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(easy) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-249 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(guarantee) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +72 185.591 Td +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-286 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(output) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-286 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-287 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-286 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-286 TJm +(big) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-287 TJm +(enough.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-838 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-287 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-286 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-287 TJm +(course) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0] Tj +-286 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-286 TJm +(arrangements) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-287 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-286 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-287 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-286 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-286 TJm +(record) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-287 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-286 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-287 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +72 173.636 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(yond) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(scope) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 151.718 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +230.553 151.718 Td +/F15_0 9.9626 Tf +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-315 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-315 TJm +(write) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-314 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-315 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-315 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-315 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(yond) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +362.484 151.718 Td +/F17_0 9.9626 Tf +(dest[) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +392.372 149.975 Td +(*) +[5.97756 +0] Tj +398.349 151.718 Td +(destLen]) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +446.17 151.718 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-331 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +-315 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-315 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-314 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-315 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uf) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(fer) +[3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +72 139.763 Td +(o) +[4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er\003o) +[4.423394 +0 +3.317546 +0 +5.539206 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 117.845 Td +(Possible) +[5.539206 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(27) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 28 31 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +420.96 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +498.449 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 75.786 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 492.852] cm +0 0 468 227.148 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 711.631 Td +/F17_0 9.9626 Tf +(BZ_CONFIG_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 699.676 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(library) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(has) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(been) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(mis-compiled) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 687.721 Td +(BZ_PARAM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 675.766 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(dest) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(NULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 663.811 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(&&) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(small) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(!=) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(1) +[5.97756 +0] Tj +98.488 651.856 Td +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(<) +[5.97756 +0] Tj +-426 TJm +(0) +[5.97756 +0] Tj +-426 TJm +(or) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(>) +[5.97756 +0] Tj +-426 TJm +(4) +[5.97756 +0] Tj +90 639.9 Td +(BZ_MEM_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 627.945 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(insufficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(memory) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(is) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 615.99 Td +(BZ_OUTBUFF_FULL) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 604.035 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(size) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(exceeds) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +341.655 602.291 Td +(*) +[5.97756 +0] Tj +347.633 604.035 Td +(destLen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 592.08 Td +(BZ_DATA_ERROR) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 580.124 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(a) +[5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(integrity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(was) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(detected) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 568.169 Td +(BZ_DATA_ERROR_MAGIC) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 556.214 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(doesn't) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(begin) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(right) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(magic) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bytes) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 544.259 Td +(BZ_UNEXPECTED_EOF) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 532.304 Td +(if) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compressed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(ends) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(unexpectedly) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 520.349 Td +(BZ_OK) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 508.393 Td +(otherwise) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 458.099 Td +/F9_0 20.6585 Tf +(3.6.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(zlib) +[10.32925 +0 +5.743063 +0 +5.743063 +0 +12.622344 +0] Tj +-278 TJm +(compatibility) +[11.486126 +0 +12.622344 +0 +18.365407 +0 +12.622344 +0 +11.486126 +0 +6.879281 +0 +5.743063 +0 +12.622344 +0 +5.743063 +0 +5.743063 +0 +5.743063 +0 +6.879281 +0 +11.486126 +0] Tj +-278 TJm +(functions) +[6.879281 +0 +12.622344 +0 +12.622344 +0 +11.486126 +0 +6.879281 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 436.181 Td +/F15_0 9.9626 Tf +(Y) +[7.192997 +0] Tj +110 TJm +(oshioka) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-604 TJm +(Tsuneo) +[6.087149 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-604 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-604 TJm +(contrib) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(uted) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-604 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-604 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-604 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-604 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-604 TJm +(better) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +356.347 436.181 Td +/F17_0 9.9626 Tf +(zlib) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +386.275 436.181 Td +/F15_0 9.9626 Tf +(compatibility) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-1372 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-604 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-604 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 424.226 Td +/F17_0 9.9626 Tf +(BZ2_bzopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +131.776 424.226 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +144.283 424.226 Td +/F17_0 9.9626 Tf +(BZ2_bzread) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +204.059 424.226 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +216.567 424.226 Td +/F17_0 9.9626 Tf +(BZ2_bzwrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +282.32 424.226 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +294.827 424.226 Td +/F17_0 9.9626 Tf +(BZ2_bzflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +360.581 424.226 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +373.088 424.226 Td +/F17_0 9.9626 Tf +(BZ2_bzclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +438.842 424.226 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +451.349 424.226 Td +/F17_0 9.9626 Tf +(BZ2_bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +525.614 424.226 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 412.271 Td +/F17_0 9.9626 Tf +(BZ2_bzlibVersion) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +167.641 412.271 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1420 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-383 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-383 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-383 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-383 TJm +(\(yet\)) +[3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-384 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +25 TJm +(\002cially) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-383 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-383 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-383 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-384 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-1419 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-383 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-384 TJm +(break,) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-416 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-383 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-384 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 400.316 Td +(k) +[4.9813 +0] Tj +10 TJm +(eep) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(pieces.) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-620 TJm +(Ne) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ertheless,) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(I) +[3.317546 +0] Tj +-250 TJm +(think) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(ok.) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 349.342] cm +0 0 468 47.821 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 388.794 Td +/F17_0 9.9626 Tf +(typedef) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZFILE;) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 364.884 Td +(const) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +152.286 363.14 Td +(*) +[5.97756 +0] Tj +162.508 364.884 Td +(BZ2_bzlibVersion) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 327.424 Td +/F15_0 9.9626 Tf +(Returns) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(string) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(indicating) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion.) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 288.405] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 315.902 Td +/F17_0 9.9626 Tf +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +130.109 314.159 Td +(*) +[5.97756 +0] Tj +140.331 315.902 Td +(BZ2_bzopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(const) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +281.103 314.159 Td +(*) +[5.97756 +0] Tj +287.08 315.902 Td +(path,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(const) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +383.498 314.159 Td +(*) +[5.97756 +0] Tj +389.476 315.902 Td +(mode) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 303.947 Td +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +130.109 302.204 Td +(*) +[5.97756 +0] Tj +140.331 303.947 Td +(BZ2_bzdopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-3408 TJm +(fd,) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1704 TJm +(const) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +369.629 302.204 Td +(*) +[5.97756 +0] Tj +375.607 303.947 Td +(mode) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 266.488 Td +/F15_0 9.9626 Tf +(Opens) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-243 TJm +(a) +[4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +106.713 266.488 Td +/F17_0 9.9626 Tf +(.bz2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +133.041 266.488 Td +/F15_0 9.9626 Tf +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-243 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-242 TJm +(reading) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-243 TJm +(writing,) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-244 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(either) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-242 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-243 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-243 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-242 TJm +(a) +[4.423394 +0] Tj +-243 TJm +(pre-e) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +15 TJm +(xisting) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-242 TJm +(descriptor) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-615 TJm +(Analogous) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-243 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +510.112 266.488 Td +/F17_0 9.9626 Tf +(fopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 254.532 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +88.877 254.532 Td +/F17_0 9.9626 Tf +(fdopen) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +124.742 254.532 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 216.137] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 243.633 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzread) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +226.528 241.89 Td +(*) +[5.97756 +0] Tj +236.749 243.633 Td +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +276.859 241.89 Td +(*) +[5.97756 +0] Tj +287.08 243.633 Td +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 231.678 Td +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzwrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +228.261 229.935 Td +(*) +[5.97756 +0] Tj +238.483 231.678 Td +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +278.592 229.935 Td +(*) +[5.97756 +0] Tj +288.814 231.678 Td +(buf,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(len) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 194.219 Td +/F15_0 9.9626 Tf +(Reads/writes) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(from/to) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(pre) +[4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +25 TJm +(viously) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(opened) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +259.903 194.219 Td +/F17_0 9.9626 Tf +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +295.769 194.219 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-500 TJm +(Analogous) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +359.141 194.219 Td +/F17_0 9.9626 Tf +(fread) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +391.519 194.219 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +408.396 194.219 Td +/F17_0 9.9626 Tf +(fwrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +444.261 194.219 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 155.2] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 182.697 Td +/F17_0 9.9626 Tf +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(BZ2_bzflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +232.505 180.954 Td +(*) +[5.97756 +0] Tj +242.727 182.697 Td +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +90 170.742 Td +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BZ2_bzclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +234.239 168.998 Td +(*) +[5.97756 +0] Tj +244.46 170.742 Td +(b) +[5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 133.282 Td +/F15_0 9.9626 Tf +(Flushes/closes) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +138.968 133.282 Td +/F17_0 9.9626 Tf +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +174.833 133.282 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +179.815 133.282 Td +/F17_0 9.9626 Tf +(BZ2_bzflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +248.059 133.282 Td +/F15_0 9.9626 Tf +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(actually) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(ything.) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-620 TJm +(Analogous) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +425.472 133.282 Td +/F17_0 9.9626 Tf +(fflush) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +463.828 133.282 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +480.705 133.282 Td +/F17_0 9.9626 Tf +(fclose) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +516.57 133.282 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 106.219] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 121.761 Td +/F17_0 9.9626 Tf +(const) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(char) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +152.286 120.017 Td +(*) +[5.97756 +0] Tj +162.508 121.761 Td +(BZ2_bzerror) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(BZFILE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +282.836 120.017 Td +(*) +[5.97756 +0] Tj +288.814 121.761 Td +(b,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +327.19 120.017 Td +(*) +[5.97756 +0] Tj +333.167 121.761 Td +(errnum) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\)) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 84.301 Td +/F15_0 9.9626 Tf +(Returns) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(string) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(describing) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(recent) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(status) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +303.858 84.301 Td +/F17_0 9.9626 Tf +(b) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +309.835 84.301 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-250 TJm +(sets) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +367.668 82.558 Td +/F17_0 9.9626 Tf +(*) +[5.97756 +0] Tj +373.645 84.301 Td +(errnum) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +412.002 84.301 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(numerical) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alue.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +536.307 50.951 Td +(28) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 29 32 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 704.93 Td +/F9_0 20.6585 Tf +(3.7.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Using) +[14.915437 +0 +11.486126 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0] Tj +-278 TJm +(the) +[6.879281 +0 +12.622344 +0 +11.486126 +0] Tj +-278 TJm +(librar) +[5.743063 +0 +5.743063 +0 +12.622344 +0 +8.036157 +0 +11.486126 +0 +8.036157 +0] Tj +-10 TJm +(y) +[11.486126 +0] Tj +-278 TJm +(in) +[5.743063 +0 +12.622344 +0] Tj +-278 TJm +(a) +[11.486126 +0] Tj +-278 TJm +(stdio-free) +[11.486126 +0 +6.879281 +0 +12.622344 +0 +5.743063 +0 +12.622344 +0 +6.879281 +0 +6.879281 +0 +8.036157 +0 +11.486126 +0 +11.486126 +0] Tj +72 680.139 Td +(en) +[11.486126 +0 +12.622344 +0] Tj +40 TJm +(vir) +[11.486126 +0 +5.743063 +0 +8.036157 +0] Tj +20 TJm +(onment) +[12.622344 +0 +12.622344 +0 +18.365407 +0 +11.486126 +0 +12.622344 +0 +6.879281 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 649.583 Td +/F9_0 17.2154 Tf +(3.7.1.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(Getting) +[13.393581 +0 +9.571762 +0 +5.732728 +0 +5.732728 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0] Tj +-278 TJm +(rid) +[6.696791 +0 +4.785881 +0 +10.518609 +0] Tj +-278 TJm +(of) +[10.518609 +0 +5.732728 +0] Tj +-278 TJm +(stdio) +[9.571762 +0 +5.732728 +0 +10.518609 +0 +4.785881 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 627.73 Td +/F15_0 9.9626 Tf +(In) +[3.317546 +0 +4.9813 +0] Tj +-319 TJm +(a) +[4.423394 +0] Tj +-319 TJm +(deeply) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-319 TJm +(embedded) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-319 TJm +(application,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-336 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-319 TJm +(might) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-319 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-319 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-319 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-319 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-319 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-319 TJm +(memory-to-memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-319 TJm +(functions.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-1035 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-319 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-319 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-319 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +72 615.775 Td +(con) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(eniently) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-327 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-327 TJm +(compiling) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-327 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-327 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-327 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-328 TJm +(preproces) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +1 TJm +(sor) +[3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +-328 TJm +(symbol) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +336.045 615.775 Td +/F17_0 9.9626 Tf +(BZ_NO_STDIO) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +405.057 615.775 Td +/F15_0 9.9626 Tf +(de\002ned.) +[4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-1083 TJm +(Doing) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-327 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-327 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-327 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-327 TJm +(a) +[4.423394 +0] Tj +72 603.819 Td +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(containing) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(only) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(eight) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(functions:) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 581.966 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +179.597 581.966 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +199.079 581.966 Td +/F17_0 9.9626 Tf +(BZ2_bzCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +282.765 581.966 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +302.247 581.966 Td +/F17_0 9.9626 Tf +(BZ2_bzCompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-1414 TJm +(BZ2_bzDe) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-1 TJm +(compressInit) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 581.966 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 570.011 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +167.641 570.011 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +172.144 570.011 Td +/F17_0 9.9626 Tf +(BZ2_bzDecompressEnd) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-190 TJm +(BZ2_bzBuffToBuffCompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +431.073 570.011 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +435.577 570.011 Td +/F17_0 9.9626 Tf +(BZ2_bzBuffToBuffDecompress) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 548.158 Td +/F15_0 9.9626 Tf +(When) +[9.404694 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(compiled) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(this,) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(functions) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(ignore) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +272.526 548.158 Td +/F17_0 9.9626 Tf +(verbosity) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +328.815 548.158 Td +/F15_0 9.9626 Tf +(settings.) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 517.601 Td +/F9_0 17.2154 Tf +(3.7.2.) +[9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(Critical) +[12.429519 +0 +6.696791 +0 +4.785881 +0 +5.732728 +0 +4.785881 +0 +9.571762 +0 +9.571762 +0 +4.785881 +0] Tj +-278 TJm +(err) +[9.571762 +0 +6.696791 +0 +6.696791 +0] Tj +20 TJm +(or) +[10.518609 +0 +6.696791 +0] Tj +-278 TJm +(handling) +[10.518609 +0 +9.571762 +0 +10.518609 +0 +10.518609 +0 +4.785881 +0 +4.785881 +0 +10.518609 +0 +10.518609 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 495.748 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +124.529 495.748 Td +/F15_0 9.9626 Tf +(contains) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-473 TJm +(a) +[4.423394 +0] Tj +-472 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-473 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-472 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-473 TJm +(assertion) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-472 TJm +(checks) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-473 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-472 TJm +(should,) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-529 TJm +(needless) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-472 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-473 TJm +(say) +[3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-528 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-473 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-472 TJm +(acti) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ated.) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 483.793 Td +(Ne) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ertheless,) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-533 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-476 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-476 TJm +(assertion) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-476 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-476 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ail,) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-532 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-476 TJm +(depends) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-476 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-476 TJm +(whether) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-476 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-477 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-476 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-476 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-476 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-476 TJm +(compiled) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-476 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 471.838 Td +/F17_0 9.9626 Tf +(BZ_NO_STDIO) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +140.244 471.838 Td +/F15_0 9.9626 Tf +(set.) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 449.985 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(compile,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-250 TJm +(assertion) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ailure) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(yields) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(message:) +[7.750903 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 428.131 Td +(bzip2/libbzip2:) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-310 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(N.) +[7.192997 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 406.278 Td +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-357 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-358 TJm +(a) +[4.423394 +0] Tj +-357 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-357 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-358 TJm +(bzip2/libbzip2,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-384 TJm +(1.0.8) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-357 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-357 TJm +(13) +[4.9813 +0 +4.9813 +0] Tj +-358 TJm +(July) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-357 TJm +(2019.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-632 TJm +(Please) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-357 TJm +(report) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-358 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-357 TJm +(to:) +[2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-524 TJm +(bzip2-de) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(el@source) +[4.423394 +0 +2.769603 +0 +9.175555 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(are.or) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(g.) +[4.9813 +0 +2.49065 +0] Tj +-1264 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-358 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +72 394.323 Td +(happened) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-297 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-298 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(were) +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-297 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-298 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-297 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-297 TJm +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-297 TJm +(libbzip2) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-298 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-297 TJm +(a) +[4.423394 +0] Tj +-297 TJm +(component,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-309 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-298 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-297 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-297 TJm +(report) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-297 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-298 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +72 382.368 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-264 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-264 TJm +(author\(s\)) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +3.875451 +0 +3.317546 +0] Tj +-264 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-264 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-264 TJm +(program.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-703 TJm +(Please) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-264 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-264 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-264 TJm +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(fort) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-264 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-264 TJm +(report) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-263 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-264 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug;) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-271 TJm +(timely) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-264 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(accurate) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-264 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-264 TJm +(reports) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0] Tj +-264 TJm +(e) +[4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(entually) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +72 370.413 Td +(lead) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(higher) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(quality) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(softw) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +10 TJm +(are.) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-620 TJm +(Thanks.) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 338.758 Td +(where) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +98.831 338.758 Td +/F17_0 9.9626 Tf +(N) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +107.301 338.758 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-251 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-621 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +230.81 338.758 Td +/F17_0 9.9626 Tf +(N) +[5.97756 +0] Tj +-600 TJm +(==) +[5.97756 +0 +5.97756 +0] Tj +-600 TJm +(1007) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +284.608 338.758 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +-251 TJm +(prints) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xtra) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(te) +[2.769603 +0 +4.423394 +0] Tj +15 TJm +(xt) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(advising) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(reader) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(unreliable) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +72 326.803 Td +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-425 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-424 TJm +(often) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-425 TJm +(associated) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-425 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-424 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-425 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-424 TJm +(1007.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-834 TJm +(\(This) +[3.317546 +0 +6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-425 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-425 TJm +(a) +[4.423394 +0] Tj +-424 TJm +(frequently-observ) +[3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(ed-phenomenon) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-425 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-425 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +72 314.848 Td +(1.0.0/1.0.1\).) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 292.995 Td +/F17_0 9.9626 Tf +(exit\(3\)) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +116.334 292.995 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(then) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(called.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 271.142 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +95.093 271.142 Td +/F17_0 9.9626 Tf +(stdio) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +124.981 271.142 Td +/F15_0 9.9626 Tf +(-free) +[3.317546 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(assertion) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ailures) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(result) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(call) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(function) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(declared) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(as:) +[4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 244.078] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 259.62 Td +/F17_0 9.9626 Tf +(extern) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(void) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bz_internal_error) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\() +[5.97756 +0] Tj +-426 TJm +(int) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(errcode) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\);) +[5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 222.225 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(rele) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(passed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(parameter) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-620 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(supply) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(function.) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 200.372 Td +(In) +[3.317546 +0 +4.9813 +0] Tj +-294 TJm +(either) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-294 TJm +(case,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-306 TJm +(once) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-294 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-294 TJm +(assertion) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-294 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ailure) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-294 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-295 TJm +(occurred,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-305 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +306.541 200.372 Td +/F17_0 9.9626 Tf +(bz_stream) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.271 200.372 Td +/F15_0 9.9626 Tf +(records) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0] Tj +-294 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +20 TJm +(olv) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +15 TJm +(ed) +[4.423394 +0 +4.9813 +0] Tj +-294 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-295 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-294 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +5 TJm +(arded) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-294 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-294 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alid.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +72 188.417 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(attempt) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(resume) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(normal) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(operation) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(them.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 166.564 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-299 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-310 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-299 TJm +(course,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-311 TJm +(change) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-298 TJm +(critical) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-299 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-298 TJm +(handling) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-299 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-298 TJm +(suit) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-299 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-298 TJm +(needs.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-912 TJm +(As) +[7.192997 +0 +3.875451 +0] Tj +-298 TJm +(I) +[3.317546 +0] Tj +-299 TJm +(said) +[3.875451 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-298 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +-311 TJm +(critical) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-299 TJm +(errors) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-298 TJm +(indicate) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-299 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ugs) +[4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +72 154.609 Td +(in) +[2.769603 +0 +4.9813 +0] Tj +-263 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-263 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-263 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-263 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-263 TJm +(occur) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-697 TJm +(All) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +-263 TJm +("normal") +[4.064741 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.064741 +0] Tj +-263 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-263 TJm +(situations) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-263 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-263 TJm +(indicated) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-263 TJm +(via) +[4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-263 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-263 TJm +(return) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-263 TJm +(codes) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-263 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-263 TJm +(functions,) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +72 142.653 Td +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(reco) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ered) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(from.) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 107.965 Td +/F9_0 20.6585 Tf +(3.8.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Making) +[17.208531 +0 +11.486126 +0 +11.486126 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0] Tj +-278 TJm +(a) +[11.486126 +0] Tj +-278 TJm +(Windo) +[19.501624 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0 +12.622344 +0] Tj +15 TJm +(ws) +[16.072313 +0 +11.486126 +0] Tj +-278 TJm +(DLL) +[14.915437 +0 +12.622344 +0 +12.622344 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 86.112 Td +/F15_0 9.9626 Tf +(Ev) +[6.087149 +0 +4.9813 +0] Tj +15 TJm +(erything) +[4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-328 TJm +(related) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-327 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-328 TJm +(W) +[9.404694 +0] Tj +40 TJm +(indo) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(ws) +[7.192997 +0 +3.875451 +0] Tj +-328 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-327 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-328 TJm +(contrib) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(uted) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-328 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-327 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(oshioka) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-328 TJm +(Tsuneo) +[6.087149 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-328 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +378.139 86.112 Td +/F17_0 9.9626 Tf +(tsuneo@rr.iij4u.or.jp) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +503.668 86.112 Td +/F15_0 9.9626 Tf +(\),) +[3.317546 +0 +2.49065 +0] Tj +-347 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-328 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +72 74.157 Td +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(send) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(queries) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(him) +[4.9813 +0 +2.769603 +0 +7.750903 +0] Tj +-250 TJm +(\(b) +[3.317546 +0 +4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(please) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(Cc:) +[6.645054 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +264.715 74.157 Td +/F17_0 9.9626 Tf +(bzip2-devel@sourceware.org) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +420.133 74.157 Td +/F15_0 9.9626 Tf +(\).) +[3.317546 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 51.071 Td +(29) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 30 33 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +419.067 749.245 Td +/F15_0 9.9626 Tf +(Programming) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.556 749.245 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(My) +[8.856751 +0 +4.9813 +0] Tj +-367 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ague) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-367 TJm +(understanding) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-367 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-367 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-368 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-367 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-367 TJm +(is:) +[2.769603 +0 +3.875451 +0 +2.769603 +0] Tj +-544 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-367 TJm +(V) +[7.192997 +0] Tj +60 TJm +(isual) +[2.769603 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-367 TJm +(C++) +[6.645054 +0 +5.618906 +0 +5.618906 +0] Tj +-367 TJm +(5.0,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-397 TJm +(open) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-367 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-367 TJm +(project) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-367 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +432.966 710.037 Td +/F17_0 9.9626 Tf +(libbz2.dsp) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +492.742 710.037 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-396 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-368 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uild.) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +72 698.082 Td +(That') +[6.087149 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-250 TJm +(all.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 676.164 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-284 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-284 TJm +(can') +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-285 TJm +(open) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-284 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-284 TJm +(project) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-284 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-284 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-285 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-284 TJm +(reason,) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-293 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-284 TJm +(a) +[4.423394 +0] Tj +-284 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-284 TJm +(one,) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-293 TJm +(naming) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-284 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-284 TJm +(\002les:) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +424.505 676.164 Td +/F17_0 9.9626 Tf +(blocksort.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +490.259 676.164 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +495.666 676.164 Td +/F17_0 9.9626 Tf +(bzlib.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +537.509 676.164 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 664.209 Td +/F17_0 9.9626 Tf +(compress.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +131.776 664.209 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +136.436 664.209 Td +/F17_0 9.9626 Tf +(crctable.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +196.211 664.209 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +200.871 664.209 Td +/F17_0 9.9626 Tf +(decompress.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +272.602 664.209 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +277.262 664.209 Td +/F17_0 9.9626 Tf +(huffman.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +331.06 664.209 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +335.72 664.209 Td +/F17_0 9.9626 Tf +(randtable.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +403.562 664.209 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +420.037 664.209 Td +/F17_0 9.9626 Tf +(libbz2.def) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +479.812 664.209 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-593 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-210 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-209 TJm +(also) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +72 652.254 Td +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(name) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(header) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +190.415 652.254 Td +/F17_0 9.9626 Tf +(bzlib.h) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +234.749 652.254 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +251.625 652.254 Td +/F17_0 9.9626 Tf +(bzlib_private.h) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +341.289 652.254 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 630.336 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(don') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(VC++,) +[7.192997 +0 +6.645054 +0 +5.618906 +0 +5.618906 +0 +2.49065 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(de\002ne) +[4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(proprocessor) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(symbol) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.634 630.336 Td +/F17_0 9.9626 Tf +(_WIN32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +399.5 630.336 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 608.418 Td +(Finally) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.568 608.418 Td +/F17_0 9.9626 Tf +(dlltest.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +160.856 608.418 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(sample) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(DLL.) +[7.192997 +0 +6.087149 +0 +6.087149 +0 +2.49065 +0] Tj +-500 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-250 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(project) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(\002le,) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +388.58 608.418 Td +/F17_0 9.9626 Tf +(dlltest.dsp) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +454.334 608.418 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 586.501 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e\002le) +[4.423394 +0 +5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(V) +[7.192997 +0] Tj +60 TJm +(isual) +[2.769603 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(C,) +[6.645054 +0 +2.49065 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(look) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +292.212 586.501 Td +/F17_0 9.9626 Tf +(makefile.msc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +363.943 586.501 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 564.583 Td +(Be) +[6.645054 +0 +4.423394 +0] Tj +-291 TJm +(a) +[4.423394 +0] Tj +15 TJm +(w) +[7.192997 +0] Tj +10 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-291 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-291 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-291 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-291 TJm +(compile) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +192.07 564.583 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +224.857 564.583 Td +/F15_0 9.9626 Tf +(itself) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-291 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-291 TJm +(W) +[9.404694 +0] Tj +40 TJm +(in32,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-301 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-291 TJm +(must) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-291 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +346.842 564.583 Td +/F17_0 9.9626 Tf +(BZ_UNIX) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +391.584 564.583 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-291 TJm +(0) +[4.9813 +0] Tj +-291 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +427.4 564.583 Td +/F17_0 9.9626 Tf +(BZ_LCCWIN32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +496.052 564.583 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-291 TJm +(1,) +[4.9813 +0 +2.49065 +0] Tj +-301 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-291 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +72 552.628 Td +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +87.223 552.628 Td +/F17_0 9.9626 Tf +(bzip2.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +129.066 552.628 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(compiling.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Otherwise) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +7.192997 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(resulting) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(binary) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(on') +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 530.71 Td +(I) +[3.317546 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en') +[4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(tried) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(stuf) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(f) +[3.317546 +0] Tj +-250 TJm +(myself,) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(looks) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(plausible.) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(30) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 31 34 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 701.916 Td +/F9_0 24.7902 Tf +(4.) +[13.783351 +0 +6.891676 +0] Tj +-278 TJm +(Miscellanea) +[20.650237 +0 +6.891676 +0 +13.783351 +0 +13.783351 +0 +13.783351 +0 +6.891676 +0 +6.891676 +0 +13.783351 +0 +15.146812 +0 +13.783351 +0 +13.783351 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 656.35 Td +/F9_0 17.2154 Tf +(T) +[10.518609 +0] Tj +80 TJm +(ab) +[9.571762 +0 +10.518609 +0] Tj +10 TJm +(le) +[4.785881 +0 +9.571762 +0] Tj +-278 TJm +(of) +[10.518609 +0 +5.732728 +0] Tj +-278 TJm +(Contents) +[12.429519 +0 +10.518609 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0 +10.518609 +0 +5.732728 +0 +9.571762 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 635.788 Td +/F15_0 9.9626 Tf +(4.1.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Limitations) +[6.087149 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +267.908 635.788 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 635.788 Td +/F15_0 9.9626 Tf +(31) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 623.832 Td +(4.2.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Portability) +[5.539206 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(issues) +[2.769603 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +170.784 623.832 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 623.832 Td +/F15_0 9.9626 Tf +(32) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 611.877 Td +(4.3.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Reporting) +[6.645054 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ugs) +[4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +162.656 611.877 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 611.877 Td +/F15_0 9.9626 Tf +(32) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 599.922 Td +(4.4.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Did) +[7.192997 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(right) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(package?) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +227.565 599.922 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 599.922 Td +/F15_0 9.9626 Tf +(33) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 587.967 Td +(4.5.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Further) +[5.539206 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(Reading) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +166.902 587.967 Td +/F123_0 9.9626 Tf +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-167 TJm +(:) +[2.76761 +0] Tj +-166 TJm +(:) +[2.76761 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +506.127 587.967 Td +/F15_0 9.9626 Tf +(34) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 556.086 Td +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(random) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(thoughts) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(mine.) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-620 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(our) +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(mileage) +[7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ary) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 521.334 Td +/F9_0 20.6585 Tf +(4.1.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Limitations) +[12.622344 +0 +5.743063 +0 +18.365407 +0 +5.743063 +0 +6.879281 +0 +11.486126 +0 +6.879281 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0 +11.486126 +0] Tj +-278 TJm +(of) +[12.622344 +0 +6.879281 +0] Tj +-278 TJm +(the) +[6.879281 +0 +12.622344 +0 +11.486126 +0] Tj +-278 TJm +(compressed) +[11.486126 +0 +12.622344 +0 +18.365407 +0 +12.622344 +0 +8.036157 +0 +11.486126 +0 +11.486126 +0 +11.486126 +0 +11.486126 +0 +12.622344 +0] Tj +-278 TJm +(\002le) +[12.622344 +0 +5.743063 +0 +11.486126 +0] Tj +-278 TJm +(f) +[6.879281 +0] Tj +20 TJm +(ormat) +[12.622344 +0 +8.036157 +0 +18.365407 +0 +11.486126 +0 +6.879281 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 499.416 Td +/F17_0 9.9626 Tf +(bzip2-1.0.X) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +137.753 499.416 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +143.405 499.416 Td +/F17_0 9.9626 Tf +(0.9.5) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +176.453 499.416 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +194 499.416 Td +/F17_0 9.9626 Tf +(0.9.0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +227.048 499.416 Td +/F15_0 9.9626 Tf +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-317 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xactly) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-318 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-317 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-317 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-317 TJm +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-317 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-318 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-317 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-317 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion,) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +455.801 499.416 Td +/F17_0 9.9626 Tf +(bzip2-0.1) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +509.599 499.416 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1024 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +72 487.461 Td +(decision) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-222 TJm +(made) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-222 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-221 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-222 TJm +(interests) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-222 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-222 TJm +(stability) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-601 TJm +(Creating) +[6.645054 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(yet) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-222 TJm +(another) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-222 TJm +(incompatible) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-221 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-222 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-222 TJm +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-222 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-222 TJm +(create) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +72 475.505 Td +(further) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(confusion) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(disruption) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(users.) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 453.588 Td +(Ne) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ertheless,) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-234 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-229 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-230 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-229 TJm +(a) +[4.423394 +0] Tj +-230 TJm +(painless) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-229 TJm +(decision.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-606 TJm +(De) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(elopment) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-230 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-230 TJm +(sinc) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +1 TJm +(e) +[4.423394 +0] Tj +-230 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-230 TJm +(release) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-229 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +407.317 453.588 Td +/F17_0 9.9626 Tf +(bzip2-0.1) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +463.402 453.588 Td +/F15_0 9.9626 Tf +(in) +[2.769603 +0 +4.9813 +0] Tj +-230 TJm +(August) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-229 TJm +(1997) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-230 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +72 441.632 Td +(sho) +[3.875451 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-226 TJm +(comple) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(xities) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-226 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-225 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-226 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-226 TJm +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-226 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-226 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-225 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-226 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-226 TJm +(and,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-231 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-226 TJm +(retrospect,) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-230 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-226 TJm +(unnecessary) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-604 TJm +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-226 TJm +(are:) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 409.752 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(run-length) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-287 TJm +(encoder) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-297 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-287 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-288 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-287 TJm +(\002rst) +[5.539206 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-287 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-287 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-288 TJm +(compression) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-287 TJm +(transformations,) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-296 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-288 TJm +(entirely) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-287 TJm +(irrele) +[2.769603 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ant.) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-843 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-288 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +81.963 397.797 Td +(purpose) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-322 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-322 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-322 TJm +(protect) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-321 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-322 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-322 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-322 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-322 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-322 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orst) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-321 TJm +(case) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-322 TJm +(input:) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-454 TJm +(a) +[4.423394 +0] Tj +-322 TJm +(string) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-322 TJm +(repeated) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-321 TJm +(symbols.) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-1052 TJm +(But) +[6.645054 +0 +4.9813 +0 +2.769603 +0] Tj +81.963 385.842 Td +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-229 TJm +(steps) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-230 TJm +(Q6a) +[7.192997 +0 +4.9813 +0 +4.423394 +0] Tj +-229 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-230 TJm +(Q6b) +[7.192997 +0 +4.9813 +0 +4.9813 +0] Tj +-229 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-230 TJm +(t) +[2.769603 +0] Tj +1 TJm +(he) +[4.9813 +0 +4.423394 +0] Tj +-230 TJm +(original) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-229 TJm +(Burro) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws-Wheeler) +[7.192997 +0 +3.875451 +0 +3.317546 +0 +9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-230 TJm +(technical) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-229 TJm +(report) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-230 TJm +(\(SRC-124\)) +[3.317546 +0 +5.539206 +0 +6.645054 +0 +6.645054 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-229 TJm +(sho) +[3.875451 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-229 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-230 TJm +(repeats) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-229 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-230 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +81.963 373.886 Td +(handled) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(without) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(\002culty) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(sorting.) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 351.969 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-315 TJm +(randomisation) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-314 TJm +(mechanism) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-315 TJm +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-314 TJm +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-315 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-315 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-314 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-315 TJm +(there.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-1007 TJm +(Udi) +[7.192997 +0 +4.9813 +0 +2.769603 +0] Tj +-315 TJm +(Manber) +[8.856751 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-315 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-314 TJm +(Gene) +[7.192997 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-315 TJm +(Myers) +[8.856751 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-314 TJm +(published) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-315 TJm +(a) +[4.423394 +0] Tj +-315 TJm +(suf) +[3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(\002x) +[5.539206 +0 +4.9813 +0] Tj +81.963 340.013 Td +(array) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(construction) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-266 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-266 TJm +(a) +[4.423394 +0] Tj +-266 TJm +(fe) +[3.317546 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-266 TJm +(years) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-266 TJm +(back,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-269 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-266 TJm +(emplo) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(yed) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-266 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-266 TJm +(sort) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-266 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-266 TJm +(block,) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-270 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-266 TJm +(matter) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-266 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-266 TJm +(repetiti) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +81.963 328.058 Td +(in) +[2.769603 +0 +4.9813 +0] Tj +-257 TJm +(O\(N) +[7.192997 +0 +3.317546 +0 +7.192997 +0] Tj +-257 TJm +(log) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-257 TJm +(N\)) +[7.192997 +0 +3.317546 +0] Tj +-258 TJm +(time.) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-663 TJm +(Subsequent) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-257 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-257 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-257 TJm +(K) +[7.192997 +0] Tj +15 TJm +(unihik) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(o) +[4.9813 +0] Tj +-257 TJm +(Sadakane) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-258 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-257 TJm +(produced) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-257 TJm +(a) +[4.423394 +0] Tj +-257 TJm +(deri) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ati) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-257 TJm +(O\(N) +[7.192997 +0 +3.317546 +0 +7.192997 +0] Tj +-257 TJm +(\(log) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-258 TJm +(N\)^2\)) +[7.192997 +0 +3.317546 +0 +4.672459 +0 +4.9813 +0 +3.317546 +0] Tj +-257 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +81.963 316.103 Td +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(usually) +[4.9813 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(outperforms) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(Manber) +[8.856751 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-Myers) +[3.317546 +0 +8.856751 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-250 TJm +(algorithm.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 294.185 Td +(I) +[3.317546 +0] Tj +-274 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-274 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-274 TJm +(changed) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-274 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-274 TJm +(Sadakane') +[5.539206 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-274 TJm +(algorithm,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-280 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-274 TJm +(I) +[3.317546 +0] Tj +-274 TJm +(\002nd) +[5.539206 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-274 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-274 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-274 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wer) +[7.192997 +0 +4.423394 +0 +3.317546 +0] Tj +-274 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +391.407 294.185 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +421.295 294.185 Td +/F15_0 9.9626 Tf +(') +[3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-274 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xisting) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-274 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-274 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +81.963 282.23 Td +(inputs,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-399 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-369 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-369 TJm +(randomisation) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-370 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +1 TJm +(chanism) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +7.750903 +0] Tj +-370 TJm +(protects) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-369 TJm +(adequately) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-369 TJm +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ainst) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-369 TJm +(bad) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-369 TJm +(cases.) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-1336 TJm +(I) +[3.317546 +0] Tj +-369 TJm +(didn') +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-369 TJm +(think) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-369 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-369 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-369 TJm +(a) +[4.423394 +0] Tj +-370 TJm +(good) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +81.963 270.275 Td +(tradeof) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(f) +[3.317546 +0] Tj +-282 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-283 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e.) +[4.423394 +0 +2.49065 +0] Tj +-815 TJm +(P) +[5.539206 +0] Tj +15 TJm +(artly) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-282 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-282 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-283 TJm +(due) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-282 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-283 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-282 TJm +(f) +[3.317546 +0] Tj +10 TJm +(act) +[4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-283 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-282 TJm +(I) +[3.317546 +0] Tj +-283 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-282 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-282 TJm +(\003ooded) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-283 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-282 TJm +(email) +[4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-283 TJm +(complaints) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-282 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +479.557 270.275 Td +/F17_0 9.9626 Tf +(bzip2-0.1) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +533.355 270.275 Td +/F15_0 9.9626 Tf +(') +[3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +81.963 258.32 Td +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(repetiti) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(data,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-250 TJm +(perhaps) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(isn') +[2.769603 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(problem) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(real) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(inputs.) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 236.402 Td +(Probably) +[5.539206 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-314 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-315 TJm +(best) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0] Tj +-314 TJm +(long-term) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +7.750903 +0] Tj +-314 TJm +(solution,) +[3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-331 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-314 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-314 TJm +(one) +[4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-315 TJm +(I) +[3.317546 +0] Tj +-314 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-314 TJm +(incorporated) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-315 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-314 TJm +(0.9.5) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-314 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-315 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +-330 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-315 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-314 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-314 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-315 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xisting) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +81.963 224.447 Td +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-206 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-206 TJm +(initially) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-215 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-207 TJm +(f) +[3.317546 +0] Tj +10 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-206 TJm +(back) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-206 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-206 TJm +(a) +[4.423394 +0] Tj +-207 TJm +(O\(N) +[7.192997 +0 +3.317546 +0 +7.192997 +0] Tj +-206 TJm +(\(log) +[3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-206 TJm +(N\)^2\)) +[7.192997 +0 +3.317546 +0 +4.672459 +0 +4.9813 +0 +3.317546 +0] Tj +-206 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-206 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-207 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-206 TJm +(standard) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-206 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-206 TJm +(gets) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-206 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-207 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(\002culties.) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 202.529 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-321 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-321 TJm +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-321 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-322 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-321 TJm +(designed) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-321 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-322 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-321 TJm +(handled) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-321 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-322 TJm +(a) +[4.423394 +0] Tj +-321 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-339 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(I) +[3.317546 +0] Tj +-321 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-321 TJm +(had) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-322 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-321 TJm +(jump) +[2.769603 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0] Tj +-321 TJm +(though) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +81.963 190.574 Td +(hoops) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-299 TJm +(t) +[2.769603 +0] Tj +1 TJm +(o) +[4.9813 +0] Tj +-299 TJm +(produce) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-299 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-298 TJm +(ef) +[4.423394 +0 +3.317546 +0] Tj +25 TJm +(\002cient) +[5.539206 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-299 TJm +(implementation) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-298 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-299 TJm +(decompression.) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-911 TJm +(It') +[3.317546 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-298 TJm +(a) +[4.423394 +0] Tj +-299 TJm +(bit) +[4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-298 TJm +(hairy) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-912 TJm +(T) +[6.087149 +0] Tj +35 TJm +(ry) +[3.317546 +0 +4.9813 +0] Tj +-298 TJm +(passing) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +468.269 190.574 Td +/F17_0 9.9626 Tf +(decompress.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 178.619 Td +/F15_0 9.9626 Tf +(through) +[2.769603 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-289 TJm +(C) +[6.645054 +0] Tj +-289 TJm +(preprocessor) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +-289 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-289 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +10 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-289 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +-289 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-289 TJm +(I) +[3.317546 +0] Tj +-289 TJm +(mean.) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-854 TJm +(Much) +[8.856751 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-289 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-289 TJm +(comple) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(xity) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-289 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-289 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-289 TJm +(been) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +20 TJm +(oided) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-289 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-289 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +81.963 166.663 Td +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(size) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(each) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(block) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(recorded) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(stream.) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 144.746 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(An) +[7.192997 +0 +4.9813 +0] Tj +-250 TJm +(Adler) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-32) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(checksum,) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-250 TJm +(rather) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(CRC32) +[6.645054 +0 +6.645054 +0 +6.645054 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(checksum,) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aster) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(compute.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 122.828 Td +(It) +[3.317546 +0 +2.769603 +0] Tj +-349 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-349 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-349 TJm +(f) +[3.317546 +0] Tj +10 TJm +(air) +[4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-348 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-349 TJm +(say) +[3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-349 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-349 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +201.979 122.828 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +235.342 122.828 Td +/F15_0 9.9626 Tf +(format) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-349 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-349 TJm +(frozen) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-348 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-349 TJm +(I) +[3.317546 +0] Tj +-349 TJm +(properly) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-349 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-349 TJm +(fully) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-349 TJm +(understood) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-348 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-349 TJm +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +72 110.873 Td +(consequences) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(doing) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(so.) +[3.875451 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 88.955 Td +(Impro) +[3.317546 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ements) +[4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(I) +[3.317546 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-250 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(incorporate) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(0.9.0,) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(despite) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(format,) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(are:) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(31) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 32 35 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +498.728 749.245 Td +/F15_0 9.9626 Tf +(Miscellanea) +[8.856751 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +74.491 710.037 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(Single) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-234 TJm +(array) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-234 TJm +(implementation) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-235 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-234 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-234 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erse) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0] Tj +-234 TJm +(BWT) +[6.645054 +0 +9.404694 +0 +6.087149 +0] Tj +74 TJm +(.) +[2.49065 +0] Tj +-469 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-234 TJm +(signi\002cantly) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-235 TJm +(speeds) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-234 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-234 TJm +(decompression,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-237 TJm +(presumably) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-235 TJm +(because) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +81.963 698.082 Td +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(reduces) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(number) +[4.9813 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(cache) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(misses.) +[7.750903 +0 +2.769603 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 676.164 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(F) +[5.539206 +0] Tj +15 TJm +(aster) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-338 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(erse) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +4.423394 +0] Tj +-338 TJm +(MTF) +[8.856751 +0 +6.087149 +0 +5.539206 +0] Tj +-338 TJm +(transform) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +-338 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-339 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-338 TJm +(MTF) +[8.856751 +0 +6.087149 +0 +5.539206 +0] Tj +-338 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-574 TJm +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-338 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-339 TJm +(implementation) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-338 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-338 TJm +(based) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-338 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-338 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-338 TJm +(notion) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-339 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-338 TJm +(sliding) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +81.963 664.209 Td +(blocks) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +25 TJm +(alues.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 642.291 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +82.461 642.291 Td +/F17_0 9.9626 Tf +(bzip2-0.9.0) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +151.137 642.291 Td +/F15_0 9.9626 Tf +(no) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-293 TJm +(reads) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-294 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-293 TJm +(writes) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-293 TJm +(\002les) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-294 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +279.657 642.291 Td +/F17_0 9.9626 Tf +(fread) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +312.467 642.291 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +329.776 642.291 Td +/F17_0 9.9626 Tf +(fwrite) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +365.642 642.291 Td +/F15_0 9.9626 Tf +(;) +[2.769603 +0] Tj +-315 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-293 TJm +(0.1) +[4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-294 TJm +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +440.214 642.291 Td +/F17_0 9.9626 Tf +(putc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +467.047 642.291 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +484.356 642.291 Td +/F17_0 9.9626 Tf +(getc) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +508.266 642.291 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-880 TJm +(Duh!) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +81.963 630.336 Td +(W) +[9.404694 +0] Tj +80 TJm +(ell,) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(li) +[2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(learn.) +[2.769603 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 608.418 Td +(Further) +[5.539206 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-304 TJm +(ahead,) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-318 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-305 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ould) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-304 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-305 TJm +(nice) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-304 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-305 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-304 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-304 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-305 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-304 TJm +(random) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0] Tj +-305 TJm +(access) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-304 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-305 TJm +(\002les.) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-946 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-305 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-304 TJm +(require) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0] Tj +-304 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-305 TJm +(careful) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-304 TJm +(design) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-305 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +72 596.463 Td +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(formats.) +[3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 561.71 Td +/F9_0 20.6585 Tf +(4.2.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(P) +[13.77922 +0] Tj +40 TJm +(or) +[12.622344 +0 +8.036157 +0] Tj +-20 TJm +(tability) +[6.879281 +0 +11.486126 +0 +12.622344 +0 +5.743063 +0 +5.743063 +0 +5.743063 +0 +6.879281 +0 +11.486126 +0] Tj +-278 TJm +(issues) +[5.743063 +0 +11.486126 +0 +11.486126 +0 +12.622344 +0 +11.486126 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 539.792 Td +/F15_0 9.9626 Tf +(After) +[7.192997 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(consideration,) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(I) +[3.317546 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(decided) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +303.231 539.792 Td +/F17_0 9.9626 Tf +(autoconf) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +353.542 539.792 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(con\002gure) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(0.9.5) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(1.0.) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 517.875 Td +/F17_0 9.9626 Tf +(autoconf) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +119.821 517.875 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-502 TJm +(admirable) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-452 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-452 TJm +(w) +[7.192997 +0] Tj +10 TJm +(onderful) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0] Tj +-452 TJm +(though) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-452 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-452 TJm +(is,) +[2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-502 TJm +(mainly) +[7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-452 TJm +(assists) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-452 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-452 TJm +(portability) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-452 TJm +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-452 TJm +(between) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-452 TJm +(Unix-lik) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +72 505.92 Td +(platforms.) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-1398 TJm +(But) +[6.645054 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +144.784 505.92 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +178.455 505.92 Td +/F15_0 9.9626 Tf +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-380 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-379 TJm +(much) +[7.750903 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-380 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-379 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-380 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-380 TJm +(portability) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-379 TJm +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-380 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-380 TJm +(Unix;) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0] Tj +-444 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-380 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-380 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-379 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(\002culties) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +72 493.964 Td +(appear) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0] Tj +-297 TJm +(when) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-296 TJm +(p) +[4.9813 +0] Tj +-1 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +1 TJm +(ting) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-297 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-297 TJm +(Mac,) +[8.856751 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-308 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-297 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-297 TJm +(Microsoft') +[8.856751 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-296 TJm +(operating) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-297 TJm +(systems.) +[3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +361.339 493.964 Td +/F17_0 9.9626 Tf +(autoconf) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +412.116 493.964 Td +/F15_0 9.9626 Tf +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-297 TJm +(help) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-297 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(those) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-297 TJm +(cases,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-308 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 482.009 Td +(brings) +[4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(whole) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(load) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-250 TJm +(comple) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +15 TJm +(xity) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 460.091 Td +(Most) +[8.856751 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-392 TJm +(people) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-392 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-393 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-392 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-392 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-392 TJm +(compile) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-393 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-392 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-392 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-392 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-393 TJm +(under) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-392 TJm +(Unix) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-392 TJm +(straight) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-392 TJm +(out-of-the-box,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-428 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-392 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-393 TJm +(speak,) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +72 448.136 Td +(especially) +[4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +-250 TJm +(C) +[6.645054 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 426.218 Td +(There) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-259 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-258 TJm +(a) +[4.423394 +0] Tj +-259 TJm +(couple) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +159.561 426.218 Td +/F17_0 9.9626 Tf +(__inline__) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +221.913 426.218 Td +/F15_0 9.9626 Tf +(directi) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-259 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-258 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-259 TJm +(code.) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-671 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +-259 TJm +(C) +[6.645054 +0] Tj +-258 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +352.587 426.218 Td +/F17_0 9.9626 Tf +(gcc) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +370.52 426.218 Td +/F15_0 9.9626 Tf +(\)) +[3.317546 +0] Tj +-259 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-258 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-259 TJm +(able) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-259 TJm +(handle) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-258 TJm +(them.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-672 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-259 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +50 TJm +(re) +[3.317546 +0 +4.423394 +0] Tj +72 414.263 Td +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-279 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-279 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +-279 TJm +(C,) +[6.645054 +0 +2.49065 +0] Tj +-279 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-279 TJm +(C) +[6.645054 +0] Tj +-279 TJm +(compiler) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-279 TJm +(shouldn') +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-279 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +-279 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-279 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-279 TJm +(all.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-794 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-279 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-279 TJm +(compiler) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-279 TJm +(does,) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-286 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-279 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-279 TJm +(reason,) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-287 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +-279 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-279 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 402.308 Td +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-283 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-283 TJm +(them,) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +-291 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +164.167 402.308 Td +/F17_0 9.9626 Tf +(#define) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-283 TJm +(__inline__) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +271.425 402.308 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-283 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +294.22 402.308 Td +/F17_0 9.9626 Tf +(/) +[5.97756 +0] Tj +300.197 400.565 Td +(*) +[5.97756 +0] Tj +-600 TJm +(*) +[5.97756 +0] Tj +318.13 402.308 Td +(/) +[5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +324.108 402.308 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-818 TJm +(One) +[7.192997 +0 +4.9813 +0 +4.423394 +0] Tj +-283 TJm +(easy) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0] Tj +-283 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-283 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-283 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-283 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-283 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-283 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-283 TJm +(compile) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-283 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-283 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-283 TJm +(\003ag) +[5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 390.353 Td +/F17_0 9.9626 Tf +(-D__inline__=) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +149.709 390.353 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-250 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(understood) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(Unix) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(compilers.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 368.435 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-321 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-321 TJm +(still) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-322 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-321 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(\002culties,) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-339 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-321 TJm +(compiling) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-321 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-322 TJm +(t) +[2.769603 +0] Tj +1 TJm +(he) +[4.9813 +0 +4.423394 +0] Tj +-322 TJm +(macro) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +310.295 368.435 Td +/F17_0 9.9626 Tf +(BZ_STRICT_ANSI) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +397.181 368.435 Td +/F15_0 9.9626 Tf +(de\002ned.) +[4.9813 +0 +4.423394 +0 +5.539206 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-524 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-321 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-321 TJm +(enable) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-321 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 356.48 Td +(b) +[4.9813 +0] Tj +20 TJm +(uild) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-321 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-321 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-322 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-321 TJm +(a) +[4.423394 +0] Tj +-321 TJm +(strictly) +[3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-321 TJm +(ANSI) +[7.192997 +0 +7.192997 +0 +5.539206 +0 +3.317546 +0] Tj +-321 TJm +(compliant) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-322 TJm +(en) +[4.423394 +0 +4.9813 +0] Tj +40 TJm +(vironment.) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-1047 TJm +(Building) +[6.645054 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-321 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-321 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-322 TJm +(itself) +[2.769603 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0] Tj +-321 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-321 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-321 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-321 TJm +(dangerous) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-322 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +72 344.525 Td +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-260 TJm +(supported,) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-263 TJm +(since) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-260 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-260 TJm +(remo) +[3.317546 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +204.498 344.525 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +234.386 344.525 Td +/F15_0 9.9626 Tf +(') +[3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-260 TJm +(checks) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-260 TJm +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ainst) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-260 TJm +(compressing) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-261 TJm +(directories,) +[4.9813 +0 +2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-262 TJm +(symbolic) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-261 TJm +(li) +[2.769603 +0 +2.769603 +0] Tj +1 TJm +(nks,) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-263 TJm +(de) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(vices,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-263 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-260 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +72 332.57 Td +(not-really-a-\002le) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(entities.) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-620 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(could) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(cause) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(\002lesystem) +[5.539206 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(corruption!) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 310.652 Td +(One) +[7.192997 +0 +4.9813 +0 +4.423394 +0] Tj +-392 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-391 TJm +(thing:) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-594 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-391 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-392 TJm +(create) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-391 TJm +(a) +[4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +210.879 310.652 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +244.669 310.652 Td +/F15_0 9.9626 Tf +(binary) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-392 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-391 TJm +(public) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-392 TJm +(distrib) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +20 TJm +(ution,) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-427 TJm +(please) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-392 TJm +(consider) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-391 TJm +(linking) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-392 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-391 TJm +(statically) +[3.875451 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-392 TJm +(\() +[3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +522.067 310.652 Td +/F17_0 9.9626 Tf +(gcc) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +72 298.697 Td +(-static) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +113.843 298.697 Td +/F15_0 9.9626 Tf +(\).) +[3.317546 +0 +2.49065 +0] Tj +-620 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +20 TJm +(oids) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(sorts) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(library-v) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +15 TJm +(ersion) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(issues) +[2.769603 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(others) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-250 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(encounter) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(later) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(on.) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 276.779 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-296 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-296 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uild) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +122.708 276.779 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +155.545 276.779 Td +/F15_0 9.9626 Tf +(on) +[4.9813 +0 +4.9813 +0] Tj +-296 TJm +(W) +[9.404694 +0] Tj +40 TJm +(in32,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-307 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-296 TJm +(must) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-296 TJm +(set) +[3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +254.965 276.779 Td +/F17_0 9.9626 Tf +(BZ_UNIX) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +299.756 276.779 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(0) +[4.9813 +0] Tj +-296 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +335.72 276.779 Td +/F17_0 9.9626 Tf +(BZ_LCCWIN32) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +404.422 276.779 Td +/F15_0 9.9626 Tf +(to) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(1,) +[4.9813 +0 +2.49065 +0] Tj +-307 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-296 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-296 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +467.159 276.779 Td +/F17_0 9.9626 Tf +(bzip2.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +509.002 276.779 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-307 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +72 264.824 Td +(compiling.) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-310 TJm +(Otherwise) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +7.192997 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(resulting) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(binary) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(on') +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork) +[4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 230.071 Td +/F9_0 20.6585 Tf +(4.3.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Repor) +[14.915437 +0 +11.486126 +0 +12.622344 +0 +12.622344 +0 +8.036157 +0] Tj +-20 TJm +(ting) +[6.879281 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0] Tj +-278 TJm +(b) +[12.622344 +0] Tj +20 TJm +(ugs) +[12.622344 +0 +12.622344 +0 +11.486126 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 208.153 Td +/F15_0 9.9626 Tf +(I) +[3.317546 +0] Tj +-228 TJm +(tried) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(pretty) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-228 TJm +(hard) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-228 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-228 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-228 TJm +(sure) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +196.25 208.153 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +228.409 208.153 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-228 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-228 TJm +(free,) +[3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.49065 +0] Tj +-232 TJm +(both) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-228 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-228 TJm +(design) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-228 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-228 TJm +(by) +[4.9813 +0 +4.9813 +0] Tj +-228 TJm +(testing.) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-605 TJm +(Hopefully) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-228 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +10 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-228 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +-228 TJm +(need) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-228 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-228 TJm +(read) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 196.198 Td +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(section) +[3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(real.) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 174.28 Td +(Ne) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ertheless,) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-313 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +137.751 174.28 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +170.634 174.28 Td +/F15_0 9.9626 Tf +(dies) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-301 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-300 TJm +(a) +[4.423394 +0] Tj +-301 TJm +(se) +[3.875451 +0 +4.423394 +0] Tj +15 TJm +(gmentation) +[4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-300 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ault,) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-314 TJm +(a) +[4.423394 +0] Tj +-300 TJm +(b) +[4.9813 +0] Tj +20 TJm +(us) +[4.9813 +0 +3.875451 +0] Tj +-301 TJm +(error) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +-300 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-301 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-301 TJm +(internal) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-300 TJm +(assertion) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-301 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ailure,) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +2.49065 +0] Tj +-313 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-301 TJm +(wil) +[7.192997 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(l) +[2.769603 +0] Tj +-301 TJm +(ask) +[4.423394 +0 +3.875451 +0 +4.9813 +0] Tj +-301 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-300 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +72 162.325 Td +(email) +[4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-242 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +-243 TJm +(a) +[4.423394 +0] Tj +-242 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-243 TJm +(report.) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.49065 +0] Tj +-615 TJm +(Experience) +[6.087149 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-242 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-243 TJm +(years) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-242 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-242 TJm +(feedback) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-243 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-242 TJm +(bzip2) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(users) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-242 TJm +(indicates) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-243 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-242 TJm +(almost) +[4.423394 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-242 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-243 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-242 TJm +(problems) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0] Tj +-243 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +72 150.37 Td +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(traced) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(either) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(compiler) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ugs) +[4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(hardw) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +7.192997 +0] Tj +10 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(problems.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(32) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 33 36 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +498.728 749.245 Td +/F15_0 9.9626 Tf +(Miscellanea) +[8.856751 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +74.491 710.037 Td +/F15_0 9.9626 Tf +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(Recompile) +[6.645054 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +-322 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-322 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-322 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-322 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-322 TJm +(optimisat) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0] Tj +1 TJm +(ion,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-340 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-322 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +-322 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-322 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-322 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orks.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +2.49065 +0] Tj +-1052 TJm +(And/or) +[7.192997 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-322 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-322 TJm +(a) +[4.423394 +0] Tj +-321 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(ferent) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-322 TJm +(compiler) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-1052 TJm +(I) +[3.317546 +0] Tj +-322 TJm +(heard) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-322 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +81.963 698.082 Td +(sorts) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +3.875451 +0] Tj +-309 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-310 TJm +(stories) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-310 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-309 TJm +(v) +[4.9813 +0] Tj +25 TJm +(arious) +[4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-310 TJm +(\003a) +[5.539206 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +20 TJm +(ours) +[4.9813 +0 +4.9813 +0 +3.317546 +0 +3.875451 +0] Tj +-309 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-310 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +-309 TJm +(C) +[6.645054 +0] Tj +-310 TJm +(\(and) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-309 TJm +(other) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-310 TJm +(compilers\)) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0 +3.317546 +0] Tj +-309 TJm +(generating) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-310 TJm +(bad) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-310 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-309 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +471.527 698.082 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +501.415 698.082 Td +/F15_0 9.9626 Tf +(,) +[2.49065 +0] Tj +-324 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-310 TJm +(I') +[3.317546 +0 +3.317546 +0] Tj +50 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +81.963 686.127 Td +(run) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(across) +[4.423394 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0] Tj +-250 TJm +(tw) +[2.769603 +0 +7.192997 +0] Tj +10 TJm +(o) +[4.9813 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xamples) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(myself.) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 664.209 Td +(2.7.X) +[4.9813 +0 +2.49065 +0 +4.9813 +0 +2.49065 +0 +7.192997 +0] Tj +-299 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ersions) +[4.423394 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-300 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-299 TJm +(GNU) +[7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +-299 TJm +(C) +[6.645054 +0] Tj +-300 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-299 TJm +(kno) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-300 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-299 TJm +(generate) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-299 TJm +(bad) +[4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-300 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-299 TJm +(from) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0] Tj +-299 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-300 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-299 TJm +(time,) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.49065 +0] Tj +-312 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-299 TJm +(high) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-300 TJm +(optimisation) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-299 TJm +(le) +[2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(els.) +[4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-916 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-300 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +81.963 652.254 Td +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-328 TJm +(problems,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-348 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-328 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-329 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-328 TJm +(\003ags) +[5.539206 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +217.176 652.254 Td +/F17_0 9.9626 Tf +(-O2) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-328 TJm +(-fomit-frame-pointer) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-329 TJm +(-fno-strength-reduce) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +480.753 652.254 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-1090 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-328 TJm +(should) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +81.963 640.299 Td +(speci\002cally) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +5.539206 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +129.832 640.299 Td +/F496_0 9.9626 Tf +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +145.055 640.299 Td +/F15_0 9.9626 Tf +(use) +[4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +160.826 640.299 Td +/F17_0 9.9626 Tf +(-funroll-loops) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +244.512 640.299 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 618.381 Td +(Y) +[7.192997 +0] Tj +110 TJm +(ou) +[4.9813 +0 +4.9813 +0] Tj +-240 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-240 TJm +(notice) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0] Tj +-241 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-240 TJm +(Mak) +[8.856751 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e\002le) +[4.423394 +0 +5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-240 TJm +(runs) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-240 TJm +(six) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +-241 TJm +(tests) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-240 TJm +(as) +[4.423394 +0 +3.875451 +0] Tj +-240 TJm +(part) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0] Tj +-240 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-241 TJm +(b) +[4.9813 +0] Tj +20 TJm +(uild) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-240 TJm +(process.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.49065 +0] Tj +-613 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +-240 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-241 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-240 TJm +(passes) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-240 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-240 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-240 TJm +(these,) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-242 TJm +(it') +[2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-241 TJm +(a) +[4.423394 +0] Tj +81.963 606.426 Td +(pretty) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(good) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(\(b) +[3.317546 +0 +4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(100%\)) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +8.298846 +0 +3.317546 +0] Tj +-250 TJm +(indication) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(compiler) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(done) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(its) +[2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(job) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(correctly) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 584.508 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +91.723 584.508 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +124.239 584.508 Td +/F15_0 9.9626 Tf +(crashes) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-264 TJm +(randomly) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-267 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-264 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-263 TJm +(crashes) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-264 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-264 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-263 TJm +(repeatable,) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-268 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-263 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-264 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-264 TJm +(a) +[4.423394 +0] Tj +-264 TJm +(\003ak) +[5.539206 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-263 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-264 TJm +(subsystem.) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +510.112 584.508 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 572.553 Td +/F15_0 9.9626 Tf +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-274 TJm +(hammers) +[4.9813 +0 +4.423394 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-274 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-274 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-274 TJm +(hierarch) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +5 TJm +(y) +[4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-280 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-274 TJm +(it') +[2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-274 TJm +(a) +[4.423394 +0] Tj +-274 TJm +(bit) +[4.9813 +0 +2.769603 +0 +2.769603 +0] Tj +-274 TJm +(mar) +[7.750903 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ginal,) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-280 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(may) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +-274 TJm +(get) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-274 TJm +(these) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-274 TJm +(problems.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-764 TJm +(Ditto) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-274 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-274 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-274 TJm +(disk) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0] Tj +81.963 560.598 Td +(or) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(I/O) +[3.317546 +0 +2.769603 +0 +7.192997 +0] Tj +-250 TJm +(subsystem) +[3.875451 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(slo) +[3.875451 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wly) +[7.192997 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(f) +[3.317546 +0] Tj +10 TJm +(ailing.) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-620 TJm +(Y) +[7.192997 +0] Tj +111 TJm +(up,) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(does) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(happen.) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +81.963 538.68 Td +(T) +[6.087149 +0] Tj +35 TJm +(ry) +[3.317546 +0 +4.9813 +0] Tj +-250 TJm +(using) +[4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(dif) +[4.9813 +0 +2.769603 +0 +3.317546 +0] Tj +25 TJm +(ferent) +[3.317546 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(machine) +[7.750903 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(same) +[3.875451 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-250 TJm +(type,) +[2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(see) +[3.875451 +0 +4.423394 +0 +4.423394 +0] Tj +-250 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(repeat) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(problem.) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +74.491 516.762 Td +(\225) +[3.48691 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-450 TJm +(This) +[6.087149 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-252 TJm +(isn') +[2.769603 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-251 TJm +(really) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-252 TJm +(a) +[4.423394 +0] Tj +-252 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug,) +[4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-252 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-251 TJm +(...) +[2.49065 +0 +2.49065 +0 +2.49065 +0] Tj +-315 TJm +(If) +[3.317546 +0 +3.317546 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +209.383 516.762 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +241.778 516.762 Td +/F15_0 9.9626 Tf +(tells) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-252 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-252 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-252 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-251 TJm +(corrupted) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-252 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-252 TJm +(decompression,) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-252 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-252 TJm +(obtained) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-252 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-251 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +81.963 504.807 Td +(via) +[4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-281 TJm +(FTP) +[5.539206 +0 +6.087149 +0 +5.539206 +0] Tj +111 TJm +(,) +[2.49065 +0] Tj +-282 TJm +(there) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-282 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-281 TJm +(a) +[4.423394 +0] Tj +-282 TJm +(possibility) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-281 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-282 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-281 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(got) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-282 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-281 TJm +(tell) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-282 TJm +(FTP) +[5.539206 +0 +6.087149 +0 +5.539206 +0] Tj +-281 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-282 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-281 TJm +(a) +[4.423394 +0] Tj +-282 TJm +(binary) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-281 TJm +(mode) +[7.750903 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-282 TJm +(transfer) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +-809 TJm +(That) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-282 TJm +(absolutely) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-281 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-282 TJm +(cause) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +81.963 492.852 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-250 TJm +(non-decompressible.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-620 TJm +(Y) +[7.192997 +0] Tj +110 TJm +(ou') +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +10 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(transfer) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-250 TJm +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ain.) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 470.934 Td +(If) +[3.317546 +0 +3.317546 +0] Tj +-235 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +50 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-236 TJm +(inc) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +1 TJm +(o) +[4.9813 +0] Tj +-1 TJm +(r) +[3.317546 +0] Tj +1 TJm +(po) +[4.9813 +0 +4.9813 +0] Tj +-1 TJm +(r) +[3.317546 +0] Tj +1 TJm +(ated) +[4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +163.036 470.934 Td +/F17_0 9.9626 Tf +(libbzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +213.2 470.934 Td +/F15_0 9.9626 Tf +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-235 TJm +(your) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-236 TJm +(o) +[4.9813 +0] Tj +25 TJm +(wn) +[7.192997 +0 +4.9813 +0] Tj +-235 TJm +(program) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0] Tj +-235 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-235 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-236 TJm +(gett) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +1 TJm +(ing) +[2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-236 TJm +(problems,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-238 TJm +(please,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-238 TJm +(please,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-238 TJm +(please,) +[4.9813 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-238 TJm +(check) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-236 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +72 458.979 Td +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(parameters) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-243 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-242 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-242 TJm +(passing) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-242 TJm +(calls) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-242 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-243 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-244 TJm +(are) +[4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-242 TJm +(correct,) +[4.423394 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-244 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-242 TJm +(accordance) +[4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-242 TJm +(with) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-243 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-242 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-242 TJm +(documentation) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-243 TJm +(says) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +72 447.024 Td +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(allo) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +10 TJm +(able.) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.49065 +0] Tj +-310 TJm +(I) +[3.317546 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(tried) +[2.769603 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(mak) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +10 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-250 TJm +(rob) +[3.317546 +0 +4.9813 +0 +4.9813 +0] Tj +20 TJm +(ust) +[4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(ag) +[4.423394 +0 +4.9813 +0] Tj +5 TJm +(ainst) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-250 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(problems,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +3.875451 +0 +2.49065 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-250 TJm +(I'm) +[3.317546 +0 +3.317546 +0 +7.750903 +0] Tj +-250 TJm +(sure) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(I) +[3.317546 +0] Tj +-250 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(en') +[4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(succeeded.) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 425.106 Td +(Finally) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-324 TJm +(if) +[2.769603 +0 +3.317546 +0] Tj +-310 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-309 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-309 TJm +(comments) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-310 TJm +(don') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-309 TJm +(help,) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0] Tj +-324 TJm +(you') +[4.9813 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +10 TJm +(ll) +[2.769603 +0 +2.769603 +0] Tj +-310 TJm +(ha) +[4.9813 +0 +4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-309 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-309 TJm +(send) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-310 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +-309 TJm +(a) +[4.423394 +0] Tj +-309 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-310 TJm +(report.) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.49065 +0] Tj +-976 TJm +(No) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-324 TJm +(it') +[2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-310 TJm +(just) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-309 TJm +(amazing) +[4.423394 +0 +7.750903 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-309 TJm +(ho) +[4.9813 +0 +4.9813 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-310 TJm +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +72 413.151 Td +(people) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(send) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ug) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(report) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-250 TJm +(saying) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(something) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(lik) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(e:) +[4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 386.087] cm +0 0 468 23.91 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 401.629 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(crashed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(with) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(segmentation) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(fault) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(on) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(my) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(machine) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 364.169 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-241 TJm +(absolutely) +[4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-241 TJm +(nothing) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-241 TJm +(el) +[4.423394 +0 +2.769603 +0] Tj +1 TJm +(se.) +[3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-614 TJm +(Needless) +[7.192997 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-241 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-241 TJm +(say) +[3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-243 TJm +(a) +[4.423394 +0] Tj +-241 TJm +(such) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-240 TJm +(a) +[4.423394 +0] Tj +-241 TJm +(report) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0] Tj +-241 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +324.681 364.169 Td +/F496_0 9.9626 Tf +(totally) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0] Tj +55 TJm +(,) +[2.49065 +0] Tj +-243 TJm +(utterly) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0] Tj +55 TJm +(,) +[2.49065 +0] Tj +-242 TJm +(completely) +[4.423394 +0 +4.9813 +0 +7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-241 TJm +(and) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-241 TJm +(compr) +[4.423394 +0 +4.9813 +0 +7.192997 +0 +4.9813 +0 +3.875451 +0] Tj +37 TJm +(ehensively) +[4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-241 TJm +(100%) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +8.298846 +0] Tj +72 352.214 Td +(useless;) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +3.317546 +0] Tj +-257 TJm +(a) +[4.9813 +0] Tj +-255 TJm +(waste) +[6.645054 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0] Tj +-255 TJm +(of) +[4.9813 +0 +2.769603 +0] Tj +-255 TJm +(your) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-255 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0] Tj +10 TJm +(,) +[2.49065 +0] Tj +-256 TJm +(my) +[7.192997 +0 +4.423394 +0] Tj +-255 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.192997 +0 +4.423394 +0] Tj +10 TJm +(,) +[2.49065 +0] Tj +-256 TJm +(and) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-255 TJm +(net) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-255 TJm +(bandwidth) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +6.645054 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +302.574 352.214 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-650 TJm +(W) +[9.404694 +0] Tj +40 TJm +(ith) +[2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-254 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-255 TJm +(details) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-255 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +-255 TJm +(all,) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-256 TJm +(there') +[2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-255 TJm +(no) +[4.9813 +0 +4.9813 +0] Tj +-255 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ay) +[4.423394 +0 +4.9813 +0] Tj +-255 TJm +(I) +[3.317546 +0] Tj +-255 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-255 TJm +(possibly) +[4.9813 +0 +4.9813 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-255 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +15 TJm +(gin) +[4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +72 340.259 Td +(to) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(\002gure) +[5.539206 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-250 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(problem) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(is.) +[2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 318.341 Td +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-309 TJm +(rules) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-309 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-309 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-310 TJm +(g) +[4.9813 +0] Tj +5 TJm +(ame) +[4.423394 +0 +7.750903 +0 +4.423394 +0] Tj +-309 TJm +(are:) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0] Tj +-428 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acts,) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-324 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acts,) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-324 TJm +(f) +[3.317546 +0] Tj +10 TJm +(acts.) +[4.423394 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +2.49065 +0] Tj +-975 TJm +(Don') +[7.192997 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-309 TJm +(omit) +[4.9813 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0] Tj +-309 TJm +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-309 TJm +(because) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-309 TJm +("oh,) +[4.064741 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-324 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-309 TJm +(w) +[7.192997 +0] Tj +10 TJm +(on') +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-309 TJm +(be) +[4.9813 +0 +4.423394 +0] Tj +-310 TJm +(rele) +[3.317546 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ant".) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +4.064741 +0 +2.49065 +0] Tj +-974 TJm +(At) +[7.192997 +0 +2.769603 +0] Tj +-310 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-309 TJm +(bare) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +72 306.386 Td +(minimum:) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.949 0.949 0.9765] sc +/DeviceRGB {} CS +[0.949 0.949 0.9765] SC +q +[1 0 0 1 72 245.514] cm +0 0 468 59.776 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 296.922 Td +/F17_0 9.9626 Tf +(Machine) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(type.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(Operating) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(system) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(version.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 284.967 Td +(Exact) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(version) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(\(do) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(-V\).) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 273.011 Td +(Exact) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(version) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compiler) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(used.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 261.056 Td +(Flags) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(passed) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compiler.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 223.597 Td +/F15_0 9.9626 Tf +(Ho) +[7.192997 +0 +4.9813 +0] Tj +25 TJm +(we) +[7.192997 +0 +4.423394 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(er) +[4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-254 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-252 TJm +(most) +[7.750903 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0] Tj +-253 TJm +(important) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-253 TJm +(single) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-253 TJm +(thing) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-253 TJm +(t) +[2.769603 +0] Tj +1 TJm +(hat) +[4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-253 TJm +(will) +[7.192997 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0] Tj +-253 TJm +(help) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-253 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +-253 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-252 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-253 TJm +(\002le) +[5.539206 +0 +2.769603 +0 +4.423394 +0] Tj +-253 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-253 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-253 TJm +(were) +[7.192997 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0] Tj +-253 TJm +(trying) +[2.769603 +0 +3.317546 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-252 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-253 TJm +(compress) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-253 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-253 TJm +(decompress) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +72 211.641 Td +(at) +[4.423394 +0 +2.769603 +0] Tj +-304 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-305 TJm +(time) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-304 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-304 TJm +(problem) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0] Tj +-305 TJm +(happened.) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +-946 TJm +(W) +[9.404694 +0] Tj +40 TJm +(ithout) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-304 TJm +(that,) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.49065 +0] Tj +-318 TJm +(my) +[7.750903 +0 +4.9813 +0] Tj +-305 TJm +(ability) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-304 TJm +(to) +[2.769603 +0 +4.9813 +0] Tj +-304 TJm +(do) +[4.9813 +0 +4.9813 +0] Tj +-305 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(ything) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-304 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-304 TJm +(than) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-305 TJm +(speculate) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-304 TJm +(about) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-304 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-305 TJm +(cause,) +[4.423394 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-318 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +72 199.686 Td +(limited.) +[2.769603 +0 +2.769603 +0 +7.750903 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 164.933 Td +/F9_0 20.6585 Tf +(4.4.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Did) +[14.915437 +0 +5.743063 +0 +12.622344 +0] Tj +-278 TJm +(y) +[11.486126 +0] Tj +25 TJm +(ou) +[12.622344 +0 +12.622344 +0] Tj +-278 TJm +(g) +[12.622344 +0] Tj +-10 TJm +(et) +[11.486126 +0 +6.879281 +0] Tj +-278 TJm +(the) +[6.879281 +0 +12.622344 +0 +11.486126 +0] Tj +-278 TJm +(right) +[8.036157 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0 +6.879281 +0] Tj +-278 TJm +(pac) +[12.622344 +0 +11.486126 +0 +11.486126 +0] Tj +20 TJm +(ka) +[11.486126 +0 +11.486126 +0] Tj +10 TJm +(g) +[12.622344 +0] Tj +-10 TJm +(e?) +[11.486126 +0 +12.622344 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 143.016 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.603 143.016 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-272 TJm +(a) +[4.423394 +0] Tj +-273 TJm +(resource) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +-272 TJm +(hog.) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-378 TJm +(It) +[3.317546 +0 +2.769603 +0] Tj +-272 TJm +(soaks) +[3.875451 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0] Tj +-273 TJm +(up) +[4.9813 +0 +4.9813 +0] Tj +-272 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-273 TJm +(amounts) +[4.423394 +0 +7.750903 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-272 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-273 TJm +(CPU) +[6.645054 +0 +5.539206 +0 +7.192997 +0] Tj +-272 TJm +(c) +[4.423394 +0] Tj +15 TJm +(ycles) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-273 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-272 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +-755 TJm +(Also,) +[7.192997 +0 +2.769603 +0 +3.875451 +0 +4.9813 +0 +2.49065 +0] Tj +-278 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-273 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-272 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ery) +[4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-273 TJm +(lar) +[2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +18 TJm +(ge) +[4.9813 +0 +4.423394 +0] Tj +-272 TJm +(latencies.) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +72 131.06 Td +(In) +[3.317546 +0 +4.9813 +0] Tj +-251 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-251 TJm +(w) +[7.192997 +0] Tj +10 TJm +(orst) +[4.9813 +0 +3.317546 +0 +3.875451 +0 +2.769603 +0] Tj +-251 TJm +(case,) +[4.423394 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +2.49065 +0] Tj +-251 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(can) +[4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-251 TJm +(feed) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0] Tj +-251 TJm +(man) +[7.750903 +0 +4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-251 TJm +(me) +[7.750903 +0 +4.423394 +0] Tj +15 TJm +(g) +[4.9813 +0] Tj +4 TJm +(abyt) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +1 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-252 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-251 TJm +(uncompressed) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-251 TJm +(data) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0] Tj +-251 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-251 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-251 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-251 TJm +(before) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-251 TJm +(getting) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-251 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-251 TJm +(compressed) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +72 119.105 Td +(output,) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +-250 TJm +(so) +[3.875451 +0 +4.9813 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(probably) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(rules) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(out) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-250 TJm +(applications) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-250 TJm +(requiring) +[3.317546 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(interacti) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e) +[4.423394 +0] Tj +-250 TJm +(beha) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +20 TJm +(viour) +[4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 97.187 Td +(These) +[6.087149 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0] Tj +-304 TJm +(aren') +[4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-304 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aults) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +3.875451 +0] Tj +-304 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-304 TJm +(my) +[7.750903 +0 +4.9813 +0] Tj +-304 TJm +(implementation,) +[2.769603 +0 +7.750903 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-317 TJm +(I) +[3.317546 +0] Tj +-304 TJm +(hope,) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.49065 +0] Tj +-318 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-304 TJm +(more) +[7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0] Tj +-304 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-304 TJm +(intrinsic) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0] Tj +-304 TJm +(property) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0] Tj +-304 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-304 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-304 TJm +(Burro) +[6.645054 +0 +4.9813 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0] Tj +25 TJm +(ws-Wheeler) +[7.192997 +0 +3.875451 +0 +3.317546 +0 +9.404694 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-304 TJm +(transform) +[2.769603 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0] Tj +72 85.232 Td +(\(unfortunately\).) +[3.317546 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +2.49065 +0] Tj +-620 TJm +(Maybe) +[8.856751 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(this) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(isn') +[2.769603 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-250 TJm +(what) +[7.192997 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-250 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant.) +[4.423394 +0 +4.9813 +0 +2.769603 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +(33) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 34 37 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +498.728 749.245 Td +/F15_0 9.9626 Tf +(Miscellanea) +[8.856751 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(If) +[3.317546 +0 +3.317546 +0] Tj +-275 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ant) +[4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-275 TJm +(a) +[4.423394 +0] Tj +-274 TJm +(compressor) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +-275 TJm +(and/or) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +-275 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-274 TJm +(which) +[7.192997 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0] Tj +-275 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-274 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aster) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-281 TJm +(uses) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +3.875451 +0] Tj +-275 TJm +(less) +[2.769603 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0] Tj +-274 TJm +(memory) +[7.750903 +0 +4.423394 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.9813 +0] Tj +-275 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-275 TJm +(gets) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0] Tj +-274 TJm +(pretty) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-275 TJm +(good) +[4.9813 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-274 TJm +(compression,) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +-281 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-275 TJm +(has) +[4.9813 +0 +4.423394 +0 +3.875451 +0] Tj +72 698.082 Td +(minimal) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0] Tj +-288 TJm +(latenc) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-297 TJm +(consider) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-288 TJm +(Jean-loup) +[3.875451 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-288 TJm +(Gailly') +[7.192997 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-288 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-288 TJm +(Mark) +[8.856751 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +-288 TJm +(Adl) +[7.192997 +0 +4.9813 +0 +2.769603 +0] Tj +1 TJm +(er') +[4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-288 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +353.879 698.082 Td +/F17_0 9.9626 Tf +(zlib-1.2.1) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +416.523 698.082 Td +/F15_0 9.9626 Tf +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +433.777 698.082 Td +/F17_0 9.9626 Tf +(gzip-1.2.4) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +493.553 698.082 Td +/F15_0 9.9626 Tf +(.) +[2.49065 +0] Tj +-847 TJm +(Look) +[6.087149 +0 +4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-288 TJm +(for) +[3.317546 +0 +4.9813 +0 +3.317546 +0] Tj +72 686.127 Td +(them) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +7.750903 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +(http://www) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +65 TJm +(.zlib) +[2.49065 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +40 TJm +(.or) +[2.49065 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(g) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +(http://www) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +65 TJm +(.gzip.or) +[2.49065 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.49065 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(g) +[4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +-250 TJm +(respecti) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(ely) +[4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 664.209 Td +(F) +[5.539206 +0] Tj +15 TJm +(or) +[4.9813 +0 +3.317546 +0] Tj +-582 TJm +(something) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-583 TJm +(f) +[3.317546 +0] Tj +10 TJm +(aster) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-582 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-582 TJm +(lighter) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0 +3.317546 +0] Tj +-583 TJm +(still,) +[3.875451 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +2.49065 +0] Tj +-665 TJm +(you) +[4.9813 +0 +4.9813 +0 +4.9813 +0] Tj +-582 TJm +(might) +[7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-583 TJm +(try) +[2.769603 +0 +3.317546 +0 +4.9813 +0] Tj +-582 TJm +(Markus) +[8.856751 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-582 TJm +(F) +[5.539206 +0] Tj +-582 TJm +(X) +[7.192997 +0] Tj +-582 TJm +(J) +[3.875451 +0] Tj +-582 TJm +(Oberhumer') +[7.192997 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +437.433 664.209 Td +/F17_0 9.9626 Tf +(LZO) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +461.164 664.209 Td +/F15_0 9.9626 Tf +(real-time) +[3.317546 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +7.750903 +0 +4.423394 +0] Tj +-582 TJm +(compres-) +[4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.317546 +0] Tj +72 652.254 Td +(sion/decompression) +[3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(library) +[2.769603 +0 +2.769603 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-250 TJm +(at) +[4.423394 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 1] sc +/DeviceRGB {} CS +[0 0 1] SC +-250 TJm +(http://www) +[4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +7.192997 +0 +7.192997 +0 +7.192997 +0] Tj +65 TJm +(.oberhumer) +[2.49065 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +4.9813 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(.com/opensource) +[2.49065 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +(.) +[2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 617.501 Td +/F9_0 20.6585 Tf +(4.5.) +[11.486126 +0 +5.743063 +0 +11.486126 +0 +5.743063 +0] Tj +-278 TJm +(Fur) +[12.622344 +0 +12.622344 +0 +8.036157 +0] Tj +-20 TJm +(ther) +[6.879281 +0 +12.622344 +0 +11.486126 +0 +8.036157 +0] Tj +-278 TJm +(Reading) +[14.915437 +0 +11.486126 +0 +11.486126 +0 +12.622344 +0 +5.743063 +0 +12.622344 +0 +12.622344 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 595.583 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +104.923 595.583 Td +/F15_0 9.9626 Tf +(is) +[2.769603 +0 +3.875451 +0] Tj +-305 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-304 TJm +(research) +[3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-305 TJm +(w) +[7.192997 +0] Tj +10 TJm +(ork,) +[4.9813 +0 +3.317546 +0 +4.9813 +0 +2.49065 +0] Tj +-318 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-305 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-304 TJm +(sense) +[3.875451 +0 +4.423394 +0 +4.9813 +0 +3.875451 +0 +4.423394 +0] Tj +-305 TJm +(that) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-304 TJm +(it) +[2.769603 +0 +2.769603 +0] Tj +-305 TJm +(doesn') +[4.9813 +0 +4.9813 +0 +4.423394 +0 +3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +18 TJm +(t) +[2.769603 +0] Tj +-304 TJm +(present) +[4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-305 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-305 TJm +(ne) +[4.9813 +0 +4.423394 +0] Tj +25 TJm +(w) +[7.192997 +0] Tj +-304 TJm +(ideas.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +-474 TJm +(Rather) +[6.645054 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +40 TJm +(,) +[2.49065 +0] Tj +-318 TJm +(it') +[2.769603 +0 +2.769603 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-305 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +-304 TJm +(engineering) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-305 TJm +(e) +[4.423394 +0] Tj +15 TJm +(x) +[4.9813 +0] Tj +15 TJm +(ercise) +[4.423394 +0 +3.317546 +0 +4.423394 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0] Tj +72 583.628 Td +(based) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(on) +[4.9813 +0 +4.9813 +0] Tj +-250 TJm +(e) +[4.423394 +0] Tj +15 TJm +(xisting) +[4.9813 +0 +2.769603 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(ideas.) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 561.71 Td +(F) +[5.539206 +0] Tj +15 TJm +(our) +[4.9813 +0 +4.9813 +0 +3.317546 +0] Tj +-250 TJm +(documents) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-250 TJm +(describe) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(essentially) +[4.423394 +0 +3.875451 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +-250 TJm +(all) +[4.423394 +0 +2.769603 +0 +2.769603 +0] Tj +-250 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(ideas) +[2.769603 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0 +3.875451 +0] Tj +-250 TJm +(behind) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +298.747 561.71 Td +/F17_0 9.9626 Tf +(bzip2) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +328.635 561.71 Td +/F15_0 9.9626 Tf +(:) +[2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.9294 0.9686 0.9568] sc +/DeviceRGB {} CS +[0.9294 0.9686 0.9568] SC +q +[1 0 0 1 72 259.678] cm +0 0 468 298.879 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 550.189 Td +/F17_0 9.9626 Tf +(Michael) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Burrows) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(D.) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(J.) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Wheeler:) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 538.234 Td +("A) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(block-sorting) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(lossless) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(compression) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(algorithm") +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 526.278 Td +(10th) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(May) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(1994.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 514.323 Td +(Digital) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(SRC) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Research) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Report) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(124.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 502.368 Td +(ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.g\ +z) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 490.413 Td +(If) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(you) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(have) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(trouble) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(finding) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(it,) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(try) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(searching) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(at) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 478.458 Td +(New) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Zealand) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Digital) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Library,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(http://www.nzdl.org.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 454.547 Td +(Daniel) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(S.) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Hirschberg) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Debra) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(A.) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(LeLewer) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 442.592 Td +("Efficient) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Decoding) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Prefix) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Codes") +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 430.637 Td +(Communications) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(ACM,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(April) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(1990,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Vol) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(33,) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Number) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(4.) +[5.97756 +0 +5.97756 +0] Tj +102.732 418.682 Td +(You) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(might) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(be) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(able) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(to) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(get) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(an) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(electronic) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(copy) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(this) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 406.727 Td +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(ACM) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Digital) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Library.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 382.816 Td +(David) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(J.) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Wheeler) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 370.861 Td +(Program) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bred3.c) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(accompanying) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(document) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(bred3.ps.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 358.906 Td +(This) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(contains) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(idea) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(behind) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(multi-table) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Huffman) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(coding) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(scheme.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 346.951 Td +(ftp://ftp.cl.cam.ac.uk/users/djw3/) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 323.04 Td +(Jon) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(L.) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Bentley) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Robert) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Sedgewick) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +98.488 311.085 Td +("Fast) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Algorithms) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(for) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Sorting) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(and) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Searching) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Strings") +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 299.13 Td +(Available) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(from) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Sedgewick's) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(web) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(page,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 287.175 Td +(www.cs.princeton.edu/~rs) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 237.76 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-239 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-238 TJm +(paper) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-239 TJm +(gi) +[4.9813 +0 +2.769603 +0] Tj +25 TJm +(v) +[4.9813 +0] Tj +15 TJm +(es) +[4.423394 +0 +3.875451 +0] Tj +-239 TJm +(v) +[4.9813 +0] Tj +25 TJm +(aluable) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-238 TJm +(additional) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0] Tj +-239 TJm +(insights) +[2.769603 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.769603 +0 +3.875451 +0] Tj +-238 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-239 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-239 TJm +(algorithm,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-241 TJm +(b) +[4.9813 +0] Tj +20 TJm +(ut) +[4.9813 +0 +2.769603 +0] Tj +-238 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-239 TJm +(not) +[4.9813 +0 +4.9813 +0 +2.769603 +0] Tj +-239 TJm +(immedia) +[2.769603 +0 +7.750903 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +1 TJm +(tely) +[2.769603 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0] Tj +-239 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-239 TJm +(basis) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +2.769603 +0 +3.875451 +0] Tj +-238 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-239 TJm +(an) +[4.423394 +0 +4.9813 +0] Tj +15 TJm +(y) +[4.9813 +0] Tj +-239 TJm +(code) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0] Tj +72 225.805 Td +(used) +[4.9813 +0 +3.875451 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(bzip2.) +[4.9813 +0 +4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +2.49065 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.9294 0.9686 0.9568] sc +/DeviceRGB {} CS +[0.9294 0.9686 0.9568] SC +q +[1 0 0 1 72 150.921] cm +0 0 468 71.731 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 214.283 Td +/F17_0 9.9626 Tf +(Peter) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Fenwick:) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 202.328 Td +(Block) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Sorting) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Text) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Compression) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 190.373 Td +(Proceedings) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(19th) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Australasian) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Computer) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Science) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Conference,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +111.22 178.418 Td +(Melbourne,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Australia.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(Jan) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(31) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(-) +[5.97756 +0] Tj +-426 TJm +(Feb) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(2,) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(1996.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 166.463 Td +(ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 129.003 Td +/F15_0 9.9626 Tf +(K) +[7.192997 +0] Tj +15 TJm +(unihik) +[4.9813 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +10 TJm +(o) +[4.9813 +0] Tj +-250 TJm +(Sadakane') +[5.539206 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +55 TJm +(s) +[3.875451 +0] Tj +-250 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(algorithm,) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +2.49065 +0] Tj +-250 TJm +(mentioned) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(abo) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +15 TJm +(v) +[4.9813 +0] Tj +15 TJm +(e,) +[4.423394 +0 +2.49065 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(from:) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.9294 0.9686 0.9568] sc +/DeviceRGB {} CS +[0.9294 0.9686 0.9568] SC +q +[1 0 0 1 72 89.985] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 117.482 Td +/F17_0 9.9626 Tf +(http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +/F15_0 9.9626 Tf +(34) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Page: 35 38 +%%PageMedia: Letter +%%PageBoundingBox: 0 0 612 792 +%%PageOrientation: Portrait +%%BeginPageSetup +612 792 pdfSetupPaper +pdfStartPage +0 0 612 792 re W +%%EndPageSetup +[] 0 d +1 i +0 j +0 J +10 M +1 w +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +false op +false OP +{} settransfer +q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +498.728 749.245 Td +/F15_0 9.9626 Tf +(Miscellanea) +[8.856751 +0 +2.769603 +0 +3.875451 +0 +4.423394 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +q +[1 0 0 1 73.893 741.803] cm +[] 0 d +0 J +0.498 w +0 0 m +475.465 0 l +S +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +72 710.037 Td +/F15_0 9.9626 Tf +(The) +[6.087149 +0 +4.9813 +0 +4.423394 +0] Tj +-250 TJm +(Manber) +[8.856751 +0 +4.423394 +0 +4.9813 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +20 TJm +(-Myers) +[3.317546 +0 +8.856751 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-250 TJm +(suf) +[3.875451 +0 +4.9813 +0 +3.317546 +0] Tj +25 TJm +(\002x) +[5.539206 +0 +4.9813 +0] Tj +-250 TJm +(array) +[4.423394 +0 +3.317546 +0 +3.317546 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(construction) +[4.423394 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0 +2.769603 +0 +3.317546 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-250 TJm +(algorithm) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0] Tj +-250 TJm +(is) +[2.769603 +0 +3.875451 +0] Tj +-250 TJm +(described) +[4.9813 +0 +4.423394 +0 +3.875451 +0 +4.423394 +0 +3.317546 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0] Tj +-250 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +-250 TJm +(paper) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0] Tj +-250 TJm +(a) +[4.423394 +0] Tj +20 TJm +(v) +[4.9813 +0] Tj +25 TJm +(ailable) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0 +4.423394 +0] Tj +-250 TJm +(from:) +[3.317546 +0 +3.317546 +0 +4.9813 +0 +7.750903 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.9294 0.9686 0.9568] sc +/DeviceRGB {} CS +[0.9294 0.9686 0.9568] SC +q +[1 0 0 1 72 671.019] cm +0 0 468 35.866 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 698.516 Td +/F17_0 9.9626 Tf +(http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +72 649.101 Td +/F15_0 9.9626 Tf +(Finally) +[5.539206 +0 +2.769603 +0 +4.9813 +0 +4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +65 TJm +(,) +[2.49065 +0] Tj +-227 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-221 TJm +(follo) +[3.317546 +0 +4.9813 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +25 TJm +(wing) +[7.192997 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(papers) +[4.9813 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +3.317546 +0 +3.875451 +0] Tj +-221 TJm +(document) +[4.9813 +0 +4.9813 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +2.769603 +0] Tj +-221 TJm +(some) +[3.875451 +0 +4.9813 +0 +7.750903 +0 +4.423394 +0] Tj +-222 TJm +(in) +[2.769603 +0 +4.9813 +0] Tj +40 TJm +(v) +[4.9813 +0] Tj +15 TJm +(estig) +[4.423394 +0 +3.875451 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0] Tj +5 TJm +(ations) +[4.423394 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.875451 +0] Tj +-221 TJm +(I) +[3.317546 +0] Tj +-221 TJm +(made) +[7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0] Tj +-222 TJm +(into) +[2.769603 +0 +4.9813 +0 +2.769603 +0 +4.9813 +0] Tj +-221 TJm +(the) +[2.769603 +0 +4.9813 +0 +4.423394 +0] Tj +-221 TJm +(performance) +[4.9813 +0 +4.423394 +0 +3.317546 +0 +3.317546 +0 +4.9813 +0 +3.317546 +0 +7.750903 +0 +4.423394 +0 +4.9813 +0 +4.423394 +0 +4.423394 +0] Tj +-222 TJm +(of) +[4.9813 +0 +3.317546 +0] Tj +-221 TJm +(sorting) +[3.875451 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +-221 TJm +(and) +[4.423394 +0 +4.9813 +0 +4.9813 +0] Tj +-222 TJm +(decompression) +[4.9813 +0 +4.423394 +0 +4.423394 +0 +4.9813 +0 +7.750903 +0 +4.9813 +0 +3.317546 +0 +4.423394 +0 +3.875451 +0 +3.875451 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0] Tj +72 637.146 Td +(algorithms:) +[4.423394 +0 +2.769603 +0 +4.9813 +0 +4.9813 +0 +3.317546 +0 +2.769603 +0 +2.769603 +0 +4.9813 +0 +7.750903 +0 +3.875451 +0 +2.769603 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0.9294 0.9686 0.9568] sc +/DeviceRGB {} CS +[0.9294 0.9686 0.9568] SC +q +[1 0 0 1 72 502.486] cm +0 0 468 131.507 re +f +Q +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +[1 0 0 1 0 0] Tm +0 0 Td +90 625.624 Td +/F17_0 9.9626 Tf +(Julian) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Seward) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 613.669 Td +(On) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Performance) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(BWT) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Sorting) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Algorithms) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 601.714 Td +(Proceedings) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(IEEE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Compression) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Conference) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(2000) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +111.22 589.759 Td +(Snowbird,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Utah.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(28-30) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(March) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(2000.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +90 565.848 Td +(Julian) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Seward) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 553.893 Td +(Space-time) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Tradeoffs) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(in) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Inverse) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(B-W) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Transform) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +102.732 541.938 Td +(Proceedings) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(of) +[5.97756 +0 +5.97756 +0] Tj +-426 TJm +(the) +[5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(IEEE) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Data) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Compression) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Conference) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(2001) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +111.22 529.983 Td +(Snowbird,) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(Utah.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-852 TJm +(27-29) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(March) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +-426 TJm +(2001.) +[5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0 +5.97756 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +534.414 50.951 Td +/F15_0 9.9626 Tf +(35) +[4.9813 +0 +4.9813 +0] Tj +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceRGB {} cs +[0 0 0] sc +/DeviceRGB {} CS +[0 0 0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +/DeviceGray {} cs +[0] sc +/DeviceGray {} CS +[0] SC +Q +showpage +%%PageTrailer +pdfEndPage +%%Trailer +end +%%DocumentSuppliedResources: +%%+ font PYRIYB+NimbusSanL-Bold +%%+ font XDVKOU+NimbusRomNo9L-Regu +%%+ font QYKIKI+NimbusMonL-Regu +%%+ font BITXNG+CMMI10 +%%+ font ZWXELK+NimbusMonL-Bold +%%+ font FRBTTO+CMSY10 +%%+ font AMYDOG+NimbusRomNo9L-ReguItal +%%EOF diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.xml b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.xml new file mode 100644 index 000000000..ea9fca2e8 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/manual.xml @@ -0,0 +1,2964 @@ + + + %common-ents; +]> + + + + + bzip2 and libbzip2, version &bz-version; + A program and library for data compression + + &bz-lifespan; + Julian Seward + + Version &bz-version; of &bz-date; + + + + Julian + Seward + + &bz-url; + + + + + + + This program, bzip2, the + associated library libbzip2, and + all documentation, are copyright © &bz-lifespan; Julian Seward. + All rights reserved. + + Redistribution and use in source and binary forms, with + or without modification, are permitted provided that the + following conditions are met: + + + + Redistributions of source code must retain the + above copyright notice, this list of conditions and the + following disclaimer. + + The origin of this software must not be + misrepresented; you must not claim that you wrote the original + software. If you use this software in a product, an + acknowledgment in the product documentation would be + appreciated but is not required. + + Altered source versions must be plainly marked + as such, and must not be misrepresented as being the original + software. + + The name of the author may not be used to + endorse or promote products derived from this software without + specific prior written permission. + + + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + + PATENTS: To the best of my knowledge, + bzip2 and + libbzip2 do not use any patented + algorithms. However, I do not have the resources to carry + out a patent search. Therefore I cannot give any guarantee of + the above statement. + + + + + + + + + +Introduction + +bzip2 compresses files +using the Burrows-Wheeler block-sorting text compression +algorithm, and Huffman coding. Compression is generally +considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of +the PPM family of statistical compressors. + +bzip2 is built on top of +libbzip2, a flexible library for +handling compressed data in the +bzip2 format. This manual +describes both how to use the program and how to work with the +library interface. Most of the manual is devoted to this +library, not the program, which is good news if your interest is +only in the program. + + + + describes how to use + bzip2; this is the only part + you need to read if you just want to know how to operate the + program. + + describes the + programming interfaces in detail, and + + records some + miscellaneous notes which I thought ought to be recorded + somewhere. + + + + + + + +How to use bzip2 + +This chapter contains a copy of the +bzip2 man page, and nothing +else. + + +NAME + + + + bzip2, + bunzip2 - a block-sorting file + compressor, v&bz-version; + + bzcat - + decompresses files to stdout + + bzip2recover - + recovers data from damaged bzip2 files + + + + + + + +SYNOPSIS + + + + bzip2 [ + -cdfkqstvzVL123456789 ] [ filenames ... ] + + bunzip2 [ + -fkvsVL ] [ filenames ... ] + + bzcat [ -s ] [ + filenames ... ] + + bzip2recover + filename + + + + + + + +DESCRIPTION + +bzip2 compresses files +using the Burrows-Wheeler block sorting text compression +algorithm, and Huffman coding. Compression is generally +considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of +the PPM family of statistical compressors. + +The command-line options are deliberately very similar to +those of GNU gzip, but they are +not identical. + +bzip2 expects a list of +file names to accompany the command-line flags. Each file is +replaced by a compressed version of itself, with the name +original_name.bz2. Each +compressed file has the same modification date, permissions, and, +when possible, ownership as the corresponding original, so that +these properties can be correctly restored at decompression time. +File name handling is naive in the sense that there is no +mechanism for preserving original file names, permissions, +ownerships or dates in filesystems which lack these concepts, or +have serious file name length restrictions, such as +MS-DOS. + +bzip2 and +bunzip2 will by default not +overwrite existing files. If you want this to happen, specify +the -f flag. + +If no file names are specified, +bzip2 compresses from standard +input to standard output. In this case, +bzip2 will decline to write +compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless. + +bunzip2 (or +bzip2 -d) decompresses all +specified files. Files which were not created by +bzip2 will be detected and +ignored, and a warning issued. +bzip2 attempts to guess the +filename for the decompressed file from that of the compressed +file as follows: + + + + filename.bz2 + becomes + filename + + filename.bz + becomes + filename + + filename.tbz2 + becomes + filename.tar + + filename.tbz + becomes + filename.tar + + anyothername + becomes + anyothername.out + + + +If the file does not end in one of the recognised endings, +.bz2, +.bz, +.tbz2 or +.tbz, +bzip2 complains that it cannot +guess the name of the original file, and uses the original name +with .out appended. + +As with compression, supplying no filenames causes +decompression from standard input to standard output. + +bunzip2 will correctly +decompress a file which is the concatenation of two or more +compressed files. The result is the concatenation of the +corresponding uncompressed files. Integrity testing +(-t) of concatenated compressed +files is also supported. + +You can also compress or decompress files to the standard +output by giving the -c flag. +Multiple files may be compressed and decompressed like this. The +resulting outputs are fed sequentially to stdout. Compression of +multiple files in this manner generates a stream containing +multiple compressed file representations. Such a stream can be +decompressed correctly only by +bzip2 version 0.9.0 or later. +Earlier versions of bzip2 will +stop after decompressing the first file in the stream. + +bzcat (or +bzip2 -dc) decompresses all +specified files to the standard output. + +bzip2 will read arguments +from the environment variables +BZIP2 and +BZIP, in that order, and will +process them before any arguments read from the command line. +This gives a convenient way to supply default arguments. + +Compression is always performed, even if the compressed +file is slightly larger than the original. Files of less than +about one hundred bytes tend to get larger, since the compression +mechanism has a constant overhead in the region of 50 bytes. +Random data (including the output of most file compressors) is +coded at about 8.05 bits per byte, giving an expansion of around +0.5%. + +As a self-check for your protection, +bzip2 uses 32-bit CRCs to make +sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, +and against undetected bugs in +bzip2 (hopefully very unlikely). +The chances of data corruption going undetected is microscopic, +about one chance in four billion for each file processed. Be +aware, though, that the check occurs upon decompression, so it +can only tell you that something is wrong. It can't help you +recover the original uncompressed data. You can use +bzip2recover to try to recover +data from damaged files. + +Return values: 0 for a normal exit, 1 for environmental +problems (file not found, invalid flags, I/O errors, etc.), 2 +to indicate a corrupt compressed file, 3 for an internal +consistency error (eg, bug) which caused +bzip2 to panic. + + + + + +OPTIONS + + + + + -c --stdout + Compress or decompress to standard + output. + + + + -d --decompress + Force decompression. + bzip2, + bunzip2 and + bzcat are really the same + program, and the decision about what actions to take is done on + the basis of which name is used. This flag overrides that + mechanism, and forces bzip2 to decompress. + + + + -z --compress + The complement to + -d: forces compression, + regardless of the invokation name. + + + + -t --test + Check integrity of the specified file(s), but + don't decompress them. This really performs a trial + decompression and throws away the result. + + + + -f --force + Force overwrite of output files. Normally, + bzip2 will not overwrite + existing output files. Also forces + bzip2 to break hard links to + files, which it otherwise wouldn't do. + bzip2 normally declines + to decompress files which don't have the correct magic header + bytes. If forced (-f), + however, it will pass such files through unmodified. This is + how GNU gzip behaves. + + + + + -k --keep + Keep (don't delete) input files during + compression or decompression. + + + + -s --small + Reduce memory usage, for compression, + decompression and testing. Files are decompressed and tested + using a modified algorithm which only requires 2.5 bytes per + block byte. This means any file can be decompressed in 2300k + of memory, albeit at about half the normal speed. + During compression, -s + selects a block size of 200k, which limits memory use to around + the same figure, at the expense of your compression ratio. In + short, if your machine is low on memory (8 megabytes or less), + use -s for everything. See + below. + + + + -q --quiet + Suppress non-essential warning messages. + Messages pertaining to I/O errors and other critical events + will not be suppressed. + + + + -v --verbose + Verbose mode -- show the compression ratio for + each file processed. Further + -v's increase the verbosity + level, spewing out lots of information which is primarily of + interest for diagnostic purposes. + + + + -L --license -V --version + Display the software version, license terms and + conditions. + + + + -1 (or + --fast) to + -9 (or + -best) + Set the block size to 100 k, 200 k ... 900 k + when compressing. Has no effect when decompressing. See below. The + --fast and + --best aliases are primarily + for GNU gzip compatibility. + In particular, --fast doesn't + make things significantly faster. And + --best merely selects the + default behaviour. + + + + -- + Treats all subsequent arguments as file names, + even if they start with a dash. This is so you can handle + files with names beginning with a dash, for example: + bzip2 -- + -myfilename. + + + + --repetitive-fast + --repetitive-best + These flags are redundant in versions 0.9.5 and + above. They provided some coarse control over the behaviour of + the sorting algorithm in earlier versions, which was sometimes + useful. 0.9.5 and above have an improved algorithm which + renders these flags irrelevant. + + + + + + + + +MEMORY MANAGEMENT + +bzip2 compresses large +files in blocks. The block size affects both the compression +ratio achieved, and the amount of memory needed for compression +and decompression. The flags -1 +through -9 specify the block +size to be 100,000 bytes through 900,000 bytes (the default) +respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +bunzip2 then allocates itself +just enough memory to decompress the file. Since block sizes are +stored in compressed files, it follows that the flags +-1 to +-9 are irrelevant to and so +ignored during decompression. + +Compression and decompression requirements, in bytes, can be +estimated as: + +Compression: 400k + ( 8 x block size ) + +Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + + +Larger block sizes give rapidly diminishing marginal +returns. Most of the compression comes from the first two or +three hundred k of block size, a fact worth bearing in mind when +using bzip2 on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block +size. + +For files compressed with the default 900k block size, +bunzip2 will require about 3700 +kbytes to decompress. To support decompression of any file on a +4 megabyte machine, bunzip2 has +an option to decompress using approximately half this amount of +memory, about 2300 kbytes. Decompression speed is also halved, +so you should use this option only where necessary. The relevant +flag is -s. + +In general, try and use the largest block size memory +constraints allow, since that maximises the compression achieved. +Compression and decompression speed are virtually unaffected by +block size. + +Another significant point applies to files which fit in a +single block -- that means most files you'd encounter using a +large block size. The amount of real memory touched is +proportional to the size of the file, since the file is smaller +than a block. For example, compressing a file 20,000 bytes long +with the flag -9 will cause the +compressor to allocate around 7600k of memory, but only touch +400k + 20000 * 8 = 560 kbytes of it. Similarly, the decompressor +will allocate 3700k but only touch 100k + 20000 * 4 = 180 +kbytes. + +Here is a table which summarises the maximum memory usage +for different block sizes. Also recorded is the total compressed +size for 14 files of the Calgary Text Compression Corpus +totalling 3,141,622 bytes. This column gives some feel for how +compression varies with block size. These figures tend to +understate the advantage of larger block sizes for larger files, +since the Corpus is dominated by smaller files. + + + Compress Decompress Decompress Corpus +Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + + + + + + +RECOVERING DATA FROM DAMAGED FILES + +bzip2 compresses files in +blocks, usually 900kbytes long. Each block is handled +independently. If a media or transmission error causes a +multi-block .bz2 file to become +damaged, it may be possible to recover data from the undamaged +blocks in the file. + +The compressed representation of each block is delimited by +a 48-bit pattern, which makes it possible to find the block +boundaries with reasonable certainty. Each block also carries +its own 32-bit CRC, so damaged blocks can be distinguished from +undamaged ones. + +bzip2recover is a simple +program whose purpose is to search for blocks in +.bz2 files, and write each block +out into its own .bz2 file. You +can then use bzip2 -t to test +the integrity of the resulting files, and decompress those which +are undamaged. + +bzip2recover takes a +single argument, the name of the damaged file, and writes a +number of files rec0001file.bz2, +rec0002file.bz2, etc, containing +the extracted blocks. The output filenames are designed so that +the use of wildcards in subsequent processing -- for example, +bzip2 -dc rec*file.bz2 > +recovered_data -- lists the files in the correct +order. + +bzip2recover should be of +most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly futile +to use it on damaged single-block files, since a damaged block +cannot be recovered. If you wish to minimise any potential data +loss through media or transmission errors, you might consider +compressing with a smaller block size. + + + + + +PERFORMANCE NOTES + +The sorting phase of compression gathers together similar +strings in the file. Because of this, files containing very long +runs of repeated symbols, like "aabaabaabaab ..." (repeated +several hundred times) may compress more slowly than normal. +Versions 0.9.5 and above fare much better than previous versions +in this respect. The ratio between worst-case and average-case +compression time is in the region of 10:1. For previous +versions, this figure was more like 100:1. You can use the +-vvvv option to monitor progress +in great detail, if you want. + +Decompression speed is unaffected by these +phenomena. + +bzip2 usually allocates +several megabytes of memory to operate in, and then charges all +over it in a fairly random fashion. This means that performance, +both for compressing and decompressing, is largely determined by +the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss +rate have been observed to give disproportionately large +performance improvements. I imagine +bzip2 will perform best on +machines with very large caches. + + + + + + +CAVEATS + +I/O error messages are not as helpful as they could be. +bzip2 tries hard to detect I/O +errors and exit cleanly, but the details of what the problem is +sometimes seem rather misleading. + +This manual page pertains to version &bz-version; of +bzip2. Compressed data created by +this version is entirely forwards and backwards compatible with the +previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0, +1.0.1, 1.0.2 and 1.0.3, but with the following exception: 0.9.0 and +above can correctly decompress multiple concatenated compressed files. +0.1pl2 cannot do this; it will stop after decompressing just the first +file in the stream. + +bzip2recover versions +prior to 1.0.2 used 32-bit integers to represent bit positions in +compressed files, so it could not handle compressed files more +than 512 megabytes long. Versions 1.0.2 and above use 64-bit ints +on some platforms which support them (GNU supported targets, and +Windows). To establish whether or not +bzip2recover was built with such +a limitation, run it without arguments. In any event you can +build yourself an unlimited version if you can recompile it with +MaybeUInt64 set to be an +unsigned 64-bit integer. + + + + + + +AUTHOR + +Julian Seward, +&bz-author; + +The ideas embodied in +bzip2 are due to (at least) the +following people: Michael Burrows and David Wheeler (for the +block sorting transformation), David Wheeler (again, for the +Huffman coder), Peter Fenwick (for the structured coding model in +the original bzip, and many +refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +bzip). I am much indebted for +their help, support and advice. See the manual in the source +distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, +so as to speed up compression. Bela Lubkin encouraged me to +improve the worst-case compression performance. +Donna Robinson XMLised the documentation. +Many people sent +patches, helped with portability problems, lent machines, gave +advice and were generally helpful. + + + + + + + + + +Programming with <computeroutput>libbzip2</computeroutput> + + +This chapter describes the programming interface to +libbzip2. + +For general background information, particularly about +memory use and performance aspects, you'd be well advised to read + as well. + + + +Top-level structure + +libbzip2 is a flexible +library for compressing and decompressing data in the +bzip2 data format. Although +packaged as a single entity, it helps to regard the library as +three separate parts: the low level interface, and the high level +interface, and some utility functions. + +The structure of +libbzip2's interfaces is similar +to that of Jean-loup Gailly's and Mark Adler's excellent +zlib library. + +All externally visible symbols have names beginning +BZ2_. This is new in version +1.0. The intention is to minimise pollution of the namespaces of +library clients. + +To use any part of the library, you need to +#include <bzlib.h> +into your sources. + + + + +Low-level summary + +This interface provides services for compressing and +decompressing data in memory. There's no provision for dealing +with files, streams or any other I/O mechanisms, just straight +memory-to-memory work. In fact, this part of the library can be +compiled without inclusion of +stdio.h, which may be helpful +for embedded applications. + +The low-level part of the library has no global variables +and is therefore thread-safe. + +Six routines make up the low level interface: +BZ2_bzCompressInit, +BZ2_bzCompress, and +BZ2_bzCompressEnd for +compression, and a corresponding trio +BZ2_bzDecompressInit, +BZ2_bzDecompress and +BZ2_bzDecompressEnd for +decompression. The *Init +functions allocate memory for compression/decompression and do +other initialisations, whilst the +*End functions close down +operations and release memory. + +The real work is done by +BZ2_bzCompress and +BZ2_bzDecompress. These +compress and decompress data from a user-supplied input buffer to +a user-supplied output buffer. These buffers can be any size; +arbitrary quantities of data are handled by making repeated calls +to these functions. This is a flexible mechanism allowing a +consumer-pull style of activity, or producer-push, or a mixture +of both. + + + + + +High-level summary + +This interface provides some handy wrappers around the +low-level interface to facilitate reading and writing +bzip2 format files +(.bz2 files). The routines +provide hooks to facilitate reading files in which the +bzip2 data stream is embedded +within some larger-scale file structure, or where there are +multiple bzip2 data streams +concatenated end-to-end. + +For reading files, +BZ2_bzReadOpen, +BZ2_bzRead, +BZ2_bzReadClose and +BZ2_bzReadGetUnused are +supplied. For writing files, +BZ2_bzWriteOpen, +BZ2_bzWrite and +BZ2_bzWriteFinish are +available. + +As with the low-level library, no global variables are used +so the library is per se thread-safe. However, if I/O errors +occur whilst reading or writing the underlying compressed files, +you may have to consult errno to +determine the cause of the error. In that case, you'd need a C +library which correctly supports +errno in a multithreaded +environment. + +To make the library a little simpler and more portable, +BZ2_bzReadOpen and +BZ2_bzWriteOpen require you to +pass them file handles (FILE*s) +which have previously been opened for reading or writing +respectively. That avoids portability problems associated with +file operations and file attributes, whilst not being much of an +imposition on the programmer. + + + + + +Utility functions summary + +For very simple needs, +BZ2_bzBuffToBuffCompress and +BZ2_bzBuffToBuffDecompress are +provided. These compress data in memory from one buffer to +another buffer in a single function call. You should assess +whether these functions fulfill your memory-to-memory +compression/decompression requirements before investing effort in +understanding the more general but more complex low-level +interface. + +Yoshioka Tsuneo +(tsuneo@rr.iij4u.or.jp) has +contributed some functions to give better +zlib compatibility. These +functions are BZ2_bzopen, +BZ2_bzread, +BZ2_bzwrite, +BZ2_bzflush, +BZ2_bzclose, +BZ2_bzerror and +BZ2_bzlibVersion. You may find +these functions more convenient for simple file reading and +writing, than those in the high-level interface. These functions +are not (yet) officially part of the library, and are minimally +documented here. If they break, you get to keep all the pieces. +I hope to document them properly when time permits. + +Yoshioka also contributed modifications to allow the +library to be built as a Windows DLL. + + + + + + + +Error handling + +The library is designed to recover cleanly in all +situations, including the worst-case situation of decompressing +random data. I'm not 100% sure that it can always do this, so +you might want to add a signal handler to catch segmentation +violations during decompression if you are feeling especially +paranoid. I would be interested in hearing more about the +robustness of the library to corrupted compressed data. + +Version 1.0.3 more robust in this respect than any +previous version. Investigations with Valgrind (a tool for detecting +problems with memory management) indicate +that, at least for the few files I tested, all single-bit errors +in the decompressed data are caught properly, with no +segmentation faults, no uses of uninitialised data, no out of +range reads or writes, and no infinite looping in the decompressor. +So it's certainly pretty robust, although +I wouldn't claim it to be totally bombproof. + +The file bzlib.h contains +all definitions needed to use the library. In particular, you +should definitely not include +bzlib_private.h. + +In bzlib.h, the various +return values are defined. The following list is not intended as +an exhaustive description of the circumstances in which a given +value may be returned -- those descriptions are given later. +Rather, it is intended to convey the rough meaning of each return +value. The first five actions are normal and not intended to +denote an error situation. + + + + + BZ_OK + The requested action was completed + successfully. + + + + BZ_RUN_OK, BZ_FLUSH_OK, + BZ_FINISH_OK + In + BZ2_bzCompress, the requested + flush/finish/nothing-special action was completed + successfully. + + + + BZ_STREAM_END + Compression of data was completed, or the + logical stream end was detected during + decompression. + + + + +The following return values indicate an error of some +kind. + + + + + BZ_CONFIG_ERROR + Indicates that the library has been improperly + compiled on your platform -- a major configuration error. + Specifically, it means that + sizeof(char), + sizeof(short) and + sizeof(int) are not 1, 2 and + 4 respectively, as they should be. Note that the library + should still work properly on 64-bit platforms which follow + the LP64 programming model -- that is, where + sizeof(long) and + sizeof(void*) are 8. Under + LP64, sizeof(int) is still 4, + so libbzip2, which doesn't + use the long type, is + OK. + + + + BZ_SEQUENCE_ERROR + When using the library, it is important to call + the functions in the correct sequence and with data structures + (buffers etc) in the correct states. + libbzip2 checks as much as it + can to ensure this is happening, and returns + BZ_SEQUENCE_ERROR if not. + Code which complies precisely with the function semantics, as + detailed below, should never receive this value; such an event + denotes buggy code which you should + investigate. + + + + BZ_PARAM_ERROR + Returned when a parameter to a function call is + out of range or otherwise manifestly incorrect. As with + BZ_SEQUENCE_ERROR, this + denotes a bug in the client code. The distinction between + BZ_PARAM_ERROR and + BZ_SEQUENCE_ERROR is a bit + hazy, but still worth making. + + + + BZ_MEM_ERROR + Returned when a request to allocate memory + failed. Note that the quantity of memory needed to decompress + a stream cannot be determined until the stream's header has + been read. So + BZ2_bzDecompress and + BZ2_bzRead may return + BZ_MEM_ERROR even though some + of the compressed data has been read. The same is not true + for compression; once + BZ2_bzCompressInit or + BZ2_bzWriteOpen have + successfully completed, + BZ_MEM_ERROR cannot + occur. + + + + BZ_DATA_ERROR + Returned when a data integrity error is + detected during decompression. Most importantly, this means + when stored and computed CRCs for the data do not match. This + value is also returned upon detection of any other anomaly in + the compressed data. + + + + BZ_DATA_ERROR_MAGIC + As a special case of + BZ_DATA_ERROR, it is + sometimes useful to know when the compressed stream does not + start with the correct magic bytes ('B' 'Z' + 'h'). + + + + BZ_IO_ERROR + Returned by + BZ2_bzRead and + BZ2_bzWrite when there is an + error reading or writing in the compressed file, and by + BZ2_bzReadOpen and + BZ2_bzWriteOpen for attempts + to use a file for which the error indicator (viz, + ferror(f)) is set. On + receipt of BZ_IO_ERROR, the + caller should consult errno + and/or perror to acquire + operating-system specific information about the + problem. + + + + BZ_UNEXPECTED_EOF + Returned by + BZ2_bzRead when the + compressed file finishes before the logical end of stream is + detected. + + + + BZ_OUTBUFF_FULL + Returned by + BZ2_bzBuffToBuffCompress and + BZ2_bzBuffToBuffDecompress to + indicate that the output data will not fit into the output + buffer provided. + + + + + + + + + +Low-level interface + + + +BZ2_bzCompressInit + + +typedef struct { + char *next_in; + unsigned int avail_in; + unsigned int total_in_lo32; + unsigned int total_in_hi32; + + char *next_out; + unsigned int avail_out; + unsigned int total_out_lo32; + unsigned int total_out_hi32; + + void *state; + + void *(*bzalloc)(void *,int,int); + void (*bzfree)(void *,void *); + void *opaque; +} bz_stream; + +int BZ2_bzCompressInit ( bz_stream *strm, + int blockSize100k, + int verbosity, + int workFactor ); + + +Prepares for compression. The +bz_stream structure holds all +data pertaining to the compression activity. A +bz_stream structure should be +allocated and initialised prior to the call. The fields of +bz_stream comprise the entirety +of the user-visible data. state +is a pointer to the private data structures required for +compression. + +Custom memory allocators are supported, via fields +bzalloc, +bzfree, and +opaque. The value +opaque is passed to as the first +argument to all calls to bzalloc +and bzfree, but is otherwise +ignored by the library. The call bzalloc ( +opaque, n, m ) is expected to return a pointer +p to n * +m bytes of memory, and bzfree ( +opaque, p ) should free that memory. + +If you don't want to use a custom memory allocator, set +bzalloc, +bzfree and +opaque to +NULL, and the library will then +use the standard malloc / +free routines. + +Before calling +BZ2_bzCompressInit, fields +bzalloc, +bzfree and +opaque should be filled +appropriately, as just described. Upon return, the internal +state will have been allocated and initialised, and +total_in_lo32, +total_in_hi32, +total_out_lo32 and +total_out_hi32 will have been +set to zero. These four fields are used by the library to inform +the caller of the total amount of data passed into and out of the +library, respectively. You should not try to change them. As of +version 1.0, 64-bit counts are maintained, even on 32-bit +platforms, using the _hi32 +fields to store the upper 32 bits of the count. So, for example, +the total amount of data in is (total_in_hi32 +<< 32) + total_in_lo32. + +Parameter blockSize100k +specifies the block size to be used for compression. It should +be a value between 1 and 9 inclusive, and the actual block size +used is 100000 x this figure. 9 gives the best compression but +takes most memory. + +Parameter verbosity should +be set to a number between 0 and 4 inclusive. 0 is silent, and +greater numbers give increasingly verbose monitoring/debugging +output. If the library has been compiled with +-DBZ_NO_STDIO, no such output +will appear for any verbosity setting. + +Parameter workFactor +controls how the compression phase behaves when presented with +worst case, highly repetitive, input data. If compression runs +into difficulties caused by repetitive data, the library switches +from the standard sorting algorithm to a fallback algorithm. The +fallback is slower than the standard algorithm by perhaps a +factor of three, but always behaves reasonably, no matter how bad +the input. + +Lower values of workFactor +reduce the amount of effort the standard algorithm will expend +before resorting to the fallback. You should set this parameter +carefully; too low, and many inputs will be handled by the +fallback algorithm and so compress rather slowly, too high, and +your average-to-worst case compression times can become very +large. The default value of 30 gives reasonable behaviour over a +wide range of circumstances. + +Allowable values range from 0 to 250 inclusive. 0 is a +special case, equivalent to using the default value of 30. + +Note that the compressed output generated is the same +regardless of whether or not the fallback algorithm is +used. + +Be aware also that this parameter may disappear entirely in +future versions of the library. In principle it should be +possible to devise a good way to automatically choose which +algorithm to use. Such a mechanism would render the parameter +obsolete. + +Possible return values: + + +BZ_CONFIG_ERROR + if the library has been mis-compiled +BZ_PARAM_ERROR + if strm is NULL + or blockSize < 1 or blockSize > 9 + or verbosity < 0 or verbosity > 4 + or workFactor < 0 or workFactor > 250 +BZ_MEM_ERROR + if not enough memory is available +BZ_OK + otherwise + + +Allowable next actions: + + +BZ2_bzCompress + if BZ_OK is returned + no specific action needed in case of error + + + + + + +BZ2_bzCompress + + +int BZ2_bzCompress ( bz_stream *strm, int action ); + + +Provides more input and/or output buffer space for the +library. The caller maintains input and output buffers, and +calls BZ2_bzCompress to transfer +data between them. + +Before each call to +BZ2_bzCompress, +next_in should point at the data +to be compressed, and avail_in +should indicate how many bytes the library may read. +BZ2_bzCompress updates +next_in, +avail_in and +total_in to reflect the number +of bytes it has read. + +Similarly, next_out should +point to a buffer in which the compressed data is to be placed, +with avail_out indicating how +much output space is available. +BZ2_bzCompress updates +next_out, +avail_out and +total_out to reflect the number +of bytes output. + +You may provide and remove as little or as much data as you +like on each call of +BZ2_bzCompress. In the limit, +it is acceptable to supply and remove data one byte at a time, +although this would be terribly inefficient. You should always +ensure that at least one byte of output space is available at +each call. + +A second purpose of +BZ2_bzCompress is to request a +change of mode of the compressed stream. + +Conceptually, a compressed stream can be in one of four +states: IDLE, RUNNING, FLUSHING and FINISHING. Before +initialisation +(BZ2_bzCompressInit) and after +termination (BZ2_bzCompressEnd), +a stream is regarded as IDLE. + +Upon initialisation +(BZ2_bzCompressInit), the stream +is placed in the RUNNING state. Subsequent calls to +BZ2_bzCompress should pass +BZ_RUN as the requested action; +other actions are illegal and will result in +BZ_SEQUENCE_ERROR. + +At some point, the calling program will have provided all +the input data it wants to. It will then want to finish up -- in +effect, asking the library to process any data it might have +buffered internally. In this state, +BZ2_bzCompress will no longer +attempt to read data from +next_in, but it will want to +write data to next_out. Because +the output buffer supplied by the user can be arbitrarily small, +the finishing-up operation cannot necessarily be done with a +single call of +BZ2_bzCompress. + +Instead, the calling program passes +BZ_FINISH as an action to +BZ2_bzCompress. This changes +the stream's state to FINISHING. Any remaining input (ie, +next_in[0 .. avail_in-1]) is +compressed and transferred to the output buffer. To do this, +BZ2_bzCompress must be called +repeatedly until all the output has been consumed. At that +point, BZ2_bzCompress returns +BZ_STREAM_END, and the stream's +state is set back to IDLE. +BZ2_bzCompressEnd should then be +called. + +Just to make sure the calling program does not cheat, the +library makes a note of avail_in +at the time of the first call to +BZ2_bzCompress which has +BZ_FINISH as an action (ie, at +the time the program has announced its intention to not supply +any more input). By comparing this value with that of +avail_in over subsequent calls +to BZ2_bzCompress, the library +can detect any attempts to slip in more data to compress. Any +calls for which this is detected will return +BZ_SEQUENCE_ERROR. This +indicates a programming mistake which should be corrected. + +Instead of asking to finish, the calling program may ask +BZ2_bzCompress to take all the +remaining input, compress it and terminate the current +(Burrows-Wheeler) compression block. This could be useful for +error control purposes. The mechanism is analogous to that for +finishing: call BZ2_bzCompress +with an action of BZ_FLUSH, +remove output data, and persist with the +BZ_FLUSH action until the value +BZ_RUN is returned. As with +finishing, BZ2_bzCompress +detects any attempt to provide more input data once the flush has +begun. + +Once the flush is complete, the stream returns to the +normal RUNNING state. + +This all sounds pretty complex, but isn't really. Here's a +table which shows which actions are allowable in each state, what +action will be taken, what the next state is, and what the +non-error return values are. Note that you can't explicitly ask +what state the stream is in, but nor do you need to -- it can be +inferred from the values returned by +BZ2_bzCompress. + + +IDLE/any + Illegal. IDLE state only exists after BZ2_bzCompressEnd or + before BZ2_bzCompressInit. + Return value = BZ_SEQUENCE_ERROR + +RUNNING/BZ_RUN + Compress from next_in to next_out as much as possible. + Next state = RUNNING + Return value = BZ_RUN_OK + +RUNNING/BZ_FLUSH + Remember current value of next_in. Compress from next_in + to next_out as much as possible, but do not accept any more input. + Next state = FLUSHING + Return value = BZ_FLUSH_OK + +RUNNING/BZ_FINISH + Remember current value of next_in. Compress from next_in + to next_out as much as possible, but do not accept any more input. + Next state = FINISHING + Return value = BZ_FINISH_OK + +FLUSHING/BZ_FLUSH + Compress from next_in to next_out as much as possible, + but do not accept any more input. + If all the existing input has been used up and all compressed + output has been removed + Next state = RUNNING; Return value = BZ_RUN_OK + else + Next state = FLUSHING; Return value = BZ_FLUSH_OK + +FLUSHING/other + Illegal. + Return value = BZ_SEQUENCE_ERROR + +FINISHING/BZ_FINISH + Compress from next_in to next_out as much as possible, + but to not accept any more input. + If all the existing input has been used up and all compressed + output has been removed + Next state = IDLE; Return value = BZ_STREAM_END + else + Next state = FINISHING; Return value = BZ_FINISH_OK + +FINISHING/other + Illegal. + Return value = BZ_SEQUENCE_ERROR + + + +That still looks complicated? Well, fair enough. The +usual sequence of calls for compressing a load of data is: + + + + Get started with + BZ2_bzCompressInit. + + Shovel data in and shlurp out its compressed form + using zero or more calls of + BZ2_bzCompress with action = + BZ_RUN. + + Finish up. Repeatedly call + BZ2_bzCompress with action = + BZ_FINISH, copying out the + compressed output, until + BZ_STREAM_END is + returned. Close up and go home. Call + BZ2_bzCompressEnd. + + + +If the data you want to compress fits into your input +buffer all at once, you can skip the calls of +BZ2_bzCompress ( ..., BZ_RUN ) +and just do the BZ2_bzCompress ( ..., BZ_FINISH +) calls. + +All required memory is allocated by +BZ2_bzCompressInit. The +compression library can accept any data at all (obviously). So +you shouldn't get any error return values from the +BZ2_bzCompress calls. If you +do, they will be +BZ_SEQUENCE_ERROR, and indicate +a bug in your programming. + +Trivial other possible return values: + + +BZ_PARAM_ERROR + if strm is NULL, or strm->s is NULL + + + + + + +BZ2_bzCompressEnd + + +int BZ2_bzCompressEnd ( bz_stream *strm ); + + +Releases all memory associated with a compression +stream. + +Possible return values: + + +BZ_PARAM_ERROR if strm is NULL or strm->s is NULL +BZ_OK otherwise + + + + + + +BZ2_bzDecompressInit + + +int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small ); + + +Prepares for decompression. As with +BZ2_bzCompressInit, a +bz_stream record should be +allocated and initialised before the call. Fields +bzalloc, +bzfree and +opaque should be set if a custom +memory allocator is required, or made +NULL for the normal +malloc / +free routines. Upon return, the +internal state will have been initialised, and +total_in and +total_out will be zero. + +For the meaning of parameter +verbosity, see +BZ2_bzCompressInit. + +If small is nonzero, the +library will use an alternative decompression algorithm which +uses less memory but at the cost of decompressing more slowly +(roughly speaking, half the speed, but the maximum memory +requirement drops to around 2300k). See +for more information on memory management. + +Note that the amount of memory needed to decompress a +stream cannot be determined until the stream's header has been +read, so even if +BZ2_bzDecompressInit succeeds, a +subsequent BZ2_bzDecompress +could fail with +BZ_MEM_ERROR. + +Possible return values: + + +BZ_CONFIG_ERROR + if the library has been mis-compiled +BZ_PARAM_ERROR + if ( small != 0 && small != 1 ) + or (verbosity <; 0 || verbosity > 4) +BZ_MEM_ERROR + if insufficient memory is available + + +Allowable next actions: + + +BZ2_bzDecompress + if BZ_OK was returned + no specific action required in case of error + + + + + + +BZ2_bzDecompress + + +int BZ2_bzDecompress ( bz_stream *strm ); + + +Provides more input and/out output buffer space for the +library. The caller maintains input and output buffers, and uses +BZ2_bzDecompress to transfer +data between them. + +Before each call to +BZ2_bzDecompress, +next_in should point at the +compressed data, and avail_in +should indicate how many bytes the library may read. +BZ2_bzDecompress updates +next_in, +avail_in and +total_in to reflect the number +of bytes it has read. + +Similarly, next_out should +point to a buffer in which the uncompressed output is to be +placed, with avail_out +indicating how much output space is available. +BZ2_bzCompress updates +next_out, +avail_out and +total_out to reflect the number +of bytes output. + +You may provide and remove as little or as much data as you +like on each call of +BZ2_bzDecompress. In the limit, +it is acceptable to supply and remove data one byte at a time, +although this would be terribly inefficient. You should always +ensure that at least one byte of output space is available at +each call. + +Use of BZ2_bzDecompress is +simpler than +BZ2_bzCompress. + +You should provide input and remove output as described +above, and repeatedly call +BZ2_bzDecompress until +BZ_STREAM_END is returned. +Appearance of BZ_STREAM_END +denotes that BZ2_bzDecompress +has detected the logical end of the compressed stream. +BZ2_bzDecompress will not +produce BZ_STREAM_END until all +output data has been placed into the output buffer, so once +BZ_STREAM_END appears, you are +guaranteed to have available all the decompressed output, and +BZ2_bzDecompressEnd can safely +be called. + +If case of an error return value, you should call +BZ2_bzDecompressEnd to clean up +and release memory. + +Possible return values: + + +BZ_PARAM_ERROR + if strm is NULL or strm->s is NULL + or strm->avail_out < 1 +BZ_DATA_ERROR + if a data integrity error is detected in the compressed stream +BZ_DATA_ERROR_MAGIC + if the compressed stream doesn't begin with the right magic bytes +BZ_MEM_ERROR + if there wasn't enough memory available +BZ_STREAM_END + if the logical end of the data stream was detected and all + output in has been consumed, eg s-->avail_out > 0 +BZ_OK + otherwise + + +Allowable next actions: + + +BZ2_bzDecompress + if BZ_OK was returned +BZ2_bzDecompressEnd + otherwise + + + + + + +BZ2_bzDecompressEnd + + +int BZ2_bzDecompressEnd ( bz_stream *strm ); + + +Releases all memory associated with a decompression +stream. + +Possible return values: + + +BZ_PARAM_ERROR + if strm is NULL or strm->s is NULL +BZ_OK + otherwise + + +Allowable next actions: + + + None. + + + + + + + + +High-level interface + +This interface provides functions for reading and writing +bzip2 format files. First, some +general points. + + + + All of the functions take an + int* first argument, + bzerror. After each call, + bzerror should be consulted + first to determine the outcome of the call. If + bzerror is + BZ_OK, the call completed + successfully, and only then should the return value of the + function (if any) be consulted. If + bzerror is + BZ_IO_ERROR, there was an + error reading/writing the underlying compressed file, and you + should then consult errno / + perror to determine the cause + of the difficulty. bzerror + may also be set to various other values; precise details are + given on a per-function basis below. + + If bzerror indicates + an error (ie, anything except + BZ_OK and + BZ_STREAM_END), you should + immediately call + BZ2_bzReadClose (or + BZ2_bzWriteClose, depending on + whether you are attempting to read or to write) to free up all + resources associated with the stream. Once an error has been + indicated, behaviour of all calls except + BZ2_bzReadClose + (BZ2_bzWriteClose) is + undefined. The implication is that (1) + bzerror should be checked + after each call, and (2) if + bzerror indicates an error, + BZ2_bzReadClose + (BZ2_bzWriteClose) should then + be called to clean up. + + The FILE* arguments + passed to BZ2_bzReadOpen / + BZ2_bzWriteOpen should be set + to binary mode. Most Unix systems will do this by default, but + other platforms, including Windows and Mac, will not. If you + omit this, you may encounter problems when moving code to new + platforms. + + Memory allocation requests are handled by + malloc / + free. At present there is no + facility for user-defined memory allocators in the file I/O + functions (could easily be added, though). + + + + + + +BZ2_bzReadOpen + + +typedef void BZFILE; + +BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f, + int verbosity, int small, + void *unused, int nUnused ); + + +Prepare to read compressed data from file handle +f. +f should refer to a file which +has been opened for reading, and for which the error indicator +(ferror(f))is not set. If +small is 1, the library will try +to decompress using less memory, at the expense of speed. + +For reasons explained below, +BZ2_bzRead will decompress the +nUnused bytes starting at +unused, before starting to read +from the file f. At most +BZ_MAX_UNUSED bytes may be +supplied like this. If this facility is not required, you should +pass NULL and +0 for +unused and +nUnused respectively. + +For the meaning of parameters +small and +verbosity, see +BZ2_bzDecompressInit. + +The amount of memory needed to decompress a file cannot be +determined until the file's header has been read. So it is +possible that BZ2_bzReadOpen +returns BZ_OK but a subsequent +call of BZ2_bzRead will return +BZ_MEM_ERROR. + +Possible assignments to +bzerror: + + +BZ_CONFIG_ERROR + if the library has been mis-compiled +BZ_PARAM_ERROR + if f is NULL + or small is neither 0 nor 1 + or ( unused == NULL && nUnused != 0 ) + or ( unused != NULL && !(0 <= nUnused <= BZ_MAX_UNUSED) ) +BZ_IO_ERROR + if ferror(f) is nonzero +BZ_MEM_ERROR + if insufficient memory is available +BZ_OK + otherwise. + + +Possible return values: + + +Pointer to an abstract BZFILE + if bzerror is BZ_OK +NULL + otherwise + + +Allowable next actions: + + +BZ2_bzRead + if bzerror is BZ_OK +BZ2_bzClose + otherwise + + + + + + +BZ2_bzRead + + +int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len ); + + +Reads up to len +(uncompressed) bytes from the compressed file +b into the buffer +buf. If the read was +successful, bzerror is set to +BZ_OK and the number of bytes +read is returned. If the logical end-of-stream was detected, +bzerror will be set to +BZ_STREAM_END, and the number of +bytes read is returned. All other +bzerror values denote an +error. + +BZ2_bzRead will supply +len bytes, unless the logical +stream end is detected or an error occurs. Because of this, it +is possible to detect the stream end by observing when the number +of bytes returned is less than the number requested. +Nevertheless, this is regarded as inadvisable; you should instead +check bzerror after every call +and watch out for +BZ_STREAM_END. + +Internally, BZ2_bzRead +copies data from the compressed file in chunks of size +BZ_MAX_UNUSED bytes before +decompressing it. If the file contains more bytes than strictly +needed to reach the logical end-of-stream, +BZ2_bzRead will almost certainly +read some of the trailing data before signalling +BZ_SEQUENCE_END. To collect the +read but unused data once +BZ_SEQUENCE_END has appeared, +call BZ2_bzReadGetUnused +immediately before +BZ2_bzReadClose. + +Possible assignments to +bzerror: + + +BZ_PARAM_ERROR + if b is NULL or buf is NULL or len < 0 +BZ_SEQUENCE_ERROR + if b was opened with BZ2_bzWriteOpen +BZ_IO_ERROR + if there is an error reading from the compressed file +BZ_UNEXPECTED_EOF + if the compressed file ended before + the logical end-of-stream was detected +BZ_DATA_ERROR + if a data integrity error was detected in the compressed stream +BZ_DATA_ERROR_MAGIC + if the stream does not begin with the requisite header bytes + (ie, is not a bzip2 data file). This is really + a special case of BZ_DATA_ERROR. +BZ_MEM_ERROR + if insufficient memory was available +BZ_STREAM_END + if the logical end of stream was detected. +BZ_OK + otherwise. + + +Possible return values: + + +number of bytes read + if bzerror is BZ_OK or BZ_STREAM_END +undefined + otherwise + + +Allowable next actions: + + +collect data from buf, then BZ2_bzRead or BZ2_bzReadClose + if bzerror is BZ_OK +collect data from buf, then BZ2_bzReadClose or BZ2_bzReadGetUnused + if bzerror is BZ_SEQUENCE_END +BZ2_bzReadClose + otherwise + + + + + + +BZ2_bzReadGetUnused + + +void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b, + void** unused, int* nUnused ); + + +Returns data which was read from the compressed file but +was not needed to get to the logical end-of-stream. +*unused is set to the address of +the data, and *nUnused to the +number of bytes. *nUnused will +be set to a value between 0 and +BZ_MAX_UNUSED inclusive. + +This function may only be called once +BZ2_bzRead has signalled +BZ_STREAM_END but before +BZ2_bzReadClose. + +Possible assignments to +bzerror: + + +BZ_PARAM_ERROR + if b is NULL + or unused is NULL or nUnused is NULL +BZ_SEQUENCE_ERROR + if BZ_STREAM_END has not been signalled + or if b was opened with BZ2_bzWriteOpen +BZ_OK + otherwise + + +Allowable next actions: + + +BZ2_bzReadClose + + + + + + +BZ2_bzReadClose + + +void BZ2_bzReadClose ( int *bzerror, BZFILE *b ); + + +Releases all memory pertaining to the compressed file +b. +BZ2_bzReadClose does not call +fclose on the underlying file +handle, so you should do that yourself if appropriate. +BZ2_bzReadClose should be called +to clean up after all error situations. + +Possible assignments to +bzerror: + + +BZ_SEQUENCE_ERROR + if b was opened with BZ2_bzOpenWrite +BZ_OK + otherwise + + +Allowable next actions: + + +none + + + + + + +BZ2_bzWriteOpen + + +BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f, + int blockSize100k, int verbosity, + int workFactor ); + + +Prepare to write compressed data to file handle +f. +f should refer to a file which +has been opened for writing, and for which the error indicator +(ferror(f))is not set. + +For the meaning of parameters +blockSize100k, +verbosity and +workFactor, see +BZ2_bzCompressInit. + +All required memory is allocated at this stage, so if the +call completes successfully, +BZ_MEM_ERROR cannot be signalled +by a subsequent call to +BZ2_bzWrite. + +Possible assignments to +bzerror: + + +BZ_CONFIG_ERROR + if the library has been mis-compiled +BZ_PARAM_ERROR + if f is NULL + or blockSize100k < 1 or blockSize100k > 9 +BZ_IO_ERROR + if ferror(f) is nonzero +BZ_MEM_ERROR + if insufficient memory is available +BZ_OK + otherwise + + +Possible return values: + + +Pointer to an abstract BZFILE + if bzerror is BZ_OK +NULL + otherwise + + +Allowable next actions: + + +BZ2_bzWrite + if bzerror is BZ_OK + (you could go directly to BZ2_bzWriteClose, but this would be pretty pointless) +BZ2_bzWriteClose + otherwise + + + + + + +BZ2_bzWrite + + +void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len ); + + +Absorbs len bytes from the +buffer buf, eventually to be +compressed and written to the file. + +Possible assignments to +bzerror: + + +BZ_PARAM_ERROR + if b is NULL or buf is NULL or len < 0 +BZ_SEQUENCE_ERROR + if b was opened with BZ2_bzReadOpen +BZ_IO_ERROR + if there is an error writing the compressed file. +BZ_OK + otherwise + + + + + + +BZ2_bzWriteClose + + +void BZ2_bzWriteClose( int *bzerror, BZFILE* f, + int abandon, + unsigned int* nbytes_in, + unsigned int* nbytes_out ); + +void BZ2_bzWriteClose64( int *bzerror, BZFILE* f, + int abandon, + unsigned int* nbytes_in_lo32, + unsigned int* nbytes_in_hi32, + unsigned int* nbytes_out_lo32, + unsigned int* nbytes_out_hi32 ); + + +Compresses and flushes to the compressed file all data so +far supplied by BZ2_bzWrite. +The logical end-of-stream markers are also written, so subsequent +calls to BZ2_bzWrite are +illegal. All memory associated with the compressed file +b is released. +fflush is called on the +compressed file, but it is not +fclose'd. + +If BZ2_bzWriteClose is +called to clean up after an error, the only action is to release +the memory. The library records the error codes issued by +previous calls, so this situation will be detected automatically. +There is no attempt to complete the compression operation, nor to +fflush the compressed file. You +can force this behaviour to happen even in the case of no error, +by passing a nonzero value to +abandon. + +If nbytes_in is non-null, +*nbytes_in will be set to be the +total volume of uncompressed data handled. Similarly, +nbytes_out will be set to the +total volume of compressed data written. For compatibility with +older versions of the library, +BZ2_bzWriteClose only yields the +lower 32 bits of these counts. Use +BZ2_bzWriteClose64 if you want +the full 64 bit counts. These two functions are otherwise +absolutely identical. + +Possible assignments to +bzerror: + + +BZ_SEQUENCE_ERROR + if b was opened with BZ2_bzReadOpen +BZ_IO_ERROR + if there is an error writing the compressed file +BZ_OK + otherwise + + + + + + +Handling embedded compressed data streams + +The high-level library facilitates use of +bzip2 data streams which form +some part of a surrounding, larger data stream. + + + + For writing, the library takes an open file handle, + writes compressed data to it, + fflushes it but does not + fclose it. The calling + application can write its own data before and after the + compressed data stream, using that same file handle. + + Reading is more complex, and the facilities are not as + general as they could be since generality is hard to reconcile + with efficiency. BZ2_bzRead + reads from the compressed file in blocks of size + BZ_MAX_UNUSED bytes, and in + doing so probably will overshoot the logical end of compressed + stream. To recover this data once decompression has ended, + call BZ2_bzReadGetUnused after + the last call of BZ2_bzRead + (the one returning + BZ_STREAM_END) but before + calling + BZ2_bzReadClose. + + + +This mechanism makes it easy to decompress multiple +bzip2 streams placed end-to-end. +As the end of one stream, when +BZ2_bzRead returns +BZ_STREAM_END, call +BZ2_bzReadGetUnused to collect +the unused data (copy it into your own buffer somewhere). That +data forms the start of the next compressed stream. To start +uncompressing that next stream, call +BZ2_bzReadOpen again, feeding in +the unused data via the unused / +nUnused parameters. Keep doing +this until BZ_STREAM_END return +coincides with the physical end of file +(feof(f)). In this situation +BZ2_bzReadGetUnused will of +course return no data. + +This should give some feel for how the high-level interface +can be used. If you require extra flexibility, you'll have to +bite the bullet and get to grips with the low-level +interface. + + + + + +Standard file-reading/writing code + +Here's how you'd write data to a compressed file: + + +FILE* f; +BZFILE* b; +int nBuf; +char buf[ /* whatever size you like */ ]; +int bzerror; +int nWritten; + +f = fopen ( "myfile.bz2", "w" ); +if ( !f ) { + /* handle error */ +} +b = BZ2_bzWriteOpen( &bzerror, f, 9 ); +if (bzerror != BZ_OK) { + BZ2_bzWriteClose ( b ); + /* handle error */ +} + +while ( /* condition */ ) { + /* get data to write into buf, and set nBuf appropriately */ + nWritten = BZ2_bzWrite ( &bzerror, b, buf, nBuf ); + if (bzerror == BZ_IO_ERROR) { + BZ2_bzWriteClose ( &bzerror, b ); + /* handle error */ + } +} + +BZ2_bzWriteClose( &bzerror, b ); +if (bzerror == BZ_IO_ERROR) { + /* handle error */ +} + + +And to read from a compressed file: + + +FILE* f; +BZFILE* b; +int nBuf; +char buf[ /* whatever size you like */ ]; +int bzerror; +int nWritten; + +f = fopen ( "myfile.bz2", "r" ); +if ( !f ) { + /* handle error */ +} +b = BZ2_bzReadOpen ( &bzerror, f, 0, NULL, 0 ); +if ( bzerror != BZ_OK ) { + BZ2_bzReadClose ( &bzerror, b ); + /* handle error */ +} + +bzerror = BZ_OK; +while ( bzerror == BZ_OK && /* arbitrary other conditions */) { + nBuf = BZ2_bzRead ( &bzerror, b, buf, /* size of buf */ ); + if ( bzerror == BZ_OK ) { + /* do something with buf[0 .. nBuf-1] */ + } +} +if ( bzerror != BZ_STREAM_END ) { + BZ2_bzReadClose ( &bzerror, b ); + /* handle error */ +} else { + BZ2_bzReadClose ( &bzerror, b ); +} + + + + + + + + +Utility functions + + + +BZ2_bzBuffToBuffCompress + + +int BZ2_bzBuffToBuffCompress( char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int blockSize100k, + int verbosity, + int workFactor ); + + +Attempts to compress the data in source[0 +.. sourceLen-1] into the destination buffer, +dest[0 .. *destLen-1]. If the +destination buffer is big enough, +*destLen is set to the size of +the compressed data, and BZ_OK +is returned. If the compressed data won't fit, +*destLen is unchanged, and +BZ_OUTBUFF_FULL is +returned. + +Compression in this manner is a one-shot event, done with a +single call to this function. The resulting compressed data is a +complete bzip2 format data +stream. There is no mechanism for making additional calls to +provide extra input data. If you want that kind of mechanism, +use the low-level interface. + +For the meaning of parameters +blockSize100k, +verbosity and +workFactor, see +BZ2_bzCompressInit. + +To guarantee that the compressed data will fit in its +buffer, allocate an output buffer of size 1% larger than the +uncompressed data, plus six hundred extra bytes. + +BZ2_bzBuffToBuffDecompress +will not write data at or beyond +dest[*destLen], even in case of +buffer overflow. + +Possible return values: + + +BZ_CONFIG_ERROR + if the library has been mis-compiled +BZ_PARAM_ERROR + if dest is NULL or destLen is NULL + or blockSize100k < 1 or blockSize100k > 9 + or verbosity < 0 or verbosity > 4 + or workFactor < 0 or workFactor > 250 +BZ_MEM_ERROR + if insufficient memory is available +BZ_OUTBUFF_FULL + if the size of the compressed data exceeds *destLen +BZ_OK + otherwise + + + + + + +BZ2_bzBuffToBuffDecompress + + +int BZ2_bzBuffToBuffDecompress( char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int small, + int verbosity ); + + +Attempts to decompress the data in source[0 +.. sourceLen-1] into the destination buffer, +dest[0 .. *destLen-1]. If the +destination buffer is big enough, +*destLen is set to the size of +the uncompressed data, and BZ_OK +is returned. If the compressed data won't fit, +*destLen is unchanged, and +BZ_OUTBUFF_FULL is +returned. + +source is assumed to hold +a complete bzip2 format data +stream. +BZ2_bzBuffToBuffDecompress tries +to decompress the entirety of the stream into the output +buffer. + +For the meaning of parameters +small and +verbosity, see +BZ2_bzDecompressInit. + +Because the compression ratio of the compressed data cannot +be known in advance, there is no easy way to guarantee that the +output buffer will be big enough. You may of course make +arrangements in your code to record the size of the uncompressed +data, but such a mechanism is beyond the scope of this +library. + +BZ2_bzBuffToBuffDecompress +will not write data at or beyond +dest[*destLen], even in case of +buffer overflow. + +Possible return values: + + +BZ_CONFIG_ERROR + if the library has been mis-compiled +BZ_PARAM_ERROR + if dest is NULL or destLen is NULL + or small != 0 && small != 1 + or verbosity < 0 or verbosity > 4 +BZ_MEM_ERROR + if insufficient memory is available +BZ_OUTBUFF_FULL + if the size of the compressed data exceeds *destLen +BZ_DATA_ERROR + if a data integrity error was detected in the compressed data +BZ_DATA_ERROR_MAGIC + if the compressed data doesn't begin with the right magic bytes +BZ_UNEXPECTED_EOF + if the compressed data ends unexpectedly +BZ_OK + otherwise + + + + + + + + +zlib compatibility functions + +Yoshioka Tsuneo has contributed some functions to give +better zlib compatibility. +These functions are BZ2_bzopen, +BZ2_bzread, +BZ2_bzwrite, +BZ2_bzflush, +BZ2_bzclose, +BZ2_bzerror and +BZ2_bzlibVersion. These +functions are not (yet) officially part of the library. If they +break, you get to keep all the pieces. Nevertheless, I think +they work ok. + + +typedef void BZFILE; + +const char * BZ2_bzlibVersion ( void ); + + +Returns a string indicating the library version. + + +BZFILE * BZ2_bzopen ( const char *path, const char *mode ); +BZFILE * BZ2_bzdopen ( int fd, const char *mode ); + + +Opens a .bz2 file for +reading or writing, using either its name or a pre-existing file +descriptor. Analogous to fopen +and fdopen. + + +int BZ2_bzread ( BZFILE* b, void* buf, int len ); +int BZ2_bzwrite ( BZFILE* b, void* buf, int len ); + + +Reads/writes data from/to a previously opened +BZFILE. Analogous to +fread and +fwrite. + + +int BZ2_bzflush ( BZFILE* b ); +void BZ2_bzclose ( BZFILE* b ); + + +Flushes/closes a BZFILE. +BZ2_bzflush doesn't actually do +anything. Analogous to fflush +and fclose. + + +const char * BZ2_bzerror ( BZFILE *b, int *errnum ) + + +Returns a string describing the more recent error status of +b, and also sets +*errnum to its numerical +value. + + + + + +Using the library in a stdio-free environment + + + +Getting rid of stdio + +In a deeply embedded application, you might want to use +just the memory-to-memory functions. You can do this +conveniently by compiling the library with preprocessor symbol +BZ_NO_STDIO defined. Doing this +gives you a library containing only the following eight +functions: + +BZ2_bzCompressInit, +BZ2_bzCompress, +BZ2_bzCompressEnd +BZ2_bzDecompressInit, +BZ2_bzDecompress, +BZ2_bzDecompressEnd +BZ2_bzBuffToBuffCompress, +BZ2_bzBuffToBuffDecompress + +When compiled like this, all functions will ignore +verbosity settings. + + + + + +Critical error handling + +libbzip2 contains a number +of internal assertion checks which should, needless to say, never +be activated. Nevertheless, if an assertion should fail, +behaviour depends on whether or not the library was compiled with +BZ_NO_STDIO set. + +For a normal compile, an assertion failure yields the +message: + +
+bzip2/libbzip2: internal error number N. +This is a bug in bzip2/libbzip2, &bz-version; of &bz-date;. +Please report it to: &bz-email;. If this happened +when you were using some program which uses libbzip2 as a +component, you should also report this bug to the author(s) +of that program. Please make an effort to report this bug; +timely and accurate bug reports eventually lead to higher +quality software. Thanks. +
+ +where N is some error code +number. If N == 1007, it also +prints some extra text advising the reader that unreliable memory +is often associated with internal error 1007. (This is a +frequently-observed-phenomenon with versions 1.0.0/1.0.1). + +exit(3) is then +called. + +For a stdio-free library, +assertion failures result in a call to a function declared +as: + + +extern void bz_internal_error ( int errcode ); + + +The relevant code is passed as a parameter. You should +supply such a function. + +In either case, once an assertion failure has occurred, any +bz_stream records involved can +be regarded as invalid. You should not attempt to resume normal +operation with them. + +You may, of course, change critical error handling to suit +your needs. As I said above, critical errors indicate bugs in +the library and should not occur. All "normal" error situations +are indicated via error return codes from functions, and can be +recovered from. + +
+ +
+ + + +Making a Windows DLL + +Everything related to Windows has been contributed by +Yoshioka Tsuneo +(tsuneo@rr.iij4u.or.jp), so +you should send your queries to him (but please Cc: +&bz-email;). + +My vague understanding of what to do is: using Visual C++ +5.0, open the project file +libbz2.dsp, and build. That's +all. + +If you can't open the project file for some reason, make a +new one, naming these files: +blocksort.c, +bzlib.c, +compress.c, +crctable.c, +decompress.c, +huffman.c, +randtable.c and +libbz2.def. You will also need +to name the header files bzlib.h +and bzlib_private.h. + +If you don't use VC++, you may need to define the +proprocessor symbol +_WIN32. + +Finally, dlltest.c is a +sample program using the DLL. It has a project file, +dlltest.dsp. + +If you just want a makefile for Visual C, have a look at +makefile.msc. + +Be aware that if you compile +bzip2 itself on Win32, you must +set BZ_UNIX to 0 and +BZ_LCCWIN32 to 1, in the file +bzip2.c, before compiling. +Otherwise the resulting binary won't work correctly. + +I haven't tried any of this stuff myself, but it all looks +plausible. + + + +
+ + + + +Miscellanea + +These are just some random thoughts of mine. Your mileage +may vary. + + + +Limitations of the compressed file format + +bzip2-1.0.X, +0.9.5 and +0.9.0 use exactly the same file +format as the original version, +bzip2-0.1. This decision was +made in the interests of stability. Creating yet another +incompatible compressed file format would create further +confusion and disruption for users. + +Nevertheless, this is not a painless decision. Development +work since the release of +bzip2-0.1 in August 1997 has +shown complexities in the file format which slow down +decompression and, in retrospect, are unnecessary. These +are: + + + + The run-length encoder, which is the first of the + compression transformations, is entirely irrelevant. The + original purpose was to protect the sorting algorithm from the + very worst case input: a string of repeated symbols. But + algorithm steps Q6a and Q6b in the original Burrows-Wheeler + technical report (SRC-124) show how repeats can be handled + without difficulty in block sorting. + + The randomisation mechanism doesn't really need to be + there. Udi Manber and Gene Myers published a suffix array + construction algorithm a few years back, which can be employed + to sort any block, no matter how repetitive, in O(N log N) + time. Subsequent work by Kunihiko Sadakane has produced a + derivative O(N (log N)^2) algorithm which usually outperforms + the Manber-Myers algorithm. + + I could have changed to Sadakane's algorithm, but I find + it to be slower than bzip2's + existing algorithm for most inputs, and the randomisation + mechanism protects adequately against bad cases. I didn't + think it was a good tradeoff to make. Partly this is due to + the fact that I was not flooded with email complaints about + bzip2-0.1's performance on + repetitive data, so perhaps it isn't a problem for real + inputs. + + Probably the best long-term solution, and the one I have + incorporated into 0.9.5 and above, is to use the existing + sorting algorithm initially, and fall back to a O(N (log N)^2) + algorithm if the standard algorithm gets into + difficulties. + + The compressed file format was never designed to be + handled by a library, and I have had to jump though some hoops + to produce an efficient implementation of decompression. It's + a bit hairy. Try passing + decompress.c through the C + preprocessor and you'll see what I mean. Much of this + complexity could have been avoided if the compressed size of + each block of data was recorded in the data stream. + + An Adler-32 checksum, rather than a CRC32 checksum, + would be faster to compute. + + + +It would be fair to say that the +bzip2 format was frozen before I +properly and fully understood the performance consequences of +doing so. + +Improvements which I was able to incorporate into 0.9.0, +despite using the same file format, are: + + + + Single array implementation of the inverse BWT. This + significantly speeds up decompression, presumably because it + reduces the number of cache misses. + + Faster inverse MTF transform for large MTF values. + The new implementation is based on the notion of sliding blocks + of values. + + bzip2-0.9.0 now reads + and writes files with fread + and fwrite; version 0.1 used + putc and + getc. Duh! Well, you live + and learn. + + + +Further ahead, it would be nice to be able to do random +access into files. This will require some careful design of +compressed file formats. + + + + + +Portability issues + +After some consideration, I have decided not to use GNU +autoconf to configure 0.9.5 or +1.0. + +autoconf, admirable and +wonderful though it is, mainly assists with portability problems +between Unix-like platforms. But +bzip2 doesn't have much in the +way of portability problems on Unix; most of the difficulties +appear when porting to the Mac, or to Microsoft's operating +systems. autoconf doesn't help +in those cases, and brings in a whole load of new +complexity. + +Most people should be able to compile the library and +program under Unix straight out-of-the-box, so to speak, +especially if you have a version of GNU C available. + +There are a couple of +__inline__ directives in the +code. GNU C (gcc) should be +able to handle them. If you're not using GNU C, your C compiler +shouldn't see them at all. If your compiler does, for some +reason, see them and doesn't like them, just +#define +__inline__ to be +/* */. One easy way to do this +is to compile with the flag +-D__inline__=, which should be +understood by most Unix compilers. + +If you still have difficulties, try compiling with the +macro BZ_STRICT_ANSI defined. +This should enable you to build the library in a strictly ANSI +compliant environment. Building the program itself like this is +dangerous and not supported, since you remove +bzip2's checks against +compressing directories, symbolic links, devices, and other +not-really-a-file entities. This could cause filesystem +corruption! + +One other thing: if you create a +bzip2 binary for public distribution, +please consider linking it statically (gcc +-static). This avoids all sorts of library-version +issues that others may encounter later on. + +If you build bzip2 on +Win32, you must set BZ_UNIX to 0 +and BZ_LCCWIN32 to 1, in the +file bzip2.c, before compiling. +Otherwise the resulting binary won't work correctly. + + + + + +Reporting bugs + +I tried pretty hard to make sure +bzip2 is bug free, both by +design and by testing. Hopefully you'll never need to read this +section for real. + +Nevertheless, if bzip2 dies +with a segmentation fault, a bus error or an internal assertion +failure, it will ask you to email me a bug report. Experience from +years of feedback of bzip2 users indicates that almost all these +problems can be traced to either compiler bugs or hardware +problems. + + + + Recompile the program with no optimisation, and + see if it works. And/or try a different compiler. I heard all + sorts of stories about various flavours of GNU C (and other + compilers) generating bad code for + bzip2, and I've run across two + such examples myself. + + 2.7.X versions of GNU C are known to generate bad code + from time to time, at high optimisation levels. If you get + problems, try using the flags + -O2 + -fomit-frame-pointer + -fno-strength-reduce. You + should specifically not use + -funroll-loops. + + You may notice that the Makefile runs six tests as part + of the build process. If the program passes all of these, it's + a pretty good (but not 100%) indication that the compiler has + done its job correctly. + + If bzip2 + crashes randomly, and the crashes are not repeatable, you may + have a flaky memory subsystem. + bzip2 really hammers your + memory hierarchy, and if it's a bit marginal, you may get these + problems. Ditto if your disk or I/O subsystem is slowly + failing. Yup, this really does happen. + + Try using a different machine of the same type, and see + if you can repeat the problem. + + This isn't really a bug, but ... If + bzip2 tells you your file is + corrupted on decompression, and you obtained the file via FTP, + there is a possibility that you forgot to tell FTP to do a + binary mode transfer. That absolutely will cause the file to + be non-decompressible. You'll have to transfer it + again. + + + +If you've incorporated +libbzip2 into your own program +and are getting problems, please, please, please, check that the +parameters you are passing in calls to the library, are correct, +and in accordance with what the documentation says is allowable. +I have tried to make the library robust against such problems, +but I'm sure I haven't succeeded. + +Finally, if the above comments don't help, you'll have to +send me a bug report. Now, it's just amazing how many people +will send me a bug report saying something like: + + +bzip2 crashed with segmentation fault on my machine + + +and absolutely nothing else. Needless to say, a such a +report is totally, utterly, completely and +comprehensively 100% useless; a waste of your time, my time, and +net bandwidth. With no details at all, there's no way +I can possibly begin to figure out what the problem is. + +The rules of the game are: facts, facts, facts. Don't omit +them because "oh, they won't be relevant". At the bare +minimum: + + +Machine type. Operating system version. +Exact version of bzip2 (do bzip2 -V). +Exact version of the compiler used. +Flags passed to the compiler. + + +However, the most important single thing that will help me +is the file that you were trying to compress or decompress at the +time the problem happened. Without that, my ability to do +anything more than speculate about the cause, is limited. + + + + + +Did you get the right package? + +bzip2 is a resource hog. +It soaks up large amounts of CPU cycles and memory. Also, it +gives very large latencies. In the worst case, you can feed many +megabytes of uncompressed data into the library before getting +any compressed output, so this probably rules out applications +requiring interactive behaviour. + +These aren't faults of my implementation, I hope, but more +an intrinsic property of the Burrows-Wheeler transform +(unfortunately). Maybe this isn't what you want. + +If you want a compressor and/or library which is faster, +uses less memory but gets pretty good compression, and has +minimal latency, consider Jean-loup Gailly's and Mark Adler's +work, zlib-1.2.1 and +gzip-1.2.4. Look for them at +http://www.zlib.org and +http://www.gzip.org +respectively. + +For something faster and lighter still, you might try Markus F +X J Oberhumer's LZO real-time +compression/decompression library, at +http://www.oberhumer.com/opensource. + + + + + + +Further Reading + +bzip2 is not research +work, in the sense that it doesn't present any new ideas. +Rather, it's an engineering exercise based on existing +ideas. + +Four documents describe essentially all the ideas behind +bzip2: + +Michael Burrows and D. J. Wheeler: + "A block-sorting lossless data compression algorithm" + 10th May 1994. + Digital SRC Research Report 124. + ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz + If you have trouble finding it, try searching at the + New Zealand Digital Library, http://www.nzdl.org. + +Daniel S. Hirschberg and Debra A. LeLewer + "Efficient Decoding of Prefix Codes" + Communications of the ACM, April 1990, Vol 33, Number 4. + You might be able to get an electronic copy of this + from the ACM Digital Library. + +David J. Wheeler + Program bred3.c and accompanying document bred3.ps. + This contains the idea behind the multi-table Huffman coding scheme. + ftp://ftp.cl.cam.ac.uk/users/djw3/ + +Jon L. Bentley and Robert Sedgewick + "Fast Algorithms for Sorting and Searching Strings" + Available from Sedgewick's web page, + www.cs.princeton.edu/~rs + + +The following paper gives valuable additional insights into +the algorithm, but is not immediately the basis of any code used +in bzip2. + +Peter Fenwick: + Block Sorting Text Compression + Proceedings of the 19th Australasian Computer Science Conference, + Melbourne, Australia. Jan 31 - Feb 2, 1996. + ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps + +Kunihiko Sadakane's sorting algorithm, mentioned above, is +available from: + +http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz + + +The Manber-Myers suffix array construction algorithm is +described in a paper available from: + +http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps + + +Finally, the following papers document some +investigations I made into the performance of sorting +and decompression algorithms: + +Julian Seward + On the Performance of BWT Sorting Algorithms + Proceedings of the IEEE Data Compression Conference 2000 + Snowbird, Utah. 28-30 March 2000. + +Julian Seward + Space-time Tradeoffs in the Inverse B-W Transform + Proceedings of the IEEE Data Compression Conference 2001 + Snowbird, Utah. 27-29 March 2001. + + + + + + +
diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/mk251.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/mk251.c new file mode 100644 index 000000000..6c5bbf935 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/mk251.c @@ -0,0 +1,31 @@ + +/* Spew out a long sequence of the byte 251. When fed to bzip2 + versions 1.0.0 or 1.0.1, causes it to die with internal error + 1007 in blocksort.c. This assertion misses an extremely rare + case, which is fixed in this version (1.0.2) and above. +*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include + +int main () +{ + int i; + for (i = 0; i < 48500000 ; i++) + putchar(251); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/randtable.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/randtable.c new file mode 100644 index 000000000..bdc6d4a4c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/randtable.c @@ -0,0 +1,84 @@ + +/*-------------------------------------------------------------*/ +/*--- Table for randomising repetitive blocks ---*/ +/*--- randtable.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include "bzlib_private.h" + + +/*---------------------------------------------*/ +Int32 BZ2_rNums[512] = { + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, + 936, 638 +}; + + +/*-------------------------------------------------------------*/ +/*--- end randtable.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.bz2 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.bz2 new file mode 100644 index 000000000..18dea6004 Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.bz2 differ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.ref b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.ref new file mode 100644 index 000000000..a56e52b77 Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample1.ref differ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.bz2 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.bz2 new file mode 100644 index 000000000..d5a6160ba Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.bz2 differ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.ref b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.ref new file mode 100644 index 000000000..34af95839 Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample2.ref differ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.bz2 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.bz2 new file mode 100644 index 000000000..d90cff920 Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.bz2 differ diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.ref b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.ref new file mode 100644 index 000000000..775a2f68e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/sample3.ref @@ -0,0 +1,30007 @@ +This file is exceedingly boring. If you find yourself +reading it, please (1) take it from me that you can safely +guess what the rest of the file says, and (2) seek professional +help. + +ps. there are no further sarcastic remarks in this file. + +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh +ugh diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/spewG.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/spewG.c new file mode 100644 index 000000000..65d24c89c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/spewG.c @@ -0,0 +1,54 @@ + +/* spew out a thoroughly gigantic file designed so that bzip2 + can compress it reasonably rapidly. This is to help test + support for large files (> 2GB) in a reasonable amount of time. + I suggest you use the undocumented --exponential option to + bzip2 when compressing the resulting file; this saves a bit of + time. Note: *don't* bother with --exponential when compressing + Real Files; it'll just waste a lot of CPU time :-) + (but is otherwise harmless). +*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#define _FILE_OFFSET_BITS 64 + +#include +#include + +/* The number of megabytes of junk to spew out (roughly) */ +#define MEGABYTES 5000 + +#define N_BUF 1000000 +char buf[N_BUF]; + +int main ( int argc, char** argv ) +{ + int ii, kk, p; + srandom(1); + setbuffer ( stdout, buf, N_BUF ); + for (kk = 0; kk < MEGABYTES * 515; kk+=3) { + p = 25+random()%50; + for (ii = 0; ii < p; ii++) + printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ); + for (ii = 0; ii < p-1; ii++) + printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" ); + for (ii = 0; ii < p+1; ii++) + printf ( "ccccccccccccccccccccccccccccccccccccc" ); + } + fflush(stdout); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/unzcrash.c b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/unzcrash.c new file mode 100644 index 000000000..c68f93c56 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/unzcrash.c @@ -0,0 +1,141 @@ + +/* A test program written to test robustness to decompression of + corrupted data. Usage is + unzcrash filename + and the program will read the specified file, compress it (in memory), + and then repeatedly decompress it, each time with a different bit of + the compressed data inverted, so as to test all possible one-bit errors. + This should not cause any invalid memory accesses. If it does, + I want to know about it! + + PS. As you can see from the above description, the process is + incredibly slow. A file of size eg 5KB will cause it to run for + many hours. +*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include +#include +#include "bzlib.h" + +#define M_BLOCK 1000000 + +typedef unsigned char uchar; + +#define M_BLOCK_OUT (M_BLOCK + 1000000) +uchar inbuf[M_BLOCK]; +uchar outbuf[M_BLOCK_OUT]; +uchar zbuf[M_BLOCK + 600 + (M_BLOCK / 100)]; + +int nIn, nOut, nZ; + +static char *bzerrorstrings[] = { + "OK" + ,"SEQUENCE_ERROR" + ,"PARAM_ERROR" + ,"MEM_ERROR" + ,"DATA_ERROR" + ,"DATA_ERROR_MAGIC" + ,"IO_ERROR" + ,"UNEXPECTED_EOF" + ,"OUTBUFF_FULL" + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ +}; + +void flip_bit ( int bit ) +{ + int byteno = bit / 8; + int bitno = bit % 8; + uchar mask = 1 << bitno; + //fprintf ( stderr, "(byte %d bit %d mask %d)", + // byteno, bitno, (int)mask ); + zbuf[byteno] ^= mask; +} + +int main ( int argc, char** argv ) +{ + FILE* f; + int r; + int bit; + int i; + + if (argc != 2) { + fprintf ( stderr, "usage: unzcrash filename\n" ); + return 1; + } + + f = fopen ( argv[1], "r" ); + if (!f) { + fprintf ( stderr, "unzcrash: can't open %s\n", argv[1] ); + return 1; + } + + nIn = fread ( inbuf, 1, M_BLOCK, f ); + fprintf ( stderr, "%d bytes read\n", nIn ); + + nZ = M_BLOCK; + r = BZ2_bzBuffToBuffCompress ( + zbuf, &nZ, inbuf, nIn, 9, 0, 30 ); + + assert (r == BZ_OK); + fprintf ( stderr, "%d after compression\n", nZ ); + + for (bit = 0; bit < nZ*8; bit++) { + fprintf ( stderr, "bit %d ", bit ); + flip_bit ( bit ); + nOut = M_BLOCK_OUT; + r = BZ2_bzBuffToBuffDecompress ( + outbuf, &nOut, zbuf, nZ, 0, 0 ); + fprintf ( stderr, " %d %s ", r, bzerrorstrings[-r] ); + + if (r != BZ_OK) { + fprintf ( stderr, "\n" ); + } else { + if (nOut != nIn) { + fprintf(stderr, "nIn/nOut mismatch %d %d\n", nIn, nOut ); + return 1; + } else { + for (i = 0; i < nOut; i++) + if (inbuf[i] != outbuf[i]) { + fprintf(stderr, "mismatch at %d\n", i ); + return 1; + } + if (i == nOut) fprintf(stderr, "really ok!\n" ); + } + } + + flip_bit ( bit ); + } + +#if 0 + assert (nOut == nIn); + for (i = 0; i < nOut; i++) { + if (inbuf[i] != outbuf[i]) { + fprintf ( stderr, "difference at %d !\n", i ); + return 1; + } + } +#endif + + fprintf ( stderr, "all ok\n" ); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words0 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words0 new file mode 100644 index 000000000..fbf442ad6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words0 @@ -0,0 +1,9 @@ + +If compilation produces errors, or a large number of warnings, +please read README.COMPILATION.PROBLEMS -- you might be able to +adjust the flags in this Makefile to improve matters. + +Also in README.COMPILATION.PROBLEMS are some hints that may help +if your build produces an executable which is unable to correctly +handle so-called 'large files' -- files of size 2GB or more. + diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words1 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words1 new file mode 100644 index 000000000..2e83de9f0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words1 @@ -0,0 +1,4 @@ + +Doing 6 tests (3 compress, 3 uncompress) ... +If there's a problem, things might stop at this point. + diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words2 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words2 new file mode 100644 index 000000000..203ee39c4 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words2 @@ -0,0 +1,5 @@ + +Checking test results. If any of the four "cmp"s which follow +report any differences, something is wrong. If you can't easily +figure out what, please let me know (jseward@acm.org). + diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words3 b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words3 new file mode 100644 index 000000000..697266990 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/words3 @@ -0,0 +1,30 @@ + +If you got this far and the 'cmp's didn't complain, it looks +like you're in business. + +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type + + make install + +To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type + + make install PREFIX=/xxx/yyy + +If you are (justifiably) paranoid and want to see what 'make install' +is going to do, you can first do + + make -n install or + make -n install PREFIX=/xxx/yyy respectively. + +The -n instructs make to show the commands it would execute, but +not actually execute them. + +Instructions for use are in the preformatted manual page, in the file +bzip2.txt. For more detailed documentation, read the full manual. +It is available in Postscript form (manual.ps), PDF form (manual.pdf), +and HTML form (manual.html). + +You can also do "bzip2 --help" to see some helpful information. +"bzip2 -L" displays the software license. + diff --git a/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/xmlproc.sh b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/xmlproc.sh new file mode 100644 index 000000000..16fe72b2d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/xmlproc.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# see the README file for usage etc. +# +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.8 of 13 July 2019 +# Copyright (C) 1996-2019 Julian Seward +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ---------------------------------------------------------------- + + +usage() { + echo ''; + echo 'Usage: xmlproc.sh -[option] '; + echo 'Specify a target from:'; + echo '-v verify xml file conforms to dtd'; + echo '-html output in html format (single file)'; + echo '-ps output in postscript format'; + echo '-pdf output in pdf format'; + exit; +} + +if test $# -ne 2; then + usage +fi +# assign the variable for the output type +action=$1; shift +# assign the output filename +xmlfile=$1; shift +# and check user input it correct +if !(test -f $xmlfile); then + echo "No such file: $xmlfile"; + exit; +fi +# some other stuff we will use +OUT=output +xsl_fo=bz-fo.xsl +xsl_html=bz-html.xsl + +basename=$xmlfile +basename=${basename//'.xml'/''} + +fofile="${basename}.fo" +htmlfile="${basename}.html" +pdffile="${basename}.pdf" +psfile="${basename}.ps" +xmlfmtfile="${basename}.fmt" + +# first process the xmlfile with CDATA tags +./format.pl $xmlfile $xmlfmtfile +# so the shell knows where the catalogs live +export XML_CATALOG_FILES=/etc/xml/catalog + +# post-processing tidy up +cleanup() { + echo "Cleaning up: $@" + while [ $# != 0 ] + do + arg=$1; shift; + echo " deleting $arg"; + rm $arg + done +} + +case $action in + -v) + flags='--noout --xinclude --noblanks --postvalid' + dtd='--dtdvalid http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd' + xmllint $flags $dtd $xmlfmtfile 2> $OUT + egrep 'error' $OUT + rm $OUT + ;; + + -html) + echo "Creating $htmlfile ..." + xsltproc --nonet --xinclude -o $htmlfile $xsl_html $xmlfmtfile + cleanup $xmlfmtfile + ;; + + -pdf) + echo "Creating $pdffile ..." + xsltproc --nonet --xinclude -o $fofile $xsl_fo $xmlfmtfile + pdfxmltex $fofile >$OUT $OUT $OUT $OUT $OUT $OUT $OUT $OUT $OUT +#include +#include +#include +#include +#include + +namespace io = boost::iostreams; + +int main() +{ + io::file_source fs( "test.txt.bz2", std::ios_base::binary ); + io::bzip2_decompressor gz; + + std::string s; + io::copy( io::compose( gz, fs ), io::back_inserter( s ) ); + + BOOST_TEST( s == "=== reference output ===" ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/iostreams/test_gzip.cpp b/src/boost/tools/boost_install/test/iostreams/test_gzip.cpp new file mode 100644 index 000000000..412f0a34f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/test_gzip.cpp @@ -0,0 +1,29 @@ + +// Copyright 2019 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include +#include + +namespace io = boost::iostreams; + +int main() +{ + io::file_source fs( "test.txt.gz", std::ios_base::binary ); + io::gzip_decompressor gz; + + std::string s; + io::copy( io::compose( gz, fs ), io::back_inserter( s ) ); + + BOOST_TEST( s == "=== reference output ===" ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/CMakeLists.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/CMakeLists.txt new file mode 100644 index 000000000..0fe939df6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/CMakeLists.txt @@ -0,0 +1,249 @@ +cmake_minimum_required(VERSION 2.4.4) +set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) + +project(zlib C) + +set(VERSION "1.2.11") + +option(ASM686 "Enable building i686 assembly implementation") +option(AMD64 "Enable building amd64 assembly implementation") + +set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") +set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") +set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") +set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages") +set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files") + +include(CheckTypeSize) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckCSourceCompiles) +enable_testing() + +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stddef.h HAVE_STDDEF_H) + +# +# Check to see if we have large file support +# +set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) +# We add these other definitions here because CheckTypeSize.cmake +# in CMake 2.4.x does not automatically do so and we want +# compatibility with CMake 2.4.x. +if(HAVE_SYS_TYPES_H) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) +endif() +if(HAVE_STDINT_H) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) +endif() +if(HAVE_STDDEF_H) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) +endif() +check_type_size(off64_t OFF64_T) +if(HAVE_OFF64_T) + add_definitions(-D_LARGEFILE64_SOURCE=1) +endif() +set(CMAKE_REQUIRED_DEFINITIONS) # clear variable + +# +# Check for fseeko +# +check_function_exists(fseeko HAVE_FSEEKO) +if(NOT HAVE_FSEEKO) + add_definitions(-DNO_FSEEKO) +endif() + +# +# Check for unistd.h +# +check_include_file(unistd.h Z_HAVE_UNISTD_H) + +if(MSVC) + set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +endif() + +if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) + # If we're doing an out of source build and the user has a zconf.h + # in their source tree... + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) + message(STATUS "Renaming") + message(STATUS " ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h") + message(STATUS "to 'zconf.h.included' because this file is included with zlib") + message(STATUS "but CMake generates it automatically in the build directory.") + file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included) + endif() +endif() + +set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein + ${ZLIB_PC} @ONLY) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) + + +#============================================================================ +# zlib +#============================================================================ + +set(ZLIB_PUBLIC_HDRS + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h + zlib.h +) +set(ZLIB_PRIVATE_HDRS + crc32.h + deflate.h + gzguts.h + inffast.h + inffixed.h + inflate.h + inftrees.h + trees.h + zutil.h +) +set(ZLIB_SRCS + adler32.c + compress.c + crc32.c + deflate.c + gzclose.c + gzlib.c + gzread.c + gzwrite.c + inflate.c + infback.c + inftrees.c + inffast.c + trees.c + uncompr.c + zutil.c +) + +if(NOT MINGW) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +endif() + +if(CMAKE_COMPILER_IS_GNUCC) + if(ASM686) + set(ZLIB_ASMS contrib/asm686/match.S) + elseif (AMD64) + set(ZLIB_ASMS contrib/amd64/amd64-match.S) + endif () + + if(ZLIB_ASMS) + add_definitions(-DASMV) + set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE) + endif() +endif() + +if(MSVC) + if(ASM686) + ENABLE_LANGUAGE(ASM_MASM) + set(ZLIB_ASMS + contrib/masmx86/inffas32.asm + contrib/masmx86/match686.asm + ) + elseif (AMD64) + ENABLE_LANGUAGE(ASM_MASM) + set(ZLIB_ASMS + contrib/masmx64/gvmat64.asm + contrib/masmx64/inffasx64.asm + ) + endif() + + if(ZLIB_ASMS) + add_definitions(-DASMV -DASMINF) + endif() +endif() + +# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) +string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +if(MINGW) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) + endif() + + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + COMMAND ${CMAKE_RC_COMPILER} + -D GCC_WINDRES + -I ${CMAKE_CURRENT_SOURCE_DIR} + -I ${CMAKE_CURRENT_BINARY_DIR} + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +endif(MINGW) + +add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) +set_target_properties(zlib PROPERTIES SOVERSION 1) + +if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version + # encoded into their final filename. We disable this on Cygwin because + # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll + # seems to be the default. + # + # This has no effect with MSVC, on that platform the version info for + # the DLL comes from the resource file win32/zlib1.rc + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) +endif() + +if(UNIX) + # On unix-like platforms the library is almost always called libz + set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +elseif(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version + set_target_properties(zlib PROPERTIES SUFFIX "1.dll") +endif() + +if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + install(TARGETS zlib zlibstatic + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +endif() +if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) + install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}") +endif() +if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) + install(FILES zlib.3 DESTINATION "${INSTALL_MAN_DIR}/man3") +endif() +if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) + install(FILES ${ZLIB_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}") +endif() + +#============================================================================ +# Example binaries +#============================================================================ + +add_executable(example test/example.c) +target_link_libraries(example zlib) +add_test(example example) + +add_executable(minigzip test/minigzip.c) +target_link_libraries(minigzip zlib) + +if(HAVE_OFF64_T) + add_executable(example64 test/example.c) + target_link_libraries(example64 zlib) + set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_test(example64 example64) + + add_executable(minigzip64 test/minigzip.c) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") +endif() diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/ChangeLog b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/ChangeLog new file mode 100644 index 000000000..30199a65a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/ChangeLog @@ -0,0 +1,1515 @@ + + ChangeLog file for zlib + +Changes in 1.2.11 (15 Jan 2017) +- Fix deflate stored bug when pulling last block from window +- Permit immediate deflateParams changes before any deflate input + +Changes in 1.2.10 (2 Jan 2017) +- Avoid warnings on snprintf() return value +- Fix bug in deflate_stored() for zero-length input +- Fix bug in gzwrite.c that produced corrupt gzip files +- Remove files to be installed before copying them in Makefile.in +- Add warnings when compiling with assembler code + +Changes in 1.2.9 (31 Dec 2016) +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] +- Improve contrib/blast to return unused bytes +- Assure that gzoffset() is correct when appending +- Improve compress() and uncompress() to support large lengths +- Fix bug in test/example.c where error code not saved +- Remedy Coverity warning [Randers-Pehrson] +- Improve speed of gzprintf() in transparent mode +- Fix inflateInit2() bug when windowBits is 16 or 32 +- Change DEBUG macro to ZLIB_DEBUG +- Avoid uninitialized access by gzclose_w() +- Allow building zlib outside of the source directory +- Fix bug that accepted invalid zlib header when windowBits is zero +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there +- Loop on write() calls in gzwrite.c in case of non-blocking I/O +- Add --warn (-w) option to ./configure for more compiler warnings +- Reject a window size of 256 bytes if not using the zlib wrapper +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG +- Fix bugs in creating a very large gzip header +- Add uncompress2() function, which returns the input size used +- Assure that deflateParams() will not switch functions mid-block +- Dramatically speed up deflation for level 0 (storing) +- Add gzfread(), duplicating the interface of fread() +- Add gzfwrite(), duplicating the interface of fwrite() +- Add deflateGetDictionary() function +- Use snprintf() for later versions of Microsoft C +- Fix *Init macros to use z_ prefix when requested +- Replace as400 with os400 for OS/400 support [Monnerat] +- Add crc32_z() and adler32_z() functions with size_t lengths +- Update Visual Studio project files [AraHaan] + +Changes in 1.2.8 (28 Apr 2013) +- Update contrib/minizip/iowin32.c for Windows RT [Vollant] +- Do not force Z_CONST for C++ +- Clean up contrib/vstudio [Roß] +- Correct spelling error in zlib.h +- Fix mixed line endings in contrib/vstudio + +Changes in 1.2.7.3 (13 Apr 2013) +- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc + +Changes in 1.2.7.2 (13 Apr 2013) +- Change check for a four-byte type back to hexadecimal +- Fix typo in win32/Makefile.msc +- Add casts in gzwrite.c for pointer differences + +Changes in 1.2.7.1 (24 Mar 2013) +- Replace use of unsafe string functions with snprintf if available +- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] +- Fix gzgetc undefine when Z_PREFIX set [Turk] +- Eliminate use of mktemp in Makefile (not always available) +- Fix bug in 'F' mode for gzopen() +- Add inflateGetDictionary() function +- Correct comment in deflate.h +- Use _snprintf for snprintf in Microsoft C +- On Darwin, only use /usr/bin/libtool if libtool is not Apple +- Delete "--version" file if created by "ar --version" [Richard G.] +- Fix configure check for veracity of compiler error return codes +- Fix CMake compilation of static lib for MSVC2010 x64 +- Remove unused variable in infback9.c +- Fix argument checks in gzlog_compress() and gzlog_write() +- Clean up the usage of z_const and respect const usage within zlib +- Clean up examples/gzlog.[ch] comparisons of different types +- Avoid shift equal to bits in type (caused endless loop) +- Fix uninitialized value bug in gzputc() introduced by const patches +- Fix memory allocation error in examples/zran.c [Nor] +- Fix bug where gzopen(), gzclose() would write an empty file +- Fix bug in gzclose() when gzwrite() runs out of memory +- Check for input buffer malloc failure in examples/gzappend.c +- Add note to contrib/blast to use binary mode in stdio +- Fix comparisons of differently signed integers in contrib/blast +- Check for invalid code length codes in contrib/puff +- Fix serious but very rare decompression bug in inftrees.c +- Update inflateBack() comments, since inflate() can be faster +- Use underscored I/O function names for WINAPI_FAMILY +- Add _tr_flush_bits to the external symbols prefixed by --zprefix +- Add contrib/vstudio/vc10 pre-build step for static only +- Quote --version-script argument in CMakeLists.txt +- Don't specify --version-script on Apple platforms in CMakeLists.txt +- Fix casting error in contrib/testzlib/testzlib.c +- Fix types in contrib/minizip to match result of get_crc_table() +- Simplify contrib/vstudio/vc10 with 'd' suffix +- Add TOP support to win32/Makefile.msc +- Suport i686 and amd64 assembler builds in CMakeLists.txt +- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h +- Add vc11 and vc12 build files to contrib/vstudio +- Add gzvprintf() as an undocumented function in zlib +- Fix configure for Sun shell +- Remove runtime check in configure for four-byte integer type +- Add casts and consts to ease user conversion to C++ +- Add man pages for minizip and miniunzip +- In Makefile uninstall, don't rm if preceding cd fails +- Do not return Z_BUF_ERROR if deflateParam() has nothing to write + +Changes in 1.2.7 (2 May 2012) +- Replace use of memmove() with a simple copy for portability +- Test for existence of strerror +- Restore gzgetc_ for backward compatibility with 1.2.6 +- Fix build with non-GNU make on Solaris +- Require gcc 4.0 or later on Mac OS X to use the hidden attribute +- Include unistd.h for Watcom C +- Use __WATCOMC__ instead of __WATCOM__ +- Do not use the visibility attribute if NO_VIZ defined +- Improve the detection of no hidden visibility attribute +- Avoid using __int64 for gcc or solo compilation +- Cast to char * in gzprintf to avoid warnings [Zinser] +- Fix make_vms.com for VAX [Zinser] +- Don't use library or built-in byte swaps +- Simplify test and use of gcc hidden attribute +- Fix bug in gzclose_w() when gzwrite() fails to allocate memory +- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() +- Fix bug in test/minigzip.c for configure --solo +- Fix contrib/vstudio project link errors [Mohanathas] +- Add ability to choose the builder in make_vms.com [Schweda] +- Add DESTDIR support to mingw32 win32/Makefile.gcc +- Fix comments in win32/Makefile.gcc for proper usage +- Allow overriding the default install locations for cmake +- Generate and install the pkg-config file with cmake +- Build both a static and a shared version of zlib with cmake +- Include version symbols for cmake builds +- If using cmake with MSVC, add the source directory to the includes +- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta] +- Move obsolete emx makefile to old [Truta] +- Allow the use of -Wundef when compiling or using zlib +- Avoid the use of the -u option with mktemp +- Improve inflate() documentation on the use of Z_FINISH +- Recognize clang as gcc +- Add gzopen_w() in Windows for wide character path names +- Rename zconf.h in CMakeLists.txt to move it out of the way +- Add source directory in CMakeLists.txt for building examples +- Look in build directory for zlib.pc in CMakeLists.txt +- Remove gzflags from zlibvc.def in vc9 and vc10 +- Fix contrib/minizip compilation in the MinGW environment +- Update ./configure for Solaris, support --64 [Mooney] +- Remove -R. from Solaris shared build (possible security issue) +- Avoid race condition for parallel make (-j) running example +- Fix type mismatch between get_crc_table() and crc_table +- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler] +- Fix the path to zlib.map in CMakeLists.txt +- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe] +- Add instructions to win32/Makefile.gcc for shared install [Torri] + +Changes in 1.2.6.1 (12 Feb 2012) +- Avoid the use of the Objective-C reserved name "id" +- Include io.h in gzguts.h for Microsoft compilers +- Fix problem with ./configure --prefix and gzgetc macro +- Include gz_header definition when compiling zlib solo +- Put gzflags() functionality back in zutil.c +- Avoid library header include in crc32.c for Z_SOLO +- Use name in GCC_CLASSIC as C compiler for coverage testing, if set +- Minor cleanup in contrib/minizip/zip.c [Vollant] +- Update make_vms.com [Zinser] +- Remove unnecessary gzgetc_ function +- Use optimized byte swap operations for Microsoft and GNU [Snyder] +- Fix minor typo in zlib.h comments [Rzesniowiecki] + +Changes in 1.2.6 (29 Jan 2012) +- Update the Pascal interface in contrib/pascal +- Fix function numbers for gzgetc_ in zlibvc.def files +- Fix configure.ac for contrib/minizip [Schiffer] +- Fix large-entry detection in minizip on 64-bit systems [Schiffer] +- Have ./configure use the compiler return code for error indication +- Fix CMakeLists.txt for cross compilation [McClure] +- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes] +- Fix compilation of contrib/minizip on FreeBSD [Marquez] +- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath] +- Include io.h for Turbo C / Borland C on all platforms [Truta] +- Make version explicit in contrib/minizip/configure.ac [Bosmans] +- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant] +- Minor cleanup up contrib/minizip/unzip.c [Vollant] +- Fix bug when compiling minizip with C++ [Vollant] +- Protect for long name and extra fields in contrib/minizip [Vollant] +- Avoid some warnings in contrib/minizip [Vollant] +- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip +- Add missing libs to minizip linker command +- Add support for VPATH builds in contrib/minizip +- Add an --enable-demos option to contrib/minizip/configure +- Add the generation of configure.log by ./configure +- Exit when required parameters not provided to win32/Makefile.gcc +- Have gzputc return the character written instead of the argument +- Use the -m option on ldconfig for BSD systems [Tobias] +- Correct in zlib.map when deflateResetKeep was added + +Changes in 1.2.5.3 (15 Jan 2012) +- Restore gzgetc function for binary compatibility +- Do not use _lseeki64 under Borland C++ [Truta] +- Update win32/Makefile.msc to build test/*.c [Truta] +- Remove old/visualc6 given CMakefile and other alternatives +- Update AS400 build files and documentation [Monnerat] +- Update win32/Makefile.gcc to build test/*.c [Truta] +- Permit stronger flushes after Z_BLOCK flushes +- Avoid extraneous empty blocks when doing empty flushes +- Permit Z_NULL arguments to deflatePending +- Allow deflatePrime() to insert bits in the middle of a stream +- Remove second empty static block for Z_PARTIAL_FLUSH +- Write out all of the available bits when using Z_BLOCK +- Insert the first two strings in the hash table after a flush + +Changes in 1.2.5.2 (17 Dec 2011) +- fix ld error: unable to find version dependency 'ZLIB_1.2.5' +- use relative symlinks for shared libs +- Avoid searching past window for Z_RLE strategy +- Assure that high-water mark initialization is always applied in deflate +- Add assertions to fill_window() in deflate.c to match comments +- Update python link in README +- Correct spelling error in gzread.c +- Fix bug in gzgets() for a concatenated empty gzip stream +- Correct error in comment for gz_make() +- Change gzread() and related to ignore junk after gzip streams +- Allow gzread() and related to continue after gzclearerr() +- Allow gzrewind() and gzseek() after a premature end-of-file +- Simplify gzseek() now that raw after gzip is ignored +- Change gzgetc() to a macro for speed (~40% speedup in testing) +- Fix gzclose() to return the actual error last encountered +- Always add large file support for windows +- Include zconf.h for windows large file support +- Include zconf.h.cmakein for windows large file support +- Update zconf.h.cmakein on make distclean +- Merge vestigial vsnprintf determination from zutil.h to gzguts.h +- Clarify how gzopen() appends in zlib.h comments +- Correct documentation of gzdirect() since junk at end now ignored +- Add a transparent write mode to gzopen() when 'T' is in the mode +- Update python link in zlib man page +- Get inffixed.h and MAKEFIXED result to match +- Add a ./config --solo option to make zlib subset with no library use +- Add undocumented inflateResetKeep() function for CAB file decoding +- Add --cover option to ./configure for gcc coverage testing +- Add #define ZLIB_CONST option to use const in the z_stream interface +- Add comment to gzdopen() in zlib.h to use dup() when using fileno() +- Note behavior of uncompress() to provide as much data as it can +- Add files in contrib/minizip to aid in building libminizip +- Split off AR options in Makefile.in and configure +- Change ON macro to Z_ARG to avoid application conflicts +- Facilitate compilation with Borland C++ for pragmas and vsnprintf +- Include io.h for Turbo C / Borland C++ +- Move example.c and minigzip.c to test/ +- Simplify incomplete code table filling in inflate_table() +- Remove code from inflate.c and infback.c that is impossible to execute +- Test the inflate code with full coverage +- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw) +- Add deflateResetKeep and fix inflateResetKeep to retain dictionary +- Fix gzwrite.c to accommodate reduced memory zlib compilation +- Have inflate() with Z_FINISH avoid the allocation of a window +- Do not set strm->adler when doing raw inflate +- Fix gzeof() to behave just like feof() when read is not past end of file +- Fix bug in gzread.c when end-of-file is reached +- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF +- Document gzread() capability to read concurrently written files +- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo] + +Changes in 1.2.5.1 (10 Sep 2011) +- Update FAQ entry on shared builds (#13) +- Avoid symbolic argument to chmod in Makefile.in +- Fix bug and add consts in contrib/puff [Oberhumer] +- Update contrib/puff/zeros.raw test file to have all block types +- Add full coverage test for puff in contrib/puff/Makefile +- Fix static-only-build install in Makefile.in +- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno] +- Add libz.a dependency to shared in Makefile.in for parallel builds +- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out +- Replace $(...) with `...` in configure for non-bash sh [Bowler] +- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen] +- Add solaris* to Linux* in configure to allow gcc use [Groffen] +- Add *bsd* to Linux* case in configure [Bar-Lev] +- Add inffast.obj to dependencies in win32/Makefile.msc +- Correct spelling error in deflate.h [Kohler] +- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc +- Add test to configure for GNU C looking for gcc in output of $cc -v +- Add zlib.pc generation to win32/Makefile.gcc [Weigelt] +- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not +- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense +- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser) +- Make stronger test in zconf.h to include unistd.h for LFS +- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack] +- Fix zlib.h LFS support when Z_PREFIX used +- Add updated as400 support (removed from old) [Monnerat] +- Avoid deflate sensitivity to volatile input data +- Avoid division in adler32_combine for NO_DIVIDE +- Clarify the use of Z_FINISH with deflateBound() amount of space +- Set binary for output file in puff.c +- Use u4 type for crc_table to avoid conversion warnings +- Apply casts in zlib.h to avoid conversion warnings +- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller] +- Improve inflateSync() documentation to note indeterminancy +- Add deflatePending() function to return the amount of pending output +- Correct the spelling of "specification" in FAQ [Randers-Pehrson] +- Add a check in configure for stdarg.h, use for gzprintf() +- Check that pointers fit in ints when gzprint() compiled old style +- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler] +- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt] +- Add debug records in assmebler code [Londer] +- Update RFC references to use http://tools.ietf.org/html/... [Li] +- Add --archs option, use of libtool to configure for Mac OS X [Borstel] + +Changes in 1.2.5 (19 Apr 2010) +- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] +- Default to libdir as sharedlibdir in configure [Nieder] +- Update copyright dates on modified source files +- Update trees.c to be able to generate modified trees.h +- Exit configure for MinGW, suggesting win32/Makefile.gcc +- Check for NULL path in gz_open [Homurlu] + +Changes in 1.2.4.5 (18 Apr 2010) +- Set sharedlibdir in configure [Torok] +- Set LDFLAGS in Makefile.in [Bar-Lev] +- Avoid mkdir objs race condition in Makefile.in [Bowler] +- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays +- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C +- Don't use hidden attribute when it is a warning generator (e.g. Solaris) + +Changes in 1.2.4.4 (18 Apr 2010) +- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] +- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty +- Try to use bash or ksh regardless of functionality of /bin/sh +- Fix configure incompatibility with NetBSD sh +- Remove attempt to run under bash or ksh since have better NetBSD fix +- Fix win32/Makefile.gcc for MinGW [Bar-Lev] +- Add diagnostic messages when using CROSS_PREFIX in configure +- Added --sharedlibdir option to configure [Weigelt] +- Use hidden visibility attribute when available [Frysinger] + +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + +Changes in 1.2.4 (14 Mar 2010) +- Fix VER3 extraction in configure for no fourth subversion +- Update zlib.3, add docs to Makefile.in to make .pdf out of it +- Add zlib.3.pdf to distribution +- Don't set error code in gzerror() if passed pointer is NULL +- Apply destination directory fixes to CMakeLists.txt [Lowman] +- Move #cmakedefine's to a new zconf.in.cmakein +- Restore zconf.h for builds that don't use configure or cmake +- Add distclean to dummy Makefile for convenience +- Update and improve INDEX, README, and FAQ +- Update CMakeLists.txt for the return of zconf.h [Lowman] +- Update contrib/vstudio/vc9 and vc10 [Vollant] +- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc +- Apply license and readme changes to contrib/asm686 [Raiter] +- Check file name lengths and add -c option in minigzip.c [Li] +- Update contrib/amd64 and contrib/masmx86/ [Vollant] +- Avoid use of "eof" parameter in trees.c to not shadow library variable +- Update make_vms.com for removal of zlibdefs.h [Zinser] +- Update assembler code and vstudio projects in contrib [Vollant] +- Remove outdated assembler code contrib/masm686 and contrib/asm586 +- Remove old vc7 and vc8 from contrib/vstudio +- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] +- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() +- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] +- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) +- Fix bug in void-returning vsprintf() case in gzwrite.c +- Fix name change from inflate.h in contrib/inflate86/inffas86.c +- Check if temporary file exists before removing in make_vms.com [Zinser] +- Fix make install and uninstall for --static option +- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] +- Update readme.txt in contrib/masmx64 and masmx86 to assemble + +Changes in 1.2.3.9 (21 Feb 2010) +- Expunge gzio.c +- Move as400 build information to old +- Fix updates in contrib/minizip and contrib/vstudio +- Add const to vsnprintf test in configure to avoid warnings [Weigelt] +- Delete zconf.h (made by configure) [Weigelt] +- Change zconf.in.h to zconf.h.in per convention [Weigelt] +- Check for NULL buf in gzgets() +- Return empty string for gzgets() with len == 1 (like fgets()) +- Fix description of gzgets() in zlib.h for end-of-file, NULL return +- Update minizip to 1.1 [Vollant] +- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c +- Note in zlib.h that gzerror() should be used to distinguish from EOF +- Remove use of snprintf() from gzlib.c +- Fix bug in gzseek() +- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] +- Fix zconf.h generation in CMakeLists.txt [Lowman] +- Improve comments in zconf.h where modified by configure + +Changes in 1.2.3.8 (13 Feb 2010) +- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] +- Use z_off64_t in gz_zero() and gz_skip() to match state->skip +- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) +- Revert to Makefile.in from 1.2.3.6 (live with the clutter) +- Fix missing error return in gzflush(), add zlib.h note +- Add *64 functions to zlib.map [Levin] +- Fix signed/unsigned comparison in gz_comp() +- Use SFLAGS when testing shared linking in configure +- Add --64 option to ./configure to use -m64 with gcc +- Fix ./configure --help to correctly name options +- Have make fail if a test fails [Levin] +- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] +- Remove assembler object files from contrib + +Changes in 1.2.3.7 (24 Jan 2010) +- Always gzopen() with O_LARGEFILE if available +- Fix gzdirect() to work immediately after gzopen() or gzdopen() +- Make gzdirect() more precise when the state changes while reading +- Improve zlib.h documentation in many places +- Catch memory allocation failure in gz_open() +- Complete close operation if seek forward in gzclose_w() fails +- Return Z_ERRNO from gzclose_r() if close() fails +- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL +- Return zero for gzwrite() errors to match zlib.h description +- Return -1 on gzputs() error to match zlib.h description +- Add zconf.in.h to allow recovery from configure modification [Weigelt] +- Fix static library permissions in Makefile.in [Weigelt] +- Avoid warnings in configure tests that hide functionality [Weigelt] +- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] +- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] +- Avoid access of uninitialized data for first inflateReset2 call [Gomes] +- Keep object files in subdirectories to reduce the clutter somewhat +- Remove default Makefile and zlibdefs.h, add dummy Makefile +- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ +- Remove zlibdefs.h completely -- modify zconf.h instead + +Changes in 1.2.3.6 (17 Jan 2010) +- Avoid void * arithmetic in gzread.c and gzwrite.c +- Make compilers happier with const char * for gz_error message +- Avoid unused parameter warning in inflate.c +- Avoid signed-unsigned comparison warning in inflate.c +- Indent #pragma's for traditional C +- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() +- Correct email address in configure for system options +- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] +- Update zlib.map [Brown] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] +- Apply various fixes to CMakeLists.txt [Lowman] +- Add checks on len in gzread() and gzwrite() +- Add error message for no more room for gzungetc() +- Remove zlib version check in gzwrite() +- Defer compression of gzprintf() result until need to +- Use snprintf() in gzdopen() if available +- Remove USE_MMAP configuration determination (only used by minigzip) +- Remove examples/pigz.c (available separately) +- Update examples/gun.c to 1.6 + +Changes in 1.2.3.5 (8 Jan 2010) +- Add space after #if in zutil.h for some compilers +- Fix relatively harmless bug in deflate_fast() [Exarevsky] +- Fix same problem in deflate_slow() +- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] +- Add deflate_rle() for faster Z_RLE strategy run-length encoding +- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding +- Change name of "write" variable in inffast.c to avoid library collisions +- Fix premature EOF from gzread() in gzio.c [Brown] +- Use zlib header window size if windowBits is 0 in inflateInit2() +- Remove compressBound() call in deflate.c to avoid linking compress.o +- Replace use of errno in gz* with functions, support WinCE [Alves] +- Provide alternative to perror() in minigzip.c for WinCE [Alves] +- Don't use _vsnprintf on later versions of MSVC [Lowman] +- Add CMake build script and input file [Lowman] +- Update contrib/minizip to 1.1 [Svensson, Vollant] +- Moved nintendods directory from contrib to . +- Replace gzio.c with a new set of routines with the same functionality +- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above +- Update contrib/minizip to 1.1b +- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h + +Changes in 1.2.3.4 (21 Dec 2009) +- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility +- Update comments in configure and Makefile.in for default --shared +- Fix test -z's in configure [Marquess] +- Build examplesh and minigzipsh when not testing +- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h +- Import LDFLAGS from the environment in configure +- Fix configure to populate SFLAGS with discovered CFLAGS options +- Adapt make_vms.com to the new Makefile.in [Zinser] +- Add zlib2ansi script for C++ compilation [Marquess] +- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) +- Add AMD64 assembler code for longest match to contrib [Teterin] +- Include options from $SFLAGS when doing $LDSHARED +- Simplify 64-bit file support by introducing z_off64_t type +- Make shared object files in objs directory to work around old Sun cc +- Use only three-part version number for Darwin shared compiles +- Add rc option to ar in Makefile.in for when ./configure not run +- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* +- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile +- Protect against _FILE_OFFSET_BITS being defined when compiling zlib +- Rename Makefile.in targets allstatic to static and allshared to shared +- Fix static and shared Makefile.in targets to be independent +- Correct error return bug in gz_open() by setting state [Brown] +- Put spaces before ;;'s in configure for better sh compatibility +- Add pigz.c (parallel implementation of gzip) to examples/ +- Correct constant in crc32.c to UL [Leventhal] +- Reject negative lengths in crc32_combine() +- Add inflateReset2() function to work like inflateEnd()/inflateInit2() +- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] +- Correct typo in doc/algorithm.txt [Janik] +- Fix bug in adler32_combine() [Zhu] +- Catch missing-end-of-block-code error in all inflates and in puff + Assures that random input to inflate eventually results in an error +- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ +- Update ENOUGH and its usage to reflect discovered bounds +- Fix gzerror() error report on empty input file [Brown] +- Add ush casts in trees.c to avoid pedantic runtime errors +- Fix typo in zlib.h uncompress() description [Reiss] +- Correct inflate() comments with regard to automatic header detection +- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) +- Put new version of gzlog (2.0) in examples with interruption recovery +- Add puff compile option to permit invalid distance-too-far streams +- Add puff TEST command options, ability to read piped input +- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but + _LARGEFILE64_SOURCE not defined +- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart +- Fix deflateSetDictionary() to use all 32K for output consistency +- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) +- Clear bytes after deflate lookahead to avoid use of uninitialized data +- Change a limit in inftrees.c to be more transparent to Coverity Prevent +- Update win32/zlib.def with exported symbols from zlib.h +- Correct spelling errors in zlib.h [Willem, Sobrado] +- Allow Z_BLOCK for deflate() to force a new block +- Allow negative bits in inflatePrime() to delete existing bit buffer +- Add Z_TREES flush option to inflate() to return at end of trees +- Add inflateMark() to return current state information for random access +- Add Makefile for NintendoDS to contrib [Costa] +- Add -w in configure compile tests to avoid spurious warnings [Beucler] +- Fix typos in zlib.h comments for deflateSetDictionary() +- Fix EOF detection in transparent gzread() [Maier] + +Changes in 1.2.3.3 (2 October 2006) +- Make --shared the default for configure, add a --static option +- Add compile option to permit invalid distance-too-far streams +- Add inflateUndermine() function which is required to enable above +- Remove use of "this" variable name for C++ compatibility [Marquess] +- Add testing of shared library in make test, if shared library built +- Use ftello() and fseeko() if available instead of ftell() and fseek() +- Provide two versions of all functions that use the z_off_t type for + binary compatibility -- a normal version and a 64-bit offset version, + per the Large File Support Extension when _LARGEFILE64_SOURCE is + defined; use the 64-bit versions by default when _FILE_OFFSET_BITS + is defined to be 64 +- Add a --uname= option to configure to perhaps help with cross-compiling + +Changes in 1.2.3.2 (3 September 2006) +- Turn off silly Borland warnings [Hay] +- Use off64_t and define _LARGEFILE64_SOURCE when present +- Fix missing dependency on inffixed.h in Makefile.in +- Rig configure --shared to build both shared and static [Teredesai, Truta] +- Remove zconf.in.h and instead create a new zlibdefs.h file +- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] +- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] + +Changes in 1.2.3.1 (16 August 2006) +- Add watcom directory with OpenWatcom make files [Daniel] +- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] +- Update make_vms.com [Zinser] +- Use -fPIC for shared build in configure [Teredesai, Nicholson] +- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] +- Add some FAQ entries about the contrib directory +- Update the MVS question in the FAQ +- Avoid extraneous reads after EOF in gzio.c [Brown] +- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] +- Add comments to zlib.h about gzerror() usage [Brown] +- Set extra flags in gzip header in gzopen() like deflate() does +- Make configure options more compatible with double-dash conventions + [Weigelt] +- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] +- Fix uninstall target in Makefile.in [Truta] +- Add pkgconfig support [Weigelt] +- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] +- Replace set_data_type() with a more accurate detect_data_type() in + trees.c, according to the txtvsbin.txt document [Truta] +- Swap the order of #include and #include "zlib.h" in + gzio.c, example.c and minigzip.c [Truta] +- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, + Truta] (where?) +- Fix target "clean" from win32/Makefile.bor [Truta] +- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] +- Update zlib www home address in win32/DLL_FAQ.txt [Truta] +- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] +- Enable browse info in the "Debug" and "ASM Debug" configurations in + the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] +- Add pkgconfig support [Weigelt] +- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, + for use in win32/zlib1.rc [Polushin, Rowe, Truta] +- Add a document that explains the new text detection scheme to + doc/txtvsbin.txt [Truta] +- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] +- Move algorithm.txt into doc/ [Truta] +- Synchronize FAQ with website +- Fix compressBound(), was low for some pathological cases [Fearnley] +- Take into account wrapper variations in deflateBound() +- Set examples/zpipe.c input and output to binary mode for Windows +- Update examples/zlib_how.html with new zpipe.c (also web site) +- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems + that gcc became pickier in 4.0) +- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain + un-versioned, the patch adds versioning only for symbols introduced in + zlib-1.2.0 or later. It also declares as local those symbols which are + not designed to be exported." [Levin] +- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure +- Do not initialize global static by default in trees.c, add a response + NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] +- Don't use strerror() in gzio.c under WinCE [Yakimov] +- Don't use errno.h in zutil.h under WinCE [Yakimov] +- Move arguments for AR to its usage to allow replacing ar [Marot] +- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] +- Improve inflateInit() and inflateInit2() documentation +- Fix structure size comment in inflate.h +- Change configure help option from --h* to --help [Santos] + +Changes in 1.2.3 (18 July 2005) +- Apply security vulnerability fixes to contrib/infback9 as well +- Clean up some text files (carriage returns, trailing space) +- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] + +Changes in 1.2.2.4 (11 July 2005) +- Add inflatePrime() function for starting inflation at bit boundary +- Avoid some Visual C warnings in deflate.c +- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit + compile +- Fix some spelling errors in comments [Betts] +- Correct inflateInit2() error return documentation in zlib.h +- Add zran.c example of compressed data random access to examples + directory, shows use of inflatePrime() +- Fix cast for assignments to strm->state in inflate.c and infback.c +- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] +- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] +- Add cast in trees.c t avoid a warning [Oberhumer] +- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] +- Update make_vms.com [Zinser] +- Initialize state->write in inflateReset() since copied in inflate_fast() +- Be more strict on incomplete code sets in inflate_table() and increase + ENOUGH and MAXD -- this repairs a possible security vulnerability for + invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for + discovering the vulnerability and providing test cases. +- Add ia64 support to configure for HP-UX [Smith] +- Add error return to gzread() for format or i/o error [Levin] +- Use malloc.h for OS/2 [Necasek] + +Changes in 1.2.2.3 (27 May 2005) +- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile +- Typecast fread() return values in gzio.c [Vollant] +- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) +- Fix crc check bug in gzread() after gzungetc() [Heiner] +- Add the deflateTune() function to adjust internal compression parameters +- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) +- Remove an incorrect assertion in examples/zpipe.c +- Add C++ wrapper in infback9.h [Donais] +- Fix bug in inflateCopy() when decoding fixed codes +- Note in zlib.h how much deflateSetDictionary() actually uses +- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) +- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] +- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] +- Add gzdirect() function to indicate transparent reads +- Update contrib/minizip [Vollant] +- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] +- Add casts in crc32.c to avoid warnings [Oberhumer] +- Add contrib/masmx64 [Vollant] +- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] + +Changes in 1.2.2.2 (30 December 2004) +- Replace structure assignments in deflate.c and inflate.c with zmemcpy to + avoid implicit memcpy calls (portability for no-library compilation) +- Increase sprintf() buffer size in gzdopen() to allow for large numbers +- Add INFLATE_STRICT to check distances against zlib header +- Improve WinCE errno handling and comments [Chang] +- Remove comment about no gzip header processing in FAQ +- Add Z_FIXED strategy option to deflateInit2() to force fixed trees +- Add updated make_vms.com [Coghlan], update README +- Create a new "examples" directory, move gzappend.c there, add zpipe.c, + fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html. +- Add FAQ entry and comments in deflate.c on uninitialized memory access +- Add Solaris 9 make options in configure [Gilbert] +- Allow strerror() usage in gzio.c for STDC +- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] +- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] +- Use z_off_t for adler32_combine() and crc32_combine() lengths +- Make adler32() much faster for small len +- Use OS_CODE in deflate() default gzip header + +Changes in 1.2.2.1 (31 October 2004) +- Allow inflateSetDictionary() call for raw inflate +- Fix inflate header crc check bug for file names and comments +- Add deflateSetHeader() and gz_header structure for custom gzip headers +- Add inflateGetheader() to retrieve gzip headers +- Add crc32_combine() and adler32_combine() functions +- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list +- Use zstreamp consistently in zlib.h (inflate_back functions) +- Remove GUNZIP condition from definition of inflate_mode in inflate.h + and in contrib/inflate86/inffast.S [Truta, Anderson] +- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] +- Update projects/README.projects and projects/visualc6 [Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] +- Deprecate Z_ASCII; use Z_TEXT instead [Truta] +- Use a new algorithm for setting strm->data_type in trees.c [Truta] +- Do not define an exit() prototype in zutil.c unless DEBUG defined +- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] +- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() +- Fix Darwin build version identification [Peterson] + +Changes in 1.2.2 (3 October 2004) +- Update zlib.h comments on gzip in-memory processing +- Set adler to 1 in inflateReset() to support Java test suite [Walles] +- Add contrib/dotzlib [Ravn] +- Update win32/DLL_FAQ.txt [Truta] +- Update contrib/minizip [Vollant] +- Move contrib/visual-basic.txt to old/ [Truta] +- Fix assembler builds in projects/visualc6/ [Truta] + +Changes in 1.2.1.2 (9 September 2004) +- Update INDEX file +- Fix trees.c to update strm->data_type (no one ever noticed!) +- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] +- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) +- Add limited multitasking protection to DYNAMIC_CRC_TABLE +- Add NO_vsnprintf for VMS in zutil.h [Mozilla] +- Don't declare strerror() under VMS [Mozilla] +- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize +- Update contrib/ada [Anisimkov] +- Update contrib/minizip [Vollant] +- Fix configure to not hardcode directories for Darwin [Peterson] +- Fix gzio.c to not return error on empty files [Brown] +- Fix indentation; update version in contrib/delphi/ZLib.pas and + contrib/pascal/zlibpas.pas [Truta] +- Update mkasm.bat in contrib/masmx86 [Truta] +- Update contrib/untgz [Truta] +- Add projects/README.projects [Truta] +- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] +- Remove an unnecessary assignment to curr in inftrees.c [Truta] +- Add OS/2 to exe builds in configure [Poltorak] +- Remove err dummy parameter in zlib.h [Kientzle] + +Changes in 1.2.1.1 (9 January 2004) +- Update email address in README +- Several FAQ updates +- Fix a big fat bug in inftrees.c that prevented decoding valid + dynamic blocks with only literals and no distance codes -- + Thanks to "Hot Emu" for the bug report and sample file +- Add a note to puff.c on no distance codes case. + +Changes in 1.2.1 (17 November 2003) +- Remove a tab in contrib/gzappend/gzappend.c +- Update some interfaces in contrib for new zlib functions +- Update zlib version number in some contrib entries +- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] +- Support shared libraries on Hurd and KFreeBSD [Brown] +- Fix error in NO_DIVIDE option of adler32.c + +Changes in 1.2.0.8 (4 November 2003) +- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas +- Add experimental NO_DIVIDE #define in adler32.c + - Possibly faster on some processors (let me know if it is) +- Correct Z_BLOCK to not return on first inflate call if no wrap +- Fix strm->data_type on inflate() return to correctly indicate EOB +- Add deflatePrime() function for appending in the middle of a byte +- Add contrib/gzappend for an example of appending to a stream +- Update win32/DLL_FAQ.txt [Truta] +- Delete Turbo C comment in README [Truta] +- Improve some indentation in zconf.h [Truta] +- Fix infinite loop on bad input in configure script [Church] +- Fix gzeof() for concatenated gzip files [Johnson] +- Add example to contrib/visual-basic.txt [Michael B.] +- Add -p to mkdir's in Makefile.in [vda] +- Fix configure to properly detect presence or lack of printf functions +- Add AS400 support [Monnerat] +- Add a little Cygwin support [Wilson] + +Changes in 1.2.0.7 (21 September 2003) +- Correct some debug formats in contrib/infback9 +- Cast a type in a debug statement in trees.c +- Change search and replace delimiter in configure from % to # [Beebe] +- Update contrib/untgz to 0.2 with various fixes [Truta] +- Add build support for Amiga [Nikl] +- Remove some directories in old that have been updated to 1.2 +- Add dylib building for Mac OS X in configure and Makefile.in +- Remove old distribution stuff from Makefile +- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X +- Update links in README + +Changes in 1.2.0.6 (13 September 2003) +- Minor FAQ updates +- Update contrib/minizip to 1.00 [Vollant] +- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] +- Update POSTINC comment for 68060 [Nikl] +- Add contrib/infback9 with deflate64 decoding (unsupported) +- For MVS define NO_vsnprintf and undefine FAR [van Burik] +- Add pragma for fdopen on MVS [van Burik] + +Changes in 1.2.0.5 (8 September 2003) +- Add OF to inflateBackEnd() declaration in zlib.h +- Remember start when using gzdopen in the middle of a file +- Use internal off_t counters in gz* functions to properly handle seeks +- Perform more rigorous check for distance-too-far in inffast.c +- Add Z_BLOCK flush option to return from inflate at block boundary +- Set strm->data_type on return from inflate + - Indicate bits unused, if at block boundary, and if in last block +- Replace size_t with ptrdiff_t in crc32.c, and check for correct size +- Add condition so old NO_DEFLATE define still works for compatibility +- FAQ update regarding the Windows DLL [Truta] +- INDEX update: add qnx entry, remove aix entry [Truta] +- Install zlib.3 into mandir [Wilson] +- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] +- Adapt the zlib interface to the new DLL convention guidelines [Truta] +- Introduce ZLIB_WINAPI macro to allow the export of functions using + the WINAPI calling convention, for Visual Basic [Vollant, Truta] +- Update msdos and win32 scripts and makefiles [Truta] +- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] +- Add contrib/ada [Anisimkov] +- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] +- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] +- Add contrib/masm686 [Truta] +- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm + [Truta, Vollant] +- Update contrib/delphi; rename to contrib/pascal; add example [Truta] +- Remove contrib/delphi2; add a new contrib/delphi [Truta] +- Avoid inclusion of the nonstandard in contrib/iostream, + and fix some method prototypes [Truta] +- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip + [Truta] +- Avoid the use of backslash (\) in contrib/minizip [Vollant] +- Fix file time handling in contrib/untgz; update makefiles [Truta] +- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines + [Vollant] +- Remove contrib/vstudio/vc15_16 [Vollant] +- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] +- Update README.contrib [Truta] +- Invert the assignment order of match_head and s->prev[...] in + INSERT_STRING [Truta] +- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings + [Truta] +- Compare function pointers with 0, not with NULL or Z_NULL [Truta] +- Fix prototype of syncsearch in inflate.c [Truta] +- Introduce ASMINF macro to be enabled when using an ASM implementation + of inflate_fast [Truta] +- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] +- Modify test_gzio in example.c to take a single file name as a + parameter [Truta] +- Exit the example.c program if gzopen fails [Truta] +- Add type casts around strlen in example.c [Truta] +- Remove casting to sizeof in minigzip.c; give a proper type + to the variable compared with SUFFIX_LEN [Truta] +- Update definitions of STDC and STDC99 in zconf.h [Truta] +- Synchronize zconf.h with the new Windows DLL interface [Truta] +- Use SYS16BIT instead of __32BIT__ to distinguish between + 16- and 32-bit platforms [Truta] +- Use far memory allocators in small 16-bit memory models for + Turbo C [Truta] +- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in + zlibCompileFlags [Truta] +- Cygwin has vsnprintf [Wilson] +- In Windows16, OS_CODE is 0, as in MSDOS [Truta] +- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] + +Changes in 1.2.0.4 (10 August 2003) +- Minor FAQ updates +- Be more strict when checking inflateInit2's windowBits parameter +- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well +- Add gzip wrapper option to deflateInit2 using windowBits +- Add updated QNX rule in configure and qnx directory [Bonnefoy] +- Make inflate distance-too-far checks more rigorous +- Clean up FAR usage in inflate +- Add casting to sizeof() in gzio.c and minigzip.c + +Changes in 1.2.0.3 (19 July 2003) +- Fix silly error in gzungetc() implementation [Vollant] +- Update contrib/minizip and contrib/vstudio [Vollant] +- Fix printf format in example.c +- Correct cdecl support in zconf.in.h [Anisimkov] +- Minor FAQ updates + +Changes in 1.2.0.2 (13 July 2003) +- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons +- Attempt to avoid warnings in crc32.c for pointer-int conversion +- Add AIX to configure, remove aix directory [Bakker] +- Add some casts to minigzip.c +- Improve checking after insecure sprintf() or vsprintf() calls +- Remove #elif's from crc32.c +- Change leave label to inf_leave in inflate.c and infback.c to avoid + library conflicts +- Remove inflate gzip decoding by default--only enable gzip decoding by + special request for stricter backward compatibility +- Add zlibCompileFlags() function to return compilation information +- More typecasting in deflate.c to avoid warnings +- Remove leading underscore from _Capital #defines [Truta] +- Fix configure to link shared library when testing +- Add some Windows CE target adjustments [Mai] +- Remove #define ZLIB_DLL in zconf.h [Vollant] +- Add zlib.3 [Rodgers] +- Update RFC URL in deflate.c and algorithm.txt [Mai] +- Add zlib_dll_FAQ.txt to contrib [Truta] +- Add UL to some constants [Truta] +- Update minizip and vstudio [Vollant] +- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h +- Expand use of NO_DUMMY_DECL to avoid all dummy structures +- Added iostream3 to contrib [Schwardt] +- Replace rewind() with fseek() for WinCE [Truta] +- Improve setting of zlib format compression level flags + - Report 0 for huffman and rle strategies and for level == 0 or 1 + - Report 2 only for level == 6 +- Only deal with 64K limit when necessary at compile time [Truta] +- Allow TOO_FAR check to be turned off at compile time [Truta] +- Add gzclearerr() function [Souza] +- Add gzungetc() function + +Changes in 1.2.0.1 (17 March 2003) +- Add Z_RLE strategy for run-length encoding [Truta] + - When Z_RLE requested, restrict matches to distance one + - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE +- Correct FASTEST compilation to allow level == 0 +- Clean up what gets compiled for FASTEST +- Incorporate changes to zconf.in.h [Vollant] + - Refine detection of Turbo C need for dummy returns + - Refine ZLIB_DLL compilation + - Include additional header file on VMS for off_t typedef +- Try to use _vsnprintf where it supplants vsprintf [Vollant] +- Add some casts in inffast.c +- Enchance comments in zlib.h on what happens if gzprintf() tries to + write more than 4095 bytes before compression +- Remove unused state from inflateBackEnd() +- Remove exit(0) from minigzip.c, example.c +- Get rid of all those darn tabs +- Add "check" target to Makefile.in that does the same thing as "test" +- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in +- Update contrib/inflate86 [Anderson] +- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] +- Add msdos and win32 directories with makefiles [Truta] +- More additions and improvements to the FAQ + +Changes in 1.2.0 (9 March 2003) +- New and improved inflate code + - About 20% faster + - Does not allocate 32K window unless and until needed + - Automatically detects and decompresses gzip streams + - Raw inflate no longer needs an extra dummy byte at end + - Added inflateBack functions using a callback interface--even faster + than inflate, useful for file utilities (gzip, zip) + - Added inflateCopy() function to record state for random access on + externally generated deflate streams (e.g. in gzip files) + - More readable code (I hope) +- New and improved crc32() + - About 50% faster, thanks to suggestions from Rodney Brown +- Add deflateBound() and compressBound() functions +- Fix memory leak in deflateInit2() +- Permit setting dictionary for raw deflate (for parallel deflate) +- Fix const declaration for gzwrite() +- Check for some malloc() failures in gzio.c +- Fix bug in gzopen() on single-byte file 0x1f +- Fix bug in gzread() on concatenated file with 0x1f at end of buffer + and next buffer doesn't start with 0x8b +- Fix uncompress() to return Z_DATA_ERROR on truncated input +- Free memory at end of example.c +- Remove MAX #define in trees.c (conflicted with some libraries) +- Fix static const's in deflate.c, gzio.c, and zutil.[ch] +- Declare malloc() and free() in gzio.c if STDC not defined +- Use malloc() instead of calloc() in zutil.c if int big enough +- Define STDC for AIX +- Add aix/ with approach for compiling shared library on AIX +- Add HP-UX support for shared libraries in configure +- Add OpenUNIX support for shared libraries in configure +- Use $cc instead of gcc to build shared library +- Make prefix directory if needed when installing +- Correct Macintosh avoidance of typedef Byte in zconf.h +- Correct Turbo C memory allocation when under Linux +- Use libz.a instead of -lz in Makefile (assure use of compiled library) +- Update configure to check for snprintf or vsnprintf functions and their + return value, warn during make if using an insecure function +- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that + is lost when library is used--resolution is to build new zconf.h +- Documentation improvements (in zlib.h): + - Document raw deflate and inflate + - Update RFCs URL + - Point out that zlib and gzip formats are different + - Note that Z_BUF_ERROR is not fatal + - Document string limit for gzprintf() and possible buffer overflow + - Note requirement on avail_out when flushing + - Note permitted values of flush parameter of inflate() +- Add some FAQs (and even answers) to the FAQ +- Add contrib/inflate86/ for x86 faster inflate +- Add contrib/blast/ for PKWare Data Compression Library decompression +- Add contrib/puff/ simple inflate for deflate format description + +Changes in 1.1.4 (11 March 2002) +- ZFREE was repeated on same allocation on some error conditions. + This creates a security problem described in + http://www.zlib.org/advisory-2002-03-11.txt +- Returned incorrect error (Z_MEM_ERROR) on some invalid data +- Avoid accesses before window for invalid distances with inflate window + less than 32K. +- force windowBits > 8 to avoid a bug in the encoder for a window size + of 256 bytes. (A complete fix will be available in 1.1.5). + +Changes in 1.1.3 (9 July 1998) +- fix "an inflate input buffer bug that shows up on rare but persistent + occasions" (Mark) +- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) +- fix gzseek(..., SEEK_SET) in write mode +- fix crc check after a gzeek (Frank Faubert) +- fix miniunzip when the last entry in a zip file is itself a zip file + (J Lillge) +- add contrib/asm586 and contrib/asm686 (Brian Raiter) + See http://www.muppetlabs.com/~breadbox/software/assembly.html +- add support for Delphi 3 in contrib/delphi (Bob Dellaca) +- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) +- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) +- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) +- added a FAQ file + +- Support gzdopen on Mac with Metrowerks (Jason Linhart) +- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) +- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) +- avoid some warnings with Borland C (Tom Tanner) +- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) +- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) +- allow several arguments to configure (Tim Mooney, Frodo Looijaard) +- use libdir and includedir in Makefile.in (Tim Mooney) +- support shared libraries on OSF1 V4 (Tim Mooney) +- remove so_locations in "make clean" (Tim Mooney) +- fix maketree.c compilation error (Glenn, Mark) +- Python interface to zlib now in Python 1.5 (Jeremy Hylton) +- new Makefile.riscos (Rich Walker) +- initialize static descriptors in trees.c for embedded targets (Nick Smith) +- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) +- add the OS/2 files in Makefile.in too (Andrew Zabolotny) +- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) +- fix maketree.c to allow clean compilation of inffixed.h (Mark) +- fix parameter check in deflateCopy (Gunther Nikl) +- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) +- Many portability patches by Christian Spieler: + . zutil.c, zutil.h: added "const" for zmem* + . Make_vms.com: fixed some typos + . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists + . msdos/Makefile.msc: remove "default rtl link library" info from obj files + . msdos/Makefile.*: use model-dependent name for the built zlib library + . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: + new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) +- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) +- replace __far with _far for better portability (Christian Spieler, Tom Lane) +- fix test for errno.h in configure (Tim Newsham) + +Changes in 1.1.2 (19 March 98) +- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) + See http://www.winimage.com/zLibDll/unzip.html +- preinitialize the inflate tables for fixed codes, to make the code + completely thread safe (Mark) +- some simplifications and slight speed-up to the inflate code (Mark) +- fix gzeof on non-compressed files (Allan Schrum) +- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) +- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) +- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) +- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) +- do not wrap extern "C" around system includes (Tom Lane) +- mention zlib binding for TCL in README (Andreas Kupries) +- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) +- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) +- allow "configure --prefix $HOME" (Tim Mooney) +- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) +- move Makefile.sas to amiga/Makefile.sas + +Changes in 1.1.1 (27 Feb 98) +- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) +- remove block truncation heuristic which had very marginal effect for zlib + (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the + compression ratio on some files. This also allows inlining _tr_tally for + matches in deflate_slow. +- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) + +Changes in 1.1.0 (24 Feb 98) +- do not return STREAM_END prematurely in inflate (John Bowler) +- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) +- compile with -DFASTEST to get compression code optimized for speed only +- in minigzip, try mmap'ing the input file first (Miguel Albrecht) +- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain + on Sun but significant on HP) + +- add a pointer to experimental unzip library in README (Gilles Vollant) +- initialize variable gcc in configure (Chris Herborth) + +Changes in 1.0.9 (17 Feb 1998) +- added gzputs and gzgets functions +- do not clear eof flag in gzseek (Mark Diekhans) +- fix gzseek for files in transparent mode (Mark Diekhans) +- do not assume that vsprintf returns the number of bytes written (Jens Krinke) +- replace EXPORT with ZEXPORT to avoid conflict with other programs +- added compress2 in zconf.h, zlib.def, zlib.dnt +- new asm code from Gilles Vollant in contrib/asm386 +- simplify the inflate code (Mark): + . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() + . ZALLOC the length list in inflate_trees_fixed() instead of using stack + . ZALLOC the value area for huft_build() instead of using stack + . Simplify Z_FINISH check in inflate() + +- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 +- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) +- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with + the declaration of FAR (Gilles VOllant) +- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) +- read_buf buf parameter of type Bytef* instead of charf* +- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) +- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) +- fix check for presence of directories in "make install" (Ian Willis) + +Changes in 1.0.8 (27 Jan 1998) +- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) +- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) +- added compress2() to allow setting the compression level +- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) +- use constant arrays for the static trees in trees.c instead of computing + them at run time (thanks to Ken Raeburn for this suggestion). To create + trees.h, compile with GEN_TREES_H and run "make test". +- check return code of example in "make test" and display result +- pass minigzip command line options to file_compress +- simplifying code of inflateSync to avoid gcc 2.8 bug + +- support CC="gcc -Wall" in configure -s (QingLong) +- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) +- fix test for shared library support to avoid compiler warnings +- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) +- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) +- do not use fdopen for Metrowerks on Mac (Brad Pettit)) +- add checks for gzputc and gzputc in example.c +- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) +- use const for the CRC table (Ken Raeburn) +- fixed "make uninstall" for shared libraries +- use Tracev instead of Trace in infblock.c +- in example.c use correct compressed length for test_sync +- suppress +vnocompatwarnings in configure for HPUX (not always supported) + +Changes in 1.0.7 (20 Jan 1998) +- fix gzseek which was broken in write mode +- return error for gzseek to negative absolute position +- fix configure for Linux (Chun-Chung Chen) +- increase stack space for MSC (Tim Wegner) +- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) +- define EXPORTVA for gzprintf (Gilles Vollant) +- added man page zlib.3 (Rick Rodgers) +- for contrib/untgz, fix makedir() and improve Makefile + +- check gzseek in write mode in example.c +- allocate extra buffer for seeks only if gzseek is actually called +- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) +- add inflateSyncPoint in zconf.h +- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def + +Changes in 1.0.6 (19 Jan 1998) +- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and + gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) +- Fix a deflate bug occurring only with compression level 0 (thanks to + Andy Buckler for finding this one). +- In minigzip, pass transparently also the first byte for .Z files. +- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() +- check Z_FINISH in inflate (thanks to Marc Schluper) +- Implement deflateCopy (thanks to Adam Costello) +- make static libraries by default in configure, add --shared option. +- move MSDOS or Windows specific files to directory msdos +- suppress the notion of partial flush to simplify the interface + (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) +- suppress history buffer provided by application to simplify the interface + (this feature was not implemented anyway in 1.0.4) +- next_in and avail_in must be initialized before calling inflateInit or + inflateInit2 +- add EXPORT in all exported functions (for Windows DLL) +- added Makefile.nt (thanks to Stephen Williams) +- added the unsupported "contrib" directory: + contrib/asm386/ by Gilles Vollant + 386 asm code replacing longest_match(). + contrib/iostream/ by Kevin Ruland + A C++ I/O streams interface to the zlib gz* functions + contrib/iostream2/ by Tyge Løvset + Another C++ I/O streams interface + contrib/untgz/ by "Pedro A. Aranda Guti\irrez" + A very simple tar.gz file extractor using zlib + contrib/visual-basic.txt by Carlos Rios + How to use compress(), uncompress() and the gz* functions from VB. +- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression + level) in minigzip (thanks to Tom Lane) + +- use const for rommable constants in deflate +- added test for gzseek and gztell in example.c +- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) +- add undocumented function zError to convert error code to string + (for Tim Smithers) +- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. +- Use default memcpy for Symantec MSDOS compiler. +- Add EXPORT keyword for check_func (needed for Windows DLL) +- add current directory to LD_LIBRARY_PATH for "make test" +- create also a link for libz.so.1 +- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) +- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) +- added -soname for Linux in configure (Chun-Chung Chen, +- assign numbers to the exported functions in zlib.def (for Windows DLL) +- add advice in zlib.h for best usage of deflateSetDictionary +- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) +- allow compilation with ANSI keywords only enabled for TurboC in large model +- avoid "versionString"[0] (Borland bug) +- add NEED_DUMMY_RETURN for Borland +- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). +- allow compilation with CC +- defined STDC for OS/2 (David Charlap) +- limit external names to 8 chars for MVS (Thomas Lund) +- in minigzip.c, use static buffers only for 16-bit systems +- fix suffix check for "minigzip -d foo.gz" +- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) +- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) +- added makelcc.bat for lcc-win32 (Tom St Denis) +- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) +- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- check for unistd.h in configure (for off_t) +- remove useless check parameter in inflate_blocks_free +- avoid useless assignment of s->check to itself in inflate_blocks_new +- do not flush twice in gzclose (thanks to Ken Raeburn) +- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h +- use NO_ERRNO_H instead of enumeration of operating systems with errno.h +- work around buggy fclose on pipes for HP/UX +- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) +- fix configure if CC is already equal to gcc + +Changes in 1.0.5 (3 Jan 98) +- Fix inflate to terminate gracefully when fed corrupted or invalid data +- Use const for rommable constants in inflate +- Eliminate memory leaks on error conditions in inflate +- Removed some vestigial code in inflate +- Update web address in README + +Changes in 1.0.4 (24 Jul 96) +- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF + bit, so the decompressor could decompress all the correct data but went + on to attempt decompressing extra garbage data. This affected minigzip too. +- zlibVersion and gzerror return const char* (needed for DLL) +- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) +- use z_error only for DEBUG (avoid problem with DLLs) + +Changes in 1.0.3 (2 Jul 96) +- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS + small and medium models; this makes the library incompatible with previous + versions for these models. (No effect in large model or on other systems.) +- return OK instead of BUF_ERROR if previous deflate call returned with + avail_out as zero but there is nothing to do +- added memcmp for non STDC compilers +- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) +- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) +- better check for 16-bit mode MSC (avoids problem with Symantec) + +Changes in 1.0.2 (23 May 96) +- added Windows DLL support +- added a function zlibVersion (for the DLL support) +- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) +- Bytef is define's instead of typedef'd only for Borland C +- avoid reading uninitialized memory in example.c +- mention in README that the zlib format is now RFC1950 +- updated Makefile.dj2 +- added algorithm.doc + +Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] +- fix array overlay in deflate.c which sometimes caused bad compressed data +- fix inflate bug with empty stored block +- fix MSDOS medium model which was broken in 0.99 +- fix deflateParams() which could generate bad compressed data. +- Bytef is define'd instead of typedef'ed (work around Borland bug) +- added an INDEX file +- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), + Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) +- speed up adler32 for modern machines without auto-increment +- added -ansi for IRIX in configure +- static_init_done in trees.c is an int +- define unlink as delete for VMS +- fix configure for QNX +- add configure branch for SCO and HPUX +- avoid many warnings (unused variables, dead assignments, etc...) +- no fdopen for BeOS +- fix the Watcom fix for 32 bit mode (define FAR as empty) +- removed redefinition of Byte for MKWERKS +- work around an MWKERKS bug (incorrect merge of all .h files) + +Changes in 0.99 (27 Jan 96) +- allow preset dictionary shared between compressor and decompressor +- allow compression level 0 (no compression) +- add deflateParams in zlib.h: allow dynamic change of compression level + and compression strategy. +- test large buffers and deflateParams in example.c +- add optional "configure" to build zlib as a shared library +- suppress Makefile.qnx, use configure instead +- fixed deflate for 64-bit systems (detected on Cray) +- fixed inflate_blocks for 64-bit systems (detected on Alpha) +- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) +- always return Z_BUF_ERROR when deflate() has nothing to do +- deflateInit and inflateInit are now macros to allow version checking +- prefix all global functions and types with z_ with -DZ_PREFIX +- make falloc completely reentrant (inftrees.c) +- fixed very unlikely race condition in ct_static_init +- free in reverse order of allocation to help memory manager +- use zlib-1.0/* instead of zlib/* inside the tar.gz +- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith + -Wconversion -Wstrict-prototypes -Wmissing-prototypes" +- allow gzread on concatenated .gz files +- deflateEnd now returns Z_DATA_ERROR if it was premature +- deflate is finally (?) fully deterministic (no matches beyond end of input) +- Document Z_SYNC_FLUSH +- add uninstall in Makefile +- Check for __cpluplus in zlib.h +- Better test in ct_align for partial flush +- avoid harmless warnings for Borland C++ +- initialize hash_head in deflate.c +- avoid warning on fdopen (gzio.c) for HP cc -Aa +- include stdlib.h for STDC compilers +- include errno.h for Cray +- ignore error if ranlib doesn't exist +- call ranlib twice for NeXTSTEP +- use exec_prefix instead of prefix for libz.a +- renamed ct_* as _tr_* to avoid conflict with applications +- clear z->msg in inflateInit2 before any error return +- initialize opaque in example.c, gzio.c, deflate.c and inflate.c +- fixed typo in zconf.h (_GNUC__ => __GNUC__) +- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) +- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) +- in fcalloc, normalize pointer if size > 65520 bytes +- don't use special fcalloc for 32 bit Borland C++ +- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... +- use Z_BINARY instead of BINARY +- document that gzclose after gzdopen will close the file +- allow "a" as mode in gzopen. +- fix error checking in gzread +- allow skipping .gz extra-field on pipes +- added reference to Perl interface in README +- put the crc table in FAR data (I dislike more and more the medium model :) +- added get_crc_table +- added a dimension to all arrays (Borland C can't count). +- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast +- guard against multiple inclusion of *.h (for precompiled header on Mac) +- Watcom C pretends to be Microsoft C small model even in 32 bit mode. +- don't use unsized arrays to avoid silly warnings by Visual C++: + warning C4746: 'inflate_mask' : unsized array treated as '__far' + (what's wrong with far data in far model?). +- define enum out of inflate_blocks_state to allow compilation with C++ + +Changes in 0.95 (16 Aug 95) +- fix MSDOS small and medium model (now easier to adapt to any compiler) +- inlined send_bits +- fix the final (:-) bug for deflate with flush (output was correct but + not completely flushed in rare occasions). +- default window size is same for compression and decompression + (it's now sufficient to set MAX_WBITS in zconf.h). +- voidp -> voidpf and voidnp -> voidp (for consistency with other + typedefs and because voidnp was not near in large model). + +Changes in 0.94 (13 Aug 95) +- support MSDOS medium model +- fix deflate with flush (could sometimes generate bad output) +- fix deflateReset (zlib header was incorrectly suppressed) +- added support for VMS +- allow a compression level in gzopen() +- gzflush now calls fflush +- For deflate with flush, flush even if no more input is provided. +- rename libgz.a as libz.a +- avoid complex expression in infcodes.c triggering Turbo C bug +- work around a problem with gcc on Alpha (in INSERT_STRING) +- don't use inline functions (problem with some gcc versions) +- allow renaming of Byte, uInt, etc... with #define. +- avoid warning about (unused) pointer before start of array in deflate.c +- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c +- avoid reserved word 'new' in trees.c + +Changes in 0.93 (25 June 95) +- temporarily disable inline functions +- make deflate deterministic +- give enough lookahead for PARTIAL_FLUSH +- Set binary mode for stdin/stdout in minigzip.c for OS/2 +- don't even use signed char in inflate (not portable enough) +- fix inflate memory leak for segmented architectures + +Changes in 0.92 (3 May 95) +- don't assume that char is signed (problem on SGI) +- Clear bit buffer when starting a stored block +- no memcpy on Pyramid +- suppressed inftest.c +- optimized fill_window, put longest_match inline for gcc +- optimized inflate on stored blocks. +- untabify all sources to simplify patches + +Changes in 0.91 (2 May 95) +- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h +- Document the memory requirements in zconf.h +- added "make install" +- fix sync search logic in inflateSync +- deflate(Z_FULL_FLUSH) now works even if output buffer too short +- after inflateSync, don't scare people with just "lo world" +- added support for DJGPP + +Changes in 0.9 (1 May 95) +- don't assume that zalloc clears the allocated memory (the TurboC bug + was Mark's bug after all :) +- let again gzread copy uncompressed data unchanged (was working in 0.71) +- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented +- added a test of inflateSync in example.c +- moved MAX_WBITS to zconf.h because users might want to change that. +- document explicitly that zalloc(64K) on MSDOS must return a normalized + pointer (zero offset) +- added Makefiles for Microsoft C, Turbo C, Borland C++ +- faster crc32() + +Changes in 0.8 (29 April 95) +- added fast inflate (inffast.c) +- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this + is incompatible with previous versions of zlib which returned Z_OK. +- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) + (actually that was not a compiler bug, see 0.81 above) +- gzread no longer reads one extra byte in certain cases +- In gzio destroy(), don't reference a freed structure +- avoid many warnings for MSDOS +- avoid the ERROR symbol which is used by MS Windows + +Changes in 0.71 (14 April 95) +- Fixed more MSDOS compilation problems :( There is still a bug with + TurboC large model. + +Changes in 0.7 (14 April 95) +- Added full inflate support. +- Simplified the crc32() interface. The pre- and post-conditioning + (one's complement) is now done inside crc32(). WARNING: this is + incompatible with previous versions; see zlib.h for the new usage. + +Changes in 0.61 (12 April 95) +- workaround for a bug in TurboC. example and minigzip now work on MSDOS. + +Changes in 0.6 (11 April 95) +- added minigzip.c +- added gzdopen to reopen a file descriptor as gzFile +- added transparent reading of non-gziped files in gzread. +- fixed bug in gzread (don't read crc as data) +- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose). +- don't allocate big arrays in the stack (for MSDOS) +- fix some MSDOS compilation problems + +Changes in 0.5: +- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but + not yet Z_FULL_FLUSH. +- support decompression but only in a single step (forced Z_FINISH) +- added opaque object for zalloc and zfree. +- added deflateReset and inflateReset +- added a variable zlib_version for consistency checking. +- renamed the 'filter' parameter of deflateInit2 as 'strategy'. + Added Z_FILTERED and Z_HUFFMAN_ONLY constants. + +Changes in 0.4: +- avoid "zip" everywhere, use zlib instead of ziplib. +- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush + if compression method == 8. +- added adler32 and crc32 +- renamed deflateOptions as deflateInit2, call one or the other but not both +- added the method parameter for deflateInit2. +- added inflateInit2 +- simplied considerably deflateInit and inflateInit by not supporting + user-provided history buffer. This is supported only in deflateInit2 + and inflateInit2. + +Changes in 0.3: +- prefix all macro names with Z_ +- use Z_FINISH instead of deflateEnd to finish compression. +- added Z_HUFFMAN_ONLY +- added gzerror() diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/FAQ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/FAQ new file mode 100644 index 000000000..99b7cf92e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/FAQ @@ -0,0 +1,368 @@ + + Frequently Asked Questions about zlib + + +If your question is not there, please check the zlib home page +http://zlib.net/ which may have more recent information. +The lastest zlib FAQ is at http://zlib.net/zlib_faq.html + + + 1. Is zlib Y2K-compliant? + + Yes. zlib doesn't handle dates. + + 2. Where can I get a Windows DLL version? + + The zlib sources can be compiled without change to produce a DLL. See the + file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the + precompiled DLL are found in the zlib web site at http://zlib.net/ . + + 3. Where can I get a Visual Basic interface to zlib? + + See + * http://marknelson.us/1997/01/01/zlib-engine/ + * win32/DLL_FAQ.txt in the zlib distribution + + 4. compress() returns Z_BUF_ERROR. + + Make sure that before the call of compress(), the length of the compressed + buffer is equal to the available size of the compressed buffer and not + zero. For Visual Basic, check that this parameter is passed by reference + ("as any"), not by value ("as long"). + + 5. deflate() or inflate() returns Z_BUF_ERROR. + + Before making the call, make sure that avail_in and avail_out are not zero. + When setting the parameter flush equal to Z_FINISH, also make sure that + avail_out is big enough to allow processing all pending input. Note that a + Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be + made with more input or output space. A Z_BUF_ERROR may in fact be + unavoidable depending on how the functions are used, since it is not + possible to tell whether or not there is more output pending when + strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a + heavily annotated example. + + 6. Where's the zlib documentation (man pages, etc.)? + + It's in zlib.h . Examples of zlib usage are in the files test/example.c + and test/minigzip.c, with more in examples/ . + + 7. Why don't you use GNU autoconf or libtool or ...? + + Because we would like to keep zlib as a very small and simple package. + zlib is rather portable and doesn't need much configuration. + + 8. I found a bug in zlib. + + Most of the time, such problems are due to an incorrect usage of zlib. + Please try to reproduce the problem with a small program and send the + corresponding source to us at zlib@gzip.org . Do not send multi-megabyte + data files without prior agreement. + + 9. Why do I get "undefined reference to gzputc"? + + If "make test" produces something like + + example.o(.text+0x154): undefined reference to `gzputc' + + check that you don't have old files libz.* in /usr/lib, /usr/local/lib or + /usr/X11R6/lib. Remove any old versions, then do "make install". + +10. I need a Delphi interface to zlib. + + See the contrib/delphi directory in the zlib distribution. + +11. Can zlib handle .zip archives? + + Not by itself, no. See the directory contrib/minizip in the zlib + distribution. + +12. Can zlib handle .Z files? + + No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt + the code of uncompress on your own. + +13. How can I make a Unix shared library? + + By default a shared (and a static) library is built for Unix. So: + + make distclean + ./configure + make + +14. How do I install a shared zlib library on Unix? + + After the above, then: + + make install + + However, many flavors of Unix come with a shared zlib already installed. + Before going to the trouble of compiling a shared version of zlib and + trying to install it, you may want to check if it's already there! If you + can #include , it's there. The -lz option will probably link to + it. You can check the version at the top of zlib.h or with the + ZLIB_VERSION symbol defined in zlib.h . + +15. I have a question about OttoPDF. + + We are not the authors of OttoPDF. The real author is on the OttoPDF web + site: Joel Hainley, jhainley@myndkryme.com. + +16. Can zlib decode Flate data in an Adobe PDF file? + + Yes. See http://www.pdflib.com/ . To modify PDF forms, see + http://sourceforge.net/projects/acroformtool/ . + +17. Why am I getting this "register_frame_info not found" error on Solaris? + + After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib + generates an error such as: + + ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: + symbol __register_frame_info: referenced symbol not found + + The symbol __register_frame_info is not part of zlib, it is generated by + the C compiler (cc or gcc). You must recompile applications using zlib + which have this problem. This problem is specific to Solaris. See + http://www.sunfreeware.com for Solaris versions of zlib and applications + using zlib. + +18. Why does gzip give an error on a file I make with compress/deflate? + + The compress and deflate functions produce data in the zlib format, which + is different and incompatible with the gzip format. The gz* functions in + zlib on the other hand use the gzip format. Both the zlib and gzip formats + use the same compressed data format internally, but have different headers + and trailers around the compressed data. + +19. Ok, so why are there two different formats? + + The gzip format was designed to retain the directory information about a + single file, such as the name and last modification date. The zlib format + on the other hand was designed for in-memory and communication channel + applications, and has a much more compact header and trailer and uses a + faster integrity check than gzip. + +20. Well that's nice, but how do I make a gzip file in memory? + + You can request that deflate write the gzip format instead of the zlib + format using deflateInit2(). You can also request that inflate decode the + gzip format using inflateInit2(). Read zlib.h for more details. + +21. Is zlib thread-safe? + + Yes. However any library routines that zlib uses and any application- + provided memory allocation routines must also be thread-safe. zlib's gz* + functions use stdio library routines, and most of zlib's functions use the + library memory allocation routines by default. zlib's *Init* functions + allow for the application to provide custom memory allocation routines. + + Of course, you should only operate on any given zlib or gzip stream from a + single thread at a time. + +22. Can I use zlib in my commercial application? + + Yes. Please read the license in zlib.h. + +23. Is zlib under the GNU license? + + No. Please read the license in zlib.h. + +24. The license says that altered source versions must be "plainly marked". So + what exactly do I need to do to meet that requirement? + + You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In + particular, the final version number needs to be changed to "f", and an + identification string should be appended to ZLIB_VERSION. Version numbers + x.x.x.f are reserved for modifications to zlib by others than the zlib + maintainers. For example, if the version of the base zlib you are altering + is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and + ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also + update the version strings in deflate.c and inftrees.c. + + For altered source distributions, you should also note the origin and + nature of the changes in zlib.h, as well as in ChangeLog and README, along + with the dates of the alterations. The origin should include at least your + name (or your company's name), and an email address to contact for help or + issues with the library. + + Note that distributing a compiled zlib library along with zlib.h and + zconf.h is also a source distribution, and so you should change + ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes + in zlib.h as you would for a full source distribution. + +25. Will zlib work on a big-endian or little-endian architecture, and can I + exchange compressed data between them? + + Yes and yes. + +26. Will zlib work on a 64-bit machine? + + Yes. It has been tested on 64-bit machines, and has no dependence on any + data types being limited to 32-bits in length. If you have any + difficulties, please provide a complete problem report to zlib@gzip.org + +27. Will zlib decompress data from the PKWare Data Compression Library? + + No. The PKWare DCL uses a completely different compressed data format than + does PKZIP and zlib. However, you can look in zlib's contrib/blast + directory for a possible solution to your problem. + +28. Can I access data randomly in a compressed stream? + + No, not without some preparation. If when compressing you periodically use + Z_FULL_FLUSH, carefully write all the pending data at those points, and + keep an index of those locations, then you can start decompression at those + points. You have to be careful to not use Z_FULL_FLUSH too often, since it + can significantly degrade compression. Alternatively, you can scan a + deflate stream once to generate an index, and then use that index for + random access. See examples/zran.c . + +29. Does zlib work on MVS, OS/390, CICS, etc.? + + It has in the past, but we have not heard of any recent evidence. There + were working ports of zlib 1.1.4 to MVS, but those links no longer work. + If you know of recent, successful applications of zlib on these operating + systems, please let us know. Thanks. + +30. Is there some simpler, easier to read version of inflate I can look at to + understand the deflate format? + + First off, you should read RFC 1951. Second, yes. Look in zlib's + contrib/puff directory. + +31. Does zlib infringe on any patents? + + As far as we know, no. In fact, that was originally the whole point behind + zlib. Look here for some more information: + + http://www.gzip.org/#faq11 + +32. Can zlib work with greater than 4 GB of data? + + Yes. inflate() and deflate() will process any amount of data correctly. + Each call of inflate() or deflate() is limited to input and output chunks + of the maximum value that can be stored in the compiler's "unsigned int" + type, but there is no limit to the number of chunks. Note however that the + strm.total_in and strm_total_out counters may be limited to 4 GB. These + counters are provided as a convenience and are not used internally by + inflate() or deflate(). The application can easily set up its own counters + updated after each call of inflate() or deflate() to count beyond 4 GB. + compress() and uncompress() may be limited to 4 GB, since they operate in a + single call. gzseek() and gztell() may be limited to 4 GB depending on how + zlib is compiled. See the zlibCompileFlags() function in zlib.h. + + The word "may" appears several times above since there is a 4 GB limit only + if the compiler's "long" type is 32 bits. If the compiler's "long" type is + 64 bits, then the limit is 16 exabytes. + +33. Does zlib have any security vulnerabilities? + + The only one that we are aware of is potentially in gzprintf(). If zlib is + compiled to use sprintf() or vsprintf(), then there is no protection + against a buffer overflow of an 8K string space (or other value as set by + gzbuffer()), other than the caller of gzprintf() assuring that the output + will not exceed 8K. On the other hand, if zlib is compiled to use + snprintf() or vsnprintf(), which should normally be the case, then there is + no vulnerability. The ./configure script will display warnings if an + insecure variation of sprintf() will be used by gzprintf(). Also the + zlibCompileFlags() function will return information on what variant of + sprintf() is used by gzprintf(). + + If you don't have snprintf() or vsnprintf() and would like one, you can + find a portable implementation here: + + http://www.ijs.si/software/snprintf/ + + Note that you should be using the most recent version of zlib. Versions + 1.1.3 and before were subject to a double-free vulnerability, and versions + 1.2.1 and 1.2.2 were subject to an access exception when decompressing + invalid compressed data. + +34. Is there a Java version of zlib? + + Probably what you want is to use zlib in Java. zlib is already included + as part of the Java SDK in the java.util.zip package. If you really want + a version of zlib written in the Java language, look on the zlib home + page for links: http://zlib.net/ . + +35. I get this or that compiler or source-code scanner warning when I crank it + up to maximally-pedantic. Can't you guys write proper code? + + Many years ago, we gave up attempting to avoid warnings on every compiler + in the universe. It just got to be a waste of time, and some compilers + were downright silly as well as contradicted each other. So now, we simply + make sure that the code always works. + +36. Valgrind (or some similar memory access checker) says that deflate is + performing a conditional jump that depends on an uninitialized value. + Isn't that a bug? + + No. That is intentional for performance reasons, and the output of deflate + is not affected. This only started showing up recently since zlib 1.2.x + uses malloc() by default for allocations, whereas earlier versions used + calloc(), which zeros out the allocated memory. Even though the code was + correct, versions 1.2.4 and later was changed to not stimulate these + checkers. + +37. Will zlib read the (insert any ancient or arcane format here) compressed + data format? + + Probably not. Look in the comp.compression FAQ for pointers to various + formats and associated software. + +38. How can I encrypt/decrypt zip files with zlib? + + zlib doesn't support encryption. The original PKZIP encryption is very + weak and can be broken with freely available programs. To get strong + encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib + compression. For PKZIP compatible "encryption", look at + http://www.info-zip.org/ + +39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? + + "gzip" is the gzip format, and "deflate" is the zlib format. They should + probably have called the second one "zlib" instead to avoid confusion with + the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 + correctly points to the zlib specification in RFC 1950 for the "deflate" + transfer encoding, there have been reports of servers and browsers that + incorrectly produce or expect raw deflate data per the deflate + specification in RFC 1951, most notably Microsoft. So even though the + "deflate" transfer encoding using the zlib format would be the more + efficient approach (and in fact exactly what the zlib format was designed + for), using the "gzip" transfer encoding is probably more reliable due to + an unfortunate choice of name on the part of the HTTP 1.1 authors. + + Bottom line: use the gzip format for HTTP 1.1 encoding. + +40. Does zlib support the new "Deflate64" format introduced by PKWare? + + No. PKWare has apparently decided to keep that format proprietary, since + they have not documented it as they have previous compression formats. In + any case, the compression improvements are so modest compared to other more + modern approaches, that it's not worth the effort to implement. + +41. I'm having a problem with the zip functions in zlib, can you help? + + There are no zip functions in zlib. You are probably using minizip by + Giles Vollant, which is found in the contrib directory of zlib. It is not + part of zlib. In fact none of the stuff in contrib is part of zlib. The + files in there are not supported by the zlib authors. You need to contact + the authors of the respective contribution for help. + +42. The match.asm code in contrib is under the GNU General Public License. + Since it's part of zlib, doesn't that mean that all of zlib falls under the + GNU GPL? + + No. The files in contrib are not part of zlib. They were contributed by + other authors and are provided as a convenience to the user within the zlib + distribution. Each item in contrib has its own license. + +43. Is zlib subject to export controls? What is its ECCN? + + zlib is not subject to export controls, and so is classified as EAR99. + +44. Can you please sign these lengthy legal documents and fax them back to us + so that we can use your software in our product? + + No. Go away. Shoo. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/INDEX b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/INDEX new file mode 100644 index 000000000..2ba064120 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/INDEX @@ -0,0 +1,68 @@ +CMakeLists.txt cmake build file +ChangeLog history of changes +FAQ Frequently Asked Questions about zlib +INDEX this file +Makefile dummy Makefile that tells you to ./configure +Makefile.in template for Unix Makefile +README guess what +configure configure script for Unix +make_vms.com makefile for VMS +test/example.c zlib usages examples for build testing +test/minigzip.c minimal gzip-like functionality for build testing +test/infcover.c inf*.c code coverage for build coverage testing +treebuild.xml XML description of source file dependencies +zconf.h.cmakein zconf.h template for cmake +zconf.h.in zconf.h template for configure +zlib.3 Man page for zlib +zlib.3.pdf Man page in PDF format +zlib.map Linux symbol information +zlib.pc.in Template for pkg-config descriptor +zlib.pc.cmakein zlib.pc template for cmake +zlib2ansi perl script to convert source files for C++ compilation + +amiga/ makefiles for Amiga SAS C +as400/ makefiles for AS/400 +doc/ documentation for formats and algorithms +msdos/ makefiles for MSDOS +nintendods/ makefile for Nintendo DS +old/ makefiles for various architectures and zlib documentation + files that have not yet been updated for zlib 1.2.x +qnx/ makefiles for QNX +watcom/ makefiles for OpenWatcom +win32/ makefiles for Windows + + zlib public header files (required for library use): +zconf.h +zlib.h + + private source files used to build the zlib library: +adler32.c +compress.c +crc32.c +crc32.h +deflate.c +deflate.h +gzclose.c +gzguts.h +gzlib.c +gzread.c +gzwrite.c +infback.c +inffast.c +inffast.h +inffixed.h +inflate.c +inflate.h +inftrees.c +inftrees.h +trees.c +trees.h +uncompr.c +zutil.c +zutil.h + + source files for sample programs +See examples/README.examples + + unsupported contributions by third parties +See contrib/README.contrib diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile new file mode 100644 index 000000000..6bba86c73 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile @@ -0,0 +1,5 @@ +all: + -@echo "Please use ./configure first. Thank you." + +distclean: + make -f Makefile.in distclean diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile.in b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile.in new file mode 100644 index 000000000..5a77949ff --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/Makefile.in @@ -0,0 +1,410 @@ +# Makefile for zlib +# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile and test, type: +# ./configure; make test +# Normally configure builds both a static and a shared library. +# If you want to build just a static library, use: ./configure --static + +# To use the asm code, type: +# cp contrib/asm?86/match.S ./match.S +# make LOC=-DASMV OBJA=match.o + +# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=cc + +CFLAGS=-O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-g -DZLIB_DEBUG +#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +# -Wstrict-prototypes -Wmissing-prototypes + +SFLAGS=-O +LDFLAGS= +TEST_LDFLAGS=-L. libz.a +LDSHARED=$(CC) +CPP=$(CC) -E + +STATICLIB=libz.a +SHAREDLIB=libz.so +SHAREDLIBV=libz.so.1.2.11 +SHAREDLIBM=libz.so.1 +LIBS=$(STATICLIB) $(SHAREDLIBV) + +AR=ar +ARFLAGS=rc +RANLIB=ranlib +LDCONFIG=ldconfig +LDSHAREDLIBC=-lc +TAR=tar +SHELL=/bin/sh +EXE= + +prefix = /usr/local +exec_prefix = ${prefix} +libdir = ${exec_prefix}/lib +sharedlibdir = ${libdir} +includedir = ${prefix}/include +mandir = ${prefix}/share/man +man3dir = ${mandir}/man3 +pkgconfigdir = ${libdir}/pkgconfig +SRCDIR= +ZINC= +ZINCOUT=-I. + +OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o +OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o +OBJC = $(OBJZ) $(OBJG) + +PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo +PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo +PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG) + +# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo +OBJA = +PIC_OBJA = + +OBJS = $(OBJC) $(OBJA) + +PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) + +all: static shared + +static: example$(EXE) minigzip$(EXE) + +shared: examplesh$(EXE) minigzipsh$(EXE) + +all64: example64$(EXE) minigzip64$(EXE) + +check: test + +test: all teststatic testshared + +teststatic: static + @TMPST=tmpst_$$; \ + if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \ + echo ' *** zlib test OK ***'; \ + else \ + echo ' *** zlib test FAILED ***'; false; \ + fi; \ + rm -f $$TMPST + +testshared: shared + @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ + DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ + SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ + TMPSH=tmpsh_$$; \ + if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \ + echo ' *** zlib shared test OK ***'; \ + else \ + echo ' *** zlib shared test FAILED ***'; false; \ + fi; \ + rm -f $$TMPSH + +test64: all64 + @TMP64=tmp64_$$; \ + if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \ + echo ' *** zlib 64-bit test OK ***'; \ + else \ + echo ' *** zlib 64-bit test FAILED ***'; false; \ + fi; \ + rm -f $$TMP64 + +infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h + $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c + +infcover: infcover.o libz.a + $(CC) $(CFLAGS) -o $@ infcover.o libz.a + +cover: infcover + rm -f *.gcda + ./infcover + gcov inf*.c + +libz.a: $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 + +match.o: match.S + $(CPP) match.S > _match.s + $(CC) -c _match.s + mv _match.o match.o + rm -f _match.s + +match.lo: match.S + $(CPP) match.S > _match.s + $(CC) -c -fPIC _match.s + mv _match.o match.lo + rm -f _match.s + +example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h + $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/example.c + +minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h + $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c + +example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h + $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c + +minigzip64.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h + $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/minigzip.c + + +adler32.o: $(SRCDIR)adler32.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)adler32.c + +crc32.o: $(SRCDIR)crc32.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)crc32.c + +deflate.o: $(SRCDIR)deflate.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)deflate.c + +infback.o: $(SRCDIR)infback.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)infback.c + +inffast.o: $(SRCDIR)inffast.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inffast.c + +inflate.o: $(SRCDIR)inflate.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inflate.c + +inftrees.o: $(SRCDIR)inftrees.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inftrees.c + +trees.o: $(SRCDIR)trees.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)trees.c + +zutil.o: $(SRCDIR)zutil.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)zutil.c + +compress.o: $(SRCDIR)compress.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)compress.c + +uncompr.o: $(SRCDIR)uncompr.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)uncompr.c + +gzclose.o: $(SRCDIR)gzclose.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzclose.c + +gzlib.o: $(SRCDIR)gzlib.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzlib.c + +gzread.o: $(SRCDIR)gzread.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzread.c + +gzwrite.o: $(SRCDIR)gzwrite.c + $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzwrite.c + + +adler32.lo: $(SRCDIR)adler32.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/adler32.o $(SRCDIR)adler32.c + -@mv objs/adler32.o $@ + +crc32.lo: $(SRCDIR)crc32.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/crc32.o $(SRCDIR)crc32.c + -@mv objs/crc32.o $@ + +deflate.lo: $(SRCDIR)deflate.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/deflate.o $(SRCDIR)deflate.c + -@mv objs/deflate.o $@ + +infback.lo: $(SRCDIR)infback.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/infback.o $(SRCDIR)infback.c + -@mv objs/infback.o $@ + +inffast.lo: $(SRCDIR)inffast.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inffast.o $(SRCDIR)inffast.c + -@mv objs/inffast.o $@ + +inflate.lo: $(SRCDIR)inflate.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inflate.o $(SRCDIR)inflate.c + -@mv objs/inflate.o $@ + +inftrees.lo: $(SRCDIR)inftrees.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inftrees.o $(SRCDIR)inftrees.c + -@mv objs/inftrees.o $@ + +trees.lo: $(SRCDIR)trees.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/trees.o $(SRCDIR)trees.c + -@mv objs/trees.o $@ + +zutil.lo: $(SRCDIR)zutil.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/zutil.o $(SRCDIR)zutil.c + -@mv objs/zutil.o $@ + +compress.lo: $(SRCDIR)compress.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/compress.o $(SRCDIR)compress.c + -@mv objs/compress.o $@ + +uncompr.lo: $(SRCDIR)uncompr.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/uncompr.o $(SRCDIR)uncompr.c + -@mv objs/uncompr.o $@ + +gzclose.lo: $(SRCDIR)gzclose.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzclose.o $(SRCDIR)gzclose.c + -@mv objs/gzclose.o $@ + +gzlib.lo: $(SRCDIR)gzlib.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzlib.o $(SRCDIR)gzlib.c + -@mv objs/gzlib.o $@ + +gzread.lo: $(SRCDIR)gzread.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzread.o $(SRCDIR)gzread.c + -@mv objs/gzread.o $@ + +gzwrite.lo: $(SRCDIR)gzwrite.c + -@mkdir objs 2>/dev/null || test -d objs + $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzwrite.o $(SRCDIR)gzwrite.c + -@mv objs/gzwrite.o $@ + + +placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a + $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) + ln -s $@ $(SHAREDLIBM) + -@rmdir objs + +example$(EXE): example.o $(STATICLIB) + $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) + +minigzip$(EXE): minigzip.o $(STATICLIB) + $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) + +examplesh$(EXE): example.o $(SHAREDLIBV) + $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) + +minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) + $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) + +example64$(EXE): example64.o $(STATICLIB) + $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) + +minigzip64$(EXE): minigzip64.o $(STATICLIB) + $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) + +install-libs: $(LIBS) + -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi + -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi + -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi + -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi + -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi + rm -f $(DESTDIR)$(libdir)/$(STATICLIB) + cp $(STATICLIB) $(DESTDIR)$(libdir) + chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB) + -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1 + -@if test -n "$(SHAREDLIBV)"; then \ + rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ + cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ + echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \ + chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ + echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \ + rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ + ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \ + ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ + ($(LDCONFIG) || true) >/dev/null 2>&1; \ + fi + rm -f $(DESTDIR)$(man3dir)/zlib.3 + cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir) + chmod 644 $(DESTDIR)$(man3dir)/zlib.3 + rm -f $(DESTDIR)$(pkgconfigdir)/zlib.pc + cp zlib.pc $(DESTDIR)$(pkgconfigdir) + chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc +# The ranlib in install is needed on NeXTSTEP which checks file times +# ldconfig is for Linux + +install: install-libs + -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi + rm -f $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h + cp $(SRCDIR)zlib.h zconf.h $(DESTDIR)$(includedir) + chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h + +uninstall: + cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h + cd $(DESTDIR)$(libdir) && rm -f libz.a; \ + if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ + rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ + fi + cd $(DESTDIR)$(man3dir) && rm -f zlib.3 + cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc + +docs: zlib.3.pdf + +zlib.3.pdf: $(SRCDIR)zlib.3 + groff -mandoc -f H -T ps $(SRCDIR)zlib.3 | ps2pdf - $@ + +zconf.h.cmakein: $(SRCDIR)zconf.h.in + -@ TEMPFILE=zconfh_$$; \ + echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\ + sed -f $$TEMPFILE $(SRCDIR)zconf.h.in > $@ &&\ + touch -r $(SRCDIR)zconf.h.in $@ &&\ + rm $$TEMPFILE + +zconf: $(SRCDIR)zconf.h.in + cp -p $(SRCDIR)zconf.h.in zconf.h + +mostlyclean: clean +clean: + rm -f *.o *.lo *~ \ + example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ + example64$(EXE) minigzip64$(EXE) \ + infcover \ + libz.* foo.gz so_locations \ + _match.s maketree contrib/infback9/*.o + rm -rf objs + rm -f *.gcda *.gcno *.gcov + rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov + +maintainer-clean: distclean +distclean: clean zconf zconf.h.cmakein docs + rm -f Makefile zlib.pc configure.log + -@rm -f .DS_Store + @if [ -f Makefile.in ]; then \ + printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \ + printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \ + touch -r $(SRCDIR)Makefile.in Makefile ; fi + @if [ ! -f zconf.h.in ]; then rm -f zconf.h zconf.h.cmakein ; fi + @if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf ; fi + +tags: + etags $(SRCDIR)*.[ch] + +adler32.o zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h +gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h +compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h +crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h +deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h +infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h +inffast.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h +inftrees.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h +trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h + +adler32.lo zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h +gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h +compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h +crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h +deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h +infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h +inffast.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h +inftrees.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h +trees.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/README new file mode 100644 index 000000000..51106de47 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/README @@ -0,0 +1,115 @@ +ZLIB DATA COMPRESSION LIBRARY + +zlib 1.2.11 is a general purpose data compression library. All the code is +thread safe. The data format used by the zlib library is described by RFCs +(Request for Comments) 1950 to 1952 in the files +http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and +rfc1952 (gzip format). + +All functions of the compression library are documented in the file zlib.h +(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example +of the library is given in the file test/example.c which also tests that +the library is working correctly. Another example is given in the file +test/minigzip.c. The compression library itself is composed of all source +files in the root directory. + +To compile all files and run the test program, follow the instructions given at +the top of Makefile.in. In short "./configure; make test", and if that goes +well, "make install" should work for most flavors of Unix. For Windows, use +one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +make_vms.com. + +Questions about zlib should be sent to , or to Gilles Vollant + for the Windows DLL version. The zlib home page is +http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. + +PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. + +Mark Nelson wrote an article about zlib for the Jan. 1997 +issue of Dr. Dobb's Journal; a copy of the article is available at +http://marknelson.us/1997/01/01/zlib-engine/ . + +The changes made in version 1.2.11 are documented in the file ChangeLog. + +Unsupported third party contributions are provided in directory contrib/ . + +zlib is available in Java using the java.util.zip package, documented at +http://java.sun.com/developer/technicalArticles/Programming/compression/ . + +A Perl interface to zlib written by Paul Marquess is available +at CPAN (Comprehensive Perl Archive Network) sites, including +http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . + +A Python interface to zlib written by A.M. Kuchling is +available in Python 1.5 and later versions, see +http://docs.python.org/library/zlib.html . + +zlib is built into tcl: http://wiki.tcl.tk/4610 . + +An experimental package to read and write files in .zip format, written on top +of zlib by Gilles Vollant , is available in the +contrib/minizip directory of zlib. + + +Notes for some targets: + +- For Windows DLL versions, please see win32/DLL_FAQ.txt + +- For 64-bit Irix, deflate.c must be compiled without any optimization. With + -O, one libpng test fails. The test works in 32 bit mode (with the -n32 + compiler flag). The compiler bug has been reported to SGI. + +- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works + when compiled with cc. + +- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is + necessary to get gzprintf working correctly. This is done by configure. + +- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with + other compilers. Use "make test" to check your compiler. + +- gzdopen is not supported on RISCOS or BEOS. + +- For PalmOs, see http://palmzlib.sourceforge.net/ + + +Acknowledgments: + + The deflate format used by zlib was defined by Phil Katz. The deflate and + zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; they + are too numerous to cite here. + +Copyright notice: + + (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/adler32.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/adler32.c new file mode 100644 index 000000000..d0be4380a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/adler32.c @@ -0,0 +1,186 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2011, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" + +local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); + +#define BASE 65521U /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* use NO_DIVIDE if your processor does not do division in hardware -- + try it both ways to see which is faster */ +#ifdef NO_DIVIDE +/* note that this assumes BASE is 65521, where 65536 % 65521 == 15 + (thank you to John Reiser for pointing this out) */ +# define CHOP(a) \ + do { \ + unsigned long tmp = a >> 16; \ + a &= 0xffffUL; \ + a += (tmp << 4) - tmp; \ + } while (0) +# define MOD28(a) \ + do { \ + CHOP(a); \ + if (a >= BASE) a -= BASE; \ + } while (0) +# define MOD(a) \ + do { \ + CHOP(a); \ + MOD28(a); \ + } while (0) +# define MOD63(a) \ + do { /* this assumes a is not negative */ \ + z_off64_t tmp = a >> 32; \ + a &= 0xffffffffL; \ + a += (tmp << 8) - (tmp << 5) + tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + if (a >= BASE) a -= BASE; \ + } while (0) +#else +# define MOD(a) a %= BASE +# define MOD28(a) a %= BASE +# define MOD63(a) a %= BASE +#endif + +/* ========================================================================= */ +uLong ZEXPORT adler32_z(adler, buf, len) + uLong adler; + const Bytef *buf; + z_size_t len; +{ + unsigned long sum2; + unsigned n; + + /* split Adler-32 into component sums */ + sum2 = (adler >> 16) & 0xffff; + adler &= 0xffff; + + /* in case user likes doing a byte at a time, keep it fast */ + if (len == 1) { + adler += buf[0]; + if (adler >= BASE) + adler -= BASE; + sum2 += adler; + if (sum2 >= BASE) + sum2 -= BASE; + return adler | (sum2 << 16); + } + + /* initial Adler-32 value (deferred check for len == 1 speed) */ + if (buf == Z_NULL) + return 1L; + + /* in case short lengths are provided, keep it somewhat fast */ + if (len < 16) { + while (len--) { + adler += *buf++; + sum2 += adler; + } + if (adler >= BASE) + adler -= BASE; + MOD28(sum2); /* only added so many BASE's */ + return adler | (sum2 << 16); + } + + /* do length NMAX blocks -- requires just one modulo operation */ + while (len >= NMAX) { + len -= NMAX; + n = NMAX / 16; /* NMAX is divisible by 16 */ + do { + DO16(buf); /* 16 sums unrolled */ + buf += 16; + } while (--n); + MOD(adler); + MOD(sum2); + } + + /* do remaining bytes (less than NMAX, still just one modulo) */ + if (len) { /* avoid modulos if none remaining */ + while (len >= 16) { + len -= 16; + DO16(buf); + buf += 16; + } + while (len--) { + adler += *buf++; + sum2 += adler; + } + MOD(adler); + MOD(sum2); + } + + /* return recombined sums */ + return adler | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + return adler32_z(adler, buf, len); +} + +/* ========================================================================= */ +local uLong adler32_combine_(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + unsigned long sum1; + unsigned long sum2; + unsigned rem; + + /* for negative len, return invalid adler32 as a clue for debugging */ + if (len2 < 0) + return 0xffffffffUL; + + /* the derivation of this formula is left as an exercise for the reader */ + MOD63(len2); /* assumes len2 >= 0 */ + rem = (unsigned)len2; + sum1 = adler1 & 0xffff; + sum2 = rem * sum1; + MOD(sum2); + sum1 += (adler2 & 0xffff) + BASE - 1; + sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; + return sum1 | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.pup b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.pup new file mode 100644 index 000000000..8940c120f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.pup @@ -0,0 +1,69 @@ +# Amiga powerUP (TM) Makefile +# makefile for libpng and SAS C V6.58/7.00 PPC compiler +# Copyright (C) 1998 by Andreas R. Kleinert + +LIBNAME = libzip.a + +CC = scppc +CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \ + OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER +AR = ppc-amigaos-ar cr +RANLIB = ppc-amigaos-ranlib +LD = ppc-amigaos-ld -r +LDFLAGS = -o +LDLIBS = LIB:scppc.a LIB:end.o +RM = delete quiet + +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: example minigzip + +check: test +test: all + example + echo hello world | minigzip | minigzip -d + +$(LIBNAME): $(OBJS) + $(AR) $@ $(OBJS) + -$(RANLIB) $@ + +example: example.o $(LIBNAME) + $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS) + +minigzip: minigzip.o $(LIBNAME) + $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS) + +mostlyclean: clean +clean: + $(RM) *.o example minigzip $(LIBNAME) foo.gz + +zip: + zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \ + descrip.mms *.[ch] + +tgz: + cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ + zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch] + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzclose.o: zlib.h zconf.h gzguts.h +gzlib.o: zlib.h zconf.h gzguts.h +gzread.o: zlib.h zconf.h gzguts.h +gzwrite.o: zlib.h zconf.h gzguts.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.sas b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.sas new file mode 100644 index 000000000..749e29152 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/amiga/Makefile.sas @@ -0,0 +1,68 @@ +# SMakefile for zlib +# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly +# Osma Ahvenlampi +# Amiga, SAS/C 6.56 & Smake + +CC=sc +CFLAGS=OPT +#CFLAGS=OPT CPU=68030 +#CFLAGS=DEBUG=LINE +LDFLAGS=LIB z.lib + +SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \ + NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \ + DEF=POSTINC + +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: SCOPTIONS example minigzip + +check: test +test: all + example + echo hello world | minigzip | minigzip -d + +install: z.lib + copy clone zlib.h zconf.h INCLUDE: + copy clone z.lib LIB: + +z.lib: $(OBJS) + oml z.lib r $(OBJS) + +example: example.o z.lib + $(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS) + +minigzip: minigzip.o z.lib + $(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS) + +mostlyclean: clean +clean: + -delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS + +SCOPTIONS: Makefile.sas + copy to $@ (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; + sourceLen -= stream.avail_in; + } + err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); + } while (err == Z_OK); + + *destLen = stream.total_out; + deflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : err; +} + +/* =========================================================================== + */ +int ZEXPORT compress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); +} + +/* =========================================================================== + If the default memLevel or windowBits for deflateInit() is changed, then + this function needs to be updated. + */ +uLong ZEXPORT compressBound (sourceLen) + uLong sourceLen; +{ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/configure b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/configure new file mode 100644 index 000000000..e974d1fd7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/configure @@ -0,0 +1,921 @@ +#!/bin/sh +# configure script for zlib. +# +# Normally configure builds both a static and a shared library. +# If you want to build just a static library, use: ./configure --static +# +# To impose specific compiler or flags or install directory, use for example: +# prefix=$HOME CC=cc CFLAGS="-O4" ./configure +# or for csh/tcsh users: +# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) + +# Incorrect settings of CC or CFLAGS may prevent creating a shared library. +# If you have problems, try without defining CC and CFLAGS before reporting +# an error. + +# start off configure.log +echo -------------------- >> configure.log +echo $0 $* >> configure.log +date >> configure.log + +# get source directory +SRCDIR=`dirname $0` +if test $SRCDIR = "."; then + ZINC="" + ZINCOUT="-I." + SRCDIR="" +else + ZINC='-include zconf.h' + ZINCOUT='-I. -I$(SRCDIR)' + SRCDIR="$SRCDIR/" +fi + +# set command prefix for cross-compilation +if [ -n "${CHOST}" ]; then + uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`" + CROSS_PREFIX="${CHOST}-" +fi + +# destination name for static library +STATICLIB=libz.a + +# extract zlib version numbers from zlib.h +VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` +VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < ${SRCDIR}zlib.h` +VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` +VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` + +# establish commands for library building +if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then + AR=${AR-"${CROSS_PREFIX}ar"} + test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log +else + AR=${AR-"ar"} + test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log +fi +ARFLAGS=${ARFLAGS-"rc"} +if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then + RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} + test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log +else + RANLIB=${RANLIB-"ranlib"} +fi +if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then + NM=${NM-"${CROSS_PREFIX}nm"} + test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log +else + NM=${NM-"nm"} +fi + +# set defaults before processing command line options +LDCONFIG=${LDCONFIG-"ldconfig"} +LDSHAREDLIBC="${LDSHAREDLIBC--lc}" +ARCHS= +prefix=${prefix-/usr/local} +exec_prefix=${exec_prefix-'${prefix}'} +libdir=${libdir-'${exec_prefix}/lib'} +sharedlibdir=${sharedlibdir-'${libdir}'} +includedir=${includedir-'${prefix}/include'} +mandir=${mandir-'${prefix}/share/man'} +shared_ext='.so' +shared=1 +solo=0 +cover=0 +zprefix=0 +zconst=0 +build64=0 +gcc=0 +warn=0 +debug=0 +old_cc="$CC" +old_cflags="$CFLAGS" +OBJC='$(OBJZ) $(OBJG)' +PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)' + +# leave this script, optionally in a bad way +leave() +{ + if test "$*" != "0"; then + echo "** $0 aborting." | tee -a configure.log + fi + rm -f $test.[co] $test $test$shared_ext $test.gcno ./--version + echo -------------------- >> configure.log + echo >> configure.log + echo >> configure.log + exit $1 +} + +# process command line options +while test $# -ge 1 +do +case "$1" in + -h* | --help) + echo 'usage:' | tee -a configure.log + echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log + echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log + echo ' [--includedir=INCLUDEDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log + exit 0 ;; + -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;; + -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;; + -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;; + --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/.*=//'`; shift ;; + -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;; + -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;; + -p* | --prefix) prefix="$2"; shift; shift ;; + -e* | --eprefix) exec_prefix="$2"; shift; shift ;; + -l* | --libdir) libdir="$2"; shift; shift ;; + -i* | --includedir) includedir="$2"; shift; shift ;; + -s* | --shared | --enable-shared) shared=1; shift ;; + -t | --static) shared=0; shift ;; + --solo) solo=1; shift ;; + --cover) cover=1; shift ;; + -z* | --zprefix) zprefix=1; shift ;; + -6* | --64) build64=1; shift ;; + -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; + --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; + --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; + -c* | --const) zconst=1; shift ;; + -w* | --warn) warn=1; shift ;; + -d* | --debug) debug=1; shift ;; + *) + echo "unknown option: $1" | tee -a configure.log + echo "$0 --help for help" | tee -a configure.log + leave 1;; + esac +done + +# temporary file name +test=ztest$$ + +# put arguments in log, also put test file in log if used in arguments +show() +{ + case "$*" in + *$test.c*) + echo === $test.c === >> configure.log + cat $test.c >> configure.log + echo === >> configure.log;; + esac + echo $* >> configure.log +} + +# check for gcc vs. cc and set compile and link flags based on the system identified by uname +cat > $test.c <&1` in + *gcc*) gcc=1 ;; + *clang*) gcc=1 ;; +esac + +show $cc -c $test.c +if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then + echo ... using gcc >> configure.log + CC="$cc" + CFLAGS="${CFLAGS--O3}" + SFLAGS="${CFLAGS--O3} -fPIC" + if test "$ARCHS"; then + CFLAGS="${CFLAGS} ${ARCHS}" + LDFLAGS="${LDFLAGS} ${ARCHS}" + fi + if test $build64 -eq 1; then + CFLAGS="${CFLAGS} -m64" + SFLAGS="${SFLAGS} -m64" + fi + if test "$warn" -eq 1; then + if test "$zconst" -eq 1; then + CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST" + else + CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" + fi + fi + if test $debug -eq 1; then + CFLAGS="${CFLAGS} -DZLIB_DEBUG" + SFLAGS="${SFLAGS} -DZLIB_DEBUG" + fi + if test -z "$uname"; then + uname=`(uname -s || echo unknown) 2>/dev/null` + fi + case "$uname" in + Linux* | linux* | GNU | GNU/* | solaris*) + LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;; + *BSD | *bsd* | DragonFly) + LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} + LDCONFIG="ldconfig -m" ;; + CYGWIN* | Cygwin* | cygwin* | OS/2*) + EXE='.exe' ;; + MINGW* | mingw*) +# temporary bypass + rm -f $test.[co] $test $test$shared_ext + echo "Please use win32/Makefile.gcc instead." | tee -a configure.log + leave 1 + LDSHARED=${LDSHARED-"$cc -shared"} + LDSHAREDLIBC="" + EXE='.exe' ;; + QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 + # (alain.bonnefoy@icbt.com) + LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;; + HP-UX*) + LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} + case `(uname -m || echo unknown) 2>/dev/null` in + ia64) + shared_ext='.so' + SHAREDLIB='libz.so' ;; + *) + shared_ext='.sl' + SHAREDLIB='libz.sl' ;; + esac ;; + Darwin* | darwin*) + shared_ext='.dylib' + SHAREDLIB=libz$shared_ext + SHAREDLIBV=libz.$VER$shared_ext + SHAREDLIBM=libz.$VER1$shared_ext + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} + if libtool -V 2>&1 | grep Apple > /dev/null; then + AR="libtool" + else + AR="/usr/bin/libtool" + fi + ARFLAGS="-o" ;; + *) LDSHARED=${LDSHARED-"$cc -shared"} ;; + esac +else + # find system name and corresponding cc options + CC=${CC-cc} + gcc=0 + echo ... using $CC >> configure.log + if test -z "$uname"; then + uname=`(uname -sr || echo unknown) 2>/dev/null` + fi + case "$uname" in + HP-UX*) SFLAGS=${CFLAGS-"-O +z"} + CFLAGS=${CFLAGS-"-O"} +# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} + LDSHARED=${LDSHARED-"ld -b"} + case `(uname -m || echo unknown) 2>/dev/null` in + ia64) + shared_ext='.so' + SHAREDLIB='libz.so' ;; + *) + shared_ext='.sl' + SHAREDLIB='libz.sl' ;; + esac ;; + IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} + CFLAGS=${CFLAGS-"-ansi -O2"} + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; + OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} + CFLAGS=${CFLAGS-"-O -std1"} + LDFLAGS="${LDFLAGS} -Wl,-rpath,." + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;; + OSF1*) SFLAGS=${CFLAGS-"-O -std1"} + CFLAGS=${CFLAGS-"-O -std1"} + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; + QNX*) SFLAGS=${CFLAGS-"-4 -O"} + CFLAGS=${CFLAGS-"-4 -O"} + LDSHARED=${LDSHARED-"cc"} + RANLIB=${RANLIB-"true"} + AR="cc" + ARFLAGS="-A" ;; + SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} + CFLAGS=${CFLAGS-"-O3"} + LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;; + SunOS\ 5* | solaris*) + LDSHARED=${LDSHARED-"cc -G -h libz$shared_ext.$VER1"} + SFLAGS=${CFLAGS-"-fast -KPIC"} + CFLAGS=${CFLAGS-"-fast"} + if test $build64 -eq 1; then + # old versions of SunPRO/Workshop/Studio don't support -m64, + # but newer ones do. Check for it. + flag64=`$CC -flags | egrep -- '^-m64'` + if test x"$flag64" != x"" ; then + CFLAGS="${CFLAGS} -m64" + SFLAGS="${SFLAGS} -m64" + else + case `(uname -m || echo unknown) 2>/dev/null` in + i86*) + SFLAGS="$SFLAGS -xarch=amd64" + CFLAGS="$CFLAGS -xarch=amd64" ;; + *) + SFLAGS="$SFLAGS -xarch=v9" + CFLAGS="$CFLAGS -xarch=v9" ;; + esac + fi + fi + if test -n "$ZINC"; then + ZINC='-I- -I. -I$(SRCDIR)' + fi + ;; + SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} + CFLAGS=${CFLAGS-"-O2"} + LDSHARED=${LDSHARED-"ld"} ;; + SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} + CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"} + LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;; + UNIX_System_V\ 4.2.0) + SFLAGS=${CFLAGS-"-KPIC -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"} ;; + UNIX_SV\ 4.2MP) + SFLAGS=${CFLAGS-"-Kconform_pic -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"} ;; + OpenUNIX\ 5) + SFLAGS=${CFLAGS-"-KPIC -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"} ;; + AIX*) # Courtesy of dbakker@arrayasolutions.com + SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} + CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} + LDSHARED=${LDSHARED-"xlc -G"} ;; + # send working options for other systems to zlib@gzip.org + *) SFLAGS=${CFLAGS-"-O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -shared"} ;; + esac +fi + +# destination names for shared library if not defined above +SHAREDLIB=${SHAREDLIB-"libz$shared_ext"} +SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"} +SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} + +echo >> configure.log + +# define functions for testing compiler and library characteristics and logging the results + +cat > $test.c </dev/null; then + try() + { + show $* + test "`( $* ) 2>&1 | tee -a configure.log`" = "" + } + echo - using any output from compiler to indicate an error >> configure.log +else + try() + { + show $* + ( $* ) >> configure.log 2>&1 + ret=$? + if test $ret -ne 0; then + echo "(exit code "$ret")" >> configure.log + fi + return $ret + } +fi + +tryboth() +{ + show $* + got=`( $* ) 2>&1` + ret=$? + printf %s "$got" >> configure.log + if test $ret -ne 0; then + return $ret + fi + test "$got" = "" +} + +cat > $test.c << EOF +int foo() { return 0; } +EOF +echo "Checking for obsessive-compulsive compiler options..." >> configure.log +if try $CC -c $CFLAGS $test.c; then + : +else + echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log + leave 1 +fi + +echo >> configure.log + +# see if shared library build supported +cat > $test.c <> configure.log + show "$NM $test.o | grep _hello" + if test "`$NM $test.o | grep _hello | tee -a configure.log`" = ""; then + CPP="$CPP -DNO_UNDERLINE" + echo Checking for underline in external names... No. | tee -a configure.log + else + echo Checking for underline in external names... Yes. | tee -a configure.log + fi ;; +esac + +echo >> configure.log + +# check for size_t +cat > $test.c < +#include +size_t dummy = 0; +EOF +if try $CC -c $CFLAGS $test.c; then + echo "Checking for size_t... Yes." | tee -a configure.log + need_sizet=0 +else + echo "Checking for size_t... No." | tee -a configure.log + need_sizet=1 +fi + +echo >> configure.log + +# find the size_t integer type, if needed +if test $need_sizet -eq 1; then + cat > $test.c < $test.c < +int main(void) { + if (sizeof(void *) <= sizeof(int)) puts("int"); + else if (sizeof(void *) <= sizeof(long)) puts("long"); + else puts("z_longlong"); + return 0; +} +EOF + else + echo "Checking for long long... No." | tee -a configure.log + cat > $test.c < +int main(void) { + if (sizeof(void *) <= sizeof(int)) puts("int"); + else puts("long"); + return 0; +} +EOF + fi + if try $CC $CFLAGS -o $test $test.c; then + sizet=`./$test` + echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log + else + echo "Failed to find a pointer-size integer type." | tee -a configure.log + leave 1 + fi +fi + +if test $need_sizet -eq 1; then + CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" + SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" +fi + +echo >> configure.log + +# check for large file support, and if none, check for fseeko() +cat > $test.c < +off64_t dummy = 0; +EOF +if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then + CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" + SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" + ALL="${ALL} all64" + TEST="${TEST} test64" + echo "Checking for off64_t... Yes." | tee -a configure.log + echo "Checking for fseeko... Yes." | tee -a configure.log +else + echo "Checking for off64_t... No." | tee -a configure.log + echo >> configure.log + cat > $test.c < +int main(void) { + fseeko(NULL, 0, 0); + return 0; +} +EOF + if try $CC $CFLAGS -o $test $test.c; then + echo "Checking for fseeko... Yes." | tee -a configure.log + else + CFLAGS="${CFLAGS} -DNO_FSEEKO" + SFLAGS="${SFLAGS} -DNO_FSEEKO" + echo "Checking for fseeko... No." | tee -a configure.log + fi +fi + +echo >> configure.log + +# check for strerror() for use by gz* functions +cat > $test.c < +#include +int main() { return strlen(strerror(errno)); } +EOF +if try $CC $CFLAGS -o $test $test.c; then + echo "Checking for strerror... Yes." | tee -a configure.log +else + CFLAGS="${CFLAGS} -DNO_STRERROR" + SFLAGS="${SFLAGS} -DNO_STRERROR" + echo "Checking for strerror... No." | tee -a configure.log +fi + +# copy clean zconf.h for subsequent edits +cp -p ${SRCDIR}zconf.h.in zconf.h + +echo >> configure.log + +# check for unistd.h and save result in zconf.h +cat > $test.c < +int main() { return 0; } +EOF +if try $CC -c $CFLAGS $test.c; then + sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h + mv zconf.temp.h zconf.h + echo "Checking for unistd.h... Yes." | tee -a configure.log +else + echo "Checking for unistd.h... No." | tee -a configure.log +fi + +echo >> configure.log + +# check for stdarg.h and save result in zconf.h +cat > $test.c < +int main() { return 0; } +EOF +if try $CC -c $CFLAGS $test.c; then + sed < zconf.h "/^#ifdef HAVE_STDARG_H.* may be/s/def HAVE_STDARG_H\(.*\) may be/ 1\1 was/" > zconf.temp.h + mv zconf.temp.h zconf.h + echo "Checking for stdarg.h... Yes." | tee -a configure.log +else + echo "Checking for stdarg.h... No." | tee -a configure.log +fi + +# if the z_ prefix was requested, save that in zconf.h +if test $zprefix -eq 1; then + sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h + mv zconf.temp.h zconf.h + echo >> configure.log + echo "Using z_ prefix on all symbols." | tee -a configure.log +fi + +# if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists +if test $solo -eq 1; then + sed '/#define ZCONF_H/a\ +#define Z_SOLO + +' < zconf.h > zconf.temp.h + mv zconf.temp.h zconf.h +OBJC='$(OBJZ)' +PIC_OBJC='$(PIC_OBJZ)' +fi + +# if code coverage testing was requested, use older gcc if defined, e.g. "gcc-4.2" on Mac OS X +if test $cover -eq 1; then + CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" + if test -n "$GCC_CLASSIC"; then + CC=$GCC_CLASSIC + fi +fi + +echo >> configure.log + +# conduct a series of tests to resolve eight possible cases of using "vs" or "s" printf functions +# (using stdarg or not), with or without "n" (proving size of buffer), and with or without a +# return value. The most secure result is vsnprintf() with a return value. snprintf() with a +# return value is secure as well, but then gzprintf() will be limited to 20 arguments. +cat > $test.c < +#include +#include "zconf.h" +int main() +{ +#ifndef STDC + choke me +#endif + return 0; +} +EOF +if try $CC -c $CFLAGS $test.c; then + echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." | tee -a configure.log + + echo >> configure.log + cat > $test.c < +#include +int mytest(const char *fmt, ...) +{ + char buf[20]; + va_list ap; + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return 0; +} +int main() +{ + return (mytest("Hello%d\n", 1)); +} +EOF + if try $CC $CFLAGS -o $test $test.c; then + echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log + + echo >> configure.log + cat >$test.c < +#include +int mytest(const char *fmt, ...) +{ + int n; + char buf[20]; + va_list ap; + va_start(ap, fmt); + n = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return n; +} +int main() +{ + return (mytest("Hello%d\n", 1)); +} +EOF + + if try $CC -c $CFLAGS $test.c; then + echo "Checking for return value of vsnprintf()... Yes." | tee -a configure.log + else + CFLAGS="$CFLAGS -DHAS_vsnprintf_void" + SFLAGS="$SFLAGS -DHAS_vsnprintf_void" + echo "Checking for return value of vsnprintf()... No." | tee -a configure.log + echo " WARNING: apparently vsnprintf() does not return a value. zlib" | tee -a configure.log + echo " can build but will be open to possible string-format security" | tee -a configure.log + echo " vulnerabilities." | tee -a configure.log + fi + else + CFLAGS="$CFLAGS -DNO_vsnprintf" + SFLAGS="$SFLAGS -DNO_vsnprintf" + echo "Checking for vsnprintf() in stdio.h... No." | tee -a configure.log + echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | tee -a configure.log + echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log + echo " vulnerabilities." | tee -a configure.log + + echo >> configure.log + cat >$test.c < +#include +int mytest(const char *fmt, ...) +{ + int n; + char buf[20]; + va_list ap; + va_start(ap, fmt); + n = vsprintf(buf, fmt, ap); + va_end(ap); + return n; +} +int main() +{ + return (mytest("Hello%d\n", 1)); +} +EOF + + if try $CC -c $CFLAGS $test.c; then + echo "Checking for return value of vsprintf()... Yes." | tee -a configure.log + else + CFLAGS="$CFLAGS -DHAS_vsprintf_void" + SFLAGS="$SFLAGS -DHAS_vsprintf_void" + echo "Checking for return value of vsprintf()... No." | tee -a configure.log + echo " WARNING: apparently vsprintf() does not return a value. zlib" | tee -a configure.log + echo " can build but will be open to possible string-format security" | tee -a configure.log + echo " vulnerabilities." | tee -a configure.log + fi + fi +else + echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." | tee -a configure.log + + echo >> configure.log + cat >$test.c < +int mytest() +{ + char buf[20]; + snprintf(buf, sizeof(buf), "%s", "foo"); + return 0; +} +int main() +{ + return (mytest()); +} +EOF + + if try $CC $CFLAGS -o $test $test.c; then + echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log + + echo >> configure.log + cat >$test.c < +int mytest() +{ + char buf[20]; + return snprintf(buf, sizeof(buf), "%s", "foo"); +} +int main() +{ + return (mytest()); +} +EOF + + if try $CC -c $CFLAGS $test.c; then + echo "Checking for return value of snprintf()... Yes." | tee -a configure.log + else + CFLAGS="$CFLAGS -DHAS_snprintf_void" + SFLAGS="$SFLAGS -DHAS_snprintf_void" + echo "Checking for return value of snprintf()... No." | tee -a configure.log + echo " WARNING: apparently snprintf() does not return a value. zlib" | tee -a configure.log + echo " can build but will be open to possible string-format security" | tee -a configure.log + echo " vulnerabilities." | tee -a configure.log + fi + else + CFLAGS="$CFLAGS -DNO_snprintf" + SFLAGS="$SFLAGS -DNO_snprintf" + echo "Checking for snprintf() in stdio.h... No." | tee -a configure.log + echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" | tee -a configure.log + echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log + echo " vulnerabilities." | tee -a configure.log + + echo >> configure.log + cat >$test.c < +int mytest() +{ + char buf[20]; + return sprintf(buf, "%s", "foo"); +} +int main() +{ + return (mytest()); +} +EOF + + if try $CC -c $CFLAGS $test.c; then + echo "Checking for return value of sprintf()... Yes." | tee -a configure.log + else + CFLAGS="$CFLAGS -DHAS_sprintf_void" + SFLAGS="$SFLAGS -DHAS_sprintf_void" + echo "Checking for return value of sprintf()... No." | tee -a configure.log + echo " WARNING: apparently sprintf() does not return a value. zlib" | tee -a configure.log + echo " can build but will be open to possible string-format security" | tee -a configure.log + echo " vulnerabilities." | tee -a configure.log + fi + fi +fi + +# see if we can hide zlib internal symbols that are linked between separate source files +if test "$gcc" -eq 1; then + echo >> configure.log + cat > $test.c <> configure.log +echo ALL = $ALL >> configure.log +echo AR = $AR >> configure.log +echo ARFLAGS = $ARFLAGS >> configure.log +echo CC = $CC >> configure.log +echo CFLAGS = $CFLAGS >> configure.log +echo CPP = $CPP >> configure.log +echo EXE = $EXE >> configure.log +echo LDCONFIG = $LDCONFIG >> configure.log +echo LDFLAGS = $LDFLAGS >> configure.log +echo LDSHARED = $LDSHARED >> configure.log +echo LDSHAREDLIBC = $LDSHAREDLIBC >> configure.log +echo OBJC = $OBJC >> configure.log +echo PIC_OBJC = $PIC_OBJC >> configure.log +echo RANLIB = $RANLIB >> configure.log +echo SFLAGS = $SFLAGS >> configure.log +echo SHAREDLIB = $SHAREDLIB >> configure.log +echo SHAREDLIBM = $SHAREDLIBM >> configure.log +echo SHAREDLIBV = $SHAREDLIBV >> configure.log +echo STATICLIB = $STATICLIB >> configure.log +echo TEST = $TEST >> configure.log +echo VER = $VER >> configure.log +echo Z_U4 = $Z_U4 >> configure.log +echo SRCDIR = $SRCDIR >> configure.log +echo exec_prefix = $exec_prefix >> configure.log +echo includedir = $includedir >> configure.log +echo libdir = $libdir >> configure.log +echo mandir = $mandir >> configure.log +echo prefix = $prefix >> configure.log +echo sharedlibdir = $sharedlibdir >> configure.log +echo uname = $uname >> configure.log + +# udpate Makefile with the configure results +sed < ${SRCDIR}Makefile.in " +/^CC *=/s#=.*#=$CC# +/^CFLAGS *=/s#=.*#=$CFLAGS# +/^SFLAGS *=/s#=.*#=$SFLAGS# +/^LDFLAGS *=/s#=.*#=$LDFLAGS# +/^LDSHARED *=/s#=.*#=$LDSHARED# +/^CPP *=/s#=.*#=$CPP# +/^STATICLIB *=/s#=.*#=$STATICLIB# +/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# +/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# +/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# +/^AR *=/s#=.*#=$AR# +/^ARFLAGS *=/s#=.*#=$ARFLAGS# +/^RANLIB *=/s#=.*#=$RANLIB# +/^LDCONFIG *=/s#=.*#=$LDCONFIG# +/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC# +/^EXE *=/s#=.*#=$EXE# +/^SRCDIR *=/s#=.*#=$SRCDIR# +/^ZINC *=/s#=.*#=$ZINC# +/^ZINCOUT *=/s#=.*#=$ZINCOUT# +/^prefix *=/s#=.*#=$prefix# +/^exec_prefix *=/s#=.*#=$exec_prefix# +/^libdir *=/s#=.*#=$libdir# +/^sharedlibdir *=/s#=.*#=$sharedlibdir# +/^includedir *=/s#=.*#=$includedir# +/^mandir *=/s#=.*#=$mandir# +/^OBJC *=/s#=.*#= $OBJC# +/^PIC_OBJC *=/s#=.*#= $PIC_OBJC# +/^all: */s#:.*#: $ALL# +/^test: */s#:.*#: $TEST# +" > Makefile + +# create zlib.pc with the configure results +sed < ${SRCDIR}zlib.pc.in " +/^CC *=/s#=.*#=$CC# +/^CFLAGS *=/s#=.*#=$CFLAGS# +/^CPP *=/s#=.*#=$CPP# +/^LDSHARED *=/s#=.*#=$LDSHARED# +/^STATICLIB *=/s#=.*#=$STATICLIB# +/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# +/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# +/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# +/^AR *=/s#=.*#=$AR# +/^ARFLAGS *=/s#=.*#=$ARFLAGS# +/^RANLIB *=/s#=.*#=$RANLIB# +/^EXE *=/s#=.*#=$EXE# +/^prefix *=/s#=.*#=$prefix# +/^exec_prefix *=/s#=.*#=$exec_prefix# +/^libdir *=/s#=.*#=$libdir# +/^sharedlibdir *=/s#=.*#=$sharedlibdir# +/^includedir *=/s#=.*#=$includedir# +/^mandir *=/s#=.*#=$mandir# +/^LDFLAGS *=/s#=.*#=$LDFLAGS# +" | sed -e " +s/\@VERSION\@/$VER/g; +" > zlib.pc + +# done +leave 0 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/README.contrib b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/README.contrib new file mode 100644 index 000000000..a411d5c39 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/README.contrib @@ -0,0 +1,78 @@ +All files under this contrib directory are UNSUPPORTED. There were +provided by users of zlib and were not tested by the authors of zlib. +Use at your own risk. Please contact the authors of the contributions +for help about these, not the zlib authors. Thanks. + + +ada/ by Dmitriy Anisimkov + Support for Ada + See http://zlib-ada.sourceforge.net/ + +amd64/ by Mikhail Teterin + asm code for AMD64 + See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393 + +asm686/ by Brian Raiter + asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax + See http://www.muppetlabs.com/~breadbox/software/assembly.html + +blast/ by Mark Adler + Decompressor for output of PKWare Data Compression Library (DCL) + +delphi/ by Cosmin Truta + Support for Delphi and C++ Builder + +dotzlib/ by Henrik Ravn + Support for Microsoft .Net and Visual C++ .Net + +gcc_gvmat64/by Gilles Vollant + GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64 + assembler to replace longest_match() and inflate_fast() + +infback9/ by Mark Adler + Unsupported diffs to infback to decode the deflate64 format + +inflate86/ by Chris Anderson + Tuned x86 gcc asm code to replace inflate_fast() + +iostream/ by Kevin Ruland + A C++ I/O streams interface to the zlib gz* functions + +iostream2/ by Tyge Løvset + Another C++ I/O streams interface + +iostream3/ by Ludwig Schwardt + and Kevin Ruland + Yet another C++ I/O streams interface + +masmx64/ by Gilles Vollant + x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to + replace longest_match() and inflate_fast(), also masm x86 + 64-bits translation of Chris Anderson inflate_fast() + +masmx86/ by Gilles Vollant + x86 asm code to replace longest_match() and inflate_fast(), + for Visual C++ and MASM (32 bits). + Based on Brian Raiter (asm686) and Chris Anderson (inflate86) + +minizip/ by Gilles Vollant + Mini zip and unzip based on zlib + Includes Zip64 support by Mathias Svensson + See http://www.winimage.com/zLibDll/minizip.html + +pascal/ by Bob Dellaca et al. + Support for Pascal + +puff/ by Mark Adler + Small, low memory usage inflate. Also serves to provide an + unambiguous description of the deflate format. + +testzlib/ by Gilles Vollant + Example of the use of zlib + +untgz/ by Pedro A. Aranda Gutierrez + A very simple tar.gz file extractor using zlib + +vstudio/ by Gilles Vollant + Building a minizip-enhanced zlib with Microsoft Visual Studio + Includes vc11 from kreuzerkrieg and vc12 from davispuh diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/buffer_demo.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/buffer_demo.adb new file mode 100644 index 000000000..46b863810 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/buffer_demo.adb @@ -0,0 +1,106 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2004 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- +-- +-- $Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp $ + +-- This demo program provided by Dr Steve Sangwine +-- +-- Demonstration of a problem with Zlib-Ada (already fixed) when a buffer +-- of exactly the correct size is used for decompressed data, and the last +-- few bytes passed in to Zlib are checksum bytes. + +-- This program compresses a string of text, and then decompresses the +-- compressed text into a buffer of the same size as the original text. + +with Ada.Streams; use Ada.Streams; +with Ada.Text_IO; + +with ZLib; use ZLib; + +procedure Buffer_Demo is + EOL : Character renames ASCII.LF; + Text : constant String + := "Four score and seven years ago our fathers brought forth," & EOL & + "upon this continent, a new nation, conceived in liberty," & EOL & + "and dedicated to the proposition that `all men are created equal'."; + + Source : Stream_Element_Array (1 .. Text'Length); + for Source'Address use Text'Address; + +begin + Ada.Text_IO.Put (Text); + Ada.Text_IO.New_Line; + Ada.Text_IO.Put_Line + ("Uncompressed size : " & Positive'Image (Text'Length) & " bytes"); + + declare + Compressed_Data : Stream_Element_Array (1 .. Text'Length); + L : Stream_Element_Offset; + begin + Compress : declare + Compressor : Filter_Type; + I : Stream_Element_Offset; + begin + Deflate_Init (Compressor); + + -- Compress the whole of T at once. + + Translate (Compressor, Source, I, Compressed_Data, L, Finish); + pragma Assert (I = Source'Last); + + Close (Compressor); + + Ada.Text_IO.Put_Line + ("Compressed size : " + & Stream_Element_Offset'Image (L) & " bytes"); + end Compress; + + -- Now we decompress the data, passing short blocks of data to Zlib + -- (because this demonstrates the problem - the last block passed will + -- contain checksum information and there will be no output, only a + -- check inside Zlib that the checksum is correct). + + Decompress : declare + Decompressor : Filter_Type; + + Uncompressed_Data : Stream_Element_Array (1 .. Text'Length); + + Block_Size : constant := 4; + -- This makes sure that the last block contains + -- only Adler checksum data. + + P : Stream_Element_Offset := Compressed_Data'First - 1; + O : Stream_Element_Offset; + begin + Inflate_Init (Decompressor); + + loop + Translate + (Decompressor, + Compressed_Data + (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)), + P, + Uncompressed_Data + (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last), + O, + No_Flush); + + Ada.Text_IO.Put_Line + ("Total in : " & Count'Image (Total_In (Decompressor)) & + ", out : " & Count'Image (Total_Out (Decompressor))); + + exit when P = L; + end loop; + + Ada.Text_IO.New_Line; + Ada.Text_IO.Put_Line + ("Decompressed text matches original text : " + & Boolean'Image (Uncompressed_Data = Source)); + end Decompress; + end; +end Buffer_Demo; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/mtest.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/mtest.adb new file mode 100644 index 000000000..c4dfd080f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/mtest.adb @@ -0,0 +1,156 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- +-- Continuous test for ZLib multithreading. If the test would fail +-- we should provide thread safe allocation routines for the Z_Stream. +-- +-- $Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp $ + +with ZLib; +with Ada.Streams; +with Ada.Numerics.Discrete_Random; +with Ada.Text_IO; +with Ada.Exceptions; +with Ada.Task_Identification; + +procedure MTest is + use Ada.Streams; + use ZLib; + + Stop : Boolean := False; + + pragma Atomic (Stop); + + subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; + + package Random_Elements is + new Ada.Numerics.Discrete_Random (Visible_Symbols); + + task type Test_Task; + + task body Test_Task is + Buffer : Stream_Element_Array (1 .. 100_000); + Gen : Random_Elements.Generator; + + Buffer_First : Stream_Element_Offset; + Compare_First : Stream_Element_Offset; + + Deflate : Filter_Type; + Inflate : Filter_Type; + + procedure Further (Item : in Stream_Element_Array); + + procedure Read_Buffer + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + + ------------- + -- Further -- + ------------- + + procedure Further (Item : in Stream_Element_Array) is + + procedure Compare (Item : in Stream_Element_Array); + + ------------- + -- Compare -- + ------------- + + procedure Compare (Item : in Stream_Element_Array) is + Next_First : Stream_Element_Offset := Compare_First + Item'Length; + begin + if Buffer (Compare_First .. Next_First - 1) /= Item then + raise Program_Error; + end if; + + Compare_First := Next_First; + end Compare; + + procedure Compare_Write is new ZLib.Write (Write => Compare); + begin + Compare_Write (Inflate, Item, No_Flush); + end Further; + + ----------------- + -- Read_Buffer -- + ----------------- + + procedure Read_Buffer + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset) + is + Buff_Diff : Stream_Element_Offset := Buffer'Last - Buffer_First; + Next_First : Stream_Element_Offset; + begin + if Item'Length <= Buff_Diff then + Last := Item'Last; + + Next_First := Buffer_First + Item'Length; + + Item := Buffer (Buffer_First .. Next_First - 1); + + Buffer_First := Next_First; + else + Last := Item'First + Buff_Diff; + Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last); + Buffer_First := Buffer'Last + 1; + end if; + end Read_Buffer; + + procedure Translate is new Generic_Translate + (Data_In => Read_Buffer, + Data_Out => Further); + + begin + Random_Elements.Reset (Gen); + + Buffer := (others => 20); + + Main : loop + for J in Buffer'Range loop + Buffer (J) := Random_Elements.Random (Gen); + + Deflate_Init (Deflate); + Inflate_Init (Inflate); + + Buffer_First := Buffer'First; + Compare_First := Buffer'First; + + Translate (Deflate); + + if Compare_First /= Buffer'Last + 1 then + raise Program_Error; + end if; + + Ada.Text_IO.Put_Line + (Ada.Task_Identification.Image + (Ada.Task_Identification.Current_Task) + & Stream_Element_Offset'Image (J) + & ZLib.Count'Image (Total_Out (Deflate))); + + Close (Deflate); + Close (Inflate); + + exit Main when Stop; + end loop; + end loop Main; + exception + when E : others => + Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E)); + Stop := True; + end Test_Task; + + Test : array (1 .. 4) of Test_Task; + + pragma Unreferenced (Test); + + Dummy : Character; + +begin + Ada.Text_IO.Get_Immediate (Dummy); + Stop := True; +end MTest; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/read.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/read.adb new file mode 100644 index 000000000..1f2efbfeb --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/read.adb @@ -0,0 +1,156 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp $ + +-- Test/demo program for the generic read interface. + +with Ada.Numerics.Discrete_Random; +with Ada.Streams; +with Ada.Text_IO; + +with ZLib; + +procedure Read is + + use Ada.Streams; + + ------------------------------------ + -- Test configuration parameters -- + ------------------------------------ + + File_Size : Stream_Element_Offset := 100_000; + + Continuous : constant Boolean := False; + -- If this constant is True, the test would be repeated again and again, + -- with increment File_Size for every iteration. + + Header : constant ZLib.Header_Type := ZLib.Default; + -- Do not use Header other than Default in ZLib versions 1.1.4 and older. + + Init_Random : constant := 8; + -- We are using the same random sequence, in case of we catch bug, + -- so we would be able to reproduce it. + + -- End -- + + Pack_Size : Stream_Element_Offset; + Offset : Stream_Element_Offset; + + Filter : ZLib.Filter_Type; + + subtype Visible_Symbols + is Stream_Element range 16#20# .. 16#7E#; + + package Random_Elements is new + Ada.Numerics.Discrete_Random (Visible_Symbols); + + Gen : Random_Elements.Generator; + Period : constant Stream_Element_Offset := 200; + -- Period constant variable for random generator not to be very random. + -- Bigger period, harder random. + + Read_Buffer : Stream_Element_Array (1 .. 2048); + Read_First : Stream_Element_Offset; + Read_Last : Stream_Element_Offset; + + procedure Reset; + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset); + -- this procedure is for generic instantiation of + -- ZLib.Read + -- reading data from the File_In. + + procedure Read is new ZLib.Read + (Read, + Read_Buffer, + Rest_First => Read_First, + Rest_Last => Read_Last); + + ---------- + -- Read -- + ---------- + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) is + begin + Last := Stream_Element_Offset'Min + (Item'Last, + Item'First + File_Size - Offset); + + for J in Item'First .. Last loop + if J < Item'First + Period then + Item (J) := Random_Elements.Random (Gen); + else + Item (J) := Item (J - Period); + end if; + + Offset := Offset + 1; + end loop; + end Read; + + ----------- + -- Reset -- + ----------- + + procedure Reset is + begin + Random_Elements.Reset (Gen, Init_Random); + Pack_Size := 0; + Offset := 1; + Read_First := Read_Buffer'Last + 1; + Read_Last := Read_Buffer'Last; + end Reset; + +begin + Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version); + + loop + for Level in ZLib.Compression_Level'Range loop + + Ada.Text_IO.Put ("Level =" + & ZLib.Compression_Level'Image (Level)); + + -- Deflate using generic instantiation. + + ZLib.Deflate_Init + (Filter, + Level, + Header => Header); + + Reset; + + Ada.Text_IO.Put + (Stream_Element_Offset'Image (File_Size) & " ->"); + + loop + declare + Buffer : Stream_Element_Array (1 .. 1024); + Last : Stream_Element_Offset; + begin + Read (Filter, Buffer, Last); + + Pack_Size := Pack_Size + Last - Buffer'First + 1; + + exit when Last < Buffer'Last; + end; + end loop; + + Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size)); + + ZLib.Close (Filter); + end loop; + + exit when not Continuous; + + File_Size := File_Size + 1; + end loop; +end Read; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/readme.txt new file mode 100644 index 000000000..ce4d2cadf --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/readme.txt @@ -0,0 +1,65 @@ + ZLib for Ada thick binding (ZLib.Ada) + Release 1.3 + +ZLib.Ada is a thick binding interface to the popular ZLib data +compression library, available at http://www.gzip.org/zlib/. +It provides Ada-style access to the ZLib C library. + + + Here are the main changes since ZLib.Ada 1.2: + +- Attension: ZLib.Read generic routine have a initialization requirement + for Read_Last parameter now. It is a bit incompartible with previous version, + but extends functionality, we could use new parameters Allow_Read_Some and + Flush now. + +- Added Is_Open routines to ZLib and ZLib.Streams packages. + +- Add pragma Assert to check Stream_Element is 8 bit. + +- Fix extraction to buffer with exact known decompressed size. Error reported by + Steve Sangwine. + +- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits + computers. Patch provided by Pascal Obry. + +- Add Status_Error exception definition. + +- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit. + + + How to build ZLib.Ada under GNAT + +You should have the ZLib library already build on your computer, before +building ZLib.Ada. Make the directory of ZLib.Ada sources current and +issue the command: + + gnatmake test -largs -L -lz + +Or use the GNAT project file build for GNAT 3.15 or later: + + gnatmake -Pzlib.gpr -L + + + How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2 + +1. Make a project with all *.ads and *.adb files from the distribution. +2. Build the libz.a library from the ZLib C sources. +3. Rename libz.a to z.lib. +4. Add the library z.lib to the project. +5. Add the libc.lib library from the ObjectAda distribution to the project. +6. Build the executable using test.adb as a main procedure. + + + How to use ZLib.Ada + +The source files test.adb and read.adb are small demo programs that show +the main functionality of ZLib.Ada. + +The routines from the package specifications are commented. + + +Homepage: http://zlib-ada.sourceforge.net/ +Author: Dmitriy Anisimkov + +Contributors: Pascal Obry , Steve Sangwine diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/test.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/test.adb new file mode 100644 index 000000000..90773acfa --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/test.adb @@ -0,0 +1,463 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: test.adb,v 1.17 2003/08/12 12:13:30 vagul Exp $ + +-- The program has a few aims. +-- 1. Test ZLib.Ada95 thick binding functionality. +-- 2. Show the example of use main functionality of the ZLib.Ada95 binding. +-- 3. Build this program automatically compile all ZLib.Ada95 packages under +-- GNAT Ada95 compiler. + +with ZLib.Streams; +with Ada.Streams.Stream_IO; +with Ada.Numerics.Discrete_Random; + +with Ada.Text_IO; + +with Ada.Calendar; + +procedure Test is + + use Ada.Streams; + use Stream_IO; + + ------------------------------------ + -- Test configuration parameters -- + ------------------------------------ + + File_Size : Count := 100_000; + Continuous : constant Boolean := False; + + Header : constant ZLib.Header_Type := ZLib.Default; + -- ZLib.None; + -- ZLib.Auto; + -- ZLib.GZip; + -- Do not use Header other then Default in ZLib versions 1.1.4 + -- and older. + + Strategy : constant ZLib.Strategy_Type := ZLib.Default_Strategy; + Init_Random : constant := 10; + + -- End -- + + In_File_Name : constant String := "testzlib.in"; + -- Name of the input file + + Z_File_Name : constant String := "testzlib.zlb"; + -- Name of the compressed file. + + Out_File_Name : constant String := "testzlib.out"; + -- Name of the decompressed file. + + File_In : File_Type; + File_Out : File_Type; + File_Back : File_Type; + File_Z : ZLib.Streams.Stream_Type; + + Filter : ZLib.Filter_Type; + + Time_Stamp : Ada.Calendar.Time; + + procedure Generate_File; + -- Generate file of spetsified size with some random data. + -- The random data is repeatable, for the good compression. + + procedure Compare_Streams + (Left, Right : in out Root_Stream_Type'Class); + -- The procedure compearing data in 2 streams. + -- It is for compare data before and after compression/decompression. + + procedure Compare_Files (Left, Right : String); + -- Compare files. Based on the Compare_Streams. + + procedure Copy_Streams + (Source, Target : in out Root_Stream_Type'Class; + Buffer_Size : in Stream_Element_Offset := 1024); + -- Copying data from one stream to another. It is for test stream + -- interface of the library. + + procedure Data_In + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset); + -- this procedure is for generic instantiation of + -- ZLib.Generic_Translate. + -- reading data from the File_In. + + procedure Data_Out (Item : in Stream_Element_Array); + -- this procedure is for generic instantiation of + -- ZLib.Generic_Translate. + -- writing data to the File_Out. + + procedure Stamp; + -- Store the timestamp to the local variable. + + procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count); + -- Print the time statistic with the message. + + procedure Translate is new ZLib.Generic_Translate + (Data_In => Data_In, + Data_Out => Data_Out); + -- This procedure is moving data from File_In to File_Out + -- with compression or decompression, depend on initialization of + -- Filter parameter. + + ------------------- + -- Compare_Files -- + ------------------- + + procedure Compare_Files (Left, Right : String) is + Left_File, Right_File : File_Type; + begin + Open (Left_File, In_File, Left); + Open (Right_File, In_File, Right); + Compare_Streams (Stream (Left_File).all, Stream (Right_File).all); + Close (Left_File); + Close (Right_File); + end Compare_Files; + + --------------------- + -- Compare_Streams -- + --------------------- + + procedure Compare_Streams + (Left, Right : in out Ada.Streams.Root_Stream_Type'Class) + is + Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#); + Left_Last, Right_Last : Stream_Element_Offset; + begin + loop + Read (Left, Left_Buffer, Left_Last); + Read (Right, Right_Buffer, Right_Last); + + if Left_Last /= Right_Last then + Ada.Text_IO.Put_Line ("Compare error :" + & Stream_Element_Offset'Image (Left_Last) + & " /= " + & Stream_Element_Offset'Image (Right_Last)); + + raise Constraint_Error; + + elsif Left_Buffer (0 .. Left_Last) + /= Right_Buffer (0 .. Right_Last) + then + Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal."); + raise Constraint_Error; + + end if; + + exit when Left_Last < Left_Buffer'Last; + end loop; + end Compare_Streams; + + ------------------ + -- Copy_Streams -- + ------------------ + + procedure Copy_Streams + (Source, Target : in out Ada.Streams.Root_Stream_Type'Class; + Buffer_Size : in Stream_Element_Offset := 1024) + is + Buffer : Stream_Element_Array (1 .. Buffer_Size); + Last : Stream_Element_Offset; + begin + loop + Read (Source, Buffer, Last); + Write (Target, Buffer (1 .. Last)); + + exit when Last < Buffer'Last; + end loop; + end Copy_Streams; + + ------------- + -- Data_In -- + ------------- + + procedure Data_In + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) is + begin + Read (File_In, Item, Last); + end Data_In; + + -------------- + -- Data_Out -- + -------------- + + procedure Data_Out (Item : in Stream_Element_Array) is + begin + Write (File_Out, Item); + end Data_Out; + + ------------------- + -- Generate_File -- + ------------------- + + procedure Generate_File is + subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; + + package Random_Elements is + new Ada.Numerics.Discrete_Random (Visible_Symbols); + + Gen : Random_Elements.Generator; + Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10; + + Buffer_Count : constant Count := File_Size / Buffer'Length; + -- Number of same buffers in the packet. + + Density : constant Count := 30; -- from 0 to Buffer'Length - 2; + + procedure Fill_Buffer (J, D : in Count); + -- Change the part of the buffer. + + ----------------- + -- Fill_Buffer -- + ----------------- + + procedure Fill_Buffer (J, D : in Count) is + begin + for K in 0 .. D loop + Buffer + (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1)) + := Random_Elements.Random (Gen); + + end loop; + end Fill_Buffer; + + begin + Random_Elements.Reset (Gen, Init_Random); + + Create (File_In, Out_File, In_File_Name); + + Fill_Buffer (1, Buffer'Length - 2); + + for J in 1 .. Buffer_Count loop + Write (File_In, Buffer); + + Fill_Buffer (J, Density); + end loop; + + -- fill remain size. + + Write + (File_In, + Buffer + (1 .. Stream_Element_Offset + (File_Size - Buffer'Length * Buffer_Count))); + + Flush (File_In); + Close (File_In); + end Generate_File; + + --------------------- + -- Print_Statistic -- + --------------------- + + procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is + use Ada.Calendar; + use Ada.Text_IO; + + package Count_IO is new Integer_IO (ZLib.Count); + + Curr_Dur : Duration := Clock - Time_Stamp; + begin + Put (Msg); + + Set_Col (20); + Ada.Text_IO.Put ("size ="); + + Count_IO.Put + (Data_Size, + Width => Stream_IO.Count'Image (File_Size)'Length); + + Put_Line (" duration =" & Duration'Image (Curr_Dur)); + end Print_Statistic; + + ----------- + -- Stamp -- + ----------- + + procedure Stamp is + begin + Time_Stamp := Ada.Calendar.Clock; + end Stamp; + +begin + Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version); + + loop + Generate_File; + + for Level in ZLib.Compression_Level'Range loop + + Ada.Text_IO.Put_Line ("Level =" + & ZLib.Compression_Level'Image (Level)); + + -- Test generic interface. + Open (File_In, In_File, In_File_Name); + Create (File_Out, Out_File, Z_File_Name); + + Stamp; + + -- Deflate using generic instantiation. + + ZLib.Deflate_Init + (Filter => Filter, + Level => Level, + Strategy => Strategy, + Header => Header); + + Translate (Filter); + Print_Statistic ("Generic compress", ZLib.Total_Out (Filter)); + ZLib.Close (Filter); + + Close (File_In); + Close (File_Out); + + Open (File_In, In_File, Z_File_Name); + Create (File_Out, Out_File, Out_File_Name); + + Stamp; + + -- Inflate using generic instantiation. + + ZLib.Inflate_Init (Filter, Header => Header); + + Translate (Filter); + Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter)); + + ZLib.Close (Filter); + + Close (File_In); + Close (File_Out); + + Compare_Files (In_File_Name, Out_File_Name); + + -- Test stream interface. + + -- Compress to the back stream. + + Open (File_In, In_File, In_File_Name); + Create (File_Back, Out_File, Z_File_Name); + + Stamp; + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.Out_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => True, + Level => Level, + Strategy => Strategy, + Header => Header); + + Copy_Streams + (Source => Stream (File_In).all, + Target => File_Z); + + -- Flushing internal buffers to the back stream. + + ZLib.Streams.Flush (File_Z, ZLib.Finish); + + Print_Statistic ("Write compress", + ZLib.Streams.Write_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + + Close (File_In); + Close (File_Back); + + -- Compare reading from original file and from + -- decompression stream. + + Open (File_In, In_File, In_File_Name); + Open (File_Back, In_File, Z_File_Name); + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.In_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => True, + Header => Header); + + Stamp; + Compare_Streams (Stream (File_In).all, File_Z); + + Print_Statistic ("Read decompress", + ZLib.Streams.Read_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + Close (File_In); + Close (File_Back); + + -- Compress by reading from compression stream. + + Open (File_Back, In_File, In_File_Name); + Create (File_Out, Out_File, Z_File_Name); + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.In_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => False, + Level => Level, + Strategy => Strategy, + Header => Header); + + Stamp; + Copy_Streams + (Source => File_Z, + Target => Stream (File_Out).all); + + Print_Statistic ("Read compress", + ZLib.Streams.Read_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + + Close (File_Out); + Close (File_Back); + + -- Decompress to decompression stream. + + Open (File_In, In_File, Z_File_Name); + Create (File_Back, Out_File, Out_File_Name); + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.Out_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => False, + Header => Header); + + Stamp; + + Copy_Streams + (Source => Stream (File_In).all, + Target => File_Z); + + Print_Statistic ("Write decompress", + ZLib.Streams.Write_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + Close (File_In); + Close (File_Back); + + Compare_Files (In_File_Name, Out_File_Name); + end loop; + + Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok."); + + exit when not Continuous; + + File_Size := File_Size + 1; + end loop; +end Test; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.adb new file mode 100644 index 000000000..b6497bae2 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.adb @@ -0,0 +1,225 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $ + +with Ada.Unchecked_Deallocation; + +package body ZLib.Streams is + + ----------- + -- Close -- + ----------- + + procedure Close (Stream : in out Stream_Type) is + procedure Free is new Ada.Unchecked_Deallocation + (Stream_Element_Array, Buffer_Access); + begin + if Stream.Mode = Out_Stream or Stream.Mode = Duplex then + -- We should flush the data written by the writer. + + Flush (Stream, Finish); + + Close (Stream.Writer); + end if; + + if Stream.Mode = In_Stream or Stream.Mode = Duplex then + Close (Stream.Reader); + Free (Stream.Buffer); + end if; + end Close; + + ------------ + -- Create -- + ------------ + + procedure Create + (Stream : out Stream_Type; + Mode : in Stream_Mode; + Back : in Stream_Access; + Back_Compressed : in Boolean; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Header : in Header_Type := Default; + Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size; + Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size) + is + + subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size); + + procedure Init_Filter + (Filter : in out Filter_Type; + Compress : in Boolean); + + ----------------- + -- Init_Filter -- + ----------------- + + procedure Init_Filter + (Filter : in out Filter_Type; + Compress : in Boolean) is + begin + if Compress then + Deflate_Init + (Filter, Level, Strategy, Header => Header); + else + Inflate_Init (Filter, Header => Header); + end if; + end Init_Filter; + + begin + Stream.Back := Back; + Stream.Mode := Mode; + + if Mode = Out_Stream or Mode = Duplex then + Init_Filter (Stream.Writer, Back_Compressed); + Stream.Buffer_Size := Write_Buffer_Size; + else + Stream.Buffer_Size := 0; + end if; + + if Mode = In_Stream or Mode = Duplex then + Init_Filter (Stream.Reader, not Back_Compressed); + + Stream.Buffer := new Buffer_Subtype; + Stream.Rest_First := Stream.Buffer'Last + 1; + Stream.Rest_Last := Stream.Buffer'Last; + end if; + end Create; + + ----------- + -- Flush -- + ----------- + + procedure Flush + (Stream : in out Stream_Type; + Mode : in Flush_Mode := Sync_Flush) + is + Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size); + Last : Stream_Element_Offset; + begin + loop + Flush (Stream.Writer, Buffer, Last, Mode); + + Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last)); + + exit when Last < Buffer'Last; + end loop; + end Flush; + + ------------- + -- Is_Open -- + ------------- + + function Is_Open (Stream : Stream_Type) return Boolean is + begin + return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer); + end Is_Open; + + ---------- + -- Read -- + ---------- + + procedure Read + (Stream : in out Stream_Type; + Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) + is + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset); + + ---------- + -- Read -- + ---------- + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) is + begin + Ada.Streams.Read (Stream.Back.all, Item, Last); + end Read; + + procedure Read is new ZLib.Read + (Read => Read, + Buffer => Stream.Buffer.all, + Rest_First => Stream.Rest_First, + Rest_Last => Stream.Rest_Last); + + begin + Read (Stream.Reader, Item, Last); + end Read; + + ------------------- + -- Read_Total_In -- + ------------------- + + function Read_Total_In (Stream : in Stream_Type) return Count is + begin + return Total_In (Stream.Reader); + end Read_Total_In; + + -------------------- + -- Read_Total_Out -- + -------------------- + + function Read_Total_Out (Stream : in Stream_Type) return Count is + begin + return Total_Out (Stream.Reader); + end Read_Total_Out; + + ----------- + -- Write -- + ----------- + + procedure Write + (Stream : in out Stream_Type; + Item : in Stream_Element_Array) + is + + procedure Write (Item : in Stream_Element_Array); + + ----------- + -- Write -- + ----------- + + procedure Write (Item : in Stream_Element_Array) is + begin + Ada.Streams.Write (Stream.Back.all, Item); + end Write; + + procedure Write is new ZLib.Write + (Write => Write, + Buffer_Size => Stream.Buffer_Size); + + begin + Write (Stream.Writer, Item, No_Flush); + end Write; + + -------------------- + -- Write_Total_In -- + -------------------- + + function Write_Total_In (Stream : in Stream_Type) return Count is + begin + return Total_In (Stream.Writer); + end Write_Total_In; + + --------------------- + -- Write_Total_Out -- + --------------------- + + function Write_Total_Out (Stream : in Stream_Type) return Count is + begin + return Total_Out (Stream.Writer); + end Write_Total_Out; + +end ZLib.Streams; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.ads b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.ads new file mode 100644 index 000000000..8e26cd450 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-streams.ads @@ -0,0 +1,114 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp $ + +package ZLib.Streams is + + type Stream_Mode is (In_Stream, Out_Stream, Duplex); + + type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class; + + type Stream_Type is + new Ada.Streams.Root_Stream_Type with private; + + procedure Read + (Stream : in out Stream_Type; + Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + + procedure Write + (Stream : in out Stream_Type; + Item : in Ada.Streams.Stream_Element_Array); + + procedure Flush + (Stream : in out Stream_Type; + Mode : in Flush_Mode := Sync_Flush); + -- Flush the written data to the back stream, + -- all data placed to the compressor is flushing to the Back stream. + -- Should not be used until necessary, because it is decreasing + -- compression. + + function Read_Total_In (Stream : in Stream_Type) return Count; + pragma Inline (Read_Total_In); + -- Return total number of bytes read from back stream so far. + + function Read_Total_Out (Stream : in Stream_Type) return Count; + pragma Inline (Read_Total_Out); + -- Return total number of bytes read so far. + + function Write_Total_In (Stream : in Stream_Type) return Count; + pragma Inline (Write_Total_In); + -- Return total number of bytes written so far. + + function Write_Total_Out (Stream : in Stream_Type) return Count; + pragma Inline (Write_Total_Out); + -- Return total number of bytes written to the back stream. + + procedure Create + (Stream : out Stream_Type; + Mode : in Stream_Mode; + Back : in Stream_Access; + Back_Compressed : in Boolean; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Header : in Header_Type := Default; + Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size; + Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size); + -- Create the Comression/Decompression stream. + -- If mode is In_Stream then Write operation is disabled. + -- If mode is Out_Stream then Read operation is disabled. + + -- If Back_Compressed is true then + -- Data written to the Stream is compressing to the Back stream + -- and data read from the Stream is decompressed data from the Back stream. + + -- If Back_Compressed is false then + -- Data written to the Stream is decompressing to the Back stream + -- and data read from the Stream is compressed data from the Back stream. + + -- !!! When the Need_Header is False ZLib-Ada is using undocumented + -- ZLib 1.1.4 functionality to do not create/wait for ZLib headers. + + function Is_Open (Stream : Stream_Type) return Boolean; + + procedure Close (Stream : in out Stream_Type); + +private + + use Ada.Streams; + + type Buffer_Access is access all Stream_Element_Array; + + type Stream_Type + is new Root_Stream_Type with + record + Mode : Stream_Mode; + + Buffer : Buffer_Access; + Rest_First : Stream_Element_Offset; + Rest_Last : Stream_Element_Offset; + -- Buffer for Read operation. + -- We need to have this buffer in the record + -- because not all read data from back stream + -- could be processed during the read operation. + + Buffer_Size : Stream_Element_Offset; + -- Buffer size for write operation. + -- We do not need to have this buffer + -- in the record because all data could be + -- processed in the write operation. + + Back : Stream_Access; + Reader : Filter_Type; + Writer : Filter_Type; + end record; + +end ZLib.Streams; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.adb new file mode 100644 index 000000000..0ca4a7120 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.adb @@ -0,0 +1,141 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp $ + +package body ZLib.Thin is + + ZLIB_VERSION : constant Chars_Ptr := zlibVersion; + + Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit; + + -------------- + -- Avail_In -- + -------------- + + function Avail_In (Strm : in Z_Stream) return UInt is + begin + return Strm.Avail_In; + end Avail_In; + + --------------- + -- Avail_Out -- + --------------- + + function Avail_Out (Strm : in Z_Stream) return UInt is + begin + return Strm.Avail_Out; + end Avail_Out; + + ------------------ + -- Deflate_Init -- + ------------------ + + function Deflate_Init + (strm : Z_Streamp; + level : Int; + method : Int; + windowBits : Int; + memLevel : Int; + strategy : Int) + return Int is + begin + return deflateInit2 + (strm, + level, + method, + windowBits, + memLevel, + strategy, + ZLIB_VERSION, + Z_Stream_Size); + end Deflate_Init; + + ------------------ + -- Inflate_Init -- + ------------------ + + function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is + begin + return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size); + end Inflate_Init; + + ------------------------ + -- Last_Error_Message -- + ------------------------ + + function Last_Error_Message (Strm : in Z_Stream) return String is + use Interfaces.C.Strings; + begin + if Strm.msg = Null_Ptr then + return ""; + else + return Value (Strm.msg); + end if; + end Last_Error_Message; + + ------------ + -- Set_In -- + ------------ + + procedure Set_In + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt) is + begin + Strm.Next_In := Buffer; + Strm.Avail_In := Size; + end Set_In; + + ------------------ + -- Set_Mem_Func -- + ------------------ + + procedure Set_Mem_Func + (Strm : in out Z_Stream; + Opaque : in Voidp; + Alloc : in alloc_func; + Free : in free_func) is + begin + Strm.opaque := Opaque; + Strm.zalloc := Alloc; + Strm.zfree := Free; + end Set_Mem_Func; + + ------------- + -- Set_Out -- + ------------- + + procedure Set_Out + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt) is + begin + Strm.Next_Out := Buffer; + Strm.Avail_Out := Size; + end Set_Out; + + -------------- + -- Total_In -- + -------------- + + function Total_In (Strm : in Z_Stream) return ULong is + begin + return Strm.Total_In; + end Total_In; + + --------------- + -- Total_Out -- + --------------- + + function Total_Out (Strm : in Z_Stream) return ULong is + begin + return Strm.Total_Out; + end Total_Out; + +end ZLib.Thin; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.ads b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.ads new file mode 100644 index 000000000..810173cff --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib-thin.ads @@ -0,0 +1,450 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $ + +with Interfaces.C.Strings; + +with System; + +private package ZLib.Thin is + + -- From zconf.h + + MAX_MEM_LEVEL : constant := 9; -- zconf.h:105 + -- zconf.h:105 + MAX_WBITS : constant := 15; -- zconf.h:115 + -- 32K LZ77 window + -- zconf.h:115 + SEEK_SET : constant := 8#0000#; -- zconf.h:244 + -- Seek from beginning of file. + -- zconf.h:244 + SEEK_CUR : constant := 1; -- zconf.h:245 + -- Seek from current position. + -- zconf.h:245 + SEEK_END : constant := 2; -- zconf.h:246 + -- Set file pointer to EOF plus "offset" + -- zconf.h:246 + + type Byte is new Interfaces.C.unsigned_char; -- 8 bits + -- zconf.h:214 + type UInt is new Interfaces.C.unsigned; -- 16 bits or more + -- zconf.h:216 + type Int is new Interfaces.C.int; + + type ULong is new Interfaces.C.unsigned_long; -- 32 bits or more + -- zconf.h:217 + subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr; + + type ULong_Access is access ULong; + type Int_Access is access Int; + + subtype Voidp is System.Address; -- zconf.h:232 + + subtype Byte_Access is Voidp; + + Nul : constant Voidp := System.Null_Address; + -- end from zconf + + Z_NO_FLUSH : constant := 8#0000#; -- zlib.h:125 + -- zlib.h:125 + Z_PARTIAL_FLUSH : constant := 1; -- zlib.h:126 + -- will be removed, use + -- Z_SYNC_FLUSH instead + -- zlib.h:126 + Z_SYNC_FLUSH : constant := 2; -- zlib.h:127 + -- zlib.h:127 + Z_FULL_FLUSH : constant := 3; -- zlib.h:128 + -- zlib.h:128 + Z_FINISH : constant := 4; -- zlib.h:129 + -- zlib.h:129 + Z_OK : constant := 8#0000#; -- zlib.h:132 + -- zlib.h:132 + Z_STREAM_END : constant := 1; -- zlib.h:133 + -- zlib.h:133 + Z_NEED_DICT : constant := 2; -- zlib.h:134 + -- zlib.h:134 + Z_ERRNO : constant := -1; -- zlib.h:135 + -- zlib.h:135 + Z_STREAM_ERROR : constant := -2; -- zlib.h:136 + -- zlib.h:136 + Z_DATA_ERROR : constant := -3; -- zlib.h:137 + -- zlib.h:137 + Z_MEM_ERROR : constant := -4; -- zlib.h:138 + -- zlib.h:138 + Z_BUF_ERROR : constant := -5; -- zlib.h:139 + -- zlib.h:139 + Z_VERSION_ERROR : constant := -6; -- zlib.h:140 + -- zlib.h:140 + Z_NO_COMPRESSION : constant := 8#0000#; -- zlib.h:145 + -- zlib.h:145 + Z_BEST_SPEED : constant := 1; -- zlib.h:146 + -- zlib.h:146 + Z_BEST_COMPRESSION : constant := 9; -- zlib.h:147 + -- zlib.h:147 + Z_DEFAULT_COMPRESSION : constant := -1; -- zlib.h:148 + -- zlib.h:148 + Z_FILTERED : constant := 1; -- zlib.h:151 + -- zlib.h:151 + Z_HUFFMAN_ONLY : constant := 2; -- zlib.h:152 + -- zlib.h:152 + Z_DEFAULT_STRATEGY : constant := 8#0000#; -- zlib.h:153 + -- zlib.h:153 + Z_BINARY : constant := 8#0000#; -- zlib.h:156 + -- zlib.h:156 + Z_ASCII : constant := 1; -- zlib.h:157 + -- zlib.h:157 + Z_UNKNOWN : constant := 2; -- zlib.h:158 + -- zlib.h:158 + Z_DEFLATED : constant := 8; -- zlib.h:161 + -- zlib.h:161 + Z_NULL : constant := 8#0000#; -- zlib.h:164 + -- for initializing zalloc, zfree, opaque + -- zlib.h:164 + type gzFile is new Voidp; -- zlib.h:646 + + type Z_Stream is private; + + type Z_Streamp is access all Z_Stream; -- zlib.h:89 + + type alloc_func is access function + (Opaque : Voidp; + Items : UInt; + Size : UInt) + return Voidp; -- zlib.h:63 + + type free_func is access procedure (opaque : Voidp; address : Voidp); + + function zlibVersion return Chars_Ptr; + + function Deflate (strm : Z_Streamp; flush : Int) return Int; + + function DeflateEnd (strm : Z_Streamp) return Int; + + function Inflate (strm : Z_Streamp; flush : Int) return Int; + + function InflateEnd (strm : Z_Streamp) return Int; + + function deflateSetDictionary + (strm : Z_Streamp; + dictionary : Byte_Access; + dictLength : UInt) + return Int; + + function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int; + -- zlib.h:478 + + function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495 + + function deflateParams + (strm : Z_Streamp; + level : Int; + strategy : Int) + return Int; -- zlib.h:506 + + function inflateSetDictionary + (strm : Z_Streamp; + dictionary : Byte_Access; + dictLength : UInt) + return Int; -- zlib.h:548 + + function inflateSync (strm : Z_Streamp) return Int; -- zlib.h:565 + + function inflateReset (strm : Z_Streamp) return Int; -- zlib.h:580 + + function compress + (dest : Byte_Access; + destLen : ULong_Access; + source : Byte_Access; + sourceLen : ULong) + return Int; -- zlib.h:601 + + function compress2 + (dest : Byte_Access; + destLen : ULong_Access; + source : Byte_Access; + sourceLen : ULong; + level : Int) + return Int; -- zlib.h:615 + + function uncompress + (dest : Byte_Access; + destLen : ULong_Access; + source : Byte_Access; + sourceLen : ULong) + return Int; + + function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile; + + function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile; + + function gzsetparams + (file : gzFile; + level : Int; + strategy : Int) + return Int; + + function gzread + (file : gzFile; + buf : Voidp; + len : UInt) + return Int; + + function gzwrite + (file : in gzFile; + buf : in Voidp; + len : in UInt) + return Int; + + function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int; + + function gzputs (file : in gzFile; s : in Chars_Ptr) return Int; + + function gzgets + (file : gzFile; + buf : Chars_Ptr; + len : Int) + return Chars_Ptr; + + function gzputc (file : gzFile; char : Int) return Int; + + function gzgetc (file : gzFile) return Int; + + function gzflush (file : gzFile; flush : Int) return Int; + + function gzseek + (file : gzFile; + offset : Int; + whence : Int) + return Int; + + function gzrewind (file : gzFile) return Int; + + function gztell (file : gzFile) return Int; + + function gzeof (file : gzFile) return Int; + + function gzclose (file : gzFile) return Int; + + function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr; + + function adler32 + (adler : ULong; + buf : Byte_Access; + len : UInt) + return ULong; + + function crc32 + (crc : ULong; + buf : Byte_Access; + len : UInt) + return ULong; + + function deflateInit + (strm : Z_Streamp; + level : Int; + version : Chars_Ptr; + stream_size : Int) + return Int; + + function deflateInit2 + (strm : Z_Streamp; + level : Int; + method : Int; + windowBits : Int; + memLevel : Int; + strategy : Int; + version : Chars_Ptr; + stream_size : Int) + return Int; + + function Deflate_Init + (strm : Z_Streamp; + level : Int; + method : Int; + windowBits : Int; + memLevel : Int; + strategy : Int) + return Int; + pragma Inline (Deflate_Init); + + function inflateInit + (strm : Z_Streamp; + version : Chars_Ptr; + stream_size : Int) + return Int; + + function inflateInit2 + (strm : in Z_Streamp; + windowBits : in Int; + version : in Chars_Ptr; + stream_size : in Int) + return Int; + + function inflateBackInit + (strm : in Z_Streamp; + windowBits : in Int; + window : in Byte_Access; + version : in Chars_Ptr; + stream_size : in Int) + return Int; + -- Size of window have to be 2**windowBits. + + function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int; + pragma Inline (Inflate_Init); + + function zError (err : Int) return Chars_Ptr; + + function inflateSyncPoint (z : Z_Streamp) return Int; + + function get_crc_table return ULong_Access; + + -- Interface to the available fields of the z_stream structure. + -- The application must update next_in and avail_in when avail_in has + -- dropped to zero. It must update next_out and avail_out when avail_out + -- has dropped to zero. The application must initialize zalloc, zfree and + -- opaque before calling the init function. + + procedure Set_In + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt); + pragma Inline (Set_In); + + procedure Set_Out + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt); + pragma Inline (Set_Out); + + procedure Set_Mem_Func + (Strm : in out Z_Stream; + Opaque : in Voidp; + Alloc : in alloc_func; + Free : in free_func); + pragma Inline (Set_Mem_Func); + + function Last_Error_Message (Strm : in Z_Stream) return String; + pragma Inline (Last_Error_Message); + + function Avail_Out (Strm : in Z_Stream) return UInt; + pragma Inline (Avail_Out); + + function Avail_In (Strm : in Z_Stream) return UInt; + pragma Inline (Avail_In); + + function Total_In (Strm : in Z_Stream) return ULong; + pragma Inline (Total_In); + + function Total_Out (Strm : in Z_Stream) return ULong; + pragma Inline (Total_Out); + + function inflateCopy + (dest : in Z_Streamp; + Source : in Z_Streamp) + return Int; + + function compressBound (Source_Len : in ULong) return ULong; + + function deflateBound + (Strm : in Z_Streamp; + Source_Len : in ULong) + return ULong; + + function gzungetc (C : in Int; File : in gzFile) return Int; + + function zlibCompileFlags return ULong; + +private + + type Z_Stream is record -- zlib.h:68 + Next_In : Voidp := Nul; -- next input byte + Avail_In : UInt := 0; -- number of bytes available at next_in + Total_In : ULong := 0; -- total nb of input bytes read so far + Next_Out : Voidp := Nul; -- next output byte should be put there + Avail_Out : UInt := 0; -- remaining free space at next_out + Total_Out : ULong := 0; -- total nb of bytes output so far + msg : Chars_Ptr; -- last error message, NULL if no error + state : Voidp; -- not visible by applications + zalloc : alloc_func := null; -- used to allocate the internal state + zfree : free_func := null; -- used to free the internal state + opaque : Voidp; -- private data object passed to + -- zalloc and zfree + data_type : Int; -- best guess about the data type: + -- ascii or binary + adler : ULong; -- adler32 value of the uncompressed + -- data + reserved : ULong; -- reserved for future use + end record; + + pragma Convention (C, Z_Stream); + + pragma Import (C, zlibVersion, "zlibVersion"); + pragma Import (C, Deflate, "deflate"); + pragma Import (C, DeflateEnd, "deflateEnd"); + pragma Import (C, Inflate, "inflate"); + pragma Import (C, InflateEnd, "inflateEnd"); + pragma Import (C, deflateSetDictionary, "deflateSetDictionary"); + pragma Import (C, deflateCopy, "deflateCopy"); + pragma Import (C, deflateReset, "deflateReset"); + pragma Import (C, deflateParams, "deflateParams"); + pragma Import (C, inflateSetDictionary, "inflateSetDictionary"); + pragma Import (C, inflateSync, "inflateSync"); + pragma Import (C, inflateReset, "inflateReset"); + pragma Import (C, compress, "compress"); + pragma Import (C, compress2, "compress2"); + pragma Import (C, uncompress, "uncompress"); + pragma Import (C, gzopen, "gzopen"); + pragma Import (C, gzdopen, "gzdopen"); + pragma Import (C, gzsetparams, "gzsetparams"); + pragma Import (C, gzread, "gzread"); + pragma Import (C, gzwrite, "gzwrite"); + pragma Import (C, gzprintf, "gzprintf"); + pragma Import (C, gzputs, "gzputs"); + pragma Import (C, gzgets, "gzgets"); + pragma Import (C, gzputc, "gzputc"); + pragma Import (C, gzgetc, "gzgetc"); + pragma Import (C, gzflush, "gzflush"); + pragma Import (C, gzseek, "gzseek"); + pragma Import (C, gzrewind, "gzrewind"); + pragma Import (C, gztell, "gztell"); + pragma Import (C, gzeof, "gzeof"); + pragma Import (C, gzclose, "gzclose"); + pragma Import (C, gzerror, "gzerror"); + pragma Import (C, adler32, "adler32"); + pragma Import (C, crc32, "crc32"); + pragma Import (C, deflateInit, "deflateInit_"); + pragma Import (C, inflateInit, "inflateInit_"); + pragma Import (C, deflateInit2, "deflateInit2_"); + pragma Import (C, inflateInit2, "inflateInit2_"); + pragma Import (C, zError, "zError"); + pragma Import (C, inflateSyncPoint, "inflateSyncPoint"); + pragma Import (C, get_crc_table, "get_crc_table"); + + -- since zlib 1.2.0: + + pragma Import (C, inflateCopy, "inflateCopy"); + pragma Import (C, compressBound, "compressBound"); + pragma Import (C, deflateBound, "deflateBound"); + pragma Import (C, gzungetc, "gzungetc"); + pragma Import (C, zlibCompileFlags, "zlibCompileFlags"); + + pragma Import (C, inflateBackInit, "inflateBackInit_"); + + -- I stopped binding the inflateBack routines, because realize that + -- it does not support zlib and gzip headers for now, and have no + -- symmetric deflateBack routines. + -- ZLib-Ada is symmetric regarding deflate/inflate data transformation + -- and has a similar generic callback interface for the + -- deflate/inflate transformation based on the regular Deflate/Inflate + -- routines. + + -- pragma Import (C, inflateBack, "inflateBack"); + -- pragma Import (C, inflateBackEnd, "inflateBackEnd"); + +end ZLib.Thin; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.adb b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.adb new file mode 100644 index 000000000..8b6fd686a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.adb @@ -0,0 +1,701 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2004 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib.adb,v 1.31 2004/09/06 06:53:19 vagul Exp $ + +with Ada.Exceptions; +with Ada.Unchecked_Conversion; +with Ada.Unchecked_Deallocation; + +with Interfaces.C.Strings; + +with ZLib.Thin; + +package body ZLib is + + use type Thin.Int; + + type Z_Stream is new Thin.Z_Stream; + + type Return_Code_Enum is + (OK, + STREAM_END, + NEED_DICT, + ERRNO, + STREAM_ERROR, + DATA_ERROR, + MEM_ERROR, + BUF_ERROR, + VERSION_ERROR); + + type Flate_Step_Function is access + function (Strm : in Thin.Z_Streamp; Flush : in Thin.Int) return Thin.Int; + pragma Convention (C, Flate_Step_Function); + + type Flate_End_Function is access + function (Ctrm : in Thin.Z_Streamp) return Thin.Int; + pragma Convention (C, Flate_End_Function); + + type Flate_Type is record + Step : Flate_Step_Function; + Done : Flate_End_Function; + end record; + + subtype Footer_Array is Stream_Element_Array (1 .. 8); + + Simple_GZip_Header : constant Stream_Element_Array (1 .. 10) + := (16#1f#, 16#8b#, -- Magic header + 16#08#, -- Z_DEFLATED + 16#00#, -- Flags + 16#00#, 16#00#, 16#00#, 16#00#, -- Time + 16#00#, -- XFlags + 16#03# -- OS code + ); + -- The simplest gzip header is not for informational, but just for + -- gzip format compatibility. + -- Note that some code below is using assumption + -- Simple_GZip_Header'Last > Footer_Array'Last, so do not make + -- Simple_GZip_Header'Last <= Footer_Array'Last. + + Return_Code : constant array (Thin.Int range <>) of Return_Code_Enum + := (0 => OK, + 1 => STREAM_END, + 2 => NEED_DICT, + -1 => ERRNO, + -2 => STREAM_ERROR, + -3 => DATA_ERROR, + -4 => MEM_ERROR, + -5 => BUF_ERROR, + -6 => VERSION_ERROR); + + Flate : constant array (Boolean) of Flate_Type + := (True => (Step => Thin.Deflate'Access, + Done => Thin.DeflateEnd'Access), + False => (Step => Thin.Inflate'Access, + Done => Thin.InflateEnd'Access)); + + Flush_Finish : constant array (Boolean) of Flush_Mode + := (True => Finish, False => No_Flush); + + procedure Raise_Error (Stream : in Z_Stream); + pragma Inline (Raise_Error); + + procedure Raise_Error (Message : in String); + pragma Inline (Raise_Error); + + procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int); + + procedure Free is new Ada.Unchecked_Deallocation + (Z_Stream, Z_Stream_Access); + + function To_Thin_Access is new Ada.Unchecked_Conversion + (Z_Stream_Access, Thin.Z_Streamp); + + procedure Translate_GZip + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + -- Separate translate routine for make gzip header. + + procedure Translate_Auto + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + -- translate routine without additional headers. + + ----------------- + -- Check_Error -- + ----------------- + + procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int) is + use type Thin.Int; + begin + if Code /= Thin.Z_OK then + Raise_Error + (Return_Code_Enum'Image (Return_Code (Code)) + & ": " & Last_Error_Message (Stream)); + end if; + end Check_Error; + + ----------- + -- Close -- + ----------- + + procedure Close + (Filter : in out Filter_Type; + Ignore_Error : in Boolean := False) + is + Code : Thin.Int; + begin + if not Ignore_Error and then not Is_Open (Filter) then + raise Status_Error; + end if; + + Code := Flate (Filter.Compression).Done (To_Thin_Access (Filter.Strm)); + + if Ignore_Error or else Code = Thin.Z_OK then + Free (Filter.Strm); + else + declare + Error_Message : constant String + := Last_Error_Message (Filter.Strm.all); + begin + Free (Filter.Strm); + Ada.Exceptions.Raise_Exception + (ZLib_Error'Identity, + Return_Code_Enum'Image (Return_Code (Code)) + & ": " & Error_Message); + end; + end if; + end Close; + + ----------- + -- CRC32 -- + ----------- + + function CRC32 + (CRC : in Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array) + return Unsigned_32 + is + use Thin; + begin + return Unsigned_32 (crc32 (ULong (CRC), + Data'Address, + Data'Length)); + end CRC32; + + procedure CRC32 + (CRC : in out Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array) is + begin + CRC := CRC32 (CRC, Data); + end CRC32; + + ------------------ + -- Deflate_Init -- + ------------------ + + procedure Deflate_Init + (Filter : in out Filter_Type; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Method : in Compression_Method := Deflated; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Memory_Level : in Memory_Level_Type := Default_Memory_Level; + Header : in Header_Type := Default) + is + use type Thin.Int; + Win_Bits : Thin.Int := Thin.Int (Window_Bits); + begin + if Is_Open (Filter) then + raise Status_Error; + end if; + + -- We allow ZLib to make header only in case of default header type. + -- Otherwise we would either do header by ourselfs, or do not do + -- header at all. + + if Header = None or else Header = GZip then + Win_Bits := -Win_Bits; + end if; + + -- For the GZip CRC calculation and make headers. + + if Header = GZip then + Filter.CRC := 0; + Filter.Offset := Simple_GZip_Header'First; + else + Filter.Offset := Simple_GZip_Header'Last + 1; + end if; + + Filter.Strm := new Z_Stream; + Filter.Compression := True; + Filter.Stream_End := False; + Filter.Header := Header; + + if Thin.Deflate_Init + (To_Thin_Access (Filter.Strm), + Level => Thin.Int (Level), + method => Thin.Int (Method), + windowBits => Win_Bits, + memLevel => Thin.Int (Memory_Level), + strategy => Thin.Int (Strategy)) /= Thin.Z_OK + then + Raise_Error (Filter.Strm.all); + end if; + end Deflate_Init; + + ----------- + -- Flush -- + ----------- + + procedure Flush + (Filter : in out Filter_Type; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) + is + No_Data : Stream_Element_Array := (1 .. 0 => 0); + Last : Stream_Element_Offset; + begin + Translate (Filter, No_Data, Last, Out_Data, Out_Last, Flush); + end Flush; + + ----------------------- + -- Generic_Translate -- + ----------------------- + + procedure Generic_Translate + (Filter : in out ZLib.Filter_Type; + In_Buffer_Size : in Integer := Default_Buffer_Size; + Out_Buffer_Size : in Integer := Default_Buffer_Size) + is + In_Buffer : Stream_Element_Array + (1 .. Stream_Element_Offset (In_Buffer_Size)); + Out_Buffer : Stream_Element_Array + (1 .. Stream_Element_Offset (Out_Buffer_Size)); + Last : Stream_Element_Offset; + In_Last : Stream_Element_Offset; + In_First : Stream_Element_Offset; + Out_Last : Stream_Element_Offset; + begin + Main : loop + Data_In (In_Buffer, Last); + + In_First := In_Buffer'First; + + loop + Translate + (Filter => Filter, + In_Data => In_Buffer (In_First .. Last), + In_Last => In_Last, + Out_Data => Out_Buffer, + Out_Last => Out_Last, + Flush => Flush_Finish (Last < In_Buffer'First)); + + if Out_Buffer'First <= Out_Last then + Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last)); + end if; + + exit Main when Stream_End (Filter); + + -- The end of in buffer. + + exit when In_Last = Last; + + In_First := In_Last + 1; + end loop; + end loop Main; + + end Generic_Translate; + + ------------------ + -- Inflate_Init -- + ------------------ + + procedure Inflate_Init + (Filter : in out Filter_Type; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Header : in Header_Type := Default) + is + use type Thin.Int; + Win_Bits : Thin.Int := Thin.Int (Window_Bits); + + procedure Check_Version; + -- Check the latest header types compatibility. + + procedure Check_Version is + begin + if Version <= "1.1.4" then + Raise_Error + ("Inflate header type " & Header_Type'Image (Header) + & " incompatible with ZLib version " & Version); + end if; + end Check_Version; + + begin + if Is_Open (Filter) then + raise Status_Error; + end if; + + case Header is + when None => + Check_Version; + + -- Inflate data without headers determined + -- by negative Win_Bits. + + Win_Bits := -Win_Bits; + when GZip => + Check_Version; + + -- Inflate gzip data defined by flag 16. + + Win_Bits := Win_Bits + 16; + when Auto => + Check_Version; + + -- Inflate with automatic detection + -- of gzip or native header defined by flag 32. + + Win_Bits := Win_Bits + 32; + when Default => null; + end case; + + Filter.Strm := new Z_Stream; + Filter.Compression := False; + Filter.Stream_End := False; + Filter.Header := Header; + + if Thin.Inflate_Init + (To_Thin_Access (Filter.Strm), Win_Bits) /= Thin.Z_OK + then + Raise_Error (Filter.Strm.all); + end if; + end Inflate_Init; + + ------------- + -- Is_Open -- + ------------- + + function Is_Open (Filter : in Filter_Type) return Boolean is + begin + return Filter.Strm /= null; + end Is_Open; + + ----------------- + -- Raise_Error -- + ----------------- + + procedure Raise_Error (Message : in String) is + begin + Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message); + end Raise_Error; + + procedure Raise_Error (Stream : in Z_Stream) is + begin + Raise_Error (Last_Error_Message (Stream)); + end Raise_Error; + + ---------- + -- Read -- + ---------- + + procedure Read + (Filter : in out Filter_Type; + Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode := No_Flush) + is + In_Last : Stream_Element_Offset; + Item_First : Ada.Streams.Stream_Element_Offset := Item'First; + V_Flush : Flush_Mode := Flush; + + begin + pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1); + pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last); + + loop + if Rest_Last = Buffer'First - 1 then + V_Flush := Finish; + + elsif Rest_First > Rest_Last then + Read (Buffer, Rest_Last); + Rest_First := Buffer'First; + + if Rest_Last < Buffer'First then + V_Flush := Finish; + end if; + end if; + + Translate + (Filter => Filter, + In_Data => Buffer (Rest_First .. Rest_Last), + In_Last => In_Last, + Out_Data => Item (Item_First .. Item'Last), + Out_Last => Last, + Flush => V_Flush); + + Rest_First := In_Last + 1; + + exit when Stream_End (Filter) + or else Last = Item'Last + or else (Last >= Item'First and then Allow_Read_Some); + + Item_First := Last + 1; + end loop; + end Read; + + ---------------- + -- Stream_End -- + ---------------- + + function Stream_End (Filter : in Filter_Type) return Boolean is + begin + if Filter.Header = GZip and Filter.Compression then + return Filter.Stream_End + and then Filter.Offset = Footer_Array'Last + 1; + else + return Filter.Stream_End; + end if; + end Stream_End; + + -------------- + -- Total_In -- + -------------- + + function Total_In (Filter : in Filter_Type) return Count is + begin + return Count (Thin.Total_In (To_Thin_Access (Filter.Strm).all)); + end Total_In; + + --------------- + -- Total_Out -- + --------------- + + function Total_Out (Filter : in Filter_Type) return Count is + begin + return Count (Thin.Total_Out (To_Thin_Access (Filter.Strm).all)); + end Total_Out; + + --------------- + -- Translate -- + --------------- + + procedure Translate + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) is + begin + if Filter.Header = GZip and then Filter.Compression then + Translate_GZip + (Filter => Filter, + In_Data => In_Data, + In_Last => In_Last, + Out_Data => Out_Data, + Out_Last => Out_Last, + Flush => Flush); + else + Translate_Auto + (Filter => Filter, + In_Data => In_Data, + In_Last => In_Last, + Out_Data => Out_Data, + Out_Last => Out_Last, + Flush => Flush); + end if; + end Translate; + + -------------------- + -- Translate_Auto -- + -------------------- + + procedure Translate_Auto + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) + is + use type Thin.Int; + Code : Thin.Int; + + begin + if not Is_Open (Filter) then + raise Status_Error; + end if; + + if Out_Data'Length = 0 and then In_Data'Length = 0 then + raise Constraint_Error; + end if; + + Set_Out (Filter.Strm.all, Out_Data'Address, Out_Data'Length); + Set_In (Filter.Strm.all, In_Data'Address, In_Data'Length); + + Code := Flate (Filter.Compression).Step + (To_Thin_Access (Filter.Strm), + Thin.Int (Flush)); + + if Code = Thin.Z_STREAM_END then + Filter.Stream_End := True; + else + Check_Error (Filter.Strm.all, Code); + end if; + + In_Last := In_Data'Last + - Stream_Element_Offset (Avail_In (Filter.Strm.all)); + Out_Last := Out_Data'Last + - Stream_Element_Offset (Avail_Out (Filter.Strm.all)); + end Translate_Auto; + + -------------------- + -- Translate_GZip -- + -------------------- + + procedure Translate_GZip + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) + is + Out_First : Stream_Element_Offset; + + procedure Add_Data (Data : in Stream_Element_Array); + -- Add data to stream from the Filter.Offset till necessary, + -- used for add gzip headr/footer. + + procedure Put_32 + (Item : in out Stream_Element_Array; + Data : in Unsigned_32); + pragma Inline (Put_32); + + -------------- + -- Add_Data -- + -------------- + + procedure Add_Data (Data : in Stream_Element_Array) is + Data_First : Stream_Element_Offset renames Filter.Offset; + Data_Last : Stream_Element_Offset; + Data_Len : Stream_Element_Offset; -- -1 + Out_Len : Stream_Element_Offset; -- -1 + begin + Out_First := Out_Last + 1; + + if Data_First > Data'Last then + return; + end if; + + Data_Len := Data'Last - Data_First; + Out_Len := Out_Data'Last - Out_First; + + if Data_Len <= Out_Len then + Out_Last := Out_First + Data_Len; + Data_Last := Data'Last; + else + Out_Last := Out_Data'Last; + Data_Last := Data_First + Out_Len; + end if; + + Out_Data (Out_First .. Out_Last) := Data (Data_First .. Data_Last); + + Data_First := Data_Last + 1; + Out_First := Out_Last + 1; + end Add_Data; + + ------------ + -- Put_32 -- + ------------ + + procedure Put_32 + (Item : in out Stream_Element_Array; + Data : in Unsigned_32) + is + D : Unsigned_32 := Data; + begin + for J in Item'First .. Item'First + 3 loop + Item (J) := Stream_Element (D and 16#FF#); + D := Shift_Right (D, 8); + end loop; + end Put_32; + + begin + Out_Last := Out_Data'First - 1; + + if not Filter.Stream_End then + Add_Data (Simple_GZip_Header); + + Translate_Auto + (Filter => Filter, + In_Data => In_Data, + In_Last => In_Last, + Out_Data => Out_Data (Out_First .. Out_Data'Last), + Out_Last => Out_Last, + Flush => Flush); + + CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last)); + end if; + + if Filter.Stream_End and then Out_Last <= Out_Data'Last then + -- This detection method would work only when + -- Simple_GZip_Header'Last > Footer_Array'Last + + if Filter.Offset = Simple_GZip_Header'Last + 1 then + Filter.Offset := Footer_Array'First; + end if; + + declare + Footer : Footer_Array; + begin + Put_32 (Footer, Filter.CRC); + Put_32 (Footer (Footer'First + 4 .. Footer'Last), + Unsigned_32 (Total_In (Filter))); + Add_Data (Footer); + end; + end if; + end Translate_GZip; + + ------------- + -- Version -- + ------------- + + function Version return String is + begin + return Interfaces.C.Strings.Value (Thin.zlibVersion); + end Version; + + ----------- + -- Write -- + ----------- + + procedure Write + (Filter : in out Filter_Type; + Item : in Ada.Streams.Stream_Element_Array; + Flush : in Flush_Mode := No_Flush) + is + Buffer : Stream_Element_Array (1 .. Buffer_Size); + In_Last : Stream_Element_Offset; + Out_Last : Stream_Element_Offset; + In_First : Stream_Element_Offset := Item'First; + begin + if Item'Length = 0 and Flush = No_Flush then + return; + end if; + + loop + Translate + (Filter => Filter, + In_Data => Item (In_First .. Item'Last), + In_Last => In_Last, + Out_Data => Buffer, + Out_Last => Out_Last, + Flush => Flush); + + if Out_Last >= Buffer'First then + Write (Buffer (1 .. Out_Last)); + end if; + + exit when In_Last = Item'Last or Stream_End (Filter); + + In_First := In_Last + 1; + end loop; + end Write; + +end ZLib; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.ads b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.ads new file mode 100644 index 000000000..79ffc4095 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.ads @@ -0,0 +1,328 @@ +------------------------------------------------------------------------------ +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2004 Dmitriy Anisimkov -- +-- -- +-- This library 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 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 -- +-- General Public License for more details. -- +-- -- +-- You should have received a copy of the GNU General Public License -- +-- along with this library; if not, write to the Free Software Foundation, -- +-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +------------------------------------------------------------------------------ + +-- $Id: zlib.ads,v 1.26 2004/09/06 06:53:19 vagul Exp $ + +with Ada.Streams; + +with Interfaces; + +package ZLib is + + ZLib_Error : exception; + Status_Error : exception; + + type Compression_Level is new Integer range -1 .. 9; + + type Flush_Mode is private; + + type Compression_Method is private; + + type Window_Bits_Type is new Integer range 8 .. 15; + + type Memory_Level_Type is new Integer range 1 .. 9; + + type Unsigned_32 is new Interfaces.Unsigned_32; + + type Strategy_Type is private; + + type Header_Type is (None, Auto, Default, GZip); + -- Header type usage have a some limitation for inflate. + -- See comment for Inflate_Init. + + subtype Count is Ada.Streams.Stream_Element_Count; + + Default_Memory_Level : constant Memory_Level_Type := 8; + Default_Window_Bits : constant Window_Bits_Type := 15; + + ---------------------------------- + -- Compression method constants -- + ---------------------------------- + + Deflated : constant Compression_Method; + -- Only one method allowed in this ZLib version + + --------------------------------- + -- Compression level constants -- + --------------------------------- + + No_Compression : constant Compression_Level := 0; + Best_Speed : constant Compression_Level := 1; + Best_Compression : constant Compression_Level := 9; + Default_Compression : constant Compression_Level := -1; + + -------------------------- + -- Flush mode constants -- + -------------------------- + + No_Flush : constant Flush_Mode; + -- Regular way for compression, no flush + + Partial_Flush : constant Flush_Mode; + -- Will be removed, use Z_SYNC_FLUSH instead + + Sync_Flush : constant Flush_Mode; + -- All pending output is flushed to the output buffer and the output + -- is aligned on a byte boundary, so that the decompressor can get all + -- input data available so far. (In particular avail_in is zero after the + -- call if enough output space has been provided before the call.) + -- Flushing may degrade compression for some compression algorithms and so + -- it should be used only when necessary. + + Block_Flush : constant Flush_Mode; + -- Z_BLOCK requests that inflate() stop + -- if and when it get to the next deflate block boundary. When decoding the + -- zlib or gzip format, this will cause inflate() to return immediately + -- after the header and before the first block. When doing a raw inflate, + -- inflate() will go ahead and process the first block, and will return + -- when it gets to the end of that block, or when it runs out of data. + + Full_Flush : constant Flush_Mode; + -- All output is flushed as with SYNC_FLUSH, and the compression state + -- is reset so that decompression can restart from this point if previous + -- compressed data has been damaged or if random access is desired. Using + -- Full_Flush too often can seriously degrade the compression. + + Finish : constant Flush_Mode; + -- Just for tell the compressor that input data is complete. + + ------------------------------------ + -- Compression strategy constants -- + ------------------------------------ + + -- RLE stategy could be used only in version 1.2.0 and later. + + Filtered : constant Strategy_Type; + Huffman_Only : constant Strategy_Type; + RLE : constant Strategy_Type; + Default_Strategy : constant Strategy_Type; + + Default_Buffer_Size : constant := 4096; + + type Filter_Type is tagged limited private; + -- The filter is for compression and for decompression. + -- The usage of the type is depend of its initialization. + + function Version return String; + pragma Inline (Version); + -- Return string representation of the ZLib version. + + procedure Deflate_Init + (Filter : in out Filter_Type; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Method : in Compression_Method := Deflated; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Memory_Level : in Memory_Level_Type := Default_Memory_Level; + Header : in Header_Type := Default); + -- Compressor initialization. + -- When Header parameter is Auto or Default, then default zlib header + -- would be provided for compressed data. + -- When Header is GZip, then gzip header would be set instead of + -- default header. + -- When Header is None, no header would be set for compressed data. + + procedure Inflate_Init + (Filter : in out Filter_Type; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Header : in Header_Type := Default); + -- Decompressor initialization. + -- Default header type mean that ZLib default header is expecting in the + -- input compressed stream. + -- Header type None mean that no header is expecting in the input stream. + -- GZip header type mean that GZip header is expecting in the + -- input compressed stream. + -- Auto header type mean that header type (GZip or Native) would be + -- detected automatically in the input stream. + -- Note that header types parameter values None, GZip and Auto are + -- supported for inflate routine only in ZLib versions 1.2.0.2 and later. + -- Deflate_Init is supporting all header types. + + function Is_Open (Filter : in Filter_Type) return Boolean; + pragma Inline (Is_Open); + -- Is the filter opened for compression or decompression. + + procedure Close + (Filter : in out Filter_Type; + Ignore_Error : in Boolean := False); + -- Closing the compression or decompressor. + -- If stream is closing before the complete and Ignore_Error is False, + -- The exception would be raised. + + generic + with procedure Data_In + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + with procedure Data_Out + (Item : in Ada.Streams.Stream_Element_Array); + procedure Generic_Translate + (Filter : in out Filter_Type; + In_Buffer_Size : in Integer := Default_Buffer_Size; + Out_Buffer_Size : in Integer := Default_Buffer_Size); + -- Compress/decompress data fetch from Data_In routine and pass the result + -- to the Data_Out routine. User should provide Data_In and Data_Out + -- for compression/decompression data flow. + -- Compression or decompression depend on Filter initialization. + + function Total_In (Filter : in Filter_Type) return Count; + pragma Inline (Total_In); + -- Returns total number of input bytes read so far + + function Total_Out (Filter : in Filter_Type) return Count; + pragma Inline (Total_Out); + -- Returns total number of bytes output so far + + function CRC32 + (CRC : in Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array) + return Unsigned_32; + pragma Inline (CRC32); + -- Compute CRC32, it could be necessary for make gzip format + + procedure CRC32 + (CRC : in out Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array); + pragma Inline (CRC32); + -- Compute CRC32, it could be necessary for make gzip format + + ------------------------------------------------- + -- Below is more complex low level routines. -- + ------------------------------------------------- + + procedure Translate + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + -- Compress/decompress the In_Data buffer and place the result into + -- Out_Data. In_Last is the index of last element from In_Data accepted by + -- the Filter. Out_Last is the last element of the received data from + -- Filter. To tell the filter that incoming data are complete put the + -- Flush parameter to Finish. + + function Stream_End (Filter : in Filter_Type) return Boolean; + pragma Inline (Stream_End); + -- Return the true when the stream is complete. + + procedure Flush + (Filter : in out Filter_Type; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + pragma Inline (Flush); + -- Flushing the data from the compressor. + + generic + with procedure Write + (Item : in Ada.Streams.Stream_Element_Array); + -- User should provide this routine for accept + -- compressed/decompressed data. + + Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size; + -- Buffer size for Write user routine. + + procedure Write + (Filter : in out Filter_Type; + Item : in Ada.Streams.Stream_Element_Array; + Flush : in Flush_Mode := No_Flush); + -- Compress/Decompress data from Item to the generic parameter procedure + -- Write. Output buffer size could be set in Buffer_Size generic parameter. + + generic + with procedure Read + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + -- User should provide data for compression/decompression + -- thru this routine. + + Buffer : in out Ada.Streams.Stream_Element_Array; + -- Buffer for keep remaining data from the previous + -- back read. + + Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset; + -- Rest_First have to be initialized to Buffer'Last + 1 + -- Rest_Last have to be initialized to Buffer'Last + -- before usage. + + Allow_Read_Some : in Boolean := False; + -- Is it allowed to return Last < Item'Last before end of data. + + procedure Read + (Filter : in out Filter_Type; + Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode := No_Flush); + -- Compress/Decompress data from generic parameter procedure Read to the + -- Item. User should provide Buffer and initialized Rest_First, Rest_Last + -- indicators. If Allow_Read_Some is True, Read routines could return + -- Last < Item'Last only at end of stream. + +private + + use Ada.Streams; + + pragma Assert (Ada.Streams.Stream_Element'Size = 8); + pragma Assert (Ada.Streams.Stream_Element'Modulus = 2**8); + + type Flush_Mode is new Integer range 0 .. 5; + + type Compression_Method is new Integer range 8 .. 8; + + type Strategy_Type is new Integer range 0 .. 3; + + No_Flush : constant Flush_Mode := 0; + Partial_Flush : constant Flush_Mode := 1; + Sync_Flush : constant Flush_Mode := 2; + Full_Flush : constant Flush_Mode := 3; + Finish : constant Flush_Mode := 4; + Block_Flush : constant Flush_Mode := 5; + + Filtered : constant Strategy_Type := 1; + Huffman_Only : constant Strategy_Type := 2; + RLE : constant Strategy_Type := 3; + Default_Strategy : constant Strategy_Type := 0; + + Deflated : constant Compression_Method := 8; + + type Z_Stream; + + type Z_Stream_Access is access all Z_Stream; + + type Filter_Type is tagged limited record + Strm : Z_Stream_Access; + Compression : Boolean; + Stream_End : Boolean; + Header : Header_Type; + CRC : Unsigned_32; + Offset : Stream_Element_Offset; + -- Offset for gzip header/footer output. + end record; + +end ZLib; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.gpr b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.gpr new file mode 100644 index 000000000..296b22aa9 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/ada/zlib.gpr @@ -0,0 +1,20 @@ +project Zlib is + + for Languages use ("Ada"); + for Source_Dirs use ("."); + for Object_Dir use "."; + for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); + + package Compiler is + for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); + end Compiler; + + package Linker is + for Default_Switches ("ada") use ("-lz"); + end Linker; + + package Builder is + for Default_Switches ("ada") use ("-s", "-gnatQ"); + end Builder; + +end Zlib; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/amd64/amd64-match.S b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/amd64/amd64-match.S new file mode 100644 index 000000000..81d4a1c94 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/amd64/amd64-match.S @@ -0,0 +1,452 @@ +/* + * match.S -- optimized version of longest_match() + * based on the similar work by Gilles Vollant, and Brian Raiter, written 1998 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the BSD License. Use by owners of Che Guevarra + * parafernalia is prohibited, where possible, and highly discouraged + * elsewhere. + */ + +#ifndef NO_UNDERLINE +# define match_init _match_init +# define longest_match _longest_match +#endif + +#define scanend ebx +#define scanendw bx +#define chainlenwmask edx /* high word: current chain len low word: s->wmask */ +#define curmatch rsi +#define curmatchd esi +#define windowbestlen r8 +#define scanalign r9 +#define scanalignd r9d +#define window r10 +#define bestlen r11 +#define bestlend r11d +#define scanstart r12d +#define scanstartw r12w +#define scan r13 +#define nicematch r14d +#define limit r15 +#define limitd r15d +#define prev rcx + +/* + * The 258 is a "magic number, not a parameter -- changing it + * breaks the hell loose + */ +#define MAX_MATCH (258) +#define MIN_MATCH (3) +#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1) +#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7) + +/* stack frame offsets */ +#define LocalVarsSize (112) +#define _chainlenwmask ( 8-LocalVarsSize)(%rsp) +#define _windowbestlen (16-LocalVarsSize)(%rsp) +#define save_r14 (24-LocalVarsSize)(%rsp) +#define save_rsi (32-LocalVarsSize)(%rsp) +#define save_rbx (40-LocalVarsSize)(%rsp) +#define save_r12 (56-LocalVarsSize)(%rsp) +#define save_r13 (64-LocalVarsSize)(%rsp) +#define save_r15 (80-LocalVarsSize)(%rsp) + + +.globl match_init, longest_match + +/* + * On AMD64 the first argument of a function (in our case -- the pointer to + * deflate_state structure) is passed in %rdi, hence our offsets below are + * all off of that. + */ + +/* you can check the structure offset by running + +#include +#include +#include "deflate.h" + +void print_depl() +{ +deflate_state ds; +deflate_state *s=&ds; +printf("size pointer=%u\n",(int)sizeof(void*)); + +printf("#define dsWSize (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s))); +printf("#define dsWMask (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s))); +printf("#define dsWindow (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s))); +printf("#define dsPrev (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s))); +printf("#define dsMatchLen (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s))); +printf("#define dsPrevMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s))); +printf("#define dsStrStart (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s))); +printf("#define dsMatchStart (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s))); +printf("#define dsLookahead (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s))); +printf("#define dsPrevLen (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s))); +printf("#define dsMaxChainLen (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); +printf("#define dsGoodMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s))); +printf("#define dsNiceMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s))); +} + +*/ + + +/* + to compile for XCode 3.2 on MacOSX x86_64 + - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S" + */ + + +#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE +#define dsWSize ( 68)(%rdi) +#define dsWMask ( 76)(%rdi) +#define dsWindow ( 80)(%rdi) +#define dsPrev ( 96)(%rdi) +#define dsMatchLen (144)(%rdi) +#define dsPrevMatch (148)(%rdi) +#define dsStrStart (156)(%rdi) +#define dsMatchStart (160)(%rdi) +#define dsLookahead (164)(%rdi) +#define dsPrevLen (168)(%rdi) +#define dsMaxChainLen (172)(%rdi) +#define dsGoodMatch (188)(%rdi) +#define dsNiceMatch (192)(%rdi) + +#else + +#ifndef STRUCT_OFFSET +# define STRUCT_OFFSET (0) +#endif + + +#define dsWSize ( 56 + STRUCT_OFFSET)(%rdi) +#define dsWMask ( 64 + STRUCT_OFFSET)(%rdi) +#define dsWindow ( 72 + STRUCT_OFFSET)(%rdi) +#define dsPrev ( 88 + STRUCT_OFFSET)(%rdi) +#define dsMatchLen (136 + STRUCT_OFFSET)(%rdi) +#define dsPrevMatch (140 + STRUCT_OFFSET)(%rdi) +#define dsStrStart (148 + STRUCT_OFFSET)(%rdi) +#define dsMatchStart (152 + STRUCT_OFFSET)(%rdi) +#define dsLookahead (156 + STRUCT_OFFSET)(%rdi) +#define dsPrevLen (160 + STRUCT_OFFSET)(%rdi) +#define dsMaxChainLen (164 + STRUCT_OFFSET)(%rdi) +#define dsGoodMatch (180 + STRUCT_OFFSET)(%rdi) +#define dsNiceMatch (184 + STRUCT_OFFSET)(%rdi) + +#endif + + + + +.text + +/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */ + +longest_match: +/* + * Retrieve the function arguments. %curmatch will hold cur_match + * throughout the entire function (passed via rsi on amd64). + * rdi will hold the pointer to the deflate_state (first arg on amd64) + */ + mov %rsi, save_rsi + mov %rbx, save_rbx + mov %r12, save_r12 + mov %r13, save_r13 + mov %r14, save_r14 + mov %r15, save_r15 + +/* uInt wmask = s->w_mask; */ +/* unsigned chain_length = s->max_chain_length; */ +/* if (s->prev_length >= s->good_match) { */ +/* chain_length >>= 2; */ +/* } */ + + movl dsPrevLen, %eax + movl dsGoodMatch, %ebx + cmpl %ebx, %eax + movl dsWMask, %eax + movl dsMaxChainLen, %chainlenwmask + jl LastMatchGood + shrl $2, %chainlenwmask +LastMatchGood: + +/* chainlen is decremented once beforehand so that the function can */ +/* use the sign flag instead of the zero flag for the exit test. */ +/* It is then shifted into the high word, to make room for the wmask */ +/* value, which it will always accompany. */ + + decl %chainlenwmask + shll $16, %chainlenwmask + orl %eax, %chainlenwmask + +/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */ + + movl dsNiceMatch, %eax + movl dsLookahead, %ebx + cmpl %eax, %ebx + jl LookaheadLess + movl %eax, %ebx +LookaheadLess: movl %ebx, %nicematch + +/* register Bytef *scan = s->window + s->strstart; */ + + mov dsWindow, %window + movl dsStrStart, %limitd + lea (%limit, %window), %scan + +/* Determine how many bytes the scan ptr is off from being */ +/* dword-aligned. */ + + mov %scan, %scanalign + negl %scanalignd + andl $3, %scanalignd + +/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */ +/* s->strstart - (IPos)MAX_DIST(s) : NIL; */ + + movl dsWSize, %eax + subl $MIN_LOOKAHEAD, %eax + xorl %ecx, %ecx + subl %eax, %limitd + cmovng %ecx, %limitd + +/* int best_len = s->prev_length; */ + + movl dsPrevLen, %bestlend + +/* Store the sum of s->window + best_len in %windowbestlen locally, and in memory. */ + + lea (%window, %bestlen), %windowbestlen + mov %windowbestlen, _windowbestlen + +/* register ush scan_start = *(ushf*)scan; */ +/* register ush scan_end = *(ushf*)(scan+best_len-1); */ +/* Posf *prev = s->prev; */ + + movzwl (%scan), %scanstart + movzwl -1(%scan, %bestlen), %scanend + mov dsPrev, %prev + +/* Jump into the main loop. */ + + movl %chainlenwmask, _chainlenwmask + jmp LoopEntry + +.balign 16 + +/* do { + * match = s->window + cur_match; + * if (*(ushf*)(match+best_len-1) != scan_end || + * *(ushf*)match != scan_start) continue; + * [...] + * } while ((cur_match = prev[cur_match & wmask]) > limit + * && --chain_length != 0); + * + * Here is the inner loop of the function. The function will spend the + * majority of its time in this loop, and majority of that time will + * be spent in the first ten instructions. + */ +LookupLoop: + andl %chainlenwmask, %curmatchd + movzwl (%prev, %curmatch, 2), %curmatchd + cmpl %limitd, %curmatchd + jbe LeaveNow + subl $0x00010000, %chainlenwmask + js LeaveNow +LoopEntry: cmpw -1(%windowbestlen, %curmatch), %scanendw + jne LookupLoop + cmpw %scanstartw, (%window, %curmatch) + jne LookupLoop + +/* Store the current value of chainlen. */ + movl %chainlenwmask, _chainlenwmask + +/* %scan is the string under scrutiny, and %prev to the string we */ +/* are hoping to match it up with. In actuality, %esi and %edi are */ +/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */ +/* initialized to -(MAX_MATCH_8 - scanalign). */ + + mov $(-MAX_MATCH_8), %rdx + lea (%curmatch, %window), %windowbestlen + lea MAX_MATCH_8(%windowbestlen, %scanalign), %windowbestlen + lea MAX_MATCH_8(%scan, %scanalign), %prev + +/* the prefetching below makes very little difference... */ + prefetcht1 (%windowbestlen, %rdx) + prefetcht1 (%prev, %rdx) + +/* + * Test the strings for equality, 8 bytes at a time. At the end, + * adjust %rdx so that it is offset to the exact byte that mismatched. + * + * It should be confessed that this loop usually does not represent + * much of the total running time. Replacing it with a more + * straightforward "rep cmpsb" would not drastically degrade + * performance -- unrolling it, for example, makes no difference. + */ + +#undef USE_SSE /* works, but is 6-7% slower, than non-SSE... */ + +LoopCmps: +#ifdef USE_SSE + /* Preload the SSE registers */ + movdqu (%windowbestlen, %rdx), %xmm1 + movdqu (%prev, %rdx), %xmm2 + pcmpeqb %xmm2, %xmm1 + movdqu 16(%windowbestlen, %rdx), %xmm3 + movdqu 16(%prev, %rdx), %xmm4 + pcmpeqb %xmm4, %xmm3 + movdqu 32(%windowbestlen, %rdx), %xmm5 + movdqu 32(%prev, %rdx), %xmm6 + pcmpeqb %xmm6, %xmm5 + movdqu 48(%windowbestlen, %rdx), %xmm7 + movdqu 48(%prev, %rdx), %xmm8 + pcmpeqb %xmm8, %xmm7 + + /* Check the comparisions' results */ + pmovmskb %xmm1, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + /* this is the only iteration of the loop with a possibility of having + incremented rdx by 0x108 (each loop iteration add 16*4 = 0x40 + and (0x40*4)+8=0x108 */ + add $8, %rdx + jz LenMaximum + add $8, %rdx + + + pmovmskb %xmm3, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + + add $16, %rdx + + + pmovmskb %xmm5, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + add $16, %rdx + + + pmovmskb %xmm7, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + add $16, %rdx + + jmp LoopCmps +LeaveLoopCmps: add %rax, %rdx +#else + mov (%windowbestlen, %rdx), %rax + xor (%prev, %rdx), %rax + jnz LeaveLoopCmps + + mov 8(%windowbestlen, %rdx), %rax + xor 8(%prev, %rdx), %rax + jnz LeaveLoopCmps8 + + mov 16(%windowbestlen, %rdx), %rax + xor 16(%prev, %rdx), %rax + jnz LeaveLoopCmps16 + + add $24, %rdx + jnz LoopCmps + jmp LenMaximum +# if 0 +/* + * This three-liner is tantalizingly simple, but bsf is a slow instruction, + * and the complicated alternative down below is quite a bit faster. Sad... + */ + +LeaveLoopCmps: bsf %rax, %rax /* find the first non-zero bit */ + shrl $3, %eax /* divide by 8 to get the byte */ + add %rax, %rdx +# else +LeaveLoopCmps16: + add $8, %rdx +LeaveLoopCmps8: + add $8, %rdx +LeaveLoopCmps: testl $0xFFFFFFFF, %eax /* Check the first 4 bytes */ + jnz Check16 + add $4, %rdx + shr $32, %rax +Check16: testw $0xFFFF, %ax + jnz LenLower + add $2, %rdx + shrl $16, %eax +LenLower: subb $1, %al + adc $0, %rdx +# endif +#endif + +/* Calculate the length of the match. If it is longer than MAX_MATCH, */ +/* then automatically accept it as the best possible match and leave. */ + + lea (%prev, %rdx), %rax + sub %scan, %rax + cmpl $MAX_MATCH, %eax + jge LenMaximum + +/* If the length of the match is not longer than the best match we */ +/* have so far, then forget it and return to the lookup loop. */ + + cmpl %bestlend, %eax + jg LongerMatch + mov _windowbestlen, %windowbestlen + mov dsPrev, %prev + movl _chainlenwmask, %edx + jmp LookupLoop + +/* s->match_start = cur_match; */ +/* best_len = len; */ +/* if (len >= nice_match) break; */ +/* scan_end = *(ushf*)(scan+best_len-1); */ + +LongerMatch: + movl %eax, %bestlend + movl %curmatchd, dsMatchStart + cmpl %nicematch, %eax + jge LeaveNow + + lea (%window, %bestlen), %windowbestlen + mov %windowbestlen, _windowbestlen + + movzwl -1(%scan, %rax), %scanend + mov dsPrev, %prev + movl _chainlenwmask, %chainlenwmask + jmp LookupLoop + +/* Accept the current string, with the maximum possible length. */ + +LenMaximum: + movl $MAX_MATCH, %bestlend + movl %curmatchd, dsMatchStart + +/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */ +/* return s->lookahead; */ + +LeaveNow: + movl dsLookahead, %eax + cmpl %eax, %bestlend + cmovngl %bestlend, %eax +LookaheadRet: + +/* Restore the registers and return from whence we came. */ + + mov save_rsi, %rsi + mov save_rbx, %rbx + mov save_r12, %r12 + mov save_r13, %r13 + mov save_r14, %r14 + mov save_r15, %r15 + + ret + +match_init: ret diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/README.686 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/README.686 new file mode 100644 index 000000000..a0bf3bea4 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/README.686 @@ -0,0 +1,51 @@ +This is a patched version of zlib, modified to use +Pentium-Pro-optimized assembly code in the deflation algorithm. The +files changed/added by this patch are: + +README.686 +match.S + +The speedup that this patch provides varies, depending on whether the +compiler used to build the original version of zlib falls afoul of the +PPro's speed traps. My own tests show a speedup of around 10-20% at +the default compression level, and 20-30% using -9, against a version +compiled using gcc 2.7.2.3. Your mileage may vary. + +Note that this code has been tailored for the PPro/PII in particular, +and will not perform particuarly well on a Pentium. + +If you are using an assembler other than GNU as, you will have to +translate match.S to use your assembler's syntax. (Have fun.) + +Brian Raiter +breadbox@muppetlabs.com +April, 1998 + + +Added for zlib 1.1.3: + +The patches come from +http://www.muppetlabs.com/~breadbox/software/assembly.html + +To compile zlib with this asm file, copy match.S to the zlib directory +then do: + +CFLAGS="-O3 -DASMV" ./configure +make OBJA=match.o + + +Update: + +I've been ignoring these assembly routines for years, believing that +gcc's generated code had caught up with it sometime around gcc 2.95 +and the major rearchitecting of the Pentium 4. However, I recently +learned that, despite what I believed, this code still has some life +in it. On the Pentium 4 and AMD64 chips, it continues to run about 8% +faster than the code produced by gcc 4.1. + +In acknowledgement of its continuing usefulness, I've altered the +license to match that of the rest of zlib. Share and Enjoy! + +Brian Raiter +breadbox@muppetlabs.com +April, 2007 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/match.S b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/match.S new file mode 100644 index 000000000..fa4210927 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/asm686/match.S @@ -0,0 +1,357 @@ +/* match.S -- x86 assembly version of the zlib longest_match() function. + * Optimized for the Intel 686 chips (PPro and later). + * + * Copyright (C) 1998, 2007 Brian Raiter + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#ifndef NO_UNDERLINE +#define match_init _match_init +#define longest_match _longest_match +#endif + +#define MAX_MATCH (258) +#define MIN_MATCH (3) +#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1) +#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7) + +/* stack frame offsets */ + +#define chainlenwmask 0 /* high word: current chain len */ + /* low word: s->wmask */ +#define window 4 /* local copy of s->window */ +#define windowbestlen 8 /* s->window + bestlen */ +#define scanstart 16 /* first two bytes of string */ +#define scanend 12 /* last two bytes of string */ +#define scanalign 20 /* dword-misalignment of string */ +#define nicematch 24 /* a good enough match size */ +#define bestlen 28 /* size of best match so far */ +#define scan 32 /* ptr to string wanting match */ + +#define LocalVarsSize (36) +/* saved ebx 36 */ +/* saved edi 40 */ +/* saved esi 44 */ +/* saved ebp 48 */ +/* return address 52 */ +#define deflatestate 56 /* the function arguments */ +#define curmatch 60 + +/* All the +zlib1222add offsets are due to the addition of fields + * in zlib in the deflate_state structure since the asm code was first written + * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). + * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). + * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + */ + +#define zlib1222add (8) + +#define dsWSize (36+zlib1222add) +#define dsWMask (44+zlib1222add) +#define dsWindow (48+zlib1222add) +#define dsPrev (56+zlib1222add) +#define dsMatchLen (88+zlib1222add) +#define dsPrevMatch (92+zlib1222add) +#define dsStrStart (100+zlib1222add) +#define dsMatchStart (104+zlib1222add) +#define dsLookahead (108+zlib1222add) +#define dsPrevLen (112+zlib1222add) +#define dsMaxChainLen (116+zlib1222add) +#define dsGoodMatch (132+zlib1222add) +#define dsNiceMatch (136+zlib1222add) + + +.file "match.S" + +.globl match_init, longest_match + +.text + +/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */ +.cfi_sections .debug_frame + +longest_match: + +.cfi_startproc +/* Save registers that the compiler may be using, and adjust %esp to */ +/* make room for our stack frame. */ + + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset ebp, -8 + pushl %edi + .cfi_def_cfa_offset 12 + pushl %esi + .cfi_def_cfa_offset 16 + pushl %ebx + .cfi_def_cfa_offset 20 + subl $LocalVarsSize, %esp + .cfi_def_cfa_offset LocalVarsSize+20 + +/* Retrieve the function arguments. %ecx will hold cur_match */ +/* throughout the entire function. %edx will hold the pointer to the */ +/* deflate_state structure during the function's setup (before */ +/* entering the main loop). */ + + movl deflatestate(%esp), %edx + movl curmatch(%esp), %ecx + +/* uInt wmask = s->w_mask; */ +/* unsigned chain_length = s->max_chain_length; */ +/* if (s->prev_length >= s->good_match) { */ +/* chain_length >>= 2; */ +/* } */ + + movl dsPrevLen(%edx), %eax + movl dsGoodMatch(%edx), %ebx + cmpl %ebx, %eax + movl dsWMask(%edx), %eax + movl dsMaxChainLen(%edx), %ebx + jl LastMatchGood + shrl $2, %ebx +LastMatchGood: + +/* chainlen is decremented once beforehand so that the function can */ +/* use the sign flag instead of the zero flag for the exit test. */ +/* It is then shifted into the high word, to make room for the wmask */ +/* value, which it will always accompany. */ + + decl %ebx + shll $16, %ebx + orl %eax, %ebx + movl %ebx, chainlenwmask(%esp) + +/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */ + + movl dsNiceMatch(%edx), %eax + movl dsLookahead(%edx), %ebx + cmpl %eax, %ebx + jl LookaheadLess + movl %eax, %ebx +LookaheadLess: movl %ebx, nicematch(%esp) + +/* register Bytef *scan = s->window + s->strstart; */ + + movl dsWindow(%edx), %esi + movl %esi, window(%esp) + movl dsStrStart(%edx), %ebp + lea (%esi,%ebp), %edi + movl %edi, scan(%esp) + +/* Determine how many bytes the scan ptr is off from being */ +/* dword-aligned. */ + + movl %edi, %eax + negl %eax + andl $3, %eax + movl %eax, scanalign(%esp) + +/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */ +/* s->strstart - (IPos)MAX_DIST(s) : NIL; */ + + movl dsWSize(%edx), %eax + subl $MIN_LOOKAHEAD, %eax + subl %eax, %ebp + jg LimitPositive + xorl %ebp, %ebp +LimitPositive: + +/* int best_len = s->prev_length; */ + + movl dsPrevLen(%edx), %eax + movl %eax, bestlen(%esp) + +/* Store the sum of s->window + best_len in %esi locally, and in %esi. */ + + addl %eax, %esi + movl %esi, windowbestlen(%esp) + +/* register ush scan_start = *(ushf*)scan; */ +/* register ush scan_end = *(ushf*)(scan+best_len-1); */ +/* Posf *prev = s->prev; */ + + movzwl (%edi), %ebx + movl %ebx, scanstart(%esp) + movzwl -1(%edi,%eax), %ebx + movl %ebx, scanend(%esp) + movl dsPrev(%edx), %edi + +/* Jump into the main loop. */ + + movl chainlenwmask(%esp), %edx + jmp LoopEntry + +.balign 16 + +/* do { + * match = s->window + cur_match; + * if (*(ushf*)(match+best_len-1) != scan_end || + * *(ushf*)match != scan_start) continue; + * [...] + * } while ((cur_match = prev[cur_match & wmask]) > limit + * && --chain_length != 0); + * + * Here is the inner loop of the function. The function will spend the + * majority of its time in this loop, and majority of that time will + * be spent in the first ten instructions. + * + * Within this loop: + * %ebx = scanend + * %ecx = curmatch + * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) + * %esi = windowbestlen - i.e., (window + bestlen) + * %edi = prev + * %ebp = limit + */ +LookupLoop: + andl %edx, %ecx + movzwl (%edi,%ecx,2), %ecx + cmpl %ebp, %ecx + jbe LeaveNow + subl $0x00010000, %edx + js LeaveNow +LoopEntry: movzwl -1(%esi,%ecx), %eax + cmpl %ebx, %eax + jnz LookupLoop + movl window(%esp), %eax + movzwl (%eax,%ecx), %eax + cmpl scanstart(%esp), %eax + jnz LookupLoop + +/* Store the current value of chainlen. */ + + movl %edx, chainlenwmask(%esp) + +/* Point %edi to the string under scrutiny, and %esi to the string we */ +/* are hoping to match it up with. In actuality, %esi and %edi are */ +/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */ +/* initialized to -(MAX_MATCH_8 - scanalign). */ + + movl window(%esp), %esi + movl scan(%esp), %edi + addl %ecx, %esi + movl scanalign(%esp), %eax + movl $(-MAX_MATCH_8), %edx + lea MAX_MATCH_8(%edi,%eax), %edi + lea MAX_MATCH_8(%esi,%eax), %esi + +/* Test the strings for equality, 8 bytes at a time. At the end, + * adjust %edx so that it is offset to the exact byte that mismatched. + * + * We already know at this point that the first three bytes of the + * strings match each other, and they can be safely passed over before + * starting the compare loop. So what this code does is skip over 0-3 + * bytes, as much as necessary in order to dword-align the %edi + * pointer. (%esi will still be misaligned three times out of four.) + * + * It should be confessed that this loop usually does not represent + * much of the total running time. Replacing it with a more + * straightforward "rep cmpsb" would not drastically degrade + * performance. + */ +LoopCmps: + movl (%esi,%edx), %eax + xorl (%edi,%edx), %eax + jnz LeaveLoopCmps + movl 4(%esi,%edx), %eax + xorl 4(%edi,%edx), %eax + jnz LeaveLoopCmps4 + addl $8, %edx + jnz LoopCmps + jmp LenMaximum +LeaveLoopCmps4: addl $4, %edx +LeaveLoopCmps: testl $0x0000FFFF, %eax + jnz LenLower + addl $2, %edx + shrl $16, %eax +LenLower: subb $1, %al + adcl $0, %edx + +/* Calculate the length of the match. If it is longer than MAX_MATCH, */ +/* then automatically accept it as the best possible match and leave. */ + + lea (%edi,%edx), %eax + movl scan(%esp), %edi + subl %edi, %eax + cmpl $MAX_MATCH, %eax + jge LenMaximum + +/* If the length of the match is not longer than the best match we */ +/* have so far, then forget it and return to the lookup loop. */ + + movl deflatestate(%esp), %edx + movl bestlen(%esp), %ebx + cmpl %ebx, %eax + jg LongerMatch + movl windowbestlen(%esp), %esi + movl dsPrev(%edx), %edi + movl scanend(%esp), %ebx + movl chainlenwmask(%esp), %edx + jmp LookupLoop + +/* s->match_start = cur_match; */ +/* best_len = len; */ +/* if (len >= nice_match) break; */ +/* scan_end = *(ushf*)(scan+best_len-1); */ + +LongerMatch: movl nicematch(%esp), %ebx + movl %eax, bestlen(%esp) + movl %ecx, dsMatchStart(%edx) + cmpl %ebx, %eax + jge LeaveNow + movl window(%esp), %esi + addl %eax, %esi + movl %esi, windowbestlen(%esp) + movzwl -1(%edi,%eax), %ebx + movl dsPrev(%edx), %edi + movl %ebx, scanend(%esp) + movl chainlenwmask(%esp), %edx + jmp LookupLoop + +/* Accept the current string, with the maximum possible length. */ + +LenMaximum: movl deflatestate(%esp), %edx + movl $MAX_MATCH, bestlen(%esp) + movl %ecx, dsMatchStart(%edx) + +/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */ +/* return s->lookahead; */ + +LeaveNow: + movl deflatestate(%esp), %edx + movl bestlen(%esp), %ebx + movl dsLookahead(%edx), %eax + cmpl %eax, %ebx + jg LookaheadRet + movl %ebx, %eax +LookaheadRet: + +/* Restore the stack and return from whence we came. */ + + addl $LocalVarsSize, %esp + .cfi_def_cfa_offset 20 + popl %ebx + .cfi_def_cfa_offset 16 + popl %esi + .cfi_def_cfa_offset 12 + popl %edi + .cfi_def_cfa_offset 8 + popl %ebp + .cfi_def_cfa_offset 4 +.cfi_endproc +match_init: ret diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/Makefile b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/Makefile new file mode 100644 index 000000000..9be80bafe --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/Makefile @@ -0,0 +1,8 @@ +blast: blast.c blast.h + cc -DTEST -o blast blast.c + +test: blast + blast < test.pk | cmp - test.txt + +clean: + rm -f blast blast.o diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/README new file mode 100644 index 000000000..e3a60b3f5 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/README @@ -0,0 +1,4 @@ +Read blast.h for purpose and usage. + +Mark Adler +madler@alumni.caltech.edu diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.c new file mode 100644 index 000000000..e6e659073 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.c @@ -0,0 +1,466 @@ +/* blast.c + * Copyright (C) 2003, 2012, 2013 Mark Adler + * For conditions of distribution and use, see copyright notice in blast.h + * version 1.3, 24 Aug 2013 + * + * blast.c decompresses data compressed by the PKWare Compression Library. + * This function provides functionality similar to the explode() function of + * the PKWare library, hence the name "blast". + * + * This decompressor is based on the excellent format description provided by + * Ben Rudiak-Gould in comp.compression on August 13, 2001. Interestingly, the + * example Ben provided in the post is incorrect. The distance 110001 should + * instead be 111000. When corrected, the example byte stream becomes: + * + * 00 04 82 24 25 8f 80 7f + * + * which decompresses to "AIAIAIAIAIAIA" (without the quotes). + */ + +/* + * Change history: + * + * 1.0 12 Feb 2003 - First version + * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data + * 1.2 24 Oct 2012 - Add note about using binary mode in stdio + * - Fix comparisons of differently signed integers + * 1.3 24 Aug 2013 - Return unused input from blast() + * - Fix test code to correctly report unused input + * - Enable the provision of initial input to blast() + */ + +#include /* for NULL */ +#include /* for setjmp(), longjmp(), and jmp_buf */ +#include "blast.h" /* prototype for blast() */ + +#define local static /* for local function definitions */ +#define MAXBITS 13 /* maximum code length */ +#define MAXWIN 4096 /* maximum window size */ + +/* input and output state */ +struct state { + /* input state */ + blast_in infun; /* input function provided by user */ + void *inhow; /* opaque information passed to infun() */ + unsigned char *in; /* next input location */ + unsigned left; /* available input at in */ + int bitbuf; /* bit buffer */ + int bitcnt; /* number of bits in bit buffer */ + + /* input limit error return state for bits() and decode() */ + jmp_buf env; + + /* output state */ + blast_out outfun; /* output function provided by user */ + void *outhow; /* opaque information passed to outfun() */ + unsigned next; /* index of next write location in out[] */ + int first; /* true to check distances (for first 4K) */ + unsigned char out[MAXWIN]; /* output buffer and sliding window */ +}; + +/* + * Return need bits from the input stream. This always leaves less than + * eight bits in the buffer. bits() works properly for need == 0. + * + * Format notes: + * + * - Bits are stored in bytes from the least significant bit to the most + * significant bit. Therefore bits are dropped from the bottom of the bit + * buffer, using shift right, and new bytes are appended to the top of the + * bit buffer, using shift left. + */ +local int bits(struct state *s, int need) +{ + int val; /* bit accumulator */ + + /* load at least need bits into val */ + val = s->bitbuf; + while (s->bitcnt < need) { + if (s->left == 0) { + s->left = s->infun(s->inhow, &(s->in)); + if (s->left == 0) longjmp(s->env, 1); /* out of input */ + } + val |= (int)(*(s->in)++) << s->bitcnt; /* load eight bits */ + s->left--; + s->bitcnt += 8; + } + + /* drop need bits and update buffer, always zero to seven bits left */ + s->bitbuf = val >> need; + s->bitcnt -= need; + + /* return need bits, zeroing the bits above that */ + return val & ((1 << need) - 1); +} + +/* + * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of + * each length, which for a canonical code are stepped through in order. + * symbol[] are the symbol values in canonical order, where the number of + * entries is the sum of the counts in count[]. The decoding process can be + * seen in the function decode() below. + */ +struct huffman { + short *count; /* number of symbols of each length */ + short *symbol; /* canonically ordered symbols */ +}; + +/* + * Decode a code from the stream s using huffman table h. Return the symbol or + * a negative value if there is an error. If all of the lengths are zero, i.e. + * an empty code, or if the code is incomplete and an invalid code is received, + * then -9 is returned after reading MAXBITS bits. + * + * Format notes: + * + * - The codes as stored in the compressed data are bit-reversed relative to + * a simple integer ordering of codes of the same lengths. Hence below the + * bits are pulled from the compressed data one at a time and used to + * build the code value reversed from what is in the stream in order to + * permit simple integer comparisons for decoding. + * + * - The first code for the shortest length is all ones. Subsequent codes of + * the same length are simply integer decrements of the previous code. When + * moving up a length, a one bit is appended to the code. For a complete + * code, the last code of the longest length will be all zeros. To support + * this ordering, the bits pulled during decoding are inverted to apply the + * more "natural" ordering starting with all zeros and incrementing. + */ +local int decode(struct state *s, struct huffman *h) +{ + int len; /* current number of bits in code */ + int code; /* len bits being decoded */ + int first; /* first code of length len */ + int count; /* number of codes of length len */ + int index; /* index of first code of length len in symbol table */ + int bitbuf; /* bits from stream */ + int left; /* bits left in next or left to process */ + short *next; /* next number of codes */ + + bitbuf = s->bitbuf; + left = s->bitcnt; + code = first = index = 0; + len = 1; + next = h->count + 1; + while (1) { + while (left--) { + code |= (bitbuf & 1) ^ 1; /* invert code */ + bitbuf >>= 1; + count = *next++; + if (code < first + count) { /* if length len, return symbol */ + s->bitbuf = bitbuf; + s->bitcnt = (s->bitcnt - len) & 7; + return h->symbol[index + (code - first)]; + } + index += count; /* else update for next length */ + first += count; + first <<= 1; + code <<= 1; + len++; + } + left = (MAXBITS+1) - len; + if (left == 0) break; + if (s->left == 0) { + s->left = s->infun(s->inhow, &(s->in)); + if (s->left == 0) longjmp(s->env, 1); /* out of input */ + } + bitbuf = *(s->in)++; + s->left--; + if (left > 8) left = 8; + } + return -9; /* ran out of codes */ +} + +/* + * Given a list of repeated code lengths rep[0..n-1], where each byte is a + * count (high four bits + 1) and a code length (low four bits), generate the + * list of code lengths. This compaction reduces the size of the object code. + * Then given the list of code lengths length[0..n-1] representing a canonical + * Huffman code for n symbols, construct the tables required to decode those + * codes. Those tables are the number of codes of each length, and the symbols + * sorted by length, retaining their original order within each length. The + * return value is zero for a complete code set, negative for an over- + * subscribed code set, and positive for an incomplete code set. The tables + * can be used if the return value is zero or positive, but they cannot be used + * if the return value is negative. If the return value is zero, it is not + * possible for decode() using that table to return an error--any stream of + * enough bits will resolve to a symbol. If the return value is positive, then + * it is possible for decode() using that table to return an error for received + * codes past the end of the incomplete lengths. + */ +local int construct(struct huffman *h, const unsigned char *rep, int n) +{ + int symbol; /* current symbol when stepping through length[] */ + int len; /* current length when stepping through h->count[] */ + int left; /* number of possible codes left of current length */ + short offs[MAXBITS+1]; /* offsets in symbol table for each length */ + short length[256]; /* code lengths */ + + /* convert compact repeat counts into symbol bit length list */ + symbol = 0; + do { + len = *rep++; + left = (len >> 4) + 1; + len &= 15; + do { + length[symbol++] = len; + } while (--left); + } while (--n); + n = symbol; + + /* count number of codes of each length */ + for (len = 0; len <= MAXBITS; len++) + h->count[len] = 0; + for (symbol = 0; symbol < n; symbol++) + (h->count[length[symbol]])++; /* assumes lengths are within bounds */ + if (h->count[0] == n) /* no codes! */ + return 0; /* complete, but decode() will fail */ + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; /* one possible code of zero length */ + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; /* one more bit, double codes left */ + left -= h->count[len]; /* deduct count from possible codes */ + if (left < 0) return left; /* over-subscribed--return negative */ + } /* left > 0 means incomplete */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + h->count[len]; + + /* + * put symbols in table sorted by length, by symbol order within each + * length + */ + for (symbol = 0; symbol < n; symbol++) + if (length[symbol] != 0) + h->symbol[offs[length[symbol]]++] = symbol; + + /* return zero for complete set, positive for incomplete set */ + return left; +} + +/* + * Decode PKWare Compression Library stream. + * + * Format notes: + * + * - First byte is 0 if literals are uncoded or 1 if they are coded. Second + * byte is 4, 5, or 6 for the number of extra bits in the distance code. + * This is the base-2 logarithm of the dictionary size minus six. + * + * - Compressed data is a combination of literals and length/distance pairs + * terminated by an end code. Literals are either Huffman coded or + * uncoded bytes. A length/distance pair is a coded length followed by a + * coded distance to represent a string that occurs earlier in the + * uncompressed data that occurs again at the current location. + * + * - A bit preceding a literal or length/distance pair indicates which comes + * next, 0 for literals, 1 for length/distance. + * + * - If literals are uncoded, then the next eight bits are the literal, in the + * normal bit order in the stream, i.e. no bit-reversal is needed. Similarly, + * no bit reversal is needed for either the length extra bits or the distance + * extra bits. + * + * - Literal bytes are simply written to the output. A length/distance pair is + * an instruction to copy previously uncompressed bytes to the output. The + * copy is from distance bytes back in the output stream, copying for length + * bytes. + * + * - Distances pointing before the beginning of the output data are not + * permitted. + * + * - Overlapped copies, where the length is greater than the distance, are + * allowed and common. For example, a distance of one and a length of 518 + * simply copies the last byte 518 times. A distance of four and a length of + * twelve copies the last four bytes three times. A simple forward copy + * ignoring whether the length is greater than the distance or not implements + * this correctly. + */ +local int decomp(struct state *s) +{ + int lit; /* true if literals are coded */ + int dict; /* log2(dictionary size) - 6 */ + int symbol; /* decoded symbol, extra bits for distance */ + int len; /* length for copy */ + unsigned dist; /* distance for copy */ + int copy; /* copy counter */ + unsigned char *from, *to; /* copy pointers */ + static int virgin = 1; /* build tables once */ + static short litcnt[MAXBITS+1], litsym[256]; /* litcode memory */ + static short lencnt[MAXBITS+1], lensym[16]; /* lencode memory */ + static short distcnt[MAXBITS+1], distsym[64]; /* distcode memory */ + static struct huffman litcode = {litcnt, litsym}; /* length code */ + static struct huffman lencode = {lencnt, lensym}; /* length code */ + static struct huffman distcode = {distcnt, distsym};/* distance code */ + /* bit lengths of literal codes */ + static const unsigned char litlen[] = { + 11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8, + 9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5, + 7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12, + 8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27, + 44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45, + 44, 173}; + /* bit lengths of length codes 0..15 */ + static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23}; + /* bit lengths of distance codes 0..63 */ + static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248}; + static const short base[16] = { /* base for length codes */ + 3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264}; + static const char extra[16] = { /* extra bits for length codes */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8}; + + /* set up decoding tables (once--might not be thread-safe) */ + if (virgin) { + construct(&litcode, litlen, sizeof(litlen)); + construct(&lencode, lenlen, sizeof(lenlen)); + construct(&distcode, distlen, sizeof(distlen)); + virgin = 0; + } + + /* read header */ + lit = bits(s, 8); + if (lit > 1) return -1; + dict = bits(s, 8); + if (dict < 4 || dict > 6) return -2; + + /* decode literals and length/distance pairs */ + do { + if (bits(s, 1)) { + /* get length */ + symbol = decode(s, &lencode); + len = base[symbol] + bits(s, extra[symbol]); + if (len == 519) break; /* end code */ + + /* get distance */ + symbol = len == 2 ? 2 : dict; + dist = decode(s, &distcode) << symbol; + dist += bits(s, symbol); + dist++; + if (s->first && dist > s->next) + return -3; /* distance too far back */ + + /* copy length bytes from distance bytes back */ + do { + to = s->out + s->next; + from = to - dist; + copy = MAXWIN; + if (s->next < dist) { + from += copy; + copy = dist; + } + copy -= s->next; + if (copy > len) copy = len; + len -= copy; + s->next += copy; + do { + *to++ = *from++; + } while (--copy); + if (s->next == MAXWIN) { + if (s->outfun(s->outhow, s->out, s->next)) return 1; + s->next = 0; + s->first = 0; + } + } while (len != 0); + } + else { + /* get literal and write it */ + symbol = lit ? decode(s, &litcode) : bits(s, 8); + s->out[s->next++] = symbol; + if (s->next == MAXWIN) { + if (s->outfun(s->outhow, s->out, s->next)) return 1; + s->next = 0; + s->first = 0; + } + } + } while (1); + return 0; +} + +/* See comments in blast.h */ +int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow, + unsigned *left, unsigned char **in) +{ + struct state s; /* input/output state */ + int err; /* return value */ + + /* initialize input state */ + s.infun = infun; + s.inhow = inhow; + if (left != NULL && *left) { + s.left = *left; + s.in = *in; + } + else + s.left = 0; + s.bitbuf = 0; + s.bitcnt = 0; + + /* initialize output state */ + s.outfun = outfun; + s.outhow = outhow; + s.next = 0; + s.first = 1; + + /* return if bits() or decode() tries to read past available input */ + if (setjmp(s.env) != 0) /* if came back here via longjmp(), */ + err = 2; /* then skip decomp(), return error */ + else + err = decomp(&s); /* decompress */ + + /* return unused input */ + if (left != NULL) + *left = s.left; + if (in != NULL) + *in = s.left ? s.in : NULL; + + /* write any leftover output and update the error code if needed */ + if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0) + err = 1; + return err; +} + +#ifdef TEST +/* Example of how to use blast() */ +#include +#include + +#define CHUNK 16384 + +local unsigned inf(void *how, unsigned char **buf) +{ + static unsigned char hold[CHUNK]; + + *buf = hold; + return fread(hold, 1, CHUNK, (FILE *)how); +} + +local int outf(void *how, unsigned char *buf, unsigned len) +{ + return fwrite(buf, 1, len, (FILE *)how) != len; +} + +/* Decompress a PKWare Compression Library stream from stdin to stdout */ +int main(void) +{ + int ret; + unsigned left; + + /* decompress to stdout */ + left = 0; + ret = blast(inf, stdin, outf, stdout, &left, NULL); + if (ret != 0) + fprintf(stderr, "blast error: %d\n", ret); + + /* count any leftover bytes */ + while (getchar() != EOF) + left++; + if (left) + fprintf(stderr, "blast warning: %u unused bytes of input\n", left); + + /* return blast() error code */ + return ret; +} +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.h new file mode 100644 index 000000000..6cf65eda1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/blast.h @@ -0,0 +1,83 @@ +/* blast.h -- interface for blast.c + Copyright (C) 2003, 2012, 2013 Mark Adler + version 1.3, 24 Aug 2013 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + + +/* + * blast() decompresses the PKWare Data Compression Library (DCL) compressed + * format. It provides the same functionality as the explode() function in + * that library. (Note: PKWare overused the "implode" verb, and the format + * used by their library implode() function is completely different and + * incompatible with the implode compression method supported by PKZIP.) + * + * The binary mode for stdio functions should be used to assure that the + * compressed data is not corrupted when read or written. For example: + * fopen(..., "rb") and fopen(..., "wb"). + */ + + +typedef unsigned (*blast_in)(void *how, unsigned char **buf); +typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len); +/* Definitions for input/output functions passed to blast(). See below for + * what the provided functions need to do. + */ + + +int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow, + unsigned *left, unsigned char **in); +/* Decompress input to output using the provided infun() and outfun() calls. + * On success, the return value of blast() is zero. If there is an error in + * the source data, i.e. it is not in the proper format, then a negative value + * is returned. If there is not enough input available or there is not enough + * output space, then a positive error is returned. + * + * The input function is invoked: len = infun(how, &buf), where buf is set by + * infun() to point to the input buffer, and infun() returns the number of + * available bytes there. If infun() returns zero, then blast() returns with + * an input error. (blast() only asks for input if it needs it.) inhow is for + * use by the application to pass an input descriptor to infun(), if desired. + * + * If left and in are not NULL and *left is not zero when blast() is called, + * then the *left bytes are *in are consumed for input before infun() is used. + * + * The output function is invoked: err = outfun(how, buf, len), where the bytes + * to be written are buf[0..len-1]. If err is not zero, then blast() returns + * with an output error. outfun() is always called with len <= 4096. outhow + * is for use by the application to pass an output descriptor to outfun(), if + * desired. + * + * If there is any unused input, *left is set to the number of bytes that were + * read and *in points to them. Otherwise *left is set to zero and *in is set + * to NULL. If left or in are NULL, then they are not set. + * + * The return codes are: + * + * 2: ran out of input before completing decompression + * 1: output error before completing decompression + * 0: successful decompression + * -1: literal flag not zero or one + * -2: dictionary size not in 4..6 + * -3: distance is too far back + * + * At the bottom of blast.c is an example program that uses blast() that can be + * compiled to produce a command-line decompression filter by defining TEST. + */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.pk b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.pk new file mode 100644 index 000000000..be10b2bbb Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.pk differ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.txt new file mode 100644 index 000000000..bfdf1c5dc --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/blast/test.txt @@ -0,0 +1 @@ +AIAIAIAIAIAIA \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLib.pas b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLib.pas new file mode 100644 index 000000000..060e19911 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLib.pas @@ -0,0 +1,557 @@ +{*******************************************************} +{ } +{ Borland Delphi Supplemental Components } +{ ZLIB Data Compression Interface Unit } +{ } +{ Copyright (c) 1997,99 Borland Corporation } +{ } +{*******************************************************} + +{ Updated for zlib 1.2.x by Cosmin Truta } + +unit ZLib; + +interface + +uses SysUtils, Classes; + +type + TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl; + TFree = procedure (AppData, Block: Pointer); cdecl; + + // Internal structure. Ignore. + TZStreamRec = packed record + next_in: PChar; // next input byte + avail_in: Integer; // number of bytes available at next_in + total_in: Longint; // total nb of input bytes read so far + + next_out: PChar; // next output byte should be put here + avail_out: Integer; // remaining free space at next_out + total_out: Longint; // total nb of bytes output so far + + msg: PChar; // last error message, NULL if no error + internal: Pointer; // not visible by applications + + zalloc: TAlloc; // used to allocate the internal state + zfree: TFree; // used to free the internal state + AppData: Pointer; // private data object passed to zalloc and zfree + + data_type: Integer; // best guess about the data type: ascii or binary + adler: Longint; // adler32 value of the uncompressed data + reserved: Longint; // reserved for future use + end; + + // Abstract ancestor class + TCustomZlibStream = class(TStream) + private + FStrm: TStream; + FStrmPos: Integer; + FOnProgress: TNotifyEvent; + FZRec: TZStreamRec; + FBuffer: array [Word] of Char; + protected + procedure Progress(Sender: TObject); dynamic; + property OnProgress: TNotifyEvent read FOnProgress write FOnProgress; + constructor Create(Strm: TStream); + end; + +{ TCompressionStream compresses data on the fly as data is written to it, and + stores the compressed data to another stream. + + TCompressionStream is write-only and strictly sequential. Reading from the + stream will raise an exception. Using Seek to move the stream pointer + will raise an exception. + + Output data is cached internally, written to the output stream only when + the internal output buffer is full. All pending output data is flushed + when the stream is destroyed. + + The Position property returns the number of uncompressed bytes of + data that have been written to the stream so far. + + CompressionRate returns the on-the-fly percentage by which the original + data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100 + If raw data size = 100 and compressed data size = 25, the CompressionRate + is 75% + + The OnProgress event is called each time the output buffer is filled and + written to the output stream. This is useful for updating a progress + indicator when you are writing a large chunk of data to the compression + stream in a single call.} + + + TCompressionLevel = (clNone, clFastest, clDefault, clMax); + + TCompressionStream = class(TCustomZlibStream) + private + function GetCompressionRate: Single; + public + constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream); + destructor Destroy; override; + function Read(var Buffer; Count: Longint): Longint; override; + function Write(const Buffer; Count: Longint): Longint; override; + function Seek(Offset: Longint; Origin: Word): Longint; override; + property CompressionRate: Single read GetCompressionRate; + property OnProgress; + end; + +{ TDecompressionStream decompresses data on the fly as data is read from it. + + Compressed data comes from a separate source stream. TDecompressionStream + is read-only and unidirectional; you can seek forward in the stream, but not + backwards. The special case of setting the stream position to zero is + allowed. Seeking forward decompresses data until the requested position in + the uncompressed data has been reached. Seeking backwards, seeking relative + to the end of the stream, requesting the size of the stream, and writing to + the stream will raise an exception. + + The Position property returns the number of bytes of uncompressed data that + have been read from the stream so far. + + The OnProgress event is called each time the internal input buffer of + compressed data is exhausted and the next block is read from the input stream. + This is useful for updating a progress indicator when you are reading a + large chunk of data from the decompression stream in a single call.} + + TDecompressionStream = class(TCustomZlibStream) + public + constructor Create(Source: TStream); + destructor Destroy; override; + function Read(var Buffer; Count: Longint): Longint; override; + function Write(const Buffer; Count: Longint): Longint; override; + function Seek(Offset: Longint; Origin: Word): Longint; override; + property OnProgress; + end; + + + +{ CompressBuf compresses data, buffer to buffer, in one call. + In: InBuf = ptr to compressed data + InBytes = number of bytes in InBuf + Out: OutBuf = ptr to newly allocated buffer containing decompressed data + OutBytes = number of bytes in OutBuf } +procedure CompressBuf(const InBuf: Pointer; InBytes: Integer; + out OutBuf: Pointer; out OutBytes: Integer); + + +{ DecompressBuf decompresses data, buffer to buffer, in one call. + In: InBuf = ptr to compressed data + InBytes = number of bytes in InBuf + OutEstimate = zero, or est. size of the decompressed data + Out: OutBuf = ptr to newly allocated buffer containing decompressed data + OutBytes = number of bytes in OutBuf } +procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; + OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); + +{ DecompressToUserBuf decompresses data, buffer to buffer, in one call. + In: InBuf = ptr to compressed data + InBytes = number of bytes in InBuf + Out: OutBuf = ptr to user-allocated buffer to contain decompressed data + BufSize = number of bytes in OutBuf } +procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; + const OutBuf: Pointer; BufSize: Integer); + +const + zlib_version = '1.2.11'; + +type + EZlibError = class(Exception); + ECompressionError = class(EZlibError); + EDecompressionError = class(EZlibError); + +implementation + +uses ZLibConst; + +const + Z_NO_FLUSH = 0; + Z_PARTIAL_FLUSH = 1; + Z_SYNC_FLUSH = 2; + Z_FULL_FLUSH = 3; + Z_FINISH = 4; + + Z_OK = 0; + Z_STREAM_END = 1; + Z_NEED_DICT = 2; + Z_ERRNO = (-1); + Z_STREAM_ERROR = (-2); + Z_DATA_ERROR = (-3); + Z_MEM_ERROR = (-4); + Z_BUF_ERROR = (-5); + Z_VERSION_ERROR = (-6); + + Z_NO_COMPRESSION = 0; + Z_BEST_SPEED = 1; + Z_BEST_COMPRESSION = 9; + Z_DEFAULT_COMPRESSION = (-1); + + Z_FILTERED = 1; + Z_HUFFMAN_ONLY = 2; + Z_RLE = 3; + Z_DEFAULT_STRATEGY = 0; + + Z_BINARY = 0; + Z_ASCII = 1; + Z_UNKNOWN = 2; + + Z_DEFLATED = 8; + + +{$L adler32.obj} +{$L compress.obj} +{$L crc32.obj} +{$L deflate.obj} +{$L infback.obj} +{$L inffast.obj} +{$L inflate.obj} +{$L inftrees.obj} +{$L trees.obj} +{$L uncompr.obj} +{$L zutil.obj} + +procedure adler32; external; +procedure compressBound; external; +procedure crc32; external; +procedure deflateInit2_; external; +procedure deflateParams; external; + +function _malloc(Size: Integer): Pointer; cdecl; +begin + Result := AllocMem(Size); +end; + +procedure _free(Block: Pointer); cdecl; +begin + FreeMem(Block); +end; + +procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl; +begin + FillChar(P^, count, B); +end; + +procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; +begin + Move(source^, dest^, count); +end; + + + +// deflate compresses data +function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar; + recsize: Integer): Integer; external; +function deflate(var strm: TZStreamRec; flush: Integer): Integer; external; +function deflateEnd(var strm: TZStreamRec): Integer; external; + +// inflate decompresses data +function inflateInit_(var strm: TZStreamRec; version: PChar; + recsize: Integer): Integer; external; +function inflate(var strm: TZStreamRec; flush: Integer): Integer; external; +function inflateEnd(var strm: TZStreamRec): Integer; external; +function inflateReset(var strm: TZStreamRec): Integer; external; + + +function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl; +begin +// GetMem(Result, Items*Size); + Result := AllocMem(Items * Size); +end; + +procedure zlibFreeMem(AppData, Block: Pointer); cdecl; +begin + FreeMem(Block); +end; + +{function zlibCheck(code: Integer): Integer; +begin + Result := code; + if code < 0 then + raise EZlibError.Create('error'); //!! +end;} + +function CCheck(code: Integer): Integer; +begin + Result := code; + if code < 0 then + raise ECompressionError.Create('error'); //!! +end; + +function DCheck(code: Integer): Integer; +begin + Result := code; + if code < 0 then + raise EDecompressionError.Create('error'); //!! +end; + +procedure CompressBuf(const InBuf: Pointer; InBytes: Integer; + out OutBuf: Pointer; out OutBytes: Integer); +var + strm: TZStreamRec; + P: Pointer; +begin + FillChar(strm, sizeof(strm), 0); + strm.zalloc := zlibAllocMem; + strm.zfree := zlibFreeMem; + OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255; + GetMem(OutBuf, OutBytes); + try + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := OutBytes; + CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm))); + try + while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do + begin + P := OutBuf; + Inc(OutBytes, 256); + ReallocMem(OutBuf, OutBytes); + strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P))); + strm.avail_out := 256; + end; + finally + CCheck(deflateEnd(strm)); + end; + ReallocMem(OutBuf, strm.total_out); + OutBytes := strm.total_out; + except + FreeMem(OutBuf); + raise + end; +end; + + +procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; + OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); +var + strm: TZStreamRec; + P: Pointer; + BufInc: Integer; +begin + FillChar(strm, sizeof(strm), 0); + strm.zalloc := zlibAllocMem; + strm.zfree := zlibFreeMem; + BufInc := (InBytes + 255) and not 255; + if OutEstimate = 0 then + OutBytes := BufInc + else + OutBytes := OutEstimate; + GetMem(OutBuf, OutBytes); + try + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := OutBytes; + DCheck(inflateInit_(strm, zlib_version, sizeof(strm))); + try + while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do + begin + P := OutBuf; + Inc(OutBytes, BufInc); + ReallocMem(OutBuf, OutBytes); + strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P))); + strm.avail_out := BufInc; + end; + finally + DCheck(inflateEnd(strm)); + end; + ReallocMem(OutBuf, strm.total_out); + OutBytes := strm.total_out; + except + FreeMem(OutBuf); + raise + end; +end; + +procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; + const OutBuf: Pointer; BufSize: Integer); +var + strm: TZStreamRec; +begin + FillChar(strm, sizeof(strm), 0); + strm.zalloc := zlibAllocMem; + strm.zfree := zlibFreeMem; + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := BufSize; + DCheck(inflateInit_(strm, zlib_version, sizeof(strm))); + try + if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then + raise EZlibError.CreateRes(@sTargetBufferTooSmall); + finally + DCheck(inflateEnd(strm)); + end; +end; + +// TCustomZlibStream + +constructor TCustomZLibStream.Create(Strm: TStream); +begin + inherited Create; + FStrm := Strm; + FStrmPos := Strm.Position; + FZRec.zalloc := zlibAllocMem; + FZRec.zfree := zlibFreeMem; +end; + +procedure TCustomZLibStream.Progress(Sender: TObject); +begin + if Assigned(FOnProgress) then FOnProgress(Sender); +end; + + +// TCompressionStream + +constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel; + Dest: TStream); +const + Levels: array [TCompressionLevel] of ShortInt = + (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION); +begin + inherited Create(Dest); + FZRec.next_out := FBuffer; + FZRec.avail_out := sizeof(FBuffer); + CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec))); +end; + +destructor TCompressionStream.Destroy; +begin + FZRec.next_in := nil; + FZRec.avail_in := 0; + try + if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; + while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END) + and (FZRec.avail_out = 0) do + begin + FStrm.WriteBuffer(FBuffer, sizeof(FBuffer)); + FZRec.next_out := FBuffer; + FZRec.avail_out := sizeof(FBuffer); + end; + if FZRec.avail_out < sizeof(FBuffer) then + FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out); + finally + deflateEnd(FZRec); + end; + inherited Destroy; +end; + +function TCompressionStream.Read(var Buffer; Count: Longint): Longint; +begin + raise ECompressionError.CreateRes(@sInvalidStreamOp); +end; + +function TCompressionStream.Write(const Buffer; Count: Longint): Longint; +begin + FZRec.next_in := @Buffer; + FZRec.avail_in := Count; + if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; + while (FZRec.avail_in > 0) do + begin + CCheck(deflate(FZRec, 0)); + if FZRec.avail_out = 0 then + begin + FStrm.WriteBuffer(FBuffer, sizeof(FBuffer)); + FZRec.next_out := FBuffer; + FZRec.avail_out := sizeof(FBuffer); + FStrmPos := FStrm.Position; + Progress(Self); + end; + end; + Result := Count; +end; + +function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint; +begin + if (Offset = 0) and (Origin = soFromCurrent) then + Result := FZRec.total_in + else + raise ECompressionError.CreateRes(@sInvalidStreamOp); +end; + +function TCompressionStream.GetCompressionRate: Single; +begin + if FZRec.total_in = 0 then + Result := 0 + else + Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0; +end; + + +// TDecompressionStream + +constructor TDecompressionStream.Create(Source: TStream); +begin + inherited Create(Source); + FZRec.next_in := FBuffer; + FZRec.avail_in := 0; + DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec))); +end; + +destructor TDecompressionStream.Destroy; +begin + FStrm.Seek(-FZRec.avail_in, 1); + inflateEnd(FZRec); + inherited Destroy; +end; + +function TDecompressionStream.Read(var Buffer; Count: Longint): Longint; +begin + FZRec.next_out := @Buffer; + FZRec.avail_out := Count; + if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; + while (FZRec.avail_out > 0) do + begin + if FZRec.avail_in = 0 then + begin + FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer)); + if FZRec.avail_in = 0 then + begin + Result := Count - FZRec.avail_out; + Exit; + end; + FZRec.next_in := FBuffer; + FStrmPos := FStrm.Position; + Progress(Self); + end; + CCheck(inflate(FZRec, 0)); + end; + Result := Count; +end; + +function TDecompressionStream.Write(const Buffer; Count: Longint): Longint; +begin + raise EDecompressionError.CreateRes(@sInvalidStreamOp); +end; + +function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint; +var + I: Integer; + Buf: array [0..4095] of Char; +begin + if (Offset = 0) and (Origin = soFromBeginning) then + begin + DCheck(inflateReset(FZRec)); + FZRec.next_in := FBuffer; + FZRec.avail_in := 0; + FStrm.Position := 0; + FStrmPos := 0; + end + else if ( (Offset >= 0) and (Origin = soFromCurrent)) or + ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then + begin + if Origin = soFromBeginning then Dec(Offset, FZRec.total_out); + if Offset > 0 then + begin + for I := 1 to Offset div sizeof(Buf) do + ReadBuffer(Buf, sizeof(Buf)); + ReadBuffer(Buf, Offset mod sizeof(Buf)); + end; + end + else + raise EDecompressionError.CreateRes(@sInvalidStreamOp); + Result := FZRec.total_out; +end; + + +end. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLibConst.pas b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLibConst.pas new file mode 100644 index 000000000..cdfe13671 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/ZLibConst.pas @@ -0,0 +1,11 @@ +unit ZLibConst; + +interface + +resourcestring + sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; + sInvalidStreamOp = 'Invalid stream operation'; + +implementation + +end. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/readme.txt new file mode 100644 index 000000000..2dc9a8bba --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/readme.txt @@ -0,0 +1,76 @@ + +Overview +======== + +This directory contains an update to the ZLib interface unit, +distributed by Borland as a Delphi supplemental component. + +The original ZLib unit is Copyright (c) 1997,99 Borland Corp., +and is based on zlib version 1.0.4. There are a series of bugs +and security problems associated with that old zlib version, and +we recommend the users to update their ZLib unit. + + +Summary of modifications +======================== + +- Improved makefile, adapted to zlib version 1.2.1. + +- Some field types from TZStreamRec are changed from Integer to + Longint, for consistency with the zlib.h header, and for 64-bit + readiness. + +- The zlib_version constant is updated. + +- The new Z_RLE strategy has its corresponding symbolic constant. + +- The allocation and deallocation functions and function types + (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl, + and _malloc and _free are added as C RTL stubs. As a result, + the original C sources of zlib can be compiled out of the box, + and linked to the ZLib unit. + + +Suggestions for improvements +============================ + +Currently, the ZLib unit provides only a limited wrapper around +the zlib library, and much of the original zlib functionality is +missing. Handling compressed file formats like ZIP/GZIP or PNG +cannot be implemented without having this functionality. +Applications that handle these formats are either using their own, +duplicated code, or not using the ZLib unit at all. + +Here are a few suggestions: + +- Checksum class wrappers around adler32() and crc32(), similar + to the Java classes that implement the java.util.zip.Checksum + interface. + +- The ability to read and write raw deflate streams, without the + zlib stream header and trailer. Raw deflate streams are used + in the ZIP file format. + +- The ability to read and write gzip streams, used in the GZIP + file format, and normally produced by the gzip program. + +- The ability to select a different compression strategy, useful + to PNG and MNG image compression, and to multimedia compression + in general. Besides the compression level + + TCompressionLevel = (clNone, clFastest, clDefault, clMax); + + which, in fact, could have used the 'z' prefix and avoided + TColor-like symbols + + TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax); + + there could be a compression strategy + + TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle); + +- ZIP and GZIP stream handling via TStreams. + + +-- +Cosmin Truta diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/zlibd32.mak b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/zlibd32.mak new file mode 100644 index 000000000..9bb00b7cc --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/delphi/zlibd32.mak @@ -0,0 +1,99 @@ +# Makefile for zlib +# For use with Delphi and C++ Builder under Win32 +# Updated for zlib 1.2.x by Cosmin Truta + +# ------------ Borland C++ ------------ + +# This project uses the Delphi (fastcall/register) calling convention: +LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl + +CC = bcc32 +LD = bcc32 +AR = tlib +# do not use "-pr" in CFLAGS +CFLAGS = -a -d -k- -O2 $(LOC) +LDFLAGS = + + +# variables +ZLIB_LIB = zlib.lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: test/example.c zlib.h zconf.h + +minigzip.obj: test/minigzip.c zlib.h zconf.h + + +# For the sake of the old Borland make, +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + + +# cleanup +clean: + -del *.obj + -del *.exe + -del *.lib + -del *.tds + -del zlib.bak + -del foo.gz + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.build b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.build new file mode 100644 index 000000000..e69630cec --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.build @@ -0,0 +1,33 @@ + + + A .Net wrapper library around ZLib1.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.chm b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.chm new file mode 100644 index 000000000..f214a444a Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.chm differ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.sln b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.sln new file mode 100644 index 000000000..5d533d6bc --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/AssemblyInfo.cs new file mode 100644 index 000000000..724c5347f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("DotZLib")] +[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Henrik Ravn")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs new file mode 100644 index 000000000..b110dae6a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -0,0 +1,202 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + #region ChecksumGeneratorBase + /// + /// Implements the common functionality needed for all s + /// + /// + public abstract class ChecksumGeneratorBase : ChecksumGenerator + { + /// + /// The value of the current checksum + /// + protected uint _current; + + /// + /// Initializes a new instance of the checksum generator base - the current checksum is + /// set to zero + /// + public ChecksumGeneratorBase() + { + _current = 0; + } + + /// + /// Initializes a new instance of the checksum generator basewith a specified value + /// + /// The value to set the current checksum to + public ChecksumGeneratorBase(uint initialValue) + { + _current = initialValue; + } + + /// + /// Resets the current checksum to zero + /// + public void Reset() { _current = 0; } + + /// + /// Gets the current checksum value + /// + public uint Value { get { return _current; } } + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + /// All the other Update methods are implmeneted in terms of this one. + /// This is therefore the only method a derived class has to implement + public abstract void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with an array of bytes. + /// + /// The data to update the checksum with + public void Update(byte[] data) + { + Update(data, 0, data.Length); + } + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + public void Update(string data) + { + Update(Encoding.UTF8.GetBytes(data)); + } + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + public void Update(string data, Encoding encoding) + { + Update(encoding.GetBytes(data)); + } + + } + #endregion + + #region CRC32 + /// + /// Implements a CRC32 checksum generator + /// + public sealed class CRC32Checksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint crc32(uint crc, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the CRC32 checksum generator + /// + public CRC32Checksum() : base() {} + + /// + /// Initializes a new instance of the CRC32 checksum generator with a specified value + /// + /// The value to set the current checksum to + public CRC32Checksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + + #region Adler + /// + /// Implements a checksum generator that computes the Adler checksum on data + /// + public sealed class AdlerChecksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint adler32(uint adler, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the Adler checksum generator + /// + public AdlerChecksum() : base() {} + + /// + /// Initializes a new instance of the Adler checksum generator with a specified value + /// + /// The value to set the current checksum to + public AdlerChecksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + +} \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs new file mode 100644 index 000000000..9c8d60195 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs @@ -0,0 +1,83 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; + +namespace DotZLib +{ + + /// + /// This class implements a circular buffer + /// + internal class CircularBuffer + { + #region Private data + private int _capacity; + private int _head; + private int _tail; + private int _size; + private byte[] _buffer; + #endregion + + public CircularBuffer(int capacity) + { + Debug.Assert( capacity > 0 ); + _buffer = new byte[capacity]; + _capacity = capacity; + _head = 0; + _tail = 0; + _size = 0; + } + + public int Size { get { return _size; } } + + public int Put(byte[] source, int offset, int count) + { + Debug.Assert( count > 0 ); + int trueCount = Math.Min(count, _capacity - Size); + for (int i = 0; i < trueCount; ++i) + _buffer[(_tail+i) % _capacity] = source[offset+i]; + _tail += trueCount; + _tail %= _capacity; + _size += trueCount; + return trueCount; + } + + public bool Put(byte b) + { + if (Size == _capacity) // no room + return false; + _buffer[_tail++] = b; + _tail %= _capacity; + ++_size; + return true; + } + + public int Get(byte[] destination, int offset, int count) + { + int trueCount = Math.Min(count,Size); + for (int i = 0; i < trueCount; ++i) + destination[offset + i] = _buffer[(_head+i) % _capacity]; + _head += trueCount; + _head %= _capacity; + _size -= trueCount; + return trueCount; + } + + public int Get() + { + if (Size == 0) + return -1; + + int result = (int)_buffer[_head++ % _capacity]; + --_size; + return result; + } + + } +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs new file mode 100644 index 000000000..b0eb78a02 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs @@ -0,0 +1,198 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements the common functionality needed for all s + /// + public abstract class CodecBase : Codec, IDisposable + { + + #region Data members + + /// + /// Instance of the internal zlib buffer structure that is + /// passed to all functions in the zlib dll + /// + internal ZStream _ztream = new ZStream(); + + /// + /// True if the object instance has been disposed, false otherwise + /// + protected bool _isDisposed = false; + + /// + /// The size of the internal buffers + /// + protected const int kBufferSize = 16384; + + private byte[] _outBuffer = new byte[kBufferSize]; + private byte[] _inBuffer = new byte[kBufferSize]; + + private GCHandle _hInput; + private GCHandle _hOutput; + + private uint _checksum = 0; + + #endregion + + /// + /// Initializes a new instance of the CodeBase class. + /// + public CodecBase() + { + try + { + _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); + _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); + } + catch (Exception) + { + CleanUp(false); + throw; + } + } + + + #region Codec Members + + /// + /// Occurs when more processed data are available. + /// + public event DataAvailableHandler DataAvailable; + + /// + /// Fires the event + /// + protected void OnDataAvailable() + { + if (_ztream.total_out > 0) + { + if (DataAvailable != null) + DataAvailable( _outBuffer, 0, (int)_ztream.total_out); + resetOutput(); + } + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + public void Add(byte[] data) + { + Add(data,0,data.Length); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + /// This must be implemented by a derived class + public abstract void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + /// This must be implemented by a derived class + public abstract void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + public uint Checksum { get { return _checksum; } } + + #endregion + + #region Destructor & IDisposable stuff + + /// + /// Destroys this instance + /// + ~CodecBase() + { + CleanUp(false); + } + + /// + /// Releases any unmanaged resources and calls the method of the derived class + /// + public void Dispose() + { + CleanUp(true); + } + + /// + /// Performs any codec specific cleanup + /// + /// This must be implemented by a derived class + protected abstract void CleanUp(); + + // performs the release of the handles and calls the dereived CleanUp() + private void CleanUp(bool isDisposing) + { + if (!_isDisposed) + { + CleanUp(); + if (_hInput.IsAllocated) + _hInput.Free(); + if (_hOutput.IsAllocated) + _hOutput.Free(); + + _isDisposed = true; + } + } + + + #endregion + + #region Helper methods + + /// + /// Copies a number of bytes to the internal codec buffer - ready for proccesing + /// + /// The byte array that contains the data to copy + /// The index of the first byte to copy + /// The number of bytes to copy from data + protected void copyInput(byte[] data, int startIndex, int count) + { + Array.Copy(data, startIndex, _inBuffer,0, count); + _ztream.next_in = _hInput.AddrOfPinnedObject(); + _ztream.total_in = 0; + _ztream.avail_in = (uint)count; + + } + + /// + /// Resets the internal output buffers to a known state - ready for processing + /// + protected void resetOutput() + { + _ztream.total_out = 0; + _ztream.avail_out = kBufferSize; + _ztream.next_out = _hOutput.AddrOfPinnedObject(); + } + + /// + /// Updates the running checksum property + /// + /// The new checksum value + protected void setChecksum(uint newSum) + { + _checksum = newSum; + } + #endregion + + } +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs new file mode 100644 index 000000000..9039f41f6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs @@ -0,0 +1,106 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data compressor, using the deflate algorithm in the ZLib dll + /// + public sealed class Deflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Deflater + /// + /// The compression level to use for this Deflater + public Deflater(CompressLevel level) : base() + { + int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize deflater"); + + resetOutput(); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + while (err >= 0 && _ztream.avail_in > 0) + { + err = deflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = deflate(ref _ztream, (int)FlushTypes.None); + } + inputIndex += (int)_ztream.total_in; + } + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = deflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + deflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib deflate stream + /// + protected override void CleanUp() { deflateEnd(ref _ztream); } + + } +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs new file mode 100644 index 000000000..90c7c3b38 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs @@ -0,0 +1,288 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + + #region Internal types + + /// + /// Defines constants for the various flush types used with zlib + /// + internal enum FlushTypes + { + None, Partial, Sync, Full, Finish, Block + } + + #region ZStream structure + // internal mapping of the zlib zstream structure for marshalling + [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] + internal struct ZStream + { + public IntPtr next_in; + public uint avail_in; + public uint total_in; + + public IntPtr next_out; + public uint avail_out; + public uint total_out; + + [MarshalAs(UnmanagedType.LPStr)] + string msg; + uint state; + + uint zalloc; + uint zfree; + uint opaque; + + int data_type; + public uint adler; + uint reserved; + } + + #endregion + + #endregion + + #region Public enums + /// + /// Defines constants for the available compression levels in zlib + /// + public enum CompressLevel : int + { + /// + /// The default compression level with a reasonable compromise between compression and speed + /// + Default = -1, + /// + /// No compression at all. The data are passed straight through. + /// + None = 0, + /// + /// The maximum compression rate available. + /// + Best = 9, + /// + /// The fastest available compression level. + /// + Fastest = 1 + } + #endregion + + #region Exception classes + /// + /// The exception that is thrown when an error occurs on the zlib dll + /// + public class ZLibException : ApplicationException + { + /// + /// Initializes a new instance of the class with a specified + /// error message and error code + /// + /// The zlib error code that caused the exception + /// A message that (hopefully) describes the error + public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) + { + } + + /// + /// Initializes a new instance of the class with a specified + /// error code + /// + /// The zlib error code that caused the exception + public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) + { + } + } + #endregion + + #region Interfaces + + /// + /// Declares methods and properties that enables a running checksum to be calculated + /// + public interface ChecksumGenerator + { + /// + /// Gets the current value of the checksum + /// + uint Value { get; } + + /// + /// Clears the current checksum to 0 + /// + void Reset(); + + /// + /// Updates the current checksum with an array of bytes + /// + /// The data to update the checksum with + void Update(byte[] data); + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + void Update(string data); + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + void Update(string data, Encoding encoding); + } + + + /// + /// Represents the method that will be called from a codec when new data + /// are available. + /// + /// The byte array containing the processed data + /// The index of the first processed byte in data + /// The number of processed bytes available + /// On return from this method, the data may be overwritten, so grab it while you can. + /// You cannot assume that startIndex will be zero. + /// + public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); + + /// + /// Declares methods and events for implementing compressors/decompressors + /// + public interface Codec + { + /// + /// Occurs when more processed data are available. + /// + event DataAvailableHandler DataAvailable; + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data); + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + uint Checksum { get; } + + + } + + #endregion + + #region Classes + /// + /// Encapsulates general information about the ZLib library + /// + public class Info + { + #region DLL imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint zlibCompileFlags(); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern string zlibVersion(); + #endregion + + #region Private stuff + private uint _flags; + + // helper function that unpacks a bitsize mask + private static int bitSize(uint bits) + { + switch (bits) + { + case 0: return 16; + case 1: return 32; + case 2: return 64; + } + return -1; + } + #endregion + + /// + /// Constructs an instance of the Info class. + /// + public Info() + { + _flags = zlibCompileFlags(); + } + + /// + /// True if the library is compiled with debug info + /// + public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } + + /// + /// True if the library is compiled with assembly optimizations + /// + public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } + + /// + /// Gets the size of the unsigned int that was compiled into Zlib + /// + public int SizeOfUInt { get { return bitSize(_flags & 3); } } + + /// + /// Gets the size of the unsigned long that was compiled into Zlib + /// + public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } + + /// + /// Gets the size of the pointers that were compiled into Zlib + /// + public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } + + /// + /// Gets the size of the z_off_t type that was compiled into Zlib + /// + public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } + + /// + /// Gets the version of ZLib as a string, e.g. "1.2.1" + /// + public static string Version { get { return zlibVersion(); } } + } + + #endregion + +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.csproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.csproj new file mode 100644 index 000000000..dea7fb16a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.csproj @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs new file mode 100644 index 000000000..f0eada1d2 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs @@ -0,0 +1,301 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements a compressed , in GZip (.gz) format. + /// + public class GZipStream : Stream, IDisposable + { + #region Dll Imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern IntPtr gzopen(string name, string mode); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzclose(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzwrite(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzread(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzgetc(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzputc(IntPtr gzFile, int c); + + #endregion + + #region Private data + private IntPtr _gzFile; + private bool _isDisposed = false; + private bool _isWriting; + #endregion + + #region Constructors + /// + /// Creates a new file as a writeable GZipStream + /// + /// The name of the compressed file to create + /// The compression level to use when adding data + /// If an error occurred in the internal zlib function + public GZipStream(string fileName, CompressLevel level) + { + _isWriting = true; + _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + } + + /// + /// Opens an existing file as a readable GZipStream + /// + /// The name of the file to open + /// If an error occurred in the internal zlib function + public GZipStream(string fileName) + { + _isWriting = false; + _gzFile = gzopen(fileName, "rb"); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + + } + #endregion + + #region Access properties + /// + /// Returns true of this stream can be read from, false otherwise + /// + public override bool CanRead + { + get + { + return !_isWriting; + } + } + + + /// + /// Returns false. + /// + public override bool CanSeek + { + get + { + return false; + } + } + + /// + /// Returns true if this tsream is writeable, false otherwise + /// + public override bool CanWrite + { + get + { + return _isWriting; + } + } + #endregion + + #region Destructor & IDispose stuff + + /// + /// Destroys this instance + /// + ~GZipStream() + { + cleanUp(false); + } + + /// + /// Closes the external file handle + /// + public void Dispose() + { + cleanUp(true); + } + + // Does the actual closing of the file handle. + private void cleanUp(bool isDisposing) + { + if (!_isDisposed) + { + gzclose(_gzFile); + _isDisposed = true; + } + } + #endregion + + #region Basic reading and writing + /// + /// Attempts to read a number of bytes from the stream. + /// + /// The destination data buffer + /// The index of the first destination byte in buffer + /// The number of bytes requested + /// The number of bytes read + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not readable. + /// If this stream has been disposed. + public override int Read(byte[] buffer, int offset, int count) + { + if (!CanRead) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + int result; + try + { + result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + return result; + } + + /// + /// Attempts to read a single byte from the stream. + /// + /// The byte that was read, or -1 in case of error or End-Of-File + public override int ReadByte() + { + if (!CanRead) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + return gzgetc(_gzFile); + } + + /// + /// Writes a number of bytes to the stream + /// + /// + /// + /// + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void Write(byte[] buffer, int offset, int count) + { + if (!CanWrite) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + try + { + int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + } + + /// + /// Writes a single byte to the stream + /// + /// The byte to add to the stream. + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void WriteByte(byte value) + { + if (!CanWrite) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + int result = gzputc(_gzFile, (int)value); + if (result < 0) + throw new IOException(); + } + #endregion + + #region Position & length stuff + /// + /// Not supported. + /// + /// + /// Always thrown + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + /// + /// Not suppported. + /// + /// + /// + /// + /// Always thrown + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException(); + } + + /// + /// Flushes the GZipStream. + /// + /// In this implementation, this method does nothing. This is because excessive + /// flushing may degrade the achievable compression rates. + public override void Flush() + { + // left empty on purpose + } + + /// + /// Gets/sets the current position in the GZipStream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Position + { + get + { + throw new NotSupportedException(); + } + set + { + throw new NotSupportedException(); + } + } + + /// + /// Gets the size of the stream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Length + { + get + { + throw new NotSupportedException(); + } + } + #endregion + } +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs new file mode 100644 index 000000000..d295f2680 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs @@ -0,0 +1,105 @@ +// +// Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data decompressor, using the inflate algorithm in the ZLib dll + /// + public class Inflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int inflateInit_(ref ZStream sz, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Inflater + /// + public Inflater() : base() + { + int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize inflater"); + + resetOutput(); + } + + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + err = inflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = inflate(ref _ztream, (int)FlushTypes.None); + } + + inputIndex += (int)_ztream.total_in; + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = inflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + inflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib inflate stream + /// + protected override void CleanUp() { inflateEnd(ref _ztream); } + + + } +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/UnitTests.cs b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/UnitTests.cs new file mode 100644 index 000000000..6d8aebb79 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/DotZLib/UnitTests.cs @@ -0,0 +1,274 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Collections; +using System.IO; + +// uncomment the define below to include unit tests +//#define nunit +#if nunit +using NUnit.Framework; + +// Unit tests for the DotZLib class library +// ---------------------------------------- +// +// Use this with NUnit 2 from http://www.nunit.org +// + +namespace DotZLibTests +{ + using DotZLib; + + // helper methods + internal class Utils + { + public static bool byteArrEqual( byte[] lhs, byte[] rhs ) + { + if (lhs.Length != rhs.Length) + return false; + for (int i = lhs.Length-1; i >= 0; --i) + if (lhs[i] != rhs[i]) + return false; + return true; + } + + } + + + [TestFixture] + public class CircBufferTests + { + #region Circular buffer tests + [Test] + public void SinglePutGet() + { + CircularBuffer buf = new CircularBuffer(10); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + + Assert.IsTrue(buf.Put( 1 )); + Assert.AreEqual( 1, buf.Size ); + Assert.AreEqual( 1, buf.Get() ); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + } + + [Test] + public void BlockPutGet() + { + CircularBuffer buf = new CircularBuffer(10); + byte[] arr = {1,2,3,4,5,6,7,8,9,10}; + Assert.AreEqual( 10, buf.Put(arr,0,10) ); + Assert.AreEqual( 10, buf.Size ); + Assert.IsFalse( buf.Put(11) ); + Assert.AreEqual( 1, buf.Get() ); + Assert.IsTrue( buf.Put(11) ); + + byte[] arr2 = (byte[])arr.Clone(); + Assert.AreEqual( 9, buf.Get(arr2,1,9) ); + Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); + } + + #endregion + } + + [TestFixture] + public class ChecksumTests + { + #region CRC32 Tests + [Test] + public void CRC32_Null() + { + CRC32Checksum crc32 = new CRC32Checksum(); + Assert.AreEqual( 0, crc32.Value ); + + crc32 = new CRC32Checksum(1); + Assert.AreEqual( 1, crc32.Value ); + + crc32 = new CRC32Checksum(556); + Assert.AreEqual( 556, crc32.Value ); + } + + [Test] + public void CRC32_Data() + { + CRC32Checksum crc32 = new CRC32Checksum(); + byte[] data = { 1,2,3,4,5,6,7 }; + crc32.Update(data); + Assert.AreEqual( 0x70e46888, crc32.Value ); + + crc32 = new CRC32Checksum(); + crc32.Update("penguin"); + Assert.AreEqual( 0x0e5c1a120, crc32.Value ); + + crc32 = new CRC32Checksum(1); + crc32.Update("penguin"); + Assert.AreEqual(0x43b6aa94, crc32.Value); + + } + #endregion + + #region Adler tests + + [Test] + public void Adler_Null() + { + AdlerChecksum adler = new AdlerChecksum(); + Assert.AreEqual(0, adler.Value); + + adler = new AdlerChecksum(1); + Assert.AreEqual( 1, adler.Value ); + + adler = new AdlerChecksum(556); + Assert.AreEqual( 556, adler.Value ); + } + + [Test] + public void Adler_Data() + { + AdlerChecksum adler = new AdlerChecksum(1); + byte[] data = { 1,2,3,4,5,6,7 }; + adler.Update(data); + Assert.AreEqual( 0x5b001d, adler.Value ); + + adler = new AdlerChecksum(); + adler.Update("penguin"); + Assert.AreEqual(0x0bcf02f6, adler.Value ); + + adler = new AdlerChecksum(1); + adler.Update("penguin"); + Assert.AreEqual(0x0bd602f7, adler.Value); + + } + #endregion + } + + [TestFixture] + public class InfoTests + { + #region Info tests + [Test] + public void Info_Version() + { + Info info = new Info(); + Assert.AreEqual("1.2.11", Info.Version); + Assert.AreEqual(32, info.SizeOfUInt); + Assert.AreEqual(32, info.SizeOfULong); + Assert.AreEqual(32, info.SizeOfPointer); + Assert.AreEqual(32, info.SizeOfOffset); + } + #endregion + } + + [TestFixture] + public class DeflateInflateTests + { + #region Deflate tests + [Test] + public void Deflate_Init() + { + using (Deflater def = new Deflater(CompressLevel.Default)) + { + } + } + + private ArrayList compressedData = new ArrayList(); + private uint adler1; + + private ArrayList uncompressedData = new ArrayList(); + private uint adler2; + + public void CDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + compressedData.Add(data[i+startIndex]); + } + + [Test] + public void Deflate_Compress() + { + compressedData.Clear(); + + byte[] testData = new byte[35000]; + for (int i = 0; i < testData.Length; ++i) + testData[i] = 5; + + using (Deflater def = new Deflater((CompressLevel)5)) + { + def.DataAvailable += new DataAvailableHandler(CDataAvail); + def.Add(testData); + def.Finish(); + adler1 = def.Checksum; + } + } + #endregion + + #region Inflate tests + [Test] + public void Inflate_Init() + { + using (Inflater inf = new Inflater()) + { + } + } + + private void DDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + uncompressedData.Add(data[i+startIndex]); + } + + [Test] + public void Inflate_Expand() + { + uncompressedData.Clear(); + + using (Inflater inf = new Inflater()) + { + inf.DataAvailable += new DataAvailableHandler(DDataAvail); + inf.Add((byte[])compressedData.ToArray(typeof(byte))); + inf.Finish(); + adler2 = inf.Checksum; + } + Assert.AreEqual( adler1, adler2 ); + } + #endregion + } + + [TestFixture] + public class GZipStreamTests + { + #region GZipStream test + [Test] + public void GZipStream_WriteRead() + { + using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) + { + BinaryWriter writer = new BinaryWriter(gzOut); + writer.Write("hi there"); + writer.Write(Math.PI); + writer.Write(42); + } + + using (GZipStream gzIn = new GZipStream("gzstream.gz")) + { + BinaryReader reader = new BinaryReader(gzIn); + string s = reader.ReadString(); + Assert.AreEqual("hi there",s); + double d = reader.ReadDouble(); + Assert.AreEqual(Math.PI, d); + int i = reader.ReadInt32(); + Assert.AreEqual(42,i); + } + + } + #endregion + } +} + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt new file mode 100644 index 000000000..127a5bc39 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/LICENSE_1_0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/readme.txt new file mode 100644 index 000000000..4d8c2dd93 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/dotzlib/readme.txt @@ -0,0 +1,58 @@ +This directory contains a .Net wrapper class library for the ZLib1.dll + +The wrapper includes support for inflating/deflating memory buffers, +.Net streaming wrappers for the gz streams part of zlib, and wrappers +for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. + +Directory structure: +-------------------- + +LICENSE_1_0.txt - License file. +readme.txt - This file. +DotZLib.chm - Class library documentation +DotZLib.build - NAnt build file +DotZLib.sln - Microsoft Visual Studio 2003 solution file + +DotZLib\*.cs - Source files for the class library + +Unit tests: +----------- +The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. +To include unit tests in the build, define nunit before building. + + +Build instructions: +------------------- + +1. Using Visual Studio.Net 2003: + Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) + will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on + you are building the release or debug version of the library. Check + DotZLib/UnitTests.cs for instructions on how to include unit tests in the + build. + +2. Using NAnt: + Open a command prompt with access to the build environment and run nant + in the same directory as the DotZLib.build file. + You can define 2 properties on the nant command-line to control the build: + debug={true|false} to toggle between release/debug builds (default=true). + nunit={true|false} to include or esclude unit tests (default=true). + Also the target clean will remove binaries. + Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release + or ./DotZLib/bin/debug, depending on whether you are building the release + or debug version of the library. + + Examples: + nant -D:debug=false -D:nunit=false + will build a release mode version of the library without unit tests. + nant + will build a debug version of the library with unit tests + nant clean + will remove all previously built files. + + +--------------------------------- +Copyright (c) Henrik Ravn 2004 + +Use, modification and distribution are subject to the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/gcc_gvmat64/gvmat64.S b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/gcc_gvmat64/gvmat64.S new file mode 100644 index 000000000..23309fa28 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/gcc_gvmat64/gvmat64.S @@ -0,0 +1,574 @@ +/* +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); // current match + +; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64 +; (AMD64 on Athlon 64, Opteron, Phenom +; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) +; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode) +; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; This software is provided 'as-is', without any express or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software +; 3. This notice may not be removed or altered from any source distribution. +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for zLib, I use option: +; gcc -c -arch x86_64 gvmat64.S + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; // current match / +; +; with XCode for Mac, I had strange error with some jump on intel syntax +; this is why BEFORE_JMP and AFTER_JMP are used + */ + + +#define BEFORE_JMP .att_syntax +#define AFTER_JMP .intel_syntax noprefix + +#ifndef NO_UNDERLINE +# define match_init _match_init +# define longest_match _longest_match +#endif + +.intel_syntax noprefix + +.globl match_init, longest_match +.text +longest_match: + + + +#define LocalVarsSize 96 +/* +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp +*/ + +#define chainlenwmask (rsp + 8 - LocalVarsSize) +#define nicematch (rsp + 16 - LocalVarsSize) + +#define save_rdi (rsp + 24 - LocalVarsSize) +#define save_rsi (rsp + 32 - LocalVarsSize) +#define save_rbx (rsp + 40 - LocalVarsSize) +#define save_rbp (rsp + 48 - LocalVarsSize) +#define save_r12 (rsp + 56 - LocalVarsSize) +#define save_r13 (rsp + 64 - LocalVarsSize) +#define save_r14 (rsp + 72 - LocalVarsSize) +#define save_r15 (rsp + 80 - LocalVarsSize) + + +/* +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure +*/ + +#define MAX_MATCH 258 +#define MIN_MATCH 3 +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) + +/* +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). +*/ + + + +/* you can check the structure offset by running + +#include +#include +#include "deflate.h" + +void print_depl() +{ +deflate_state ds; +deflate_state *s=&ds; +printf("size pointer=%u\n",(int)sizeof(void*)); + +printf("#define dsWSize %u\n",(int)(((char*)&(s->w_size))-((char*)s))); +printf("#define dsWMask %u\n",(int)(((char*)&(s->w_mask))-((char*)s))); +printf("#define dsWindow %u\n",(int)(((char*)&(s->window))-((char*)s))); +printf("#define dsPrev %u\n",(int)(((char*)&(s->prev))-((char*)s))); +printf("#define dsMatchLen %u\n",(int)(((char*)&(s->match_length))-((char*)s))); +printf("#define dsPrevMatch %u\n",(int)(((char*)&(s->prev_match))-((char*)s))); +printf("#define dsStrStart %u\n",(int)(((char*)&(s->strstart))-((char*)s))); +printf("#define dsMatchStart %u\n",(int)(((char*)&(s->match_start))-((char*)s))); +printf("#define dsLookahead %u\n",(int)(((char*)&(s->lookahead))-((char*)s))); +printf("#define dsPrevLen %u\n",(int)(((char*)&(s->prev_length))-((char*)s))); +printf("#define dsMaxChainLen %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); +printf("#define dsGoodMatch %u\n",(int)(((char*)&(s->good_match))-((char*)s))); +printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s))); +} +*/ + +#define dsWSize 68 +#define dsWMask 76 +#define dsWindow 80 +#define dsPrev 96 +#define dsMatchLen 144 +#define dsPrevMatch 148 +#define dsStrStart 156 +#define dsMatchStart 160 +#define dsLookahead 164 +#define dsPrevLen 168 +#define dsMaxChainLen 172 +#define dsGoodMatch 188 +#define dsNiceMatch 192 + +#define window_size [ rcx + dsWSize] +#define WMask [ rcx + dsWMask] +#define window_ad [ rcx + dsWindow] +#define prev_ad [ rcx + dsPrev] +#define strstart [ rcx + dsStrStart] +#define match_start [ rcx + dsMatchStart] +#define Lookahead [ rcx + dsLookahead] //; 0ffffffffh on infozip +#define prev_length [ rcx + dsPrevLen] +#define max_chain_length [ rcx + dsMaxChainLen] +#define good_match [ rcx + dsGoodMatch] +#define nice_match [ rcx + dsNiceMatch] + +/* +; windows: +; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + +; +; gcc on macosx-linux: +; see http://www.x86-64.org/documentation/abi-0.99.pdf +; param 1 in rdi, param 2 in rsi +; rbx, rsp, rbp, r12 to r15 must be preserved + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) +; mac: param 1 in rdi, param 2 rsi +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx +*/ + mov [save_rbx],rbx + mov [save_rbp],rbp + + + mov rcx,rdi + + mov r8d,esi + + + mov [save_r12],r12 + mov [save_r13],r13 + mov [save_r14],r14 + mov [save_r15],r15 + + +//;;; uInt wmask = s->w_mask; +//;;; unsigned chain_length = s->max_chain_length; +//;;; if (s->prev_length >= s->good_match) { +//;;; chain_length >>= 2; +//;;; } + + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +//;;; chainlen is decremented once beforehand so that the function can +//;;; use the sign flag instead of the zero flag for the exit test. +//;;; It is then shifted into the high word, to make room for the wmask +//;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +//;;; on zlib only +//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + + + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d + + + +//;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +//;;; Determine how many bytes the scan ptr is off from being +//;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +//;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + + mov eax, window_size + sub eax, MIN_LOOKAHEAD + + + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +//;;; int best_len = s->prev_length; + + +//;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +//;;; register ush scan_start = *(ushf*)scan; +//;;; register ush scan_end = *(ushf*)(scan+best_len-1); +//;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +//;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + + + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + + + + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jz LookupLoopIsZero + AFTER_JMP + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jz LookupLoopIsZero + AFTER_JMP + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jnz LookupLoop1 + jmp LookupLoopIsZero + AFTER_JMP +/* +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit +*/ +.balign 16 +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jnz LookupLoop1 + AFTER_JMP +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + BEFORE_JMP + jnz LookupLoop1 + AFTER_JMP + + +//;;; Store the current value of chainlen. + mov [chainlenwmask], edx +/* +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). +*/ + lea rsi,[r8+r10] + mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + +/* +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. +*/ + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + BEFORE_JMP + jnz LoopCmps + jmp LenMaximum + AFTER_JMP + +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0x0000FFFF + jnz LenLower + + test eax,0xffffffff + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + BEFORE_JMP + jnz LenLower + AFTER_JMP + +LenLower32: + shr eax,16 + add rdx,2 + +LenLower: + sub al, 1 + adc rdx, 0 +//;;; Calculate the length of the match. If it is longer than MAX_MATCH, +//;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + BEFORE_JMP + jge LenMaximum + AFTER_JMP +/* +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// +*/ + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + BEFORE_JMP + jmp LookupLoop + AFTER_JMP +/* +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); +*/ +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + BEFORE_JMP + jge LeaveNow + AFTER_JMP + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + BEFORE_JMP + jmp LookupLoop + AFTER_JMP + +//;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +//;;; return s->lookahead; + +LeaveNow: + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d + + + +//;;; Restore the stack and return from whence we came. + + +// mov rsi,[save_rsi] +// mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] + mov r14,[save_r14] + mov r15,[save_r15] + + + ret 0 +//; please don't remove this string ! +//; Your can freely use gvmat64 in any free or commercial app +//; but it is far better don't remove the string in the binary! + // db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 + + +match_init: + ret 0 + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/README new file mode 100644 index 000000000..e75ed1329 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/README @@ -0,0 +1 @@ +See infback9.h for what this is and how to use it. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.c new file mode 100644 index 000000000..05fb3e338 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.c @@ -0,0 +1,615 @@ +/* infback9.c -- inflate deflate64 data using a call-back interface + * Copyright (C) 1995-2008 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infback9.h" +#include "inftree9.h" +#include "inflate9.h" + +#define WSIZE 65536UL + +/* + strm provides memory allocation functions in zalloc and zfree, or + Z_NULL to use the library memory allocation functions. + + window is a user-supplied window and output buffer that is 64K bytes. + */ +int ZEXPORT inflateBack9Init_(strm, window, version, stream_size) +z_stream FAR *strm; +unsigned char FAR *window; +const char *version; +int stream_size; +{ + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL) + return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == (free_func)0) strm->zfree = zcfree; + state = (struct inflate_state FAR *)ZALLOC(strm, 1, + sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (voidpf)state; + state->window = window; + return Z_OK; +} + +/* + Build and output length and distance decoding tables for fixed code + decoding. + */ +#ifdef MAKEFIXED +#include + +void makefixed9(void) +{ + unsigned sym, bits, low, size; + code *next, *lenfix, *distfix; + struct inflate_state state; + code fixed[544]; + + /* literal/length table */ + sym = 0; + while (sym < 144) state.lens[sym++] = 8; + while (sym < 256) state.lens[sym++] = 9; + while (sym < 280) state.lens[sym++] = 7; + while (sym < 288) state.lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work); + + /* distance table */ + sym = 0; + while (sym < 32) state.lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work); + + /* write tables */ + puts(" /* inffix9.h -- table for decoding deflate64 fixed codes"); + puts(" * Generated automatically by makefixed9()."); + puts(" */"); + puts(""); + puts(" /* WARNING: this file should *not* be used by applications."); + puts(" It is part of the implementation of this library and is"); + puts(" subject to change. Applications should only use zlib.h."); + puts(" */"); + puts(""); + size = 1U << 9; + printf(" static const code lenfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 6) == 0) printf("\n "); + printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits, + lenfix[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); + size = 1U << 5; + printf("\n static const code distfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 5) == 0) printf("\n "); + printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits, + distfix[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); +} +#endif /* MAKEFIXED */ + +/* Macros for inflateBack(): */ + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Assure that some input is available. If input is requested, but denied, + then return a Z_BUF_ERROR from inflateBack(). */ +#define PULL() \ + do { \ + if (have == 0) { \ + have = in(in_desc, &next); \ + if (have == 0) { \ + next = Z_NULL; \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflateBack() + with an error if there is no input available. */ +#define PULLBYTE() \ + do { \ + PULL(); \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflateBack() with + an error. */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n <= 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Assure that some output space is available, by writing out the window + if it's full. If the write fails, return from inflateBack() with a + Z_BUF_ERROR. */ +#define ROOM() \ + do { \ + if (left == 0) { \ + put = window; \ + left = WSIZE; \ + wrap = 1; \ + if (out(out_desc, put, (unsigned)left)) { \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* + strm provides the memory allocation functions and window buffer on input, + and provides information on the unused input on return. For Z_DATA_ERROR + returns, strm will also provide an error message. + + in() and out() are the call-back input and output functions. When + inflateBack() needs more input, it calls in(). When inflateBack() has + filled the window with output, or when it completes with data in the + window, it calls out() to write out the data. The application must not + change the provided input until in() is called again or inflateBack() + returns. The application must not change the window/output buffer until + inflateBack() returns. + + in() and out() are called with a descriptor parameter provided in the + inflateBack() call. This parameter can be a structure that provides the + information required to do the read or write, as well as accumulated + information on the input and output such as totals and check values. + + in() should return zero on failure. out() should return non-zero on + failure. If either in() or out() fails, than inflateBack() returns a + Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it + was in() or out() that caused in the error. Otherwise, inflateBack() + returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format + error, or Z_MEM_ERROR if it could not allocate memory for the state. + inflateBack() can also return Z_STREAM_ERROR if the input parameters + are not correct, i.e. strm is Z_NULL or the state was not initialized. + */ +int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc) +z_stream FAR *strm; +in_func in; +void FAR *in_desc; +out_func out; +void FAR *out_desc; +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have; /* available input */ + unsigned long left; /* available output */ + inflate_mode mode; /* current inflate mode */ + int lastblock; /* true if processing last block */ + int wrap; /* true if the window has wrapped */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned extra; /* extra bits needed */ + unsigned long length; /* literal or length of data to copy */ + unsigned long offset; /* distance back to copy string from */ + unsigned long copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code const FAR *lencode; /* starting table for length/literal codes */ + code const FAR *distcode; /* starting table for distance codes */ + unsigned lenbits; /* index bits for lencode */ + unsigned distbits; /* index bits for distcode */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; +#include "inffix9.h" + + /* Check that the strm exists and that the state was initialized */ + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* Reset the state */ + strm->msg = Z_NULL; + mode = TYPE; + lastblock = 0; + wrap = 0; + window = state->window; + next = strm->next_in; + have = next != Z_NULL ? strm->avail_in : 0; + hold = 0; + bits = 0; + put = window; + left = WSIZE; + lencode = Z_NULL; + distcode = Z_NULL; + + /* Inflate until end of block marked as last */ + for (;;) + switch (mode) { + case TYPE: + /* determine and dispatch block type */ + if (lastblock) { + BYTEBITS(); + mode = DONE; + break; + } + NEEDBITS(3); + lastblock = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + lastblock ? " (last)" : "")); + mode = STORED; + break; + case 1: /* fixed block */ + lencode = lenfix; + lenbits = 9; + distcode = distfix; + distbits = 5; + Tracev((stderr, "inflate: fixed codes block%s\n", + lastblock ? " (last)" : "")); + mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + lastblock ? " (last)" : "")); + mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + mode = BAD; + } + DROPBITS(2); + break; + + case STORED: + /* get and verify stored block length */ + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + mode = BAD; + break; + } + length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %lu\n", + length)); + INITBITS(); + + /* copy stored block from input to output */ + while (length != 0) { + copy = length; + PULL(); + ROOM(); + if (copy > have) copy = have; + if (copy > left) copy = left; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + length -= copy; + } + Tracev((stderr, "inflate: stored end\n")); + mode = TYPE; + break; + + case TABLE: + /* get dynamic table entries descriptor */ + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); + if (state->nlen > 286) { + strm->msg = (char *)"too many length symbols"; + mode = BAD; + break; + } + Tracev((stderr, "inflate: table sizes ok\n")); + + /* get code length code lengths (not a typo) */ + state->have = 0; + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + lencode = (code const FAR *)(state->next); + lenbits = 7; + ret = inflate_table9(CODES, state->lens, 19, &(state->next), + &(lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + + /* get length and distance code code lengths */ + state->have = 0; + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = lencode[BITS(lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + NEEDBITS(here.bits); + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + mode = BAD; + break; + } + len = (unsigned)(state->lens[state->have - 1]); + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftree9.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + lencode = (code const FAR *)(state->next); + lenbits = 9; + ret = inflate_table9(LENS, state->lens, state->nlen, + &(state->next), &(lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + mode = BAD; + break; + } + distcode = (code const FAR *)(state->next); + distbits = 6; + ret = inflate_table9(DISTS, state->lens + state->nlen, + state->ndist, &(state->next), &(distbits), + state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + mode = LEN; + + case LEN: + /* get a literal, length, or end-of-block code */ + for (;;) { + here = lencode[BITS(lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + length = (unsigned)here.val; + + /* process literal */ + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + ROOM(); + *put++ = (unsigned char)(length); + left--; + mode = LEN; + break; + } + + /* process end of block */ + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + mode = TYPE; + break; + } + + /* invalid code */ + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + mode = BAD; + break; + } + + /* length code -- get extra bits, if any */ + extra = (unsigned)(here.op) & 31; + if (extra != 0) { + NEEDBITS(extra); + length += BITS(extra); + DROPBITS(extra); + } + Tracevv((stderr, "inflate: length %lu\n", length)); + + /* get distance code */ + for (;;) { + here = distcode[BITS(distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + mode = BAD; + break; + } + offset = (unsigned)here.val; + + /* get distance extra bits, if any */ + extra = (unsigned)(here.op) & 15; + if (extra != 0) { + NEEDBITS(extra); + offset += BITS(extra); + DROPBITS(extra); + } + if (offset > WSIZE - (wrap ? 0: left)) { + strm->msg = (char *)"invalid distance too far back"; + mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %lu\n", offset)); + + /* copy match from window to output */ + do { + ROOM(); + copy = WSIZE - offset; + if (copy < left) { + from = put + copy; + copy = left - copy; + } + else { + from = put - offset; + copy = left; + } + if (copy > length) copy = length; + length -= copy; + left -= copy; + do { + *put++ = *from++; + } while (--copy); + } while (length != 0); + break; + + case DONE: + /* inflate stream terminated properly -- write leftover output */ + ret = Z_STREAM_END; + if (left < WSIZE) { + if (out(out_desc, window, (unsigned)(WSIZE - left))) + ret = Z_BUF_ERROR; + } + goto inf_leave; + + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + + default: /* can't happen, but makes compilers happy */ + ret = Z_STREAM_ERROR; + goto inf_leave; + } + + /* Return unused input */ + inf_leave: + strm->next_in = next; + strm->avail_in = have; + return ret; +} + +int ZEXPORT inflateBack9End(strm) +z_stream FAR *strm; +{ + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.h new file mode 100644 index 000000000..1073c0a38 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/infback9.h @@ -0,0 +1,37 @@ +/* infback9.h -- header for using inflateBack9 functions + * Copyright (C) 2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * This header file and associated patches provide a decoder for PKWare's + * undocumented deflate64 compression method (method 9). Use with infback9.c, + * inftree9.h, inftree9.c, and inffix9.h. These patches are not supported. + * This should be compiled with zlib, since it uses zutil.h and zutil.o. + * This code has not yet been tested on 16-bit architectures. See the + * comments in zlib.h for inflateBack() usage. These functions are used + * identically, except that there is no windowBits parameter, and a 64K + * window must be provided. Also if int's are 16 bits, then a zero for + * the third parameter of the "out" function actually means 65536UL. + * zlib.h must be included before this header file. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm)); +ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm, + unsigned char FAR *window, + const char *version, + int stream_size)); +#define inflateBack9Init(strm, window) \ + inflateBack9Init_((strm), (window), \ + ZLIB_VERSION, sizeof(z_stream)) + +#ifdef __cplusplus +} +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inffix9.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inffix9.h new file mode 100644 index 000000000..ee5671d2d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inffix9.h @@ -0,0 +1,107 @@ + /* inffix9.h -- table for decoding deflate64 fixed codes + * Generated automatically by makefixed9(). + */ + + /* WARNING: this file should *not* be used by applications. + It is part of the implementation of this library and is + subject to change. Applications should only use zlib.h. + */ + + static const code lenfix[512] = { + {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112}, + {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160}, + {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88}, + {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208}, + {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136}, + {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227}, + {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100}, + {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232}, + {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124}, + {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184}, + {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82}, + {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196}, + {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130}, + {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148}, + {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106}, + {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244}, + {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118}, + {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172}, + {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94}, + {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220}, + {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, + {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131}, + {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97}, + {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226}, + {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121}, + {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178}, + {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85}, + {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202}, + {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133}, + {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154}, + {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109}, + {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250}, + {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115}, + {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166}, + {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91}, + {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214}, + {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139}, + {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0}, + {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103}, + {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238}, + {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127}, + {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190}, + {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80}, + {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193}, + {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128}, + {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145}, + {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104}, + {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241}, + {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116}, + {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169}, + {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92}, + {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217}, + {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140}, + {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163}, + {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98}, + {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, + {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122}, + {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181}, + {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86}, + {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205}, + {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134}, + {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157}, + {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110}, + {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253}, + {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113}, + {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163}, + {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89}, + {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211}, + {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137}, + {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3}, + {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101}, + {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235}, + {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125}, + {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187}, + {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83}, + {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199}, + {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, + {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151}, + {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107}, + {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247}, + {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119}, + {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175}, + {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95}, + {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223}, + {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143}, + {0,8,79},{0,9,255} + }; + + static const code distfix[32] = { + {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5}, + {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513}, + {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129}, + {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145}, + {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4}, + {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073}, + {134,5,193},{142,5,49153} + }; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inflate9.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inflate9.h new file mode 100644 index 000000000..ee9a79394 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inflate9.h @@ -0,0 +1,47 @@ +/* inflate9.h -- internal inflate state definition + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Possible inflate modes between inflate() calls */ +typedef enum { + TYPE, /* i: waiting for type bits, including last-flag bit */ + STORED, /* i: waiting for stored size (length and complement) */ + TABLE, /* i: waiting for dynamic block table lengths */ + LEN, /* i: waiting for length/lit code */ + DONE, /* finished check, done -- remain here until reset */ + BAD /* got a data error -- remain here until reset */ +} inflate_mode; + +/* + State transitions between above modes - + + (most modes can go to the BAD mode -- not shown for clarity) + + Read deflate blocks: + TYPE -> STORED or TABLE or LEN or DONE + STORED -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN + Read deflate codes: + LEN -> LEN or TYPE + */ + +/* state maintained between inflate() calls. Approximately 7K bytes. */ +struct inflate_state { + /* sliding window */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + /* dynamic table building */ + unsigned ncode; /* number of code length code lengths */ + unsigned nlen; /* number of length code lengths */ + unsigned ndist; /* number of distance code lengths */ + unsigned have; /* number of code lengths in lens[] */ + code FAR *next; /* next available space in codes[] */ + unsigned short lens[320]; /* temporary storage for code lengths */ + unsigned short work[288]; /* work area for code table building */ + code codes[ENOUGH]; /* space for code tables */ +}; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.c new file mode 100644 index 000000000..5f4a76798 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.c @@ -0,0 +1,324 @@ +/* inftree9.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftree9.h" + +#define MAXBITS 15 + +const char inflate9_copyright[] = + " inflate9 1.2.11 Copyright 1995-2017 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* + Build a set of tables to decode the provided canonical Huffman code. + The code lengths are lens[0..codes-1]. The result starts at *table, + whose indices are 0..2^bits-1. work is a writable array of at least + lens shorts, which is used as a work area. type is the type of code + to be generated, CODES, LENS, or DISTS. On return, zero is success, + -1 is an invalid code, and +1 means that ENOUGH isn't enough. table + on return points to the next available entry's address. bits is the + requested root table index bits, and on return it is the actual root + table index bits. It will differ if the request is greater than the + longest code or if it is less than the shortest code. + */ +int inflate_table9(type, lens, codes, table, bits, work) +codetype type; +unsigned short FAR *lens; +unsigned codes; +code FAR * FAR *table; +unsigned FAR *bits; +unsigned short FAR *work; +{ + unsigned len; /* a code's length in bits */ + unsigned sym; /* index of code symbols */ + unsigned min, max; /* minimum and maximum code lengths */ + unsigned root; /* number of index bits for root table */ + unsigned curr; /* number of index bits for current table */ + unsigned drop; /* code bits to drop for sub-table */ + int left; /* number of prefix codes available */ + unsigned used; /* code entries in table used */ + unsigned huff; /* Huffman code */ + unsigned incr; /* for incrementing code, index */ + unsigned fill; /* index for replicating entries */ + unsigned low; /* low bits for current root entry */ + unsigned mask; /* mask for low root bits */ + code this; /* table entry for duplication */ + code FAR *next; /* next available space in table */ + const unsigned short FAR *base; /* base value table to use */ + const unsigned short FAR *extra; /* extra bits table to use */ + int end; /* use base and extra for symbol > end */ + unsigned short count[MAXBITS+1]; /* number of codes of each length */ + unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ + static const unsigned short lbase[31] = { /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, + 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, + 131, 163, 195, 227, 3, 0, 0}; + static const unsigned short lext[31] = { /* Length codes 257..285 extra */ + 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, + 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, + 133, 133, 133, 133, 144, 77, 202}; + static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, + 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, + 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153}; + static const unsigned short dext[32] = { /* Distance codes 0..31 extra */ + 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, + 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138, + 139, 139, 140, 140, 141, 141, 142, 142}; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) + count[len] = 0; + for (sym = 0; sym < codes; sym++) + count[lens[sym]]++; + + /* bound code lengths, force root to be within code lengths */ + root = *bits; + for (max = MAXBITS; max >= 1; max--) + if (count[max] != 0) break; + if (root > max) root = max; + if (max == 0) return -1; /* no codes! */ + for (min = 1; min <= MAXBITS; min++) + if (count[min] != 0) break; + if (root < min) root = min; + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) return -1; /* over-subscribed */ + } + if (left > 0 && (type == CODES || max != 1)) + return -1; /* incomplete set */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + count[len]; + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) + if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftree9.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + switch (type) { + case CODES: + base = extra = work; /* dummy value--not used */ + end = 19; + break; + case LENS: + base = lbase; + base -= 257; + extra = lext; + extra -= 257; + end = 256; + break; + default: /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize state for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = *table; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = (unsigned)(-1); /* trigger new sub-table when len > root */ + used = 1U << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) + return 1; + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + this.bits = (unsigned char)(len - drop); + if ((int)(work[sym]) < end) { + this.op = (unsigned char)0; + this.val = work[sym]; + } + else if ((int)(work[sym]) > end) { + this.op = (unsigned char)(extra[work[sym]]); + this.val = base[work[sym]]; + } + else { + this.op = (unsigned char)(32 + 64); /* end of block */ + this.val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1U << (len - drop); + fill = 1U << curr; + do { + fill -= incr; + next[(huff >> drop) + fill] = this; + } while (fill != 0); + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + + /* go to next symbol, update count, len */ + sym++; + if (--(count[len]) == 0) { + if (len == max) break; + len = lens[work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) != low) { + /* if first time, transition to sub-tables */ + if (drop == 0) + drop = root; + + /* increment past last table */ + next += 1U << curr; + + /* determine length of next table */ + curr = len - drop; + left = (int)(1 << curr); + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) break; + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1U << curr; + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) + return 1; + + /* point entry in root table to sub-table */ + low = huff & mask; + (*table)[low].op = (unsigned char)curr; + (*table)[low].bits = (unsigned char)root; + (*table)[low].val = (unsigned short)(next - *table); + } + } + + /* + Fill in rest of table for incomplete codes. This loop is similar to the + loop above in incrementing huff for table indices. It is assumed that + len is equal to curr + drop, so there is no loop needed to increment + through high index bits. When the current sub-table is filled, the loop + drops back to the root table to fill in any remaining entries there. + */ + this.op = (unsigned char)64; /* invalid code marker */ + this.bits = (unsigned char)(len - drop); + this.val = (unsigned short)0; + while (huff != 0) { + /* when done with sub-table, drop back to root table */ + if (drop != 0 && (huff & mask) != low) { + drop = 0; + len = root; + next = *table; + curr = root; + this.bits = (unsigned char)len; + } + + /* put invalid code marker in table */ + next[huff >> drop] = this; + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + } + + /* set return parameters */ + *table += used; + *bits = root; + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.h new file mode 100644 index 000000000..5ab21f0c6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/infback9/inftree9.h @@ -0,0 +1,61 @@ +/* inftree9.h -- header to use inftree9.c + * Copyright (C) 1995-2008 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Structure for decoding tables. Each entry provides either the + information needed to do the operation requested by the code that + indexed that table entry, or it provides a pointer to another + table that indexes more bits of the code. op indicates whether + the entry is a pointer to another table, a literal, a length or + distance, an end-of-block, or an invalid code. For a table + pointer, the low four bits of op is the number of index bits of + that table. For a length or distance, the low four bits of op + is the number of extra bits to get after the code. bits is + the number of bits in this code or part of the code to drop off + of the bit buffer. val is the actual byte to output in the case + of a literal, the base length or distance, or the offset from + the current table to the next table. Each entry is four bytes. */ +typedef struct { + unsigned char op; /* operation, extra bits, table bits */ + unsigned char bits; /* bits in this part of the code */ + unsigned short val; /* offset in table or code value */ +} code; + +/* op values as set by inflate_table(): + 00000000 - literal + 0000tttt - table link, tttt != 0 is the number of table index bits + 100eeeee - length or distance, eeee is the number of extra bits + 01100000 - end of block + 01000000 - invalid code + */ + +/* Maximum size of the dynamic table. The maximum number of code structures is + 1446, which is the sum of 852 for literal/length codes and 594 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribtution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns returns 852, and "enough 32 6 15" for distance codes returns 594. + The initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in infback9.c. If the root table size is changed, + then these maximum sizes would be need to be recalculated and updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 594 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) + +/* Type of code to build for inflate_table9() */ +typedef enum { + CODES, + LENS, + DISTS +} codetype; + +extern int inflate_table9 OF((codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work)); diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffas86.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffas86.c new file mode 100644 index 000000000..7292f67b7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffas86.c @@ -0,0 +1,1157 @@ +/* inffas86.c is a hand tuned assembler version of + * + * inffast.c -- fast decoding + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also + * slightly quicker on x86 systems because, instead of using rep movsb to copy + * data, it uses rep movsw, which moves data in 2-byte chunks instead of single + * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates + * from http://fedora.linux.duke.edu/fc1_x86_64 + * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with + * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, + * when decompressing mozilla-source-1.3.tar.gz. + * + * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from + * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at + * the moment. I have successfully compiled and tested this code with gcc2.96, + * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S + * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX + * enabled. I will attempt to merge the MMX code into this version. Newer + * versions of this and inffast.S can be found at + * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* Mark Adler's comments from inffast.c: */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + struct inffast_ar { +/* 64 32 x86 x86_64 */ +/* ar offset register */ +/* 0 0 */ void *esp; /* esp save */ +/* 8 4 */ void *ebp; /* ebp save */ +/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ +/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ +/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ +/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ +/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ +/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ +/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ +/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ +/* 80 40 */ unsigned long hold; /* edx rdx local strm->hold */ +/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ +/* 92 48 */ unsigned wsize; /* window size */ +/* 96 52 */ unsigned write; /* window write index */ +/*100 56 */ unsigned lmask; /* r12 mask for lcode */ +/*104 60 */ unsigned dmask; /* r13 mask for dcode */ +/*108 64 */ unsigned len; /* r14 match length */ +/*112 68 */ unsigned dist; /* r15 match distance */ +/*116 72 */ unsigned status; /* set when state chng*/ + } ar; + +#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 ) +#define PAD_AVAIL_IN 6 +#define PAD_AVAIL_OUT 258 +#else +#define PAD_AVAIL_IN 5 +#define PAD_AVAIL_OUT 257 +#endif + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + ar.in = strm->next_in; + ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); + ar.out = strm->next_out; + ar.beg = ar.out - (start - strm->avail_out); + ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); + ar.wsize = state->wsize; + ar.write = state->wnext; + ar.window = state->window; + ar.hold = state->hold; + ar.bits = state->bits; + ar.lcode = state->lencode; + ar.dcode = state->distcode; + ar.lmask = (1U << state->lenbits) - 1; + ar.dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + /* align in on 1/2 hold size boundary */ + while (((unsigned long)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { + ar.hold += (unsigned long)*ar.in++ << ar.bits; + ar.bits += 8; + } + +#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 ) + __asm__ __volatile__ ( +" leaq %0, %%rax\n" +" movq %%rbp, 8(%%rax)\n" /* save regs rbp and rsp */ +" movq %%rsp, (%%rax)\n" +" movq %%rax, %%rsp\n" /* make rsp point to &ar */ +" movq 16(%%rsp), %%rsi\n" /* rsi = in */ +" movq 32(%%rsp), %%rdi\n" /* rdi = out */ +" movq 24(%%rsp), %%r9\n" /* r9 = last */ +" movq 48(%%rsp), %%r10\n" /* r10 = end */ +" movq 64(%%rsp), %%rbp\n" /* rbp = lcode */ +" movq 72(%%rsp), %%r11\n" /* r11 = dcode */ +" movq 80(%%rsp), %%rdx\n" /* rdx = hold */ +" movl 88(%%rsp), %%ebx\n" /* ebx = bits */ +" movl 100(%%rsp), %%r12d\n" /* r12d = lmask */ +" movl 104(%%rsp), %%r13d\n" /* r13d = dmask */ + /* r14d = len */ + /* r15d = dist */ +" cld\n" +" cmpq %%rdi, %%r10\n" +" je .L_one_time\n" /* if only one decode left */ +" cmpq %%rsi, %%r9\n" +" je .L_one_time\n" +" jmp .L_do_loop\n" + +".L_one_time:\n" +" movq %%r12, %%r8\n" /* r8 = lmask */ +" cmpb $32, %%bl\n" +" ja .L_get_length_code_one_time\n" + +" lodsl\n" /* eax = *(uint *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $32, %%bl\n" /* bits += 32 */ +" shlq %%cl, %%rax\n" +" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */ +" jmp .L_get_length_code_one_time\n" + +".align 32,0x90\n" +".L_while_test:\n" +" cmpq %%rdi, %%r10\n" +" jbe .L_break_loop\n" +" cmpq %%rsi, %%r9\n" +" jbe .L_break_loop\n" + +".L_do_loop:\n" +" movq %%r12, %%r8\n" /* r8 = lmask */ +" cmpb $32, %%bl\n" +" ja .L_get_length_code\n" /* if (32 < bits) */ + +" lodsl\n" /* eax = *(uint *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $32, %%bl\n" /* bits += 32 */ +" shlq %%cl, %%rax\n" +" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */ + +".L_get_length_code:\n" +" andq %%rdx, %%r8\n" /* r8 &= hold */ +" movl (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */ + +" movb %%ah, %%cl\n" /* cl = this.bits */ +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrq %%cl, %%rdx\n" /* hold >>= this.bits */ + +" testb %%al, %%al\n" +" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */ + +" movq %%r12, %%r8\n" /* r8 = lmask */ +" shrl $16, %%eax\n" /* output this.val char */ +" stosb\n" + +".L_get_length_code_one_time:\n" +" andq %%rdx, %%r8\n" /* r8 &= hold */ +" movl (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */ + +".L_dolen:\n" +" movb %%ah, %%cl\n" /* cl = this.bits */ +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrq %%cl, %%rdx\n" /* hold >>= this.bits */ + +" testb %%al, %%al\n" +" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */ + +" shrl $16, %%eax\n" /* output this.val char */ +" stosb\n" +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_length_base:\n" +" movl %%eax, %%r14d\n" /* len = this */ +" shrl $16, %%r14d\n" /* len = this.val */ +" movb %%al, %%cl\n" + +" testb $16, %%al\n" +" jz .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */ +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_decode_distance\n" /* if (!op) */ + +".L_add_bits_to_len:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrq %%cl, %%rdx\n" +" addl %%eax, %%r14d\n" /* len += hold & mask[op] */ + +".L_decode_distance:\n" +" movq %%r13, %%r8\n" /* r8 = dmask */ +" cmpb $32, %%bl\n" +" ja .L_get_distance_code\n" /* if (32 < bits) */ + +" lodsl\n" /* eax = *(uint *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $32, %%bl\n" /* bits += 32 */ +" shlq %%cl, %%rax\n" +" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */ + +".L_get_distance_code:\n" +" andq %%rdx, %%r8\n" /* r8 &= hold */ +" movl (%%r11,%%r8,4), %%eax\n" /* eax = dcode[hold & dmask] */ + +".L_dodist:\n" +" movl %%eax, %%r15d\n" /* dist = this */ +" shrl $16, %%r15d\n" /* dist = this.val */ +" movb %%ah, %%cl\n" +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrq %%cl, %%rdx\n" /* hold >>= this.bits */ +" movb %%al, %%cl\n" /* cl = this.op */ + +" testb $16, %%al\n" /* if ((op & 16) == 0) */ +" jz .L_test_for_second_level_dist\n" +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_check_dist_one\n" + +".L_add_bits_to_dist:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" /* (1 << op) - 1 */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrq %%cl, %%rdx\n" +" addl %%eax, %%r15d\n" /* dist += hold & ((1 << op) - 1) */ + +".L_check_window:\n" +" movq %%rsi, %%r8\n" /* save in so from can use it's reg */ +" movq %%rdi, %%rax\n" +" subq 40(%%rsp), %%rax\n" /* nbytes = out - beg */ + +" cmpl %%r15d, %%eax\n" +" jb .L_clip_window\n" /* if (dist > nbytes) 4.2% */ + +" movl %%r14d, %%ecx\n" /* ecx = len */ +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = out - dist */ + +" sarl %%ecx\n" +" jnc .L_copy_two\n" /* if len % 2 == 0 */ + +" rep movsw\n" +" movb (%%rsi), %%al\n" +" movb %%al, (%%rdi)\n" +" incq %%rdi\n" + +" movq %%r8, %%rsi\n" /* move in back to %rsi, toss from */ +" jmp .L_while_test\n" + +".L_copy_two:\n" +" rep movsw\n" +" movq %%r8, %%rsi\n" /* move in back to %rsi, toss from */ +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_check_dist_one:\n" +" cmpl $1, %%r15d\n" /* if dist 1, is a memset */ +" jne .L_check_window\n" +" cmpq %%rdi, 40(%%rsp)\n" /* if out == beg, outside window */ +" je .L_check_window\n" + +" movl %%r14d, %%ecx\n" /* ecx = len */ +" movb -1(%%rdi), %%al\n" +" movb %%al, %%ah\n" + +" sarl %%ecx\n" +" jnc .L_set_two\n" +" movb %%al, (%%rdi)\n" +" incq %%rdi\n" + +".L_set_two:\n" +" rep stosw\n" +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_second_level_length:\n" +" testb $64, %%al\n" +" jnz .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl %%r14d, %%eax\n" /* eax += len */ +" movl (%%rbp,%%rax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/ +" jmp .L_dolen\n" + +".align 32,0x90\n" +".L_test_for_second_level_dist:\n" +" testb $64, %%al\n" +" jnz .L_invalid_distance_code\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl %%r15d, %%eax\n" /* eax += dist */ +" movl (%%r11,%%rax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/ +" jmp .L_dodist\n" + +".align 32,0x90\n" +".L_clip_window:\n" +" movl %%eax, %%ecx\n" /* ecx = nbytes */ +" movl 92(%%rsp), %%eax\n" /* eax = wsize, prepare for dist cmp */ +" negl %%ecx\n" /* nbytes = -nbytes */ + +" cmpl %%r15d, %%eax\n" +" jb .L_invalid_distance_too_far\n" /* if (dist > wsize) */ + +" addl %%r15d, %%ecx\n" /* nbytes = dist - nbytes */ +" cmpl $0, 96(%%rsp)\n" +" jne .L_wrap_around_window\n" /* if (write != 0) */ + +" movq 56(%%rsp), %%rsi\n" /* from = window */ +" subl %%ecx, %%eax\n" /* eax -= nbytes */ +" addq %%rax, %%rsi\n" /* from += wsize - nbytes */ + +" movl %%r14d, %%eax\n" /* eax = len */ +" cmpl %%ecx, %%r14d\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* eax -= nbytes */ +" rep movsb\n" +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = &out[ -dist ] */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_wrap_around_window:\n" +" movl 96(%%rsp), %%eax\n" /* eax = write */ +" cmpl %%eax, %%ecx\n" +" jbe .L_contiguous_in_window\n" /* if (write >= nbytes) */ + +" movl 92(%%rsp), %%esi\n" /* from = wsize */ +" addq 56(%%rsp), %%rsi\n" /* from += window */ +" addq %%rax, %%rsi\n" /* from += write */ +" subq %%rcx, %%rsi\n" /* from -= nbytes */ +" subl %%eax, %%ecx\n" /* nbytes -= write */ + +" movl %%r14d, %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movq 56(%%rsp), %%rsi\n" /* from = window */ +" movl 96(%%rsp), %%ecx\n" /* nbytes = write */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = out - dist */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_contiguous_in_window:\n" +" movq 56(%%rsp), %%rsi\n" /* rsi = window */ +" addq %%rax, %%rsi\n" +" subq %%rcx, %%rsi\n" /* from += write - nbytes */ + +" movl %%r14d, %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = out - dist */ +" jmp .L_do_copy\n" /* if (nbytes >= len) */ + +".align 32,0x90\n" +".L_do_copy:\n" +" movl %%eax, %%ecx\n" /* ecx = len */ +" rep movsb\n" + +" movq %%r8, %%rsi\n" /* move in back to %esi, toss from */ +" jmp .L_while_test\n" + +".L_test_for_end_of_block:\n" +" testb $32, %%al\n" +" jz .L_invalid_literal_length_code\n" +" movl $1, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_literal_length_code:\n" +" movl $2, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_code:\n" +" movl $3, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_too_far:\n" +" movl $4, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_break_loop:\n" +" movl $0, 116(%%rsp)\n" + +".L_break_loop_with_status:\n" +/* put in, out, bits, and hold back into ar and pop esp */ +" movq %%rsi, 16(%%rsp)\n" /* in */ +" movq %%rdi, 32(%%rsp)\n" /* out */ +" movl %%ebx, 88(%%rsp)\n" /* bits */ +" movq %%rdx, 80(%%rsp)\n" /* hold */ +" movq (%%rsp), %%rax\n" /* restore rbp and rsp */ +" movq 8(%%rsp), %%rbp\n" +" movq %%rax, %%rsp\n" + : + : "m" (ar) + : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", + "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" + ); +#elif ( defined( __GNUC__ ) || defined( __ICC ) ) && defined( __i386 ) + __asm__ __volatile__ ( +" leal %0, %%eax\n" +" movl %%esp, (%%eax)\n" /* save esp, ebp */ +" movl %%ebp, 4(%%eax)\n" +" movl %%eax, %%esp\n" +" movl 8(%%esp), %%esi\n" /* esi = in */ +" movl 16(%%esp), %%edi\n" /* edi = out */ +" movl 40(%%esp), %%edx\n" /* edx = hold */ +" movl 44(%%esp), %%ebx\n" /* ebx = bits */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ + +" cld\n" +" jmp .L_do_loop\n" + +".align 32,0x90\n" +".L_while_test:\n" +" cmpl %%edi, 24(%%esp)\n" /* out < end */ +" jbe .L_break_loop\n" +" cmpl %%esi, 12(%%esp)\n" /* in < last */ +" jbe .L_break_loop\n" + +".L_do_loop:\n" +" cmpb $15, %%bl\n" +" ja .L_get_length_code\n" /* if (15 < bits) */ + +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ + +".L_get_length_code:\n" +" movl 56(%%esp), %%eax\n" /* eax = lmask */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" movl (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[hold & lmask] */ + +".L_dolen:\n" +" movb %%ah, %%cl\n" /* cl = this.bits */ +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrl %%cl, %%edx\n" /* hold >>= this.bits */ + +" testb %%al, %%al\n" +" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */ + +" shrl $16, %%eax\n" /* output this.val char */ +" stosb\n" +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_length_base:\n" +" movl %%eax, %%ecx\n" /* len = this */ +" shrl $16, %%ecx\n" /* len = this.val */ +" movl %%ecx, 64(%%esp)\n" /* save len */ +" movb %%al, %%cl\n" + +" testb $16, %%al\n" +" jz .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */ +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_decode_distance\n" /* if (!op) */ +" cmpb %%cl, %%bl\n" +" jae .L_add_bits_to_len\n" /* if (op <= bits) */ + +" movb %%cl, %%ch\n" /* stash op in ch, freeing cl */ +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ +" movb %%ch, %%cl\n" /* move op back to ecx */ + +".L_add_bits_to_len:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrl %%cl, %%edx\n" +" addl %%eax, 64(%%esp)\n" /* len += hold & mask[op] */ + +".L_decode_distance:\n" +" cmpb $15, %%bl\n" +" ja .L_get_distance_code\n" /* if (15 < bits) */ + +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ + +".L_get_distance_code:\n" +" movl 60(%%esp), %%eax\n" /* eax = dmask */ +" movl 36(%%esp), %%ecx\n" /* ecx = dcode */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" movl (%%ecx,%%eax,4), %%eax\n"/* eax = dcode[hold & dmask] */ + +".L_dodist:\n" +" movl %%eax, %%ebp\n" /* dist = this */ +" shrl $16, %%ebp\n" /* dist = this.val */ +" movb %%ah, %%cl\n" +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrl %%cl, %%edx\n" /* hold >>= this.bits */ +" movb %%al, %%cl\n" /* cl = this.op */ + +" testb $16, %%al\n" /* if ((op & 16) == 0) */ +" jz .L_test_for_second_level_dist\n" +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_check_dist_one\n" +" cmpb %%cl, %%bl\n" +" jae .L_add_bits_to_dist\n" /* if (op <= bits) 97.6% */ + +" movb %%cl, %%ch\n" /* stash op in ch, freeing cl */ +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ +" movb %%ch, %%cl\n" /* move op back to ecx */ + +".L_add_bits_to_dist:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" /* (1 << op) - 1 */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrl %%cl, %%edx\n" +" addl %%eax, %%ebp\n" /* dist += hold & ((1 << op) - 1) */ + +".L_check_window:\n" +" movl %%esi, 8(%%esp)\n" /* save in so from can use it's reg */ +" movl %%edi, %%eax\n" +" subl 20(%%esp), %%eax\n" /* nbytes = out - beg */ + +" cmpl %%ebp, %%eax\n" +" jb .L_clip_window\n" /* if (dist > nbytes) 4.2% */ + +" movl 64(%%esp), %%ecx\n" /* ecx = len */ +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ + +" sarl %%ecx\n" +" jnc .L_copy_two\n" /* if len % 2 == 0 */ + +" rep movsw\n" +" movb (%%esi), %%al\n" +" movb %%al, (%%edi)\n" +" incl %%edi\n" + +" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".L_copy_two:\n" +" rep movsw\n" +" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_check_dist_one:\n" +" cmpl $1, %%ebp\n" /* if dist 1, is a memset */ +" jne .L_check_window\n" +" cmpl %%edi, 20(%%esp)\n" +" je .L_check_window\n" /* out == beg, if outside window */ + +" movl 64(%%esp), %%ecx\n" /* ecx = len */ +" movb -1(%%edi), %%al\n" +" movb %%al, %%ah\n" + +" sarl %%ecx\n" +" jnc .L_set_two\n" +" movb %%al, (%%edi)\n" +" incl %%edi\n" + +".L_set_two:\n" +" rep stosw\n" +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_second_level_length:\n" +" testb $64, %%al\n" +" jnz .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl 64(%%esp), %%eax\n" /* eax += len */ +" movl (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/ +" jmp .L_dolen\n" + +".align 32,0x90\n" +".L_test_for_second_level_dist:\n" +" testb $64, %%al\n" +" jnz .L_invalid_distance_code\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl %%ebp, %%eax\n" /* eax += dist */ +" movl 36(%%esp), %%ecx\n" /* ecx = dcode */ +" movl (%%ecx,%%eax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/ +" jmp .L_dodist\n" + +".align 32,0x90\n" +".L_clip_window:\n" +" movl %%eax, %%ecx\n" +" movl 48(%%esp), %%eax\n" /* eax = wsize */ +" negl %%ecx\n" /* nbytes = -nbytes */ +" movl 28(%%esp), %%esi\n" /* from = window */ + +" cmpl %%ebp, %%eax\n" +" jb .L_invalid_distance_too_far\n" /* if (dist > wsize) */ + +" addl %%ebp, %%ecx\n" /* nbytes = dist - nbytes */ +" cmpl $0, 52(%%esp)\n" +" jne .L_wrap_around_window\n" /* if (write != 0) */ + +" subl %%ecx, %%eax\n" +" addl %%eax, %%esi\n" /* from += wsize - nbytes */ + +" movl 64(%%esp), %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_wrap_around_window:\n" +" movl 52(%%esp), %%eax\n" /* eax = write */ +" cmpl %%eax, %%ecx\n" +" jbe .L_contiguous_in_window\n" /* if (write >= nbytes) */ + +" addl 48(%%esp), %%esi\n" /* from += wsize */ +" addl %%eax, %%esi\n" /* from += write */ +" subl %%ecx, %%esi\n" /* from -= nbytes */ +" subl %%eax, %%ecx\n" /* nbytes -= write */ + +" movl 64(%%esp), %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl 28(%%esp), %%esi\n" /* from = window */ +" movl 52(%%esp), %%ecx\n" /* nbytes = write */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_contiguous_in_window:\n" +" addl %%eax, %%esi\n" +" subl %%ecx, %%esi\n" /* from += write - nbytes */ + +" movl 64(%%esp), %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ +" jmp .L_do_copy\n" /* if (nbytes >= len) */ + +".align 32,0x90\n" +".L_do_copy:\n" +" movl %%eax, %%ecx\n" +" rep movsb\n" + +" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".L_test_for_end_of_block:\n" +" testb $32, %%al\n" +" jz .L_invalid_literal_length_code\n" +" movl $1, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_literal_length_code:\n" +" movl $2, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_code:\n" +" movl $3, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_too_far:\n" +" movl 8(%%esp), %%esi\n" +" movl $4, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_break_loop:\n" +" movl $0, 72(%%esp)\n" + +".L_break_loop_with_status:\n" +/* put in, out, bits, and hold back into ar and pop esp */ +" movl %%esi, 8(%%esp)\n" /* save in */ +" movl %%edi, 16(%%esp)\n" /* save out */ +" movl %%ebx, 44(%%esp)\n" /* save bits */ +" movl %%edx, 40(%%esp)\n" /* save hold */ +" movl 4(%%esp), %%ebp\n" /* restore esp, ebp */ +" movl (%%esp), %%esp\n" + : + : "m" (ar) + : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi" + ); +#elif defined( _MSC_VER ) && ! defined( _M_AMD64 ) + __asm { + lea eax, ar + mov [eax], esp /* save esp, ebp */ + mov [eax+4], ebp + mov esp, eax + mov esi, [esp+8] /* esi = in */ + mov edi, [esp+16] /* edi = out */ + mov edx, [esp+40] /* edx = hold */ + mov ebx, [esp+44] /* ebx = bits */ + mov ebp, [esp+32] /* ebp = lcode */ + + cld + jmp L_do_loop + +ALIGN 4 +L_while_test: + cmp [esp+24], edi + jbe L_break_loop + cmp [esp+12], esi + jbe L_break_loop + +L_do_loop: + cmp bl, 15 + ja L_get_length_code /* if (15 < bits) */ + + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + +L_get_length_code: + mov eax, [esp+56] /* eax = lmask */ + and eax, edx /* eax &= hold */ + mov eax, [ebp+eax*4] /* eax = lcode[hold & lmask] */ + +L_dolen: + mov cl, ah /* cl = this.bits */ + sub bl, ah /* bits -= this.bits */ + shr edx, cl /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base /* if (op != 0) 45.7% */ + + shr eax, 16 /* output this.val char */ + stosb + jmp L_while_test + +ALIGN 4 +L_test_for_length_base: + mov ecx, eax /* len = this */ + shr ecx, 16 /* len = this.val */ + mov [esp+64], ecx /* save len */ + mov cl, al + + test al, 16 + jz L_test_for_second_level_length /* if ((op & 16) == 0) 8% */ + and cl, 15 /* op &= 15 */ + jz L_decode_distance /* if (!op) */ + cmp bl, cl + jae L_add_bits_to_len /* if (op <= bits) */ + + mov ch, cl /* stash op in ch, freeing cl */ + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + mov cl, ch /* move op back to ecx */ + +L_add_bits_to_len: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx /* eax &= hold */ + shr edx, cl + add [esp+64], eax /* len += hold & mask[op] */ + +L_decode_distance: + cmp bl, 15 + ja L_get_distance_code /* if (15 < bits) */ + + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + +L_get_distance_code: + mov eax, [esp+60] /* eax = dmask */ + mov ecx, [esp+36] /* ecx = dcode */ + and eax, edx /* eax &= hold */ + mov eax, [ecx+eax*4]/* eax = dcode[hold & dmask] */ + +L_dodist: + mov ebp, eax /* dist = this */ + shr ebp, 16 /* dist = this.val */ + mov cl, ah + sub bl, ah /* bits -= this.bits */ + shr edx, cl /* hold >>= this.bits */ + mov cl, al /* cl = this.op */ + + test al, 16 /* if ((op & 16) == 0) */ + jz L_test_for_second_level_dist + and cl, 15 /* op &= 15 */ + jz L_check_dist_one + cmp bl, cl + jae L_add_bits_to_dist /* if (op <= bits) 97.6% */ + + mov ch, cl /* stash op in ch, freeing cl */ + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + mov cl, ch /* move op back to ecx */ + +L_add_bits_to_dist: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax /* (1 << op) - 1 */ + and eax, edx /* eax &= hold */ + shr edx, cl + add ebp, eax /* dist += hold & ((1 << op) - 1) */ + +L_check_window: + mov [esp+8], esi /* save in so from can use it's reg */ + mov eax, edi + sub eax, [esp+20] /* nbytes = out - beg */ + + cmp eax, ebp + jb L_clip_window /* if (dist > nbytes) 4.2% */ + + mov ecx, [esp+64] /* ecx = len */ + mov esi, edi + sub esi, ebp /* from = out - dist */ + + sar ecx, 1 + jnc L_copy_two + + rep movsw + mov al, [esi] + mov [edi], al + inc edi + + mov esi, [esp+8] /* move in back to %esi, toss from */ + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +L_copy_two: + rep movsw + mov esi, [esp+8] /* move in back to %esi, toss from */ + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp ebp, 1 /* if dist 1, is a memset */ + jne L_check_window + cmp [esp+20], edi + je L_check_window /* out == beg, if outside window */ + + mov ecx, [esp+64] /* ecx = len */ + mov al, [edi-1] + mov ah, al + + sar ecx, 1 + jnc L_set_two + mov [edi], al /* memset out with from[-1] */ + inc edi + +L_set_two: + rep stosw + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + test al, 64 + jnz L_test_for_end_of_block /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx /* eax &= hold */ + add eax, [esp+64] /* eax += len */ + mov eax, [ebp+eax*4] /* eax = lcode[val+(hold&mask[op])]*/ + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + test al, 64 + jnz L_invalid_distance_code /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx /* eax &= hold */ + add eax, ebp /* eax += dist */ + mov ecx, [esp+36] /* ecx = dcode */ + mov eax, [ecx+eax*4] /* eax = dcode[val+(hold&mask[op])]*/ + jmp L_dodist + +ALIGN 4 +L_clip_window: + mov ecx, eax + mov eax, [esp+48] /* eax = wsize */ + neg ecx /* nbytes = -nbytes */ + mov esi, [esp+28] /* from = window */ + + cmp eax, ebp + jb L_invalid_distance_too_far /* if (dist > wsize) */ + + add ecx, ebp /* nbytes = dist - nbytes */ + cmp dword ptr [esp+52], 0 + jne L_wrap_around_window /* if (write != 0) */ + + sub eax, ecx + add esi, eax /* from += wsize - nbytes */ + + mov eax, [esp+64] /* eax = len */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, edi + sub esi, ebp /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_wrap_around_window: + mov eax, [esp+52] /* eax = write */ + cmp ecx, eax + jbe L_contiguous_in_window /* if (write >= nbytes) */ + + add esi, [esp+48] /* from += wsize */ + add esi, eax /* from += write */ + sub esi, ecx /* from -= nbytes */ + sub ecx, eax /* nbytes -= write */ + + mov eax, [esp+64] /* eax = len */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, [esp+28] /* from = window */ + mov ecx, [esp+52] /* nbytes = write */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, edi + sub esi, ebp /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_contiguous_in_window: + add esi, eax + sub esi, ecx /* from += write - nbytes */ + + mov eax, [esp+64] /* eax = len */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, edi + sub esi, ebp /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_do_copy: + mov ecx, eax + rep movsb + + mov esi, [esp+8] /* move in back to %esi, toss from */ + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +L_test_for_end_of_block: + test al, 32 + jz L_invalid_literal_length_code + mov dword ptr [esp+72], 1 + jmp L_break_loop_with_status + +L_invalid_literal_length_code: + mov dword ptr [esp+72], 2 + jmp L_break_loop_with_status + +L_invalid_distance_code: + mov dword ptr [esp+72], 3 + jmp L_break_loop_with_status + +L_invalid_distance_too_far: + mov esi, [esp+4] + mov dword ptr [esp+72], 4 + jmp L_break_loop_with_status + +L_break_loop: + mov dword ptr [esp+72], 0 + +L_break_loop_with_status: +/* put in, out, bits, and hold back into ar and pop esp */ + mov [esp+8], esi /* save in */ + mov [esp+16], edi /* save out */ + mov [esp+44], ebx /* save bits */ + mov [esp+40], edx /* save hold */ + mov ebp, [esp+4] /* restore esp, ebp */ + mov esp, [esp] + } +#else +#error "x86 architecture not defined" +#endif + + if (ar.status > 1) { + if (ar.status == 2) + strm->msg = "invalid literal/length code"; + else if (ar.status == 3) + strm->msg = "invalid distance code"; + else + strm->msg = "invalid distance too far back"; + state->mode = BAD; + } + else if ( ar.status == 1 ) { + state->mode = TYPE; + } + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + ar.len = ar.bits >> 3; + ar.in -= ar.len; + ar.bits -= ar.len << 3; + ar.hold &= (1U << ar.bits) - 1; + + /* update state and return */ + strm->next_in = ar.in; + strm->next_out = ar.out; + strm->avail_in = (unsigned)(ar.in < ar.last ? + PAD_AVAIL_IN + (ar.last - ar.in) : + PAD_AVAIL_IN - (ar.in - ar.last)); + strm->avail_out = (unsigned)(ar.out < ar.end ? + PAD_AVAIL_OUT + (ar.end - ar.out) : + PAD_AVAIL_OUT - (ar.out - ar.end)); + state->hold = ar.hold; + state->bits = ar.bits; + return; +} + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffast.S b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffast.S new file mode 100644 index 000000000..2245a2905 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/inflate86/inffast.S @@ -0,0 +1,1368 @@ +/* + * inffast.S is a hand tuned assembler version of: + * + * inffast.c -- fast decoding + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * This version (Jan-23-2003) of inflate_fast was coded and tested under + * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution. On that + * machine, I found that gzip style archives decompressed about 20% faster than + * the gcc-3.2 -O3 -fomit-frame-pointer compiled version. Your results will + * depend on how large of a buffer is used for z_stream.next_in & next_out + * (8K-32K worked best for my 256K cpu cache) and how much overhead there is in + * stream processing I/O and crc32/addler32. In my case, this routine used + * 70% of the cpu time and crc32 used 20%. + * + * I am confident that this version will work in the general case, but I have + * not tested a wide variety of datasets or a wide variety of platforms. + * + * Jan-24-2003 -- Added -DUSE_MMX define for slightly faster inflating. + * It should be a runtime flag instead of compile time flag... + * + * Jan-26-2003 -- Added runtime check for MMX support with cpuid instruction. + * With -DUSE_MMX, only MMX code is compiled. With -DNO_MMX, only non-MMX code + * is compiled. Without either option, runtime detection is enabled. Runtime + * detection should work on all modern cpus and the recomended algorithm (flip + * ID bit on eflags and then use the cpuid instruction) is used in many + * multimedia applications. Tested under win2k with gcc-2.95 and gas-2.12 + * distributed with cygwin3. Compiling with gcc-2.95 -c inffast.S -o + * inffast.obj generates a COFF object which can then be linked with MSVC++ + * compiled code. Tested under FreeBSD 4.7 with gcc-2.95. + * + * Jan-28-2003 -- Tested Athlon XP... MMX mode is slower than no MMX (and + * slower than compiler generated code). Adjusted cpuid check to use the MMX + * code only for Pentiums < P4 until I have more data on the P4. Speed + * improvment is only about 15% on the Athlon when compared with code generated + * with MSVC++. Not sure yet, but I think the P4 will also be slower using the + * MMX mode because many of it's x86 ALU instructions execute in .5 cycles and + * have less latency than MMX ops. Added code to buffer the last 11 bytes of + * the input stream since the MMX code grabs bits in chunks of 32, which + * differs from the inffast.c algorithm. I don't think there would have been + * read overruns where a page boundary was crossed (a segfault), but there + * could have been overruns when next_in ends on unaligned memory (unintialized + * memory read). + * + * Mar-13-2003 -- P4 MMX is slightly slower than P4 NO_MMX. I created a C + * version of the non-MMX code so that it doesn't depend on zstrm and zstate + * structure offsets which are hard coded in this file. This was last tested + * with zlib-1.2.0 which is currently in beta testing, newer versions of this + * and inffas86.c can be found at http://www.eetbeetee.com/zlib/ and + * http://www.charm.net/~christop/zlib/ + */ + + +/* + * if you have underscore linking problems (_inflate_fast undefined), try + * using -DGAS_COFF + */ +#if ! defined( GAS_COFF ) && ! defined( GAS_ELF ) + +#if defined( WIN32 ) || defined( __CYGWIN__ ) +#define GAS_COFF /* windows object format */ +#else +#define GAS_ELF +#endif + +#endif /* ! GAS_COFF && ! GAS_ELF */ + + +#if defined( GAS_COFF ) + +/* coff externals have underscores */ +#define inflate_fast _inflate_fast +#define inflate_fast_use_mmx _inflate_fast_use_mmx + +#endif /* GAS_COFF */ + + +.file "inffast.S" + +.globl inflate_fast + +.text +.align 4,0 +.L_invalid_literal_length_code_msg: +.string "invalid literal/length code" + +.align 4,0 +.L_invalid_distance_code_msg: +.string "invalid distance code" + +.align 4,0 +.L_invalid_distance_too_far_msg: +.string "invalid distance too far back" + +#if ! defined( NO_MMX ) +.align 4,0 +.L_mask: /* mask[N] = ( 1 << N ) - 1 */ +.long 0 +.long 1 +.long 3 +.long 7 +.long 15 +.long 31 +.long 63 +.long 127 +.long 255 +.long 511 +.long 1023 +.long 2047 +.long 4095 +.long 8191 +.long 16383 +.long 32767 +.long 65535 +.long 131071 +.long 262143 +.long 524287 +.long 1048575 +.long 2097151 +.long 4194303 +.long 8388607 +.long 16777215 +.long 33554431 +.long 67108863 +.long 134217727 +.long 268435455 +.long 536870911 +.long 1073741823 +.long 2147483647 +.long 4294967295 +#endif /* NO_MMX */ + +.text + +/* + * struct z_stream offsets, in zlib.h + */ +#define next_in_strm 0 /* strm->next_in */ +#define avail_in_strm 4 /* strm->avail_in */ +#define next_out_strm 12 /* strm->next_out */ +#define avail_out_strm 16 /* strm->avail_out */ +#define msg_strm 24 /* strm->msg */ +#define state_strm 28 /* strm->state */ + +/* + * struct inflate_state offsets, in inflate.h + */ +#define mode_state 0 /* state->mode */ +#define wsize_state 32 /* state->wsize */ +#define write_state 40 /* state->write */ +#define window_state 44 /* state->window */ +#define hold_state 48 /* state->hold */ +#define bits_state 52 /* state->bits */ +#define lencode_state 68 /* state->lencode */ +#define distcode_state 72 /* state->distcode */ +#define lenbits_state 76 /* state->lenbits */ +#define distbits_state 80 /* state->distbits */ + +/* + * inflate_fast's activation record + */ +#define local_var_size 64 /* how much local space for vars */ +#define strm_sp 88 /* first arg: z_stream * (local_var_size + 24) */ +#define start_sp 92 /* second arg: unsigned int (local_var_size + 28) */ + +/* + * offsets for local vars on stack + */ +#define out 60 /* unsigned char* */ +#define window 56 /* unsigned char* */ +#define wsize 52 /* unsigned int */ +#define write 48 /* unsigned int */ +#define in 44 /* unsigned char* */ +#define beg 40 /* unsigned char* */ +#define buf 28 /* char[ 12 ] */ +#define len 24 /* unsigned int */ +#define last 20 /* unsigned char* */ +#define end 16 /* unsigned char* */ +#define dcode 12 /* code* */ +#define lcode 8 /* code* */ +#define dmask 4 /* unsigned int */ +#define lmask 0 /* unsigned int */ + +/* + * typedef enum inflate_mode consts, in inflate.h + */ +#define INFLATE_MODE_TYPE 11 /* state->mode flags enum-ed in inflate.h */ +#define INFLATE_MODE_BAD 26 + + +#if ! defined( USE_MMX ) && ! defined( NO_MMX ) + +#define RUN_TIME_MMX + +#define CHECK_MMX 1 +#define DO_USE_MMX 2 +#define DONT_USE_MMX 3 + +.globl inflate_fast_use_mmx + +.data + +.align 4,0 +inflate_fast_use_mmx: /* integer flag for run time control 1=check,2=mmx,3=no */ +.long CHECK_MMX + +#if defined( GAS_ELF ) +/* elf info */ +.type inflate_fast_use_mmx,@object +.size inflate_fast_use_mmx,4 +#endif + +#endif /* RUN_TIME_MMX */ + +#if defined( GAS_COFF ) +/* coff info: scl 2 = extern, type 32 = function */ +.def inflate_fast; .scl 2; .type 32; .endef +#endif + +.text + +.align 32,0x90 +inflate_fast: + pushl %edi + pushl %esi + pushl %ebp + pushl %ebx + pushf /* save eflags (strm_sp, state_sp assumes this is 32 bits) */ + subl $local_var_size, %esp + cld + +#define strm_r %esi +#define state_r %edi + + movl strm_sp(%esp), strm_r + movl state_strm(strm_r), state_r + + /* in = strm->next_in; + * out = strm->next_out; + * last = in + strm->avail_in - 11; + * beg = out - (start - strm->avail_out); + * end = out + (strm->avail_out - 257); + */ + movl avail_in_strm(strm_r), %edx + movl next_in_strm(strm_r), %eax + + addl %eax, %edx /* avail_in += next_in */ + subl $11, %edx /* avail_in -= 11 */ + + movl %eax, in(%esp) + movl %edx, last(%esp) + + movl start_sp(%esp), %ebp + movl avail_out_strm(strm_r), %ecx + movl next_out_strm(strm_r), %ebx + + subl %ecx, %ebp /* start -= avail_out */ + negl %ebp /* start = -start */ + addl %ebx, %ebp /* start += next_out */ + + subl $257, %ecx /* avail_out -= 257 */ + addl %ebx, %ecx /* avail_out += out */ + + movl %ebx, out(%esp) + movl %ebp, beg(%esp) + movl %ecx, end(%esp) + + /* wsize = state->wsize; + * write = state->write; + * window = state->window; + * hold = state->hold; + * bits = state->bits; + * lcode = state->lencode; + * dcode = state->distcode; + * lmask = ( 1 << state->lenbits ) - 1; + * dmask = ( 1 << state->distbits ) - 1; + */ + + movl lencode_state(state_r), %eax + movl distcode_state(state_r), %ecx + + movl %eax, lcode(%esp) + movl %ecx, dcode(%esp) + + movl $1, %eax + movl lenbits_state(state_r), %ecx + shll %cl, %eax + decl %eax + movl %eax, lmask(%esp) + + movl $1, %eax + movl distbits_state(state_r), %ecx + shll %cl, %eax + decl %eax + movl %eax, dmask(%esp) + + movl wsize_state(state_r), %eax + movl write_state(state_r), %ecx + movl window_state(state_r), %edx + + movl %eax, wsize(%esp) + movl %ecx, write(%esp) + movl %edx, window(%esp) + + movl hold_state(state_r), %ebp + movl bits_state(state_r), %ebx + +#undef strm_r +#undef state_r + +#define in_r %esi +#define from_r %esi +#define out_r %edi + + movl in(%esp), in_r + movl last(%esp), %ecx + cmpl in_r, %ecx + ja .L_align_long /* if in < last */ + + addl $11, %ecx /* ecx = &in[ avail_in ] */ + subl in_r, %ecx /* ecx = avail_in */ + movl $12, %eax + subl %ecx, %eax /* eax = 12 - avail_in */ + leal buf(%esp), %edi + rep movsb /* memcpy( buf, in, avail_in ) */ + movl %eax, %ecx + xorl %eax, %eax + rep stosb /* memset( &buf[ avail_in ], 0, 12 - avail_in ) */ + leal buf(%esp), in_r /* in = buf */ + movl in_r, last(%esp) /* last = in, do just one iteration */ + jmp .L_is_aligned + + /* align in_r on long boundary */ +.L_align_long: + testl $3, in_r + jz .L_is_aligned + xorl %eax, %eax + movb (in_r), %al + incl in_r + movl %ebx, %ecx + addl $8, %ebx + shll %cl, %eax + orl %eax, %ebp + jmp .L_align_long + +.L_is_aligned: + movl out(%esp), out_r + +#if defined( NO_MMX ) + jmp .L_do_loop +#endif + +#if defined( USE_MMX ) + jmp .L_init_mmx +#endif + +/*** Runtime MMX check ***/ + +#if defined( RUN_TIME_MMX ) +.L_check_mmx: + cmpl $DO_USE_MMX, inflate_fast_use_mmx + je .L_init_mmx + ja .L_do_loop /* > 2 */ + + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + pushf + movl (%esp), %eax /* copy eflags to eax */ + xorl $0x200000, (%esp) /* try toggling ID bit of eflags (bit 21) + * to see if cpu supports cpuid... + * ID bit method not supported by NexGen but + * bios may load a cpuid instruction and + * cpuid may be disabled on Cyrix 5-6x86 */ + popf + pushf + popl %edx /* copy new eflags to edx */ + xorl %eax, %edx /* test if ID bit is flipped */ + jz .L_dont_use_mmx /* not flipped if zero */ + xorl %eax, %eax + cpuid + cmpl $0x756e6547, %ebx /* check for GenuineIntel in ebx,ecx,edx */ + jne .L_dont_use_mmx + cmpl $0x6c65746e, %ecx + jne .L_dont_use_mmx + cmpl $0x49656e69, %edx + jne .L_dont_use_mmx + movl $1, %eax + cpuid /* get cpu features */ + shrl $8, %eax + andl $15, %eax + cmpl $6, %eax /* check for Pentium family, is 0xf for P4 */ + jne .L_dont_use_mmx + testl $0x800000, %edx /* test if MMX feature is set (bit 23) */ + jnz .L_use_mmx + jmp .L_dont_use_mmx +.L_use_mmx: + movl $DO_USE_MMX, inflate_fast_use_mmx + jmp .L_check_mmx_pop +.L_dont_use_mmx: + movl $DONT_USE_MMX, inflate_fast_use_mmx +.L_check_mmx_pop: + popl %edx + popl %ecx + popl %ebx + popl %eax + jmp .L_check_mmx +#endif + + +/*** Non-MMX code ***/ + +#if defined ( NO_MMX ) || defined( RUN_TIME_MMX ) + +#define hold_r %ebp +#define bits_r %bl +#define bitslong_r %ebx + +.align 32,0x90 +.L_while_test: + /* while (in < last && out < end) + */ + cmpl out_r, end(%esp) + jbe .L_break_loop /* if (out >= end) */ + + cmpl in_r, last(%esp) + jbe .L_break_loop + +.L_do_loop: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out + * + * do { + * if (bits < 15) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * this = lcode[hold & lmask] + */ + cmpb $15, bits_r + ja .L_get_length_code /* if (15 < bits) */ + + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + +.L_get_length_code: + movl lmask(%esp), %edx /* edx = lmask */ + movl lcode(%esp), %ecx /* ecx = lcode */ + andl hold_r, %edx /* edx &= hold */ + movl (%ecx,%edx,4), %eax /* eax = lcode[hold & lmask] */ + +.L_dolen: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out + * + * dolen: + * bits -= this.bits; + * hold >>= this.bits + */ + movb %ah, %cl /* cl = this.bits */ + subb %ah, bits_r /* bits -= this.bits */ + shrl %cl, hold_r /* hold >>= this.bits */ + + /* check if op is a literal + * if (op == 0) { + * PUP(out) = this.val; + * } + */ + testb %al, %al + jnz .L_test_for_length_base /* if (op != 0) 45.7% */ + + shrl $16, %eax /* output this.val char */ + stosb + jmp .L_while_test + +.L_test_for_length_base: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = len + * + * else if (op & 16) { + * len = this.val + * op &= 15 + * if (op) { + * if (op > bits) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * len += hold & mask[op]; + * bits -= op; + * hold >>= op; + * } + */ +#define len_r %edx + movl %eax, len_r /* len = this */ + shrl $16, len_r /* len = this.val */ + movb %al, %cl + + testb $16, %al + jz .L_test_for_second_level_length /* if ((op & 16) == 0) 8% */ + andb $15, %cl /* op &= 15 */ + jz .L_save_len /* if (!op) */ + cmpb %cl, bits_r + jae .L_add_bits_to_len /* if (op <= bits) */ + + movb %cl, %ch /* stash op in ch, freeing cl */ + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + movb %ch, %cl /* move op back to ecx */ + +.L_add_bits_to_len: + movl $1, %eax + shll %cl, %eax + decl %eax + subb %cl, bits_r + andl hold_r, %eax /* eax &= hold */ + shrl %cl, hold_r + addl %eax, len_r /* len += hold & mask[op] */ + +.L_save_len: + movl len_r, len(%esp) /* save len */ +#undef len_r + +.L_decode_distance: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * + * if (bits < 15) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * this = dcode[hold & dmask]; + * dodist: + * bits -= this.bits; + * hold >>= this.bits; + * op = this.op; + */ + + cmpb $15, bits_r + ja .L_get_distance_code /* if (15 < bits) */ + + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + +.L_get_distance_code: + movl dmask(%esp), %edx /* edx = dmask */ + movl dcode(%esp), %ecx /* ecx = dcode */ + andl hold_r, %edx /* edx &= hold */ + movl (%ecx,%edx,4), %eax /* eax = dcode[hold & dmask] */ + +#define dist_r %edx +.L_dodist: + movl %eax, dist_r /* dist = this */ + shrl $16, dist_r /* dist = this.val */ + movb %ah, %cl + subb %ah, bits_r /* bits -= this.bits */ + shrl %cl, hold_r /* hold >>= this.bits */ + + /* if (op & 16) { + * dist = this.val + * op &= 15 + * if (op > bits) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * dist += hold & mask[op]; + * bits -= op; + * hold >>= op; + */ + movb %al, %cl /* cl = this.op */ + + testb $16, %al /* if ((op & 16) == 0) */ + jz .L_test_for_second_level_dist + andb $15, %cl /* op &= 15 */ + jz .L_check_dist_one + cmpb %cl, bits_r + jae .L_add_bits_to_dist /* if (op <= bits) 97.6% */ + + movb %cl, %ch /* stash op in ch, freeing cl */ + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + movb %ch, %cl /* move op back to ecx */ + +.L_add_bits_to_dist: + movl $1, %eax + shll %cl, %eax + decl %eax /* (1 << op) - 1 */ + subb %cl, bits_r + andl hold_r, %eax /* eax &= hold */ + shrl %cl, hold_r + addl %eax, dist_r /* dist += hold & ((1 << op) - 1) */ + jmp .L_check_window + +.L_check_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes + * + * nbytes = out - beg; + * if (dist <= nbytes) { + * from = out - dist; + * do { + * PUP(out) = PUP(from); + * } while (--len > 0) { + * } + */ + + movl in_r, in(%esp) /* save in so from can use it's reg */ + movl out_r, %eax + subl beg(%esp), %eax /* nbytes = out - beg */ + + cmpl dist_r, %eax + jb .L_clip_window /* if (dist > nbytes) 4.2% */ + + movl len(%esp), %ecx + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + + subl $3, %ecx + movb (from_r), %al + movb %al, (out_r) + movb 1(from_r), %al + movb 2(from_r), %dl + addl $3, from_r + movb %al, 1(out_r) + movb %dl, 2(out_r) + addl $3, out_r + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + jmp .L_while_test + +.align 16,0x90 +.L_check_dist_one: + cmpl $1, dist_r + jne .L_check_window + cmpl out_r, beg(%esp) + je .L_check_window + + decl out_r + movl len(%esp), %ecx + movb (out_r), %al + subl $3, %ecx + + movb %al, 1(out_r) + movb %al, 2(out_r) + movb %al, 3(out_r) + addl $4, out_r + rep stosb + + jmp .L_while_test + +.align 16,0x90 +.L_test_for_second_level_length: + /* else if ((op & 64) == 0) { + * this = lcode[this.val + (hold & mask[op])]; + * } + */ + testb $64, %al + jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */ + + movl $1, %eax + shll %cl, %eax + decl %eax + andl hold_r, %eax /* eax &= hold */ + addl %edx, %eax /* eax += this.val */ + movl lcode(%esp), %edx /* edx = lcode */ + movl (%edx,%eax,4), %eax /* eax = lcode[val + (hold&mask[op])] */ + jmp .L_dolen + +.align 16,0x90 +.L_test_for_second_level_dist: + /* else if ((op & 64) == 0) { + * this = dcode[this.val + (hold & mask[op])]; + * } + */ + testb $64, %al + jnz .L_invalid_distance_code /* if ((op & 64) != 0) */ + + movl $1, %eax + shll %cl, %eax + decl %eax + andl hold_r, %eax /* eax &= hold */ + addl %edx, %eax /* eax += this.val */ + movl dcode(%esp), %edx /* edx = dcode */ + movl (%edx,%eax,4), %eax /* eax = dcode[val + (hold&mask[op])] */ + jmp .L_dodist + +.align 16,0x90 +.L_clip_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes + * + * else { + * if (dist > wsize) { + * invalid distance + * } + * from = window; + * nbytes = dist - nbytes; + * if (write == 0) { + * from += wsize - nbytes; + */ +#define nbytes_r %ecx + movl %eax, nbytes_r + movl wsize(%esp), %eax /* prepare for dist compare */ + negl nbytes_r /* nbytes = -nbytes */ + movl window(%esp), from_r /* from = window */ + + cmpl dist_r, %eax + jb .L_invalid_distance_too_far /* if (dist > wsize) */ + + addl dist_r, nbytes_r /* nbytes = dist - nbytes */ + cmpl $0, write(%esp) + jne .L_wrap_around_window /* if (write != 0) */ + + subl nbytes_r, %eax + addl %eax, from_r /* from += wsize - nbytes */ + + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes, %eax = len + * + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while (--nbytes); + * from = out - dist; + * } + * } + */ +#define len_r %eax + movl len(%esp), len_r + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1 + + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1 + +.L_wrap_around_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes, %eax = write, %eax = len + * + * else if (write < nbytes) { + * from += wsize + write - nbytes; + * nbytes -= write; + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while (--nbytes); + * from = window; + * nbytes = write; + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while(--nbytes); + * from = out - dist; + * } + * } + * } + */ +#define write_r %eax + movl write(%esp), write_r + cmpl write_r, nbytes_r + jbe .L_contiguous_in_window /* if (write >= nbytes) */ + + addl wsize(%esp), from_r + addl write_r, from_r + subl nbytes_r, from_r /* from += wsize + write - nbytes */ + subl write_r, nbytes_r /* nbytes -= write */ +#undef write_r + + movl len(%esp), len_r + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl window(%esp), from_r /* from = window */ + movl write(%esp), nbytes_r /* nbytes = write */ + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1 + +.L_contiguous_in_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes, %eax = write, %eax = len + * + * else { + * from += write - nbytes; + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while (--nbytes); + * from = out - dist; + * } + * } + */ +#define write_r %eax + addl write_r, from_r + subl nbytes_r, from_r /* from += write - nbytes */ +#undef write_r + + movl len(%esp), len_r + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + +.L_do_copy1: + /* regs: %esi = from, %esi = in, %ebp = hold, %bl = bits, %edi = out + * %eax = len + * + * while (len > 0) { + * PUP(out) = PUP(from); + * len--; + * } + * } + * } while (in < last && out < end); + */ +#undef nbytes_r +#define in_r %esi + movl len_r, %ecx + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + jmp .L_while_test + +#undef len_r +#undef dist_r + +#endif /* NO_MMX || RUN_TIME_MMX */ + + +/*** MMX code ***/ + +#if defined( USE_MMX ) || defined( RUN_TIME_MMX ) + +.align 32,0x90 +.L_init_mmx: + emms + +#undef bits_r +#undef bitslong_r +#define bitslong_r %ebp +#define hold_mm %mm0 + movd %ebp, hold_mm + movl %ebx, bitslong_r + +#define used_mm %mm1 +#define dmask2_mm %mm2 +#define lmask2_mm %mm3 +#define lmask_mm %mm4 +#define dmask_mm %mm5 +#define tmp_mm %mm6 + + movd lmask(%esp), lmask_mm + movq lmask_mm, lmask2_mm + movd dmask(%esp), dmask_mm + movq dmask_mm, dmask2_mm + pxor used_mm, used_mm + movl lcode(%esp), %ebx /* ebx = lcode */ + jmp .L_do_loop_mmx + +.align 32,0x90 +.L_while_test_mmx: + /* while (in < last && out < end) + */ + cmpl out_r, end(%esp) + jbe .L_break_loop /* if (out >= end) */ + + cmpl in_r, last(%esp) + jbe .L_break_loop + +.L_do_loop_mmx: + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + + cmpl $32, bitslong_r + ja .L_get_length_code_mmx /* if (32 < bits) */ + + movd bitslong_r, tmp_mm + movd (in_r), %mm7 + addl $4, in_r + psllq tmp_mm, %mm7 + addl $32, bitslong_r + por %mm7, hold_mm /* hold_mm |= *((uint *)in)++ << bits */ + +.L_get_length_code_mmx: + pand hold_mm, lmask_mm + movd lmask_mm, %eax + movq lmask2_mm, lmask_mm + movl (%ebx,%eax,4), %eax /* eax = lcode[hold & lmask] */ + +.L_dolen_mmx: + movzbl %ah, %ecx /* ecx = this.bits */ + movd %ecx, used_mm + subl %ecx, bitslong_r /* bits -= this.bits */ + + testb %al, %al + jnz .L_test_for_length_base_mmx /* if (op != 0) 45.7% */ + + shrl $16, %eax /* output this.val char */ + stosb + jmp .L_while_test_mmx + +.L_test_for_length_base_mmx: +#define len_r %edx + movl %eax, len_r /* len = this */ + shrl $16, len_r /* len = this.val */ + + testb $16, %al + jz .L_test_for_second_level_length_mmx /* if ((op & 16) == 0) 8% */ + andl $15, %eax /* op &= 15 */ + jz .L_decode_distance_mmx /* if (!op) */ + + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd %eax, used_mm + movd hold_mm, %ecx + subl %eax, bitslong_r + andl .L_mask(,%eax,4), %ecx + addl %ecx, len_r /* len += hold & mask[op] */ + +.L_decode_distance_mmx: + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + + cmpl $32, bitslong_r + ja .L_get_dist_code_mmx /* if (32 < bits) */ + + movd bitslong_r, tmp_mm + movd (in_r), %mm7 + addl $4, in_r + psllq tmp_mm, %mm7 + addl $32, bitslong_r + por %mm7, hold_mm /* hold_mm |= *((uint *)in)++ << bits */ + +.L_get_dist_code_mmx: + movl dcode(%esp), %ebx /* ebx = dcode */ + pand hold_mm, dmask_mm + movd dmask_mm, %eax + movq dmask2_mm, dmask_mm + movl (%ebx,%eax,4), %eax /* eax = dcode[hold & lmask] */ + +.L_dodist_mmx: +#define dist_r %ebx + movzbl %ah, %ecx /* ecx = this.bits */ + movl %eax, dist_r + shrl $16, dist_r /* dist = this.val */ + subl %ecx, bitslong_r /* bits -= this.bits */ + movd %ecx, used_mm + + testb $16, %al /* if ((op & 16) == 0) */ + jz .L_test_for_second_level_dist_mmx + andl $15, %eax /* op &= 15 */ + jz .L_check_dist_one_mmx + +.L_add_bits_to_dist_mmx: + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd %eax, used_mm /* save bit length of current op */ + movd hold_mm, %ecx /* get the next bits on input stream */ + subl %eax, bitslong_r /* bits -= op bits */ + andl .L_mask(,%eax,4), %ecx /* ecx = hold & mask[op] */ + addl %ecx, dist_r /* dist += hold & mask[op] */ + +.L_check_window_mmx: + movl in_r, in(%esp) /* save in so from can use it's reg */ + movl out_r, %eax + subl beg(%esp), %eax /* nbytes = out - beg */ + + cmpl dist_r, %eax + jb .L_clip_window_mmx /* if (dist > nbytes) 4.2% */ + + movl len_r, %ecx + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + + subl $3, %ecx + movb (from_r), %al + movb %al, (out_r) + movb 1(from_r), %al + movb 2(from_r), %dl + addl $3, from_r + movb %al, 1(out_r) + movb %dl, 2(out_r) + addl $3, out_r + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */ + jmp .L_while_test_mmx + +.align 16,0x90 +.L_check_dist_one_mmx: + cmpl $1, dist_r + jne .L_check_window_mmx + cmpl out_r, beg(%esp) + je .L_check_window_mmx + + decl out_r + movl len_r, %ecx + movb (out_r), %al + subl $3, %ecx + + movb %al, 1(out_r) + movb %al, 2(out_r) + movb %al, 3(out_r) + addl $4, out_r + rep stosb + + movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */ + jmp .L_while_test_mmx + +.align 16,0x90 +.L_test_for_second_level_length_mmx: + testb $64, %al + jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */ + + andl $15, %eax + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd hold_mm, %ecx + andl .L_mask(,%eax,4), %ecx + addl len_r, %ecx + movl (%ebx,%ecx,4), %eax /* eax = lcode[hold & lmask] */ + jmp .L_dolen_mmx + +.align 16,0x90 +.L_test_for_second_level_dist_mmx: + testb $64, %al + jnz .L_invalid_distance_code /* if ((op & 64) != 0) */ + + andl $15, %eax + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd hold_mm, %ecx + andl .L_mask(,%eax,4), %ecx + movl dcode(%esp), %eax /* ecx = dcode */ + addl dist_r, %ecx + movl (%eax,%ecx,4), %eax /* eax = lcode[hold & lmask] */ + jmp .L_dodist_mmx + +.align 16,0x90 +.L_clip_window_mmx: +#define nbytes_r %ecx + movl %eax, nbytes_r + movl wsize(%esp), %eax /* prepare for dist compare */ + negl nbytes_r /* nbytes = -nbytes */ + movl window(%esp), from_r /* from = window */ + + cmpl dist_r, %eax + jb .L_invalid_distance_too_far /* if (dist > wsize) */ + + addl dist_r, nbytes_r /* nbytes = dist - nbytes */ + cmpl $0, write(%esp) + jne .L_wrap_around_window_mmx /* if (write != 0) */ + + subl nbytes_r, %eax + addl %eax, from_r /* from += wsize - nbytes */ + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1_mmx + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1_mmx + +.L_wrap_around_window_mmx: +#define write_r %eax + movl write(%esp), write_r + cmpl write_r, nbytes_r + jbe .L_contiguous_in_window_mmx /* if (write >= nbytes) */ + + addl wsize(%esp), from_r + addl write_r, from_r + subl nbytes_r, from_r /* from += wsize + write - nbytes */ + subl write_r, nbytes_r /* nbytes -= write */ +#undef write_r + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl window(%esp), from_r /* from = window */ + movl write(%esp), nbytes_r /* nbytes = write */ + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1_mmx + +.L_contiguous_in_window_mmx: +#define write_r %eax + addl write_r, from_r + subl nbytes_r, from_r /* from += write - nbytes */ +#undef write_r + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + +.L_do_copy1_mmx: +#undef nbytes_r +#define in_r %esi + movl len_r, %ecx + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */ + jmp .L_while_test_mmx + +#undef hold_r +#undef bitslong_r + +#endif /* USE_MMX || RUN_TIME_MMX */ + + +/*** USE_MMX, NO_MMX, and RUNTIME_MMX from here on ***/ + +.L_invalid_distance_code: + /* else { + * strm->msg = "invalid distance code"; + * state->mode = BAD; + * } + */ + movl $.L_invalid_distance_code_msg, %ecx + movl $INFLATE_MODE_BAD, %edx + jmp .L_update_stream_state + +.L_test_for_end_of_block: + /* else if (op & 32) { + * state->mode = TYPE; + * break; + * } + */ + testb $32, %al + jz .L_invalid_literal_length_code /* if ((op & 32) == 0) */ + + movl $0, %ecx + movl $INFLATE_MODE_TYPE, %edx + jmp .L_update_stream_state + +.L_invalid_literal_length_code: + /* else { + * strm->msg = "invalid literal/length code"; + * state->mode = BAD; + * } + */ + movl $.L_invalid_literal_length_code_msg, %ecx + movl $INFLATE_MODE_BAD, %edx + jmp .L_update_stream_state + +.L_invalid_distance_too_far: + /* strm->msg = "invalid distance too far back"; + * state->mode = BAD; + */ + movl in(%esp), in_r /* from_r has in's reg, put in back */ + movl $.L_invalid_distance_too_far_msg, %ecx + movl $INFLATE_MODE_BAD, %edx + jmp .L_update_stream_state + +.L_update_stream_state: + /* set strm->msg = %ecx, strm->state->mode = %edx */ + movl strm_sp(%esp), %eax + testl %ecx, %ecx /* if (msg != NULL) */ + jz .L_skip_msg + movl %ecx, msg_strm(%eax) /* strm->msg = msg */ +.L_skip_msg: + movl state_strm(%eax), %eax /* state = strm->state */ + movl %edx, mode_state(%eax) /* state->mode = edx (BAD | TYPE) */ + jmp .L_break_loop + +.align 32,0x90 +.L_break_loop: + +/* + * Regs: + * + * bits = %ebp when mmx, and in %ebx when non-mmx + * hold = %hold_mm when mmx, and in %ebp when non-mmx + * in = %esi + * out = %edi + */ + +#if defined( USE_MMX ) || defined( RUN_TIME_MMX ) + +#if defined( RUN_TIME_MMX ) + + cmpl $DO_USE_MMX, inflate_fast_use_mmx + jne .L_update_next_in + +#endif /* RUN_TIME_MMX */ + + movl %ebp, %ebx + +.L_update_next_in: + +#endif + +#define strm_r %eax +#define state_r %edx + + /* len = bits >> 3; + * in -= len; + * bits -= len << 3; + * hold &= (1U << bits) - 1; + * state->hold = hold; + * state->bits = bits; + * strm->next_in = in; + * strm->next_out = out; + */ + movl strm_sp(%esp), strm_r + movl %ebx, %ecx + movl state_strm(strm_r), state_r + shrl $3, %ecx + subl %ecx, in_r + shll $3, %ecx + subl %ecx, %ebx + movl out_r, next_out_strm(strm_r) + movl %ebx, bits_state(state_r) + movl %ebx, %ecx + + leal buf(%esp), %ebx + cmpl %ebx, last(%esp) + jne .L_buf_not_used /* if buf != last */ + + subl %ebx, in_r /* in -= buf */ + movl next_in_strm(strm_r), %ebx + movl %ebx, last(%esp) /* last = strm->next_in */ + addl %ebx, in_r /* in += strm->next_in */ + movl avail_in_strm(strm_r), %ebx + subl $11, %ebx + addl %ebx, last(%esp) /* last = &strm->next_in[ avail_in - 11 ] */ + +.L_buf_not_used: + movl in_r, next_in_strm(strm_r) + + movl $1, %ebx + shll %cl, %ebx + decl %ebx + +#if defined( USE_MMX ) || defined( RUN_TIME_MMX ) + +#if defined( RUN_TIME_MMX ) + + cmpl $DO_USE_MMX, inflate_fast_use_mmx + jne .L_update_hold + +#endif /* RUN_TIME_MMX */ + + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd hold_mm, %ebp + + emms + +.L_update_hold: + +#endif /* USE_MMX || RUN_TIME_MMX */ + + andl %ebx, %ebp + movl %ebp, hold_state(state_r) + +#define last_r %ebx + + /* strm->avail_in = in < last ? 11 + (last - in) : 11 - (in - last) */ + movl last(%esp), last_r + cmpl in_r, last_r + jbe .L_last_is_smaller /* if (in >= last) */ + + subl in_r, last_r /* last -= in */ + addl $11, last_r /* last += 11 */ + movl last_r, avail_in_strm(strm_r) + jmp .L_fixup_out +.L_last_is_smaller: + subl last_r, in_r /* in -= last */ + negl in_r /* in = -in */ + addl $11, in_r /* in += 11 */ + movl in_r, avail_in_strm(strm_r) + +#undef last_r +#define end_r %ebx + +.L_fixup_out: + /* strm->avail_out = out < end ? 257 + (end - out) : 257 - (out - end)*/ + movl end(%esp), end_r + cmpl out_r, end_r + jbe .L_end_is_smaller /* if (out >= end) */ + + subl out_r, end_r /* end -= out */ + addl $257, end_r /* end += 257 */ + movl end_r, avail_out_strm(strm_r) + jmp .L_done +.L_end_is_smaller: + subl end_r, out_r /* out -= end */ + negl out_r /* out = -out */ + addl $257, out_r /* out += 257 */ + movl out_r, avail_out_strm(strm_r) + +#undef end_r +#undef strm_r +#undef state_r + +.L_done: + addl $local_var_size, %esp + popf + popl %ebx + popl %ebp + popl %esi + popl %edi + ret + +#if defined( GAS_ELF ) +/* elf info */ +.type inflate_fast,@function +.size inflate_fast,.-inflate_fast +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/test.cpp b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/test.cpp new file mode 100644 index 000000000..7d265b3b5 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/test.cpp @@ -0,0 +1,24 @@ + +#include "zfstream.h" + +int main() { + + // Construct a stream object with this filebuffer. Anything sent + // to this stream will go to standard out. + gzofstream os( 1, ios::out ); + + // This text is getting compressed and sent to stdout. + // To prove this, run 'test | zcat'. + os << "Hello, Mommy" << endl; + + os << setcompressionlevel( Z_NO_COMPRESSION ); + os << "hello, hello, hi, ho!" << endl; + + setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) + << "I'm compressing again" << endl; + + os.close(); + + return 0; + +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.cpp b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.cpp new file mode 100644 index 000000000..d0cd85faa --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.cpp @@ -0,0 +1,329 @@ + +#include "zfstream.h" + +gzfilebuf::gzfilebuf() : + file(NULL), + mode(0), + own_file_descriptor(0) +{ } + +gzfilebuf::~gzfilebuf() { + + sync(); + if ( own_file_descriptor ) + close(); + +} + +gzfilebuf *gzfilebuf::open( const char *name, + int io_mode ) { + + if ( is_open() ) + return NULL; + + char char_mode[10]; + char *p = char_mode; + + if ( io_mode & ios::in ) { + mode = ios::in; + *p++ = 'r'; + } else if ( io_mode & ios::app ) { + mode = ios::app; + *p++ = 'a'; + } else { + mode = ios::out; + *p++ = 'w'; + } + + if ( io_mode & ios::binary ) { + mode |= ios::binary; + *p++ = 'b'; + } + + // Hard code the compression level + if ( io_mode & (ios::out|ios::app )) { + *p++ = '9'; + } + + // Put the end-of-string indicator + *p = '\0'; + + if ( (file = gzopen(name, char_mode)) == NULL ) + return NULL; + + own_file_descriptor = 1; + + return this; + +} + +gzfilebuf *gzfilebuf::attach( int file_descriptor, + int io_mode ) { + + if ( is_open() ) + return NULL; + + char char_mode[10]; + char *p = char_mode; + + if ( io_mode & ios::in ) { + mode = ios::in; + *p++ = 'r'; + } else if ( io_mode & ios::app ) { + mode = ios::app; + *p++ = 'a'; + } else { + mode = ios::out; + *p++ = 'w'; + } + + if ( io_mode & ios::binary ) { + mode |= ios::binary; + *p++ = 'b'; + } + + // Hard code the compression level + if ( io_mode & (ios::out|ios::app )) { + *p++ = '9'; + } + + // Put the end-of-string indicator + *p = '\0'; + + if ( (file = gzdopen(file_descriptor, char_mode)) == NULL ) + return NULL; + + own_file_descriptor = 0; + + return this; + +} + +gzfilebuf *gzfilebuf::close() { + + if ( is_open() ) { + + sync(); + gzclose( file ); + file = NULL; + + } + + return this; + +} + +int gzfilebuf::setcompressionlevel( int comp_level ) { + + return gzsetparams(file, comp_level, -2); + +} + +int gzfilebuf::setcompressionstrategy( int comp_strategy ) { + + return gzsetparams(file, -2, comp_strategy); + +} + + +streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) { + + return streampos(EOF); + +} + +int gzfilebuf::underflow() { + + // If the file hasn't been opened for reading, error. + if ( !is_open() || !(mode & ios::in) ) + return EOF; + + // if a buffer doesn't exists, allocate one. + if ( !base() ) { + + if ( (allocate()) == EOF ) + return EOF; + setp(0,0); + + } else { + + if ( in_avail() ) + return (unsigned char) *gptr(); + + if ( out_waiting() ) { + if ( flushbuf() == EOF ) + return EOF; + } + + } + + // Attempt to fill the buffer. + + int result = fillbuf(); + if ( result == EOF ) { + // disable get area + setg(0,0,0); + return EOF; + } + + return (unsigned char) *gptr(); + +} + +int gzfilebuf::overflow( int c ) { + + if ( !is_open() || !(mode & ios::out) ) + return EOF; + + if ( !base() ) { + if ( allocate() == EOF ) + return EOF; + setg(0,0,0); + } else { + if (in_avail()) { + return EOF; + } + if (out_waiting()) { + if (flushbuf() == EOF) + return EOF; + } + } + + int bl = blen(); + setp( base(), base() + bl); + + if ( c != EOF ) { + + *pptr() = c; + pbump(1); + + } + + return 0; + +} + +int gzfilebuf::sync() { + + if ( !is_open() ) + return EOF; + + if ( out_waiting() ) + return flushbuf(); + + return 0; + +} + +int gzfilebuf::flushbuf() { + + int n; + char *q; + + q = pbase(); + n = pptr() - q; + + if ( gzwrite( file, q, n) < n ) + return EOF; + + setp(0,0); + + return 0; + +} + +int gzfilebuf::fillbuf() { + + int required; + char *p; + + p = base(); + + required = blen(); + + int t = gzread( file, p, required ); + + if ( t <= 0) return EOF; + + setg( base(), base(), base()+t); + + return t; + +} + +gzfilestream_common::gzfilestream_common() : + ios( gzfilestream_common::rdbuf() ) +{ } + +gzfilestream_common::~gzfilestream_common() +{ } + +void gzfilestream_common::attach( int fd, int io_mode ) { + + if ( !buffer.attach( fd, io_mode) ) + clear( ios::failbit | ios::badbit ); + else + clear(); + +} + +void gzfilestream_common::open( const char *name, int io_mode ) { + + if ( !buffer.open( name, io_mode ) ) + clear( ios::failbit | ios::badbit ); + else + clear(); + +} + +void gzfilestream_common::close() { + + if ( !buffer.close() ) + clear( ios::failbit | ios::badbit ); + +} + +gzfilebuf *gzfilestream_common::rdbuf() +{ + return &buffer; +} + +gzifstream::gzifstream() : + ios( gzfilestream_common::rdbuf() ) +{ + clear( ios::badbit ); +} + +gzifstream::gzifstream( const char *name, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::open( name, io_mode ); +} + +gzifstream::gzifstream( int fd, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::attach( fd, io_mode ); +} + +gzifstream::~gzifstream() { } + +gzofstream::gzofstream() : + ios( gzfilestream_common::rdbuf() ) +{ + clear( ios::badbit ); +} + +gzofstream::gzofstream( const char *name, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::open( name, io_mode ); +} + +gzofstream::gzofstream( int fd, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::attach( fd, io_mode ); +} + +gzofstream::~gzofstream() { } diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.h new file mode 100644 index 000000000..ed79098a3 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream/zfstream.h @@ -0,0 +1,128 @@ + +#ifndef zfstream_h +#define zfstream_h + +#include +#include "zlib.h" + +class gzfilebuf : public streambuf { + +public: + + gzfilebuf( ); + virtual ~gzfilebuf(); + + gzfilebuf *open( const char *name, int io_mode ); + gzfilebuf *attach( int file_descriptor, int io_mode ); + gzfilebuf *close(); + + int setcompressionlevel( int comp_level ); + int setcompressionstrategy( int comp_strategy ); + + inline int is_open() const { return (file !=NULL); } + + virtual streampos seekoff( streamoff, ios::seek_dir, int ); + + virtual int sync(); + +protected: + + virtual int underflow(); + virtual int overflow( int = EOF ); + +private: + + gzFile file; + short mode; + short own_file_descriptor; + + int flushbuf(); + int fillbuf(); + +}; + +class gzfilestream_common : virtual public ios { + + friend class gzifstream; + friend class gzofstream; + friend gzofstream &setcompressionlevel( gzofstream &, int ); + friend gzofstream &setcompressionstrategy( gzofstream &, int ); + +public: + virtual ~gzfilestream_common(); + + void attach( int fd, int io_mode ); + void open( const char *name, int io_mode ); + void close(); + +protected: + gzfilestream_common(); + +private: + gzfilebuf *rdbuf(); + + gzfilebuf buffer; + +}; + +class gzifstream : public gzfilestream_common, public istream { + +public: + + gzifstream(); + gzifstream( const char *name, int io_mode = ios::in ); + gzifstream( int fd, int io_mode = ios::in ); + + virtual ~gzifstream(); + +}; + +class gzofstream : public gzfilestream_common, public ostream { + +public: + + gzofstream(); + gzofstream( const char *name, int io_mode = ios::out ); + gzofstream( int fd, int io_mode = ios::out ); + + virtual ~gzofstream(); + +}; + +template class gzomanip { + friend gzofstream &operator<<(gzofstream &, const gzomanip &); +public: + gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { } +private: + gzofstream &(*func)(gzofstream &, T); + T val; +}; + +template gzofstream &operator<<(gzofstream &s, const gzomanip &m) +{ + return (*m.func)(s, m.val); +} + +inline gzofstream &setcompressionlevel( gzofstream &s, int l ) +{ + (s.rdbuf())->setcompressionlevel(l); + return s; +} + +inline gzofstream &setcompressionstrategy( gzofstream &s, int l ) +{ + (s.rdbuf())->setcompressionstrategy(l); + return s; +} + +inline gzomanip setcompressionlevel(int l) +{ + return gzomanip(&setcompressionlevel,l); +} + +inline gzomanip setcompressionstrategy(int l) +{ + return gzomanip(&setcompressionstrategy,l); +} + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream.h new file mode 100644 index 000000000..43d2332b7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream.h @@ -0,0 +1,307 @@ +/* + * + * Copyright (c) 1997 + * Christian Michelsen Research AS + * Advanced Computing + * Fantoftvegen 38, 5036 BERGEN, Norway + * http://www.cmr.no + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Christian Michelsen Research AS makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef ZSTREAM__H +#define ZSTREAM__H + +/* + * zstream.h - C++ interface to the 'zlib' general purpose compression library + * $Id: zstream.h 1.1 1997-06-25 12:00:56+02 tyge Exp tyge $ + */ + +#include +#include +#include +#include "zlib.h" + +#if defined(_WIN32) +# include +# include +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + +class zstringlen { +public: + zstringlen(class izstream&); + zstringlen(class ozstream&, const char*); + size_t value() const { return val.word; } +private: + struct Val { unsigned char byte; size_t word; } val; +}; + +// ----------------------------- izstream ----------------------------- + +class izstream +{ + public: + izstream() : m_fp(0) {} + izstream(FILE* fp) : m_fp(0) { open(fp); } + izstream(const char* name) : m_fp(0) { open(name); } + ~izstream() { close(); } + + /* Opens a gzip (.gz) file for reading. + * open() can be used to read a file which is not in gzip format; + * in this case read() will directly read from the file without + * decompression. errno can be checked to distinguish two error + * cases (if errno is zero, the zlib error is Z_MEM_ERROR). + */ + void open(const char* name) { + if (m_fp) close(); + m_fp = ::gzopen(name, "rb"); + } + + void open(FILE* fp) { + SET_BINARY_MODE(fp); + if (m_fp) close(); + m_fp = ::gzdopen(fileno(fp), "rb"); + } + + /* Flushes all pending input if necessary, closes the compressed file + * and deallocates all the (de)compression state. The return value is + * the zlib error number (see function error() below). + */ + int close() { + int r = ::gzclose(m_fp); + m_fp = 0; return r; + } + + /* Binary read the given number of bytes from the compressed file. + */ + int read(void* buf, size_t len) { + return ::gzread(m_fp, buf, len); + } + + /* Returns the error message for the last error which occurred on the + * given compressed file. errnum is set to zlib error number. If an + * error occurred in the file system and not in the compression library, + * errnum is set to Z_ERRNO and the application may consult errno + * to get the exact error code. + */ + const char* error(int* errnum) { + return ::gzerror(m_fp, errnum); + } + + gzFile fp() { return m_fp; } + + private: + gzFile m_fp; +}; + +/* + * Binary read the given (array of) object(s) from the compressed file. + * If the input file was not in gzip format, read() copies the objects number + * of bytes into the buffer. + * returns the number of uncompressed bytes actually read + * (0 for end of file, -1 for error). + */ +template +inline int read(izstream& zs, T* x, Items items) { + return ::gzread(zs.fp(), x, items*sizeof(T)); +} + +/* + * Binary input with the '>' operator. + */ +template +inline izstream& operator>(izstream& zs, T& x) { + ::gzread(zs.fp(), &x, sizeof(T)); + return zs; +} + + +inline zstringlen::zstringlen(izstream& zs) { + zs > val.byte; + if (val.byte == 255) zs > val.word; + else val.word = val.byte; +} + +/* + * Read length of string + the string with the '>' operator. + */ +inline izstream& operator>(izstream& zs, char* x) { + zstringlen len(zs); + ::gzread(zs.fp(), x, len.value()); + x[len.value()] = '\0'; + return zs; +} + +inline char* read_string(izstream& zs) { + zstringlen len(zs); + char* x = new char[len.value()+1]; + ::gzread(zs.fp(), x, len.value()); + x[len.value()] = '\0'; + return x; +} + +// ----------------------------- ozstream ----------------------------- + +class ozstream +{ + public: + ozstream() : m_fp(0), m_os(0) { + } + ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION) + : m_fp(0), m_os(0) { + open(fp, level); + } + ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION) + : m_fp(0), m_os(0) { + open(name, level); + } + ~ozstream() { + close(); + } + + /* Opens a gzip (.gz) file for writing. + * The compression level parameter should be in 0..9 + * errno can be checked to distinguish two error cases + * (if errno is zero, the zlib error is Z_MEM_ERROR). + */ + void open(const char* name, int level = Z_DEFAULT_COMPRESSION) { + char mode[4] = "wb\0"; + if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level; + if (m_fp) close(); + m_fp = ::gzopen(name, mode); + } + + /* open from a FILE pointer. + */ + void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) { + SET_BINARY_MODE(fp); + char mode[4] = "wb\0"; + if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level; + if (m_fp) close(); + m_fp = ::gzdopen(fileno(fp), mode); + } + + /* Flushes all pending output if necessary, closes the compressed file + * and deallocates all the (de)compression state. The return value is + * the zlib error number (see function error() below). + */ + int close() { + if (m_os) { + ::gzwrite(m_fp, m_os->str(), m_os->pcount()); + delete[] m_os->str(); delete m_os; m_os = 0; + } + int r = ::gzclose(m_fp); m_fp = 0; return r; + } + + /* Binary write the given number of bytes into the compressed file. + */ + int write(const void* buf, size_t len) { + return ::gzwrite(m_fp, (voidp) buf, len); + } + + /* Flushes all pending output into the compressed file. The parameter + * _flush is as in the deflate() function. The return value is the zlib + * error number (see function gzerror below). flush() returns Z_OK if + * the flush_ parameter is Z_FINISH and all output could be flushed. + * flush() should be called only when strictly necessary because it can + * degrade compression. + */ + int flush(int _flush) { + os_flush(); + return ::gzflush(m_fp, _flush); + } + + /* Returns the error message for the last error which occurred on the + * given compressed file. errnum is set to zlib error number. If an + * error occurred in the file system and not in the compression library, + * errnum is set to Z_ERRNO and the application may consult errno + * to get the exact error code. + */ + const char* error(int* errnum) { + return ::gzerror(m_fp, errnum); + } + + gzFile fp() { return m_fp; } + + ostream& os() { + if (m_os == 0) m_os = new ostrstream; + return *m_os; + } + + void os_flush() { + if (m_os && m_os->pcount()>0) { + ostrstream* oss = new ostrstream; + oss->fill(m_os->fill()); + oss->flags(m_os->flags()); + oss->precision(m_os->precision()); + oss->width(m_os->width()); + ::gzwrite(m_fp, m_os->str(), m_os->pcount()); + delete[] m_os->str(); delete m_os; m_os = oss; + } + } + + private: + gzFile m_fp; + ostrstream* m_os; +}; + +/* + * Binary write the given (array of) object(s) into the compressed file. + * returns the number of uncompressed bytes actually written + * (0 in case of error). + */ +template +inline int write(ozstream& zs, const T* x, Items items) { + return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T)); +} + +/* + * Binary output with the '<' operator. + */ +template +inline ozstream& operator<(ozstream& zs, const T& x) { + ::gzwrite(zs.fp(), (voidp) &x, sizeof(T)); + return zs; +} + +inline zstringlen::zstringlen(ozstream& zs, const char* x) { + val.byte = 255; val.word = ::strlen(x); + if (val.word < 255) zs < (val.byte = val.word); + else zs < val; +} + +/* + * Write length of string + the string with the '<' operator. + */ +inline ozstream& operator<(ozstream& zs, const char* x) { + zstringlen len(zs, x); + ::gzwrite(zs.fp(), (voidp) x, len.value()); + return zs; +} + +#ifdef _MSC_VER +inline ozstream& operator<(ozstream& zs, char* const& x) { + return zs < (const char*) x; +} +#endif + +/* + * Ascii write with the << operator; + */ +template +inline ostream& operator<<(ozstream& zs, const T& x) { + zs.os_flush(); + return zs.os() << x; +} + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream_test.cpp b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream_test.cpp new file mode 100644 index 000000000..6273f62d6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream2/zstream_test.cpp @@ -0,0 +1,25 @@ +#include "zstream.h" +#include +#include +#include + +void main() { + char h[256] = "Hello"; + char* g = "Goodbye"; + ozstream out("temp.gz"); + out < "This works well" < h < g; + out.close(); + + izstream in("temp.gz"); // read it back + char *x = read_string(in), *y = new char[256], z[256]; + in > y > z; + in.close(); + cout << x << endl << y << endl << z << endl; + + out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results + out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; + out << z << endl << y << endl << x << endl; + out << 1.1234567890123456789 << endl; + + delete[] x; delete[] y; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/README new file mode 100644 index 000000000..f7b319ab9 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/README @@ -0,0 +1,35 @@ +These classes provide a C++ stream interface to the zlib library. It allows you +to do things like: + + gzofstream outf("blah.gz"); + outf << "These go into the gzip file " << 123 << endl; + +It does this by deriving a specialized stream buffer for gzipped files, which is +the way Stroustrup would have done it. :-> + +The gzifstream and gzofstream classes were originally written by Kevin Ruland +and made available in the zlib contrib/iostream directory. The older version still +compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of +this version. + +The new classes are as standard-compliant as possible, closely following the +approach of the standard library's fstream classes. It compiles under gcc versions +3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard +library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs +from the previous one in the following respects: +- added showmanyc +- added setbuf, with support for unbuffered output via setbuf(0,0) +- a few bug fixes of stream behavior +- gzipped output file opened with default compression level instead of maximum level +- setcompressionlevel()/strategy() members replaced by single setcompression() + +The code is provided "as is", with the permission to use, copy, modify, distribute +and sell it for any purpose without fee. + +Ludwig Schwardt + + +DSP Lab +Electrical & Electronic Engineering Department +University of Stellenbosch +South Africa diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/TODO b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/TODO new file mode 100644 index 000000000..7032f97be --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/TODO @@ -0,0 +1,17 @@ +Possible upgrades to gzfilebuf: + +- The ability to do putback (e.g. putbackfail) + +- The ability to seek (zlib supports this, but could be slow/tricky) + +- Simultaneous read/write access (does it make sense?) + +- Support for ios_base::ate open mode + +- Locale support? + +- Check public interface to see which calls give problems + (due to dependence on library internals) + +- Override operator<<(ostream&, gzfilebuf*) to allow direct copying + of stream buffer to stream ( i.e. os << is.rdbuf(); ) diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/test.cc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/test.cc new file mode 100644 index 000000000..94235334f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/test.cc @@ -0,0 +1,50 @@ +/* + * Test program for gzifstream and gzofstream + * + * by Ludwig Schwardt + * original version by Kevin Ruland + */ + +#include "zfstream.h" +#include // for cout + +int main() { + + gzofstream outf; + gzifstream inf; + char buf[80]; + + outf.open("test1.txt.gz"); + outf << "The quick brown fox sidestepped the lazy canine\n" + << 1.3 << "\nPlan " << 9 << std::endl; + outf.close(); + std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n" + << "The quick brown fox sidestepped the lazy canine\n" + << 1.3 << "\nPlan " << 9 << std::endl; + + std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n"; + inf.open("test1.txt.gz"); + while (inf.getline(buf,80,'\n')) { + std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n"; + } + inf.close(); + + outf.rdbuf()->pubsetbuf(0,0); + outf.open("test2.txt.gz"); + outf << setcompression(Z_NO_COMPRESSION) + << "The quick brown fox sidestepped the lazy canine\n" + << 1.3 << "\nPlan " << 9 << std::endl; + outf.close(); + std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form"; + + std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n"; + inf.rdbuf()->pubsetbuf(0,0); + inf.open("test2.txt.gz"); + while (inf.getline(buf,80,'\n')) { + std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n"; + } + inf.close(); + + return 0; + +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.cc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.cc new file mode 100644 index 000000000..94eb93344 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.cc @@ -0,0 +1,479 @@ +/* + * A C++ I/O streams interface to the zlib gz* functions + * + * by Ludwig Schwardt + * original version by Kevin Ruland + * + * This version is standard-compliant and compatible with gcc 3.x. + */ + +#include "zfstream.h" +#include // for strcpy, strcat, strlen (mode strings) +#include // for BUFSIZ + +// Internal buffer sizes (default and "unbuffered" versions) +#define BIGBUFSIZE BUFSIZ +#define SMALLBUFSIZE 1 + +/*****************************************************************************/ + +// Default constructor +gzfilebuf::gzfilebuf() +: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false), + buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true) +{ + // No buffers to start with + this->disable_buffer(); +} + +// Destructor +gzfilebuf::~gzfilebuf() +{ + // Sync output buffer and close only if responsible for file + // (i.e. attached streams should be left open at this stage) + this->sync(); + if (own_fd) + this->close(); + // Make sure internal buffer is deallocated + this->disable_buffer(); +} + +// Set compression level and strategy +int +gzfilebuf::setcompression(int comp_level, + int comp_strategy) +{ + return gzsetparams(file, comp_level, comp_strategy); +} + +// Open gzipped file +gzfilebuf* +gzfilebuf::open(const char *name, + std::ios_base::openmode mode) +{ + // Fail if file already open + if (this->is_open()) + return NULL; + // Don't support simultaneous read/write access (yet) + if ((mode & std::ios_base::in) && (mode & std::ios_base::out)) + return NULL; + + // Build mode string for gzopen and check it [27.8.1.3.2] + char char_mode[6] = "\0\0\0\0\0"; + if (!this->open_mode(mode, char_mode)) + return NULL; + + // Attempt to open file + if ((file = gzopen(name, char_mode)) == NULL) + return NULL; + + // On success, allocate internal buffer and set flags + this->enable_buffer(); + io_mode = mode; + own_fd = true; + return this; +} + +// Attach to gzipped file +gzfilebuf* +gzfilebuf::attach(int fd, + std::ios_base::openmode mode) +{ + // Fail if file already open + if (this->is_open()) + return NULL; + // Don't support simultaneous read/write access (yet) + if ((mode & std::ios_base::in) && (mode & std::ios_base::out)) + return NULL; + + // Build mode string for gzdopen and check it [27.8.1.3.2] + char char_mode[6] = "\0\0\0\0\0"; + if (!this->open_mode(mode, char_mode)) + return NULL; + + // Attempt to attach to file + if ((file = gzdopen(fd, char_mode)) == NULL) + return NULL; + + // On success, allocate internal buffer and set flags + this->enable_buffer(); + io_mode = mode; + own_fd = false; + return this; +} + +// Close gzipped file +gzfilebuf* +gzfilebuf::close() +{ + // Fail immediately if no file is open + if (!this->is_open()) + return NULL; + // Assume success + gzfilebuf* retval = this; + // Attempt to sync and close gzipped file + if (this->sync() == -1) + retval = NULL; + if (gzclose(file) < 0) + retval = NULL; + // File is now gone anyway (postcondition [27.8.1.3.8]) + file = NULL; + own_fd = false; + // Destroy internal buffer if it exists + this->disable_buffer(); + return retval; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +// Convert int open mode to mode string +bool +gzfilebuf::open_mode(std::ios_base::openmode mode, + char* c_mode) const +{ + bool testb = mode & std::ios_base::binary; + bool testi = mode & std::ios_base::in; + bool testo = mode & std::ios_base::out; + bool testt = mode & std::ios_base::trunc; + bool testa = mode & std::ios_base::app; + + // Check for valid flag combinations - see [27.8.1.3.2] (Table 92) + // Original zfstream hardcoded the compression level to maximum here... + // Double the time for less than 1% size improvement seems + // excessive though - keeping it at the default level + // To change back, just append "9" to the next three mode strings + if (!testi && testo && !testt && !testa) + strcpy(c_mode, "w"); + if (!testi && testo && !testt && testa) + strcpy(c_mode, "a"); + if (!testi && testo && testt && !testa) + strcpy(c_mode, "w"); + if (testi && !testo && !testt && !testa) + strcpy(c_mode, "r"); + // No read/write mode yet +// if (testi && testo && !testt && !testa) +// strcpy(c_mode, "r+"); +// if (testi && testo && testt && !testa) +// strcpy(c_mode, "w+"); + + // Mode string should be empty for invalid combination of flags + if (strlen(c_mode) == 0) + return false; + if (testb) + strcat(c_mode, "b"); + return true; +} + +// Determine number of characters in internal get buffer +std::streamsize +gzfilebuf::showmanyc() +{ + // Calls to underflow will fail if file not opened for reading + if (!this->is_open() || !(io_mode & std::ios_base::in)) + return -1; + // Make sure get area is in use + if (this->gptr() && (this->gptr() < this->egptr())) + return std::streamsize(this->egptr() - this->gptr()); + else + return 0; +} + +// Fill get area from gzipped file +gzfilebuf::int_type +gzfilebuf::underflow() +{ + // If something is left in the get area by chance, return it + // (this shouldn't normally happen, as underflow is only supposed + // to be called when gptr >= egptr, but it serves as error check) + if (this->gptr() && (this->gptr() < this->egptr())) + return traits_type::to_int_type(*(this->gptr())); + + // If the file hasn't been opened for reading, produce error + if (!this->is_open() || !(io_mode & std::ios_base::in)) + return traits_type::eof(); + + // Attempt to fill internal buffer from gzipped file + // (buffer must be guaranteed to exist...) + int bytes_read = gzread(file, buffer, buffer_size); + // Indicates error or EOF + if (bytes_read <= 0) + { + // Reset get area + this->setg(buffer, buffer, buffer); + return traits_type::eof(); + } + // Make all bytes read from file available as get area + this->setg(buffer, buffer, buffer + bytes_read); + + // Return next character in get area + return traits_type::to_int_type(*(this->gptr())); +} + +// Write put area to gzipped file +gzfilebuf::int_type +gzfilebuf::overflow(int_type c) +{ + // Determine whether put area is in use + if (this->pbase()) + { + // Double-check pointer range + if (this->pptr() > this->epptr() || this->pptr() < this->pbase()) + return traits_type::eof(); + // Add extra character to buffer if not EOF + if (!traits_type::eq_int_type(c, traits_type::eof())) + { + *(this->pptr()) = traits_type::to_char_type(c); + this->pbump(1); + } + // Number of characters to write to file + int bytes_to_write = this->pptr() - this->pbase(); + // Overflow doesn't fail if nothing is to be written + if (bytes_to_write > 0) + { + // If the file hasn't been opened for writing, produce error + if (!this->is_open() || !(io_mode & std::ios_base::out)) + return traits_type::eof(); + // If gzipped file won't accept all bytes written to it, fail + if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write) + return traits_type::eof(); + // Reset next pointer to point to pbase on success + this->pbump(-bytes_to_write); + } + } + // Write extra character to file if not EOF + else if (!traits_type::eq_int_type(c, traits_type::eof())) + { + // If the file hasn't been opened for writing, produce error + if (!this->is_open() || !(io_mode & std::ios_base::out)) + return traits_type::eof(); + // Impromptu char buffer (allows "unbuffered" output) + char_type last_char = traits_type::to_char_type(c); + // If gzipped file won't accept this character, fail + if (gzwrite(file, &last_char, 1) != 1) + return traits_type::eof(); + } + + // If you got here, you have succeeded (even if c was EOF) + // The return value should therefore be non-EOF + if (traits_type::eq_int_type(c, traits_type::eof())) + return traits_type::not_eof(c); + else + return c; +} + +// Assign new buffer +std::streambuf* +gzfilebuf::setbuf(char_type* p, + std::streamsize n) +{ + // First make sure stuff is sync'ed, for safety + if (this->sync() == -1) + return NULL; + // If buffering is turned off on purpose via setbuf(0,0), still allocate one... + // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at + // least a buffer of size 1 (very inefficient though, therefore make it bigger?) + // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems) + if (!p || !n) + { + // Replace existing buffer (if any) with small internal buffer + this->disable_buffer(); + buffer = NULL; + buffer_size = 0; + own_buffer = true; + this->enable_buffer(); + } + else + { + // Replace existing buffer (if any) with external buffer + this->disable_buffer(); + buffer = p; + buffer_size = n; + own_buffer = false; + this->enable_buffer(); + } + return this; +} + +// Write put area to gzipped file (i.e. ensures that put area is empty) +int +gzfilebuf::sync() +{ + return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +// Allocate internal buffer +void +gzfilebuf::enable_buffer() +{ + // If internal buffer required, allocate one + if (own_buffer && !buffer) + { + // Check for buffered vs. "unbuffered" + if (buffer_size > 0) + { + // Allocate internal buffer + buffer = new char_type[buffer_size]; + // Get area starts empty and will be expanded by underflow as need arises + this->setg(buffer, buffer, buffer); + // Setup entire internal buffer as put area. + // The one-past-end pointer actually points to the last element of the buffer, + // so that overflow(c) can safely add the extra character c to the sequence. + // These pointers remain in place for the duration of the buffer + this->setp(buffer, buffer + buffer_size - 1); + } + else + { + // Even in "unbuffered" case, (small?) get buffer is still required + buffer_size = SMALLBUFSIZE; + buffer = new char_type[buffer_size]; + this->setg(buffer, buffer, buffer); + // "Unbuffered" means no put buffer + this->setp(0, 0); + } + } + else + { + // If buffer already allocated, reset buffer pointers just to make sure no + // stale chars are lying around + this->setg(buffer, buffer, buffer); + this->setp(buffer, buffer + buffer_size - 1); + } +} + +// Destroy internal buffer +void +gzfilebuf::disable_buffer() +{ + // If internal buffer exists, deallocate it + if (own_buffer && buffer) + { + // Preserve unbuffered status by zeroing size + if (!this->pbase()) + buffer_size = 0; + delete[] buffer; + buffer = NULL; + this->setg(0, 0, 0); + this->setp(0, 0); + } + else + { + // Reset buffer pointers to initial state if external buffer exists + this->setg(buffer, buffer, buffer); + if (buffer) + this->setp(buffer, buffer + buffer_size - 1); + else + this->setp(0, 0); + } +} + +/*****************************************************************************/ + +// Default constructor initializes stream buffer +gzifstream::gzifstream() +: std::istream(NULL), sb() +{ this->init(&sb); } + +// Initialize stream buffer and open file +gzifstream::gzifstream(const char* name, + std::ios_base::openmode mode) +: std::istream(NULL), sb() +{ + this->init(&sb); + this->open(name, mode); +} + +// Initialize stream buffer and attach to file +gzifstream::gzifstream(int fd, + std::ios_base::openmode mode) +: std::istream(NULL), sb() +{ + this->init(&sb); + this->attach(fd, mode); +} + +// Open file and go into fail() state if unsuccessful +void +gzifstream::open(const char* name, + std::ios_base::openmode mode) +{ + if (!sb.open(name, mode | std::ios_base::in)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Attach to file and go into fail() state if unsuccessful +void +gzifstream::attach(int fd, + std::ios_base::openmode mode) +{ + if (!sb.attach(fd, mode | std::ios_base::in)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Close file +void +gzifstream::close() +{ + if (!sb.close()) + this->setstate(std::ios_base::failbit); +} + +/*****************************************************************************/ + +// Default constructor initializes stream buffer +gzofstream::gzofstream() +: std::ostream(NULL), sb() +{ this->init(&sb); } + +// Initialize stream buffer and open file +gzofstream::gzofstream(const char* name, + std::ios_base::openmode mode) +: std::ostream(NULL), sb() +{ + this->init(&sb); + this->open(name, mode); +} + +// Initialize stream buffer and attach to file +gzofstream::gzofstream(int fd, + std::ios_base::openmode mode) +: std::ostream(NULL), sb() +{ + this->init(&sb); + this->attach(fd, mode); +} + +// Open file and go into fail() state if unsuccessful +void +gzofstream::open(const char* name, + std::ios_base::openmode mode) +{ + if (!sb.open(name, mode | std::ios_base::out)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Attach to file and go into fail() state if unsuccessful +void +gzofstream::attach(int fd, + std::ios_base::openmode mode) +{ + if (!sb.attach(fd, mode | std::ios_base::out)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Close file +void +gzofstream::close() +{ + if (!sb.close()) + this->setstate(std::ios_base::failbit); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.h new file mode 100644 index 000000000..8574479ae --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/iostream3/zfstream.h @@ -0,0 +1,466 @@ +/* + * A C++ I/O streams interface to the zlib gz* functions + * + * by Ludwig Schwardt + * original version by Kevin Ruland + * + * This version is standard-compliant and compatible with gcc 3.x. + */ + +#ifndef ZFSTREAM_H +#define ZFSTREAM_H + +#include // not iostream, since we don't need cin/cout +#include +#include "zlib.h" + +/*****************************************************************************/ + +/** + * @brief Gzipped file stream buffer class. + * + * This class implements basic_filebuf for gzipped files. It doesn't yet support + * seeking (allowed by zlib but slow/limited), putback and read/write access + * (tricky). Otherwise, it attempts to be a drop-in replacement for the standard + * file streambuf. +*/ +class gzfilebuf : public std::streambuf +{ +public: + // Default constructor. + gzfilebuf(); + + // Destructor. + virtual + ~gzfilebuf(); + + /** + * @brief Set compression level and strategy on the fly. + * @param comp_level Compression level (see zlib.h for allowed values) + * @param comp_strategy Compression strategy (see zlib.h for allowed values) + * @return Z_OK on success, Z_STREAM_ERROR otherwise. + * + * Unfortunately, these parameters cannot be modified separately, as the + * previous zfstream version assumed. Since the strategy is seldom changed, + * it can default and setcompression(level) then becomes like the old + * setcompressionlevel(level). + */ + int + setcompression(int comp_level, + int comp_strategy = Z_DEFAULT_STRATEGY); + + /** + * @brief Check if file is open. + * @return True if file is open. + */ + bool + is_open() const { return (file != NULL); } + + /** + * @brief Open gzipped file. + * @param name File name. + * @param mode Open mode flags. + * @return @c this on success, NULL on failure. + */ + gzfilebuf* + open(const char* name, + std::ios_base::openmode mode); + + /** + * @brief Attach to already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags. + * @return @c this on success, NULL on failure. + */ + gzfilebuf* + attach(int fd, + std::ios_base::openmode mode); + + /** + * @brief Close gzipped file. + * @return @c this on success, NULL on failure. + */ + gzfilebuf* + close(); + +protected: + /** + * @brief Convert ios open mode int to mode string used by zlib. + * @return True if valid mode flag combination. + */ + bool + open_mode(std::ios_base::openmode mode, + char* c_mode) const; + + /** + * @brief Number of characters available in stream buffer. + * @return Number of characters. + * + * This indicates number of characters in get area of stream buffer. + * These characters can be read without accessing the gzipped file. + */ + virtual std::streamsize + showmanyc(); + + /** + * @brief Fill get area from gzipped file. + * @return First character in get area on success, EOF on error. + * + * This actually reads characters from gzipped file to stream + * buffer. Always buffered. + */ + virtual int_type + underflow(); + + /** + * @brief Write put area to gzipped file. + * @param c Extra character to add to buffer contents. + * @return Non-EOF on success, EOF on error. + * + * This actually writes characters in stream buffer to + * gzipped file. With unbuffered output this is done one + * character at a time. + */ + virtual int_type + overflow(int_type c = traits_type::eof()); + + /** + * @brief Installs external stream buffer. + * @param p Pointer to char buffer. + * @param n Size of external buffer. + * @return @c this on success, NULL on failure. + * + * Call setbuf(0,0) to enable unbuffered output. + */ + virtual std::streambuf* + setbuf(char_type* p, + std::streamsize n); + + /** + * @brief Flush stream buffer to file. + * @return 0 on success, -1 on error. + * + * This calls underflow(EOF) to do the job. + */ + virtual int + sync(); + +// +// Some future enhancements +// +// virtual int_type uflow(); +// virtual int_type pbackfail(int_type c = traits_type::eof()); +// virtual pos_type +// seekoff(off_type off, +// std::ios_base::seekdir way, +// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out); +// virtual pos_type +// seekpos(pos_type sp, +// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out); + +private: + /** + * @brief Allocate internal buffer. + * + * This function is safe to call multiple times. It will ensure + * that a proper internal buffer exists if it is required. If the + * buffer already exists or is external, the buffer pointers will be + * reset to their original state. + */ + void + enable_buffer(); + + /** + * @brief Destroy internal buffer. + * + * This function is safe to call multiple times. It will ensure + * that the internal buffer is deallocated if it exists. In any + * case, it will also reset the buffer pointers. + */ + void + disable_buffer(); + + /** + * Underlying file pointer. + */ + gzFile file; + + /** + * Mode in which file was opened. + */ + std::ios_base::openmode io_mode; + + /** + * @brief True if this object owns file descriptor. + * + * This makes the class responsible for closing the file + * upon destruction. + */ + bool own_fd; + + /** + * @brief Stream buffer. + * + * For simplicity this remains allocated on the free store for the + * entire life span of the gzfilebuf object, unless replaced by setbuf. + */ + char_type* buffer; + + /** + * @brief Stream buffer size. + * + * Defaults to system default buffer size (typically 8192 bytes). + * Modified by setbuf. + */ + std::streamsize buffer_size; + + /** + * @brief True if this object owns stream buffer. + * + * This makes the class responsible for deleting the buffer + * upon destruction. + */ + bool own_buffer; +}; + +/*****************************************************************************/ + +/** + * @brief Gzipped file input stream class. + * + * This class implements ifstream for gzipped files. Seeking and putback + * is not supported yet. +*/ +class gzifstream : public std::istream +{ +public: + // Default constructor + gzifstream(); + + /** + * @brief Construct stream on gzipped file to be opened. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::in). + */ + explicit + gzifstream(const char* name, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * @brief Construct stream on already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::in). + */ + explicit + gzifstream(int fd, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * Obtain underlying stream buffer. + */ + gzfilebuf* + rdbuf() const + { return const_cast(&sb); } + + /** + * @brief Check if file is open. + * @return True if file is open. + */ + bool + is_open() { return sb.is_open(); } + + /** + * @brief Open gzipped file. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::in). + * + * Stream will be in state good() if file opens successfully; + * otherwise in state fail(). This differs from the behavior of + * ifstream, which never sets the state to good() and therefore + * won't allow you to reuse the stream for a second file unless + * you manually clear() the state. The choice is a matter of + * convenience. + */ + void + open(const char* name, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * @brief Attach to already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::in). + * + * Stream will be in state good() if attach succeeded; otherwise + * in state fail(). + */ + void + attach(int fd, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * @brief Close gzipped file. + * + * Stream will be in state fail() if close failed. + */ + void + close(); + +private: + /** + * Underlying stream buffer. + */ + gzfilebuf sb; +}; + +/*****************************************************************************/ + +/** + * @brief Gzipped file output stream class. + * + * This class implements ofstream for gzipped files. Seeking and putback + * is not supported yet. +*/ +class gzofstream : public std::ostream +{ +public: + // Default constructor + gzofstream(); + + /** + * @brief Construct stream on gzipped file to be opened. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::out). + */ + explicit + gzofstream(const char* name, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * @brief Construct stream on already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::out). + */ + explicit + gzofstream(int fd, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * Obtain underlying stream buffer. + */ + gzfilebuf* + rdbuf() const + { return const_cast(&sb); } + + /** + * @brief Check if file is open. + * @return True if file is open. + */ + bool + is_open() { return sb.is_open(); } + + /** + * @brief Open gzipped file. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::out). + * + * Stream will be in state good() if file opens successfully; + * otherwise in state fail(). This differs from the behavior of + * ofstream, which never sets the state to good() and therefore + * won't allow you to reuse the stream for a second file unless + * you manually clear() the state. The choice is a matter of + * convenience. + */ + void + open(const char* name, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * @brief Attach to already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::out). + * + * Stream will be in state good() if attach succeeded; otherwise + * in state fail(). + */ + void + attach(int fd, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * @brief Close gzipped file. + * + * Stream will be in state fail() if close failed. + */ + void + close(); + +private: + /** + * Underlying stream buffer. + */ + gzfilebuf sb; +}; + +/*****************************************************************************/ + +/** + * @brief Gzipped file output stream manipulator class. + * + * This class defines a two-argument manipulator for gzofstream. It is used + * as base for the setcompression(int,int) manipulator. +*/ +template + class gzomanip2 + { + public: + // Allows insertor to peek at internals + template + friend gzofstream& + operator<<(gzofstream&, + const gzomanip2&); + + // Constructor + gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2), + T1 v1, + T2 v2); + private: + // Underlying manipulator function + gzofstream& + (*func)(gzofstream&, T1, T2); + + // Arguments for manipulator function + T1 val1; + T2 val2; + }; + +/*****************************************************************************/ + +// Manipulator function thunks through to stream buffer +inline gzofstream& +setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY) +{ + (gzs.rdbuf())->setcompression(l, s); + return gzs; +} + +// Manipulator constructor stores arguments +template + inline + gzomanip2::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2), + T1 v1, + T2 v2) + : func(f), val1(v1), val2(v2) + { } + +// Insertor applies underlying manipulator function to stream +template + inline gzofstream& + operator<<(gzofstream& s, const gzomanip2& m) + { return (*m.func)(s, m.val1, m.val2); } + +// Insert this onto stream to simplify setting of compression level +inline gzomanip2 +setcompression(int l, int s = Z_DEFAULT_STRATEGY) +{ return gzomanip2(&setcompression, l, s); } + +#endif // ZFSTREAM_H diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/bld_ml64.bat b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/bld_ml64.bat new file mode 100644 index 000000000..f74bcef5b --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/bld_ml64.bat @@ -0,0 +1,2 @@ +ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +ml64.exe /Flgvmat64 /c /Zi gvmat64.asm diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/gvmat64.asm b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/gvmat64.asm new file mode 100644 index 000000000..c1817f1be --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/gvmat64.asm @@ -0,0 +1,553 @@ +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); /* current match */ + +; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64 +; (AMD64 on Athlon 64, Opteron, Phenom +; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) +; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; This software is provided 'as-is', without any express or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software +; 3. This notice may not be removed or altered from any source distribution. +; +; +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for infozip Zip, I use option: +; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm +; +; to compile this file for zLib, I use option: +; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm +; Be carrefull to adapt zlib1222add below to your version of zLib +; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change +; value of zlib1222add later) +; +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK +; +; (you can get Windows WDK with ml64 for AMD64 from +; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) +; + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ +.code +longest_match PROC + + +;LocalVarsSize equ 88 + LocalVarsSize equ 72 + +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp + + chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len + ; low word: s->wmask +;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10 +;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11 +;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w +;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx +;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13 +;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d +;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9 +IFDEF INFOZIP +ELSE + nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size +ENDIF + +save_rdi equ rsp + 24 - LocalVarsSize +save_rsi equ rsp + 32 - LocalVarsSize +save_rbx equ rsp + 40 - LocalVarsSize +save_rbp equ rsp + 48 - LocalVarsSize +save_r12 equ rsp + 56 - LocalVarsSize +save_r13 equ rsp + 64 - LocalVarsSize +;save_r14 equ rsp + 72 - LocalVarsSize +;save_r15 equ rsp + 80 - LocalVarsSize + + +; summary of register usage +; scanend ebx +; scanendw bx +; chainlenwmask edx +; curmatch rsi +; curmatchd esi +; windowbestlen r8 +; scanalign r9 +; scanalignd r9d +; window r10 +; bestlen r11 +; bestlend r11d +; scanstart r12d +; scanstartw r12w +; scan r13 +; nicematch r14d +; limit r15 +; limitd r15d +; prev rcx + +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure + + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + +IFDEF INFOZIP + +_DATA SEGMENT +COMM window_size:DWORD +; WMask ; 7fff +COMM window:BYTE:010040H +COMM prev:WORD:08000H +; MatchLen : unused +; PrevMatch : unused +COMM strstart:DWORD +COMM match_start:DWORD +; Lookahead : ignore +COMM prev_length:DWORD ; PrevLen +COMM max_chain_length:DWORD +COMM good_match:DWORD +COMM nice_match:DWORD +prev_ad equ OFFSET prev +window_ad equ OFFSET window +nicematch equ nice_match +_DATA ENDS +WMask equ 07fffh + +ELSE + + IFNDEF zlib1222add + zlib1222add equ 8 + ENDIF +dsWSize equ 56+zlib1222add+(zlib1222add/2) +dsWMask equ 64+zlib1222add+(zlib1222add/2) +dsWindow equ 72+zlib1222add +dsPrev equ 88+zlib1222add +dsMatchLen equ 128+zlib1222add +dsPrevMatch equ 132+zlib1222add +dsStrStart equ 140+zlib1222add +dsMatchStart equ 144+zlib1222add +dsLookahead equ 148+zlib1222add +dsPrevLen equ 152+zlib1222add +dsMaxChainLen equ 156+zlib1222add +dsGoodMatch equ 172+zlib1222add +dsNiceMatch equ 176+zlib1222add + +window_size equ [ rcx + dsWSize] +WMask equ [ rcx + dsWMask] +window_ad equ [ rcx + dsWindow] +prev_ad equ [ rcx + dsPrev] +strstart equ [ rcx + dsStrStart] +match_start equ [ rcx + dsMatchStart] +Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip +prev_length equ [ rcx + dsPrevLen] +max_chain_length equ [ rcx + dsMaxChainLen] +good_match equ [ rcx + dsGoodMatch] +nice_match equ [ rcx + dsNiceMatch] +ENDIF + +; parameter 1 in r8(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + + + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) + +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx + + mov [save_rdi],rdi + mov [save_rsi],rsi + mov [save_rbx],rbx + mov [save_rbp],rbp +IFDEF INFOZIP + mov r8d,ecx +ELSE + mov r8d,edx +ENDIF + mov [save_r12],r12 + mov [save_r13],r13 +; mov [save_r14],r14 +; mov [save_r15],r15 + + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +;;; on zlib only +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + +IFDEF INFOZIP + mov [chainlenwmask], ebx +; on infozip nice_match = [nice_match] +ELSE + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d +ENDIF + +;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; +IFDEF INFOZIP + mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1)) +ELSE + mov eax, window_size + sub eax, MIN_LOOKAHEAD +ENDIF + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +;;; int best_len = s->prev_length; + + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 + jmp LookupLoopIsZero + + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + jnz LookupLoop1 + + +;;; Store the current value of chainlen. + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + lea rsi,[r8+r10] + mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + jnz short LoopCmps + jmp short LenMaximum +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0000FFFFh + jnz LenLower + + test eax,0ffffffffh + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + jnz LenLower + +LenLower32: + shr eax,16 + add rdx,2 +LenLower: sub al, 1 + adc rdx, 0 +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// + + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + jge LeaveNow + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: +IFDEF INFOZIP + mov eax,r11d +ELSE + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d +ENDIF + +;;; Restore the stack and return from whence we came. + + + mov rsi,[save_rsi] + mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] +; mov r14,[save_r14] +; mov r15,[save_r15] + + + ret 0 +; please don't remove this string ! +; Your can freely use gvmat64 in any free or commercial app +; but it is far better don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 +longest_match ENDP + +match_init PROC + ret 0 +match_init ENDP + + +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffas8664.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffas8664.c new file mode 100644 index 000000000..aa861a333 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffas8664.c @@ -0,0 +1,186 @@ +/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding + * version for AMD64 on Windows using Microsoft C compiler + * + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant + * + * inffas8664.c call function inffas8664fnc in inffasx64.asm + * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c + * + * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also + * slightly quicker on x86 systems because, instead of using rep movsb to copy + * data, it uses rep movsw, which moves data in 2-byte chunks instead of single + * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates + * from http://fedora.linux.duke.edu/fc1_x86_64 + * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with + * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, + * when decompressing mozilla-source-1.3.tar.gz. + * + * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from + * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at + * the moment. I have successfully compiled and tested this code with gcc2.96, + * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S + * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX + * enabled. I will attempt to merge the MMX code into this version. Newer + * versions of this and inffast.S can be found at + * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ + * + */ + +#include +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* Mark Adler's comments from inffast.c: */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ + + + + typedef struct inffast_ar { +/* 64 32 x86 x86_64 */ +/* ar offset register */ +/* 0 0 */ void *esp; /* esp save */ +/* 8 4 */ void *ebp; /* ebp save */ +/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ +/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ +/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ +/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ +/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ +/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ +/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ +/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ +/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */ +/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ +/* 92 48 */ unsigned wsize; /* window size */ +/* 96 52 */ unsigned write; /* window write index */ +/*100 56 */ unsigned lmask; /* r12 mask for lcode */ +/*104 60 */ unsigned dmask; /* r13 mask for dcode */ +/*108 64 */ unsigned len; /* r14 match length */ +/*112 68 */ unsigned dist; /* r15 match distance */ +/*116 72 */ unsigned status; /* set when state chng*/ + } type_ar; +#ifdef ASMINF + +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + type_ar ar; + void inffas8664fnc(struct inffast_ar * par); + + + +#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) +#define PAD_AVAIL_IN 6 +#define PAD_AVAIL_OUT 258 +#else +#define PAD_AVAIL_IN 5 +#define PAD_AVAIL_OUT 257 +#endif + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + + ar.in = strm->next_in; + ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); + ar.out = strm->next_out; + ar.beg = ar.out - (start - strm->avail_out); + ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); + ar.wsize = state->wsize; + ar.write = state->wnext; + ar.window = state->window; + ar.hold = state->hold; + ar.bits = state->bits; + ar.lcode = state->lencode; + ar.dcode = state->distcode; + ar.lmask = (1U << state->lenbits) - 1; + ar.dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + /* align in on 1/2 hold size boundary */ + while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { + ar.hold += (unsigned long)*ar.in++ << ar.bits; + ar.bits += 8; + } + + inffas8664fnc(&ar); + + if (ar.status > 1) { + if (ar.status == 2) + strm->msg = "invalid literal/length code"; + else if (ar.status == 3) + strm->msg = "invalid distance code"; + else + strm->msg = "invalid distance too far back"; + state->mode = BAD; + } + else if ( ar.status == 1 ) { + state->mode = TYPE; + } + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + ar.len = ar.bits >> 3; + ar.in -= ar.len; + ar.bits -= ar.len << 3; + ar.hold &= (1U << ar.bits) - 1; + + /* update state and return */ + strm->next_in = ar.in; + strm->next_out = ar.out; + strm->avail_in = (unsigned)(ar.in < ar.last ? + PAD_AVAIL_IN + (ar.last - ar.in) : + PAD_AVAIL_IN - (ar.in - ar.last)); + strm->avail_out = (unsigned)(ar.out < ar.end ? + PAD_AVAIL_OUT + (ar.end - ar.out) : + PAD_AVAIL_OUT - (ar.out - ar.end)); + state->hold = (unsigned long)ar.hold; + state->bits = ar.bits; + return; +} + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffasx64.asm b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffasx64.asm new file mode 100644 index 000000000..41ec82392 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/inffasx64.asm @@ -0,0 +1,396 @@ +; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding +; version for AMD64 on Windows using Microsoft C compiler +; +; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c +; inffasx64.asm is called by inffas8664.c, which contain more info. + + +; to compile this file, I use option +; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +; with Microsoft Macro Assembler (x64) for AMD64 +; + +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK +; +; (you can get Windows WDK with ml64 for AMD64 from +; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) +; + + +.code +inffas8664fnc PROC + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch. + + + mov [rsp-8],rsi + mov [rsp-16],rdi + mov [rsp-24],r12 + mov [rsp-32],r13 + mov [rsp-40],r14 + mov [rsp-48],r15 + mov [rsp-56],rbx + + mov rax,rcx + + mov [rax+8], rbp ; /* save regs rbp and rsp */ + mov [rax], rsp + + mov rsp, rax ; /* make rsp point to &ar */ + + mov rsi, [rsp+16] ; /* rsi = in */ + mov rdi, [rsp+32] ; /* rdi = out */ + mov r9, [rsp+24] ; /* r9 = last */ + mov r10, [rsp+48] ; /* r10 = end */ + mov rbp, [rsp+64] ; /* rbp = lcode */ + mov r11, [rsp+72] ; /* r11 = dcode */ + mov rdx, [rsp+80] ; /* rdx = hold */ + mov ebx, [rsp+88] ; /* ebx = bits */ + mov r12d, [rsp+100] ; /* r12d = lmask */ + mov r13d, [rsp+104] ; /* r13d = dmask */ + ; /* r14d = len */ + ; /* r15d = dist */ + + + cld + cmp r10, rdi + je L_one_time ; /* if only one decode left */ + cmp r9, rsi + + jne L_do_loop + + +L_one_time: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code_one_time + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + jmp L_get_length_code_one_time + +ALIGN 4 +L_while_test: + cmp r10, rdi + jbe L_break_loop + cmp r9, rsi + jbe L_break_loop + +L_do_loop: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_length_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + mov r8, r12 ; /* r8 = lmask */ + shr eax, 16 ; /* output this.val char */ + stosb + +L_get_length_code_one_time: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + +L_dolen: + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + shr eax, 16 ; /* output this.val char */ + stosb + jmp L_while_test + +ALIGN 4 +L_test_for_length_base: + mov r14d, eax ; /* len = this */ + shr r14d, 16 ; /* len = this.val */ + mov cl, al + + test al, 16 + jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */ + and cl, 15 ; /* op &= 15 */ + jz L_decode_distance ; /* if (!op) */ + +L_add_bits_to_len: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r14d, eax ; /* len += hold & mask[op] */ + +L_decode_distance: + mov r8, r13 ; /* r8 = dmask */ + cmp bl, 32 + ja L_get_distance_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_distance_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */ + +L_dodist: + mov r15d, eax ; /* dist = this */ + shr r15d, 16 ; /* dist = this.val */ + mov cl, ah + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + mov cl, al ; /* cl = this.op */ + + test al, 16 ; /* if ((op & 16) == 0) */ + jz L_test_for_second_level_dist + and cl, 15 ; /* op &= 15 */ + jz L_check_dist_one + +L_add_bits_to_dist: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax ; /* (1 << op) - 1 */ + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r15d, eax ; /* dist += hold & ((1 << op) - 1) */ + +L_check_window: + mov r8, rsi ; /* save in so from can use it's reg */ + mov rax, rdi + sub rax, [rsp+40] ; /* nbytes = out - beg */ + + cmp eax, r15d + jb L_clip_window ; /* if (dist > nbytes) 4.2% */ + + mov ecx, r14d ; /* ecx = len */ + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + + sar ecx, 1 + jnc L_copy_two ; /* if len % 2 == 0 */ + + rep movsw + mov al, [rsi] + mov [rdi], al + inc rdi + + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +L_copy_two: + rep movsw + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp r15d, 1 ; /* if dist 1, is a memset */ + jne L_check_window + cmp [rsp+40], rdi ; /* if out == beg, outside window */ + je L_check_window + + mov ecx, r14d ; /* ecx = len */ + mov al, [rdi-1] + mov ah, al + + sar ecx, 1 + jnc L_set_two + mov [rdi], al + inc rdi + +L_set_two: + rep stosw + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + test al, 64 + jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r14d ; /* eax += len */ + mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/ + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + test al, 64 + jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r15d ; /* eax += dist */ + mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/ + jmp L_dodist + +ALIGN 4 +L_clip_window: + mov ecx, eax ; /* ecx = nbytes */ + mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */ + neg ecx ; /* nbytes = -nbytes */ + + cmp eax, r15d + jb L_invalid_distance_too_far ; /* if (dist > wsize) */ + + add ecx, r15d ; /* nbytes = dist - nbytes */ + cmp dword ptr [rsp+96], 0 + jne L_wrap_around_window ; /* if (write != 0) */ + + mov rsi, [rsp+56] ; /* from = window */ + sub eax, ecx ; /* eax -= nbytes */ + add rsi, rax ; /* from += wsize - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp r14d, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* eax -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = &out[ -dist ] */ + jmp L_do_copy + +ALIGN 4 +L_wrap_around_window: + mov eax, [rsp+96] ; /* eax = write */ + cmp ecx, eax + jbe L_contiguous_in_window ; /* if (write >= nbytes) */ + + mov esi, [rsp+92] ; /* from = wsize */ + add rsi, [rsp+56] ; /* from += window */ + add rsi, rax ; /* from += write */ + sub rsi, rcx ; /* from -= nbytes */ + sub ecx, eax ; /* nbytes -= write */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, [rsp+56] ; /* from = window */ + mov ecx, [rsp+96] ; /* nbytes = write */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_contiguous_in_window: + mov rsi, [rsp+56] ; /* rsi = window */ + add rsi, rax + sub rsi, rcx ; /* from += write - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy ; /* if (nbytes >= len) */ + +ALIGN 4 +L_do_copy: + mov ecx, eax ; /* ecx = len */ + rep movsb + + mov rsi, r8 ; /* move in back to %esi, toss from */ + jmp L_while_test + +L_test_for_end_of_block: + test al, 32 + jz L_invalid_literal_length_code + mov dword ptr [rsp+116], 1 + jmp L_break_loop_with_status + +L_invalid_literal_length_code: + mov dword ptr [rsp+116], 2 + jmp L_break_loop_with_status + +L_invalid_distance_code: + mov dword ptr [rsp+116], 3 + jmp L_break_loop_with_status + +L_invalid_distance_too_far: + mov dword ptr [rsp+116], 4 + jmp L_break_loop_with_status + +L_break_loop: + mov dword ptr [rsp+116], 0 + +L_break_loop_with_status: +; /* put in, out, bits, and hold back into ar and pop esp */ + mov [rsp+16], rsi ; /* in */ + mov [rsp+32], rdi ; /* out */ + mov [rsp+88], ebx ; /* bits */ + mov [rsp+80], rdx ; /* hold */ + + mov rax, [rsp] ; /* restore rbp and rsp */ + mov rbp, [rsp+8] + mov rsp, rax + + + + mov rsi,[rsp-8] + mov rdi,[rsp-16] + mov r12,[rsp-24] + mov r13,[rsp-32] + mov r14,[rsp-40] + mov r15,[rsp-48] + mov rbx,[rsp-56] + + ret 0 +; : +; : "m" (ar) +; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", +; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" +; ); + +inffas8664fnc ENDP +;_TEXT ENDS +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/readme.txt new file mode 100644 index 000000000..652571c7a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx64/readme.txt @@ -0,0 +1,31 @@ +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), +for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. + +gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits + assembly optimized version from Jean-loup Gailly original longest_match function + +inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing + original function from Mark Adler + +Use instructions +---------------- +Assemble the .asm files using MASM and put the object files into the zlib source +directory. You can also get object files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip + +define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, +and inffasx64.obj and gvmat64.obj as object to link. + + +Build instructions +------------------ +run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) + +ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK + +You can get Windows 2003 server DDK with ml64 and cl for AMD64 from + http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/bld_ml32.bat b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/bld_ml32.bat new file mode 100644 index 000000000..fcf5755e4 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/bld_ml32.bat @@ -0,0 +1,2 @@ +ml /coff /Zi /c /Flmatch686.lst match686.asm +ml /coff /Zi /c /Flinffas32.lst inffas32.asm diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/inffas32.asm b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/inffas32.asm new file mode 100644 index 000000000..cb37a81e4 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/inffas32.asm @@ -0,0 +1,1080 @@ +;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding +; * +; * inffas32.asm is derivated from inffas86.c, with translation of assembly code +; * +; * Copyright (C) 1995-2003 Mark Adler +; * For conditions of distribution and use, see copyright notice in zlib.h +; * +; * Copyright (C) 2003 Chris Anderson +; * Please use the copyright conditions above. +; * +; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from +; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at +; * the moment. I have successfully compiled and tested this code with gcc2.96, +; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S +; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX +; * enabled. I will attempt to merge the MMX code into this version. Newer +; * versions of this and inffast.S can be found at +; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ +; * +; * 2005 : modification by Gilles Vollant +; */ +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is in directory \MASM611C of Win95 DDK +; ml.exe is also distributed in http://www.masm32.com/masmdl.htm +; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ +; +; +; compile with command line option +; ml /coff /Zi /c /Flinffas32.lst inffas32.asm + +; if you define NO_GZIP (see inflate.h), compile with +; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm + + +; zlib122sup is 0 fort zlib 1.2.2.1 and lower +; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head +; in inflate_state in inflate.h) +zlib1222sup equ 8 + + +IFDEF GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 +ELSE + IFNDEF NO_GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 + ELSE + INFLATE_MODE_TYPE equ 3 + INFLATE_MODE_BAD equ 17 + ENDIF +ENDIF + + +; 75 "inffast.S" +;FILE "inffast.S" + +;;;GLOBAL _inflate_fast + +;;;SECTION .text + + + + .586p + .mmx + + name inflate_fast_x86 + .MODEL FLAT + +_DATA segment +inflate_fast_use_mmx: + dd 1 + + +_TEXT segment + + + +ALIGN 4 + db 'Fast decoding Code from Chris Anderson' + db 0 + +ALIGN 4 +invalid_literal_length_code_msg: + db 'invalid literal/length code' + db 0 + +ALIGN 4 +invalid_distance_code_msg: + db 'invalid distance code' + db 0 + +ALIGN 4 +invalid_distance_too_far_msg: + db 'invalid distance too far back' + db 0 + + +ALIGN 4 +inflate_fast_mask: +dd 0 +dd 1 +dd 3 +dd 7 +dd 15 +dd 31 +dd 63 +dd 127 +dd 255 +dd 511 +dd 1023 +dd 2047 +dd 4095 +dd 8191 +dd 16383 +dd 32767 +dd 65535 +dd 131071 +dd 262143 +dd 524287 +dd 1048575 +dd 2097151 +dd 4194303 +dd 8388607 +dd 16777215 +dd 33554431 +dd 67108863 +dd 134217727 +dd 268435455 +dd 536870911 +dd 1073741823 +dd 2147483647 +dd 4294967295 + + +mode_state equ 0 ;/* state->mode */ +wsize_state equ (32+zlib1222sup) ;/* state->wsize */ +write_state equ (36+4+zlib1222sup) ;/* state->write */ +window_state equ (40+4+zlib1222sup) ;/* state->window */ +hold_state equ (44+4+zlib1222sup) ;/* state->hold */ +bits_state equ (48+4+zlib1222sup) ;/* state->bits */ +lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ +distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ +lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ +distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ + + +;;SECTION .text +; 205 "inffast.S" +;GLOBAL inflate_fast_use_mmx + +;SECTION .data + + +; GLOBAL inflate_fast_use_mmx:object +;.size inflate_fast_use_mmx, 4 +; 226 "inffast.S" +;SECTION .text + +ALIGN 4 +_inflate_fast proc near +.FPO (16, 4, 0, 0, 1, 0) + push edi + push esi + push ebp + push ebx + pushfd + sub esp,64 + cld + + + + + mov esi, [esp+88] + mov edi, [esi+28] + + + + + + + + mov edx, [esi+4] + mov eax, [esi+0] + + add edx,eax + sub edx,11 + + mov [esp+44],eax + mov [esp+20],edx + + mov ebp, [esp+92] + mov ecx, [esi+16] + mov ebx, [esi+12] + + sub ebp,ecx + neg ebp + add ebp,ebx + + sub ecx,257 + add ecx,ebx + + mov [esp+60],ebx + mov [esp+40],ebp + mov [esp+16],ecx +; 285 "inffast.S" + mov eax, [edi+lencode_state] + mov ecx, [edi+distcode_state] + + mov [esp+8],eax + mov [esp+12],ecx + + mov eax,1 + mov ecx, [edi+lenbits_state] + shl eax,cl + dec eax + mov [esp+0],eax + + mov eax,1 + mov ecx, [edi+distbits_state] + shl eax,cl + dec eax + mov [esp+4],eax + + mov eax, [edi+wsize_state] + mov ecx, [edi+write_state] + mov edx, [edi+window_state] + + mov [esp+52],eax + mov [esp+48],ecx + mov [esp+56],edx + + mov ebp, [edi+hold_state] + mov ebx, [edi+bits_state] +; 321 "inffast.S" + mov esi, [esp+44] + mov ecx, [esp+20] + cmp ecx,esi + ja L_align_long + + add ecx,11 + sub ecx,esi + mov eax,12 + sub eax,ecx + lea edi, [esp+28] + rep movsb + mov ecx,eax + xor eax,eax + rep stosb + lea esi, [esp+28] + mov [esp+20],esi + jmp L_is_aligned + + +L_align_long: + test esi,3 + jz L_is_aligned + xor eax,eax + mov al, [esi] + inc esi + mov ecx,ebx + add ebx,8 + shl eax,cl + or ebp,eax + jmp L_align_long + +L_is_aligned: + mov edi, [esp+60] +; 366 "inffast.S" +L_check_mmx: + cmp dword ptr [inflate_fast_use_mmx],2 + je L_init_mmx + ja L_do_loop + + push eax + push ebx + push ecx + push edx + pushfd + mov eax, [esp] + xor dword ptr [esp],0200000h + + + + + popfd + pushfd + pop edx + xor edx,eax + jz L_dont_use_mmx + xor eax,eax + cpuid + cmp ebx,0756e6547h + jne L_dont_use_mmx + cmp ecx,06c65746eh + jne L_dont_use_mmx + cmp edx,049656e69h + jne L_dont_use_mmx + mov eax,1 + cpuid + shr eax,8 + and eax,15 + cmp eax,6 + jne L_dont_use_mmx + test edx,0800000h + jnz L_use_mmx + jmp L_dont_use_mmx +L_use_mmx: + mov dword ptr [inflate_fast_use_mmx],2 + jmp L_check_mmx_pop +L_dont_use_mmx: + mov dword ptr [inflate_fast_use_mmx],3 +L_check_mmx_pop: + pop edx + pop ecx + pop ebx + pop eax + jmp L_check_mmx +; 426 "inffast.S" +ALIGN 4 +L_do_loop: +; 437 "inffast.S" + cmp bl,15 + ja L_get_length_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_length_code: + mov edx, [esp+0] + mov ecx, [esp+8] + and edx,ebp + mov eax, [ecx+edx*4] + +L_dolen: + + + + + + + mov cl,ah + sub bl,ah + shr ebp,cl + + + + + + + test al,al + jnz L_test_for_length_base + + shr eax,16 + stosb + +L_while_test: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop + jmp L_break_loop + +L_test_for_length_base: +; 502 "inffast.S" + mov edx,eax + shr edx,16 + mov cl,al + + test al,16 + jz L_test_for_second_level_length + and cl,15 + jz L_save_len + cmp bl,cl + jae L_add_bits_to_len + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_len: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + +L_save_len: + mov [esp+24],edx + + +L_decode_distance: +; 549 "inffast.S" + cmp bl,15 + ja L_get_distance_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_distance_code: + mov edx, [esp+4] + mov ecx, [esp+12] + and edx,ebp + mov eax, [ecx+edx*4] + + +L_dodist: + mov edx,eax + shr edx,16 + mov cl,ah + sub bl,ah + shr ebp,cl +; 584 "inffast.S" + mov cl,al + + test al,16 + jz L_test_for_second_level_dist + and cl,15 + jz L_check_dist_one + cmp bl,cl + jae L_add_bits_to_dist + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_dist: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + jmp L_check_window + +L_check_window: +; 625 "inffast.S" + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,edx + jb L_clip_window + + mov ecx, [esp+24] + mov esi,edi + sub esi,edx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp edx,1 + jne L_check_window + cmp [esp+40],edi + je L_check_window + + dec edi + mov ecx, [esp+24] + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + + + + + test al,64 + jnz L_test_for_end_of_block + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+8] + mov eax, [edx+eax*4] + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + + + + + test al,64 + jnz L_invalid_distance_code + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+12] + mov eax, [edx+eax*4] + jmp L_dodist + +ALIGN 4 +L_clip_window: +; 721 "inffast.S" + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,edx + jb L_invalid_distance_too_far + + add ecx,edx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window + + sub eax,ecx + add esi,eax +; 749 "inffast.S" + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_wrap_around_window: +; 793 "inffast.S" + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_contiguous_in_window: +; 836 "inffast.S" + add esi,eax + sub esi,ecx + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + +L_do_copy1: +; 862 "inffast.S" + mov ecx,eax + rep movsb + + mov esi, [esp+44] + jmp L_while_test +; 878 "inffast.S" +ALIGN 4 +L_init_mmx: + emms + + + + + + movd mm0,ebp + mov ebp,ebx +; 896 "inffast.S" + movd mm4,dword ptr [esp+0] + movq mm3,mm4 + movd mm5,dword ptr [esp+4] + movq mm2,mm5 + pxor mm1,mm1 + mov ebx, [esp+8] + jmp L_do_loop_mmx + +ALIGN 4 +L_do_loop_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_length_code_mmx + + movd mm6,ebp + movd mm7,dword ptr [esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_length_code_mmx: + pand mm4,mm0 + movd eax,mm4 + movq mm4,mm3 + mov eax, [ebx+eax*4] + +L_dolen_mmx: + movzx ecx,ah + movd mm1,ecx + sub ebp,ecx + + test al,al + jnz L_test_for_length_base_mmx + + shr eax,16 + stosb + +L_while_test_mmx: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop_mmx + jmp L_break_loop + +L_test_for_length_base_mmx: + + mov edx,eax + shr edx,16 + + test al,16 + jz L_test_for_second_level_length_mmx + and eax,15 + jz L_decode_distance_mmx + + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add edx,ecx + +L_decode_distance_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_dist_code_mmx + + movd mm6,ebp + movd mm7,dword ptr [esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_dist_code_mmx: + mov ebx, [esp+12] + pand mm5,mm0 + movd eax,mm5 + movq mm5,mm2 + mov eax, [ebx+eax*4] + +L_dodist_mmx: + + movzx ecx,ah + mov ebx,eax + shr ebx,16 + sub ebp,ecx + movd mm1,ecx + + test al,16 + jz L_test_for_second_level_dist_mmx + and eax,15 + jz L_check_dist_one_mmx + +L_add_bits_to_dist_mmx: + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add ebx,ecx + +L_check_window_mmx: + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,ebx + jb L_clip_window_mmx + + mov ecx,edx + mov esi,edi + sub esi,ebx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_check_dist_one_mmx: + cmp ebx,1 + jne L_check_window_mmx + cmp [esp+40],edi + je L_check_window_mmx + + dec edi + mov ecx,edx + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_test_for_second_level_length_mmx: + test al,64 + jnz L_test_for_end_of_block + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + add ecx,edx + mov eax, [ebx+ecx*4] + jmp L_dolen_mmx + +ALIGN 4 +L_test_for_second_level_dist_mmx: + test al,64 + jnz L_invalid_distance_code + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + mov eax, [esp+12] + add ecx,ebx + mov eax, [eax+ecx*4] + jmp L_dodist_mmx + +ALIGN 4 +L_clip_window_mmx: + + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,ebx + jb L_invalid_distance_too_far + + add ecx,ebx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window_mmx + + sub eax,ecx + add esi,eax + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_wrap_around_window_mmx: + + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window_mmx + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_contiguous_in_window_mmx: + + add esi,eax + sub esi,ecx + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + +L_do_copy1_mmx: + + + mov ecx,edx + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx +; 1174 "inffast.S" +L_invalid_distance_code: + + + + + + mov ecx, invalid_distance_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_test_for_end_of_block: + + + + + + test al,32 + jz L_invalid_literal_length_code + + mov ecx,0 + mov edx,INFLATE_MODE_TYPE + jmp L_update_stream_state + +L_invalid_literal_length_code: + + + + + + mov ecx, invalid_literal_length_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_invalid_distance_too_far: + + + + mov esi, [esp+44] + mov ecx, invalid_distance_too_far_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_update_stream_state: + + mov eax, [esp+88] + test ecx,ecx + jz L_skip_msg + mov [eax+24],ecx +L_skip_msg: + mov eax, [eax+28] + mov [eax+mode_state],edx + jmp L_break_loop + +ALIGN 4 +L_break_loop: +; 1243 "inffast.S" + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_next_in + + + + mov ebx,ebp + +L_update_next_in: +; 1266 "inffast.S" + mov eax, [esp+88] + mov ecx,ebx + mov edx, [eax+28] + shr ecx,3 + sub esi,ecx + shl ecx,3 + sub ebx,ecx + mov [eax+12],edi + mov [edx+bits_state],ebx + mov ecx,ebx + + lea ebx, [esp+28] + cmp [esp+20],ebx + jne L_buf_not_used + + sub esi,ebx + mov ebx, [eax+0] + mov [esp+20],ebx + add esi,ebx + mov ebx, [eax+4] + sub ebx,11 + add [esp+20],ebx + +L_buf_not_used: + mov [eax+0],esi + + mov ebx,1 + shl ebx,cl + dec ebx + + + + + + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_hold + + + + psrlq mm0,mm1 + movd ebp,mm0 + + emms + +L_update_hold: + + + + and ebp,ebx + mov [edx+hold_state],ebp + + + + + mov ebx, [esp+20] + cmp ebx,esi + jbe L_last_is_smaller + + sub ebx,esi + add ebx,11 + mov [eax+4],ebx + jmp L_fixup_out +L_last_is_smaller: + sub esi,ebx + neg esi + add esi,11 + mov [eax+4],esi + + + + +L_fixup_out: + + mov ebx, [esp+16] + cmp ebx,edi + jbe L_end_is_smaller + + sub ebx,edi + add ebx,257 + mov [eax+16],ebx + jmp L_done +L_end_is_smaller: + sub edi,ebx + neg edi + add edi,257 + mov [eax+16],edi + + + + + +L_done: + add esp,64 + popfd + pop ebx + pop ebp + pop esi + pop edi + ret +_inflate_fast endp + +_TEXT ends +end diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/match686.asm b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/match686.asm new file mode 100644 index 000000000..69e0eed01 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/match686.asm @@ -0,0 +1,479 @@ +; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86 +; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; File written by Gilles Vollant, by converting match686.S from Brian Raiter +; for MASM. This is as assembly version of longest_match +; from Jean-loup Gailly in deflate.c +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is distributed in +; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 +; +; this file contain two implementation of longest_match +; +; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro +; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom) +; +; for using an assembly version of longest_match, you need define ASMV in project +; +; compile the asm file running +; ml /coff /Zi /c /Flmatch686.lst match686.asm +; and do not include match686.obj in your project +; +; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for +; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor +; with autoselect (with cpu detection code) +; if you want support the old pentium optimization, you can still use these version +; +; this file is not optimized for old pentium, but it compatible with all x86 32 bits +; processor (starting 80386) +; +; +; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2 + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ + + NbStack equ 76 + cur_match equ dword ptr[esp+NbStack-0] + str_s equ dword ptr[esp+NbStack-4] +; 5 dword on top (ret,ebp,esi,edi,ebx) + adrret equ dword ptr[esp+NbStack-8] + pushebp equ dword ptr[esp+NbStack-12] + pushedi equ dword ptr[esp+NbStack-16] + pushesi equ dword ptr[esp+NbStack-20] + pushebx equ dword ptr[esp+NbStack-24] + + chain_length equ dword ptr [esp+NbStack-28] + limit equ dword ptr [esp+NbStack-32] + best_len equ dword ptr [esp+NbStack-36] + window equ dword ptr [esp+NbStack-40] + prev equ dword ptr [esp+NbStack-44] + scan_start equ word ptr [esp+NbStack-48] + wmask equ dword ptr [esp+NbStack-52] + match_start_ptr equ dword ptr [esp+NbStack-56] + nice_match equ dword ptr [esp+NbStack-60] + scan equ dword ptr [esp+NbStack-64] + + windowlen equ dword ptr [esp+NbStack-68] + match_start equ dword ptr [esp+NbStack-72] + strend equ dword ptr [esp+NbStack-76] + NbStackAdd equ (NbStack-24) + + .386p + + name gvmatch + .MODEL FLAT + + + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + zlib1222add equ 8 + +; Note : these value are good with a 8 bytes boundary pack structure + dep_chain_length equ 74h+zlib1222add + dep_window equ 30h+zlib1222add + dep_strstart equ 64h+zlib1222add + dep_prev_length equ 70h+zlib1222add + dep_nice_match equ 88h+zlib1222add + dep_w_size equ 24h+zlib1222add + dep_prev equ 38h+zlib1222add + dep_w_mask equ 2ch+zlib1222add + dep_good_match equ 84h+zlib1222add + dep_match_start equ 68h+zlib1222add + dep_lookahead equ 6ch+zlib1222add + + +_TEXT segment + +IFDEF NOUNDERLINE + public longest_match + public match_init +ELSE + public _longest_match + public _match_init +ENDIF + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + + +MAX_MATCH equ 258 +MIN_MATCH equ 3 +MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1) +MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h) + + +;;; stack frame offsets + +chainlenwmask equ esp + 0 ; high word: current chain len + ; low word: s->wmask +window equ esp + 4 ; local copy of s->window +windowbestlen equ esp + 8 ; s->window + bestlen +scanstart equ esp + 16 ; first two bytes of string +scanend equ esp + 12 ; last two bytes of string +scanalign equ esp + 20 ; dword-misalignment of string +nicematch equ esp + 24 ; a good enough match size +bestlen equ esp + 28 ; size of best match so far +scan equ esp + 32 ; ptr to string wanting match + +LocalVarsSize equ 36 +; saved ebx byte esp + 36 +; saved edi byte esp + 40 +; saved esi byte esp + 44 +; saved ebp byte esp + 48 +; return address byte esp + 52 +deflatestate equ esp + 56 ; the function arguments +curmatch equ esp + 60 + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +dsWSize equ 36+zlib1222add +dsWMask equ 44+zlib1222add +dsWindow equ 48+zlib1222add +dsPrev equ 56+zlib1222add +dsMatchLen equ 88+zlib1222add +dsPrevMatch equ 92+zlib1222add +dsStrStart equ 100+zlib1222add +dsMatchStart equ 104+zlib1222add +dsLookahead equ 108+zlib1222add +dsPrevLen equ 112+zlib1222add +dsMaxChainLen equ 116+zlib1222add +dsGoodMatch equ 132+zlib1222add +dsNiceMatch equ 136+zlib1222add + + +;;; match686.asm -- Pentium-Pro-optimized version of longest_match() +;;; Written for zlib 1.1.2 +;;; Copyright (C) 1998 Brian Raiter +;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html +;;; +;; +;; This software is provided 'as-is', without any express or implied +;; warranty. In no event will the authors be held liable for any damages +;; arising from the use of this software. +;; +;; Permission is granted to anyone to use this software for any purpose, +;; including commercial applications, and to alter it and redistribute it +;; freely, subject to the following restrictions: +;; +;; 1. The origin of this software must not be misrepresented; you must not +;; claim that you wrote the original software. If you use this software +;; in a product, an acknowledgment in the product documentation would be +;; appreciated but is not required. +;; 2. Altered source versions must be plainly marked as such, and must not be +;; misrepresented as being the original software +;; 3. This notice may not be removed or altered from any source distribution. +;; + +;GLOBAL _longest_match, _match_init + + +;SECTION .text + +;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch) + +;_longest_match: + IFDEF NOUNDERLINE + longest_match proc near + ELSE + _longest_match proc near + ENDIF +.FPO (9, 4, 0, 0, 1, 0) + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + push ebp + push edi + push esi + push ebx + sub esp, LocalVarsSize + +;;; Retrieve the function arguments. ecx will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + + mov edx, [deflatestate] + mov ecx, [curmatch] + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov eax, [edx + dsPrevLen] + mov ebx, [edx + dsGoodMatch] + cmp eax, ebx + mov eax, [edx + dsWMask] + mov ebx, [edx + dsMaxChainLen] + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + mov [chainlenwmask], ebx + +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + mov eax, [edx + dsNiceMatch] + mov ebx, [edx + dsLookahead] + cmp ebx, eax + jl LookaheadLess + mov ebx, eax +LookaheadLess: mov [nicematch], ebx + +;;; register Bytef *scan = s->window + s->strstart; + + mov esi, [edx + dsWindow] + mov [window], esi + mov ebp, [edx + dsStrStart] + lea edi, [esi + ebp] + mov [scan], edi + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov eax, edi + neg eax + and eax, 3 + mov [scanalign], eax + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + mov eax, [edx + dsWSize] + sub eax, MIN_LOOKAHEAD + sub ebp, eax + jg LimitPositive + xor ebp, ebp +LimitPositive: + +;;; int best_len = s->prev_length; + + mov eax, [edx + dsPrevLen] + mov [bestlen], eax + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + add esi, eax + mov [windowbestlen], esi + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx ebx, word ptr [edi] + mov [scanstart], ebx + movzx ebx, word ptr [edi + eax - 1] + mov [scanend], ebx + mov edi, [edx + dsPrev] + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + jmp short LoopEntry + +align 4 + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; ecx = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and ecx, edx + movzx ecx, word ptr [edi + ecx*2] + cmp ecx, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow +LoopEntry: movzx eax, word ptr [esi + ecx - 1] + cmp eax, ebx + jnz LookupLoop + mov eax, [window] + movzx eax, word ptr [eax + ecx] + cmp eax, [scanstart] + jnz LookupLoop + +;;; Store the current value of chainlen. + + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + mov esi, [window] + mov edi, [scan] + add esi, ecx + mov eax, [scanalign] + mov edx, 0fffffef8h; -(MAX_MATCH_8) + lea edi, [edi + eax + 0108h] ;MAX_MATCH_8] + lea esi, [esi + eax + 0108h] ;MAX_MATCH_8] + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust edx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (esi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + +LoopCmps: + mov eax, [esi + edx] + xor eax, [edi + edx] + jnz LeaveLoopCmps + mov eax, [esi + edx + 4] + xor eax, [edi + edx + 4] + jnz LeaveLoopCmps4 + add edx, 8 + jnz LoopCmps + jmp short LenMaximum +LeaveLoopCmps4: add edx, 4 +LeaveLoopCmps: test eax, 0000FFFFh + jnz LenLower + add edx, 2 + shr eax, 16 +LenLower: sub al, 1 + adc edx, 0 + +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea eax, [edi + edx] + mov edi, [scan] + sub eax, edi + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. + + mov edx, [deflatestate] + mov ebx, [bestlen] + cmp eax, ebx + jg LongerMatch + mov esi, [windowbestlen] + mov edi, [edx + dsPrev] + mov ebx, [scanend] + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: mov ebx, [nicematch] + mov [bestlen], eax + mov [edx + dsMatchStart], ecx + cmp eax, ebx + jge LeaveNow + mov esi, [window] + add esi, eax + mov [windowbestlen], esi + movzx ebx, word ptr [edi + eax - 1] + mov edi, [edx + dsPrev] + mov [scanend], ebx + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: mov edx, [deflatestate] + mov dword ptr [bestlen], MAX_MATCH + mov [edx + dsMatchStart], ecx + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: + mov edx, [deflatestate] + mov ebx, [bestlen] + mov eax, [edx + dsLookahead] + cmp ebx, eax + jg LookaheadRet + mov eax, ebx +LookaheadRet: + +;;; Restore the stack and return from whence we came. + + add esp, LocalVarsSize + pop ebx + pop esi + pop edi + pop ebp + + ret +; please don't remove this string ! +; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah + + + IFDEF NOUNDERLINE + longest_match endp + ELSE + _longest_match endp + ENDIF + + IFDEF NOUNDERLINE + match_init proc near + ret + match_init endp + ELSE + _match_init proc near + ret + _match_init endp + ENDIF + + +_TEXT ends +end diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/readme.txt new file mode 100644 index 000000000..3f8888679 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/masmx86/readme.txt @@ -0,0 +1,27 @@ + +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(). + + +Use instructions +---------------- +Assemble using MASM, and copy the object files into the zlib source +directory, then run the appropriate makefile, as suggested below. You can +donwload MASM from here: + + http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 + +You can also get objects files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip + +Build instructions +------------------ +* With Microsoft C and MASM: +nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" + +* With Borland C and TASM: +make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile new file mode 100644 index 000000000..84eaad20d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile @@ -0,0 +1,25 @@ +CC=cc +CFLAGS=-O -I../.. + +UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a +ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +all: miniunz minizip + +miniunz: $(UNZ_OBJS) + $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) + +minizip: $(ZIP_OBJS) + $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) + +test: miniunz minizip + ./minizip test readme.txt + ./miniunz -l test.zip + mv readme.txt readme.old + ./miniunz test.zip + +clean: + /bin/rm -f *.o *~ minizip miniunz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile.am b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile.am new file mode 100644 index 000000000..d343011eb --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/Makefile.am @@ -0,0 +1,45 @@ +lib_LTLIBRARIES = libminizip.la + +if COND_DEMOS +bin_PROGRAMS = miniunzip minizip +endif + +zlib_top_srcdir = $(top_srcdir)/../.. +zlib_top_builddir = $(top_builddir)/../.. + +AM_CPPFLAGS = -I$(zlib_top_srcdir) +AM_LDFLAGS = -L$(zlib_top_builddir) + +if WIN32 +iowin32_src = iowin32.c +iowin32_h = iowin32.h +endif + +libminizip_la_SOURCES = \ + ioapi.c \ + mztools.c \ + unzip.c \ + zip.c \ + ${iowin32_src} + +libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz + +minizip_includedir = $(includedir)/minizip +minizip_include_HEADERS = \ + crypt.h \ + ioapi.h \ + mztools.h \ + unzip.h \ + zip.h \ + ${iowin32_h} + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = minizip.pc + +EXTRA_PROGRAMS = miniunzip minizip + +miniunzip_SOURCES = miniunz.c +miniunzip_LDADD = libminizip.la + +minizip_SOURCES = minizip.c +minizip_LDADD = libminizip.la -lz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt new file mode 100644 index 000000000..13a1bd91a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt @@ -0,0 +1,6 @@ + +MiniZip 1.1 was derrived from MiniZip at version 1.01f + +Change in 1.0 (Okt 2009) + - **TODO - Add history** + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_info.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_info.txt new file mode 100644 index 000000000..57d715242 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/MiniZip64_info.txt @@ -0,0 +1,74 @@ +MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson + +Introduction +--------------------- +MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html ) + +When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0. +All possible work was done for compatibility. + + +Background +--------------------- +When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64 +support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ ) + +That was used as a starting point. And after that ZIP64 support was added to zip.c +some refactoring and code cleanup was also done. + + +Changed from MiniZip 1.0 to MiniZip 1.1 +--------------------------------------- +* Added ZIP64 support for unzip ( by Even Rouault ) +* Added ZIP64 support for zip ( by Mathias Svensson ) +* Reverted some changed that Even Rouault did. +* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users. +* Added unzip patch for BZIP Compression method (patch create by Daniel Borca) +* Added BZIP Compress method for zip +* Did some refactoring and code cleanup + + +Credits + + Gilles Vollant - Original MiniZip author + Even Rouault - ZIP64 unzip Support + Daniel Borca - BZip Compression method support in unzip + Mathias Svensson - ZIP64 zip support + Mathias Svensson - BZip Compression method support in zip + + Resources + + ZipLayout http://result42.com/projects/ZipFileLayout + Command line tool for Windows that shows the layout and information of the headers in a zip archive. + Used when debugging and validating the creation of zip files using MiniZip64 + + + ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT + Zip File specification + + +Notes. + * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined. + +License +---------------------------------------------------------- + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +---------------------------------------------------------- + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/configure.ac b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/configure.ac new file mode 100644 index 000000000..5b1197097 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/configure.ac @@ -0,0 +1,32 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com]) +AC_CONFIG_SRCDIR([minizip.c]) +AM_INIT_AUTOMAKE([foreign]) +LT_INIT + +AC_MSG_CHECKING([whether to build example programs]) +AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) +AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) +if test "$enable_demos" = yes +then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +case "${host}" in + *-mingw* | mingw*) + WIN32="yes" + ;; + *) + ;; +esac +AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) + + +AC_SUBST([HAVE_UNISTD_H], [0]) +AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) +AC_CONFIG_FILES([Makefile minizip.pc]) +AC_OUTPUT diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/crypt.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/crypt.h new file mode 100644 index 000000000..1e9e8200b --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/crypt.h @@ -0,0 +1,131 @@ +/* crypt.h -- base code for crypt/uncrypt ZIPfile + + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This code is a modified version of crypting code in Infozip distribution + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + + If you don't need crypting in your application, just define symbols + NOCRYPT and NOUNCRYPT. + + This code support the "Traditional PKWARE Encryption". + + The new AES encryption added on Zip format by Winzip (see the page + http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong + Encryption is not supported. +*/ + +#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) + +/*********************************************************************** + * Return the next byte in the pseudo-random sequence + */ +static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) +{ + unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an + * unpredictable manner on 16-bit systems; not a problem + * with any known compiler so far, though */ + + temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; + return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); +} + +/*********************************************************************** + * Update the encryption keys with the next byte of plain text + */ +static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) +{ + (*(pkeys+0)) = CRC32((*(pkeys+0)), c); + (*(pkeys+1)) += (*(pkeys+0)) & 0xff; + (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; + { + register int keyshift = (int)((*(pkeys+1)) >> 24); + (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); + } + return c; +} + + +/*********************************************************************** + * Initialize the encryption keys and the random header according to + * the given password. + */ +static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab) +{ + *(pkeys+0) = 305419896L; + *(pkeys+1) = 591751049L; + *(pkeys+2) = 878082192L; + while (*passwd != '\0') { + update_keys(pkeys,pcrc_32_tab,(int)*passwd); + passwd++; + } +} + +#define zdecode(pkeys,pcrc_32_tab,c) \ + (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) + +#define zencode(pkeys,pcrc_32_tab,c,t) \ + (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) + +#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED + +#define RAND_HEAD_LEN 12 + /* "last resort" source for second part of crypt seed pattern */ +# ifndef ZCR_SEED2 +# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ +# endif + +static int crypthead(const char* passwd, /* password string */ + unsigned char* buf, /* where to write header */ + int bufSize, + unsigned long* pkeys, + const z_crc_t* pcrc_32_tab, + unsigned long crcForCrypting) +{ + int n; /* index in random header */ + int t; /* temporary */ + int c; /* random byte */ + unsigned char header[RAND_HEAD_LEN-2]; /* random header */ + static unsigned calls = 0; /* ensure different random header each time */ + + if (bufSize> 7) & 0xff; + header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); + } + /* Encrypt random header (last two bytes is high word of crc) */ + init_keys(passwd, pkeys, pcrc_32_tab); + for (n = 0; n < RAND_HEAD_LEN-2; n++) + { + buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); + } + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); + return n; +} + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.c new file mode 100644 index 000000000..7f5c191b2 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.c @@ -0,0 +1,247 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + +*/ + +#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS))) + #define _CRT_SECURE_NO_WARNINGS +#endif + +#if defined(__APPLE__) || defined(IOAPI_NO_64) +// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions +#define FOPEN_FUNC(filename, mode) fopen(filename, mode) +#define FTELLO_FUNC(stream) ftello(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) +#else +#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +#define FTELLO_FUNC(stream) ftello64(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) +#endif + + +#include "ioapi.h" + +voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) +{ + if (pfilefunc->zfile_func64.zopen64_file != NULL) + return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); + else + { + return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode); + } +} + +long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); + else + { + uLong offsetTruncated = (uLong)offset; + if (offsetTruncated != offset) + return -1; + else + return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + } +} + +ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); + else + { + uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream); + if ((tell_uLong) == MAXU32) + return (ZPOS64_T)-1; + else + return tell_uLong; + } +} + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32) +{ + p_filefunc64_32->zfile_func64.zopen64_file = NULL; + p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; + p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; + p_filefunc64_32->zfile_func64.ztell64_file = NULL; + p_filefunc64_32->zfile_func64.zseek64_file = NULL; + p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque; + p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file; + p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; +} + + + +static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); +static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); +static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); +static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); +static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); + +static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = fopen(filename, mode_fopen); + return file; +} + +static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = FOPEN_FUNC((const char*)filename, mode_fopen); + return file; +} + + +static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) +{ + uLong ret; + ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) +{ + uLong ret; + ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) +{ + long ret; + ret = ftell((FILE *)stream); + return ret; +} + + +static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) +{ + ZPOS64_T ret; + ret = FTELLO_FUNC((FILE *)stream); + return ret; +} + +static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + if (fseek((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + return ret; +} + +static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + + if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + + return ret; +} + + +static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) +{ + int ret; + ret = fclose((FILE *)stream); + return ret; +} + +static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) +{ + int ret; + ret = ferror((FILE *)stream); + return ret; +} + +void fill_fopen_filefunc (pzlib_filefunc_def) + zlib_filefunc_def* pzlib_filefunc_def; +{ + pzlib_filefunc_def->zopen_file = fopen_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell_file = ftell_file_func; + pzlib_filefunc_def->zseek_file = fseek_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} + +void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = fopen64_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell64_file = ftell64_file_func; + pzlib_filefunc_def->zseek64_file = fseek64_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.h new file mode 100644 index 000000000..8dcbdb06e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/ioapi.h @@ -0,0 +1,208 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + + Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) + Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. + More if/def section may be needed to support other platforms + Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. + (but you should use iowin32.c for windows instead) + +*/ + +#ifndef _ZLIBIOAPI64_H +#define _ZLIBIOAPI64_H + +#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + + // Linux needs this to support file operation on files larger then 4+GB + // But might need better if/def to select just the platforms that needs them. + + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif + +#endif + +#include +#include +#include "zlib.h" + +#if defined(USE_FILE32API) +#define fopen64 fopen +#define ftello64 ftell +#define fseeko64 fseek +#else +#ifdef __FreeBSD__ +#define fopen64 fopen +#define ftello64 ftello +#define fseeko64 fseeko +#endif +#ifdef _MSC_VER + #define fopen64 fopen + #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) + #define ftello64 _ftelli64 + #define fseeko64 _fseeki64 + #else // old MSC + #define ftello64 ftell + #define fseeko64 fseek + #endif +#endif +#endif + +/* +#ifndef ZPOS64_T + #ifdef _WIN32 + #define ZPOS64_T fpos_t + #else + #include + #define ZPOS64_T uint64_t + #endif +#endif +*/ + +#ifdef HAVE_MINIZIP64_CONF_H +#include "mz64conf.h" +#endif + +/* a type choosen by DEFINE */ +#ifdef HAVE_64BIT_INT_CUSTOM +typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; +#else +#ifdef HAS_STDINT_H +#include "stdint.h" +typedef uint64_t ZPOS64_T; +#else + +/* Maximum unsigned 32-bit value used as placeholder for zip64 */ +#define MAXU32 0xffffffff + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef unsigned __int64 ZPOS64_T; +#else +typedef unsigned long long int ZPOS64_T; +#endif +#endif +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define ZLIB_FILEFUNC_SEEK_CUR (1) +#define ZLIB_FILEFUNC_SEEK_END (2) +#define ZLIB_FILEFUNC_SEEK_SET (0) + +#define ZLIB_FILEFUNC_MODE_READ (1) +#define ZLIB_FILEFUNC_MODE_WRITE (2) +#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) + +#define ZLIB_FILEFUNC_MODE_EXISTING (4) +#define ZLIB_FILEFUNC_MODE_CREATE (8) + + +#ifndef ZCALLBACK + #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) + #define ZCALLBACK CALLBACK + #else + #define ZCALLBACK + #endif +#endif + + + + +typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); +typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); +typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); + + +/* here is the "old" 32 bits structure structure */ +typedef struct zlib_filefunc_def_s +{ + open_file_func zopen_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell_file_func ztell_file; + seek_file_func zseek_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc_def; + +typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); + +typedef struct zlib_filefunc64_def_s +{ + open64_file_func zopen64_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell64_file_func ztell64_file; + seek64_file_func zseek64_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc64_def; + +void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); + +/* now internal definition, only for zip.c and unzip.h */ +typedef struct zlib_filefunc64_32_def_s +{ + zlib_filefunc64_def zfile_func64; + open_file_func zopen32_file; + tell_file_func ztell32_file; + seek_file_func zseek32_file; +} zlib_filefunc64_32_def; + + +#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) +//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) +#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) +#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) + +voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); +long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); +ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); + +#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) +#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) +#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.c new file mode 100644 index 000000000..274f39eb1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.c @@ -0,0 +1,462 @@ +/* iowin32.c -- IO base function header for compress/uncompress .zip + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + +*/ + +#include + +#include "zlib.h" +#include "ioapi.h" +#include "iowin32.h" + +#ifndef INVALID_HANDLE_VALUE +#define INVALID_HANDLE_VALUE (0xFFFFFFFF) +#endif + +#ifndef INVALID_SET_FILE_POINTER +#define INVALID_SET_FILE_POINTER ((DWORD)-1) +#endif + + +// see Include/shared/winapifamily.h in the Windows Kit +#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) +#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) +#define IOWIN32_USING_WINRT_API 1 +#endif +#endif + +voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode)); +uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +uLong ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +ZPOS64_T ZCALLBACK win32_tell64_file_func OF((voidpf opaque, voidpf stream)); +long ZCALLBACK win32_seek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +int ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream)); +int ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream)); + +typedef struct +{ + HANDLE hf; + int error; +} WIN32FILE_IOWIN; + + +static void win32_translate_open_mode(int mode, + DWORD* lpdwDesiredAccess, + DWORD* lpdwCreationDisposition, + DWORD* lpdwShareMode, + DWORD* lpdwFlagsAndAttributes) +{ + *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0; + + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + { + *lpdwDesiredAccess = GENERIC_READ; + *lpdwCreationDisposition = OPEN_EXISTING; + *lpdwShareMode = FILE_SHARE_READ; + } + else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + { + *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ; + *lpdwCreationDisposition = OPEN_EXISTING; + } + else if (mode & ZLIB_FILEFUNC_MODE_CREATE) + { + *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ; + *lpdwCreationDisposition = CREATE_ALWAYS; + } +} + +static voidpf win32_build_iowin(HANDLE hFile) +{ + voidpf ret=NULL; + + if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE)) + { + WIN32FILE_IOWIN w32fiow; + w32fiow.hf = hFile; + w32fiow.error = 0; + ret = malloc(sizeof(WIN32FILE_IOWIN)); + + if (ret==NULL) + CloseHandle(hFile); + else + *((WIN32FILE_IOWIN*)ret) = w32fiow; + } + return ret; +} + +voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + +#ifdef IOWIN32_USING_WINRT_API +#ifdef UNICODE + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); +#else + if ((filename!=NULL) && (dwDesiredAccess != 0)) + { + WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; + MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); + hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); + } +#endif +#else + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); +#endif + + return win32_build_iowin(hFile); +} + + +voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + +#ifdef IOWIN32_USING_WINRT_API + if ((filename!=NULL) && (dwDesiredAccess != 0)) + { + WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; + MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); + hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); + } +#else + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); +#endif + + return win32_build_iowin(hFile); +} + + +voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + +#ifdef IOWIN32_USING_WINRT_API + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile2((LPCWSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition,NULL); +#else + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); +#endif + + return win32_build_iowin(hFile); +} + + +voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + +#ifdef IOWIN32_USING_WINRT_API +#ifdef UNICODE + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); +#else + if ((filename!=NULL) && (dwDesiredAccess != 0)) + { + WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; + MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); + hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); + } +#endif +#else + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); +#endif + + return win32_build_iowin(hFile); +} + + +uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size) +{ + uLong ret=0; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + + if (hFile != NULL) + { + if (!ReadFile(hFile, buf, size, &ret, NULL)) + { + DWORD dwErr = GetLastError(); + if (dwErr == ERROR_HANDLE_EOF) + dwErr = 0; + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + } + } + + return ret; +} + + +uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size) +{ + uLong ret=0; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + + if (hFile != NULL) + { + if (!WriteFile(hFile, buf, size, &ret, NULL)) + { + DWORD dwErr = GetLastError(); + if (dwErr == ERROR_HANDLE_EOF) + dwErr = 0; + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + } + } + + return ret; +} + +static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod) +{ +#ifdef IOWIN32_USING_WINRT_API + return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod); +#else + LONG lHigh = pos.HighPart; + DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, dwMoveMethod); + BOOL fOk = TRUE; + if (dwNewPos == 0xFFFFFFFF) + if (GetLastError() != NO_ERROR) + fOk = FALSE; + if ((newPos != NULL) && (fOk)) + { + newPos->LowPart = dwNewPos; + newPos->HighPart = lHigh; + } + return fOk; +#endif +} + +long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream) +{ + long ret=-1; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + if (hFile != NULL) + { + LARGE_INTEGER pos; + pos.QuadPart = 0; + + if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT)) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = -1; + } + else + ret=(long)pos.LowPart; + } + return ret; +} + +ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream) +{ + ZPOS64_T ret= (ZPOS64_T)-1; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream)->hf; + + if (hFile) + { + LARGE_INTEGER pos; + pos.QuadPart = 0; + + if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT)) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = (ZPOS64_T)-1; + } + else + ret=pos.QuadPart; + } + return ret; +} + + +long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin) +{ + DWORD dwMoveMethod=0xFFFFFFFF; + HANDLE hFile = NULL; + + long ret=-1; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + dwMoveMethod = FILE_CURRENT; + break; + case ZLIB_FILEFUNC_SEEK_END : + dwMoveMethod = FILE_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + dwMoveMethod = FILE_BEGIN; + break; + default: return -1; + } + + if (hFile != NULL) + { + LARGE_INTEGER pos; + pos.QuadPart = offset; + if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod)) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = -1; + } + else + ret=0; + } + return ret; +} + +long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin) +{ + DWORD dwMoveMethod=0xFFFFFFFF; + HANDLE hFile = NULL; + long ret=-1; + + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream)->hf; + + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + dwMoveMethod = FILE_CURRENT; + break; + case ZLIB_FILEFUNC_SEEK_END : + dwMoveMethod = FILE_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + dwMoveMethod = FILE_BEGIN; + break; + default: return -1; + } + + if (hFile) + { + LARGE_INTEGER pos; + pos.QuadPart = offset; + if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod)) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = -1; + } + else + ret=0; + } + return ret; +} + +int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream) +{ + int ret=-1; + + if (stream!=NULL) + { + HANDLE hFile; + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + if (hFile != NULL) + { + CloseHandle(hFile); + ret=0; + } + free(stream); + } + return ret; +} + +int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream) +{ + int ret=-1; + if (stream!=NULL) + { + ret = ((WIN32FILE_IOWIN*)stream) -> error; + } + return ret; +} + +void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen_file = win32_open_file_func; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell_file = win32_tell_file_func; + pzlib_filefunc_def->zseek_file = win32_seek_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; +} + +void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = win32_open64_file_func; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; + pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; +} + + +void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; + pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; +} + + +void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; + pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.h new file mode 100644 index 000000000..0ca0969a7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/iowin32.h @@ -0,0 +1,28 @@ +/* iowin32.h -- IO base function header for compress/uncompress .zip + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + +*/ + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); +void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); + +#ifdef __cplusplus +} +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/make_vms.com b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/make_vms.com new file mode 100644 index 000000000..9ac13a98f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/make_vms.com @@ -0,0 +1,25 @@ +$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig +$ open/write zdef vmsdefs.h +$ copy sys$input: zdef +$ deck +#define unix +#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from +#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator +#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord +#define Write_EndOfCentralDirectoryRecord Write_EoDRecord +$ eod +$ close zdef +$ copy vmsdefs.h,ioapi.h_orig ioapi.h +$ cc/include=[--]/prefix=all ioapi.c +$ cc/include=[--]/prefix=all miniunz.c +$ cc/include=[--]/prefix=all unzip.c +$ cc/include=[--]/prefix=all minizip.c +$ cc/include=[--]/prefix=all zip.c +$ link miniunz,unzip,ioapi,[--]libz.olb/lib +$ link minizip,zip,ioapi,[--]libz.olb/lib +$ mcr []minizip test minizip_info.txt +$ mcr []miniunz -l test.zip +$ rename minizip_info.txt; minizip_info.txt_old +$ mcr []miniunz test.zip +$ delete test.zip;* +$exit diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunz.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunz.c new file mode 100644 index 000000000..3d65401be --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/miniunz.c @@ -0,0 +1,660 @@ +/* + miniunz.c + Version 1.1, February 14h, 2010 + sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) +*/ + +#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif +#endif + +#ifdef __APPLE__ +// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions +#define FOPEN_FUNC(filename, mode) fopen(filename, mode) +#define FTELLO_FUNC(stream) ftello(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) +#else +#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +#define FTELLO_FUNC(stream) ftello64(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) +#endif + + +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +# include +# include +#else +# include +# include +#endif + + +#include "unzip.h" + +#define CASESENSITIVITY (0) +#define WRITEBUFFERSIZE (8192) +#define MAXFILENAME (256) + +#ifdef _WIN32 +#define USEWIN32IOAPI +#include "iowin32.h" +#endif +/* + mini unzip, demo of unzip package + + usage : + Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir] + + list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT + if it exists +*/ + + +/* change_file_date : change the date/time of a file + filename : the filename of the file where date/time must be modified + dosdate : the new date at the MSDos format (4 bytes) + tmu_date : the SAME new date at the tm_unz format */ +void change_file_date(filename,dosdate,tmu_date) + const char *filename; + uLong dosdate; + tm_unz tmu_date; +{ +#ifdef _WIN32 + HANDLE hFile; + FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; + + hFile = CreateFileA(filename,GENERIC_READ | GENERIC_WRITE, + 0,NULL,OPEN_EXISTING,0,NULL); + GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite); + DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal); + LocalFileTimeToFileTime(&ftLocal,&ftm); + SetFileTime(hFile,&ftm,&ftLastAcc,&ftm); + CloseHandle(hFile); +#else +#ifdef unix || __APPLE__ + struct utimbuf ut; + struct tm newdate; + newdate.tm_sec = tmu_date.tm_sec; + newdate.tm_min=tmu_date.tm_min; + newdate.tm_hour=tmu_date.tm_hour; + newdate.tm_mday=tmu_date.tm_mday; + newdate.tm_mon=tmu_date.tm_mon; + if (tmu_date.tm_year > 1900) + newdate.tm_year=tmu_date.tm_year - 1900; + else + newdate.tm_year=tmu_date.tm_year ; + newdate.tm_isdst=-1; + + ut.actime=ut.modtime=mktime(&newdate); + utime(filename,&ut); +#endif +#endif +} + + +/* mymkdir and change_file_date are not 100 % portable + As I don't know well Unix, I wait feedback for the unix portion */ + +int mymkdir(dirname) + const char* dirname; +{ + int ret=0; +#ifdef _WIN32 + ret = _mkdir(dirname); +#elif unix + ret = mkdir (dirname,0775); +#elif __APPLE__ + ret = mkdir (dirname,0775); +#endif + return ret; +} + +int makedir (newdir) + char *newdir; +{ + char *buffer ; + char *p; + int len = (int)strlen(newdir); + + if (len <= 0) + return 0; + + buffer = (char*)malloc(len+1); + if (buffer==NULL) + { + printf("Error allocating memory\n"); + return UNZ_INTERNALERROR; + } + strcpy(buffer,newdir); + + if (buffer[len-1] == '/') { + buffer[len-1] = '\0'; + } + if (mymkdir(buffer) == 0) + { + free(buffer); + return 1; + } + + p = buffer+1; + while (1) + { + char hold; + + while(*p && *p != '\\' && *p != '/') + p++; + hold = *p; + *p = 0; + if ((mymkdir(buffer) == -1) && (errno == ENOENT)) + { + printf("couldn't create directory %s\n",buffer); + free(buffer); + return 0; + } + if (hold == 0) + break; + *p++ = hold; + } + free(buffer); + return 1; +} + +void do_banner() +{ + printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); + printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); +} + +void do_help() +{ + printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ + " -e Extract without pathname (junk paths)\n" \ + " -x Extract with pathname\n" \ + " -v list files\n" \ + " -l list files\n" \ + " -d directory to extract into\n" \ + " -o overwrite files without prompting\n" \ + " -p extract crypted file using password\n\n"); +} + +void Display64BitsSize(ZPOS64_T n, int size_char) +{ + /* to avoid compatibility problem , we do here the conversion */ + char number[21]; + int offset=19; + int pos_string = 19; + number[20]=0; + for (;;) { + number[offset]=(char)((n%10)+'0'); + if (number[offset] != '0') + pos_string=offset; + n/=10; + if (offset==0) + break; + offset--; + } + { + int size_display_string = 19-pos_string; + while (size_char > size_display_string) + { + size_char--; + printf(" "); + } + } + + printf("%s",&number[pos_string]); +} + +int do_list(uf) + unzFile uf; +{ + uLong i; + unz_global_info64 gi; + int err; + + err = unzGetGlobalInfo64(uf,&gi); + if (err!=UNZ_OK) + printf("error %d with zipfile in unzGetGlobalInfo \n",err); + printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); + printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); + for (i=0;i0) + ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size); + + /* display a '*' if the file is crypted */ + if ((file_info.flag & 1) != 0) + charCrypt='*'; + + if (file_info.compression_method==0) + string_method="Stored"; + else + if (file_info.compression_method==Z_DEFLATED) + { + uInt iLevel=(uInt)((file_info.flag & 0x6)/2); + if (iLevel==0) + string_method="Defl:N"; + else if (iLevel==1) + string_method="Defl:X"; + else if ((iLevel==2) || (iLevel==3)) + string_method="Defl:F"; /* 2:fast , 3 : extra fast*/ + } + else + if (file_info.compression_method==Z_BZIP2ED) + { + string_method="BZip2 "; + } + else + string_method="Unkn. "; + + Display64BitsSize(file_info.uncompressed_size,7); + printf(" %6s%c",string_method,charCrypt); + Display64BitsSize(file_info.compressed_size,7); + printf(" %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n", + ratio, + (uLong)file_info.tmu_date.tm_mon + 1, + (uLong)file_info.tmu_date.tm_mday, + (uLong)file_info.tmu_date.tm_year % 100, + (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min, + (uLong)file_info.crc,filename_inzip); + if ((i+1)='a') && (rep<='z')) + rep -= 0x20; + } + while ((rep!='Y') && (rep!='N') && (rep!='A')); + } + + if (rep == 'N') + skip = 1; + + if (rep == 'A') + *popt_overwrite=1; + } + + if ((skip==0) && (err==UNZ_OK)) + { + fout=FOPEN_FUNC(write_filename,"wb"); + /* some zipfile don't contain directory alone before file */ + if ((fout==NULL) && ((*popt_extract_without_path)==0) && + (filename_withoutpath!=(char*)filename_inzip)) + { + char c=*(filename_withoutpath-1); + *(filename_withoutpath-1)='\0'; + makedir(write_filename); + *(filename_withoutpath-1)=c; + fout=FOPEN_FUNC(write_filename,"wb"); + } + + if (fout==NULL) + { + printf("error opening %s\n",write_filename); + } + } + + if (fout!=NULL) + { + printf(" extracting: %s\n",write_filename); + + do + { + err = unzReadCurrentFile(uf,buf,size_buf); + if (err<0) + { + printf("error %d with zipfile in unzReadCurrentFile\n",err); + break; + } + if (err>0) + if (fwrite(buf,err,1,fout)!=1) + { + printf("error in writing extracted file\n"); + err=UNZ_ERRNO; + break; + } + } + while (err>0); + if (fout) + fclose(fout); + + if (err==0) + change_file_date(write_filename,file_info.dosDate, + file_info.tmu_date); + } + + if (err==UNZ_OK) + { + err = unzCloseCurrentFile (uf); + if (err!=UNZ_OK) + { + printf("error %d with zipfile in unzCloseCurrentFile\n",err); + } + } + else + unzCloseCurrentFile(uf); /* don't lose the error */ + } + + free(buf); + return err; +} + + +int do_extract(uf,opt_extract_without_path,opt_overwrite,password) + unzFile uf; + int opt_extract_without_path; + int opt_overwrite; + const char* password; +{ + uLong i; + unz_global_info64 gi; + int err; + FILE* fout=NULL; + + err = unzGetGlobalInfo64(uf,&gi); + if (err!=UNZ_OK) + printf("error %d with zipfile in unzGetGlobalInfo \n",err); + + for (i=0;i insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +miniunzip - uncompress and examine ZIP archives +.SH SYNOPSIS +.B miniunzip +.RI [ -exvlo ] +zipfile [ files_to_extract ] [-d tempdir] +.SH DESCRIPTION +.B minizip +is a simple tool which allows the extraction of compressed file +archives in the ZIP format used by the MS-DOS utility PKZIP. It was +written as a demonstration of the +.IR zlib (3) +library and therefore lack many of the features of the +.IR unzip (1) +program. +.SH OPTIONS +A number of options are supported. With the exception of +.BI \-d\ tempdir +these must be supplied before any +other arguments and are: +.TP +.BI \-l\ ,\ \-\-v +List the files in the archive without extracting them. +.TP +.B \-o +Overwrite files without prompting for confirmation. +.TP +.B \-x +Extract files (default). +.PP +The +.I zipfile +argument is the name of the archive to process. The next argument can be used +to specify a single file to extract from the archive. + +Lastly, the following option can be specified at the end of the command-line: +.TP +.BI \-d\ tempdir +Extract the archive in the directory +.I tempdir +rather than the current directory. +.SH SEE ALSO +.BR minizip (1), +.BR zlib (3), +.BR unzip (1). +.SH AUTHOR +This program was written by Gilles Vollant. This manual page was +written by Mark Brown . The -d tempdir option +was added by Dirk Eddelbuettel . diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.1 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.1 new file mode 100644 index 000000000..1154484c1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.1 @@ -0,0 +1,46 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH minizip 1 "May 2, 2001" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +minizip - create ZIP archives +.SH SYNOPSIS +.B minizip +.RI [ -o ] +zipfile [ " files" ... ] +.SH DESCRIPTION +.B minizip +is a simple tool which allows the creation of compressed file archives +in the ZIP format used by the MS-DOS utility PKZIP. It was written as +a demonstration of the +.IR zlib (3) +library and therefore lack many of the features of the +.IR zip (1) +program. +.SH OPTIONS +The first argument supplied is the name of the ZIP archive to create or +.RI -o +in which case it is ignored and the second argument treated as the +name of the ZIP file. If the ZIP file already exists it will be +overwritten. +.PP +Subsequent arguments specify a list of files to place in the ZIP +archive. If none are specified then an empty archive will be created. +.SH SEE ALSO +.BR miniunzip (1), +.BR zlib (3), +.BR zip (1). +.SH AUTHOR +This program was written by Gilles Vollant. This manual page was +written by Mark Brown . + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.c new file mode 100644 index 000000000..4288962ec --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.c @@ -0,0 +1,520 @@ +/* + minizip.c + Version 1.1, February 14h, 2010 + sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) +*/ + + +#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif +#endif + +#ifdef __APPLE__ +// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions +#define FOPEN_FUNC(filename, mode) fopen(filename, mode) +#define FTELLO_FUNC(stream) ftello(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) +#else +#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +#define FTELLO_FUNC(stream) ftello64(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) +#endif + + + +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +# include +# include +#else +# include +# include +# include +# include +#endif + +#include "zip.h" + +#ifdef _WIN32 + #define USEWIN32IOAPI + #include "iowin32.h" +#endif + + + +#define WRITEBUFFERSIZE (16384) +#define MAXFILENAME (256) + +#ifdef _WIN32 +uLong filetime(f, tmzip, dt) + char *f; /* name of file to get info on */ + tm_zip *tmzip; /* return value: access, modific. and creation times */ + uLong *dt; /* dostime */ +{ + int ret = 0; + { + FILETIME ftLocal; + HANDLE hFind; + WIN32_FIND_DATAA ff32; + + hFind = FindFirstFileA(f,&ff32); + if (hFind != INVALID_HANDLE_VALUE) + { + FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal); + FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0); + FindClose(hFind); + ret = 1; + } + } + return ret; +} +#else +#ifdef unix || __APPLE__ +uLong filetime(f, tmzip, dt) + char *f; /* name of file to get info on */ + tm_zip *tmzip; /* return value: access, modific. and creation times */ + uLong *dt; /* dostime */ +{ + int ret=0; + struct stat s; /* results of stat() */ + struct tm* filedate; + time_t tm_t=0; + + if (strcmp(f,"-")!=0) + { + char name[MAXFILENAME+1]; + int len = strlen(f); + if (len > MAXFILENAME) + len = MAXFILENAME; + + strncpy(name, f,MAXFILENAME-1); + /* strncpy doesnt append the trailing NULL, of the string is too long. */ + name[ MAXFILENAME ] = '\0'; + + if (name[len - 1] == '/') + name[len - 1] = '\0'; + /* not all systems allow stat'ing a file with / appended */ + if (stat(name,&s)==0) + { + tm_t = s.st_mtime; + ret = 1; + } + } + filedate = localtime(&tm_t); + + tmzip->tm_sec = filedate->tm_sec; + tmzip->tm_min = filedate->tm_min; + tmzip->tm_hour = filedate->tm_hour; + tmzip->tm_mday = filedate->tm_mday; + tmzip->tm_mon = filedate->tm_mon ; + tmzip->tm_year = filedate->tm_year; + + return ret; +} +#else +uLong filetime(f, tmzip, dt) + char *f; /* name of file to get info on */ + tm_zip *tmzip; /* return value: access, modific. and creation times */ + uLong *dt; /* dostime */ +{ + return 0; +} +#endif +#endif + + + + +int check_exist_file(filename) + const char* filename; +{ + FILE* ftestexist; + int ret = 1; + ftestexist = FOPEN_FUNC(filename,"rb"); + if (ftestexist==NULL) + ret = 0; + else + fclose(ftestexist); + return ret; +} + +void do_banner() +{ + printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n"); + printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n"); +} + +void do_help() +{ + printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \ + " -o Overwrite existing file.zip\n" \ + " -a Append to existing file.zip\n" \ + " -0 Store only\n" \ + " -1 Compress faster\n" \ + " -9 Compress better\n\n" \ + " -j exclude path. store only the file name.\n\n"); +} + +/* calculate the CRC32 of a file, + because to encrypt a file, we need known the CRC32 of the file before */ +int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc) +{ + unsigned long calculate_crc=0; + int err=ZIP_OK; + FILE * fin = FOPEN_FUNC(filenameinzip,"rb"); + + unsigned long size_read = 0; + unsigned long total_read = 0; + if (fin==NULL) + { + err = ZIP_ERRNO; + } + + if (err == ZIP_OK) + do + { + err = ZIP_OK; + size_read = (int)fread(buf,1,size_buf,fin); + if (size_read < size_buf) + if (feof(fin)==0) + { + printf("error in reading %s\n",filenameinzip); + err = ZIP_ERRNO; + } + + if (size_read>0) + calculate_crc = crc32(calculate_crc,buf,size_read); + total_read += size_read; + + } while ((err == ZIP_OK) && (size_read>0)); + + if (fin) + fclose(fin); + + *result_crc=calculate_crc; + printf("file %s crc %lx\n", filenameinzip, calculate_crc); + return err; +} + +int isLargeFile(const char* filename) +{ + int largeFile = 0; + ZPOS64_T pos = 0; + FILE* pFile = FOPEN_FUNC(filename, "rb"); + + if(pFile != NULL) + { + int n = FSEEKO_FUNC(pFile, 0, SEEK_END); + pos = FTELLO_FUNC(pFile); + + printf("File : %s is %lld bytes\n", filename, pos); + + if(pos >= 0xffffffff) + largeFile = 1; + + fclose(pFile); + } + + return largeFile; +} + +int main(argc,argv) + int argc; + char *argv[]; +{ + int i; + int opt_overwrite=0; + int opt_compress_level=Z_DEFAULT_COMPRESSION; + int opt_exclude_path=0; + int zipfilenamearg = 0; + char filename_try[MAXFILENAME+16]; + int zipok; + int err=0; + int size_buf=0; + void* buf=NULL; + const char* password=NULL; + + + do_banner(); + if (argc==1) + { + do_help(); + return 0; + } + else + { + for (i=1;i='0') && (c<='9')) + opt_compress_level = c-'0'; + if ((c=='j') || (c=='J')) + opt_exclude_path = 1; + + if (((c=='p') || (c=='P')) && (i+1='a') && (rep<='z')) + rep -= 0x20; + } + while ((rep!='Y') && (rep!='N') && (rep!='A')); + if (rep=='N') + zipok = 0; + if (rep=='A') + opt_overwrite = 2; + } + } + + if (zipok==1) + { + zipFile zf; + int errclose; +# ifdef USEWIN32IOAPI + zlib_filefunc64_def ffunc; + fill_win32_filefunc64A(&ffunc); + zf = zipOpen2_64(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc); +# else + zf = zipOpen64(filename_try,(opt_overwrite==2) ? 2 : 0); +# endif + + if (zf == NULL) + { + printf("error opening %s\n",filename_try); + err= ZIP_ERRNO; + } + else + printf("creating %s\n",filename_try); + + for (i=zipfilenamearg+1;(i='0') || (argv[i][1]<='9'))) && + (strlen(argv[i]) == 2))) + { + FILE * fin; + int size_read; + const char* filenameinzip = argv[i]; + const char *savefilenameinzip; + zip_fileinfo zi; + unsigned long crcFile=0; + int zip64 = 0; + + zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour = + zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0; + zi.dosDate = 0; + zi.internal_fa = 0; + zi.external_fa = 0; + filetime(filenameinzip,&zi.tmz_date,&zi.dosDate); + +/* + err = zipOpenNewFileInZip(zf,filenameinzip,&zi, + NULL,0,NULL,0,NULL / * comment * /, + (opt_compress_level != 0) ? Z_DEFLATED : 0, + opt_compress_level); +*/ + if ((password != NULL) && (err==ZIP_OK)) + err = getFileCrc(filenameinzip,buf,size_buf,&crcFile); + + zip64 = isLargeFile(filenameinzip); + + /* The path name saved, should not include a leading slash. */ + /*if it did, windows/xp and dynazip couldn't read the zip file. */ + savefilenameinzip = filenameinzip; + while( savefilenameinzip[0] == '\\' || savefilenameinzip[0] == '/' ) + { + savefilenameinzip++; + } + + /*should the zip file contain any path at all?*/ + if( opt_exclude_path ) + { + const char *tmpptr; + const char *lastslash = 0; + for( tmpptr = savefilenameinzip; *tmpptr; tmpptr++) + { + if( *tmpptr == '\\' || *tmpptr == '/') + { + lastslash = tmpptr; + } + } + if( lastslash != NULL ) + { + savefilenameinzip = lastslash+1; // base filename follows last slash. + } + } + + /**/ + err = zipOpenNewFileInZip3_64(zf,savefilenameinzip,&zi, + NULL,0,NULL,0,NULL /* comment*/, + (opt_compress_level != 0) ? Z_DEFLATED : 0, + opt_compress_level,0, + /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */ + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + password,crcFile, zip64); + + if (err != ZIP_OK) + printf("error in opening %s in zipfile\n",filenameinzip); + else + { + fin = FOPEN_FUNC(filenameinzip,"rb"); + if (fin==NULL) + { + err=ZIP_ERRNO; + printf("error in opening %s for reading\n",filenameinzip); + } + } + + if (err == ZIP_OK) + do + { + err = ZIP_OK; + size_read = (int)fread(buf,1,size_buf,fin); + if (size_read < size_buf) + if (feof(fin)==0) + { + printf("error in reading %s\n",filenameinzip); + err = ZIP_ERRNO; + } + + if (size_read>0) + { + err = zipWriteInFileInZip (zf,buf,size_read); + if (err<0) + { + printf("error in writing %s in the zipfile\n", + filenameinzip); + } + + } + } while ((err == ZIP_OK) && (size_read>0)); + + if (fin) + fclose(fin); + + if (err<0) + err=ZIP_ERRNO; + else + { + err = zipCloseFileInZip(zf); + if (err!=ZIP_OK) + printf("error in closing %s in the zipfile\n", + filenameinzip); + } + } + } + errclose = zipClose(zf,NULL); + if (errclose != ZIP_OK) + printf("error in closing %s\n",filename_try); + } + else + { + do_help(); + } + + free(buf); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.pc.in b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.pc.in new file mode 100644 index 000000000..69b5b7fdc --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/minizip.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/minizip + +Name: minizip +Description: Minizip zip file manipulation library +Requires: +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lminizip +Libs.private: -lz +Cflags: -I${includedir} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.c new file mode 100644 index 000000000..96891c2e0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.c @@ -0,0 +1,291 @@ +/* + Additional tools for Minizip + Code: Xavier Roche '2004 + License: Same as ZLIB (www.gzip.org) +*/ + +/* Code */ +#include +#include +#include +#include "zlib.h" +#include "unzip.h" + +#define READ_8(adr) ((unsigned char)*(adr)) +#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) +#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) + +#define WRITE_8(buff, n) do { \ + *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ +} while(0) +#define WRITE_16(buff, n) do { \ + WRITE_8((unsigned char*)(buff), n); \ + WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ +} while(0) +#define WRITE_32(buff, n) do { \ + WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ + WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ +} while(0) + +extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) +const char* file; +const char* fileOut; +const char* fileOutTmp; +uLong* nRecovered; +uLong* bytesRecovered; +{ + int err = Z_OK; + FILE* fpZip = fopen(file, "rb"); + FILE* fpOut = fopen(fileOut, "wb"); + FILE* fpOutCD = fopen(fileOutTmp, "wb"); + if (fpZip != NULL && fpOut != NULL) { + int entries = 0; + uLong totalBytes = 0; + char header[30]; + char filename[1024]; + char extra[1024]; + int offset = 0; + int offsetCD = 0; + while ( fread(header, 1, 30, fpZip) == 30 ) { + int currentOffset = offset; + + /* File entry */ + if (READ_32(header) == 0x04034b50) { + unsigned int version = READ_16(header + 4); + unsigned int gpflag = READ_16(header + 6); + unsigned int method = READ_16(header + 8); + unsigned int filetime = READ_16(header + 10); + unsigned int filedate = READ_16(header + 12); + unsigned int crc = READ_32(header + 14); /* crc */ + unsigned int cpsize = READ_32(header + 18); /* compressed size */ + unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ + unsigned int fnsize = READ_16(header + 26); /* file name length */ + unsigned int extsize = READ_16(header + 28); /* extra field length */ + filename[0] = extra[0] = '\0'; + + /* Header */ + if (fwrite(header, 1, 30, fpOut) == 30) { + offset += 30; + } else { + err = Z_ERRNO; + break; + } + + /* Filename */ + if (fnsize > 0) { + if (fnsize < sizeof(filename)) { + if (fread(filename, 1, fnsize, fpZip) == fnsize) { + if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { + offset += fnsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_STREAM_ERROR; + break; + } + + /* Extra field */ + if (extsize > 0) { + if (extsize < sizeof(extra)) { + if (fread(extra, 1, extsize, fpZip) == extsize) { + if (fwrite(extra, 1, extsize, fpOut) == extsize) { + offset += extsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } + + /* Data */ + { + int dataSize = cpsize; + if (dataSize == 0) { + dataSize = uncpsize; + } + if (dataSize > 0) { + char* data = malloc(dataSize); + if (data != NULL) { + if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { + if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { + offset += dataSize; + totalBytes += dataSize; + } else { + err = Z_ERRNO; + } + } else { + err = Z_ERRNO; + } + free(data); + if (err != Z_OK) { + break; + } + } else { + err = Z_MEM_ERROR; + break; + } + } + } + + /* Central directory entry */ + { + char header[46]; + char* comment = ""; + int comsize = (int) strlen(comment); + WRITE_32(header, 0x02014b50); + WRITE_16(header + 4, version); + WRITE_16(header + 6, version); + WRITE_16(header + 8, gpflag); + WRITE_16(header + 10, method); + WRITE_16(header + 12, filetime); + WRITE_16(header + 14, filedate); + WRITE_32(header + 16, crc); + WRITE_32(header + 20, cpsize); + WRITE_32(header + 24, uncpsize); + WRITE_16(header + 28, fnsize); + WRITE_16(header + 30, extsize); + WRITE_16(header + 32, comsize); + WRITE_16(header + 34, 0); /* disk # */ + WRITE_16(header + 36, 0); /* int attrb */ + WRITE_32(header + 38, 0); /* ext attrb */ + WRITE_32(header + 42, currentOffset); + /* Header */ + if (fwrite(header, 1, 46, fpOutCD) == 46) { + offsetCD += 46; + + /* Filename */ + if (fnsize > 0) { + if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { + offsetCD += fnsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_STREAM_ERROR; + break; + } + + /* Extra field */ + if (extsize > 0) { + if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { + offsetCD += extsize; + } else { + err = Z_ERRNO; + break; + } + } + + /* Comment field */ + if (comsize > 0) { + if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { + offsetCD += comsize; + } else { + err = Z_ERRNO; + break; + } + } + + + } else { + err = Z_ERRNO; + break; + } + } + + /* Success */ + entries++; + + } else { + break; + } + } + + /* Final central directory */ + { + int entriesZip = entries; + char header[22]; + char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; + int comsize = (int) strlen(comment); + if (entriesZip > 0xffff) { + entriesZip = 0xffff; + } + WRITE_32(header, 0x06054b50); + WRITE_16(header + 4, 0); /* disk # */ + WRITE_16(header + 6, 0); /* disk # */ + WRITE_16(header + 8, entriesZip); /* hack */ + WRITE_16(header + 10, entriesZip); /* hack */ + WRITE_32(header + 12, offsetCD); /* size of CD */ + WRITE_32(header + 16, offset); /* offset to CD */ + WRITE_16(header + 20, comsize); /* comment */ + + /* Header */ + if (fwrite(header, 1, 22, fpOutCD) == 22) { + + /* Comment field */ + if (comsize > 0) { + if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { + err = Z_ERRNO; + } + } + + } else { + err = Z_ERRNO; + } + } + + /* Final merge (file + central directory) */ + fclose(fpOutCD); + if (err == Z_OK) { + fpOutCD = fopen(fileOutTmp, "rb"); + if (fpOutCD != NULL) { + int nRead; + char buffer[8192]; + while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { + if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { + err = Z_ERRNO; + break; + } + } + fclose(fpOutCD); + } + } + + /* Close */ + fclose(fpZip); + fclose(fpOut); + + /* Wipe temporary file */ + (void)remove(fileOutTmp); + + /* Number of recovered entries */ + if (err == Z_OK) { + if (nRecovered != NULL) { + *nRecovered = entries; + } + if (bytesRecovered != NULL) { + *bytesRecovered = totalBytes; + } + } + } else { + err = Z_STREAM_ERROR; + } + return err; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.h new file mode 100644 index 000000000..a49a426ec --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/mztools.h @@ -0,0 +1,37 @@ +/* + Additional tools for Minizip + Code: Xavier Roche '2004 + License: Same as ZLIB (www.gzip.org) +*/ + +#ifndef _zip_tools_H +#define _zip_tools_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#include "unzip.h" + +/* Repair a ZIP file (missing central directory) + file: file to recover + fileOut: output file after recovery + fileOutTmp: temporary file name used for recovery +*/ +extern int ZEXPORT unzRepair(const char* file, + const char* fileOut, + const char* fileOutTmp, + uLong* nRecovered, + uLong* bytesRecovered); + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.c new file mode 100644 index 000000000..bcfb9416e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.c @@ -0,0 +1,2125 @@ +/* unzip.c -- IO for uncompress .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + + ------------------------------------------------------------------------------------ + Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of + compatibility with older software. The following is from the original crypt.c. + Code woven in by Terry Thorsen 1/2003. + + Copyright (c) 1990-2000 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in zip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html + + crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + + ------------------------------------------------------------------------------------ + + Changes in unzip.c + + 2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos + 2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz* + 2007-2008 - Even Rouault - Remove old C style function prototypes + 2007-2008 - Even Rouault - Add unzip support for ZIP64 + + Copyright (C) 2007-2008 Even Rouault + + + Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). + Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G + should only read the compressed/uncompressed size from the Zip64 format if + the size from normal header was 0xFFFFFFFF + Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant + Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required) + Patch created by Daniel Borca + + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer + + Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson + +*/ + + +#include +#include +#include + +#ifndef NOUNCRYPT + #define NOUNCRYPT +#endif + +#include "zlib.h" +#include "unzip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + + +#ifndef CASESENSITIVITYDEFAULT_NO +# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) +# define CASESENSITIVITYDEFAULT_NO +# endif +#endif + + +#ifndef UNZ_BUFSIZE +#define UNZ_BUFSIZE (16384) +#endif + +#ifndef UNZ_MAXFILENAMEINZIP +#define UNZ_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) + + +const char unz_copyright[] = + " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + +/* unz_file_info_interntal contain internal info about a file in zipfile*/ +typedef struct unz_file_info64_internal_s +{ + ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ +} unz_file_info64_internal; + + +/* file_in_zip_read_info_s contain internal information about a file in zipfile, + when reading and decompress it */ +typedef struct +{ + char *read_buffer; /* internal buffer for compressed data */ + z_stream stream; /* zLib stream structure for inflate */ + +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + + ZPOS64_T pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ + uLong stream_initialised; /* flag set if stream structure is initialised*/ + + ZPOS64_T offset_local_extrafield;/* offset of the local extra field */ + uInt size_local_extrafield;/* size of the local extra field */ + ZPOS64_T pos_local_extrafield; /* position in the local extra field in read*/ + ZPOS64_T total_out_64; + + uLong crc32; /* crc32 of all data uncompressed */ + uLong crc32_wait; /* crc32 we must obtain after decompress all */ + ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */ + ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/ + zlib_filefunc64_32_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + uLong compression_method; /* compression method (0==store) */ + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + int raw; +} file_in_zip64_read_info_s; + + +/* unz64_s contain internal information about the zipfile +*/ +typedef struct +{ + zlib_filefunc64_32_def z_filefunc; + int is64bitOpenFunction; + voidpf filestream; /* io structore of the zipfile */ + unz_global_info64 gi; /* public global information */ + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + ZPOS64_T num_file; /* number of the current file in the zipfile*/ + ZPOS64_T pos_in_central_dir; /* pos of the current file in the central dir*/ + ZPOS64_T current_file_ok; /* flag about the usability of the current file*/ + ZPOS64_T central_pos; /* position of the beginning of the central dir*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory with + respect to the starting disk number */ + + unz_file_info64 cur_file_info; /* public info about the current file in zip*/ + unz_file_info64_internal cur_file_info_internal; /* private info about it*/ + file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current + file if we are decompressing it */ + int encrypted; + + int isZip64; + +# ifndef NOUNCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const z_crc_t* pcrc_32_tab; +# endif +} unz64_s; + + +#ifndef NOUNCRYPT +#include "crypt.h" +#endif + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been successfully opened for reading. +*/ + + +local int unz64local_getByte OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + int *pi)); + +local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi) +{ + unsigned char c; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return UNZ_OK; + } + else + { + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return UNZ_ERRNO; + else + return UNZ_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int unz64local_getShort OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) +{ + uLong x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<8; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int unz64local_getLong OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) +{ + uLong x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<8; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<16; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int unz64local_getLong64 OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX)); + + +local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX) +{ + ZPOS64_T x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<8; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<16; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<24; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<32; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<40; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<48; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<56; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +/* My own strcmpi / strcasecmp */ +local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2) +{ + for (;;) + { + char c1=*(fileName1++); + char c2=*(fileName2++); + if ((c1>='a') && (c1<='z')) + c1 -= 0x20; + if ((c2>='a') && (c2<='z')) + c2 -= 0x20; + if (c1=='\0') + return ((c2=='\0') ? 0 : -1); + if (c2=='\0') + return 1; + if (c1c2) + return 1; + } +} + + +#ifdef CASESENSITIVITYDEFAULT_NO +#define CASESENSITIVITYDEFAULTVALUE 2 +#else +#define CASESENSITIVITYDEFAULTVALUE 1 +#endif + +#ifndef STRCMPCASENOSENTIVEFUNCTION +#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal +#endif + +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) + +*/ +extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, + const char* fileName2, + int iCaseSensitivity) + +{ + if (iCaseSensitivity==0) + iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; + + if (iCaseSensitivity==1) + return strcmp(fileName1,fileName2); + + return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif + +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); +local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + + +/* + Locate the Central directory 64 of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T unz64local_SearchCentralDir64 OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream)); + +local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + uLong uL; + ZPOS64_T relativeOffset; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + if (uPosFound == 0) + return 0; + + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK) + return 0; + + /* total number of disks */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + if (uL != 1) + return 0; + + /* Goto end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + + if (uL != 0x06064b50) + return 0; + + return relativeOffset; +} + +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer + "zlib/zlib114.zip". + If the zipfile cannot be opened (file doesn't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ +local unzFile unzOpenInternal (const void *path, + zlib_filefunc64_32_def* pzlib_filefunc64_32_def, + int is64bitOpenFunction) +{ + unz64_s us; + unz64_s *s; + ZPOS64_T central_pos; + uLong uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + ZPOS64_T number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + + int err=UNZ_OK; + + if (unz_copyright[0]!=' ') + return NULL; + + us.z_filefunc.zseek32_file = NULL; + us.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); + else + us.z_filefunc = *pzlib_filefunc64_32_def; + us.is64bitOpenFunction = is64bitOpenFunction; + + + + us.filestream = ZOPEN64(us.z_filefunc, + path, + ZLIB_FILEFUNC_MODE_READ | + ZLIB_FILEFUNC_MODE_EXISTING); + if (us.filestream==NULL) + return NULL; + + central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream); + if (central_pos) + { + uLong uS; + ZPOS64_T uL64; + + us.isZip64 = 1; + + if (ZSEEK64(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* size of zip64 end of central directory record */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK) + err=UNZ_ERRNO; + + /* version made by */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) + err=UNZ_ERRNO; + + /* version needed to extract */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central directory on this disk */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central directory */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + us.gi.size_comment = 0; + } + else + { + central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream); + if (central_pos==0) + err=UNZ_ERRNO; + + us.isZip64 = 0; + + if (ZSEEK64(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.gi.number_entry = uL; + + /* total number of entries in the central dir */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + number_entry_CD = uL; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.size_central_dir = uL; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.offset_central_dir = uL; + + /* zipfile comment length */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) + err=UNZ_ERRNO; + } + + if ((central_pospfile_in_zip_read!=NULL) + unzCloseCurrentFile(file); + + ZCLOSE64(s->z_filefunc, s->filestream); + TRYFREE(s); + return UNZ_OK; +} + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ +extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info) +{ + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + *pglobal_info=s->gi; + return UNZ_OK; +} + +extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32) +{ + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + /* to do : check if number_entry is not truncated */ + pglobal_info32->number_entry = (uLong)s->gi.number_entry; + pglobal_info32->size_comment = s->gi.size_comment; + return UNZ_OK; +} +/* + Translate date/time from Dos format to tm_unz (readable more easilty) +*/ +local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) +{ + ZPOS64_T uDate; + uDate = (ZPOS64_T)(ulDosDate>>16); + ptm->tm_mday = (uInt)(uDate&0x1f) ; + ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; + ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; + + ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); + ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; + ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; +} + +/* + Get Info about the current file in the zipfile, with internal only info +*/ +local int unz64local_GetCurrentFileInfoInternal OF((unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + +local int unz64local_GetCurrentFileInfoInternal (unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize) +{ + unz64_s* s; + unz_file_info64 file_info; + unz_file_info64_internal file_info_internal; + int err=UNZ_OK; + uLong uMagic; + long lSeek=0; + uLong uL; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (ZSEEK64(s->z_filefunc, s->filestream, + s->pos_in_central_dir+s->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + + /* we check the magic */ + if (err==UNZ_OK) + { + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x02014b50) + err=UNZ_BADZIPFILE; + } + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) + err=UNZ_ERRNO; + + unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + file_info.compressed_size = uL; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + file_info.uncompressed_size = uL; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) + err=UNZ_ERRNO; + + // relative offset of local header + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + file_info_internal.offset_curfile = uL; + + lSeek+=file_info.size_filename; + if ((err==UNZ_OK) && (szFileName!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_filename0) && (fileNameBufferSize>0)) + if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek -= uSizeRead; + } + + // Read extrafield + if ((err==UNZ_OK) && (extraField!=NULL)) + { + ZPOS64_T uSizeRead ; + if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) + if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + + lSeek += file_info.size_file_extra - (uLong)uSizeRead; + } + else + lSeek += file_info.size_file_extra; + + + if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) + { + uLong acc = 0; + + // since lSeek now points to after the extra field we need to move back + lSeek -= file_info.size_file_extra; + + if (lSeek!=0) + { + if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + + while(acc < file_info.size_file_extra) + { + uLong headerId; + uLong dataSize; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK) + err=UNZ_ERRNO; + + /* ZIP64 extra fields */ + if (headerId == 0x0001) + { + uLong uL; + + if(file_info.uncompressed_size == MAXU32) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.compressed_size == MAXU32) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info_internal.offset_curfile == MAXU32) + { + /* Relative Header offset */ + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.disk_num_start == MAXU32) + { + /* Disk Start Number */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + } + + } + else + { + if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0) + err=UNZ_ERRNO; + } + + acc += 2 + 2 + dataSize; + } + } + + if ((err==UNZ_OK) && (szComment!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) + if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek+=file_info.size_file_comment - uSizeRead; + } + else + lSeek+=file_info.size_file_comment; + + + if ((err==UNZ_OK) && (pfile_info!=NULL)) + *pfile_info=file_info; + + if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) + *pfile_info_internal=file_info_internal; + + return err; +} + + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. +*/ +extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file, + unz_file_info64 * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) +{ + return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); +} + +extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, + unz_file_info * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) +{ + int err; + unz_file_info64 file_info64; + err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); + if ((err==UNZ_OK) && (pfile_info != NULL)) + { + pfile_info->version = file_info64.version; + pfile_info->version_needed = file_info64.version_needed; + pfile_info->flag = file_info64.flag; + pfile_info->compression_method = file_info64.compression_method; + pfile_info->dosDate = file_info64.dosDate; + pfile_info->crc = file_info64.crc; + + pfile_info->size_filename = file_info64.size_filename; + pfile_info->size_file_extra = file_info64.size_file_extra; + pfile_info->size_file_comment = file_info64.size_file_comment; + + pfile_info->disk_num_start = file_info64.disk_num_start; + pfile_info->internal_fa = file_info64.internal_fa; + pfile_info->external_fa = file_info64.external_fa; + + pfile_info->tmu_date = file_info64.tmu_date, + + + pfile_info->compressed_size = (uLong)file_info64.compressed_size; + pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size; + + } + return err; +} +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ +extern int ZEXPORT unzGoToFirstFile (unzFile file) +{ + int err=UNZ_OK; + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + s->pos_in_central_dir=s->offset_central_dir; + s->num_file=0; + err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ +extern int ZEXPORT unzGoToNextFile (unzFile file) +{ + unz64_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ + if (s->num_file+1==s->gi.number_entry) + return UNZ_END_OF_LIST_OF_FILE; + + s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; + s->num_file++; + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + + +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ +extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity) +{ + unz64_s* s; + int err; + + /* We remember the 'current' position in the file so that we can jump + * back there if we fail. + */ + unz_file_info64 cur_file_infoSaved; + unz_file_info64_internal cur_file_info_internalSaved; + ZPOS64_T num_fileSaved; + ZPOS64_T pos_in_central_dirSaved; + + + if (file==NULL) + return UNZ_PARAMERROR; + + if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) + return UNZ_PARAMERROR; + + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + /* Save the current state */ + num_fileSaved = s->num_file; + pos_in_central_dirSaved = s->pos_in_central_dir; + cur_file_infoSaved = s->cur_file_info; + cur_file_info_internalSaved = s->cur_file_info_internal; + + err = unzGoToFirstFile(file); + + while (err == UNZ_OK) + { + char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; + err = unzGetCurrentFileInfo64(file,NULL, + szCurrentFileName,sizeof(szCurrentFileName)-1, + NULL,0,NULL,0); + if (err == UNZ_OK) + { + if (unzStringFileNameCompare(szCurrentFileName, + szFileName,iCaseSensitivity)==0) + return UNZ_OK; + err = unzGoToNextFile(file); + } + } + + /* We failed, so restore the state of the 'current file' to where we + * were. + */ + s->num_file = num_fileSaved ; + s->pos_in_central_dir = pos_in_central_dirSaved ; + s->cur_file_info = cur_file_infoSaved; + s->cur_file_info_internal = cur_file_info_internalSaved; + return err; +} + + +/* +/////////////////////////////////////////// +// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) +// I need random access +// +// Further optimization could be realized by adding an ability +// to cache the directory in memory. The goal being a single +// comprehensive file read to put the file I need in a memory. +*/ + +/* +typedef struct unz_file_pos_s +{ + ZPOS64_T pos_in_zip_directory; // offset in file + ZPOS64_T num_of_file; // # of file +} unz_file_pos; +*/ + +extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) +{ + unz64_s* s; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + file_pos->pos_in_zip_directory = s->pos_in_central_dir; + file_pos->num_of_file = s->num_file; + + return UNZ_OK; +} + +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos) +{ + unz64_file_pos file_pos64; + int err = unzGetFilePos64(file,&file_pos64); + if (err==UNZ_OK) + { + file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory; + file_pos->num_of_file = (uLong)file_pos64.num_of_file; + } + return err; +} + +extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) +{ + unz64_s* s; + int err; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + + /* jump to the right spot */ + s->pos_in_central_dir = file_pos->pos_in_zip_directory; + s->num_file = file_pos->num_of_file; + + /* set the current file */ + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + /* return results */ + s->current_file_ok = (err == UNZ_OK); + return err; +} + +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos) +{ + unz64_file_pos file_pos64; + if (file_pos == NULL) + return UNZ_PARAMERROR; + + file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory; + file_pos64.num_of_file = file_pos->num_of_file; + return unzGoToFilePos64(file,&file_pos64); +} + +/* +// Unzip Helper Functions - should be here? +/////////////////////////////////////////// +*/ + +/* + Read the local header of the current zipfile + Check the coherency of the local header and info in the end of central + directory about this file + store in *piSizeVar the size of extra info in local header + (filename and size of extra field data) +*/ +local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar, + ZPOS64_T * poffset_local_extrafield, + uInt * psize_local_extrafield) +{ + uLong uMagic,uData,uFlags; + uLong size_filename; + uLong size_extra_field; + int err=UNZ_OK; + + *piSizeVar = 0; + *poffset_local_extrafield = 0; + *psize_local_extrafield = 0; + + if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + + if (err==UNZ_OK) + { + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x04034b50) + err=UNZ_BADZIPFILE; + } + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; +/* + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) + err=UNZ_BADZIPFILE; +*/ + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) + err=UNZ_BADZIPFILE; + + if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && +/* #ifdef HAVE_BZIP2 */ + (s->cur_file_info.compression_method!=Z_BZIP2ED) && +/* #endif */ + (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ + err=UNZ_ERRNO; + else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ + err=UNZ_ERRNO; + else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) + err=UNZ_BADZIPFILE; + + *piSizeVar += (uInt)size_filename; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) + err=UNZ_ERRNO; + *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + + SIZEZIPLOCALHEADER + size_filename; + *psize_local_extrafield = (uInt)size_extra_field; + + *piSizeVar += (uInt)size_extra_field; + + return err; +} + +/* + Open for reading data the current file in the zipfile. + If there is no error and the file is opened, the return value is UNZ_OK. +*/ +extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, + int* level, int raw, const char* password) +{ + int err=UNZ_OK; + uInt iSizeVar; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + ZPOS64_T offset_local_extrafield; /* offset of the local extra field */ + uInt size_local_extrafield; /* size of the local extra field */ +# ifndef NOUNCRYPT + char source[12]; +# else + if (password != NULL) + return UNZ_PARAMERROR; +# endif + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_PARAMERROR; + + if (s->pfile_in_zip_read != NULL) + unzCloseCurrentFile(file); + + if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) + return UNZ_BADZIPFILE; + + pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s)); + if (pfile_in_zip_read_info==NULL) + return UNZ_INTERNALERROR; + + pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); + pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; + pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; + pfile_in_zip_read_info->pos_local_extrafield=0; + pfile_in_zip_read_info->raw=raw; + + if (pfile_in_zip_read_info->read_buffer==NULL) + { + TRYFREE(pfile_in_zip_read_info); + return UNZ_INTERNALERROR; + } + + pfile_in_zip_read_info->stream_initialised=0; + + if (method!=NULL) + *method = (int)s->cur_file_info.compression_method; + + if (level!=NULL) + { + *level = 6; + switch (s->cur_file_info.flag & 0x06) + { + case 6 : *level = 1; break; + case 4 : *level = 2; break; + case 2 : *level = 9; break; + } + } + + if ((s->cur_file_info.compression_method!=0) && +/* #ifdef HAVE_BZIP2 */ + (s->cur_file_info.compression_method!=Z_BZIP2ED) && +/* #endif */ + (s->cur_file_info.compression_method!=Z_DEFLATED)) + + err=UNZ_BADZIPFILE; + + pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; + pfile_in_zip_read_info->crc32=0; + pfile_in_zip_read_info->total_out_64=0; + pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; + pfile_in_zip_read_info->filestream=s->filestream; + pfile_in_zip_read_info->z_filefunc=s->z_filefunc; + pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; + + pfile_in_zip_read_info->stream.total_out = 0; + + if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw)) + { +#ifdef HAVE_BZIP2 + pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0; + pfile_in_zip_read_info->bstream.bzfree = (free_func)0; + pfile_in_zip_read_info->bstream.opaque = (voidpf)0; + pfile_in_zip_read_info->bstream.state = (voidpf)0; + + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = (voidpf)0; + pfile_in_zip_read_info->stream.avail_in = 0; + + err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } +#else + pfile_in_zip_read_info->raw=1; +#endif + } + else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) + { + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = 0; + pfile_in_zip_read_info->stream.avail_in = 0; + + err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=Z_DEFLATED; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. + * In unzip, i don't wait absolutely Z_STREAM_END because I known the + * size of both compressed and uncompressed data + */ + } + pfile_in_zip_read_info->rest_read_compressed = + s->cur_file_info.compressed_size ; + pfile_in_zip_read_info->rest_read_uncompressed = + s->cur_file_info.uncompressed_size ; + + + pfile_in_zip_read_info->pos_in_zipfile = + s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + + iSizeVar; + + pfile_in_zip_read_info->stream.avail_in = (uInt)0; + + s->pfile_in_zip_read = pfile_in_zip_read_info; + s->encrypted = 0; + +# ifndef NOUNCRYPT + if (password != NULL) + { + int i; + s->pcrc_32_tab = get_crc_table(); + init_keys(password,s->keys,s->pcrc_32_tab); + if (ZSEEK64(s->z_filefunc, s->filestream, + s->pfile_in_zip_read->pos_in_zipfile + + s->pfile_in_zip_read->byte_before_the_zipfile, + SEEK_SET)!=0) + return UNZ_INTERNALERROR; + if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12) + return UNZ_INTERNALERROR; + + for (i = 0; i<12; i++) + zdecode(s->keys,s->pcrc_32_tab,source[i]); + + s->pfile_in_zip_read->pos_in_zipfile+=12; + s->encrypted=1; + } +# endif + + + return UNZ_OK; +} + +extern int ZEXPORT unzOpenCurrentFile (unzFile file) +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); +} + +extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password) +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, password); +} + +extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw) +{ + return unzOpenCurrentFile3(file, method, level, raw, NULL); +} + +/** Addition for GDAL : START */ + +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + s=(unz64_s*)file; + if (file==NULL) + return 0; //UNZ_PARAMERROR; + pfile_in_zip_read_info=s->pfile_in_zip_read; + if (pfile_in_zip_read_info==NULL) + return 0; //UNZ_PARAMERROR; + return pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile; +} + +/** Addition for GDAL : END */ + +/* + Read bytes from the current file. + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ +extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) +{ + int err=UNZ_OK; + uInt iRead = 0; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if (pfile_in_zip_read_info->read_buffer == NULL) + return UNZ_END_OF_LIST_OF_FILE; + if (len==0) + return 0; + + pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; + + pfile_in_zip_read_info->stream.avail_out = (uInt)len; + + if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && + (!(pfile_in_zip_read_info->raw))) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_uncompressed; + + if ((len>pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in) && + (pfile_in_zip_read_info->raw)) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in; + + while (pfile_in_zip_read_info->stream.avail_out>0) + { + if ((pfile_in_zip_read_info->stream.avail_in==0) && + (pfile_in_zip_read_info->rest_read_compressed>0)) + { + uInt uReadThis = UNZ_BUFSIZE; + if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; + if (uReadThis == 0) + return UNZ_EOF; + if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + if (ZREAD64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->read_buffer, + uReadThis)!=uReadThis) + return UNZ_ERRNO; + + +# ifndef NOUNCRYPT + if(s->encrypted) + { + uInt i; + for(i=0;iread_buffer[i] = + zdecode(s->keys,s->pcrc_32_tab, + pfile_in_zip_read_info->read_buffer[i]); + } +# endif + + + pfile_in_zip_read_info->pos_in_zipfile += uReadThis; + + pfile_in_zip_read_info->rest_read_compressed-=uReadThis; + + pfile_in_zip_read_info->stream.next_in = + (Bytef*)pfile_in_zip_read_info->read_buffer; + pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; + } + + if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) + { + uInt uDoCopy,i ; + + if ((pfile_in_zip_read_info->stream.avail_in == 0) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + return (iRead==0) ? UNZ_EOF : iRead; + + if (pfile_in_zip_read_info->stream.avail_out < + pfile_in_zip_read_info->stream.avail_in) + uDoCopy = pfile_in_zip_read_info->stream.avail_out ; + else + uDoCopy = pfile_in_zip_read_info->stream.avail_in ; + + for (i=0;istream.next_out+i) = + *(pfile_in_zip_read_info->stream.next_in+i); + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy; + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, + pfile_in_zip_read_info->stream.next_out, + uDoCopy); + pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; + pfile_in_zip_read_info->stream.avail_in -= uDoCopy; + pfile_in_zip_read_info->stream.avail_out -= uDoCopy; + pfile_in_zip_read_info->stream.next_out += uDoCopy; + pfile_in_zip_read_info->stream.next_in += uDoCopy; + pfile_in_zip_read_info->stream.total_out += uDoCopy; + iRead += uDoCopy; + } + else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED) + { +#ifdef HAVE_BZIP2 + uLong uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + uLong uOutThis; + + pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in; + pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in; + pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in; + pfile_in_zip_read_info->bstream.total_in_hi32 = 0; + pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out; + pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out; + pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out; + pfile_in_zip_read_info->bstream.total_out_hi32 = 0; + + uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32; + bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out; + + err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream); + + uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); + pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in; + pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in; + pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32; + pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out; + pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out; + pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32; + + if (err==BZ_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=BZ_OK) + break; +#endif + } // end Z_BZIP2ED + else + { + ZPOS64_T uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + ZPOS64_T uOutThis; + int flush=Z_SYNC_FLUSH; + + uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; + bufBefore = pfile_in_zip_read_info->stream.next_out; + + /* + if ((pfile_in_zip_read_info->rest_read_uncompressed == + pfile_in_zip_read_info->stream.avail_out) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + flush = Z_FINISH; + */ + err=inflate(&pfile_in_zip_read_info->stream,flush); + + if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) + err = Z_DATA_ERROR; + + uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; + + pfile_in_zip_read_info->crc32 = + crc32(pfile_in_zip_read_info->crc32,bufBefore, + (uInt)(uOutThis)); + + pfile_in_zip_read_info->rest_read_uncompressed -= + uOutThis; + + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + if (err==Z_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=Z_OK) + break; + } + } + + if (err==Z_OK) + return iRead; + return err; +} + + +/* + Give the current position in uncompressed data +*/ +extern z_off_t ZEXPORT unztell (unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + return (z_off_t)pfile_in_zip_read_info->stream.total_out; +} + +extern ZPOS64_T ZEXPORT unztell64 (unzFile file) +{ + + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return (ZPOS64_T)-1; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return (ZPOS64_T)-1; + + return pfile_in_zip_read_info->total_out_64; +} + + +/* + return 1 if the end of file was reached, 0 elsewhere +*/ +extern int ZEXPORT unzeof (unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + if (pfile_in_zip_read_info->rest_read_uncompressed == 0) + return 1; + else + return 0; +} + + + +/* +Read extra field from the current file (opened by unzOpenCurrentFile) +This is the local-header version of the extra field (sometimes, there is +more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field that can be read + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ +extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + uInt read_now; + ZPOS64_T size_to_read; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + size_to_read = (pfile_in_zip_read_info->size_local_extrafield - + pfile_in_zip_read_info->pos_local_extrafield); + + if (buf==NULL) + return (int)size_to_read; + + if (len>size_to_read) + read_now = (uInt)size_to_read; + else + read_now = (uInt)len ; + + if (read_now==0) + return 0; + + if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->offset_local_extrafield + + pfile_in_zip_read_info->pos_local_extrafield, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (ZREAD64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + buf,read_now)!=read_now) + return UNZ_ERRNO; + + return (int)read_now; +} + +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ +extern int ZEXPORT unzCloseCurrentFile (unzFile file) +{ + int err=UNZ_OK; + + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && + (!pfile_in_zip_read_info->raw)) + { + if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) + err=UNZ_CRCERROR; + } + + + TRYFREE(pfile_in_zip_read_info->read_buffer); + pfile_in_zip_read_info->read_buffer = NULL; + if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) + inflateEnd(&pfile_in_zip_read_info->stream); +#ifdef HAVE_BZIP2 + else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED) + BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream); +#endif + + + pfile_in_zip_read_info->stream_initialised = 0; + TRYFREE(pfile_in_zip_read_info); + + s->pfile_in_zip_read=NULL; + + return err; +} + + +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ +extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf) +{ + unz64_s* s; + uLong uReadThis ; + if (file==NULL) + return (int)UNZ_PARAMERROR; + s=(unz64_s*)file; + + uReadThis = uSizeBuf; + if (uReadThis>s->gi.size_comment) + uReadThis = s->gi.size_comment; + + if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (uReadThis>0) + { + *szComment='\0'; + if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) + return UNZ_ERRNO; + } + + if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) + *(szComment+s->gi.size_comment)='\0'; + return (int)uReadThis; +} + +/* Additions by RX '2004 */ +extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) +{ + unz64_s* s; + + if (file==NULL) + return 0; //UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return 0; + if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) + if (s->num_file==s->gi.number_entry) + return 0; + return s->pos_in_central_dir; +} + +extern uLong ZEXPORT unzGetOffset (unzFile file) +{ + ZPOS64_T offset64; + + if (file==NULL) + return 0; //UNZ_PARAMERROR; + offset64 = unzGetOffset64(file); + return (uLong)offset64; +} + +extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) +{ + unz64_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + + s->pos_in_central_dir = pos; + s->num_file = s->gi.number_entry; /* hack */ + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) +{ + return unzSetOffset64(file,pos); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.h new file mode 100644 index 000000000..2104e3915 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/unzip.h @@ -0,0 +1,437 @@ +/* unzip.h -- IO for uncompress .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + --------------------------------------------------------------------------------- + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + --------------------------------------------------------------------------------- + + Changes + + See header of unzip64.c + +*/ + +#ifndef _unz64_H +#define _unz64_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + +#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagunzFile__ { int unused; } unzFile__; +typedef unzFile__ *unzFile; +#else +typedef voidp unzFile; +#endif + + +#define UNZ_OK (0) +#define UNZ_END_OF_LIST_OF_FILE (-100) +#define UNZ_ERRNO (Z_ERRNO) +#define UNZ_EOF (0) +#define UNZ_PARAMERROR (-102) +#define UNZ_BADZIPFILE (-103) +#define UNZ_INTERNALERROR (-104) +#define UNZ_CRCERROR (-105) + +/* tm_unz contain date/time info */ +typedef struct tm_unz_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_unz; + +/* unz_global_info structure contain global data about the ZIPfile + These data comes from the end of central dir */ +typedef struct unz_global_info64_s +{ + ZPOS64_T number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info64; + +typedef struct unz_global_info_s +{ + uLong number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info; + +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_info64_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + ZPOS64_T compressed_size; /* compressed size 8 bytes */ + ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info64; + +typedef struct unz_file_info_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + uLong compressed_size; /* compressed size 4 bytes */ + uLong uncompressed_size; /* uncompressed size 4 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info; + +extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, + const char* fileName2, + int iCaseSensitivity)); +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) +*/ + + +extern unzFile ZEXPORT unzOpen OF((const char *path)); +extern unzFile ZEXPORT unzOpen64 OF((const void *path)); +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer + "zlib/zlib113.zip". + If the zipfile cannot be opened (file don't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. + the "64" function take a const void* pointer, because the path is just the + value passed to the open64_file_func callback. + Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path + is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char* + does not describe the reality +*/ + + +extern unzFile ZEXPORT unzOpen2 OF((const char *path, + zlib_filefunc_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unzOpen, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + +extern unzFile ZEXPORT unzOpen2_64 OF((const void *path, + zlib_filefunc64_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unz64Open, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + +extern int ZEXPORT unzClose OF((unzFile file)); +/* + Close a ZipFile opened with unzOpen. + If there is files inside the .Zip opened with unzOpenCurrentFile (see later), + these files MUST be closed with unzCloseCurrentFile before call unzClose. + return UNZ_OK if there is no problem. */ + +extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, + unz_global_info *pglobal_info)); + +extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file, + unz_global_info64 *pglobal_info)); +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ + + +extern int ZEXPORT unzGetGlobalComment OF((unzFile file, + char *szComment, + uLong uSizeBuf)); +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ + + +/***************************************************************************/ +/* Unzip package allow you browse the directory of the zipfile */ + +extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ + +extern int ZEXPORT unzGoToNextFile OF((unzFile file)); +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ + +extern int ZEXPORT unzLocateFile OF((unzFile file, + const char *szFileName, + int iCaseSensitivity)); +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ + + +/* ****************************************** */ +/* Ryan supplied functions */ +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_pos_s +{ + uLong pos_in_zip_directory; /* offset in zip file directory */ + uLong num_of_file; /* # of file */ +} unz_file_pos; + +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos); + +typedef struct unz64_file_pos_s +{ + ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */ + ZPOS64_T num_of_file; /* # of file */ +} unz64_file_pos; + +extern int ZEXPORT unzGetFilePos64( + unzFile file, + unz64_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos64( + unzFile file, + const unz64_file_pos* file_pos); + +/* ****************************************** */ + +extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file, + unz_file_info64 *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + +extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); +/* + Get Info about the current file + if pfile_info!=NULL, the *pfile_info structure will contain somes info about + the current file + if szFileName!=NULL, the filemane string will be copied in szFileName + (fileNameBufferSize is the size of the buffer) + if extraField!=NULL, the extra field information will be copied in extraField + (extraFieldBufferSize is the size of the buffer). + This is the Central-header version of the extra field + if szComment!=NULL, the comment string of the file will be copied in szComment + (commentBufferSize is the size of the buffer) +*/ + + +/** Addition for GDAL : START */ + +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); + +/** Addition for GDAL : END */ + + +/***************************************************************************/ +/* for reading the content of the current zipfile, you can open it, read data + from it, and close it (you can close it before reading all the file) + */ + +extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); +/* + Open for reading data the current file in the zipfile. + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, + const char* password)); +/* + Open for reading data the current file in the zipfile. + password is a crypting password + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, + int* method, + int* level, + int raw)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + +extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, + int* method, + int* level, + int raw, + const char* password)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + + +extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ + +extern int ZEXPORT unzReadCurrentFile OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read bytes from the current file (opened by unzOpenCurrentFile) + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ + +extern z_off_t ZEXPORT unztell OF((unzFile file)); + +extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file)); +/* + Give the current position in uncompressed data +*/ + +extern int ZEXPORT unzeof OF((unzFile file)); +/* + return 1 if the end of file was reached, 0 elsewhere +*/ + +extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ + +/***************************************************************************/ + +/* Get the current file offset */ +extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file); +extern uLong ZEXPORT unzGetOffset (unzFile file); + +/* Set the current file offset */ +extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos); +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); + + + +#ifdef __cplusplus +} +#endif + +#endif /* _unz64_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.c new file mode 100644 index 000000000..44e88a9cb --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.c @@ -0,0 +1,2007 @@ +/* zip.c -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + Oct-2009 - Mathias Svensson - Remove old C style function prototypes + Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives + Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. + Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data + It is used when recreting zip archive with RAW when deleting items from a zip. + ZIP64 data is automatically added to items that needs it, and existing ZIP64 data need to be removed. + Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer + +*/ + + +#include +#include +#include +#include +#include "zlib.h" +#include "zip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +#ifndef VERSIONMADEBY +# define VERSIONMADEBY (0x0) /* platform depedent */ +#endif + +#ifndef Z_BUFSIZE +#define Z_BUFSIZE (64*1024) //(16384) +#endif + +#ifndef Z_MAXFILENAMEINZIP +#define Z_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +/* +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) +*/ + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + + +// NOT sure that this work on ALL platform +#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef DEF_MEM_LEVEL +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +#endif +const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + + +#define SIZEDATA_INDATABLOCK (4096-(4*4)) + +#define LOCALHEADERMAGIC (0x04034b50) +#define CENTRALHEADERMAGIC (0x02014b50) +#define ENDHEADERMAGIC (0x06054b50) +#define ZIP64ENDHEADERMAGIC (0x6064b50) +#define ZIP64ENDLOCHEADERMAGIC (0x7064b50) + +#define FLAG_LOCALHEADER_OFFSET (0x06) +#define CRC_LOCALHEADER_OFFSET (0x0e) + +#define SIZECENTRALHEADER (0x2e) /* 46 */ + +typedef struct linkedlist_datablock_internal_s +{ + struct linkedlist_datablock_internal_s* next_datablock; + uLong avail_in_this_block; + uLong filled_in_this_block; + uLong unused; /* for future use and alignment */ + unsigned char data[SIZEDATA_INDATABLOCK]; +} linkedlist_datablock_internal; + +typedef struct linkedlist_data_s +{ + linkedlist_datablock_internal* first_block; + linkedlist_datablock_internal* last_block; +} linkedlist_data; + + +typedef struct +{ + z_stream stream; /* zLib stream structure for inflate */ +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + + int stream_initialised; /* 1 is stream is initialised */ + uInt pos_in_buffered_data; /* last written byte in buffered_data */ + + ZPOS64_T pos_local_header; /* offset of the local header of the file + currenty writing */ + char* central_header; /* central header data for the current file */ + uLong size_centralExtra; + uLong size_centralheader; /* size of the central header for cur file */ + uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ + uLong flag; /* flag of the file currently writing */ + + int method; /* compression method of file currenty wr.*/ + int raw; /* 1 for directly writing raw data */ + Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ + uLong dosDate; + uLong crc32; + int encrypt; + int zip64; /* Add ZIP64 extened information in the extra field */ + ZPOS64_T pos_zip64extrainfo; + ZPOS64_T totalCompressedData; + ZPOS64_T totalUncompressedData; +#ifndef NOCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const z_crc_t* pcrc_32_tab; + int crypt_header_size; +#endif +} curfile64_info; + +typedef struct +{ + zlib_filefunc64_32_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + linkedlist_data central_dir;/* datablock with central dir in construction*/ + int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ + curfile64_info ci; /* info on the file curretly writing */ + + ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ + ZPOS64_T add_position_when_writing_offset; + ZPOS64_T number_entry; + +#ifndef NO_ADDFILEINEXISTINGZIP + char *globalcomment; +#endif + +} zip64_internal; + + +#ifndef NOCRYPT +#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED +#include "crypt.h" +#endif + +local linkedlist_datablock_internal* allocate_new_datablock() +{ + linkedlist_datablock_internal* ldi; + ldi = (linkedlist_datablock_internal*) + ALLOC(sizeof(linkedlist_datablock_internal)); + if (ldi!=NULL) + { + ldi->next_datablock = NULL ; + ldi->filled_in_this_block = 0 ; + ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; + } + return ldi; +} + +local void free_datablock(linkedlist_datablock_internal* ldi) +{ + while (ldi!=NULL) + { + linkedlist_datablock_internal* ldinext = ldi->next_datablock; + TRYFREE(ldi); + ldi = ldinext; + } +} + +local void init_linkedlist(linkedlist_data* ll) +{ + ll->first_block = ll->last_block = NULL; +} + +local void free_linkedlist(linkedlist_data* ll) +{ + free_datablock(ll->first_block); + ll->first_block = ll->last_block = NULL; +} + + +local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) +{ + linkedlist_datablock_internal* ldi; + const unsigned char* from_copy; + + if (ll==NULL) + return ZIP_INTERNALERROR; + + if (ll->last_block == NULL) + { + ll->first_block = ll->last_block = allocate_new_datablock(); + if (ll->first_block == NULL) + return ZIP_INTERNALERROR; + } + + ldi = ll->last_block; + from_copy = (unsigned char*)buf; + + while (len>0) + { + uInt copy_this; + uInt i; + unsigned char* to_copy; + + if (ldi->avail_in_this_block==0) + { + ldi->next_datablock = allocate_new_datablock(); + if (ldi->next_datablock == NULL) + return ZIP_INTERNALERROR; + ldi = ldi->next_datablock ; + ll->last_block = ldi; + } + + if (ldi->avail_in_this_block < len) + copy_this = (uInt)ldi->avail_in_this_block; + else + copy_this = (uInt)len; + + to_copy = &(ldi->data[ldi->filled_in_this_block]); + + for (i=0;ifilled_in_this_block += copy_this; + ldi->avail_in_this_block -= copy_this; + from_copy += copy_this ; + len -= copy_this; + } + return ZIP_OK; +} + + + +/****************************************************************************/ + +#ifndef NO_ADDFILEINEXISTINGZIP +/* =========================================================================== + Inputs a long in LSB order to the given file + nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) +*/ + +local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)); +local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) +{ + unsigned char buf[8]; + int n; + for (n = 0; n < nbByte; n++) + { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + if (x != 0) + { /* data overflow - hack for ZIP64 (X Roche) */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } + + if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) + return ZIP_ERRNO; + else + return ZIP_OK; +} + +local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte)); +local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) +{ + unsigned char* buf=(unsigned char*)dest; + int n; + for (n = 0; n < nbByte; n++) { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + + if (x != 0) + { /* data overflow - hack for ZIP64 */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } +} + +/****************************************************************************/ + + +local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) +{ + uLong year = (uLong)ptm->tm_year; + if (year>=1980) + year-=1980; + else if (year>=80) + year-=80; + return + (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | + ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); +} + + +/****************************************************************************/ + +local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); + +local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi) +{ + unsigned char c; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return ZIP_OK; + } + else + { + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return ZIP_ERRNO; + else + return ZIP_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) +{ + uLong x ; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) +{ + uLong x ; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); + + +local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) +{ + ZPOS64_T x; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<24; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<32; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<40; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<48; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<56; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + + return err; +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); + +local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + +/* +Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before +the global comment) +*/ +local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); + +local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + uLong uL; + ZPOS64_T relativeOffset; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + { + // Signature "0x07064b50" Zip64 end of central directory locater + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + } + + if (uPosFound!=0) + break; + } + + TRYFREE(buf); + if (uPosFound == 0) + return 0; + + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK) + return 0; + + /* total number of disks */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 1) + return 0; + + /* Goto Zip64 end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + if (uL != 0x06064b50) // signature of 'Zip64 end of central directory' + return 0; + + return relativeOffset; +} + +int LoadCentralDirectoryRecord(zip64_internal* pziinit) +{ + int err=ZIP_OK; + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory */ + ZPOS64_T central_pos; + uLong uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + ZPOS64_T number_entry; + ZPOS64_T number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + uLong VersionMadeBy; + uLong VersionNeeded; + uLong size_comment; + + int hasZIP64Record = 0; + + // check first if we find a ZIP64 record + central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream); + if(central_pos > 0) + { + hasZIP64Record = 1; + } + else if(central_pos == 0) + { + central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream); + } + +/* disable to allow appending to empty ZIP archive + if (central_pos==0) + err=ZIP_ERRNO; +*/ + + if(hasZIP64Record) + { + ZPOS64_T sizeEndOfCentralDirectory; + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* size of zip64 end of central directory record */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version made by */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version needed to extract */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory on this disk */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + // TODO.. + // read the comment from the standard central header. + size_comment = 0; + } + else + { + // Read End of central Directory info + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir on this disk */ + number_entry = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry = uL; + + /* total number of entries in the central dir */ + number_entry_CD = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry_CD = uL; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + size_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + size_central_dir = uL; + + /* offset of start of central directory with respect to the starting disk number */ + offset_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + offset_central_dir = uL; + + + /* zipfile global comment length */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK) + err=ZIP_ERRNO; + } + + if ((central_posz_filefunc, pziinit->filestream); + return ZIP_ERRNO; + } + + if (size_comment>0) + { + pziinit->globalcomment = (char*)ALLOC(size_comment+1); + if (pziinit->globalcomment) + { + size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment); + pziinit->globalcomment[size_comment]=0; + } + } + + byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); + pziinit->add_position_when_writing_offset = byte_before_the_zipfile; + + { + ZPOS64_T size_central_dir_to_read = size_central_dir; + size_t buf_size = SIZEDATA_INDATABLOCK; + void* buf_read = (void*)ALLOC(buf_size); + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + while ((size_central_dir_to_read>0) && (err==ZIP_OK)) + { + ZPOS64_T read_this = SIZEDATA_INDATABLOCK; + if (read_this > size_central_dir_to_read) + read_this = size_central_dir_to_read; + + if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this) + err=ZIP_ERRNO; + + if (err==ZIP_OK) + err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this); + + size_central_dir_to_read-=read_this; + } + TRYFREE(buf_read); + } + pziinit->begin_pos = byte_before_the_zipfile; + pziinit->number_entry = number_entry_CD; + + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + return err; +} + + +#endif /* !NO_ADDFILEINEXISTINGZIP*/ + + +/************************************************************/ +extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) +{ + zip64_internal ziinit; + zip64_internal* zi; + int err=ZIP_OK; + + ziinit.z_filefunc.zseek32_file = NULL; + ziinit.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); + else + ziinit.z_filefunc = *pzlib_filefunc64_32_def; + + ziinit.filestream = ZOPEN64(ziinit.z_filefunc, + pathname, + (append == APPEND_STATUS_CREATE) ? + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); + + if (ziinit.filestream == NULL) + return NULL; + + if (append == APPEND_STATUS_CREATEAFTER) + ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END); + + ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream); + ziinit.in_opened_file_inzip = 0; + ziinit.ci.stream_initialised = 0; + ziinit.number_entry = 0; + ziinit.add_position_when_writing_offset = 0; + init_linkedlist(&(ziinit.central_dir)); + + + + zi = (zip64_internal*)ALLOC(sizeof(zip64_internal)); + if (zi==NULL) + { + ZCLOSE64(ziinit.z_filefunc,ziinit.filestream); + return NULL; + } + + /* now we add file in a zipfile */ +# ifndef NO_ADDFILEINEXISTINGZIP + ziinit.globalcomment = NULL; + if (append == APPEND_STATUS_ADDINZIP) + { + // Read and Cache Central Directory Records + err = LoadCentralDirectoryRecord(&ziinit); + } + + if (globalcomment) + { + *globalcomment = ziinit.globalcomment; + } +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + + if (err != ZIP_OK) + { +# ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(ziinit.globalcomment); +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + TRYFREE(zi); + return NULL; + } + else + { + *zi = ziinit; + return (zipFile)zi; + } +} + +extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) +{ + if (pzlib_filefunc32_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + +extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) +{ + if (pzlib_filefunc_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; + zlib_filefunc64_32_def_fill.ztell32_file = NULL; + zlib_filefunc64_32_def_fill.zseek32_file = NULL; + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + + + +extern zipFile ZEXPORT zipOpen (const char* pathname, int append) +{ + return zipOpen3((const void*)pathname,append,NULL,NULL); +} + +extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append) +{ + return zipOpen3(pathname,append,NULL,NULL); +} + +int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) +{ + /* write the local header */ + int err; + uInt size_filename = (uInt)strlen(filename); + uInt size_extrafield = size_extrafield_local; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4); + + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); + + // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ + } + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); + + if(zi->ci.zip64) + { + size_extrafield += 20; + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2); + + if ((err==ZIP_OK) && (size_filename > 0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) + err = ZIP_ERRNO; + } + + if ((err==ZIP_OK) && (size_extrafield_local > 0)) + { + if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local) + err = ZIP_ERRNO; + } + + + if ((err==ZIP_OK) && (zi->ci.zip64)) + { + // write the Zip64 extended info + short HeaderID = 1; + short DataSize = 16; + ZPOS64_T CompressedSize = 0; + ZPOS64_T UncompressedSize = 0; + + // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file) + zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); + } + + return err; +} + +/* + NOTE. + When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped + before calling this function it can be done with zipRemoveExtraInfoBlock + + It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize + unnecessary allocations. + */ +extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase, int zip64) +{ + zip64_internal* zi; + uInt size_filename; + uInt size_comment; + uInt i; + int err = ZIP_OK; + +# ifdef NOCRYPT + (crcForCrypting); + if (password != NULL) + return ZIP_PARAMERROR; +# endif + + if (file == NULL) + return ZIP_PARAMERROR; + +#ifdef HAVE_BZIP2 + if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED)) + return ZIP_PARAMERROR; +#else + if ((method!=0) && (method!=Z_DEFLATED)) + return ZIP_PARAMERROR; +#endif + + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + if (err != ZIP_OK) + return err; + } + + if (filename==NULL) + filename="-"; + + if (comment==NULL) + size_comment = 0; + else + size_comment = (uInt)strlen(comment); + + size_filename = (uInt)strlen(filename); + + if (zipfi == NULL) + zi->ci.dosDate = 0; + else + { + if (zipfi->dosDate != 0) + zi->ci.dosDate = zipfi->dosDate; + else + zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); + } + + zi->ci.flag = flagBase; + if ((level==8) || (level==9)) + zi->ci.flag |= 2; + if (level==2) + zi->ci.flag |= 4; + if (level==1) + zi->ci.flag |= 6; + if (password != NULL) + zi->ci.flag |= 1; + + zi->ci.crc32 = 0; + zi->ci.method = method; + zi->ci.encrypt = 0; + zi->ci.stream_initialised = 0; + zi->ci.pos_in_buffered_data = 0; + zi->ci.raw = raw; + zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); + + zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; + zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data + + zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree); + + zi->ci.size_centralExtra = size_extrafield_global; + zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); + /* version info */ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); + zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); + zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); + zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); + zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ + zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); + zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); + zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ + + if (zipfi==NULL) + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); + else + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); + + if (zipfi==NULL) + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); + + if(zi->ci.pos_local_header >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writing_offset,4); + + for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = + *(((const char*)extrafield_global)+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ + size_extrafield_global+i) = *(comment+i); + if (zi->ci.central_header == NULL) + return ZIP_INTERNALERROR; + + zi->ci.zip64 = zip64; + zi->ci.totalCompressedData = 0; + zi->ci.totalUncompressedData = 0; + zi->ci.pos_zip64extrainfo = 0; + + err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local); + +#ifdef HAVE_BZIP2 + zi->ci.bstream.avail_in = (uInt)0; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + zi->ci.bstream.total_in_hi32 = 0; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_out_hi32 = 0; + zi->ci.bstream.total_out_lo32 = 0; +#endif + + zi->ci.stream.avail_in = (uInt)0; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + zi->ci.stream.total_in = 0; + zi->ci.stream.total_out = 0; + zi->ci.stream.data_type = Z_BINARY; + +#ifdef HAVE_BZIP2 + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) +#else + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) +#endif + { + if(zi->ci.method == Z_DEFLATED) + { + zi->ci.stream.zalloc = (alloc_func)0; + zi->ci.stream.zfree = (free_func)0; + zi->ci.stream.opaque = (voidpf)0; + + if (windowBits>0) + windowBits = -windowBits; + + err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); + + if (err==Z_OK) + zi->ci.stream_initialised = Z_DEFLATED; + } + else if(zi->ci.method == Z_BZIP2ED) + { +#ifdef HAVE_BZIP2 + // Init BZip stuff here + zi->ci.bstream.bzalloc = 0; + zi->ci.bstream.bzfree = 0; + zi->ci.bstream.opaque = (voidpf)0; + + err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); + if(err == BZ_OK) + zi->ci.stream_initialised = Z_BZIP2ED; +#endif + } + + } + +# ifndef NOCRYPT + zi->ci.crypt_header_size = 0; + if ((err==Z_OK) && (password != NULL)) + { + unsigned char bufHead[RAND_HEAD_LEN]; + unsigned int sizeHead; + zi->ci.encrypt = 1; + zi->ci.pcrc_32_tab = get_crc_table(); + /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ + + sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + zi->ci.crypt_header_size = sizeHead; + + if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + err = ZIP_ERRNO; + } +# endif + + if (err==Z_OK) + zi->in_opened_file_inzip = 1; + return err; +} + +extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, versionMadeBy, flagBase, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +local int zip64FlushWriteBuffer(zip64_internal* zi) +{ + int err=ZIP_OK; + + if (zi->ci.encrypt != 0) + { +#ifndef NOCRYPT + uInt i; + int t; + for (i=0;ici.pos_in_buffered_data;i++) + zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); +#endif + } + + if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) + err = ZIP_ERRNO; + + zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED) + { + zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_in_hi32 = 0; + } + else +#endif + { + zi->ci.totalUncompressedData += zi->ci.stream.total_in; + zi->ci.stream.total_in = 0; + } + + + zi->ci.pos_in_buffered_data = 0; + + return err; +} + +extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len) +{ + zip64_internal* zi; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + + zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) + { + zi->ci.bstream.next_in = (void*)buf; + zi->ci.bstream.avail_in = len; + err = BZ_RUN_OK; + + while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) + { + if (zi->ci.bstream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + } + + + if(err != BZ_RUN_OK) + break; + + if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; +// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; + } + } + + if(err == BZ_RUN_OK) + err = ZIP_OK; + } + else +#endif + { + zi->ci.stream.next_in = (Bytef*)buf; + zi->ci.stream.avail_in = len; + + while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) + { + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + + + if(err != ZIP_OK) + break; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_NO_FLUSH); + if(uTotalOutBefore > zi->ci.stream.total_out) + { + int bBreak = 0; + bBreak++; + } + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + else + { + uInt copy_this,i; + if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) + copy_this = zi->ci.stream.avail_in; + else + copy_this = zi->ci.stream.avail_out; + + for (i = 0; i < copy_this; i++) + *(((char*)zi->ci.stream.next_out)+i) = + *(((const char*)zi->ci.stream.next_in)+i); + { + zi->ci.stream.avail_in -= copy_this; + zi->ci.stream.avail_out-= copy_this; + zi->ci.stream.next_in+= copy_this; + zi->ci.stream.next_out+= copy_this; + zi->ci.stream.total_in+= copy_this; + zi->ci.stream.total_out+= copy_this; + zi->ci.pos_in_buffered_data += copy_this; + } + } + }// while(...) + } + + return err; +} + +extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) +{ + return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); +} + +extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) +{ + zip64_internal* zi; + ZPOS64_T compressed_size; + uLong invalidValue = 0xffffffff; + short datasize = 0; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + zi->ci.stream.avail_in = 0; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + while (err==ZIP_OK) + { + uLong uTotalOutBefore; + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_FINISH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + } + else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { +#ifdef HAVE_BZIP2 + err = BZ_FINISH_OK; + while (err==BZ_FINISH_OK) + { + uLong uTotalOutBefore; + if (zi->ci.bstream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.bstream.total_out_lo32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); + if(err == BZ_STREAM_END) + err = Z_STREAM_END; + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); + } + + if(err == BZ_FINISH_OK) + err = ZIP_OK; +#endif + } + + if (err==Z_STREAM_END) + err=ZIP_OK; /* this is normal */ + + if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) + { + if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO) + err = ZIP_ERRNO; + } + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + int tmp_err = deflateEnd(&zi->ci.stream); + if (err == ZIP_OK) + err = tmp_err; + zi->ci.stream_initialised = 0; + } +#ifdef HAVE_BZIP2 + else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); + if (err==ZIP_OK) + err = tmperr; + zi->ci.stream_initialised = 0; + } +#endif + + if (!zi->ci.raw) + { + crc32 = (uLong)zi->ci.crc32; + uncompressed_size = zi->ci.totalUncompressedData; + } + compressed_size = zi->ci.totalCompressedData; + +# ifndef NOCRYPT + compressed_size += zi->ci.crypt_header_size; +# endif + + // update Current Item crc and sizes, + if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff) + { + /*version Made by*/ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); + /*version needed*/ + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); + + } + + zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ + + + if(compressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ + + /// set internal file attributes field + if (zi->ci.stream.data_type == Z_ASCII) + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); + + if(uncompressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ + + // Add ZIP64 extra info field for uncompressed size + if(uncompressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for compressed size + if(compressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for relative offset to local file header of current file + if(zi->ci.pos_local_header >= 0xffffffff) + datasize += 8; + + if(datasize > 0) + { + char* p = NULL; + + if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) + { + // we can not write more data to the buffer that we have room for. + return ZIP_BADZIPFILE; + } + + p = zi->ci.central_header + zi->ci.size_centralheader; + + // Add Extra Information Header for 'ZIP64 information' + zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID + p += 2; + zip64local_putValue_inmemory(p, datasize, 2); // DataSize + p += 2; + + if(uncompressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, uncompressed_size, 8); + p += 8; + } + + if(compressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, compressed_size, 8); + p += 8; + } + + if(zi->ci.pos_local_header >= 0xffffffff) + { + zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); + p += 8; + } + + // Update how much extra free space we got in the memory buffer + // and increase the centralheader size so the new ZIP64 fields are included + // ( 4 below is the size of HeaderID and DataSize field ) + zi->ci.size_centralExtraFree -= datasize + 4; + zi->ci.size_centralheader += datasize + 4; + + // Update the extra info size field + zi->ci.size_centralExtra += datasize + 4; + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); + } + + if (err==ZIP_OK) + err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader); + + free(zi->ci.central_header); + + if (err==ZIP_OK) + { + // Update the LocalFileHeader with the new values. + + ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ + + if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff ) + { + if(zi->ci.pos_zip64extrainfo > 0) + { + // Update the size in the ZIP64 extended field. + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8); + } + else + err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal + } + else + { + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + } + + if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + } + + zi->number_entry ++; + zi->in_opened_file_inzip = 0; + + return err; +} + +extern int ZEXPORT zipCloseFileInZip (zipFile file) +{ + return zipCloseFileInZipRaw (file,0,0); +} + +int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) +{ + int err = ZIP_OK; + ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4); + + /*num disks*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + /*relative offset*/ + if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8); + + /*total disks*/ /* Do not support spawning of disk so always say 1 here*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4); + + return err; +} + +int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + uLong Zip64DataSize = 44; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? + + if (err==ZIP_OK) /* version made by */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* version needed */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* total number of entries in the central dir */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); + } + return err; +} +int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + /*signature*/ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + { + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + } + + if (err==ZIP_OK) /* total number of entries in the central dir */ + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; + if(pos >= 0xffffffff) + { + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4); + } + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writing_offset),4); + } + + return err; +} + +int Write_GlobalComment(zip64_internal* zi, const char* global_comment) +{ + int err = ZIP_OK; + uInt size_global_comment = 0; + + if(global_comment != NULL) + size_global_comment = (uInt)strlen(global_comment); + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + + if (err == ZIP_OK && size_global_comment > 0) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) + err = ZIP_ERRNO; + } + return err; +} + +extern int ZEXPORT zipClose (zipFile file, const char* global_comment) +{ + zip64_internal* zi; + int err = 0; + uLong size_centraldir = 0; + ZPOS64_T centraldir_pos_inzip; + ZPOS64_T pos; + + if (file == NULL) + return ZIP_PARAMERROR; + + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + } + +#ifndef NO_ADDFILEINEXISTINGZIP + if (global_comment==NULL) + global_comment = zi->globalcomment; +#endif + + centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (err==ZIP_OK) + { + linkedlist_datablock_internal* ldi = zi->central_dir.first_block; + while (ldi!=NULL) + { + if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block) + err = ZIP_ERRNO; + } + + size_centraldir += ldi->filled_in_this_block; + ldi = ldi->next_datablock; + } + } + free_linkedlist(&(zi->central_dir)); + + pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; + if(pos >= 0xffffffff || zi->number_entry > 0xFFFF) + { + ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); + Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); + + Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos); + } + + if (err==ZIP_OK) + err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); + + if(err == ZIP_OK) + err = Write_GlobalComment(zi, global_comment); + + if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0) + if (err == ZIP_OK) + err = ZIP_ERRNO; + +#ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(zi->globalcomment); +#endif + TRYFREE(zi); + + return err; +} + +extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader) +{ + char* p = pData; + int size = 0; + char* pNewHeader; + char* pTmp; + short header; + short dataSize; + + int retVal = ZIP_OK; + + if(pData == NULL || *dataLen < 4) + return ZIP_PARAMERROR; + + pNewHeader = (char*)ALLOC(*dataLen); + pTmp = pNewHeader; + + while(p < (pData + *dataLen)) + { + header = *(short*)p; + dataSize = *(((short*)p)+1); + + if( header == sHeader ) // Header found. + { + p += dataSize + 4; // skip it. do not copy to temp buffer + } + else + { + // Extra Info block should not be removed, So copy it to the temp buffer. + memcpy(pTmp, p, dataSize + 4); + p += dataSize + 4; + size += dataSize + 4; + } + + } + + if(size < *dataLen) + { + // clean old extra info block. + memset(pData,0, *dataLen); + + // copy the new extra info block over the old + if(size > 0) + memcpy(pData, pNewHeader, size); + + // set the new extra info size + *dataLen = size; + + retVal = ZIP_OK; + } + else + retVal = ZIP_ERRNO; + + TRYFREE(pNewHeader); + + return retVal; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.h new file mode 100644 index 000000000..8aaebb623 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/minizip/zip.h @@ -0,0 +1,362 @@ +/* zip.h -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + --------------------------------------------------------------------------- + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + --------------------------------------------------------------------------- + + Changes + + See header of zip.h + +*/ + +#ifndef _zip12_H +#define _zip12_H + +#ifdef __cplusplus +extern "C" { +#endif + +//#define HAVE_BZIP2 + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + +#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagzipFile__ { int unused; } zipFile__; +typedef zipFile__ *zipFile; +#else +typedef voidp zipFile; +#endif + +#define ZIP_OK (0) +#define ZIP_EOF (0) +#define ZIP_ERRNO (Z_ERRNO) +#define ZIP_PARAMERROR (-102) +#define ZIP_BADZIPFILE (-103) +#define ZIP_INTERNALERROR (-104) + +#ifndef DEF_MEM_LEVEL +# if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +# else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +# endif +#endif +/* default memLevel */ + +/* tm_zip contain date/time info */ +typedef struct tm_zip_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_zip; + +typedef struct +{ + tm_zip tmz_date; /* date in understandable format */ + uLong dosDate; /* if dos_date == 0, tmu_date is used */ +/* uLong flag; */ /* general purpose bit flag 2 bytes */ + + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ +} zip_fileinfo; + +typedef const char* zipcharpc; + + +#define APPEND_STATUS_CREATE (0) +#define APPEND_STATUS_CREATEAFTER (1) +#define APPEND_STATUS_ADDINZIP (2) + +extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); +extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); +/* + Create a zipfile. + pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on + an Unix computer "zlib/zlib113.zip". + if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip + will be created at the end of the file. + (useful if the file contain a self extractor code) + if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will + add files in existing zip (be sure you don't add file that doesn't exist) + If the zipfile cannot be opened, the return value is NULL. + Else, the return value is a zipFile Handle, usable with other function + of this zip package. +*/ + +/* Note : there is no delete function into a zipfile. + If you want delete file into a zipfile, you must open a zipfile, and create another + Of couse, you can use RAW reading and writing to copy the file you did not want delte +*/ + +extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def)); + +extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc64_def* pzlib_filefunc_def)); + +extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level)); + +extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int zip64)); + +/* + Open a file in the ZIP for writing. + filename : the filename in zip (if NULL, '-' without quote will be used + *zipfi contain supplemental information + if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local + contains the extrafield data the the local header + if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global + contains the extrafield data the the local header + if comment != NULL, comment contain the comment string + method contain the compression method (0 for store, Z_DEFLATED for deflate) + level contain the level of compression (can be Z_DEFAULT_COMPRESSION) + zip64 is set to 1 if a zip64 extended information block should be added to the local file header. + this MUST be '1' if the uncompressed size is >= 0xffffffff. + +*/ + + +extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw)); + + +extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int zip64)); +/* + Same than zipOpenNewFileInZip, except if raw=1, we write raw file + */ + +extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting)); + +extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + int zip64 + )); + +/* + Same than zipOpenNewFileInZip2, except + windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 + password : crypting password (NULL for no crypting) + crcForCrypting : crc of file to compress (needed for crypting) + */ + +extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase + )); + + +extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase, + int zip64 + )); +/* + Same than zipOpenNewFileInZip4, except + versionMadeBy : value for Version made by field + flag : value for flag field (compression level info will be added) + */ + + +extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, + const void* buf, + unsigned len)); +/* + Write data in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); +/* + Close the current file in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, + uLong uncompressed_size, + uLong crc32)); + +extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, + ZPOS64_T uncompressed_size, + uLong crc32)); + +/* + Close the current file in the zipfile, for file opened with + parameter raw=1 in zipOpenNewFileInZip2 + uncompressed_size and crc32 are value for the uncompressed size +*/ + +extern int ZEXPORT zipClose OF((zipFile file, + const char* global_comment)); +/* + Close the zipfile +*/ + + +extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader)); +/* + zipRemoveExtraInfoBlock - Added by Mathias Svensson + + Remove extra information block from a extra information data for the local file header or central directory header + + It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. + + 0x0001 is the signature header for the ZIP64 extra information blocks + + usage. + Remove ZIP64 Extra information from a central director extra field data + zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); + + Remove ZIP64 Extra information from a Local File Header extra field data + zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _zip64_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/example.pas b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/example.pas new file mode 100644 index 000000000..5518b36a7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/example.pas @@ -0,0 +1,599 @@ +(* example.c -- usage example of the zlib compression library + * Copyright (C) 1995-2003 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Pascal translation + * Copyright (C) 1998 by Jacques Nomssi Nzali. + * For conditions of distribution and use, see copyright notice in readme.txt + * + * Adaptation to the zlibpas interface + * Copyright (C) 2003 by Cosmin Truta. + * For conditions of distribution and use, see copyright notice in readme.txt + *) + +program example; + +{$DEFINE TEST_COMPRESS} +{DO NOT $DEFINE TEST_GZIO} +{$DEFINE TEST_DEFLATE} +{$DEFINE TEST_INFLATE} +{$DEFINE TEST_FLUSH} +{$DEFINE TEST_SYNC} +{$DEFINE TEST_DICT} + +uses SysUtils, zlibpas; + +const TESTFILE = 'foo.gz'; + +(* "hello world" would be more standard, but the repeated "hello" + * stresses the compression code better, sorry... + *) +const hello: PChar = 'hello, hello!'; + +const dictionary: PChar = 'hello'; + +var dictId: LongInt; (* Adler32 value of the dictionary *) + +procedure CHECK_ERR(err: Integer; msg: String); +begin + if err <> Z_OK then + begin + WriteLn(msg, ' error: ', err); + Halt(1); + end; +end; + +procedure EXIT_ERR(const msg: String); +begin + WriteLn('Error: ', msg); + Halt(1); +end; + +(* =========================================================================== + * Test compress and uncompress + *) +{$IFDEF TEST_COMPRESS} +procedure test_compress(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var err: Integer; + len: LongInt; +begin + len := StrLen(hello)+1; + + err := compress(compr, comprLen, hello, len); + CHECK_ERR(err, 'compress'); + + StrCopy(PChar(uncompr), 'garbage'); + + err := uncompress(uncompr, uncomprLen, compr, comprLen); + CHECK_ERR(err, 'uncompress'); + + if StrComp(PChar(uncompr), hello) <> 0 then + EXIT_ERR('bad uncompress') + else + WriteLn('uncompress(): ', PChar(uncompr)); +end; +{$ENDIF} + +(* =========================================================================== + * Test read/write of .gz files + *) +{$IFDEF TEST_GZIO} +procedure test_gzio(const fname: PChar; (* compressed file name *) + uncompr: Pointer; + uncomprLen: LongInt); +var err: Integer; + len: Integer; + zfile: gzFile; + pos: LongInt; +begin + len := StrLen(hello)+1; + + zfile := gzopen(fname, 'wb'); + if zfile = NIL then + begin + WriteLn('gzopen error'); + Halt(1); + end; + gzputc(zfile, 'h'); + if gzputs(zfile, 'ello') <> 4 then + begin + WriteLn('gzputs err: ', gzerror(zfile, err)); + Halt(1); + end; + {$IFDEF GZ_FORMAT_STRING} + if gzprintf(zfile, ', %s!', 'hello') <> 8 then + begin + WriteLn('gzprintf err: ', gzerror(zfile, err)); + Halt(1); + end; + {$ELSE} + if gzputs(zfile, ', hello!') <> 8 then + begin + WriteLn('gzputs err: ', gzerror(zfile, err)); + Halt(1); + end; + {$ENDIF} + gzseek(zfile, 1, SEEK_CUR); (* add one zero byte *) + gzclose(zfile); + + zfile := gzopen(fname, 'rb'); + if zfile = NIL then + begin + WriteLn('gzopen error'); + Halt(1); + end; + + StrCopy(PChar(uncompr), 'garbage'); + + if gzread(zfile, uncompr, uncomprLen) <> len then + begin + WriteLn('gzread err: ', gzerror(zfile, err)); + Halt(1); + end; + if StrComp(PChar(uncompr), hello) <> 0 then + begin + WriteLn('bad gzread: ', PChar(uncompr)); + Halt(1); + end + else + WriteLn('gzread(): ', PChar(uncompr)); + + pos := gzseek(zfile, -8, SEEK_CUR); + if (pos <> 6) or (gztell(zfile) <> pos) then + begin + WriteLn('gzseek error, pos=', pos, ', gztell=', gztell(zfile)); + Halt(1); + end; + + if gzgetc(zfile) <> ' ' then + begin + WriteLn('gzgetc error'); + Halt(1); + end; + + if gzungetc(' ', zfile) <> ' ' then + begin + WriteLn('gzungetc error'); + Halt(1); + end; + + gzgets(zfile, PChar(uncompr), uncomprLen); + uncomprLen := StrLen(PChar(uncompr)); + if uncomprLen <> 7 then (* " hello!" *) + begin + WriteLn('gzgets err after gzseek: ', gzerror(zfile, err)); + Halt(1); + end; + if StrComp(PChar(uncompr), hello + 6) <> 0 then + begin + WriteLn('bad gzgets after gzseek'); + Halt(1); + end + else + WriteLn('gzgets() after gzseek: ', PChar(uncompr)); + + gzclose(zfile); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with small buffers + *) +{$IFDEF TEST_DEFLATE} +procedure test_deflate(compr: Pointer; comprLen: LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; + len: LongInt; +begin + len := StrLen(hello)+1; + + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, 'deflateInit'); + + c_stream.next_in := hello; + c_stream.next_out := compr; + + while (c_stream.total_in <> len) and + (c_stream.total_out < comprLen) do + begin + c_stream.avail_out := 1; { force small buffers } + c_stream.avail_in := 1; + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + end; + + (* Finish the stream, still forcing small buffers: *) + while TRUE do + begin + c_stream.avail_out := 1; + err := deflate(c_stream, Z_FINISH); + if err = Z_STREAM_END then + break; + CHECK_ERR(err, 'deflate'); + end; + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); +end; +{$ENDIF} + +(* =========================================================================== + * Test inflate with small buffers + *) +{$IFDEF TEST_INFLATE} +procedure test_inflate(compr: Pointer; comprLen : LongInt; + uncompr: Pointer; uncomprLen : LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := 0; + d_stream.next_out := uncompr; + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + while (d_stream.total_out < uncomprLen) and + (d_stream.total_in < comprLen) do + begin + d_stream.avail_out := 1; (* force small buffers *) + d_stream.avail_in := 1; + err := inflate(d_stream, Z_NO_FLUSH); + if err = Z_STREAM_END then + break; + CHECK_ERR(err, 'inflate'); + end; + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + if StrComp(PChar(uncompr), hello) <> 0 then + EXIT_ERR('bad inflate') + else + WriteLn('inflate(): ', PChar(uncompr)); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with large buffers and dynamic change of compression level + *) +{$IFDEF TEST_DEFLATE} +procedure test_large_deflate(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; +begin + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_BEST_SPEED); + CHECK_ERR(err, 'deflateInit'); + + c_stream.next_out := compr; + c_stream.avail_out := Integer(comprLen); + + (* At this point, uncompr is still mostly zeroes, so it should compress + * very well: + *) + c_stream.next_in := uncompr; + c_stream.avail_in := Integer(uncomprLen); + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + if c_stream.avail_in <> 0 then + EXIT_ERR('deflate not greedy'); + + (* Feed in already compressed data and switch to no compression: *) + deflateParams(c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); + c_stream.next_in := compr; + c_stream.avail_in := Integer(comprLen div 2); + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + + (* Switch back to compressing mode: *) + deflateParams(c_stream, Z_BEST_COMPRESSION, Z_FILTERED); + c_stream.next_in := uncompr; + c_stream.avail_in := Integer(uncomprLen); + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + + err := deflate(c_stream, Z_FINISH); + if err <> Z_STREAM_END then + EXIT_ERR('deflate should report Z_STREAM_END'); + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); +end; +{$ENDIF} + +(* =========================================================================== + * Test inflate with large buffers + *) +{$IFDEF TEST_INFLATE} +procedure test_large_inflate(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := Integer(comprLen); + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + while TRUE do + begin + d_stream.next_out := uncompr; (* discard the output *) + d_stream.avail_out := Integer(uncomprLen); + err := inflate(d_stream, Z_NO_FLUSH); + if err = Z_STREAM_END then + break; + CHECK_ERR(err, 'large inflate'); + end; + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + if d_stream.total_out <> 2 * uncomprLen + comprLen div 2 then + begin + WriteLn('bad large inflate: ', d_stream.total_out); + Halt(1); + end + else + WriteLn('large_inflate(): OK'); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with full flush + *) +{$IFDEF TEST_FLUSH} +procedure test_flush(compr: Pointer; var comprLen : LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; + len: Integer; +begin + len := StrLen(hello)+1; + + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, 'deflateInit'); + + c_stream.next_in := hello; + c_stream.next_out := compr; + c_stream.avail_in := 3; + c_stream.avail_out := Integer(comprLen); + err := deflate(c_stream, Z_FULL_FLUSH); + CHECK_ERR(err, 'deflate'); + + Inc(PByteArray(compr)^[3]); (* force an error in first compressed block *) + c_stream.avail_in := len - 3; + + err := deflate(c_stream, Z_FINISH); + if err <> Z_STREAM_END then + CHECK_ERR(err, 'deflate'); + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); + + comprLen := c_stream.total_out; +end; +{$ENDIF} + +(* =========================================================================== + * Test inflateSync() + *) +{$IFDEF TEST_SYNC} +procedure test_sync(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen : LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := 2; (* just read the zlib header *) + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + d_stream.next_out := uncompr; + d_stream.avail_out := Integer(uncomprLen); + + inflate(d_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'inflate'); + + d_stream.avail_in := Integer(comprLen-2); (* read all compressed data *) + err := inflateSync(d_stream); (* but skip the damaged part *) + CHECK_ERR(err, 'inflateSync'); + + err := inflate(d_stream, Z_FINISH); + if err <> Z_DATA_ERROR then + EXIT_ERR('inflate should report DATA_ERROR'); + (* Because of incorrect adler32 *) + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + WriteLn('after inflateSync(): hel', PChar(uncompr)); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with preset dictionary + *) +{$IFDEF TEST_DICT} +procedure test_dict_deflate(compr: Pointer; comprLen: LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; +begin + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_BEST_COMPRESSION); + CHECK_ERR(err, 'deflateInit'); + + err := deflateSetDictionary(c_stream, dictionary, StrLen(dictionary)); + CHECK_ERR(err, 'deflateSetDictionary'); + + dictId := c_stream.adler; + c_stream.next_out := compr; + c_stream.avail_out := Integer(comprLen); + + c_stream.next_in := hello; + c_stream.avail_in := StrLen(hello)+1; + + err := deflate(c_stream, Z_FINISH); + if err <> Z_STREAM_END then + EXIT_ERR('deflate should report Z_STREAM_END'); + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); +end; +{$ENDIF} + +(* =========================================================================== + * Test inflate with a preset dictionary + *) +{$IFDEF TEST_DICT} +procedure test_dict_inflate(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := Integer(comprLen); + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + d_stream.next_out := uncompr; + d_stream.avail_out := Integer(uncomprLen); + + while TRUE do + begin + err := inflate(d_stream, Z_NO_FLUSH); + if err = Z_STREAM_END then + break; + if err = Z_NEED_DICT then + begin + if d_stream.adler <> dictId then + EXIT_ERR('unexpected dictionary'); + err := inflateSetDictionary(d_stream, dictionary, StrLen(dictionary)); + end; + CHECK_ERR(err, 'inflate with dict'); + end; + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + if StrComp(PChar(uncompr), hello) <> 0 then + EXIT_ERR('bad inflate with dict') + else + WriteLn('inflate with dictionary: ', PChar(uncompr)); +end; +{$ENDIF} + +var compr, uncompr: Pointer; + comprLen, uncomprLen: LongInt; + +begin + if zlibVersion^ <> ZLIB_VERSION[1] then + EXIT_ERR('Incompatible zlib version'); + + WriteLn('zlib version: ', zlibVersion); + WriteLn('zlib compile flags: ', Format('0x%x', [zlibCompileFlags])); + + comprLen := 10000 * SizeOf(Integer); (* don't overflow on MSDOS *) + uncomprLen := comprLen; + GetMem(compr, comprLen); + GetMem(uncompr, uncomprLen); + if (compr = NIL) or (uncompr = NIL) then + EXIT_ERR('Out of memory'); + (* compr and uncompr are cleared to avoid reading uninitialized + * data and to ensure that uncompr compresses well. + *) + FillChar(compr^, comprLen, 0); + FillChar(uncompr^, uncomprLen, 0); + + {$IFDEF TEST_COMPRESS} + WriteLn('** Testing compress'); + test_compress(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_GZIO} + WriteLn('** Testing gzio'); + if ParamCount >= 1 then + test_gzio(ParamStr(1), uncompr, uncomprLen) + else + test_gzio(TESTFILE, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_DEFLATE} + WriteLn('** Testing deflate with small buffers'); + test_deflate(compr, comprLen); + {$ENDIF} + {$IFDEF TEST_INFLATE} + WriteLn('** Testing inflate with small buffers'); + test_inflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_DEFLATE} + WriteLn('** Testing deflate with large buffers'); + test_large_deflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + {$IFDEF TEST_INFLATE} + WriteLn('** Testing inflate with large buffers'); + test_large_inflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_FLUSH} + WriteLn('** Testing deflate with full flush'); + test_flush(compr, comprLen); + {$ENDIF} + {$IFDEF TEST_SYNC} + WriteLn('** Testing inflateSync'); + test_sync(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + comprLen := uncomprLen; + + {$IFDEF TEST_DICT} + WriteLn('** Testing deflate and inflate with preset dictionary'); + test_dict_deflate(compr, comprLen); + test_dict_inflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + FreeMem(compr, comprLen); + FreeMem(uncompr, uncomprLen); +end. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/readme.txt new file mode 100644 index 000000000..60e87c8a3 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/readme.txt @@ -0,0 +1,76 @@ + +This directory contains a Pascal (Delphi, Kylix) interface to the +zlib data compression library. + + +Directory listing +================= + +zlibd32.mak makefile for Borland C++ +example.pas usage example of zlib +zlibpas.pas the Pascal interface to zlib +readme.txt this file + + +Compatibility notes +=================== + +- Although the name "zlib" would have been more normal for the + zlibpas unit, this name is already taken by Borland's ZLib unit. + This is somehow unfortunate, because that unit is not a genuine + interface to the full-fledged zlib functionality, but a suite of + class wrappers around zlib streams. Other essential features, + such as checksums, are missing. + It would have been more appropriate for that unit to have a name + like "ZStreams", or something similar. + +- The C and zlib-supplied types int, uInt, long, uLong, etc. are + translated directly into Pascal types of similar sizes (Integer, + LongInt, etc.), to avoid namespace pollution. In particular, + there is no conversion of unsigned int into a Pascal unsigned + integer. The Word type is non-portable and has the same size + (16 bits) both in a 16-bit and in a 32-bit environment, unlike + Integer. Even if there is a 32-bit Cardinal type, there is no + real need for unsigned int in zlib under a 32-bit environment. + +- Except for the callbacks, the zlib function interfaces are + assuming the calling convention normally used in Pascal + (__pascal for DOS and Windows16, __fastcall for Windows32). + Since the cdecl keyword is used, the old Turbo Pascal does + not work with this interface. + +- The gz* function interfaces are not translated, to avoid + interfacing problems with the C runtime library. Besides, + gzprintf(gzFile file, const char *format, ...) + cannot be translated into Pascal. + + +Legal issues +============ + +The zlibpas interface is: + Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler. + Copyright (C) 1998 by Bob Dellaca. + Copyright (C) 2003 by Cosmin Truta. + +The example program is: + Copyright (C) 1995-2003 by Jean-loup Gailly. + Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali. + Copyright (C) 2003 by Cosmin Truta. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibd32.mak b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibd32.mak new file mode 100644 index 000000000..9bb00b7cc --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibd32.mak @@ -0,0 +1,99 @@ +# Makefile for zlib +# For use with Delphi and C++ Builder under Win32 +# Updated for zlib 1.2.x by Cosmin Truta + +# ------------ Borland C++ ------------ + +# This project uses the Delphi (fastcall/register) calling convention: +LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl + +CC = bcc32 +LD = bcc32 +AR = tlib +# do not use "-pr" in CFLAGS +CFLAGS = -a -d -k- -O2 $(LOC) +LDFLAGS = + + +# variables +ZLIB_LIB = zlib.lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: test/example.c zlib.h zconf.h + +minigzip.obj: test/minigzip.c zlib.h zconf.h + + +# For the sake of the old Borland make, +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + + +# cleanup +clean: + -del *.obj + -del *.exe + -del *.lib + -del *.tds + -del zlib.bak + -del foo.gz + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibpas.pas b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibpas.pas new file mode 100644 index 000000000..a0dff11b5 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/pascal/zlibpas.pas @@ -0,0 +1,276 @@ +(* zlibpas -- Pascal interface to the zlib data compression library + * + * Copyright (C) 2003 Cosmin Truta. + * Derived from original sources by Bob Dellaca. + * For conditions of distribution and use, see copyright notice in readme.txt + *) + +unit zlibpas; + +interface + +const + ZLIB_VERSION = '1.2.11'; + ZLIB_VERNUM = $12a0; + +type + alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; + cdecl; + free_func = procedure(opaque, address: Pointer); + cdecl; + + in_func = function(opaque: Pointer; var buf: PByte): Integer; + cdecl; + out_func = function(opaque: Pointer; buf: PByte; size: Integer): Integer; + cdecl; + + z_streamp = ^z_stream; + z_stream = packed record + next_in: PChar; (* next input byte *) + avail_in: Integer; (* number of bytes available at next_in *) + total_in: LongInt; (* total nb of input bytes read so far *) + + next_out: PChar; (* next output byte should be put there *) + avail_out: Integer; (* remaining free space at next_out *) + total_out: LongInt; (* total nb of bytes output so far *) + + msg: PChar; (* last error message, NULL if no error *) + state: Pointer; (* not visible by applications *) + + zalloc: alloc_func; (* used to allocate the internal state *) + zfree: free_func; (* used to free the internal state *) + opaque: Pointer; (* private data object passed to zalloc and zfree *) + + data_type: Integer; (* best guess about the data type: ascii or binary *) + adler: LongInt; (* adler32 value of the uncompressed data *) + reserved: LongInt; (* reserved for future use *) + end; + + gz_headerp = ^gz_header; + gz_header = packed record + text: Integer; (* true if compressed data believed to be text *) + time: LongInt; (* modification time *) + xflags: Integer; (* extra flags (not used when writing a gzip file) *) + os: Integer; (* operating system *) + extra: PChar; (* pointer to extra field or Z_NULL if none *) + extra_len: Integer; (* extra field length (valid if extra != Z_NULL) *) + extra_max: Integer; (* space at extra (only when reading header) *) + name: PChar; (* pointer to zero-terminated file name or Z_NULL *) + name_max: Integer; (* space at name (only when reading header) *) + comment: PChar; (* pointer to zero-terminated comment or Z_NULL *) + comm_max: Integer; (* space at comment (only when reading header) *) + hcrc: Integer; (* true if there was or will be a header crc *) + done: Integer; (* true when done reading gzip header *) + end; + +(* constants *) +const + Z_NO_FLUSH = 0; + Z_PARTIAL_FLUSH = 1; + Z_SYNC_FLUSH = 2; + Z_FULL_FLUSH = 3; + Z_FINISH = 4; + Z_BLOCK = 5; + Z_TREES = 6; + + Z_OK = 0; + Z_STREAM_END = 1; + Z_NEED_DICT = 2; + Z_ERRNO = -1; + Z_STREAM_ERROR = -2; + Z_DATA_ERROR = -3; + Z_MEM_ERROR = -4; + Z_BUF_ERROR = -5; + Z_VERSION_ERROR = -6; + + Z_NO_COMPRESSION = 0; + Z_BEST_SPEED = 1; + Z_BEST_COMPRESSION = 9; + Z_DEFAULT_COMPRESSION = -1; + + Z_FILTERED = 1; + Z_HUFFMAN_ONLY = 2; + Z_RLE = 3; + Z_FIXED = 4; + Z_DEFAULT_STRATEGY = 0; + + Z_BINARY = 0; + Z_TEXT = 1; + Z_ASCII = 1; + Z_UNKNOWN = 2; + + Z_DEFLATED = 8; + +(* basic functions *) +function zlibVersion: PChar; +function deflateInit(var strm: z_stream; level: Integer): Integer; +function deflate(var strm: z_stream; flush: Integer): Integer; +function deflateEnd(var strm: z_stream): Integer; +function inflateInit(var strm: z_stream): Integer; +function inflate(var strm: z_stream; flush: Integer): Integer; +function inflateEnd(var strm: z_stream): Integer; + +(* advanced functions *) +function deflateInit2(var strm: z_stream; level, method, windowBits, + memLevel, strategy: Integer): Integer; +function deflateSetDictionary(var strm: z_stream; const dictionary: PChar; + dictLength: Integer): Integer; +function deflateCopy(var dest, source: z_stream): Integer; +function deflateReset(var strm: z_stream): Integer; +function deflateParams(var strm: z_stream; level, strategy: Integer): Integer; +function deflateTune(var strm: z_stream; good_length, max_lazy, nice_length, max_chain: Integer): Integer; +function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt; +function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer; +function deflatePrime(var strm: z_stream; bits, value: Integer): Integer; +function deflateSetHeader(var strm: z_stream; head: gz_header): Integer; +function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; +function inflateSetDictionary(var strm: z_stream; const dictionary: PChar; + dictLength: Integer): Integer; +function inflateSync(var strm: z_stream): Integer; +function inflateCopy(var dest, source: z_stream): Integer; +function inflateReset(var strm: z_stream): Integer; +function inflateReset2(var strm: z_stream; windowBits: Integer): Integer; +function inflatePrime(var strm: z_stream; bits, value: Integer): Integer; +function inflateMark(var strm: z_stream): LongInt; +function inflateGetHeader(var strm: z_stream; var head: gz_header): Integer; +function inflateBackInit(var strm: z_stream; + windowBits: Integer; window: PChar): Integer; +function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer; + out_fn: out_func; out_desc: Pointer): Integer; +function inflateBackEnd(var strm: z_stream): Integer; +function zlibCompileFlags: LongInt; + +(* utility functions *) +function compress(dest: PChar; var destLen: LongInt; + const source: PChar; sourceLen: LongInt): Integer; +function compress2(dest: PChar; var destLen: LongInt; + const source: PChar; sourceLen: LongInt; + level: Integer): Integer; +function compressBound(sourceLen: LongInt): LongInt; +function uncompress(dest: PChar; var destLen: LongInt; + const source: PChar; sourceLen: LongInt): Integer; + +(* checksum functions *) +function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; +function adler32_combine(adler1, adler2, len2: LongInt): LongInt; +function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt; +function crc32_combine(crc1, crc2, len2: LongInt): LongInt; + +(* various hacks, don't look :) *) +function deflateInit_(var strm: z_stream; level: Integer; + const version: PChar; stream_size: Integer): Integer; +function inflateInit_(var strm: z_stream; const version: PChar; + stream_size: Integer): Integer; +function deflateInit2_(var strm: z_stream; + level, method, windowBits, memLevel, strategy: Integer; + const version: PChar; stream_size: Integer): Integer; +function inflateInit2_(var strm: z_stream; windowBits: Integer; + const version: PChar; stream_size: Integer): Integer; +function inflateBackInit_(var strm: z_stream; + windowBits: Integer; window: PChar; + const version: PChar; stream_size: Integer): Integer; + + +implementation + +{$L adler32.obj} +{$L compress.obj} +{$L crc32.obj} +{$L deflate.obj} +{$L infback.obj} +{$L inffast.obj} +{$L inflate.obj} +{$L inftrees.obj} +{$L trees.obj} +{$L uncompr.obj} +{$L zutil.obj} + +function adler32; external; +function adler32_combine; external; +function compress; external; +function compress2; external; +function compressBound; external; +function crc32; external; +function crc32_combine; external; +function deflate; external; +function deflateBound; external; +function deflateCopy; external; +function deflateEnd; external; +function deflateInit_; external; +function deflateInit2_; external; +function deflateParams; external; +function deflatePending; external; +function deflatePrime; external; +function deflateReset; external; +function deflateSetDictionary; external; +function deflateSetHeader; external; +function deflateTune; external; +function inflate; external; +function inflateBack; external; +function inflateBackEnd; external; +function inflateBackInit_; external; +function inflateCopy; external; +function inflateEnd; external; +function inflateGetHeader; external; +function inflateInit_; external; +function inflateInit2_; external; +function inflateMark; external; +function inflatePrime; external; +function inflateReset; external; +function inflateReset2; external; +function inflateSetDictionary; external; +function inflateSync; external; +function uncompress; external; +function zlibCompileFlags; external; +function zlibVersion; external; + +function deflateInit(var strm: z_stream; level: Integer): Integer; +begin + Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream)); +end; + +function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel, + strategy: Integer): Integer; +begin + Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + ZLIB_VERSION, sizeof(z_stream)); +end; + +function inflateInit(var strm: z_stream): Integer; +begin + Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream)); +end; + +function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; +begin + Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream)); +end; + +function inflateBackInit(var strm: z_stream; + windowBits: Integer; window: PChar): Integer; +begin + Result := inflateBackInit_(strm, windowBits, window, + ZLIB_VERSION, sizeof(z_stream)); +end; + +function _malloc(Size: Integer): Pointer; cdecl; +begin + GetMem(Result, Size); +end; + +procedure _free(Block: Pointer); cdecl; +begin + FreeMem(Block); +end; + +procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl; +begin + FillChar(P^, count, B); +end; + +procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; +begin + Move(source^, dest^, count); +end; + +end. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/Makefile b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/Makefile new file mode 100644 index 000000000..0e2594c80 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/Makefile @@ -0,0 +1,42 @@ +CFLAGS=-O + +puff: puff.o pufftest.o + +puff.o: puff.h + +pufftest.o: puff.h + +test: puff + puff zeros.raw + +puft: puff.c puff.h pufftest.o + cc -fprofile-arcs -ftest-coverage -o puft puff.c pufftest.o + +# puff full coverage test (should say 100%) +cov: puft + @rm -f *.gcov *.gcda + @puft -w zeros.raw 2>&1 | cat > /dev/null + @echo '04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 + @echo '00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 + @echo '00 00 00 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 254 + @echo '00 01 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 + @echo '01 01 00 fe ff 0a' | xxd -r -p | puft -f 2>&1 | cat > /dev/null + @echo '02 7e ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 + @echo '02' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 + @echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 + @echo '04 80 49 92 24 49 92 24 71 ff ff 93 11 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 249 + @echo '04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 + @echo '0b 00 00' | xxd -r -p | puft -f 2>&1 | cat > /dev/null + @echo '1a 07' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 + @echo '0c c0 81 00 00 00 00 00 90 ff 6b 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 245 + @puft -f zeros.raw 2>&1 | cat > /dev/null + @echo 'fc 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 253 + @echo '04 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 252 + @echo '04 00 24 49' | xxd -r -p | puft 2> /dev/null || test $$? -eq 251 + @echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 84' | xxd -r -p | puft 2> /dev/null || test $$? -eq 248 + @echo '04 00 24 e9 ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 250 + @echo '04 00 24 e9 ff 6d' | xxd -r -p | puft 2> /dev/null || test $$? -eq 247 + @gcov -n puff.c + +clean: + rm -f puff puft *.o *.gc* diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/README new file mode 100644 index 000000000..bbc4cb595 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/README @@ -0,0 +1,63 @@ +Puff -- A Simple Inflate +3 Mar 2003 +Mark Adler +madler@alumni.caltech.edu + +What this is -- + +puff.c provides the routine puff() to decompress the deflate data format. It +does so more slowly than zlib, but the code is about one-fifth the size of the +inflate code in zlib, and written to be very easy to read. + +Why I wrote this -- + +puff.c was written to document the deflate format unambiguously, by virtue of +being working C code. It is meant to supplement RFC 1951, which formally +describes the deflate format. I have received many questions on details of the +deflate format, and I hope that reading this code will answer those questions. +puff.c is heavily commented with details of the deflate format, especially +those little nooks and cranies of the format that might not be obvious from a +specification. + +puff.c may also be useful in applications where code size or memory usage is a +very limited resource, and speed is not as important. + +How to use it -- + +Well, most likely you should just be reading puff.c and using zlib for actual +applications, but if you must ... + +Include puff.h in your code, which provides this prototype: + +int puff(unsigned char *dest, /* pointer to destination pointer */ + unsigned long *destlen, /* amount of output space */ + unsigned char *source, /* pointer to source data pointer */ + unsigned long *sourcelen); /* amount of input available */ + +Then you can call puff() to decompress a deflate stream that is in memory in +its entirety at source, to a sufficiently sized block of memory for the +decompressed data at dest. puff() is the only external symbol in puff.c The +only C library functions that puff.c needs are setjmp() and longjmp(), which +are used to simplify error checking in the code to improve readabilty. puff.c +does no memory allocation, and uses less than 2K bytes off of the stack. + +If destlen is not enough space for the uncompressed data, then inflate will +return an error without writing more than destlen bytes. Note that this means +that in order to decompress the deflate data successfully, you need to know +the size of the uncompressed data ahead of time. + +If needed, puff() can determine the size of the uncompressed data with no +output space. This is done by passing dest equal to (unsigned char *)0. Then +the initial value of *destlen is ignored and *destlen is set to the length of +the uncompressed data. So if the size of the uncompressed data is not known, +then two passes of puff() can be used--first to determine the size, and second +to do the actual inflation after allocating the appropriate memory. Not +pretty, but it works. (This is one of the reasons you should be using zlib.) + +The deflate format is self-terminating. If the deflate stream does not end +in *sourcelen bytes, puff() will return an error without reading at or past +endsource. + +On return, *sourcelen is updated to the amount of input data consumed, and +*destlen is updated to the size of the uncompressed data. See the comments +in puff.c for the possible return codes for puff(). diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.c new file mode 100644 index 000000000..c6c90d714 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.c @@ -0,0 +1,840 @@ +/* + * puff.c + * Copyright (C) 2002-2013 Mark Adler + * For conditions of distribution and use, see copyright notice in puff.h + * version 2.3, 21 Jan 2013 + * + * puff.c is a simple inflate written to be an unambiguous way to specify the + * deflate format. It is not written for speed but rather simplicity. As a + * side benefit, this code might actually be useful when small code is more + * important than speed, such as bootstrap applications. For typical deflate + * data, zlib's inflate() is about four times as fast as puff(). zlib's + * inflate compiles to around 20K on my machine, whereas puff.c compiles to + * around 4K on my machine (a PowerPC using GNU cc). If the faster decode() + * function here is used, then puff() is only twice as slow as zlib's + * inflate(). + * + * All dynamically allocated memory comes from the stack. The stack required + * is less than 2K bytes. This code is compatible with 16-bit int's and + * assumes that long's are at least 32 bits. puff.c uses the short data type, + * assumed to be 16 bits, for arrays in order to conserve memory. The code + * works whether integers are stored big endian or little endian. + * + * In the comments below are "Format notes" that describe the inflate process + * and document some of the less obvious aspects of the format. This source + * code is meant to supplement RFC 1951, which formally describes the deflate + * format: + * + * http://www.zlib.org/rfc-deflate.html + */ + +/* + * Change history: + * + * 1.0 10 Feb 2002 - First version + * 1.1 17 Feb 2002 - Clarifications of some comments and notes + * - Update puff() dest and source pointers on negative + * errors to facilitate debugging deflators + * - Remove longest from struct huffman -- not needed + * - Simplify offs[] index in construct() + * - Add input size and checking, using longjmp() to + * maintain easy readability + * - Use short data type for large arrays + * - Use pointers instead of long to specify source and + * destination sizes to avoid arbitrary 4 GB limits + * 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!), + * but leave simple version for readabilty + * - Make sure invalid distances detected if pointers + * are 16 bits + * - Fix fixed codes table error + * - Provide a scanning mode for determining size of + * uncompressed data + * 1.3 20 Mar 2002 - Go back to lengths for puff() parameters [Gailly] + * - Add a puff.h file for the interface + * - Add braces in puff() for else do [Gailly] + * - Use indexes instead of pointers for readability + * 1.4 31 Mar 2002 - Simplify construct() code set check + * - Fix some comments + * - Add FIXLCODES #define + * 1.5 6 Apr 2002 - Minor comment fixes + * 1.6 7 Aug 2002 - Minor format changes + * 1.7 3 Mar 2003 - Added test code for distribution + * - Added zlib-like license + * 1.8 9 Jan 2004 - Added some comments on no distance codes case + * 1.9 21 Feb 2008 - Fix bug on 16-bit integer architectures [Pohland] + * - Catch missing end-of-block symbol error + * 2.0 25 Jul 2008 - Add #define to permit distance too far back + * - Add option in TEST code for puff to write the data + * - Add option in TEST code to skip input bytes + * - Allow TEST code to read from piped stdin + * 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers + * - Avoid unsigned comparisons for even happier compilers + * 2.2 25 Apr 2010 - Fix bug in variable initializations [Oberhumer] + * - Add const where appropriate [Oberhumer] + * - Split if's and ?'s for coverage testing + * - Break out test code to separate file + * - Move NIL to puff.h + * - Allow incomplete code only if single code length is 1 + * - Add full code coverage test to Makefile + * 2.3 21 Jan 2013 - Check for invalid code length codes in dynamic blocks + */ + +#include /* for setjmp(), longjmp(), and jmp_buf */ +#include "puff.h" /* prototype for puff() */ + +#define local static /* for local function definitions */ + +/* + * Maximums for allocations and loops. It is not useful to change these -- + * they are fixed by the deflate format. + */ +#define MAXBITS 15 /* maximum bits in a code */ +#define MAXLCODES 286 /* maximum number of literal/length codes */ +#define MAXDCODES 30 /* maximum number of distance codes */ +#define MAXCODES (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */ +#define FIXLCODES 288 /* number of fixed literal/length codes */ + +/* input and output state */ +struct state { + /* output state */ + unsigned char *out; /* output buffer */ + unsigned long outlen; /* available space at out */ + unsigned long outcnt; /* bytes written to out so far */ + + /* input state */ + const unsigned char *in; /* input buffer */ + unsigned long inlen; /* available input at in */ + unsigned long incnt; /* bytes read so far */ + int bitbuf; /* bit buffer */ + int bitcnt; /* number of bits in bit buffer */ + + /* input limit error return state for bits() and decode() */ + jmp_buf env; +}; + +/* + * Return need bits from the input stream. This always leaves less than + * eight bits in the buffer. bits() works properly for need == 0. + * + * Format notes: + * + * - Bits are stored in bytes from the least significant bit to the most + * significant bit. Therefore bits are dropped from the bottom of the bit + * buffer, using shift right, and new bytes are appended to the top of the + * bit buffer, using shift left. + */ +local int bits(struct state *s, int need) +{ + long val; /* bit accumulator (can use up to 20 bits) */ + + /* load at least need bits into val */ + val = s->bitbuf; + while (s->bitcnt < need) { + if (s->incnt == s->inlen) + longjmp(s->env, 1); /* out of input */ + val |= (long)(s->in[s->incnt++]) << s->bitcnt; /* load eight bits */ + s->bitcnt += 8; + } + + /* drop need bits and update buffer, always zero to seven bits left */ + s->bitbuf = (int)(val >> need); + s->bitcnt -= need; + + /* return need bits, zeroing the bits above that */ + return (int)(val & ((1L << need) - 1)); +} + +/* + * Process a stored block. + * + * Format notes: + * + * - After the two-bit stored block type (00), the stored block length and + * stored bytes are byte-aligned for fast copying. Therefore any leftover + * bits in the byte that has the last bit of the type, as many as seven, are + * discarded. The value of the discarded bits are not defined and should not + * be checked against any expectation. + * + * - The second inverted copy of the stored block length does not have to be + * checked, but it's probably a good idea to do so anyway. + * + * - A stored block can have zero length. This is sometimes used to byte-align + * subsets of the compressed data for random access or partial recovery. + */ +local int stored(struct state *s) +{ + unsigned len; /* length of stored block */ + + /* discard leftover bits from current byte (assumes s->bitcnt < 8) */ + s->bitbuf = 0; + s->bitcnt = 0; + + /* get length and check against its one's complement */ + if (s->incnt + 4 > s->inlen) + return 2; /* not enough input */ + len = s->in[s->incnt++]; + len |= s->in[s->incnt++] << 8; + if (s->in[s->incnt++] != (~len & 0xff) || + s->in[s->incnt++] != ((~len >> 8) & 0xff)) + return -2; /* didn't match complement! */ + + /* copy len bytes from in to out */ + if (s->incnt + len > s->inlen) + return 2; /* not enough input */ + if (s->out != NIL) { + if (s->outcnt + len > s->outlen) + return 1; /* not enough output space */ + while (len--) + s->out[s->outcnt++] = s->in[s->incnt++]; + } + else { /* just scanning */ + s->outcnt += len; + s->incnt += len; + } + + /* done with a valid stored block */ + return 0; +} + +/* + * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of + * each length, which for a canonical code are stepped through in order. + * symbol[] are the symbol values in canonical order, where the number of + * entries is the sum of the counts in count[]. The decoding process can be + * seen in the function decode() below. + */ +struct huffman { + short *count; /* number of symbols of each length */ + short *symbol; /* canonically ordered symbols */ +}; + +/* + * Decode a code from the stream s using huffman table h. Return the symbol or + * a negative value if there is an error. If all of the lengths are zero, i.e. + * an empty code, or if the code is incomplete and an invalid code is received, + * then -10 is returned after reading MAXBITS bits. + * + * Format notes: + * + * - The codes as stored in the compressed data are bit-reversed relative to + * a simple integer ordering of codes of the same lengths. Hence below the + * bits are pulled from the compressed data one at a time and used to + * build the code value reversed from what is in the stream in order to + * permit simple integer comparisons for decoding. A table-based decoding + * scheme (as used in zlib) does not need to do this reversal. + * + * - The first code for the shortest length is all zeros. Subsequent codes of + * the same length are simply integer increments of the previous code. When + * moving up a length, a zero bit is appended to the code. For a complete + * code, the last code of the longest length will be all ones. + * + * - Incomplete codes are handled by this decoder, since they are permitted + * in the deflate format. See the format notes for fixed() and dynamic(). + */ +#ifdef SLOW +local int decode(struct state *s, const struct huffman *h) +{ + int len; /* current number of bits in code */ + int code; /* len bits being decoded */ + int first; /* first code of length len */ + int count; /* number of codes of length len */ + int index; /* index of first code of length len in symbol table */ + + code = first = index = 0; + for (len = 1; len <= MAXBITS; len++) { + code |= bits(s, 1); /* get next bit */ + count = h->count[len]; + if (code - count < first) /* if length len, return symbol */ + return h->symbol[index + (code - first)]; + index += count; /* else update for next length */ + first += count; + first <<= 1; + code <<= 1; + } + return -10; /* ran out of codes */ +} + +/* + * A faster version of decode() for real applications of this code. It's not + * as readable, but it makes puff() twice as fast. And it only makes the code + * a few percent larger. + */ +#else /* !SLOW */ +local int decode(struct state *s, const struct huffman *h) +{ + int len; /* current number of bits in code */ + int code; /* len bits being decoded */ + int first; /* first code of length len */ + int count; /* number of codes of length len */ + int index; /* index of first code of length len in symbol table */ + int bitbuf; /* bits from stream */ + int left; /* bits left in next or left to process */ + short *next; /* next number of codes */ + + bitbuf = s->bitbuf; + left = s->bitcnt; + code = first = index = 0; + len = 1; + next = h->count + 1; + while (1) { + while (left--) { + code |= bitbuf & 1; + bitbuf >>= 1; + count = *next++; + if (code - count < first) { /* if length len, return symbol */ + s->bitbuf = bitbuf; + s->bitcnt = (s->bitcnt - len) & 7; + return h->symbol[index + (code - first)]; + } + index += count; /* else update for next length */ + first += count; + first <<= 1; + code <<= 1; + len++; + } + left = (MAXBITS+1) - len; + if (left == 0) + break; + if (s->incnt == s->inlen) + longjmp(s->env, 1); /* out of input */ + bitbuf = s->in[s->incnt++]; + if (left > 8) + left = 8; + } + return -10; /* ran out of codes */ +} +#endif /* SLOW */ + +/* + * Given the list of code lengths length[0..n-1] representing a canonical + * Huffman code for n symbols, construct the tables required to decode those + * codes. Those tables are the number of codes of each length, and the symbols + * sorted by length, retaining their original order within each length. The + * return value is zero for a complete code set, negative for an over- + * subscribed code set, and positive for an incomplete code set. The tables + * can be used if the return value is zero or positive, but they cannot be used + * if the return value is negative. If the return value is zero, it is not + * possible for decode() using that table to return an error--any stream of + * enough bits will resolve to a symbol. If the return value is positive, then + * it is possible for decode() using that table to return an error for received + * codes past the end of the incomplete lengths. + * + * Not used by decode(), but used for error checking, h->count[0] is the number + * of the n symbols not in the code. So n - h->count[0] is the number of + * codes. This is useful for checking for incomplete codes that have more than + * one symbol, which is an error in a dynamic block. + * + * Assumption: for all i in 0..n-1, 0 <= length[i] <= MAXBITS + * This is assured by the construction of the length arrays in dynamic() and + * fixed() and is not verified by construct(). + * + * Format notes: + * + * - Permitted and expected examples of incomplete codes are one of the fixed + * codes and any code with a single symbol which in deflate is coded as one + * bit instead of zero bits. See the format notes for fixed() and dynamic(). + * + * - Within a given code length, the symbols are kept in ascending order for + * the code bits definition. + */ +local int construct(struct huffman *h, const short *length, int n) +{ + int symbol; /* current symbol when stepping through length[] */ + int len; /* current length when stepping through h->count[] */ + int left; /* number of possible codes left of current length */ + short offs[MAXBITS+1]; /* offsets in symbol table for each length */ + + /* count number of codes of each length */ + for (len = 0; len <= MAXBITS; len++) + h->count[len] = 0; + for (symbol = 0; symbol < n; symbol++) + (h->count[length[symbol]])++; /* assumes lengths are within bounds */ + if (h->count[0] == n) /* no codes! */ + return 0; /* complete, but decode() will fail */ + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; /* one possible code of zero length */ + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; /* one more bit, double codes left */ + left -= h->count[len]; /* deduct count from possible codes */ + if (left < 0) + return left; /* over-subscribed--return negative */ + } /* left > 0 means incomplete */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + h->count[len]; + + /* + * put symbols in table sorted by length, by symbol order within each + * length + */ + for (symbol = 0; symbol < n; symbol++) + if (length[symbol] != 0) + h->symbol[offs[length[symbol]]++] = symbol; + + /* return zero for complete set, positive for incomplete set */ + return left; +} + +/* + * Decode literal/length and distance codes until an end-of-block code. + * + * Format notes: + * + * - Compressed data that is after the block type if fixed or after the code + * description if dynamic is a combination of literals and length/distance + * pairs terminated by and end-of-block code. Literals are simply Huffman + * coded bytes. A length/distance pair is a coded length followed by a + * coded distance to represent a string that occurs earlier in the + * uncompressed data that occurs again at the current location. + * + * - Literals, lengths, and the end-of-block code are combined into a single + * code of up to 286 symbols. They are 256 literals (0..255), 29 length + * symbols (257..285), and the end-of-block symbol (256). + * + * - There are 256 possible lengths (3..258), and so 29 symbols are not enough + * to represent all of those. Lengths 3..10 and 258 are in fact represented + * by just a length symbol. Lengths 11..257 are represented as a symbol and + * some number of extra bits that are added as an integer to the base length + * of the length symbol. The number of extra bits is determined by the base + * length symbol. These are in the static arrays below, lens[] for the base + * lengths and lext[] for the corresponding number of extra bits. + * + * - The reason that 258 gets its own symbol is that the longest length is used + * often in highly redundant files. Note that 258 can also be coded as the + * base value 227 plus the maximum extra value of 31. While a good deflate + * should never do this, it is not an error, and should be decoded properly. + * + * - If a length is decoded, including its extra bits if any, then it is + * followed a distance code. There are up to 30 distance symbols. Again + * there are many more possible distances (1..32768), so extra bits are added + * to a base value represented by the symbol. The distances 1..4 get their + * own symbol, but the rest require extra bits. The base distances and + * corresponding number of extra bits are below in the static arrays dist[] + * and dext[]. + * + * - Literal bytes are simply written to the output. A length/distance pair is + * an instruction to copy previously uncompressed bytes to the output. The + * copy is from distance bytes back in the output stream, copying for length + * bytes. + * + * - Distances pointing before the beginning of the output data are not + * permitted. + * + * - Overlapped copies, where the length is greater than the distance, are + * allowed and common. For example, a distance of one and a length of 258 + * simply copies the last byte 258 times. A distance of four and a length of + * twelve copies the last four bytes three times. A simple forward copy + * ignoring whether the length is greater than the distance or not implements + * this correctly. You should not use memcpy() since its behavior is not + * defined for overlapped arrays. You should not use memmove() or bcopy() + * since though their behavior -is- defined for overlapping arrays, it is + * defined to do the wrong thing in this case. + */ +local int codes(struct state *s, + const struct huffman *lencode, + const struct huffman *distcode) +{ + int symbol; /* decoded symbol */ + int len; /* length for copy */ + unsigned dist; /* distance for copy */ + static const short lens[29] = { /* Size base for length codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; + static const short lext[29] = { /* Extra bits for length codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; + static const short dists[30] = { /* Offset base for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; + static const short dext[30] = { /* Extra bits for distance codes 0..29 */ + 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}; + + /* decode literals and length/distance pairs */ + do { + symbol = decode(s, lencode); + if (symbol < 0) + return symbol; /* invalid symbol */ + if (symbol < 256) { /* literal: symbol is the byte */ + /* write out the literal */ + if (s->out != NIL) { + if (s->outcnt == s->outlen) + return 1; + s->out[s->outcnt] = symbol; + } + s->outcnt++; + } + else if (symbol > 256) { /* length */ + /* get and compute length */ + symbol -= 257; + if (symbol >= 29) + return -10; /* invalid fixed code */ + len = lens[symbol] + bits(s, lext[symbol]); + + /* get and check distance */ + symbol = decode(s, distcode); + if (symbol < 0) + return symbol; /* invalid symbol */ + dist = dists[symbol] + bits(s, dext[symbol]); +#ifndef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + if (dist > s->outcnt) + return -11; /* distance too far back */ +#endif + + /* copy length bytes from distance bytes back */ + if (s->out != NIL) { + if (s->outcnt + len > s->outlen) + return 1; + while (len--) { + s->out[s->outcnt] = +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + dist > s->outcnt ? + 0 : +#endif + s->out[s->outcnt - dist]; + s->outcnt++; + } + } + else + s->outcnt += len; + } + } while (symbol != 256); /* end of block symbol */ + + /* done with a valid fixed or dynamic block */ + return 0; +} + +/* + * Process a fixed codes block. + * + * Format notes: + * + * - This block type can be useful for compressing small amounts of data for + * which the size of the code descriptions in a dynamic block exceeds the + * benefit of custom codes for that block. For fixed codes, no bits are + * spent on code descriptions. Instead the code lengths for literal/length + * codes and distance codes are fixed. The specific lengths for each symbol + * can be seen in the "for" loops below. + * + * - The literal/length code is complete, but has two symbols that are invalid + * and should result in an error if received. This cannot be implemented + * simply as an incomplete code since those two symbols are in the "middle" + * of the code. They are eight bits long and the longest literal/length\ + * code is nine bits. Therefore the code must be constructed with those + * symbols, and the invalid symbols must be detected after decoding. + * + * - The fixed distance codes also have two invalid symbols that should result + * in an error if received. Since all of the distance codes are the same + * length, this can be implemented as an incomplete code. Then the invalid + * codes are detected while decoding. + */ +local int fixed(struct state *s) +{ + static int virgin = 1; + static short lencnt[MAXBITS+1], lensym[FIXLCODES]; + static short distcnt[MAXBITS+1], distsym[MAXDCODES]; + static struct huffman lencode, distcode; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + int symbol; + short lengths[FIXLCODES]; + + /* construct lencode and distcode */ + lencode.count = lencnt; + lencode.symbol = lensym; + distcode.count = distcnt; + distcode.symbol = distsym; + + /* literal/length table */ + for (symbol = 0; symbol < 144; symbol++) + lengths[symbol] = 8; + for (; symbol < 256; symbol++) + lengths[symbol] = 9; + for (; symbol < 280; symbol++) + lengths[symbol] = 7; + for (; symbol < FIXLCODES; symbol++) + lengths[symbol] = 8; + construct(&lencode, lengths, FIXLCODES); + + /* distance table */ + for (symbol = 0; symbol < MAXDCODES; symbol++) + lengths[symbol] = 5; + construct(&distcode, lengths, MAXDCODES); + + /* do this just once */ + virgin = 0; + } + + /* decode data until end-of-block code */ + return codes(s, &lencode, &distcode); +} + +/* + * Process a dynamic codes block. + * + * Format notes: + * + * - A dynamic block starts with a description of the literal/length and + * distance codes for that block. New dynamic blocks allow the compressor to + * rapidly adapt to changing data with new codes optimized for that data. + * + * - The codes used by the deflate format are "canonical", which means that + * the actual bits of the codes are generated in an unambiguous way simply + * from the number of bits in each code. Therefore the code descriptions + * are simply a list of code lengths for each symbol. + * + * - The code lengths are stored in order for the symbols, so lengths are + * provided for each of the literal/length symbols, and for each of the + * distance symbols. + * + * - If a symbol is not used in the block, this is represented by a zero as + * as the code length. This does not mean a zero-length code, but rather + * that no code should be created for this symbol. There is no way in the + * deflate format to represent a zero-length code. + * + * - The maximum number of bits in a code is 15, so the possible lengths for + * any code are 1..15. + * + * - The fact that a length of zero is not permitted for a code has an + * interesting consequence. Normally if only one symbol is used for a given + * code, then in fact that code could be represented with zero bits. However + * in deflate, that code has to be at least one bit. So for example, if + * only a single distance base symbol appears in a block, then it will be + * represented by a single code of length one, in particular one 0 bit. This + * is an incomplete code, since if a 1 bit is received, it has no meaning, + * and should result in an error. So incomplete distance codes of one symbol + * should be permitted, and the receipt of invalid codes should be handled. + * + * - It is also possible to have a single literal/length code, but that code + * must be the end-of-block code, since every dynamic block has one. This + * is not the most efficient way to create an empty block (an empty fixed + * block is fewer bits), but it is allowed by the format. So incomplete + * literal/length codes of one symbol should also be permitted. + * + * - If there are only literal codes and no lengths, then there are no distance + * codes. This is represented by one distance code with zero bits. + * + * - The list of up to 286 length/literal lengths and up to 30 distance lengths + * are themselves compressed using Huffman codes and run-length encoding. In + * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means + * that length, and the symbols 16, 17, and 18 are run-length instructions. + * Each of 16, 17, and 18 are follwed by extra bits to define the length of + * the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10 + * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols + * are common, hence the special coding for zero lengths. + * + * - The symbols for 0..18 are Huffman coded, and so that code must be + * described first. This is simply a sequence of up to 19 three-bit values + * representing no code (0) or the code length for that symbol (1..7). + * + * - A dynamic block starts with three fixed-size counts from which is computed + * the number of literal/length code lengths, the number of distance code + * lengths, and the number of code length code lengths (ok, you come up with + * a better name!) in the code descriptions. For the literal/length and + * distance codes, lengths after those provided are considered zero, i.e. no + * code. The code length code lengths are received in a permuted order (see + * the order[] array below) to make a short code length code length list more + * likely. As it turns out, very short and very long codes are less likely + * to be seen in a dynamic code description, hence what may appear initially + * to be a peculiar ordering. + * + * - Given the number of literal/length code lengths (nlen) and distance code + * lengths (ndist), then they are treated as one long list of nlen + ndist + * code lengths. Therefore run-length coding can and often does cross the + * boundary between the two sets of lengths. + * + * - So to summarize, the code description at the start of a dynamic block is + * three counts for the number of code lengths for the literal/length codes, + * the distance codes, and the code length codes. This is followed by the + * code length code lengths, three bits each. This is used to construct the + * code length code which is used to read the remainder of the lengths. Then + * the literal/length code lengths and distance lengths are read as a single + * set of lengths using the code length codes. Codes are constructed from + * the resulting two sets of lengths, and then finally you can start + * decoding actual compressed data in the block. + * + * - For reference, a "typical" size for the code description in a dynamic + * block is around 80 bytes. + */ +local int dynamic(struct state *s) +{ + int nlen, ndist, ncode; /* number of lengths in descriptor */ + int index; /* index of lengths[] */ + int err; /* construct() return value */ + short lengths[MAXCODES]; /* descriptor code lengths */ + short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ + short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ + struct huffman lencode, distcode; /* length and distance codes */ + static const short order[19] = /* permutation of code length codes */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + /* construct lencode and distcode */ + lencode.count = lencnt; + lencode.symbol = lensym; + distcode.count = distcnt; + distcode.symbol = distsym; + + /* get number of lengths in each table, check lengths */ + nlen = bits(s, 5) + 257; + ndist = bits(s, 5) + 1; + ncode = bits(s, 4) + 4; + if (nlen > MAXLCODES || ndist > MAXDCODES) + return -3; /* bad counts */ + + /* read code length code lengths (really), missing lengths are zero */ + for (index = 0; index < ncode; index++) + lengths[order[index]] = bits(s, 3); + for (; index < 19; index++) + lengths[order[index]] = 0; + + /* build huffman table for code lengths codes (use lencode temporarily) */ + err = construct(&lencode, lengths, 19); + if (err != 0) /* require complete code set here */ + return -4; + + /* read length/literal and distance code length tables */ + index = 0; + while (index < nlen + ndist) { + int symbol; /* decoded value */ + int len; /* last length to repeat */ + + symbol = decode(s, &lencode); + if (symbol < 0) + return symbol; /* invalid symbol */ + if (symbol < 16) /* length in 0..15 */ + lengths[index++] = symbol; + else { /* repeat instruction */ + len = 0; /* assume repeating zeros */ + if (symbol == 16) { /* repeat last length 3..6 times */ + if (index == 0) + return -5; /* no last length! */ + len = lengths[index - 1]; /* last length */ + symbol = 3 + bits(s, 2); + } + else if (symbol == 17) /* repeat zero 3..10 times */ + symbol = 3 + bits(s, 3); + else /* == 18, repeat zero 11..138 times */ + symbol = 11 + bits(s, 7); + if (index + symbol > nlen + ndist) + return -6; /* too many lengths! */ + while (symbol--) /* repeat last or zero symbol times */ + lengths[index++] = len; + } + } + + /* check for end-of-block code -- there better be one! */ + if (lengths[256] == 0) + return -9; + + /* build huffman table for literal/length codes */ + err = construct(&lencode, lengths, nlen); + if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) + return -7; /* incomplete code ok only for single length 1 code */ + + /* build huffman table for distance codes */ + err = construct(&distcode, lengths + nlen, ndist); + if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) + return -8; /* incomplete code ok only for single length 1 code */ + + /* decode data until end-of-block code */ + return codes(s, &lencode, &distcode); +} + +/* + * Inflate source to dest. On return, destlen and sourcelen are updated to the + * size of the uncompressed data and the size of the deflate data respectively. + * On success, the return value of puff() is zero. If there is an error in the + * source data, i.e. it is not in the deflate format, then a negative value is + * returned. If there is not enough input available or there is not enough + * output space, then a positive error is returned. In that case, destlen and + * sourcelen are not updated to facilitate retrying from the beginning with the + * provision of more input data or more output space. In the case of invalid + * inflate data (a negative error), the dest and source pointers are updated to + * facilitate the debugging of deflators. + * + * puff() also has a mode to determine the size of the uncompressed output with + * no output written. For this dest must be (unsigned char *)0. In this case, + * the input value of *destlen is ignored, and on return *destlen is set to the + * size of the uncompressed output. + * + * The return codes are: + * + * 2: available inflate data did not terminate + * 1: output space exhausted before completing inflate + * 0: successful inflate + * -1: invalid block type (type == 3) + * -2: stored block length did not match one's complement + * -3: dynamic block code description: too many length or distance codes + * -4: dynamic block code description: code lengths codes incomplete + * -5: dynamic block code description: repeat lengths with no first length + * -6: dynamic block code description: repeat more than specified lengths + * -7: dynamic block code description: invalid literal/length code lengths + * -8: dynamic block code description: invalid distance code lengths + * -9: dynamic block code description: missing end-of-block code + * -10: invalid literal/length or distance code in fixed or dynamic block + * -11: distance is too far back in fixed or dynamic block + * + * Format notes: + * + * - Three bits are read for each block to determine the kind of block and + * whether or not it is the last block. Then the block is decoded and the + * process repeated if it was not the last block. + * + * - The leftover bits in the last byte of the deflate data after the last + * block (if it was a fixed or dynamic block) are undefined and have no + * expected values to check. + */ +int puff(unsigned char *dest, /* pointer to destination pointer */ + unsigned long *destlen, /* amount of output space */ + const unsigned char *source, /* pointer to source data pointer */ + unsigned long *sourcelen) /* amount of input available */ +{ + struct state s; /* input/output state */ + int last, type; /* block information */ + int err; /* return value */ + + /* initialize output state */ + s.out = dest; + s.outlen = *destlen; /* ignored if dest is NIL */ + s.outcnt = 0; + + /* initialize input state */ + s.in = source; + s.inlen = *sourcelen; + s.incnt = 0; + s.bitbuf = 0; + s.bitcnt = 0; + + /* return if bits() or decode() tries to read past available input */ + if (setjmp(s.env) != 0) /* if came back here via longjmp() */ + err = 2; /* then skip do-loop, return error */ + else { + /* process blocks until last block or error */ + do { + last = bits(&s, 1); /* one if last block */ + type = bits(&s, 2); /* block type 0..3 */ + err = type == 0 ? + stored(&s) : + (type == 1 ? + fixed(&s) : + (type == 2 ? + dynamic(&s) : + -1)); /* type == 3, invalid */ + if (err != 0) + break; /* return with error */ + } while (!last); + } + + /* update the lengths and return */ + if (err <= 0) { + *destlen = s.outcnt; + *sourcelen = s.incnt; + } + return err; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.h new file mode 100644 index 000000000..e23a24543 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/puff.h @@ -0,0 +1,35 @@ +/* puff.h + Copyright (C) 2002-2013 Mark Adler, all rights reserved + version 2.3, 21 Jan 2013 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + + +/* + * See puff.c for purpose and usage. + */ +#ifndef NIL +# define NIL ((unsigned char *)0) /* for no output option */ +#endif + +int puff(unsigned char *dest, /* pointer to destination pointer */ + unsigned long *destlen, /* amount of output space */ + const unsigned char *source, /* pointer to source data pointer */ + unsigned long *sourcelen); /* amount of input available */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/pufftest.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/pufftest.c new file mode 100644 index 000000000..776481488 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/pufftest.c @@ -0,0 +1,165 @@ +/* + * pufftest.c + * Copyright (C) 2002-2013 Mark Adler + * For conditions of distribution and use, see copyright notice in puff.h + * version 2.3, 21 Jan 2013 + */ + +/* Example of how to use puff(). + + Usage: puff [-w] [-f] [-nnn] file + ... | puff [-w] [-f] [-nnn] + + where file is the input file with deflate data, nnn is the number of bytes + of input to skip before inflating (e.g. to skip a zlib or gzip header), and + -w is used to write the decompressed data to stdout. -f is for coverage + testing, and causes pufftest to fail with not enough output space (-f does + a write like -w, so -w is not required). */ + +#include +#include +#include "puff.h" + +#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) +# include +# include +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + +#define local static + +/* Return size times approximately the cube root of 2, keeping the result as 1, + 3, or 5 times a power of 2 -- the result is always > size, until the result + is the maximum value of an unsigned long, where it remains. This is useful + to keep reallocations less than ~33% over the actual data. */ +local size_t bythirds(size_t size) +{ + int n; + size_t m; + + m = size; + for (n = 0; m; n++) + m >>= 1; + if (n < 3) + return size + 1; + n -= 3; + m = size >> n; + m += m == 6 ? 2 : 1; + m <<= n; + return m > size ? m : (size_t)(-1); +} + +/* Read the input file *name, or stdin if name is NULL, into allocated memory. + Reallocate to larger buffers until the entire file is read in. Return a + pointer to the allocated data, or NULL if there was a memory allocation + failure. *len is the number of bytes of data read from the input file (even + if load() returns NULL). If the input file was empty or could not be opened + or read, *len is zero. */ +local void *load(const char *name, size_t *len) +{ + size_t size; + void *buf, *swap; + FILE *in; + + *len = 0; + buf = malloc(size = 4096); + if (buf == NULL) + return NULL; + in = name == NULL ? stdin : fopen(name, "rb"); + if (in != NULL) { + for (;;) { + *len += fread((char *)buf + *len, 1, size - *len, in); + if (*len < size) break; + size = bythirds(size); + if (size == *len || (swap = realloc(buf, size)) == NULL) { + free(buf); + buf = NULL; + break; + } + buf = swap; + } + fclose(in); + } + return buf; +} + +int main(int argc, char **argv) +{ + int ret, put = 0, fail = 0; + unsigned skip = 0; + char *arg, *name = NULL; + unsigned char *source = NULL, *dest; + size_t len = 0; + unsigned long sourcelen, destlen; + + /* process arguments */ + while (arg = *++argv, --argc) + if (arg[0] == '-') { + if (arg[1] == 'w' && arg[2] == 0) + put = 1; + else if (arg[1] == 'f' && arg[2] == 0) + fail = 1, put = 1; + else if (arg[1] >= '0' && arg[1] <= '9') + skip = (unsigned)atoi(arg + 1); + else { + fprintf(stderr, "invalid option %s\n", arg); + return 3; + } + } + else if (name != NULL) { + fprintf(stderr, "only one file name allowed\n"); + return 3; + } + else + name = arg; + source = load(name, &len); + if (source == NULL) { + fprintf(stderr, "memory allocation failure\n"); + return 4; + } + if (len == 0) { + fprintf(stderr, "could not read %s, or it was empty\n", + name == NULL ? "" : name); + free(source); + return 3; + } + if (skip >= len) { + fprintf(stderr, "skip request of %d leaves no input\n", skip); + free(source); + return 3; + } + + /* test inflate data with offset skip */ + len -= skip; + sourcelen = (unsigned long)len; + ret = puff(NIL, &destlen, source + skip, &sourcelen); + if (ret) + fprintf(stderr, "puff() failed with return code %d\n", ret); + else { + fprintf(stderr, "puff() succeeded uncompressing %lu bytes\n", destlen); + if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n", + len - sourcelen); + } + + /* if requested, inflate again and write decompressd data to stdout */ + if (put && ret == 0) { + if (fail) + destlen >>= 1; + dest = malloc(destlen); + if (dest == NULL) { + fprintf(stderr, "memory allocation failure\n"); + free(source); + return 4; + } + puff(dest, &destlen, source + skip, &sourcelen); + SET_BINARY_MODE(stdout); + fwrite(dest, 1, destlen, stdout); + free(dest); + } + + /* clean up */ + free(source); + return ret; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/zeros.raw b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/zeros.raw new file mode 100644 index 000000000..0a90e76b3 Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/puff/zeros.raw differ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.c new file mode 100644 index 000000000..8626c92ad --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.c @@ -0,0 +1,275 @@ +#include +#include +#include + +#include "zlib.h" + + +void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) +{ + R->HighPart = A.HighPart - B.HighPart; + if (A.LowPart >= B.LowPart) + R->LowPart = A.LowPart - B.LowPart; + else + { + R->LowPart = A.LowPart - B.LowPart; + R->HighPart --; + } +} + +#ifdef _M_X64 +// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc +unsigned __int64 __rdtsc(void); +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + // printf("rdtsc = %I64x\n",__rdtsc()); + pbeginTime64->QuadPart=__rdtsc(); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres; + unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); + LIres.QuadPart=res; + // printf("rdtsc = %I64x\n",__rdtsc()); + return LIres; +} +#else +#ifdef _M_IX86 +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ + DWORD dwEdx,dwEax; + _asm + { + rdtsc + mov dwEax,eax + mov dwEdx,edx + } + pbeginTime64->LowPart=dwEax; + pbeginTime64->HighPart=dwEdx; +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + myGetRDTSC32(pbeginTime64); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres,endTime64; + myGetRDTSC32(&endTime64); + + LIres.LowPart=LIres.HighPart=0; + MyDoMinus64(&LIres,endTime64,beginTime64); + return LIres; +} +#else +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER lr; + lr.QuadPart=0; + return lr; +} +#endif +#endif + +void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) +{ + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) + { + pbeginTime64->LowPart = GetTickCount(); + pbeginTime64->HighPart = 0; + } +} + +DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER endTime64,ticksPerSecond,ticks; + DWORDLONG ticksShifted,tickSecShifted; + DWORD dwLog=16+0; + DWORD dwRet; + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) + dwRet = (GetTickCount() - beginTime64.LowPart)*1; + else + { + MyDoMinus64(&ticks,endTime64,beginTime64); + QueryPerformanceFrequency(&ticksPerSecond); + + + { + ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); + tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); + + } + + dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); + dwRet *=1; + } + return dwRet; +} + +int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr) +{ + FILE* stream; + unsigned char* ptr; + int retVal=1; + stream=fopen(filename, "rb"); + if (stream==NULL) + return 0; + + fseek(stream,0,SEEK_END); + + *plFileSize=ftell(stream); + fseek(stream,0,SEEK_SET); + ptr=malloc((*plFileSize)+1); + if (ptr==NULL) + retVal=0; + else + { + if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) + retVal=0; + } + fclose(stream); + *pFilePtr=ptr; + return retVal; +} + +int main(int argc, char *argv[]) +{ + int BlockSizeCompress=0x8000; + int BlockSizeUncompress=0x8000; + int cprLevel=Z_DEFAULT_COMPRESSION ; + long lFileSize; + unsigned char* FilePtr; + long lBufferSizeCpr; + long lBufferSizeUncpr; + long lCompressedSize=0; + unsigned char* CprPtr; + unsigned char* UncprPtr; + long lSizeCpr,lSizeUncpr; + DWORD dwGetTick,dwMsecQP; + LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; + + if (argc<=1) + { + printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); + return 0; + } + + if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) + { + printf("error reading %s\n",argv[1]); + return 1; + } + else printf("file %s read, %u bytes\n",argv[1],lFileSize); + + if (argc>=3) + BlockSizeCompress=atol(argv[2]); + + if (argc>=4) + BlockSizeUncompress=atol(argv[3]); + + if (argc>=5) + cprLevel=(int)atol(argv[4]); + + lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; + lBufferSizeUncpr = lBufferSizeCpr; + + CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lFileSize; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + deflateInit(&zcpr,cprLevel); + + zcpr.next_in = FilePtr; + zcpr.next_out = CprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); + zcpr.avail_out = BlockSizeCompress; + ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeCpr=zcpr.total_out; + deflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total compress size = %u, in %u step\n",lSizeCpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); + UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lSizeCpr; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + inflateInit(&zcpr); + + zcpr.next_in = CprPtr; + zcpr.next_out = UncprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); + zcpr.avail_out = BlockSizeUncompress; + ret=inflate(&zcpr,Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeUncpr=zcpr.total_out; + inflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + if (lSizeUncpr==lFileSize) + { + if (memcmp(FilePtr,UncprPtr,lFileSize)==0) + printf("compare ok\n"); + + } + + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.txt new file mode 100644 index 000000000..e508bb22f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/testzlib/testzlib.txt @@ -0,0 +1,10 @@ +To build testzLib with Visual Studio 2005: + +copy to a directory file from : +- root of zLib tree +- contrib/testzlib +- contrib/masmx86 +- contrib/masmx64 +- contrib/vstudio/vc7 + +and open testzlib8.sln \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile new file mode 100644 index 000000000..b54266fba --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile @@ -0,0 +1,14 @@ +CC=cc +CFLAGS=-g + +untgz: untgz.o ../../libz.a + $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz + +untgz.o: untgz.c ../../zlib.h + $(CC) $(CFLAGS) -c -I../.. untgz.c + +../../libz.a: + cd ../..; ./configure; make + +clean: + rm -f untgz untgz.o *~ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile.msc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile.msc new file mode 100644 index 000000000..77b860221 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/Makefile.msc @@ -0,0 +1,17 @@ +CC=cl +CFLAGS=-MD + +untgz.exe: untgz.obj ..\..\zlib.lib + $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib + +untgz.obj: untgz.c ..\..\zlib.h + $(CC) $(CFLAGS) -c -I..\.. untgz.c + +..\..\zlib.lib: + cd ..\.. + $(MAKE) -f win32\makefile.msc + cd contrib\untgz + +clean: + -del untgz.obj + -del untgz.exe diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/untgz.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/untgz.c new file mode 100644 index 000000000..2c391e598 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/untgz/untgz.c @@ -0,0 +1,674 @@ +/* + * untgz.c -- Display contents and extract files from a gzip'd TAR file + * + * written by Pedro A. Aranda Gutierrez + * adaptation to Unix by Jean-loup Gailly + * various fixes by Cosmin Truta + */ + +#include +#include +#include +#include +#include + +#include "zlib.h" + +#ifdef unix +# include +#else +# include +# include +#endif + +#ifdef WIN32 +#include +# ifndef F_OK +# define F_OK 0 +# endif +# define mkdir(dirname,mode) _mkdir(dirname) +# ifdef _MSC_VER +# define access(path,mode) _access(path,mode) +# define chmod(path,mode) _chmod(path,mode) +# define strdup(str) _strdup(str) +# endif +#else +# include +#endif + + +/* values used in typeflag field */ + +#define REGTYPE '0' /* regular file */ +#define AREGTYPE '\0' /* regular file */ +#define LNKTYPE '1' /* link */ +#define SYMTYPE '2' /* reserved */ +#define CHRTYPE '3' /* character special */ +#define BLKTYPE '4' /* block special */ +#define DIRTYPE '5' /* directory */ +#define FIFOTYPE '6' /* FIFO special */ +#define CONTTYPE '7' /* reserved */ + +/* GNU tar extensions */ + +#define GNUTYPE_DUMPDIR 'D' /* file names from dumped directory */ +#define GNUTYPE_LONGLINK 'K' /* long link name */ +#define GNUTYPE_LONGNAME 'L' /* long file name */ +#define GNUTYPE_MULTIVOL 'M' /* continuation of file from another volume */ +#define GNUTYPE_NAMES 'N' /* file name that does not fit into main hdr */ +#define GNUTYPE_SPARSE 'S' /* sparse file */ +#define GNUTYPE_VOLHDR 'V' /* tape/volume header */ + + +/* tar header */ + +#define BLOCKSIZE 512 +#define SHORTNAMESIZE 100 + +struct tar_header +{ /* byte offset */ + char name[100]; /* 0 */ + char mode[8]; /* 100 */ + char uid[8]; /* 108 */ + char gid[8]; /* 116 */ + char size[12]; /* 124 */ + char mtime[12]; /* 136 */ + char chksum[8]; /* 148 */ + char typeflag; /* 156 */ + char linkname[100]; /* 157 */ + char magic[6]; /* 257 */ + char version[2]; /* 263 */ + char uname[32]; /* 265 */ + char gname[32]; /* 297 */ + char devmajor[8]; /* 329 */ + char devminor[8]; /* 337 */ + char prefix[155]; /* 345 */ + /* 500 */ +}; + +union tar_buffer +{ + char buffer[BLOCKSIZE]; + struct tar_header header; +}; + +struct attr_item +{ + struct attr_item *next; + char *fname; + int mode; + time_t time; +}; + +enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID }; + +char *TGZfname OF((const char *)); +void TGZnotfound OF((const char *)); + +int getoct OF((char *, int)); +char *strtime OF((time_t *)); +int setfiletime OF((char *, time_t)); +void push_attr OF((struct attr_item **, char *, int, time_t)); +void restore_attr OF((struct attr_item **)); + +int ExprMatch OF((char *, char *)); + +int makedir OF((char *)); +int matchname OF((int, int, char **, char *)); + +void error OF((const char *)); +int tar OF((gzFile, int, int, int, char **)); + +void help OF((int)); +int main OF((int, char **)); + +char *prog; + +const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }; + +/* return the file name of the TGZ archive */ +/* or NULL if it does not exist */ + +char *TGZfname (const char *arcname) +{ + static char buffer[1024]; + int origlen,i; + + strcpy(buffer,arcname); + origlen = strlen(buffer); + + for (i=0; TGZsuffix[i]; i++) + { + strcpy(buffer+origlen,TGZsuffix[i]); + if (access(buffer,F_OK) == 0) + return buffer; + } + return NULL; +} + + +/* error message for the filename */ + +void TGZnotfound (const char *arcname) +{ + int i; + + fprintf(stderr,"%s: Couldn't find ",prog); + for (i=0;TGZsuffix[i];i++) + fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n", + arcname, + TGZsuffix[i]); + exit(1); +} + + +/* convert octal digits to int */ +/* on error return -1 */ + +int getoct (char *p,int width) +{ + int result = 0; + char c; + + while (width--) + { + c = *p++; + if (c == 0) + break; + if (c == ' ') + continue; + if (c < '0' || c > '7') + return -1; + result = result * 8 + (c - '0'); + } + return result; +} + + +/* convert time_t to string */ +/* use the "YYYY/MM/DD hh:mm:ss" format */ + +char *strtime (time_t *t) +{ + struct tm *local; + static char result[32]; + + local = localtime(t); + sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d", + local->tm_year+1900, local->tm_mon+1, local->tm_mday, + local->tm_hour, local->tm_min, local->tm_sec); + return result; +} + + +/* set file time */ + +int setfiletime (char *fname,time_t ftime) +{ +#ifdef WIN32 + static int isWinNT = -1; + SYSTEMTIME st; + FILETIME locft, modft; + struct tm *loctm; + HANDLE hFile; + int result; + + loctm = localtime(&ftime); + if (loctm == NULL) + return -1; + + st.wYear = (WORD)loctm->tm_year + 1900; + st.wMonth = (WORD)loctm->tm_mon + 1; + st.wDayOfWeek = (WORD)loctm->tm_wday; + st.wDay = (WORD)loctm->tm_mday; + st.wHour = (WORD)loctm->tm_hour; + st.wMinute = (WORD)loctm->tm_min; + st.wSecond = (WORD)loctm->tm_sec; + st.wMilliseconds = 0; + if (!SystemTimeToFileTime(&st, &locft) || + !LocalFileTimeToFileTime(&locft, &modft)) + return -1; + + if (isWinNT < 0) + isWinNT = (GetVersion() < 0x80000000) ? 1 : 0; + hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, + (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0), + NULL); + if (hFile == INVALID_HANDLE_VALUE) + return -1; + result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1; + CloseHandle(hFile); + return result; +#else + struct utimbuf settime; + + settime.actime = settime.modtime = ftime; + return utime(fname,&settime); +#endif +} + + +/* push file attributes */ + +void push_attr(struct attr_item **list,char *fname,int mode,time_t time) +{ + struct attr_item *item; + + item = (struct attr_item *)malloc(sizeof(struct attr_item)); + if (item == NULL) + error("Out of memory"); + item->fname = strdup(fname); + item->mode = mode; + item->time = time; + item->next = *list; + *list = item; +} + + +/* restore file attributes */ + +void restore_attr(struct attr_item **list) +{ + struct attr_item *item, *prev; + + for (item = *list; item != NULL; ) + { + setfiletime(item->fname,item->time); + chmod(item->fname,item->mode); + prev = item; + item = item->next; + free(prev); + } + *list = NULL; +} + + +/* match regular expression */ + +#define ISSPECIAL(c) (((c) == '*') || ((c) == '/')) + +int ExprMatch (char *string,char *expr) +{ + while (1) + { + if (ISSPECIAL(*expr)) + { + if (*expr == '/') + { + if (*string != '\\' && *string != '/') + return 0; + string ++; expr++; + } + else if (*expr == '*') + { + if (*expr ++ == 0) + return 1; + while (*++string != *expr) + if (*string == 0) + return 0; + } + } + else + { + if (*string != *expr) + return 0; + if (*expr++ == 0) + return 1; + string++; + } + } +} + + +/* recursive mkdir */ +/* abort on ENOENT; ignore other errors like "directory already exists" */ +/* return 1 if OK */ +/* 0 on error */ + +int makedir (char *newdir) +{ + char *buffer = strdup(newdir); + char *p; + int len = strlen(buffer); + + if (len <= 0) { + free(buffer); + return 0; + } + if (buffer[len-1] == '/') { + buffer[len-1] = '\0'; + } + if (mkdir(buffer, 0755) == 0) + { + free(buffer); + return 1; + } + + p = buffer+1; + while (1) + { + char hold; + + while(*p && *p != '\\' && *p != '/') + p++; + hold = *p; + *p = 0; + if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT)) + { + fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer); + free(buffer); + return 0; + } + if (hold == 0) + break; + *p++ = hold; + } + free(buffer); + return 1; +} + + +int matchname (int arg,int argc,char **argv,char *fname) +{ + if (arg == argc) /* no arguments given (untgz tgzarchive) */ + return 1; + + while (arg < argc) + if (ExprMatch(fname,argv[arg++])) + return 1; + + return 0; /* ignore this for the moment being */ +} + + +/* tar file list or extract */ + +int tar (gzFile in,int action,int arg,int argc,char **argv) +{ + union tar_buffer buffer; + int len; + int err; + int getheader = 1; + int remaining = 0; + FILE *outfile = NULL; + char fname[BLOCKSIZE]; + int tarmode; + time_t tartime; + struct attr_item *attributes = NULL; + + if (action == TGZ_LIST) + printf(" date time size file\n" + " ---------- -------- --------- -------------------------------------\n"); + while (1) + { + len = gzread(in, &buffer, BLOCKSIZE); + if (len < 0) + error(gzerror(in, &err)); + /* + * Always expect complete blocks to process + * the tar information. + */ + if (len != BLOCKSIZE) + { + action = TGZ_INVALID; /* force error exit */ + remaining = 0; /* force I/O cleanup */ + } + + /* + * If we have to get a tar header + */ + if (getheader >= 1) + { + /* + * if we met the end of the tar + * or the end-of-tar block, + * we are done + */ + if (len == 0 || buffer.header.name[0] == 0) + break; + + tarmode = getoct(buffer.header.mode,8); + tartime = (time_t)getoct(buffer.header.mtime,12); + if (tarmode == -1 || tartime == (time_t)-1) + { + buffer.header.name[0] = 0; + action = TGZ_INVALID; + } + + if (getheader == 1) + { + strncpy(fname,buffer.header.name,SHORTNAMESIZE); + if (fname[SHORTNAMESIZE-1] != 0) + fname[SHORTNAMESIZE] = 0; + } + else + { + /* + * The file name is longer than SHORTNAMESIZE + */ + if (strncmp(fname,buffer.header.name,SHORTNAMESIZE-1) != 0) + error("bad long name"); + getheader = 1; + } + + /* + * Act according to the type flag + */ + switch (buffer.header.typeflag) + { + case DIRTYPE: + if (action == TGZ_LIST) + printf(" %s %s\n",strtime(&tartime),fname); + if (action == TGZ_EXTRACT) + { + makedir(fname); + push_attr(&attributes,fname,tarmode,tartime); + } + break; + case REGTYPE: + case AREGTYPE: + remaining = getoct(buffer.header.size,12); + if (remaining == -1) + { + action = TGZ_INVALID; + break; + } + if (action == TGZ_LIST) + printf(" %s %9d %s\n",strtime(&tartime),remaining,fname); + else if (action == TGZ_EXTRACT) + { + if (matchname(arg,argc,argv,fname)) + { + outfile = fopen(fname,"wb"); + if (outfile == NULL) { + /* try creating directory */ + char *p = strrchr(fname, '/'); + if (p != NULL) { + *p = '\0'; + makedir(fname); + *p = '/'; + outfile = fopen(fname,"wb"); + } + } + if (outfile != NULL) + printf("Extracting %s\n",fname); + else + fprintf(stderr, "%s: Couldn't create %s",prog,fname); + } + else + outfile = NULL; + } + getheader = 0; + break; + case GNUTYPE_LONGLINK: + case GNUTYPE_LONGNAME: + remaining = getoct(buffer.header.size,12); + if (remaining < 0 || remaining >= BLOCKSIZE) + { + action = TGZ_INVALID; + break; + } + len = gzread(in, fname, BLOCKSIZE); + if (len < 0) + error(gzerror(in, &err)); + if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) + { + action = TGZ_INVALID; + break; + } + getheader = 2; + break; + default: + if (action == TGZ_LIST) + printf(" %s <---> %s\n",strtime(&tartime),fname); + break; + } + } + else + { + unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining; + + if (outfile != NULL) + { + if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes) + { + fprintf(stderr, + "%s: Error writing %s -- skipping\n",prog,fname); + fclose(outfile); + outfile = NULL; + remove(fname); + } + } + remaining -= bytes; + } + + if (remaining == 0) + { + getheader = 1; + if (outfile != NULL) + { + fclose(outfile); + outfile = NULL; + if (action != TGZ_INVALID) + push_attr(&attributes,fname,tarmode,tartime); + } + } + + /* + * Abandon if errors are found + */ + if (action == TGZ_INVALID) + { + error("broken archive"); + break; + } + } + + /* + * Restore file modes and time stamps + */ + restore_attr(&attributes); + + if (gzclose(in) != Z_OK) + error("failed gzclose"); + + return 0; +} + + +/* ============================================================ */ + +void help(int exitval) +{ + printf("untgz version 0.2.1\n" + " using zlib version %s\n\n", + zlibVersion()); + printf("Usage: untgz file.tgz extract all files\n" + " untgz file.tgz fname ... extract selected files\n" + " untgz -l file.tgz list archive contents\n" + " untgz -h display this help\n"); + exit(exitval); +} + +void error(const char *msg) +{ + fprintf(stderr, "%s: %s\n", prog, msg); + exit(1); +} + + +/* ============================================================ */ + +#if defined(WIN32) && defined(__GNUC__) +int _CRT_glob = 0; /* disable argument globbing in MinGW */ +#endif + +int main(int argc,char **argv) +{ + int action = TGZ_EXTRACT; + int arg = 1; + char *TGZfile; + gzFile *f; + + prog = strrchr(argv[0],'\\'); + if (prog == NULL) + { + prog = strrchr(argv[0],'/'); + if (prog == NULL) + { + prog = strrchr(argv[0],':'); + if (prog == NULL) + prog = argv[0]; + else + prog++; + } + else + prog++; + } + else + prog++; + + if (argc == 1) + help(0); + + if (strcmp(argv[arg],"-l") == 0) + { + action = TGZ_LIST; + if (argc == ++arg) + help(0); + } + else if (strcmp(argv[arg],"-h") == 0) + { + help(0); + } + + if ((TGZfile = TGZfname(argv[arg])) == NULL) + TGZnotfound(argv[arg]); + + ++arg; + if ((action == TGZ_LIST) && (arg != argc)) + help(1); + +/* + * Process the TGZ file + */ + switch(action) + { + case TGZ_LIST: + case TGZ_EXTRACT: + f = gzopen(TGZfile,"rb"); + if (f == NULL) + { + fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile); + return 1; + } + exit(tar(f, action, arg, argc, argv)); + break; + + default: + error("Unknown option"); + exit(1); + } + + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/readme.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/readme.txt new file mode 100644 index 000000000..48cccc0d2 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/readme.txt @@ -0,0 +1,78 @@ +Building instructions for the DLL versions of Zlib 1.2.11 +======================================================== + +This directory contains projects that build zlib and minizip using +Microsoft Visual C++ 9.0/10.0. + +You don't need to build these projects yourself. You can download the +binaries from: + http://www.winimage.com/zLibDll + +More information can be found at this site. + + + + + +Build instructions for Visual Studio 2008 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Compile assembly code (with Visual Studio Command Prompt) by running: + bld_ml64.bat (in contrib\masmx64) + bld_ml32.bat (in contrib\masmx86) +- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008 +- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" + +Build instructions for Visual Studio 2010 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010 + +Build instructions for Visual Studio 2012 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012 + +Build instructions for Visual Studio 2013 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc12\zlibvc.sln with Microsoft Visual C++ 2013 + +Build instructions for Visual Studio 2015 (32 bits or 64 bits) +-------------------------------------------------------------- +- Decompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc14\zlibvc.sln with Microsoft Visual C++ 2015 + + +Important +--------- +- To use zlibwapi.dll in your application, you must define the + macro ZLIB_WINAPI when compiling your application's source files. + + +Additional notes +---------------- +- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built + by Gilles Vollant from the zlib 1.1.x sources, and distributed at + http://www.winimage.com/zLibDll + It uses the WINAPI calling convention for the exported functions, and + includes the minizip functionality. If your application needs that + particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. + +- The new DLL was renamed because there exist several incompatible + versions of zlib.dll on the Internet. + +- There is also an official DLL build of zlib, named zlib1.dll. This one + is exporting the functions using the CDECL convention. See the file + win32\DLL_FAQ.txt found in this zlib distribution. + +- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol + has a slightly different effect. To avoid compatibility problems, do + not define it here. + + +Gilles Vollant +info@winimage.com + +Visual Studio 2013 and 2015 Projects from Sean Hunt +seandhunt_7@yahoo.com diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj new file mode 100644 index 000000000..1b3624215 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj @@ -0,0 +1,310 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + true + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters new file mode 100644 index 000000000..0bd12210c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {048af943-022b-4db6-beeb-a54c34774ee2} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} + h;hpp;hxx;hm;inl;inc + + + {0844199a-966b-4f19-81db-1e0125e141b9} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj new file mode 100644 index 000000000..ccd3651df --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj @@ -0,0 +1,307 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + true + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters new file mode 100644 index 000000000..7076d76ff --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {c0419b40-bf50-40da-b153-ff74215b79de} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {bb87b070-735b-478e-92ce-7383abb2f36c} + h;hpp;hxx;hm;inl;inc + + + {f46ab6a6-548f-43cb-ae96-681abb5bd5db} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj new file mode 100644 index 000000000..476b8ea45 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj @@ -0,0 +1,420 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + true + + + Application + true + + + Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + true + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + EditAndContinue + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj.filters b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj.filters new file mode 100644 index 000000000..327649103 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlib.vcxproj.filters @@ -0,0 +1,58 @@ + + + + + {c1f6a2e3-5da5-4955-8653-310d3efe05a9} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {c2aaffdc-2c95-4d6f-8466-4bec5890af2c} + h;hpp;hxx;hm;inl;inc + + + {c274fe07-05f2-461c-964b-f6341e4e7eb5} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj new file mode 100644 index 000000000..8e38876fa --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj @@ -0,0 +1,310 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + true + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters new file mode 100644 index 000000000..ab87f09f4 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {fa61a89f-93fc-4c89-b29e-36224b7592f4} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {d4b85da0-2ba2-4934-b57f-e2584e3848ee} + h;hpp;hxx;hm;inl;inc + + + {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlib.rc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlib.rc new file mode 100644 index 000000000..c4e4b016e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.11\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj new file mode 100644 index 000000000..45389a352 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj @@ -0,0 +1,473 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebug + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + Itanium + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj.filters new file mode 100644 index 000000000..0c8b2501c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibstat.vcxproj.filters @@ -0,0 +1,77 @@ + + + + + {174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Source Files + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.def new file mode 100644 index 000000000..f876c3bca --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.def @@ -0,0 +1,153 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.2 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.sln b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.sln new file mode 100644 index 000000000..649f40c7e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.sln @@ -0,0 +1,135 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj new file mode 100644 index 000000000..7d7c49a6d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj @@ -0,0 +1,657 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + true + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + zlibwapid + zlibwapi + zlibwapi + zlibwapid + zlibwapi + zlibwapi + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebug + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + true + .\zlibvc.def + true + true + Windows + false + + + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + true + false + .\zlibvc.def + true + Windows + false + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + true + false + .\zlibvc.def + true + Windows + false + + + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + true + .\zlibvc.def + true + true + Windows + MachineX64 + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + true + false + .\zlibvc.def + true + Windows + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + true + false + .\zlibvc.def + true + Windows + MachineX64 + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj.filters new file mode 100644 index 000000000..22786824f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc10/zlibvc.vcxproj.filters @@ -0,0 +1,118 @@ + + + + + {07934a85-8b61-443d-a0ee-b2eedb74f3cd} + cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 + + + {1d99675b-433d-4a21-9e50-ed4ab8b19762} + h;hpp;hxx;hm;inl;fi;fd + + + {431c0958-fa71-44d0-9084-2d19d100c0cc} + ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/miniunz.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/miniunz.vcxproj new file mode 100644 index 000000000..99be63d69 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/miniunz.vcxproj @@ -0,0 +1,314 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + + + + Application + MultiByte + v110 + + + Application + Unicode + v110 + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + true + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/minizip.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/minizip.vcxproj new file mode 100644 index 000000000..d6e98f4d5 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/minizip.vcxproj @@ -0,0 +1,311 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + + + + Application + MultiByte + v110 + + + Application + Unicode + v110 + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + true + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlib.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlib.vcxproj new file mode 100644 index 000000000..0115dd17b --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlib.vcxproj @@ -0,0 +1,426 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + + + + Application + MultiByte + true + v110 + + + Application + MultiByte + true + v110 + + + Application + Unicode + v110 + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + true + v110 + + + Application + true + v110 + + + Application + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + true + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlibdll.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlibdll.vcxproj new file mode 100644 index 000000000..9d36336eb --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/testzlibdll.vcxproj @@ -0,0 +1,314 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + + + + Application + MultiByte + v110 + + + Application + Unicode + v110 + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + true + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlib.rc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlib.rc new file mode 100644 index 000000000..c4e4b016e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.11\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibstat.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibstat.vcxproj new file mode 100644 index 000000000..64b4d869d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibstat.vcxproj @@ -0,0 +1,464 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + + + + StaticLibrary + false + v110 + + + StaticLibrary + false + v110 + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + v110 + + + StaticLibrary + false + v110 + + + StaticLibrary + false + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.def new file mode 100644 index 000000000..f876c3bca --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.def @@ -0,0 +1,153 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.2 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.sln b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.sln new file mode 100644 index 000000000..b7e381266 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.sln @@ -0,0 +1,117 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.vcxproj new file mode 100644 index 000000000..c4cffccf1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc11/zlibvc.vcxproj @@ -0,0 +1,688 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + DynamicLibrary + false + true + v110 + + + DynamicLibrary + false + true + v110 + + + DynamicLibrary + false + v110 + Unicode + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + v110 + + + DynamicLibrary + false + true + v110 + + + DynamicLibrary + false + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + true + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + cd ..\..\contrib\masmx64 +bld_ml64.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/miniunz.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/miniunz.vcxproj new file mode 100644 index 000000000..d88ac7fc7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/miniunz.vcxproj @@ -0,0 +1,316 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + + + + Application + MultiByte + v120 + + + Application + Unicode + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + true + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/minizip.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/minizip.vcxproj new file mode 100644 index 000000000..f1f239c9e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/minizip.vcxproj @@ -0,0 +1,313 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + + + + Application + MultiByte + v120 + + + Application + Unicode + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + true + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlib.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlib.vcxproj new file mode 100644 index 000000000..64b2cbe34 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlib.vcxproj @@ -0,0 +1,430 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + + + + Application + MultiByte + true + v120 + + + Application + MultiByte + true + v120 + + + Application + Unicode + v120 + + + Application + MultiByte + true + v120 + + + Application + MultiByte + true + v120 + + + Application + MultiByte + v120 + + + Application + true + v120 + + + Application + true + v120 + + + Application + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + true + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + false + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlibdll.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlibdll.vcxproj new file mode 100644 index 000000000..c66573a8b --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/testzlibdll.vcxproj @@ -0,0 +1,316 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + + + + Application + MultiByte + v120 + + + Application + Unicode + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + Application + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + true + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlib.rc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlib.rc new file mode 100644 index 000000000..c4e4b016e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.11\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibstat.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibstat.vcxproj new file mode 100644 index 000000000..3fdee7c50 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibstat.vcxproj @@ -0,0 +1,467 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.def new file mode 100644 index 000000000..f876c3bca --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.def @@ -0,0 +1,153 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.2 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.sln b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.sln new file mode 100644 index 000000000..dcda22984 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.sln @@ -0,0 +1,119 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.vcxproj new file mode 100644 index 000000000..ab2b6c360 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc12/zlibvc.vcxproj @@ -0,0 +1,692 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + v120 + Unicode + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + v120 + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + true + v120 + + + DynamicLibrary + false + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + true + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + false + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + cd ..\..\contrib\masmx64 +bld_ml64.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/miniunz.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/miniunz.vcxproj new file mode 100644 index 000000000..9b5c07587 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/miniunz.vcxproj @@ -0,0 +1,316 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + + + + Application + MultiByte + v140 + + + Application + Unicode + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + true + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/minizip.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/minizip.vcxproj new file mode 100644 index 000000000..968a410a1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/minizip.vcxproj @@ -0,0 +1,313 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + + + + Application + MultiByte + v140 + + + Application + Unicode + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + true + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlib.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlib.vcxproj new file mode 100644 index 000000000..2c371252a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlib.vcxproj @@ -0,0 +1,430 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + + + + Application + MultiByte + true + v140 + + + Application + MultiByte + true + v140 + + + Application + Unicode + v140 + + + Application + MultiByte + true + v140 + + + Application + MultiByte + true + v140 + + + Application + MultiByte + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + true + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + false + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlibdll.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlibdll.vcxproj new file mode 100644 index 000000000..d87474dec --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/testzlibdll.vcxproj @@ -0,0 +1,316 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + + + + Application + MultiByte + v140 + + + Application + Unicode + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + Application + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + true + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlibdll.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlib.rc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlib.rc new file mode 100644 index 000000000..c4e4b016e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.11\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibstat.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibstat.vcxproj new file mode 100644 index 000000000..3e4b98639 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibstat.vcxproj @@ -0,0 +1,467 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + Unicode + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + + + StaticLibrary + false + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.def new file mode 100644 index 000000000..f876c3bca --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.def @@ -0,0 +1,153 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.2 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.sln b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.sln new file mode 100644 index 000000000..6f4a1076a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.sln @@ -0,0 +1,119 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.vcxproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.vcxproj new file mode 100644 index 000000000..f8f673cb0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc14/zlibvc.vcxproj @@ -0,0 +1,692 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + v140 + Unicode + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + true + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + zlibwapi + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + false + + + cd ..\..\masmx86 +bld_ml32.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + cd ..\..\contrib\masmx64 +bld_ml64.bat + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + cd ..\..\masmx64 +bld_ml64.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/miniunz.vcproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/miniunz.vcproj new file mode 100644 index 000000000..038a9e5fa --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/miniunz.vcproj @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/minizip.vcproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/minizip.vcproj new file mode 100644 index 000000000..ad4023991 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/minizip.vcproj @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlib.vcproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlib.vcproj new file mode 100644 index 000000000..c9f19d24e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlib.vcproj @@ -0,0 +1,852 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlibdll.vcproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlibdll.vcproj new file mode 100644 index 000000000..d7530fd7d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/testzlibdll.vcproj @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlib.rc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlib.rc new file mode 100644 index 000000000..c4e4b016e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 2, 11, 0 + PRODUCTVERSION 1, 2, 11, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.11\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibstat.vcproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibstat.vcproj new file mode 100644 index 000000000..d4ffb46b2 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibstat.vcproj @@ -0,0 +1,835 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.def new file mode 100644 index 000000000..f876c3bca --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.def @@ -0,0 +1,153 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.2 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.sln b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.sln new file mode 100644 index 000000000..75c64c3f4 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.sln @@ -0,0 +1,144 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.vcproj b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.vcproj new file mode 100644 index 000000000..95bb241f3 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/contrib/vstudio/vc9/zlibvc.vcproj @@ -0,0 +1,1156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.c new file mode 100644 index 000000000..9580440c0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.c @@ -0,0 +1,442 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Thanks to Rodney Brown for his contribution of faster + * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing + * tables for updating the shift register in one step with three exclusive-ors + * instead of four steps with four exclusive-ors. This results in about a + * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. + */ + +/* @(#) $Id$ */ + +/* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore + protection on the static variables used to control the first-use generation + of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + + DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h. + */ + +#ifdef MAKECRCH +# include +# ifndef DYNAMIC_CRC_TABLE +# define DYNAMIC_CRC_TABLE +# endif /* !DYNAMIC_CRC_TABLE */ +#endif /* MAKECRCH */ + +#include "zutil.h" /* for STDC and FAR definitions */ + +/* Definitions for doing the crc four data bytes at a time. */ +#if !defined(NOBYFOUR) && defined(Z_U4) +# define BYFOUR +#endif +#ifdef BYFOUR + local unsigned long crc32_little OF((unsigned long, + const unsigned char FAR *, z_size_t)); + local unsigned long crc32_big OF((unsigned long, + const unsigned char FAR *, z_size_t)); +# define TBLS 8 +#else +# define TBLS 1 +#endif /* BYFOUR */ + +/* Local functions for crc concatenation */ +local unsigned long gf2_matrix_times OF((unsigned long *mat, + unsigned long vec)); +local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); +local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2)); + + +#ifdef DYNAMIC_CRC_TABLE + +local volatile int crc_table_empty = 1; +local z_crc_t FAR crc_table[TBLS][256]; +local void make_crc_table OF((void)); +#ifdef MAKECRCH + local void write_table OF((FILE *, const z_crc_t FAR *)); +#endif /* MAKECRCH */ +/* + Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The first table is simply the CRC of all possible eight bit values. This is + all the information needed to generate CRCs on data a byte at a time for all + combinations of CRC register values and incoming bytes. The remaining tables + allow for word-at-a-time CRC calculation for both big-endian and little- + endian machines, where a word is four bytes. +*/ +local void make_crc_table() +{ + z_crc_t c; + int n, k; + z_crc_t poly; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static volatile int first = 1; /* flag to limit concurrent making */ + static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* See if another task is already doing this (not thread-safe, but better + than nothing -- significantly reduces duration of vulnerability in + case the advice about DYNAMIC_CRC_TABLE is ignored) */ + if (first) { + first = 0; + + /* make exclusive-or pattern from polynomial (0xedb88320UL) */ + poly = 0; + for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++) + poly |= (z_crc_t)1 << (31 - p[n]); + + /* generate a crc for every 8-bit value */ + for (n = 0; n < 256; n++) { + c = (z_crc_t)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[0][n] = c; + } + +#ifdef BYFOUR + /* generate crc for each value followed by one, two, and three zeros, + and then the byte reversal of those as well as the first table */ + for (n = 0; n < 256; n++) { + c = crc_table[0][n]; + crc_table[4][n] = ZSWAP32(c); + for (k = 1; k < 4; k++) { + c = crc_table[0][c & 0xff] ^ (c >> 8); + crc_table[k][n] = c; + crc_table[k + 4][n] = ZSWAP32(c); + } + } +#endif /* BYFOUR */ + + crc_table_empty = 0; + } + else { /* not first */ + /* wait for the other guy to finish (not efficient, but rare) */ + while (crc_table_empty) + ; + } + +#ifdef MAKECRCH + /* write out CRC tables to crc32.h */ + { + FILE *out; + + out = fopen("crc32.h", "w"); + if (out == NULL) return; + fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n"); + fprintf(out, " * Generated automatically by crc32.c\n */\n\n"); + fprintf(out, "local const z_crc_t FAR "); + fprintf(out, "crc_table[TBLS][256] =\n{\n {\n"); + write_table(out, crc_table[0]); +# ifdef BYFOUR + fprintf(out, "#ifdef BYFOUR\n"); + for (k = 1; k < 8; k++) { + fprintf(out, " },\n {\n"); + write_table(out, crc_table[k]); + } + fprintf(out, "#endif\n"); +# endif /* BYFOUR */ + fprintf(out, " }\n};\n"); + fclose(out); + } +#endif /* MAKECRCH */ +} + +#ifdef MAKECRCH +local void write_table(out, table) + FILE *out; + const z_crc_t FAR *table; +{ + int n; + + for (n = 0; n < 256; n++) + fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", + (unsigned long)(table[n]), + n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", ")); +} +#endif /* MAKECRCH */ + +#else /* !DYNAMIC_CRC_TABLE */ +/* ======================================================================== + * Tables of CRC-32s of all single-byte values, made by make_crc_table(). + */ +#include "crc32.h" +#endif /* DYNAMIC_CRC_TABLE */ + +/* ========================================================================= + * This function can be used by asm versions of crc32() + */ +const z_crc_t FAR * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif /* DYNAMIC_CRC_TABLE */ + return (const z_crc_t FAR *)crc_table; +} + +/* ========================================================================= */ +#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8) +#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 + +/* ========================================================================= */ +unsigned long ZEXPORT crc32_z(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + z_size_t len; +{ + if (buf == Z_NULL) return 0UL; + +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif /* DYNAMIC_CRC_TABLE */ + +#ifdef BYFOUR + if (sizeof(void *) == sizeof(ptrdiff_t)) { + z_crc_t endian; + + endian = 1; + if (*((unsigned char *)(&endian))) + return crc32_little(crc, buf, len); + else + return crc32_big(crc, buf, len); + } +#endif /* BYFOUR */ + crc = crc ^ 0xffffffffUL; + while (len >= 8) { + DO8; + len -= 8; + } + if (len) do { + DO1; + } while (--len); + return crc ^ 0xffffffffUL; +} + +/* ========================================================================= */ +unsigned long ZEXPORT crc32(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + uInt len; +{ + return crc32_z(crc, buf, len); +} + +#ifdef BYFOUR + +/* + This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit + integer pointer type. This violates the strict aliasing rule, where a + compiler can assume, for optimization purposes, that two pointers to + fundamentally different types won't ever point to the same memory. This can + manifest as a problem only if one of the pointers is written to. This code + only reads from those pointers. So long as this code remains isolated in + this compilation unit, there won't be a problem. For this reason, this code + should not be copied and pasted into a compilation unit in which other code + writes to the buffer that is passed to these routines. + */ + +/* ========================================================================= */ +#define DOLIT4 c ^= *buf4++; \ + c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ + crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24] +#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4 + +/* ========================================================================= */ +local unsigned long crc32_little(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + z_size_t len; +{ + register z_crc_t c; + register const z_crc_t FAR *buf4; + + c = (z_crc_t)crc; + c = ~c; + while (len && ((ptrdiff_t)buf & 3)) { + c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); + len--; + } + + buf4 = (const z_crc_t FAR *)(const void FAR *)buf; + while (len >= 32) { + DOLIT32; + len -= 32; + } + while (len >= 4) { + DOLIT4; + len -= 4; + } + buf = (const unsigned char FAR *)buf4; + + if (len) do { + c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); + } while (--len); + c = ~c; + return (unsigned long)c; +} + +/* ========================================================================= */ +#define DOBIG4 c ^= *buf4++; \ + c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ + crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] +#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 + +/* ========================================================================= */ +local unsigned long crc32_big(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + z_size_t len; +{ + register z_crc_t c; + register const z_crc_t FAR *buf4; + + c = ZSWAP32((z_crc_t)crc); + c = ~c; + while (len && ((ptrdiff_t)buf & 3)) { + c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); + len--; + } + + buf4 = (const z_crc_t FAR *)(const void FAR *)buf; + while (len >= 32) { + DOBIG32; + len -= 32; + } + while (len >= 4) { + DOBIG4; + len -= 4; + } + buf = (const unsigned char FAR *)buf4; + + if (len) do { + c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); + } while (--len); + c = ~c; + return (unsigned long)(ZSWAP32(c)); +} + +#endif /* BYFOUR */ + +#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */ + +/* ========================================================================= */ +local unsigned long gf2_matrix_times(mat, vec) + unsigned long *mat; + unsigned long vec; +{ + unsigned long sum; + + sum = 0; + while (vec) { + if (vec & 1) + sum ^= *mat; + vec >>= 1; + mat++; + } + return sum; +} + +/* ========================================================================= */ +local void gf2_matrix_square(square, mat) + unsigned long *square; + unsigned long *mat; +{ + int n; + + for (n = 0; n < GF2_DIM; n++) + square[n] = gf2_matrix_times(mat, mat[n]); +} + +/* ========================================================================= */ +local uLong crc32_combine_(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off64_t len2; +{ + int n; + unsigned long row; + unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ + unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ + + /* degenerate case (also disallow negative lengths) */ + if (len2 <= 0) + return crc1; + + /* put operator for one zero bit in odd */ + odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ + row = 1; + for (n = 1; n < GF2_DIM; n++) { + odd[n] = row; + row <<= 1; + } + + /* put operator for two zero bits in even */ + gf2_matrix_square(even, odd); + + /* put operator for four zero bits in odd */ + gf2_matrix_square(odd, even); + + /* apply len2 zeros to crc1 (first square will put the operator for one + zero byte, eight zero bits, in even) */ + do { + /* apply zeros operator for this bit of len2 */ + gf2_matrix_square(even, odd); + if (len2 & 1) + crc1 = gf2_matrix_times(even, crc1); + len2 >>= 1; + + /* if no more bits set, then done */ + if (len2 == 0) + break; + + /* another iteration of the loop with odd and even swapped */ + gf2_matrix_square(odd, even); + if (len2 & 1) + crc1 = gf2_matrix_times(odd, crc1); + len2 >>= 1; + + /* if no more bits set, then done */ + } while (len2 != 0); + + /* return combined crc */ + crc1 ^= crc2; + return crc1; +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} + +uLong ZEXPORT crc32_combine64(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off64_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.h new file mode 100644 index 000000000..9e0c77810 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/crc32.h @@ -0,0 +1,441 @@ +/* crc32.h -- tables for rapid CRC calculation + * Generated automatically by crc32.c + */ + +local const z_crc_t FAR crc_table[TBLS][256] = +{ + { + 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, + 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, + 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, + 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, + 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, + 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, + 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, + 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, + 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, + 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, + 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, + 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, + 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, + 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, + 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, + 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, + 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, + 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, + 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, + 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, + 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, + 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, + 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, + 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, + 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, + 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, + 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, + 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, + 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, + 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, + 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, + 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, + 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, + 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, + 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, + 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, + 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, + 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, + 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, + 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, + 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, + 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, + 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, + 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, + 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, + 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, + 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, + 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, + 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, + 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, + 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, + 0x2d02ef8dUL +#ifdef BYFOUR + }, + { + 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL, + 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL, + 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL, + 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL, + 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL, + 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL, + 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL, + 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL, + 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL, + 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL, + 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL, + 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL, + 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL, + 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL, + 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL, + 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL, + 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL, + 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL, + 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL, + 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL, + 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL, + 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL, + 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL, + 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL, + 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL, + 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL, + 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL, + 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL, + 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL, + 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL, + 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL, + 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL, + 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL, + 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL, + 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL, + 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL, + 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL, + 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL, + 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL, + 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL, + 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL, + 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL, + 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL, + 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL, + 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL, + 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL, + 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL, + 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL, + 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL, + 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL, + 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL, + 0x9324fd72UL + }, + { + 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL, + 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL, + 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL, + 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL, + 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL, + 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL, + 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL, + 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL, + 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL, + 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL, + 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL, + 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL, + 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL, + 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL, + 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL, + 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL, + 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL, + 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL, + 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL, + 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL, + 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL, + 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL, + 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL, + 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL, + 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL, + 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL, + 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL, + 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL, + 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL, + 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL, + 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL, + 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL, + 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL, + 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL, + 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL, + 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL, + 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL, + 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL, + 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL, + 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL, + 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL, + 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL, + 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL, + 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL, + 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL, + 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL, + 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL, + 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL, + 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL, + 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL, + 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL, + 0xbe9834edUL + }, + { + 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL, + 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL, + 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL, + 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL, + 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL, + 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL, + 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL, + 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL, + 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL, + 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL, + 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL, + 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL, + 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL, + 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL, + 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL, + 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL, + 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL, + 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL, + 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL, + 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL, + 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL, + 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL, + 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL, + 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL, + 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL, + 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL, + 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL, + 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL, + 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL, + 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL, + 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL, + 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL, + 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL, + 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL, + 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL, + 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL, + 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL, + 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL, + 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL, + 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL, + 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL, + 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL, + 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL, + 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL, + 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL, + 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL, + 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL, + 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL, + 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL, + 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL, + 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL, + 0xde0506f1UL + }, + { + 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL, + 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL, + 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL, + 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL, + 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL, + 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL, + 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL, + 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL, + 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL, + 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL, + 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL, + 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL, + 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL, + 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL, + 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL, + 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL, + 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL, + 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL, + 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL, + 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL, + 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL, + 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL, + 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL, + 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL, + 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL, + 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL, + 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL, + 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL, + 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL, + 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL, + 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL, + 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL, + 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL, + 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL, + 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL, + 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL, + 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL, + 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL, + 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL, + 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL, + 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL, + 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL, + 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL, + 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL, + 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL, + 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL, + 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL, + 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL, + 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL, + 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL, + 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL, + 0x8def022dUL + }, + { + 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL, + 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL, + 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL, + 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL, + 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL, + 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL, + 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL, + 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL, + 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL, + 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL, + 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL, + 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL, + 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL, + 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL, + 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL, + 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL, + 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL, + 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL, + 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL, + 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL, + 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL, + 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL, + 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL, + 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL, + 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL, + 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL, + 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL, + 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL, + 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL, + 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL, + 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL, + 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL, + 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL, + 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL, + 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL, + 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL, + 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL, + 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL, + 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL, + 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL, + 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL, + 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL, + 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL, + 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL, + 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL, + 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL, + 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL, + 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL, + 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL, + 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL, + 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL, + 0x72fd2493UL + }, + { + 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL, + 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL, + 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL, + 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL, + 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL, + 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL, + 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL, + 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL, + 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL, + 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL, + 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL, + 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL, + 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL, + 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL, + 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL, + 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL, + 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL, + 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL, + 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL, + 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL, + 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL, + 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL, + 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL, + 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL, + 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL, + 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL, + 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL, + 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL, + 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL, + 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL, + 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL, + 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL, + 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL, + 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL, + 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL, + 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL, + 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL, + 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL, + 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL, + 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL, + 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL, + 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL, + 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL, + 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL, + 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL, + 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL, + 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL, + 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL, + 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL, + 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL, + 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL, + 0xed3498beUL + }, + { + 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL, + 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL, + 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL, + 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL, + 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL, + 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL, + 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL, + 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL, + 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL, + 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL, + 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL, + 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL, + 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL, + 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL, + 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL, + 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL, + 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL, + 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL, + 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL, + 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL, + 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL, + 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL, + 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL, + 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL, + 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL, + 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL, + 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL, + 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL, + 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL, + 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL, + 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL, + 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL, + 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL, + 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL, + 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL, + 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL, + 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL, + 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL, + 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL, + 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL, + 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL, + 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL, + 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL, + 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL, + 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL, + 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL, + 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL, + 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL, + 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL, + 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL, + 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL, + 0xf10605deUL +#endif + } +}; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.c new file mode 100644 index 000000000..1ec761448 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.c @@ -0,0 +1,2163 @@ +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many people for bug reports and testing. + * + * REFERENCES + * + * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". + * Available in http://tools.ietf.org/html/rfc1951 + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + */ + +/* @(#) $Id$ */ + +#include "deflate.h" + +const char deflate_copyright[] = + " deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* =========================================================================== + * Function prototypes. + */ +typedef enum { + need_more, /* block not completed, need more input or more output */ + block_done, /* block flush performed */ + finish_started, /* finish started, need only more output at next deflate */ + finish_done /* finish done, accept no more input or output */ +} block_state; + +typedef block_state (*compress_func) OF((deflate_state *s, int flush)); +/* Compression function. Returns the block state after the call. */ + +local int deflateStateCheck OF((z_streamp strm)); +local void slide_hash OF((deflate_state *s)); +local void fill_window OF((deflate_state *s)); +local block_state deflate_stored OF((deflate_state *s, int flush)); +local block_state deflate_fast OF((deflate_state *s, int flush)); +#ifndef FASTEST +local block_state deflate_slow OF((deflate_state *s, int flush)); +#endif +local block_state deflate_rle OF((deflate_state *s, int flush)); +local block_state deflate_huff OF((deflate_state *s, int flush)); +local void lm_init OF((deflate_state *s)); +local void putShortMSB OF((deflate_state *s, uInt b)); +local void flush_pending OF((z_streamp strm)); +local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +#ifdef ASMV +# pragma message("Assembler code may have bugs -- use at your own risk") + void match_init OF((void)); /* asm code initialization */ + uInt longest_match OF((deflate_state *s, IPos cur_match)); +#else +local uInt longest_match OF((deflate_state *s, IPos cur_match)); +#endif + +#ifdef ZLIB_DEBUG +local void check_match OF((deflate_state *s, IPos start, IPos match, + int length)); +#endif + +/* =========================================================================== + * Local data + */ + +#define NIL 0 +/* Tail of hash chains */ + +#ifndef TOO_FAR +# define TOO_FAR 4096 +#endif +/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +typedef struct config_s { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; + compress_func func; +} config; + +#ifdef FASTEST +local const config configuration_table[2] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ +#else +local const config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8, deflate_fast}, +/* 3 */ {4, 6, 32, 32, deflate_fast}, + +/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32, deflate_slow}, +/* 6 */ {8, 16, 128, 128, deflate_slow}, +/* 7 */ {8, 32, 128, 256, deflate_slow}, +/* 8 */ {32, 128, 258, 1024, deflate_slow}, +/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ +#endif + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ +#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to UPDATE_HASH are made with consecutive input + * characters, so that a running hash key can be computed from the previous + * key instead of complete recalculation each time. + */ +#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) + + +/* =========================================================================== + * Insert string str in the dictionary and set match_head to the previous head + * of the hash chain (the most recent string with same hash key). Return + * the previous length of the hash chain. + * If this file is compiled with -DFASTEST, the compression level is forced + * to 1, and no hash chains are maintained. + * IN assertion: all calls to INSERT_STRING are made with consecutive input + * characters and the first MIN_MATCH bytes of str are valid (except for + * the last MIN_MATCH-1 bytes of the input file). + */ +#ifdef FASTEST +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#else +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#endif + +/* =========================================================================== + * Initialize the hash table (avoiding 64K overflow for 16 bit systems). + * prev[] will be initialized on the fly. + */ +#define CLEAR_HASH(s) \ + s->head[s->hash_size-1] = NIL; \ + zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + +/* =========================================================================== + * Slide the hash table when sliding the window down (could be avoided with 32 + * bit values at the expense of memory usage). We slide even when level == 0 to + * keep the hash table consistent if we switch back to level > 0 later. + */ +local void slide_hash(s) + deflate_state *s; +{ + unsigned n, m; + Posf *p; + uInt wsize = s->w_size; + + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + } while (--n); + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif +} + +/* ========================================================================= */ +int ZEXPORT deflateInit_(strm, level, version, stream_size) + z_streamp strm; + int level; + const char *version; + int stream_size; +{ + return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + version, stream_size) + z_streamp strm; + int level; + int method; + int windowBits; + int memLevel; + int strategy; + const char *version; + int stream_size; +{ + deflate_state *s; + int wrap = 1; + static const char my_version[] = ZLIB_VERSION; + + ushf *overlay; + /* We overlay pending_buf and d_buf+l_buf. This works since the average + * output size for (length,distance) codes is <= 24 bits. + */ + + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + +#ifdef FASTEST + if (level != 0) level = 1; +#else + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#endif + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } +#ifdef GZIP + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } +#endif + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) { + return Z_STREAM_ERROR; + } + if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ + s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); + if (s == Z_NULL) return Z_MEM_ERROR; + strm->state = (struct internal_state FAR *)s; + s->strm = strm; + s->status = INIT_STATE; /* to pass state test in deflateReset() */ + + s->wrap = wrap; + s->gzhead = Z_NULL; + s->w_bits = (uInt)windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = (uInt)memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + + s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + + s->high_water = 0; /* nothing written to s->window yet */ + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + s->pending_buf = (uchf *) overlay; + s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { + s->status = FINISH_STATE; + strm->msg = ERR_MSG(Z_MEM_ERROR); + deflateEnd (strm); + return Z_MEM_ERROR; + } + s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + + s->level = level; + s->strategy = strategy; + s->method = (Byte)method; + + return deflateReset(strm); +} + +/* ========================================================================= + * Check for a valid deflate stream state. Return 0 if ok, 1 if not. + */ +local int deflateStateCheck (strm) + z_streamp strm; +{ + deflate_state *s; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + s = strm->state; + if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE && +#ifdef GZIP + s->status != GZIP_STATE && +#endif + s->status != EXTRA_STATE && + s->status != NAME_STATE && + s->status != COMMENT_STATE && + s->status != HCRC_STATE && + s->status != BUSY_STATE && + s->status != FINISH_STATE)) + return 1; + return 0; +} + +/* ========================================================================= */ +int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) + z_streamp strm; + const Bytef *dictionary; + uInt dictLength; +{ + deflate_state *s; + uInt str, n; + int wrap; + unsigned avail; + z_const unsigned char *next; + + if (deflateStateCheck(strm) || dictionary == Z_NULL) + return Z_STREAM_ERROR; + s = strm->state; + wrap = s->wrap; + if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead) + return Z_STREAM_ERROR; + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap == 1) + strm->adler = adler32(strm->adler, dictionary, dictLength); + s->wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s->w_size) { + if (wrap == 0) { /* already empty otherwise */ + CLEAR_HASH(s); + s->strstart = 0; + s->block_start = 0L; + s->insert = 0; + } + dictionary += dictLength - s->w_size; /* use the tail */ + dictLength = s->w_size; + } + + /* insert dictionary into window and hash */ + avail = strm->avail_in; + next = strm->next_in; + strm->avail_in = dictLength; + strm->next_in = (z_const Bytef *)dictionary; + fill_window(s); + while (s->lookahead >= MIN_MATCH) { + str = s->strstart; + n = s->lookahead - (MIN_MATCH-1); + do { + UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); +#ifndef FASTEST + s->prev[str & s->w_mask] = s->head[s->ins_h]; +#endif + s->head[s->ins_h] = (Pos)str; + str++; + } while (--n); + s->strstart = str; + s->lookahead = MIN_MATCH-1; + fill_window(s); + } + s->strstart += s->lookahead; + s->block_start = (long)s->strstart; + s->insert = s->lookahead; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + strm->next_in = next; + strm->avail_in = avail; + s->wrap = wrap; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) + z_streamp strm; + Bytef *dictionary; + uInt *dictLength; +{ + deflate_state *s; + uInt len; + + if (deflateStateCheck(strm)) + return Z_STREAM_ERROR; + s = strm->state; + len = s->strstart + s->lookahead; + if (len > s->w_size) + len = s->w_size; + if (dictionary != Z_NULL && len) + zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); + if (dictLength != Z_NULL) + *dictLength = len; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateResetKeep (strm) + z_streamp strm; +{ + deflate_state *s; + + if (deflateStateCheck(strm)) { + return Z_STREAM_ERROR; + } + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->wrap < 0) { + s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ + } + s->status = +#ifdef GZIP + s->wrap == 2 ? GZIP_STATE : +#endif + s->wrap ? INIT_STATE : BUSY_STATE; + strm->adler = +#ifdef GZIP + s->wrap == 2 ? crc32(0L, Z_NULL, 0) : +#endif + adler32(0L, Z_NULL, 0); + s->last_flush = Z_NO_FLUSH; + + _tr_init(s); + + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateReset (strm) + z_streamp strm; +{ + int ret; + + ret = deflateResetKeep(strm); + if (ret == Z_OK) + lm_init(strm->state); + return ret; +} + +/* ========================================================================= */ +int ZEXPORT deflateSetHeader (strm, head) + z_streamp strm; + gz_headerp head; +{ + if (deflateStateCheck(strm) || strm->state->wrap != 2) + return Z_STREAM_ERROR; + strm->state->gzhead = head; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflatePending (strm, pending, bits) + unsigned *pending; + int *bits; + z_streamp strm; +{ + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + if (pending != Z_NULL) + *pending = strm->state->pending; + if (bits != Z_NULL) + *bits = strm->state->bi_valid; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflatePrime (strm, bits, value) + z_streamp strm; + int bits; + int value; +{ + deflate_state *s; + int put; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + s = strm->state; + if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) + return Z_BUF_ERROR; + do { + put = Buf_size - s->bi_valid; + if (put > bits) + put = bits; + s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); + s->bi_valid += put; + _tr_flush_bits(s); + value >>= put; + bits -= put; + } while (bits); + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateParams(strm, level, strategy) + z_streamp strm; + int level; + int strategy; +{ + deflate_state *s; + compress_func func; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + s = strm->state; + +#ifdef FASTEST + if (level != 0) level = 1; +#else + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#endif + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return Z_STREAM_ERROR; + } + func = configuration_table[s->level].func; + + if ((strategy != s->strategy || func != configuration_table[level].func) && + s->high_water) { + /* Flush the last buffer: */ + int err = deflate(strm, Z_BLOCK); + if (err == Z_STREAM_ERROR) + return err; + if (strm->avail_out == 0) + return Z_BUF_ERROR; + } + if (s->level != level) { + if (s->level == 0 && s->matches != 0) { + if (s->matches == 1) + slide_hash(s); + else + CLEAR_HASH(s); + s->matches = 0; + } + s->level = level; + s->max_lazy_match = configuration_table[level].max_lazy; + s->good_match = configuration_table[level].good_length; + s->nice_match = configuration_table[level].nice_length; + s->max_chain_length = configuration_table[level].max_chain; + } + s->strategy = strategy; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) + z_streamp strm; + int good_length; + int max_lazy; + int nice_length; + int max_chain; +{ + deflate_state *s; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + s = strm->state; + s->good_match = (uInt)good_length; + s->max_lazy_match = (uInt)max_lazy; + s->nice_match = nice_length; + s->max_chain_length = (uInt)max_chain; + return Z_OK; +} + +/* ========================================================================= + * For the default windowBits of 15 and memLevel of 8, this function returns + * a close to exact, as well as small, upper bound on the compressed size. + * They are coded as constants here for a reason--if the #define's are + * changed, then this function needs to be changed as well. The return + * value for 15 and 8 only works for those exact settings. + * + * For any setting other than those defaults for windowBits and memLevel, + * the value returned is a conservative worst case for the maximum expansion + * resulting from using fixed blocks instead of stored blocks, which deflate + * can emit on compressed data for some combinations of the parameters. + * + * This function could be more sophisticated to provide closer upper bounds for + * every combination of windowBits and memLevel. But even the conservative + * upper bound of about 14% expansion does not seem onerous for output buffer + * allocation. + */ +uLong ZEXPORT deflateBound(strm, sourceLen) + z_streamp strm; + uLong sourceLen; +{ + deflate_state *s; + uLong complen, wraplen; + + /* conservative upper bound for compressed data */ + complen = sourceLen + + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; + + /* if can't get parameters, return conservative bound plus zlib wrapper */ + if (deflateStateCheck(strm)) + return complen + 6; + + /* compute wrapper length */ + s = strm->state; + switch (s->wrap) { + case 0: /* raw deflate */ + wraplen = 0; + break; + case 1: /* zlib wrapper */ + wraplen = 6 + (s->strstart ? 4 : 0); + break; +#ifdef GZIP + case 2: /* gzip wrapper */ + wraplen = 18; + if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + Bytef *str; + if (s->gzhead->extra != Z_NULL) + wraplen += 2 + s->gzhead->extra_len; + str = s->gzhead->name; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + str = s->gzhead->comment; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + if (s->gzhead->hcrc) + wraplen += 2; + } + break; +#endif + default: /* for compiler happiness */ + wraplen = 6; + } + + /* if not default parameters, return conservative bound */ + if (s->w_bits != 15 || s->hash_bits != 8 + 7) + return complen + wraplen; + + /* default settings: return tight bound for that case */ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13 - 6 + wraplen; +} + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +local void putShortMSB (s, b) + deflate_state *s; + uInt b; +{ + put_byte(s, (Byte)(b >> 8)); + put_byte(s, (Byte)(b & 0xff)); +} + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output, except for + * some deflate_stored() output, goes through this function so some + * applications may wish to modify it to avoid allocating a large + * strm->next_out buffer and copying into it. (See also read_buf()). + */ +local void flush_pending(strm) + z_streamp strm; +{ + unsigned len; + deflate_state *s = strm->state; + + _tr_flush_bits(s); + len = s->pending; + if (len > strm->avail_out) len = strm->avail_out; + if (len == 0) return; + + zmemcpy(strm->next_out, s->pending_out, len); + strm->next_out += len; + s->pending_out += len; + strm->total_out += len; + strm->avail_out -= len; + s->pending -= len; + if (s->pending == 0) { + s->pending_out = s->pending_buf; + } +} + +/* =========================================================================== + * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. + */ +#define HCRC_UPDATE(beg) \ + do { \ + if (s->gzhead->hcrc && s->pending > (beg)) \ + strm->adler = crc32(strm->adler, s->pending_buf + (beg), \ + s->pending - (beg)); \ + } while (0) + +/* ========================================================================= */ +int ZEXPORT deflate (strm, flush) + z_streamp strm; + int flush; +{ + int old_flush; /* value of flush param for previous deflate call */ + deflate_state *s; + + if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { + return Z_STREAM_ERROR; + } + s = strm->state; + + if (strm->next_out == Z_NULL || + (strm->avail_in != 0 && strm->next_in == Z_NULL) || + (s->status == FINISH_STATE && flush != Z_FINISH)) { + ERR_RETURN(strm, Z_STREAM_ERROR); + } + if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); + + old_flush = s->last_flush; + s->last_flush = flush; + + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* Write the header */ + if (s->status == INIT_STATE) { + /* zlib header */ + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags; + + if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) + level_flags = 0; + else if (s->level < 6) + level_flags = 1; + else if (s->level == 6) + level_flags = 2; + else + level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = adler32(0L, Z_NULL, 0); + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#ifdef GZIP + if (s->status == GZIP_STATE) { + /* gzip header */ + strm->adler = crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (s->gzhead == Z_NULL) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } + else { + put_byte(s, (s->gzhead->text ? 1 : 0) + + (s->gzhead->hcrc ? 2 : 0) + + (s->gzhead->extra == Z_NULL ? 0 : 4) + + (s->gzhead->name == Z_NULL ? 0 : 8) + + (s->gzhead->comment == Z_NULL ? 0 : 16) + ); + put_byte(s, (Byte)(s->gzhead->time & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, s->gzhead->os & 0xff); + if (s->gzhead->extra != Z_NULL) { + put_byte(s, s->gzhead->extra_len & 0xff); + put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); + } + if (s->gzhead->hcrc) + strm->adler = crc32(strm->adler, s->pending_buf, + s->pending); + s->gzindex = 0; + s->status = EXTRA_STATE; + } + } + if (s->status == EXTRA_STATE) { + if (s->gzhead->extra != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex; + while (s->pending + left > s->pending_buf_size) { + uInt copy = s->pending_buf_size - s->pending; + zmemcpy(s->pending_buf + s->pending, + s->gzhead->extra + s->gzindex, copy); + s->pending = s->pending_buf_size; + HCRC_UPDATE(beg); + s->gzindex += copy; + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + left -= copy; + } + zmemcpy(s->pending_buf + s->pending, + s->gzhead->extra + s->gzindex, left); + s->pending += left; + HCRC_UPDATE(beg); + s->gzindex = 0; + } + s->status = NAME_STATE; + } + if (s->status == NAME_STATE) { + if (s->gzhead->name != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + int val; + do { + if (s->pending == s->pending_buf_size) { + HCRC_UPDATE(beg); + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + } + val = s->gzhead->name[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + HCRC_UPDATE(beg); + s->gzindex = 0; + } + s->status = COMMENT_STATE; + } + if (s->status == COMMENT_STATE) { + if (s->gzhead->comment != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + int val; + do { + if (s->pending == s->pending_buf_size) { + HCRC_UPDATE(beg); + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + } + val = s->gzhead->comment[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + HCRC_UPDATE(beg); + } + s->status = HCRC_STATE; + } + if (s->status == HCRC_STATE) { + if (s->gzhead->hcrc) { + if (s->pending + 2 > s->pending_buf_size) { + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + strm->adler = crc32(0L, Z_NULL, 0); + } + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#endif + + /* Start a new block or continue the current one. + */ + if (strm->avail_in != 0 || s->lookahead != 0 || + (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { + block_state bstate; + + bstate = s->level == 0 ? deflate_stored(s, flush) : + s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : + s->strategy == Z_RLE ? deflate_rle(s, flush) : + (*(configuration_table[s->level].func))(s, flush); + + if (bstate == finish_started || bstate == finish_done) { + s->status = FINISH_STATE; + } + if (bstate == need_more || bstate == finish_started) { + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate == block_done) { + if (flush == Z_PARTIAL_FLUSH) { + _tr_align(s); + } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + _tr_stored_block(s, (char*)0, 0L, 0); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush == Z_FULL_FLUSH) { + CLEAR_HASH(s); /* forget history */ + if (s->lookahead == 0) { + s->strstart = 0; + s->block_start = 0L; + s->insert = 0; + } + } + } + flush_pending(strm); + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + + if (flush != Z_FINISH) return Z_OK; + if (s->wrap <= 0) return Z_STREAM_END; + + /* Write the trailer */ +#ifdef GZIP + if (s->wrap == 2) { + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); + put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); + put_byte(s, (Byte)(strm->total_in & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); + } + else +#endif + { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ + return s->pending != 0 ? Z_OK : Z_STREAM_END; +} + +/* ========================================================================= */ +int ZEXPORT deflateEnd (strm) + z_streamp strm; +{ + int status; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + + status = strm->state->status; + + /* Deallocate in reverse order of allocations: */ + TRY_FREE(strm, strm->state->pending_buf); + TRY_FREE(strm, strm->state->head); + TRY_FREE(strm, strm->state->prev); + TRY_FREE(strm, strm->state->window); + + ZFREE(strm, strm->state); + strm->state = Z_NULL; + + return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; +} + +/* ========================================================================= + * Copy the source state to the destination state. + * To simplify the source, this is not supported for 16-bit MSDOS (which + * doesn't have enough memory anyway to duplicate compression states). + */ +int ZEXPORT deflateCopy (dest, source) + z_streamp dest; + z_streamp source; +{ +#ifdef MAXSEG_64K + return Z_STREAM_ERROR; +#else + deflate_state *ds; + deflate_state *ss; + ushf *overlay; + + + if (deflateStateCheck(source) || dest == Z_NULL) { + return Z_STREAM_ERROR; + } + + ss = source->state; + + zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + + ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); + if (ds == Z_NULL) return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); + ds->strm = dest; + + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); + overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); + ds->pending_buf = (uchf *) overlay; + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { + deflateEnd (dest); + return Z_MEM_ERROR; + } + /* following zmemcpy do not work for 16-bit MSDOS */ + zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); + zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); + zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); + ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); + ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->bl_desc.dyn_tree = ds->bl_tree; + + return Z_OK; +#endif /* MAXSEG_64K */ +} + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local unsigned read_buf(strm, buf, size) + z_streamp strm; + Bytef *buf; + unsigned size; +{ + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + zmemcpy(buf, strm->next_in, len); + if (strm->state->wrap == 1) { + strm->adler = adler32(strm->adler, buf, len); + } +#ifdef GZIP + else if (strm->state->wrap == 2) { + strm->adler = crc32(strm->adler, buf, len); + } +#endif + strm->next_in += len; + strm->total_in += len; + + return len; +} + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init (s) + deflate_state *s; +{ + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->insert = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +#ifndef FASTEST +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif +#endif +} + +#ifndef FASTEST +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +#ifndef ASMV +/* For 80x86 and 680x0, an optimized version will be provided in match.asm or + * match.S. The code will be functionally equivalent. + */ +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + unsigned chain_length = s->max_chain_length;/* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + int best_len = (int)s->prev_length; /* best match length so far */ + int nice_match = s->nice_match; /* stop if match long enough */ + IPos limit = s->strstart > (IPos)MAX_DIST(s) ? + s->strstart - (IPos)MAX_DIST(s) : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + Posf *prev = s->prev; + uInt wmask = s->w_mask; + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan+best_len-1); +#else + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Byte scan_end1 = scan[best_len-1]; + register Byte scan_end = scan[best_len]; +#endif + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s->prev_length >= s->good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead; + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + Assert(cur_match < s->strstart, "no future"); + match = s->window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ushf*)(match+best_len-1) != scan_end || + *(ushf*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart+3, +5, ... up to strstart+257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + Assert(scan[2] == match[2], "scan[2]?"); + scan++, match++; + do { + } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window+strstart+257 */ + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend-scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len-1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + s->match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ushf*)(scan+best_len-1); +#else + scan_end1 = scan[best_len-1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & wmask]) > limit + && --chain_length != 0); + + if ((uInt)best_len <= s->lookahead) return (uInt)best_len; + return s->lookahead; +} +#endif /* ASMV */ + +#else /* FASTEST */ + +/* --------------------------------------------------------------------------- + * Optimized version for FASTEST only + */ +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + Assert(cur_match < s->strstart, "no future"); + + match = s->window + cur_match; + + /* Return failure if the match length is less than 2: + */ + if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match += 2; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + + if (len < MIN_MATCH) return MIN_MATCH - 1; + + s->match_start = cur_match; + return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; +} + +#endif /* FASTEST */ + +#ifdef ZLIB_DEBUG + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(s, start, match, length) + deflate_state *s; + IPos start, match; + int length; +{ + /* check that the match is indeed a match */ + if (zmemcmp(s->window + match, + s->window + start, length) != EQUAL) { + fprintf(stderr, " start %u, match %u, length %d\n", + start, match, length); + do { + fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); + } while (--length != 0); + z_error("invalid match"); + } + if (z_verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start-match, length); + do { putc(s->window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(s, start, match, length) +#endif /* ZLIB_DEBUG */ + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(s) + deflate_state *s; +{ + unsigned n; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (sizeof(int) <= 2) { + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if + * strstart == 0 && lookahead == 1 (input done a byte at time) + */ + more--; + } + } + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s->strstart >= wsize+MAX_DIST(s)) { + + zmemcpy(s->window, s->window+wsize, (unsigned)wsize - more); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + slide_hash(s); + more += wsize; + } + if (s->strm->avail_in == 0) break; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead + s->insert >= MIN_MATCH) { + uInt str = s->strstart - s->insert; + s->ins_h = s->window[str]; + UPDATE_HASH(s, s->ins_h, s->window[str + 1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + while (s->insert) { + UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); +#ifndef FASTEST + s->prev[str & s->w_mask] = s->head[s->ins_h]; +#endif + s->head[s->ins_h] = (Pos)str; + str++; + s->insert--; + if (s->lookahead + s->insert < MIN_MATCH) + break; + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + if (s->high_water < s->window_size) { + ulg curr = s->strstart + (ulg)(s->lookahead); + ulg init; + + if (s->high_water < curr) { + /* Previous high water mark below current data -- zero WIN_INIT + * bytes or up to end of window, whichever is less. + */ + init = s->window_size - curr; + if (init > WIN_INIT) + init = WIN_INIT; + zmemzero(s->window + curr, (unsigned)init); + s->high_water = curr + init; + } + else if (s->high_water < (ulg)curr + WIN_INIT) { + /* High water mark at or above current data, but below current data + * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + * to end of window, whichever is less. + */ + init = (ulg)curr + WIN_INIT - s->high_water; + if (init > s->window_size - s->high_water) + init = s->window_size - s->high_water; + zmemzero(s->window + s->high_water, (unsigned)init); + s->high_water += init; + } + } + + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "not enough room for search"); +} + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, last) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (last)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ + Tracev((stderr,"[FLUSH]")); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, last) { \ + FLUSH_BLOCK_ONLY(s, last); \ + if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ +} + +/* Maximum stored block length in deflate format (not including header). */ +#define MAX_STORED 65535 + +/* Minimum of a and b. */ +#define MIN(a, b) ((a) > (b) ? (b) : (a)) + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * + * In case deflateParams() is used to later switch to a non-zero compression + * level, s->matches (otherwise unused when storing) keeps track of the number + * of hash table slides to perform. If s->matches is 1, then one hash table + * slide will be done when switching. If s->matches is 2, the maximum value + * allowed here, then the hash table will be cleared, since two or more slides + * is the same as a clear. + * + * deflate_stored() is written to minimize the number of times an input byte is + * copied. It is most efficient with large input and output buffers, which + * maximizes the opportunites to have a single copy from next_in to next_out. + */ +local block_state deflate_stored(s, flush) + deflate_state *s; + int flush; +{ + /* Smallest worthy block size when not flushing or finishing. By default + * this is 32K. This can be as small as 507 bytes for memLevel == 1. For + * large input and output buffers, the stored block size will be larger. + */ + unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size); + + /* Copy as many min_block or larger stored blocks directly to next_out as + * possible. If flushing, copy the remaining available input to next_out as + * stored blocks, if there is enough space. + */ + unsigned len, left, have, last = 0; + unsigned used = s->strm->avail_in; + do { + /* Set len to the maximum size block that we can copy directly with the + * available input data and output space. Set left to how much of that + * would be copied from what's left in the window. + */ + len = MAX_STORED; /* maximum deflate stored block length */ + have = (s->bi_valid + 42) >> 3; /* number of header bytes */ + if (s->strm->avail_out < have) /* need room for header */ + break; + /* maximum stored block length that will fit in avail_out: */ + have = s->strm->avail_out - have; + left = s->strstart - s->block_start; /* bytes left in window */ + if (len > (ulg)left + s->strm->avail_in) + len = left + s->strm->avail_in; /* limit len to the input */ + if (len > have) + len = have; /* limit len to the output */ + + /* If the stored block would be less than min_block in length, or if + * unable to copy all of the available input when flushing, then try + * copying to the window and the pending buffer instead. Also don't + * write an empty block when flushing -- deflate() does that. + */ + if (len < min_block && ((len == 0 && flush != Z_FINISH) || + flush == Z_NO_FLUSH || + len != left + s->strm->avail_in)) + break; + + /* Make a dummy stored block in pending to get the header bytes, + * including any pending bits. This also updates the debugging counts. + */ + last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; + _tr_stored_block(s, (char *)0, 0L, last); + + /* Replace the lengths in the dummy stored block with len. */ + s->pending_buf[s->pending - 4] = len; + s->pending_buf[s->pending - 3] = len >> 8; + s->pending_buf[s->pending - 2] = ~len; + s->pending_buf[s->pending - 1] = ~len >> 8; + + /* Write the stored block header bytes. */ + flush_pending(s->strm); + +#ifdef ZLIB_DEBUG + /* Update debugging counts for the data about to be copied. */ + s->compressed_len += len << 3; + s->bits_sent += len << 3; +#endif + + /* Copy uncompressed bytes from the window to next_out. */ + if (left) { + if (left > len) + left = len; + zmemcpy(s->strm->next_out, s->window + s->block_start, left); + s->strm->next_out += left; + s->strm->avail_out -= left; + s->strm->total_out += left; + s->block_start += left; + len -= left; + } + + /* Copy uncompressed bytes directly from next_in to next_out, updating + * the check value. + */ + if (len) { + read_buf(s->strm, s->strm->next_out, len); + s->strm->next_out += len; + s->strm->avail_out -= len; + s->strm->total_out += len; + } + } while (last == 0); + + /* Update the sliding window with the last s->w_size bytes of the copied + * data, or append all of the copied data to the existing window if less + * than s->w_size bytes were copied. Also update the number of bytes to + * insert in the hash tables, in the event that deflateParams() switches to + * a non-zero compression level. + */ + used -= s->strm->avail_in; /* number of input bytes directly copied */ + if (used) { + /* If any input was used, then no unused input remains in the window, + * therefore s->block_start == s->strstart. + */ + if (used >= s->w_size) { /* supplant the previous history */ + s->matches = 2; /* clear hash */ + zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); + s->strstart = s->w_size; + } + else { + if (s->window_size - s->strstart <= used) { + /* Slide the window down. */ + s->strstart -= s->w_size; + zmemcpy(s->window, s->window + s->w_size, s->strstart); + if (s->matches < 2) + s->matches++; /* add a pending slide_hash() */ + } + zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); + s->strstart += used; + } + s->block_start = s->strstart; + s->insert += MIN(used, s->w_size - s->insert); + } + if (s->high_water < s->strstart) + s->high_water = s->strstart; + + /* If the last block was written to next_out, then done. */ + if (last) + return finish_done; + + /* If flushing and all input has been consumed, then done. */ + if (flush != Z_NO_FLUSH && flush != Z_FINISH && + s->strm->avail_in == 0 && (long)s->strstart == s->block_start) + return block_done; + + /* Fill the window with any remaining input. */ + have = s->window_size - s->strstart - 1; + if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { + /* Slide the window down. */ + s->block_start -= s->w_size; + s->strstart -= s->w_size; + zmemcpy(s->window, s->window + s->w_size, s->strstart); + if (s->matches < 2) + s->matches++; /* add a pending slide_hash() */ + have += s->w_size; /* more space now */ + } + if (have > s->strm->avail_in) + have = s->strm->avail_in; + if (have) { + read_buf(s->strm, s->window + s->strstart, have); + s->strstart += have; + } + if (s->high_water < s->strstart) + s->high_water = s->strstart; + + /* There was not enough avail_out to write a complete worthy or flushed + * stored block to next_out. Write a stored block to pending instead, if we + * have enough input for a worthy block, or if flushing and there is enough + * room for the remaining input as a stored block in the pending buffer. + */ + have = (s->bi_valid + 42) >> 3; /* number of header bytes */ + /* maximum stored block length that will fit in pending: */ + have = MIN(s->pending_buf_size - have, MAX_STORED); + min_block = MIN(have, s->w_size); + left = s->strstart - s->block_start; + if (left >= min_block || + ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH && + s->strm->avail_in == 0 && left <= have)) { + len = MIN(left, have); + last = flush == Z_FINISH && s->strm->avail_in == 0 && + len == left ? 1 : 0; + _tr_stored_block(s, (charf *)s->window + s->block_start, len, last); + s->block_start += len; + flush_pending(s->strm); + } + + /* We've done all we can with the available input and output. */ + return last ? finish_started : need_more; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local block_state deflate_fast(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head; /* head of the hash chain */ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = NIL; + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ + } + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->match_start, s->match_length); + + _tr_tally_dist(s, s->strstart - s->match_start, + s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ +#ifndef FASTEST + if (s->match_length <= s->max_insert_length && + s->lookahead >= MIN_MATCH) { + s->match_length--; /* string at strstart already in table */ + do { + s->strstart++; + INSERT_STRING(s, s->strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s->match_length != 0); + s->strstart++; + } else +#endif + { + s->strstart += s->match_length; + s->match_length = 0; + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->last_lit) + FLUSH_BLOCK(s, 0); + return block_done; +} + +#ifndef FASTEST +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +local block_state deflate_slow(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head; /* head of hash chain */ + int bflush; /* set if current block must be flushed */ + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = NIL; + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + */ + s->prev_length = s->match_length, s->prev_match = s->match_start; + s->match_length = MIN_MATCH-1; + + if (hash_head != NIL && s->prev_length < s->max_lazy_match && + s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ + + if (s->match_length <= 5 && (s->strategy == Z_FILTERED +#if TOO_FAR <= 32767 + || (s->match_length == MIN_MATCH && + s->strstart - s->match_start > TOO_FAR) +#endif + )) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s->match_length = MIN_MATCH-1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + check_match(s, s->strstart-1, s->prev_match, s->prev_length); + + _tr_tally_dist(s, s->strstart -1 - s->prev_match, + s->prev_length - MIN_MATCH, bflush); + + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s->lookahead -= s->prev_length-1; + s->prev_length -= 2; + do { + if (++s->strstart <= max_insert) { + INSERT_STRING(s, s->strstart, hash_head); + } + } while (--s->prev_length != 0); + s->match_available = 0; + s->match_length = MIN_MATCH-1; + s->strstart++; + + if (bflush) FLUSH_BLOCK(s, 0); + + } else if (s->match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + if (bflush) { + FLUSH_BLOCK_ONLY(s, 0); + } + s->strstart++; + s->lookahead--; + if (s->strm->avail_out == 0) return need_more; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s->match_available = 1; + s->strstart++; + s->lookahead--; + } + } + Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s->match_available) { + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + s->match_available = 0; + } + s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->last_lit) + FLUSH_BLOCK(s, 0); + return block_done; +} +#endif /* FASTEST */ + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +local block_state deflate_rle(s, flush) + deflate_state *s; + int flush; +{ + int bflush; /* set if current block must be flushed */ + uInt prev; /* byte at distance one to match */ + Bytef *scan, *strend; /* scan goes up to strend for length of run */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s->lookahead <= MAX_MATCH) { + fill_window(s); + if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s->match_length = 0; + if (s->lookahead >= MIN_MATCH && s->strstart > 0) { + scan = s->window + s->strstart - 1; + prev = *scan; + if (prev == *++scan && prev == *++scan && prev == *++scan) { + strend = s->window + s->strstart + MAX_MATCH; + do { + } while (prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + scan < strend); + s->match_length = MAX_MATCH - (uInt)(strend - scan); + if (s->match_length > s->lookahead) + s->match_length = s->lookahead; + } + Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->strstart - 1, s->match_length); + + _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + s->strstart += s->match_length; + s->match_length = 0; + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = 0; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->last_lit) + FLUSH_BLOCK(s, 0); + return block_done; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +local block_state deflate_huff(s, flush) + deflate_state *s; + int flush; +{ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s->lookahead == 0) { + fill_window(s); + if (s->lookahead == 0) { + if (flush == Z_NO_FLUSH) + return need_more; + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s->match_length = 0; + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = 0; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->last_lit) + FLUSH_BLOCK(s, 0); + return block_done; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.h new file mode 100644 index 000000000..23ecdd312 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/deflate.h @@ -0,0 +1,349 @@ +/* deflate.h -- internal compression state + * Copyright (C) 1995-2016 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef DEFLATE_H +#define DEFLATE_H + +#include "zutil.h" + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer creation by deflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip encoding + should be left enabled. */ +#ifndef NO_GZIP +# define GZIP +#endif + +/* =========================================================================== + * Internal compression state. + */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define Buf_size 16 +/* size of bit buffer in bi_buf */ + +#define INIT_STATE 42 /* zlib header -> BUSY_STATE */ +#ifdef GZIP +# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */ +#endif +#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */ +#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */ +#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */ +#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */ +#define BUSY_STATE 113 /* deflate -> FINISH_STATE */ +#define FINISH_STATE 666 /* stream complete */ +/* Stream status */ + + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data_s { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} FAR ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +typedef struct static_tree_desc_s static_tree_desc; + +typedef struct tree_desc_s { + ct_data *dyn_tree; /* the dynamic tree */ + int max_code; /* largest code with non zero frequency */ + const static_tree_desc *stat_desc; /* the corresponding static tree */ +} FAR tree_desc; + +typedef ush Pos; +typedef Pos FAR Posf; +typedef unsigned IPos; + +/* A Pos is an index in the character window. We use short instead of int to + * save space in the various tables. IPos is used only for parameter passing. + */ + +typedef struct internal_state { + z_streamp strm; /* pointer back to this zlib stream */ + int status; /* as the name implies */ + Bytef *pending_buf; /* output still pending */ + ulg pending_buf_size; /* size of pending_buf */ + Bytef *pending_out; /* next pending byte to output to the stream */ + ulg pending; /* nb of bytes in the pending buffer */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + gz_headerp gzhead; /* gzip header information to write */ + ulg gzindex; /* where in extra, name, or comment */ + Byte method; /* can only be DEFLATED */ + int last_flush; /* value of flush param for previous deflate call */ + + /* used by deflate.c: */ + + uInt w_size; /* LZ77 window size (32K by default) */ + uInt w_bits; /* log2(w_size) (8..16) */ + uInt w_mask; /* w_size - 1 */ + + Bytef *window; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. Also, it limits + * the window size to 64K, which is quite useful on MSDOS. + * To do: use the user input buffer as sliding window. + */ + + ulg window_size; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + Posf *prev; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + Posf *head; /* Heads of the hash chains or NIL. */ + + uInt ins_h; /* hash index of string to be inserted */ + uInt hash_size; /* number of elements in hash table */ + uInt hash_bits; /* log2(hash_size) */ + uInt hash_mask; /* hash_size-1 */ + + uInt hash_shift; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + long block_start; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + uInt match_length; /* length of best match */ + IPos prev_match; /* previous match */ + int match_available; /* set if previous match exists */ + uInt strstart; /* start of string to insert */ + uInt match_start; /* start of matching string */ + uInt lookahead; /* number of valid bytes ahead in window */ + + uInt prev_length; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + uInt max_chain_length; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + uInt max_lazy_match; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +# define max_insert_length max_lazy_match + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + int level; /* compression level (1..9) */ + int strategy; /* favor or force Huffman coding*/ + + uInt good_match; + /* Use a faster search when the previous match is longer than this */ + + int nice_match; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + /* Didn't use ct_data typedef below to suppress compiler warning */ + struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + struct tree_desc_s l_desc; /* desc. for literal tree */ + struct tree_desc_s d_desc; /* desc. for distance tree */ + struct tree_desc_s bl_desc; /* desc. for bit length tree */ + + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + int heap_len; /* number of elements in the heap */ + int heap_max; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + uch depth[2*L_CODES+1]; + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + uchf *l_buf; /* buffer for literals or lengths */ + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + uInt last_lit; /* running index in l_buf */ + + ushf *d_buf; + /* Buffer for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ + uInt matches; /* number of string matches in current block */ + uInt insert; /* bytes at end of window left to insert */ + +#ifdef ZLIB_DEBUG + ulg compressed_len; /* total bit length of compressed file mod 2^32 */ + ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ +#endif + + ush bi_buf; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + int bi_valid; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + ulg high_water; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ + +} FAR deflate_state; + +/* Output a byte on the stream. + * IN assertion: there is enough room in pending_buf. + */ +#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);} + + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) +/* In order to simplify the code, particularly on 16 bit machines, match + * distances are limited to MAX_DIST instead of WSIZE. + */ + +#define WIN_INIT MAX_MATCH +/* Number of bytes after end of data in window to initialize in order to avoid + memory checker errors from longest match routines */ + + /* in trees.c */ +void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); +int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); +void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); +void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); +void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); + +#define d_code(dist) \ + ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. _dist_code[256] and _dist_code[257] are never + * used. + */ + +#ifndef ZLIB_DEBUG +/* Inline versions of _tr_tally for speed: */ + +#if defined(GEN_TREES_H) || !defined(STDC) + extern uch ZLIB_INTERNAL _length_code[]; + extern uch ZLIB_INTERNAL _dist_code[]; +#else + extern const uch ZLIB_INTERNAL _length_code[]; + extern const uch ZLIB_INTERNAL _dist_code[]; +#endif + +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->last_lit] = 0; \ + s->l_buf[s->last_lit++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (uch)(length); \ + ush dist = (ush)(distance); \ + s->d_buf[s->last_lit] = dist; \ + s->l_buf[s->last_lit++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +#else +# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +# define _tr_tally_dist(s, distance, length, flush) \ + flush = _tr_tally(s, distance, length) +#endif + +#endif /* DEFLATE_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/README.examples b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/README.examples new file mode 100644 index 000000000..56a31714e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/README.examples @@ -0,0 +1,49 @@ +This directory contains examples of the use of zlib and other relevant +programs and documentation. + +enough.c + calculation and justification of ENOUGH parameter in inftrees.h + - calculates the maximum table space used in inflate tree + construction over all possible Huffman codes + +fitblk.c + compress just enough input to nearly fill a requested output size + - zlib isn't designed to do this, but fitblk does it anyway + +gun.c + uncompress a gzip file + - illustrates the use of inflateBack() for high speed file-to-file + decompression using call-back functions + - is approximately twice as fast as gzip -d + - also provides Unix uncompress functionality, again twice as fast + +gzappend.c + append to a gzip file + - illustrates the use of the Z_BLOCK flush parameter for inflate() + - illustrates the use of deflatePrime() to start at any bit + +gzjoin.c + join gzip files without recalculating the crc or recompressing + - illustrates the use of the Z_BLOCK flush parameter for inflate() + - illustrates the use of crc32_combine() + +gzlog.c +gzlog.h + efficiently and robustly maintain a message log file in gzip format + - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(), + and deflateSetDictionary() + - illustrates use of a gzip header extra field + +zlib_how.html + painfully comprehensive description of zpipe.c (see below) + - describes in excruciating detail the use of deflate() and inflate() + +zpipe.c + reads and writes zlib streams from stdin to stdout + - illustrates the proper use of deflate() and inflate() + - deeply commented in zlib_how.html (see above) + +zran.c + index a zlib or gzip stream and randomly access it + - illustrates the use of Z_BLOCK, inflatePrime(), and + inflateSetDictionary() to provide random access diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/enough.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/enough.c new file mode 100644 index 000000000..b99114430 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/enough.c @@ -0,0 +1,572 @@ +/* enough.c -- determine the maximum size of inflate's Huffman code tables over + * all possible valid and complete Huffman codes, subject to a length limit. + * Copyright (C) 2007, 2008, 2012 Mark Adler + * Version 1.4 18 August 2012 Mark Adler + */ + +/* Version history: + 1.0 3 Jan 2007 First version (derived from codecount.c version 1.4) + 1.1 4 Jan 2007 Use faster incremental table usage computation + Prune examine() search on previously visited states + 1.2 5 Jan 2007 Comments clean up + As inflate does, decrease root for short codes + Refuse cases where inflate would increase root + 1.3 17 Feb 2008 Add argument for initial root table size + Fix bug for initial root table size == max - 1 + Use a macro to compute the history index + 1.4 18 Aug 2012 Avoid shifts more than bits in type (caused endless loop!) + Clean up comparisons of different types + Clean up code indentation + */ + +/* + Examine all possible Huffman codes for a given number of symbols and a + maximum code length in bits to determine the maximum table size for zilb's + inflate. Only complete Huffman codes are counted. + + Two codes are considered distinct if the vectors of the number of codes per + length are not identical. So permutations of the symbol assignments result + in the same code for the counting, as do permutations of the assignments of + the bit values to the codes (i.e. only canonical codes are counted). + + We build a code from shorter to longer lengths, determining how many symbols + are coded at each length. At each step, we have how many symbols remain to + be coded, what the last code length used was, and how many bit patterns of + that length remain unused. Then we add one to the code length and double the + number of unused patterns to graduate to the next code length. We then + assign all portions of the remaining symbols to that code length that + preserve the properties of a correct and eventually complete code. Those + properties are: we cannot use more bit patterns than are available; and when + all the symbols are used, there are exactly zero possible bit patterns + remaining. + + The inflate Huffman decoding algorithm uses two-level lookup tables for + speed. There is a single first-level table to decode codes up to root bits + in length (root == 9 in the current inflate implementation). The table + has 1 << root entries and is indexed by the next root bits of input. Codes + shorter than root bits have replicated table entries, so that the correct + entry is pointed to regardless of the bits that follow the short code. If + the code is longer than root bits, then the table entry points to a second- + level table. The size of that table is determined by the longest code with + that root-bit prefix. If that longest code has length len, then the table + has size 1 << (len - root), to index the remaining bits in that set of + codes. Each subsequent root-bit prefix then has its own sub-table. The + total number of table entries required by the code is calculated + incrementally as the number of codes at each bit length is populated. When + all of the codes are shorter than root bits, then root is reduced to the + longest code length, resulting in a single, smaller, one-level table. + + The inflate algorithm also provides for small values of root (relative to + the log2 of the number of symbols), where the shortest code has more bits + than root. In that case, root is increased to the length of the shortest + code. This program, by design, does not handle that case, so it is verified + that the number of symbols is less than 2^(root + 1). + + In order to speed up the examination (by about ten orders of magnitude for + the default arguments), the intermediate states in the build-up of a code + are remembered and previously visited branches are pruned. The memory + required for this will increase rapidly with the total number of symbols and + the maximum code length in bits. However this is a very small price to pay + for the vast speedup. + + First, all of the possible Huffman codes are counted, and reachable + intermediate states are noted by a non-zero count in a saved-results array. + Second, the intermediate states that lead to (root + 1) bit or longer codes + are used to look at all sub-codes from those junctures for their inflate + memory usage. (The amount of memory used is not affected by the number of + codes of root bits or less in length.) Third, the visited states in the + construction of those sub-codes and the associated calculation of the table + size is recalled in order to avoid recalculating from the same juncture. + Beginning the code examination at (root + 1) bit codes, which is enabled by + identifying the reachable nodes, accounts for about six of the orders of + magnitude of improvement for the default arguments. About another four + orders of magnitude come from not revisiting previous states. Out of + approximately 2x10^16 possible Huffman codes, only about 2x10^6 sub-codes + need to be examined to cover all of the possible table memory usage cases + for the default arguments of 286 symbols limited to 15-bit codes. + + Note that an unsigned long long type is used for counting. It is quite easy + to exceed the capacity of an eight-byte integer with a large number of + symbols and a large maximum code length, so multiple-precision arithmetic + would need to replace the unsigned long long arithmetic in that case. This + program will abort if an overflow occurs. The big_t type identifies where + the counting takes place. + + An unsigned long long type is also used for calculating the number of + possible codes remaining at the maximum length. This limits the maximum + code length to the number of bits in a long long minus the number of bits + needed to represent the symbols in a flat code. The code_t type identifies + where the bit pattern counting takes place. + */ + +#include +#include +#include +#include + +#define local static + +/* special data types */ +typedef unsigned long long big_t; /* type for code counting */ +typedef unsigned long long code_t; /* type for bit pattern counting */ +struct tab { /* type for been here check */ + size_t len; /* length of bit vector in char's */ + char *vec; /* allocated bit vector */ +}; + +/* The array for saving results, num[], is indexed with this triplet: + + syms: number of symbols remaining to code + left: number of available bit patterns at length len + len: number of bits in the codes currently being assigned + + Those indices are constrained thusly when saving results: + + syms: 3..totsym (totsym == total symbols to code) + left: 2..syms - 1, but only the evens (so syms == 8 -> 2, 4, 6) + len: 1..max - 1 (max == maximum code length in bits) + + syms == 2 is not saved since that immediately leads to a single code. left + must be even, since it represents the number of available bit patterns at + the current length, which is double the number at the previous length. + left ends at syms-1 since left == syms immediately results in a single code. + (left > sym is not allowed since that would result in an incomplete code.) + len is less than max, since the code completes immediately when len == max. + + The offset into the array is calculated for the three indices with the + first one (syms) being outermost, and the last one (len) being innermost. + We build the array with length max-1 lists for the len index, with syms-3 + of those for each symbol. There are totsym-2 of those, with each one + varying in length as a function of sym. See the calculation of index in + count() for the index, and the calculation of size in main() for the size + of the array. + + For the deflate example of 286 symbols limited to 15-bit codes, the array + has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than + half of the space allocated for saved results is actually used -- not all + possible triplets are reached in the generation of valid Huffman codes. + */ + +/* The array for tracking visited states, done[], is itself indexed identically + to the num[] array as described above for the (syms, left, len) triplet. + Each element in the array is further indexed by the (mem, rem) doublet, + where mem is the amount of inflate table space used so far, and rem is the + remaining unused entries in the current inflate sub-table. Each indexed + element is simply one bit indicating whether the state has been visited or + not. Since the ranges for mem and rem are not known a priori, each bit + vector is of a variable size, and grows as needed to accommodate the visited + states. mem and rem are used to calculate a single index in a triangular + array. Since the range of mem is expected in the default case to be about + ten times larger than the range of rem, the array is skewed to reduce the + memory usage, with eight times the range for mem than for rem. See the + calculations for offset and bit in beenhere() for the details. + + For the deflate example of 286 symbols limited to 15-bit codes, the bit + vectors grow to total approximately 21 MB, in addition to the 4.3 MB done[] + array itself. + */ + +/* Globals to avoid propagating constants or constant pointers recursively */ +local int max; /* maximum allowed bit length for the codes */ +local int root; /* size of base code table in bits */ +local int large; /* largest code table so far */ +local size_t size; /* number of elements in num and done */ +local int *code; /* number of symbols assigned to each bit length */ +local big_t *num; /* saved results array for code counting */ +local struct tab *done; /* states already evaluated array */ + +/* Index function for num[] and done[] */ +#define INDEX(i,j,k) (((size_t)((i-1)>>1)*((i-2)>>1)+(j>>1)-1)*(max-1)+k-1) + +/* Free allocated space. Uses globals code, num, and done. */ +local void cleanup(void) +{ + size_t n; + + if (done != NULL) { + for (n = 0; n < size; n++) + if (done[n].len) + free(done[n].vec); + free(done); + } + if (num != NULL) + free(num); + if (code != NULL) + free(code); +} + +/* Return the number of possible Huffman codes using bit patterns of lengths + len through max inclusive, coding syms symbols, with left bit patterns of + length len unused -- return -1 if there is an overflow in the counting. + Keep a record of previous results in num to prevent repeating the same + calculation. Uses the globals max and num. */ +local big_t count(int syms, int len, int left) +{ + big_t sum; /* number of possible codes from this juncture */ + big_t got; /* value returned from count() */ + int least; /* least number of syms to use at this juncture */ + int most; /* most number of syms to use at this juncture */ + int use; /* number of bit patterns to use in next call */ + size_t index; /* index of this case in *num */ + + /* see if only one possible code */ + if (syms == left) + return 1; + + /* note and verify the expected state */ + assert(syms > left && left > 0 && len < max); + + /* see if we've done this one already */ + index = INDEX(syms, left, len); + got = num[index]; + if (got) + return got; /* we have -- return the saved result */ + + /* we need to use at least this many bit patterns so that the code won't be + incomplete at the next length (more bit patterns than symbols) */ + least = (left << 1) - syms; + if (least < 0) + least = 0; + + /* we can use at most this many bit patterns, lest there not be enough + available for the remaining symbols at the maximum length (if there were + no limit to the code length, this would become: most = left - 1) */ + most = (((code_t)left << (max - len)) - syms) / + (((code_t)1 << (max - len)) - 1); + + /* count all possible codes from this juncture and add them up */ + sum = 0; + for (use = least; use <= most; use++) { + got = count(syms - use, len + 1, (left - use) << 1); + sum += got; + if (got == (big_t)0 - 1 || sum < got) /* overflow */ + return (big_t)0 - 1; + } + + /* verify that all recursive calls are productive */ + assert(sum != 0); + + /* save the result and return it */ + num[index] = sum; + return sum; +} + +/* Return true if we've been here before, set to true if not. Set a bit in a + bit vector to indicate visiting this state. Each (syms,len,left) state + has a variable size bit vector indexed by (mem,rem). The bit vector is + lengthened if needed to allow setting the (mem,rem) bit. */ +local int beenhere(int syms, int len, int left, int mem, int rem) +{ + size_t index; /* index for this state's bit vector */ + size_t offset; /* offset in this state's bit vector */ + int bit; /* mask for this state's bit */ + size_t length; /* length of the bit vector in bytes */ + char *vector; /* new or enlarged bit vector */ + + /* point to vector for (syms,left,len), bit in vector for (mem,rem) */ + index = INDEX(syms, left, len); + mem -= 1 << root; + offset = (mem >> 3) + rem; + offset = ((offset * (offset + 1)) >> 1) + rem; + bit = 1 << (mem & 7); + + /* see if we've been here */ + length = done[index].len; + if (offset < length && (done[index].vec[offset] & bit) != 0) + return 1; /* done this! */ + + /* we haven't been here before -- set the bit to show we have now */ + + /* see if we need to lengthen the vector in order to set the bit */ + if (length <= offset) { + /* if we have one already, enlarge it, zero out the appended space */ + if (length) { + do { + length <<= 1; + } while (length <= offset); + vector = realloc(done[index].vec, length); + if (vector != NULL) + memset(vector + done[index].len, 0, length - done[index].len); + } + + /* otherwise we need to make a new vector and zero it out */ + else { + length = 1 << (len - root); + while (length <= offset) + length <<= 1; + vector = calloc(length, sizeof(char)); + } + + /* in either case, bail if we can't get the memory */ + if (vector == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + cleanup(); + exit(1); + } + + /* install the new vector */ + done[index].len = length; + done[index].vec = vector; + } + + /* set the bit */ + done[index].vec[offset] |= bit; + return 0; +} + +/* Examine all possible codes from the given node (syms, len, left). Compute + the amount of memory required to build inflate's decoding tables, where the + number of code structures used so far is mem, and the number remaining in + the current sub-table is rem. Uses the globals max, code, root, large, and + done. */ +local void examine(int syms, int len, int left, int mem, int rem) +{ + int least; /* least number of syms to use at this juncture */ + int most; /* most number of syms to use at this juncture */ + int use; /* number of bit patterns to use in next call */ + + /* see if we have a complete code */ + if (syms == left) { + /* set the last code entry */ + code[len] = left; + + /* complete computation of memory used by this code */ + while (rem < left) { + left -= rem; + rem = 1 << (len - root); + mem += rem; + } + assert(rem == left); + + /* if this is a new maximum, show the entries used and the sub-code */ + if (mem > large) { + large = mem; + printf("max %d: ", mem); + for (use = root + 1; use <= max; use++) + if (code[use]) + printf("%d[%d] ", code[use], use); + putchar('\n'); + fflush(stdout); + } + + /* remove entries as we drop back down in the recursion */ + code[len] = 0; + return; + } + + /* prune the tree if we can */ + if (beenhere(syms, len, left, mem, rem)) + return; + + /* we need to use at least this many bit patterns so that the code won't be + incomplete at the next length (more bit patterns than symbols) */ + least = (left << 1) - syms; + if (least < 0) + least = 0; + + /* we can use at most this many bit patterns, lest there not be enough + available for the remaining symbols at the maximum length (if there were + no limit to the code length, this would become: most = left - 1) */ + most = (((code_t)left << (max - len)) - syms) / + (((code_t)1 << (max - len)) - 1); + + /* occupy least table spaces, creating new sub-tables as needed */ + use = least; + while (rem < use) { + use -= rem; + rem = 1 << (len - root); + mem += rem; + } + rem -= use; + + /* examine codes from here, updating table space as we go */ + for (use = least; use <= most; use++) { + code[len] = use; + examine(syms - use, len + 1, (left - use) << 1, + mem + (rem ? 1 << (len - root) : 0), rem << 1); + if (rem == 0) { + rem = 1 << (len - root); + mem += rem; + } + rem--; + } + + /* remove entries as we drop back down in the recursion */ + code[len] = 0; +} + +/* Look at all sub-codes starting with root + 1 bits. Look at only the valid + intermediate code states (syms, left, len). For each completed code, + calculate the amount of memory required by inflate to build the decoding + tables. Find the maximum amount of memory required and show the code that + requires that maximum. Uses the globals max, root, and num. */ +local void enough(int syms) +{ + int n; /* number of remaing symbols for this node */ + int left; /* number of unused bit patterns at this length */ + size_t index; /* index of this case in *num */ + + /* clear code */ + for (n = 0; n <= max; n++) + code[n] = 0; + + /* look at all (root + 1) bit and longer codes */ + large = 1 << root; /* base table */ + if (root < max) /* otherwise, there's only a base table */ + for (n = 3; n <= syms; n++) + for (left = 2; left < n; left += 2) + { + /* look at all reachable (root + 1) bit nodes, and the + resulting codes (complete at root + 2 or more) */ + index = INDEX(n, left, root + 1); + if (root + 1 < max && num[index]) /* reachable node */ + examine(n, root + 1, left, 1 << root, 0); + + /* also look at root bit codes with completions at root + 1 + bits (not saved in num, since complete), just in case */ + if (num[index - 1] && n <= left << 1) + examine((n - left) << 1, root + 1, (n - left) << 1, + 1 << root, 0); + } + + /* done */ + printf("done: maximum of %d table entries\n", large); +} + +/* + Examine and show the total number of possible Huffman codes for a given + maximum number of symbols, initial root table size, and maximum code length + in bits -- those are the command arguments in that order. The default + values are 286, 9, and 15 respectively, for the deflate literal/length code. + The possible codes are counted for each number of coded symbols from two to + the maximum. The counts for each of those and the total number of codes are + shown. The maximum number of inflate table entires is then calculated + across all possible codes. Each new maximum number of table entries and the + associated sub-code (starting at root + 1 == 10 bits) is shown. + + To count and examine Huffman codes that are not length-limited, provide a + maximum length equal to the number of symbols minus one. + + For the deflate literal/length code, use "enough". For the deflate distance + code, use "enough 30 6". + + This uses the %llu printf format to print big_t numbers, which assumes that + big_t is an unsigned long long. If the big_t type is changed (for example + to a multiple precision type), the method of printing will also need to be + updated. + */ +int main(int argc, char **argv) +{ + int syms; /* total number of symbols to code */ + int n; /* number of symbols to code for this run */ + big_t got; /* return value of count() */ + big_t sum; /* accumulated number of codes over n */ + code_t word; /* for counting bits in code_t */ + + /* set up globals for cleanup() */ + code = NULL; + num = NULL; + done = NULL; + + /* get arguments -- default to the deflate literal/length code */ + syms = 286; + root = 9; + max = 15; + if (argc > 1) { + syms = atoi(argv[1]); + if (argc > 2) { + root = atoi(argv[2]); + if (argc > 3) + max = atoi(argv[3]); + } + } + if (argc > 4 || syms < 2 || root < 1 || max < 1) { + fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n", + stderr); + return 1; + } + + /* if not restricting the code length, the longest is syms - 1 */ + if (max > syms - 1) + max = syms - 1; + + /* determine the number of bits in a code_t */ + for (n = 0, word = 1; word; n++, word <<= 1) + ; + + /* make sure that the calculation of most will not overflow */ + if (max > n || (code_t)(syms - 2) >= (((code_t)0 - 1) >> (max - 1))) { + fputs("abort: code length too long for internal types\n", stderr); + return 1; + } + + /* reject impossible code requests */ + if ((code_t)(syms - 1) > ((code_t)1 << max) - 1) { + fprintf(stderr, "%d symbols cannot be coded in %d bits\n", + syms, max); + return 1; + } + + /* allocate code vector */ + code = calloc(max + 1, sizeof(int)); + if (code == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + return 1; + } + + /* determine size of saved results array, checking for overflows, + allocate and clear the array (set all to zero with calloc()) */ + if (syms == 2) /* iff max == 1 */ + num = NULL; /* won't be saving any results */ + else { + size = syms >> 1; + if (size > ((size_t)0 - 1) / (n = (syms - 1) >> 1) || + (size *= n, size > ((size_t)0 - 1) / (n = max - 1)) || + (size *= n, size > ((size_t)0 - 1) / sizeof(big_t)) || + (num = calloc(size, sizeof(big_t))) == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + cleanup(); + return 1; + } + } + + /* count possible codes for all numbers of symbols, add up counts */ + sum = 0; + for (n = 2; n <= syms; n++) { + got = count(n, 1, 2); + sum += got; + if (got == (big_t)0 - 1 || sum < got) { /* overflow */ + fputs("abort: can't count that high!\n", stderr); + cleanup(); + return 1; + } + printf("%llu %d-codes\n", got, n); + } + printf("%llu total codes for 2 to %d symbols", sum, syms); + if (max < syms - 1) + printf(" (%d-bit length limit)\n", max); + else + puts(" (no length limit)"); + + /* allocate and clear done array for beenhere() */ + if (syms == 2) + done = NULL; + else if (size > ((size_t)0 - 1) / sizeof(struct tab) || + (done = calloc(size, sizeof(struct tab))) == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + cleanup(); + return 1; + } + + /* find and show maximum inflate table usage */ + if (root > max) /* reduce root to max length */ + root = max; + if ((code_t)syms < ((code_t)1 << (root + 1))) + enough(syms); + else + puts("cannot handle minimum code lengths > root"); + + /* done */ + cleanup(); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/fitblk.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/fitblk.c new file mode 100644 index 000000000..c61de5c99 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/fitblk.c @@ -0,0 +1,233 @@ +/* fitblk.c: example of fitting compressed output to a specified size + Not copyrighted -- provided to the public domain + Version 1.1 25 November 2004 Mark Adler */ + +/* Version history: + 1.0 24 Nov 2004 First version + 1.1 25 Nov 2004 Change deflateInit2() to deflateInit() + Use fixed-size, stack-allocated raw buffers + Simplify code moving compression to subroutines + Use assert() for internal errors + Add detailed description of approach + */ + +/* Approach to just fitting a requested compressed size: + + fitblk performs three compression passes on a portion of the input + data in order to determine how much of that input will compress to + nearly the requested output block size. The first pass generates + enough deflate blocks to produce output to fill the requested + output size plus a specfied excess amount (see the EXCESS define + below). The last deflate block may go quite a bit past that, but + is discarded. The second pass decompresses and recompresses just + the compressed data that fit in the requested plus excess sized + buffer. The deflate process is terminated after that amount of + input, which is less than the amount consumed on the first pass. + The last deflate block of the result will be of a comparable size + to the final product, so that the header for that deflate block and + the compression ratio for that block will be about the same as in + the final product. The third compression pass decompresses the + result of the second step, but only the compressed data up to the + requested size minus an amount to allow the compressed stream to + complete (see the MARGIN define below). That will result in a + final compressed stream whose length is less than or equal to the + requested size. Assuming sufficient input and a requested size + greater than a few hundred bytes, the shortfall will typically be + less than ten bytes. + + If the input is short enough that the first compression completes + before filling the requested output size, then that compressed + stream is return with no recompression. + + EXCESS is chosen to be just greater than the shortfall seen in a + two pass approach similar to the above. That shortfall is due to + the last deflate block compressing more efficiently with a smaller + header on the second pass. EXCESS is set to be large enough so + that there is enough uncompressed data for the second pass to fill + out the requested size, and small enough so that the final deflate + block of the second pass will be close in size to the final deflate + block of the third and final pass. MARGIN is chosen to be just + large enough to assure that the final compression has enough room + to complete in all cases. + */ + +#include +#include +#include +#include "zlib.h" + +#define local static + +/* print nastygram and leave */ +local void quit(char *why) +{ + fprintf(stderr, "fitblk abort: %s\n", why); + exit(1); +} + +#define RAWLEN 4096 /* intermediate uncompressed buffer size */ + +/* compress from file to def until provided buffer is full or end of + input reached; return last deflate() return value, or Z_ERRNO if + there was read error on the file */ +local int partcompress(FILE *in, z_streamp def) +{ + int ret, flush; + unsigned char raw[RAWLEN]; + + flush = Z_NO_FLUSH; + do { + def->avail_in = fread(raw, 1, RAWLEN, in); + if (ferror(in)) + return Z_ERRNO; + def->next_in = raw; + if (feof(in)) + flush = Z_FINISH; + ret = deflate(def, flush); + assert(ret != Z_STREAM_ERROR); + } while (def->avail_out != 0 && flush == Z_NO_FLUSH); + return ret; +} + +/* recompress from inf's input to def's output; the input for inf and + the output for def are set in those structures before calling; + return last deflate() return value, or Z_MEM_ERROR if inflate() + was not able to allocate enough memory when it needed to */ +local int recompress(z_streamp inf, z_streamp def) +{ + int ret, flush; + unsigned char raw[RAWLEN]; + + flush = Z_NO_FLUSH; + do { + /* decompress */ + inf->avail_out = RAWLEN; + inf->next_out = raw; + ret = inflate(inf, Z_NO_FLUSH); + assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR && + ret != Z_NEED_DICT); + if (ret == Z_MEM_ERROR) + return ret; + + /* compress what was decompresed until done or no room */ + def->avail_in = RAWLEN - inf->avail_out; + def->next_in = raw; + if (inf->avail_out != 0) + flush = Z_FINISH; + ret = deflate(def, flush); + assert(ret != Z_STREAM_ERROR); + } while (ret != Z_STREAM_END && def->avail_out != 0); + return ret; +} + +#define EXCESS 256 /* empirically determined stream overage */ +#define MARGIN 8 /* amount to back off for completion */ + +/* compress from stdin to fixed-size block on stdout */ +int main(int argc, char **argv) +{ + int ret; /* return code */ + unsigned size; /* requested fixed output block size */ + unsigned have; /* bytes written by deflate() call */ + unsigned char *blk; /* intermediate and final stream */ + unsigned char *tmp; /* close to desired size stream */ + z_stream def, inf; /* zlib deflate and inflate states */ + + /* get requested output size */ + if (argc != 2) + quit("need one argument: size of output block"); + ret = strtol(argv[1], argv + 1, 10); + if (argv[1][0] != 0) + quit("argument must be a number"); + if (ret < 8) /* 8 is minimum zlib stream size */ + quit("need positive size of 8 or greater"); + size = (unsigned)ret; + + /* allocate memory for buffers and compression engine */ + blk = malloc(size + EXCESS); + def.zalloc = Z_NULL; + def.zfree = Z_NULL; + def.opaque = Z_NULL; + ret = deflateInit(&def, Z_DEFAULT_COMPRESSION); + if (ret != Z_OK || blk == NULL) + quit("out of memory"); + + /* compress from stdin until output full, or no more input */ + def.avail_out = size + EXCESS; + def.next_out = blk; + ret = partcompress(stdin, &def); + if (ret == Z_ERRNO) + quit("error reading input"); + + /* if it all fit, then size was undersubscribed -- done! */ + if (ret == Z_STREAM_END && def.avail_out >= EXCESS) { + /* write block to stdout */ + have = size + EXCESS - def.avail_out; + if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) + quit("error writing output"); + + /* clean up and print results to stderr */ + ret = deflateEnd(&def); + assert(ret != Z_STREAM_ERROR); + free(blk); + fprintf(stderr, + "%u bytes unused out of %u requested (all input)\n", + size - have, size); + return 0; + } + + /* it didn't all fit -- set up for recompression */ + inf.zalloc = Z_NULL; + inf.zfree = Z_NULL; + inf.opaque = Z_NULL; + inf.avail_in = 0; + inf.next_in = Z_NULL; + ret = inflateInit(&inf); + tmp = malloc(size + EXCESS); + if (ret != Z_OK || tmp == NULL) + quit("out of memory"); + ret = deflateReset(&def); + assert(ret != Z_STREAM_ERROR); + + /* do first recompression close to the right amount */ + inf.avail_in = size + EXCESS; + inf.next_in = blk; + def.avail_out = size + EXCESS; + def.next_out = tmp; + ret = recompress(&inf, &def); + if (ret == Z_MEM_ERROR) + quit("out of memory"); + + /* set up for next reocmpression */ + ret = inflateReset(&inf); + assert(ret != Z_STREAM_ERROR); + ret = deflateReset(&def); + assert(ret != Z_STREAM_ERROR); + + /* do second and final recompression (third compression) */ + inf.avail_in = size - MARGIN; /* assure stream will complete */ + inf.next_in = tmp; + def.avail_out = size; + def.next_out = blk; + ret = recompress(&inf, &def); + if (ret == Z_MEM_ERROR) + quit("out of memory"); + assert(ret == Z_STREAM_END); /* otherwise MARGIN too small */ + + /* done -- write block to stdout */ + have = size - def.avail_out; + if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) + quit("error writing output"); + + /* clean up and print results to stderr */ + free(tmp); + ret = inflateEnd(&inf); + assert(ret != Z_STREAM_ERROR); + ret = deflateEnd(&def); + assert(ret != Z_STREAM_ERROR); + free(blk); + fprintf(stderr, + "%u bytes unused out of %u requested (%lu input)\n", + size - have, size, def.total_in); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gun.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gun.c new file mode 100644 index 000000000..be44fa51f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gun.c @@ -0,0 +1,702 @@ +/* gun.c -- simple gunzip to give an example of the use of inflateBack() + * Copyright (C) 2003, 2005, 2008, 2010, 2012 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + Version 1.7 12 August 2012 Mark Adler */ + +/* Version history: + 1.0 16 Feb 2003 First version for testing of inflateBack() + 1.1 21 Feb 2005 Decompress concatenated gzip streams + Remove use of "this" variable (C++ keyword) + Fix return value for in() + Improve allocation failure checking + Add typecasting for void * structures + Add -h option for command version and usage + Add a bunch of comments + 1.2 20 Mar 2005 Add Unix compress (LZW) decompression + Copy file attributes from input file to output file + 1.3 12 Jun 2005 Add casts for error messages [Oberhumer] + 1.4 8 Dec 2006 LZW decompression speed improvements + 1.5 9 Feb 2008 Avoid warning in latest version of gcc + 1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings + 1.7 12 Aug 2012 Update for z_const usage in zlib 1.2.8 + */ + +/* + gun [ -t ] [ name ... ] + + decompresses the data in the named gzip files. If no arguments are given, + gun will decompress from stdin to stdout. The names must end in .gz, -gz, + .z, -z, _z, or .Z. The uncompressed data will be written to a file name + with the suffix stripped. On success, the original file is deleted. On + failure, the output file is deleted. For most failures, the command will + continue to process the remaining names on the command line. A memory + allocation failure will abort the command. If -t is specified, then the + listed files or stdin will be tested as gzip files for integrity (without + checking for a proper suffix), no output will be written, and no files + will be deleted. + + Like gzip, gun allows concatenated gzip streams and will decompress them, + writing all of the uncompressed data to the output. Unlike gzip, gun allows + an empty file on input, and will produce no error writing an empty output + file. + + gun will also decompress files made by Unix compress, which uses LZW + compression. These files are automatically detected by virtue of their + magic header bytes. Since the end of Unix compress stream is marked by the + end-of-file, they cannot be concantenated. If a Unix compress stream is + encountered in an input file, it is the last stream in that file. + + Like gunzip and uncompress, the file attributes of the original compressed + file are maintained in the final uncompressed file, to the extent that the + user permissions allow it. + + On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version + 1.2.4) is on the same file, when gun is linked with zlib 1.2.2. Also the + LZW decompression provided by gun is about twice as fast as the standard + Unix uncompress command. + */ + +/* external functions and related types and constants */ +#include /* fprintf() */ +#include /* malloc(), free() */ +#include /* strerror(), strcmp(), strlen(), memcpy() */ +#include /* errno */ +#include /* open() */ +#include /* read(), write(), close(), chown(), unlink() */ +#include +#include /* stat(), chmod() */ +#include /* utime() */ +#include "zlib.h" /* inflateBackInit(), inflateBack(), */ + /* inflateBackEnd(), crc32() */ + +/* function declaration */ +#define local static + +/* buffer constants */ +#define SIZE 32768U /* input and output buffer sizes */ +#define PIECE 16384 /* limits i/o chunks for 16-bit int case */ + +/* structure for infback() to pass to input function in() -- it maintains the + input file and a buffer of size SIZE */ +struct ind { + int infile; + unsigned char *inbuf; +}; + +/* Load input buffer, assumed to be empty, and return bytes loaded and a + pointer to them. read() is called until the buffer is full, or until it + returns end-of-file or error. Return 0 on error. */ +local unsigned in(void *in_desc, z_const unsigned char **buf) +{ + int ret; + unsigned len; + unsigned char *next; + struct ind *me = (struct ind *)in_desc; + + next = me->inbuf; + *buf = next; + len = 0; + do { + ret = PIECE; + if ((unsigned)ret > SIZE - len) + ret = (int)(SIZE - len); + ret = (int)read(me->infile, next, ret); + if (ret == -1) { + len = 0; + break; + } + next += ret; + len += ret; + } while (ret != 0 && len < SIZE); + return len; +} + +/* structure for infback() to pass to output function out() -- it maintains the + output file, a running CRC-32 check on the output and the total number of + bytes output, both for checking against the gzip trailer. (The length in + the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and + the output is greater than 4 GB.) */ +struct outd { + int outfile; + int check; /* true if checking crc and total */ + unsigned long crc; + unsigned long total; +}; + +/* Write output buffer and update the CRC-32 and total bytes written. write() + is called until all of the output is written or an error is encountered. + On success out() returns 0. For a write failure, out() returns 1. If the + output file descriptor is -1, then nothing is written. + */ +local int out(void *out_desc, unsigned char *buf, unsigned len) +{ + int ret; + struct outd *me = (struct outd *)out_desc; + + if (me->check) { + me->crc = crc32(me->crc, buf, len); + me->total += len; + } + if (me->outfile != -1) + do { + ret = PIECE; + if ((unsigned)ret > len) + ret = (int)len; + ret = (int)write(me->outfile, buf, ret); + if (ret == -1) + return 1; + buf += ret; + len -= ret; + } while (len != 0); + return 0; +} + +/* next input byte macro for use inside lunpipe() and gunpipe() */ +#define NEXT() (have ? 0 : (have = in(indp, &next)), \ + last = have ? (have--, (int)(*next++)) : -1) + +/* memory for gunpipe() and lunpipe() -- + the first 256 entries of prefix[] and suffix[] are never used, could + have offset the index, but it's faster to waste the memory */ +unsigned char inbuf[SIZE]; /* input buffer */ +unsigned char outbuf[SIZE]; /* output buffer */ +unsigned short prefix[65536]; /* index to LZW prefix string */ +unsigned char suffix[65536]; /* one-character LZW suffix */ +unsigned char match[65280 + 2]; /* buffer for reversed match or gzip + 32K sliding window */ + +/* throw out what's left in the current bits byte buffer (this is a vestigial + aspect of the compressed data format derived from an implementation that + made use of a special VAX machine instruction!) */ +#define FLUSHCODE() \ + do { \ + left = 0; \ + rem = 0; \ + if (chunk > have) { \ + chunk -= have; \ + have = 0; \ + if (NEXT() == -1) \ + break; \ + chunk--; \ + if (chunk > have) { \ + chunk = have = 0; \ + break; \ + } \ + } \ + have -= chunk; \ + next += chunk; \ + chunk = 0; \ + } while (0) + +/* Decompress a compress (LZW) file from indp to outfile. The compress magic + header (two bytes) has already been read and verified. There are have bytes + of buffered input at next. strm is used for passing error information back + to gunpipe(). + + lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of + file, read error, or write error (a write error indicated by strm->next_in + not equal to Z_NULL), or Z_DATA_ERROR for invalid input. + */ +local int lunpipe(unsigned have, z_const unsigned char *next, struct ind *indp, + int outfile, z_stream *strm) +{ + int last; /* last byte read by NEXT(), or -1 if EOF */ + unsigned chunk; /* bytes left in current chunk */ + int left; /* bits left in rem */ + unsigned rem; /* unused bits from input */ + int bits; /* current bits per code */ + unsigned code; /* code, table traversal index */ + unsigned mask; /* mask for current bits codes */ + int max; /* maximum bits per code for this stream */ + unsigned flags; /* compress flags, then block compress flag */ + unsigned end; /* last valid entry in prefix/suffix tables */ + unsigned temp; /* current code */ + unsigned prev; /* previous code */ + unsigned final; /* last character written for previous code */ + unsigned stack; /* next position for reversed string */ + unsigned outcnt; /* bytes in output buffer */ + struct outd outd; /* output structure */ + unsigned char *p; + + /* set up output */ + outd.outfile = outfile; + outd.check = 0; + + /* process remainder of compress header -- a flags byte */ + flags = NEXT(); + if (last == -1) + return Z_BUF_ERROR; + if (flags & 0x60) { + strm->msg = (char *)"unknown lzw flags set"; + return Z_DATA_ERROR; + } + max = flags & 0x1f; + if (max < 9 || max > 16) { + strm->msg = (char *)"lzw bits out of range"; + return Z_DATA_ERROR; + } + if (max == 9) /* 9 doesn't really mean 9 */ + max = 10; + flags &= 0x80; /* true if block compress */ + + /* clear table */ + bits = 9; + mask = 0x1ff; + end = flags ? 256 : 255; + + /* set up: get first 9-bit code, which is the first decompressed byte, but + don't create a table entry until the next code */ + if (NEXT() == -1) /* no compressed data is ok */ + return Z_OK; + final = prev = (unsigned)last; /* low 8 bits of code */ + if (NEXT() == -1) /* missing a bit */ + return Z_BUF_ERROR; + if (last & 1) { /* code must be < 256 */ + strm->msg = (char *)"invalid lzw code"; + return Z_DATA_ERROR; + } + rem = (unsigned)last >> 1; /* remaining 7 bits */ + left = 7; + chunk = bits - 2; /* 7 bytes left in this chunk */ + outbuf[0] = (unsigned char)final; /* write first decompressed byte */ + outcnt = 1; + + /* decode codes */ + stack = 0; + for (;;) { + /* if the table will be full after this, increment the code size */ + if (end >= mask && bits < max) { + FLUSHCODE(); + bits++; + mask <<= 1; + mask++; + } + + /* get a code of length bits */ + if (chunk == 0) /* decrement chunk modulo bits */ + chunk = bits; + code = rem; /* low bits of code */ + if (NEXT() == -1) { /* EOF is end of compressed data */ + /* write remaining buffered output */ + if (outcnt && out(&outd, outbuf, outcnt)) { + strm->next_in = outbuf; /* signal write error */ + return Z_BUF_ERROR; + } + return Z_OK; + } + code += (unsigned)last << left; /* middle (or high) bits of code */ + left += 8; + chunk--; + if (bits > left) { /* need more bits */ + if (NEXT() == -1) /* can't end in middle of code */ + return Z_BUF_ERROR; + code += (unsigned)last << left; /* high bits of code */ + left += 8; + chunk--; + } + code &= mask; /* mask to current code length */ + left -= bits; /* number of unused bits */ + rem = (unsigned)last >> (8 - left); /* unused bits from last byte */ + + /* process clear code (256) */ + if (code == 256 && flags) { + FLUSHCODE(); + bits = 9; /* initialize bits and mask */ + mask = 0x1ff; + end = 255; /* empty table */ + continue; /* get next code */ + } + + /* special code to reuse last match */ + temp = code; /* save the current code */ + if (code > end) { + /* Be picky on the allowed code here, and make sure that the code + we drop through (prev) will be a valid index so that random + input does not cause an exception. The code != end + 1 check is + empirically derived, and not checked in the original uncompress + code. If this ever causes a problem, that check could be safely + removed. Leaving this check in greatly improves gun's ability + to detect random or corrupted input after a compress header. + In any case, the prev > end check must be retained. */ + if (code != end + 1 || prev > end) { + strm->msg = (char *)"invalid lzw code"; + return Z_DATA_ERROR; + } + match[stack++] = (unsigned char)final; + code = prev; + } + + /* walk through linked list to generate output in reverse order */ + p = match + stack; + while (code >= 256) { + *p++ = suffix[code]; + code = prefix[code]; + } + stack = p - match; + match[stack++] = (unsigned char)code; + final = code; + + /* link new table entry */ + if (end < mask) { + end++; + prefix[end] = (unsigned short)prev; + suffix[end] = (unsigned char)final; + } + + /* set previous code for next iteration */ + prev = temp; + + /* write output in forward order */ + while (stack > SIZE - outcnt) { + while (outcnt < SIZE) + outbuf[outcnt++] = match[--stack]; + if (out(&outd, outbuf, outcnt)) { + strm->next_in = outbuf; /* signal write error */ + return Z_BUF_ERROR; + } + outcnt = 0; + } + p = match + stack; + do { + outbuf[outcnt++] = *--p; + } while (p > match); + stack = 0; + + /* loop for next code with final and prev as the last match, rem and + left provide the first 0..7 bits of the next code, end is the last + valid table entry */ + } +} + +/* Decompress a gzip file from infile to outfile. strm is assumed to have been + successfully initialized with inflateBackInit(). The input file may consist + of a series of gzip streams, in which case all of them will be decompressed + to the output file. If outfile is -1, then the gzip stream(s) integrity is + checked and nothing is written. + + The return value is a zlib error code: Z_MEM_ERROR if out of memory, + Z_DATA_ERROR if the header or the compressed data is invalid, or if the + trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends + prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip + stream) follows a valid gzip stream. + */ +local int gunpipe(z_stream *strm, int infile, int outfile) +{ + int ret, first, last; + unsigned have, flags, len; + z_const unsigned char *next = NULL; + struct ind ind, *indp; + struct outd outd; + + /* setup input buffer */ + ind.infile = infile; + ind.inbuf = inbuf; + indp = &ind; + + /* decompress concatenated gzip streams */ + have = 0; /* no input data read in yet */ + first = 1; /* looking for first gzip header */ + strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ + for (;;) { + /* look for the two magic header bytes for a gzip stream */ + if (NEXT() == -1) { + ret = Z_OK; + break; /* empty gzip stream is ok */ + } + if (last != 31 || (NEXT() != 139 && last != 157)) { + strm->msg = (char *)"incorrect header check"; + ret = first ? Z_DATA_ERROR : Z_ERRNO; + break; /* not a gzip or compress header */ + } + first = 0; /* next non-header is junk */ + + /* process a compress (LZW) file -- can't be concatenated after this */ + if (last == 157) { + ret = lunpipe(have, next, indp, outfile, strm); + break; + } + + /* process remainder of gzip header */ + ret = Z_BUF_ERROR; + if (NEXT() != 8) { /* only deflate method allowed */ + if (last == -1) break; + strm->msg = (char *)"unknown compression method"; + ret = Z_DATA_ERROR; + break; + } + flags = NEXT(); /* header flags */ + NEXT(); /* discard mod time, xflgs, os */ + NEXT(); + NEXT(); + NEXT(); + NEXT(); + NEXT(); + if (last == -1) break; + if (flags & 0xe0) { + strm->msg = (char *)"unknown header flags set"; + ret = Z_DATA_ERROR; + break; + } + if (flags & 4) { /* extra field */ + len = NEXT(); + len += (unsigned)(NEXT()) << 8; + if (last == -1) break; + while (len > have) { + len -= have; + have = 0; + if (NEXT() == -1) break; + len--; + } + if (last == -1) break; + have -= len; + next += len; + } + if (flags & 8) /* file name */ + while (NEXT() != 0 && last != -1) + ; + if (flags & 16) /* comment */ + while (NEXT() != 0 && last != -1) + ; + if (flags & 2) { /* header crc */ + NEXT(); + NEXT(); + } + if (last == -1) break; + + /* set up output */ + outd.outfile = outfile; + outd.check = 1; + outd.crc = crc32(0L, Z_NULL, 0); + outd.total = 0; + + /* decompress data to output */ + strm->next_in = next; + strm->avail_in = have; + ret = inflateBack(strm, in, indp, out, &outd); + if (ret != Z_STREAM_END) break; + next = strm->next_in; + have = strm->avail_in; + strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ + + /* check trailer */ + ret = Z_BUF_ERROR; + if (NEXT() != (int)(outd.crc & 0xff) || + NEXT() != (int)((outd.crc >> 8) & 0xff) || + NEXT() != (int)((outd.crc >> 16) & 0xff) || + NEXT() != (int)((outd.crc >> 24) & 0xff)) { + /* crc error */ + if (last != -1) { + strm->msg = (char *)"incorrect data check"; + ret = Z_DATA_ERROR; + } + break; + } + if (NEXT() != (int)(outd.total & 0xff) || + NEXT() != (int)((outd.total >> 8) & 0xff) || + NEXT() != (int)((outd.total >> 16) & 0xff) || + NEXT() != (int)((outd.total >> 24) & 0xff)) { + /* length error */ + if (last != -1) { + strm->msg = (char *)"incorrect length check"; + ret = Z_DATA_ERROR; + } + break; + } + + /* go back and look for another gzip stream */ + } + + /* clean up and return */ + return ret; +} + +/* Copy file attributes, from -> to, as best we can. This is best effort, so + no errors are reported. The mode bits, including suid, sgid, and the sticky + bit are copied (if allowed), the owner's user id and group id are copied + (again if allowed), and the access and modify times are copied. */ +local void copymeta(char *from, char *to) +{ + struct stat was; + struct utimbuf when; + + /* get all of from's Unix meta data, return if not a regular file */ + if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG) + return; + + /* set to's mode bits, ignore errors */ + (void)chmod(to, was.st_mode & 07777); + + /* copy owner's user and group, ignore errors */ + (void)chown(to, was.st_uid, was.st_gid); + + /* copy access and modify times, ignore errors */ + when.actime = was.st_atime; + when.modtime = was.st_mtime; + (void)utime(to, &when); +} + +/* Decompress the file inname to the file outnname, of if test is true, just + decompress without writing and check the gzip trailer for integrity. If + inname is NULL or an empty string, read from stdin. If outname is NULL or + an empty string, write to stdout. strm is a pre-initialized inflateBack + structure. When appropriate, copy the file attributes from inname to + outname. + + gunzip() returns 1 if there is an out-of-memory error or an unexpected + return code from gunpipe(). Otherwise it returns 0. + */ +local int gunzip(z_stream *strm, char *inname, char *outname, int test) +{ + int ret; + int infile, outfile; + + /* open files */ + if (inname == NULL || *inname == 0) { + inname = "-"; + infile = 0; /* stdin */ + } + else { + infile = open(inname, O_RDONLY, 0); + if (infile == -1) { + fprintf(stderr, "gun cannot open %s\n", inname); + return 0; + } + } + if (test) + outfile = -1; + else if (outname == NULL || *outname == 0) { + outname = "-"; + outfile = 1; /* stdout */ + } + else { + outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666); + if (outfile == -1) { + close(infile); + fprintf(stderr, "gun cannot create %s\n", outname); + return 0; + } + } + errno = 0; + + /* decompress */ + ret = gunpipe(strm, infile, outfile); + if (outfile > 2) close(outfile); + if (infile > 2) close(infile); + + /* interpret result */ + switch (ret) { + case Z_OK: + case Z_ERRNO: + if (infile > 2 && outfile > 2) { + copymeta(inname, outname); /* copy attributes */ + unlink(inname); + } + if (ret == Z_ERRNO) + fprintf(stderr, "gun warning: trailing garbage ignored in %s\n", + inname); + break; + case Z_DATA_ERROR: + if (outfile > 2) unlink(outname); + fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg); + break; + case Z_MEM_ERROR: + if (outfile > 2) unlink(outname); + fprintf(stderr, "gun out of memory error--aborting\n"); + return 1; + case Z_BUF_ERROR: + if (outfile > 2) unlink(outname); + if (strm->next_in != Z_NULL) { + fprintf(stderr, "gun write error on %s: %s\n", + outname, strerror(errno)); + } + else if (errno) { + fprintf(stderr, "gun read error on %s: %s\n", + inname, strerror(errno)); + } + else { + fprintf(stderr, "gun unexpected end of file on %s\n", + inname); + } + break; + default: + if (outfile > 2) unlink(outname); + fprintf(stderr, "gun internal error--aborting\n"); + return 1; + } + return 0; +} + +/* Process the gun command line arguments. See the command syntax near the + beginning of this source file. */ +int main(int argc, char **argv) +{ + int ret, len, test; + char *outname; + unsigned char *window; + z_stream strm; + + /* initialize inflateBack state for repeated use */ + window = match; /* reuse LZW match buffer */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + ret = inflateBackInit(&strm, 15, window); + if (ret != Z_OK) { + fprintf(stderr, "gun out of memory error--aborting\n"); + return 1; + } + + /* decompress each file to the same name with the suffix removed */ + argc--; + argv++; + test = 0; + if (argc && strcmp(*argv, "-h") == 0) { + fprintf(stderr, "gun 1.6 (17 Jan 2010)\n"); + fprintf(stderr, "Copyright (C) 2003-2010 Mark Adler\n"); + fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n"); + return 0; + } + if (argc && strcmp(*argv, "-t") == 0) { + test = 1; + argc--; + argv++; + } + if (argc) + do { + if (test) + outname = NULL; + else { + len = (int)strlen(*argv); + if (strcmp(*argv + len - 3, ".gz") == 0 || + strcmp(*argv + len - 3, "-gz") == 0) + len -= 3; + else if (strcmp(*argv + len - 2, ".z") == 0 || + strcmp(*argv + len - 2, "-z") == 0 || + strcmp(*argv + len - 2, "_z") == 0 || + strcmp(*argv + len - 2, ".Z") == 0) + len -= 2; + else { + fprintf(stderr, "gun error: no gz type on %s--skipping\n", + *argv); + continue; + } + outname = malloc(len + 1); + if (outname == NULL) { + fprintf(stderr, "gun out of memory error--aborting\n"); + ret = 1; + break; + } + memcpy(outname, *argv, len); + outname[len] = 0; + } + ret = gunzip(&strm, *argv, outname, test); + if (outname != NULL) free(outname); + if (ret) break; + } while (argv++, --argc); + else + ret = gunzip(&strm, NULL, NULL, test); + + /* clean up */ + inflateBackEnd(&strm); + return ret; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzappend.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzappend.c new file mode 100644 index 000000000..662dec379 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzappend.c @@ -0,0 +1,504 @@ +/* gzappend -- command to append to a gzip file + + Copyright (C) 2003, 2012 Mark Adler, all rights reserved + version 1.2, 11 Oct 2012 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + +/* + * Change history: + * + * 1.0 19 Oct 2003 - First version + * 1.1 4 Nov 2003 - Expand and clarify some comments and notes + * - Add version and copyright to help + * - Send help to stdout instead of stderr + * - Add some preemptive typecasts + * - Add L to constants in lseek() calls + * - Remove some debugging information in error messages + * - Use new data_type definition for zlib 1.2.1 + * - Simplfy and unify file operations + * - Finish off gzip file in gztack() + * - Use deflatePrime() instead of adding empty blocks + * - Keep gzip file clean on appended file read errors + * - Use in-place rotate instead of auxiliary buffer + * (Why you ask? Because it was fun to write!) + * 1.2 11 Oct 2012 - Fix for proper z_const usage + * - Check for input buffer malloc failure + */ + +/* + gzappend takes a gzip file and appends to it, compressing files from the + command line or data from stdin. The gzip file is written to directly, to + avoid copying that file, in case it's large. Note that this results in the + unfriendly behavior that if gzappend fails, the gzip file is corrupted. + + This program was written to illustrate the use of the new Z_BLOCK option of + zlib 1.2.x's inflate() function. This option returns from inflate() at each + block boundary to facilitate locating and modifying the last block bit at + the start of the final deflate block. Also whether using Z_BLOCK or not, + another required feature of zlib 1.2.x is that inflate() now provides the + number of unusued bits in the last input byte used. gzappend will not work + with versions of zlib earlier than 1.2.1. + + gzappend first decompresses the gzip file internally, discarding all but + the last 32K of uncompressed data, and noting the location of the last block + bit and the number of unused bits in the last byte of the compressed data. + The gzip trailer containing the CRC-32 and length of the uncompressed data + is verified. This trailer will be later overwritten. + + Then the last block bit is cleared by seeking back in the file and rewriting + the byte that contains it. Seeking forward, the last byte of the compressed + data is saved along with the number of unused bits to initialize deflate. + + A deflate process is initialized, using the last 32K of the uncompressed + data from the gzip file to initialize the dictionary. If the total + uncompressed data was less than 32K, then all of it is used to initialize + the dictionary. The deflate output bit buffer is also initialized with the + last bits from the original deflate stream. From here on, the data to + append is simply compressed using deflate, and written to the gzip file. + When that is complete, the new CRC-32 and uncompressed length are written + as the trailer of the gzip file. + */ + +#include +#include +#include +#include +#include +#include "zlib.h" + +#define local static +#define LGCHUNK 14 +#define CHUNK (1U << LGCHUNK) +#define DSIZE 32768U + +/* print an error message and terminate with extreme prejudice */ +local void bye(char *msg1, char *msg2) +{ + fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2); + exit(1); +} + +/* return the greatest common divisor of a and b using Euclid's algorithm, + modified to be fast when one argument much greater than the other, and + coded to avoid unnecessary swapping */ +local unsigned gcd(unsigned a, unsigned b) +{ + unsigned c; + + while (a && b) + if (a > b) { + c = b; + while (a - c >= c) + c <<= 1; + a -= c; + } + else { + c = a; + while (b - c >= c) + c <<= 1; + b -= c; + } + return a + b; +} + +/* rotate list[0..len-1] left by rot positions, in place */ +local void rotate(unsigned char *list, unsigned len, unsigned rot) +{ + unsigned char tmp; + unsigned cycles; + unsigned char *start, *last, *to, *from; + + /* normalize rot and handle degenerate cases */ + if (len < 2) return; + if (rot >= len) rot %= len; + if (rot == 0) return; + + /* pointer to last entry in list */ + last = list + (len - 1); + + /* do simple left shift by one */ + if (rot == 1) { + tmp = *list; + memcpy(list, list + 1, len - 1); + *last = tmp; + return; + } + + /* do simple right shift by one */ + if (rot == len - 1) { + tmp = *last; + memmove(list + 1, list, len - 1); + *list = tmp; + return; + } + + /* otherwise do rotate as a set of cycles in place */ + cycles = gcd(len, rot); /* number of cycles */ + do { + start = from = list + cycles; /* start index is arbitrary */ + tmp = *from; /* save entry to be overwritten */ + for (;;) { + to = from; /* next step in cycle */ + from += rot; /* go right rot positions */ + if (from > last) from -= len; /* (pointer better not wrap) */ + if (from == start) break; /* all but one shifted */ + *to = *from; /* shift left */ + } + *to = tmp; /* complete the circle */ + } while (--cycles); +} + +/* structure for gzip file read operations */ +typedef struct { + int fd; /* file descriptor */ + int size; /* 1 << size is bytes in buf */ + unsigned left; /* bytes available at next */ + unsigned char *buf; /* buffer */ + z_const unsigned char *next; /* next byte in buffer */ + char *name; /* file name for error messages */ +} file; + +/* reload buffer */ +local int readin(file *in) +{ + int len; + + len = read(in->fd, in->buf, 1 << in->size); + if (len == -1) bye("error reading ", in->name); + in->left = (unsigned)len; + in->next = in->buf; + return len; +} + +/* read from file in, exit if end-of-file */ +local int readmore(file *in) +{ + if (readin(in) == 0) bye("unexpected end of ", in->name); + return 0; +} + +#define read1(in) (in->left == 0 ? readmore(in) : 0, \ + in->left--, *(in->next)++) + +/* skip over n bytes of in */ +local void skip(file *in, unsigned n) +{ + unsigned bypass; + + if (n > in->left) { + n -= in->left; + bypass = n & ~((1U << in->size) - 1); + if (bypass) { + if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1) + bye("seeking ", in->name); + n -= bypass; + } + readmore(in); + if (n > in->left) + bye("unexpected end of ", in->name); + } + in->left -= n; + in->next += n; +} + +/* read a four-byte unsigned integer, little-endian, from in */ +unsigned long read4(file *in) +{ + unsigned long val; + + val = read1(in); + val += (unsigned)read1(in) << 8; + val += (unsigned long)read1(in) << 16; + val += (unsigned long)read1(in) << 24; + return val; +} + +/* skip over gzip header */ +local void gzheader(file *in) +{ + int flags; + unsigned n; + + if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file"); + if (read1(in) != 8) bye("unknown compression method in", in->name); + flags = read1(in); + if (flags & 0xe0) bye("unknown header flags set in", in->name); + skip(in, 6); + if (flags & 4) { + n = read1(in); + n += (unsigned)(read1(in)) << 8; + skip(in, n); + } + if (flags & 8) while (read1(in) != 0) ; + if (flags & 16) while (read1(in) != 0) ; + if (flags & 2) skip(in, 2); +} + +/* decompress gzip file "name", return strm with a deflate stream ready to + continue compression of the data in the gzip file, and return a file + descriptor pointing to where to write the compressed data -- the deflate + stream is initialized to compress using level "level" */ +local int gzscan(char *name, z_stream *strm, int level) +{ + int ret, lastbit, left, full; + unsigned have; + unsigned long crc, tot; + unsigned char *window; + off_t lastoff, end; + file gz; + + /* open gzip file */ + gz.name = name; + gz.fd = open(name, O_RDWR, 0); + if (gz.fd == -1) bye("cannot open ", name); + gz.buf = malloc(CHUNK); + if (gz.buf == NULL) bye("out of memory", ""); + gz.size = LGCHUNK; + gz.left = 0; + + /* skip gzip header */ + gzheader(&gz); + + /* prepare to decompress */ + window = malloc(DSIZE); + if (window == NULL) bye("out of memory", ""); + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = inflateInit2(strm, -15); + if (ret != Z_OK) bye("out of memory", " or library mismatch"); + + /* decompress the deflate stream, saving append information */ + lastbit = 0; + lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; + left = 0; + strm->avail_in = gz.left; + strm->next_in = gz.next; + crc = crc32(0L, Z_NULL, 0); + have = full = 0; + do { + /* if needed, get more input */ + if (strm->avail_in == 0) { + readmore(&gz); + strm->avail_in = gz.left; + strm->next_in = gz.next; + } + + /* set up output to next available section of sliding window */ + strm->avail_out = DSIZE - have; + strm->next_out = window + have; + + /* inflate and check for errors */ + ret = inflate(strm, Z_BLOCK); + if (ret == Z_STREAM_ERROR) bye("internal stream error!", ""); + if (ret == Z_MEM_ERROR) bye("out of memory", ""); + if (ret == Z_DATA_ERROR) + bye("invalid compressed data--format violated in", name); + + /* update crc and sliding window pointer */ + crc = crc32(crc, window + have, DSIZE - have - strm->avail_out); + if (strm->avail_out) + have = DSIZE - strm->avail_out; + else { + have = 0; + full = 1; + } + + /* process end of block */ + if (strm->data_type & 128) { + if (strm->data_type & 64) + left = strm->data_type & 0x1f; + else { + lastbit = strm->data_type & 0x1f; + lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in; + } + } + } while (ret != Z_STREAM_END); + inflateEnd(strm); + gz.left = strm->avail_in; + gz.next = strm->next_in; + + /* save the location of the end of the compressed data */ + end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; + + /* check gzip trailer and save total for deflate */ + if (crc != read4(&gz)) + bye("invalid compressed data--crc mismatch in ", name); + tot = strm->total_out; + if ((tot & 0xffffffffUL) != read4(&gz)) + bye("invalid compressed data--length mismatch in", name); + + /* if not at end of file, warn */ + if (gz.left || readin(&gz)) + fprintf(stderr, + "gzappend warning: junk at end of gzip file overwritten\n"); + + /* clear last block bit */ + lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET); + if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); + *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7))); + lseek(gz.fd, -1L, SEEK_CUR); + if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name); + + /* if window wrapped, build dictionary from window by rotating */ + if (full) { + rotate(window, DSIZE, have); + have = DSIZE; + } + + /* set up deflate stream with window, crc, total_in, and leftover bits */ + ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); + if (ret != Z_OK) bye("out of memory", ""); + deflateSetDictionary(strm, window, have); + strm->adler = crc; + strm->total_in = tot; + if (left) { + lseek(gz.fd, --end, SEEK_SET); + if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); + deflatePrime(strm, 8 - left, *gz.buf); + } + lseek(gz.fd, end, SEEK_SET); + + /* clean up and return */ + free(window); + free(gz.buf); + return gz.fd; +} + +/* append file "name" to gzip file gd using deflate stream strm -- if last + is true, then finish off the deflate stream at the end */ +local void gztack(char *name, int gd, z_stream *strm, int last) +{ + int fd, len, ret; + unsigned left; + unsigned char *in, *out; + + /* open file to compress and append */ + fd = 0; + if (name != NULL) { + fd = open(name, O_RDONLY, 0); + if (fd == -1) + fprintf(stderr, "gzappend warning: %s not found, skipping ...\n", + name); + } + + /* allocate buffers */ + in = malloc(CHUNK); + out = malloc(CHUNK); + if (in == NULL || out == NULL) bye("out of memory", ""); + + /* compress input file and append to gzip file */ + do { + /* get more input */ + len = read(fd, in, CHUNK); + if (len == -1) { + fprintf(stderr, + "gzappend warning: error reading %s, skipping rest ...\n", + name); + len = 0; + } + strm->avail_in = (unsigned)len; + strm->next_in = in; + if (len) strm->adler = crc32(strm->adler, in, (unsigned)len); + + /* compress and write all available output */ + do { + strm->avail_out = CHUNK; + strm->next_out = out; + ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH); + left = CHUNK - strm->avail_out; + while (left) { + len = write(gd, out + CHUNK - strm->avail_out - left, left); + if (len == -1) bye("writing gzip file", ""); + left -= (unsigned)len; + } + } while (strm->avail_out == 0 && ret != Z_STREAM_END); + } while (len != 0); + + /* write trailer after last entry */ + if (last) { + deflateEnd(strm); + out[0] = (unsigned char)(strm->adler); + out[1] = (unsigned char)(strm->adler >> 8); + out[2] = (unsigned char)(strm->adler >> 16); + out[3] = (unsigned char)(strm->adler >> 24); + out[4] = (unsigned char)(strm->total_in); + out[5] = (unsigned char)(strm->total_in >> 8); + out[6] = (unsigned char)(strm->total_in >> 16); + out[7] = (unsigned char)(strm->total_in >> 24); + len = 8; + do { + ret = write(gd, out + 8 - len, len); + if (ret == -1) bye("writing gzip file", ""); + len -= ret; + } while (len); + close(gd); + } + + /* clean up and return */ + free(out); + free(in); + if (fd > 0) close(fd); +} + +/* process the compression level option if present, scan the gzip file, and + append the specified files, or append the data from stdin if no other file + names are provided on the command line -- the gzip file must be writable + and seekable */ +int main(int argc, char **argv) +{ + int gd, level; + z_stream strm; + + /* ignore command name */ + argc--; argv++; + + /* provide usage if no arguments */ + if (*argv == NULL) { + printf( + "gzappend 1.2 (11 Oct 2012) Copyright (C) 2003, 2012 Mark Adler\n" + ); + printf( + "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n"); + return 0; + } + + /* set compression level */ + level = Z_DEFAULT_COMPRESSION; + if (argv[0][0] == '-') { + if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0) + bye("invalid compression level", ""); + level = argv[0][1] - '0'; + if (*++argv == NULL) bye("no gzip file name after options", ""); + } + + /* prepare to append to gzip file */ + gd = gzscan(*argv++, &strm, level); + + /* append files on command line, or from stdin if none */ + if (*argv == NULL) + gztack(NULL, gd, &strm, 1); + else + do { + gztack(*argv, gd, &strm, argv[1] == NULL); + } while (*++argv != NULL); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzjoin.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzjoin.c new file mode 100644 index 000000000..89e809844 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzjoin.c @@ -0,0 +1,449 @@ +/* gzjoin -- command to join gzip files into one gzip file + + Copyright (C) 2004, 2005, 2012 Mark Adler, all rights reserved + version 1.2, 14 Aug 2012 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + +/* + * Change history: + * + * 1.0 11 Dec 2004 - First version + * 1.1 12 Jun 2005 - Changed ssize_t to long for portability + * 1.2 14 Aug 2012 - Clean up for z_const usage + */ + +/* + gzjoin takes one or more gzip files on the command line and writes out a + single gzip file that will uncompress to the concatenation of the + uncompressed data from the individual gzip files. gzjoin does this without + having to recompress any of the data and without having to calculate a new + crc32 for the concatenated uncompressed data. gzjoin does however have to + decompress all of the input data in order to find the bits in the compressed + data that need to be modified to concatenate the streams. + + gzjoin does not do an integrity check on the input gzip files other than + checking the gzip header and decompressing the compressed data. They are + otherwise assumed to be complete and correct. + + Each joint between gzip files removes at least 18 bytes of previous trailer + and subsequent header, and inserts an average of about three bytes to the + compressed data in order to connect the streams. The output gzip file + has a minimal ten-byte gzip header with no file name or modification time. + + This program was written to illustrate the use of the Z_BLOCK option of + inflate() and the crc32_combine() function. gzjoin will not compile with + versions of zlib earlier than 1.2.3. + */ + +#include /* fputs(), fprintf(), fwrite(), putc() */ +#include /* exit(), malloc(), free() */ +#include /* open() */ +#include /* close(), read(), lseek() */ +#include "zlib.h" + /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */ + +#define local static + +/* exit with an error (return a value to allow use in an expression) */ +local int bail(char *why1, char *why2) +{ + fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2); + exit(1); + return 0; +} + +/* -- simple buffered file input with access to the buffer -- */ + +#define CHUNK 32768 /* must be a power of two and fit in unsigned */ + +/* bin buffered input file type */ +typedef struct { + char *name; /* name of file for error messages */ + int fd; /* file descriptor */ + unsigned left; /* bytes remaining at next */ + unsigned char *next; /* next byte to read */ + unsigned char *buf; /* allocated buffer of length CHUNK */ +} bin; + +/* close a buffered file and free allocated memory */ +local void bclose(bin *in) +{ + if (in != NULL) { + if (in->fd != -1) + close(in->fd); + if (in->buf != NULL) + free(in->buf); + free(in); + } +} + +/* open a buffered file for input, return a pointer to type bin, or NULL on + failure */ +local bin *bopen(char *name) +{ + bin *in; + + in = malloc(sizeof(bin)); + if (in == NULL) + return NULL; + in->buf = malloc(CHUNK); + in->fd = open(name, O_RDONLY, 0); + if (in->buf == NULL || in->fd == -1) { + bclose(in); + return NULL; + } + in->left = 0; + in->next = in->buf; + in->name = name; + return in; +} + +/* load buffer from file, return -1 on read error, 0 or 1 on success, with + 1 indicating that end-of-file was reached */ +local int bload(bin *in) +{ + long len; + + if (in == NULL) + return -1; + if (in->left != 0) + return 0; + in->next = in->buf; + do { + len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left); + if (len < 0) + return -1; + in->left += (unsigned)len; + } while (len != 0 && in->left < CHUNK); + return len == 0 ? 1 : 0; +} + +/* get a byte from the file, bail if end of file */ +#define bget(in) (in->left ? 0 : bload(in), \ + in->left ? (in->left--, *(in->next)++) : \ + bail("unexpected end of file on ", in->name)) + +/* get a four-byte little-endian unsigned integer from file */ +local unsigned long bget4(bin *in) +{ + unsigned long val; + + val = bget(in); + val += (unsigned long)(bget(in)) << 8; + val += (unsigned long)(bget(in)) << 16; + val += (unsigned long)(bget(in)) << 24; + return val; +} + +/* skip bytes in file */ +local void bskip(bin *in, unsigned skip) +{ + /* check pointer */ + if (in == NULL) + return; + + /* easy case -- skip bytes in buffer */ + if (skip <= in->left) { + in->left -= skip; + in->next += skip; + return; + } + + /* skip what's in buffer, discard buffer contents */ + skip -= in->left; + in->left = 0; + + /* seek past multiples of CHUNK bytes */ + if (skip > CHUNK) { + unsigned left; + + left = skip & (CHUNK - 1); + if (left == 0) { + /* exact number of chunks: seek all the way minus one byte to check + for end-of-file with a read */ + lseek(in->fd, skip - 1, SEEK_CUR); + if (read(in->fd, in->buf, 1) != 1) + bail("unexpected end of file on ", in->name); + return; + } + + /* skip the integral chunks, update skip with remainder */ + lseek(in->fd, skip - left, SEEK_CUR); + skip = left; + } + + /* read more input and skip remainder */ + bload(in); + if (skip > in->left) + bail("unexpected end of file on ", in->name); + in->left -= skip; + in->next += skip; +} + +/* -- end of buffered input functions -- */ + +/* skip the gzip header from file in */ +local void gzhead(bin *in) +{ + int flags; + + /* verify gzip magic header and compression method */ + if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8) + bail(in->name, " is not a valid gzip file"); + + /* get and verify flags */ + flags = bget(in); + if ((flags & 0xe0) != 0) + bail("unknown reserved bits set in ", in->name); + + /* skip modification time, extra flags, and os */ + bskip(in, 6); + + /* skip extra field if present */ + if (flags & 4) { + unsigned len; + + len = bget(in); + len += (unsigned)(bget(in)) << 8; + bskip(in, len); + } + + /* skip file name if present */ + if (flags & 8) + while (bget(in) != 0) + ; + + /* skip comment if present */ + if (flags & 16) + while (bget(in) != 0) + ; + + /* skip header crc if present */ + if (flags & 2) + bskip(in, 2); +} + +/* write a four-byte little-endian unsigned integer to out */ +local void put4(unsigned long val, FILE *out) +{ + putc(val & 0xff, out); + putc((val >> 8) & 0xff, out); + putc((val >> 16) & 0xff, out); + putc((val >> 24) & 0xff, out); +} + +/* Load up zlib stream from buffered input, bail if end of file */ +local void zpull(z_streamp strm, bin *in) +{ + if (in->left == 0) + bload(in); + if (in->left == 0) + bail("unexpected end of file on ", in->name); + strm->avail_in = in->left; + strm->next_in = in->next; +} + +/* Write header for gzip file to out and initialize trailer. */ +local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out) +{ + fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out); + *crc = crc32(0L, Z_NULL, 0); + *tot = 0; +} + +/* Copy the compressed data from name, zeroing the last block bit of the last + block if clr is true, and adding empty blocks as needed to get to a byte + boundary. If clr is false, then the last block becomes the last block of + the output, and the gzip trailer is written. crc and tot maintains the + crc and length (modulo 2^32) of the output for the trailer. The resulting + gzip file is written to out. gzinit() must be called before the first call + of gzcopy() to write the gzip header and to initialize crc and tot. */ +local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, + FILE *out) +{ + int ret; /* return value from zlib functions */ + int pos; /* where the "last block" bit is in byte */ + int last; /* true if processing the last block */ + bin *in; /* buffered input file */ + unsigned char *start; /* start of compressed data in buffer */ + unsigned char *junk; /* buffer for uncompressed data -- discarded */ + z_off_t len; /* length of uncompressed data (support > 4 GB) */ + z_stream strm; /* zlib inflate stream */ + + /* open gzip file and skip header */ + in = bopen(name); + if (in == NULL) + bail("could not open ", name); + gzhead(in); + + /* allocate buffer for uncompressed data and initialize raw inflate + stream */ + junk = malloc(CHUNK); + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, -15); + if (junk == NULL || ret != Z_OK) + bail("out of memory", ""); + + /* inflate and copy compressed data, clear last-block bit if requested */ + len = 0; + zpull(&strm, in); + start = in->next; + last = start[0] & 1; + if (last && clr) + start[0] &= ~1; + strm.avail_out = 0; + for (;;) { + /* if input used and output done, write used input and get more */ + if (strm.avail_in == 0 && strm.avail_out != 0) { + fwrite(start, 1, strm.next_in - start, out); + start = in->buf; + in->left = 0; + zpull(&strm, in); + } + + /* decompress -- return early when end-of-block reached */ + strm.avail_out = CHUNK; + strm.next_out = junk; + ret = inflate(&strm, Z_BLOCK); + switch (ret) { + case Z_MEM_ERROR: + bail("out of memory", ""); + case Z_DATA_ERROR: + bail("invalid compressed data in ", in->name); + } + + /* update length of uncompressed data */ + len += CHUNK - strm.avail_out; + + /* check for block boundary (only get this when block copied out) */ + if (strm.data_type & 128) { + /* if that was the last block, then done */ + if (last) + break; + + /* number of unused bits in last byte */ + pos = strm.data_type & 7; + + /* find the next last-block bit */ + if (pos != 0) { + /* next last-block bit is in last used byte */ + pos = 0x100 >> pos; + last = strm.next_in[-1] & pos; + if (last && clr) + in->buf[strm.next_in - in->buf - 1] &= ~pos; + } + else { + /* next last-block bit is in next unused byte */ + if (strm.avail_in == 0) { + /* don't have that byte yet -- get it */ + fwrite(start, 1, strm.next_in - start, out); + start = in->buf; + in->left = 0; + zpull(&strm, in); + } + last = strm.next_in[0] & 1; + if (last && clr) + in->buf[strm.next_in - in->buf] &= ~1; + } + } + } + + /* update buffer with unused input */ + in->left = strm.avail_in; + in->next = in->buf + (strm.next_in - in->buf); + + /* copy used input, write empty blocks to get to byte boundary */ + pos = strm.data_type & 7; + fwrite(start, 1, in->next - start - 1, out); + last = in->next[-1]; + if (pos == 0 || !clr) + /* already at byte boundary, or last file: write last byte */ + putc(last, out); + else { + /* append empty blocks to last byte */ + last &= ((0x100 >> pos) - 1); /* assure unused bits are zero */ + if (pos & 1) { + /* odd -- append an empty stored block */ + putc(last, out); + if (pos == 1) + putc(0, out); /* two more bits in block header */ + fwrite("\0\0\xff\xff", 1, 4, out); + } + else { + /* even -- append 1, 2, or 3 empty fixed blocks */ + switch (pos) { + case 6: + putc(last | 8, out); + last = 0; + case 4: + putc(last | 0x20, out); + last = 0; + case 2: + putc(last | 0x80, out); + putc(0, out); + } + } + } + + /* update crc and tot */ + *crc = crc32_combine(*crc, bget4(in), len); + *tot += (unsigned long)len; + + /* clean up */ + inflateEnd(&strm); + free(junk); + bclose(in); + + /* write trailer if this is the last gzip file */ + if (!clr) { + put4(*crc, out); + put4(*tot, out); + } +} + +/* join the gzip files on the command line, write result to stdout */ +int main(int argc, char **argv) +{ + unsigned long crc, tot; /* running crc and total uncompressed length */ + + /* skip command name */ + argc--; + argv++; + + /* show usage if no arguments */ + if (argc == 0) { + fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n", + stderr); + return 0; + } + + /* join gzip files on command line and write to stdout */ + gzinit(&crc, &tot, stdout); + while (argc--) + gzcopy(*argv++, argc, &crc, &tot, stdout); + + /* done */ + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.c new file mode 100644 index 000000000..b8c29274e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.c @@ -0,0 +1,1059 @@ +/* + * gzlog.c + * Copyright (C) 2004, 2008, 2012, 2016 Mark Adler, all rights reserved + * For conditions of distribution and use, see copyright notice in gzlog.h + * version 2.2, 14 Aug 2012 + */ + +/* + gzlog provides a mechanism for frequently appending short strings to a gzip + file that is efficient both in execution time and compression ratio. The + strategy is to write the short strings in an uncompressed form to the end of + the gzip file, only compressing when the amount of uncompressed data has + reached a given threshold. + + gzlog also provides protection against interruptions in the process due to + system crashes. The status of the operation is recorded in an extra field + in the gzip file, and is only updated once the gzip file is brought to a + valid state. The last data to be appended or compressed is saved in an + auxiliary file, so that if the operation is interrupted, it can be completed + the next time an append operation is attempted. + + gzlog maintains another auxiliary file with the last 32K of data from the + compressed portion, which is preloaded for the compression of the subsequent + data. This minimizes the impact to the compression ratio of appending. + */ + +/* + Operations Concept: + + Files (log name "foo"): + foo.gz -- gzip file with the complete log + foo.add -- last message to append or last data to compress + foo.dict -- dictionary of the last 32K of data for next compression + foo.temp -- temporary dictionary file for compression after this one + foo.lock -- lock file for reading and writing the other files + foo.repairs -- log file for log file recovery operations (not compressed) + + gzip file structure: + - fixed-length (no file name) header with extra field (see below) + - compressed data ending initially with empty stored block + - uncompressed data filling out originally empty stored block and + subsequent stored blocks as needed (16K max each) + - gzip trailer + - no junk at end (no other gzip streams) + + When appending data, the information in the first three items above plus the + foo.add file are sufficient to recover an interrupted append operation. The + extra field has the necessary information to restore the start of the last + stored block and determine where to append the data in the foo.add file, as + well as the crc and length of the gzip data before the append operation. + + The foo.add file is created before the gzip file is marked for append, and + deleted after the gzip file is marked as complete. So if the append + operation is interrupted, the data to add will still be there. If due to + some external force, the foo.add file gets deleted between when the append + operation was interrupted and when recovery is attempted, the gzip file will + still be restored, but without the appended data. + + When compressing data, the information in the first two items above plus the + foo.add file are sufficient to recover an interrupted compress operation. + The extra field has the necessary information to find the end of the + compressed data, and contains both the crc and length of just the compressed + data and of the complete set of data including the contents of the foo.add + file. + + Again, the foo.add file is maintained during the compress operation in case + of an interruption. If in the unlikely event the foo.add file with the data + to be compressed is missing due to some external force, a gzip file with + just the previous compressed data will be reconstructed. In this case, all + of the data that was to be compressed is lost (approximately one megabyte). + This will not occur if all that happened was an interruption of the compress + operation. + + The third state that is marked is the replacement of the old dictionary with + the new dictionary after a compress operation. Once compression is + complete, the gzip file is marked as being in the replace state. This + completes the gzip file, so an interrupt after being so marked does not + result in recompression. Then the dictionary file is replaced, and the gzip + file is marked as completed. This state prevents the possibility of + restarting compression with the wrong dictionary file. + + All three operations are wrapped by a lock/unlock procedure. In order to + gain exclusive access to the log files, first a foo.lock file must be + exclusively created. When all operations are complete, the lock is + released by deleting the foo.lock file. If when attempting to create the + lock file, it already exists and the modify time of the lock file is more + than five minutes old (set by the PATIENCE define below), then the old + lock file is considered stale and deleted, and the exclusive creation of + the lock file is retried. To assure that there are no false assessments + of the staleness of the lock file, the operations periodically touch the + lock file to update the modified date. + + Following is the definition of the extra field with all of the information + required to enable the above append and compress operations and their + recovery if interrupted. Multi-byte values are stored little endian + (consistent with the gzip format). File pointers are eight bytes long. + The crc's and lengths for the gzip trailer are four bytes long. (Note that + the length at the end of a gzip file is used for error checking only, and + for large files is actually the length modulo 2^32.) The stored block + length is two bytes long. The gzip extra field two-byte identification is + "ap" for append. It is assumed that writing the extra field to the file is + an "atomic" operation. That is, either all of the extra field is written + to the file, or none of it is, if the operation is interrupted right at the + point of updating the extra field. This is a reasonable assumption, since + the extra field is within the first 52 bytes of the file, which is smaller + than any expected block size for a mass storage device (usually 512 bytes or + larger). + + Extra field (35 bytes): + - Pointer to first stored block length -- this points to the two-byte length + of the first stored block, which is followed by the two-byte, one's + complement of that length. The stored block length is preceded by the + three-bit header of the stored block, which is the actual start of the + stored block in the deflate format. See the bit offset field below. + - Pointer to the last stored block length. This is the same as above, but + for the last stored block of the uncompressed data in the gzip file. + Initially this is the same as the first stored block length pointer. + When the stored block gets to 16K (see the MAX_STORE define), then a new + stored block as added, at which point the last stored block length pointer + is different from the first stored block length pointer. When they are + different, the first bit of the last stored block header is eight bits, or + one byte back from the block length. + - Compressed data crc and length. This is the crc and length of the data + that is in the compressed portion of the deflate stream. These are used + only in the event that the foo.add file containing the data to compress is + lost after a compress operation is interrupted. + - Total data crc and length. This is the crc and length of all of the data + stored in the gzip file, compressed and uncompressed. It is used to + reconstruct the gzip trailer when compressing, as well as when recovering + interrupted operations. + - Final stored block length. This is used to quickly find where to append, + and allows the restoration of the original final stored block state when + an append operation is interrupted. + - First stored block start as the number of bits back from the final stored + block first length byte. This value is in the range of 3..10, and is + stored as the low three bits of the final byte of the extra field after + subtracting three (0..7). This allows the last-block bit of the stored + block header to be updated when a new stored block is added, for the case + when the first stored block and the last stored block are the same. (When + they are different, the numbers of bits back is known to be eight.) This + also allows for new compressed data to be appended to the old compressed + data in the compress operation, overwriting the previous first stored + block, or for the compressed data to be terminated and a valid gzip file + reconstructed on the off chance that a compression operation was + interrupted and the data to compress in the foo.add file was deleted. + - The operation in process. This is the next two bits in the last byte (the + bits under the mask 0x18). The are interpreted as 0: nothing in process, + 1: append in process, 2: compress in process, 3: replace in process. + - The top three bits of the last byte in the extra field are reserved and + are currently set to zero. + + Main procedure: + - Exclusively create the foo.lock file using the O_CREAT and O_EXCL modes of + the system open() call. If the modify time of an existing lock file is + more than PATIENCE seconds old, then the lock file is deleted and the + exclusive create is retried. + - Load the extra field from the foo.gz file, and see if an operation was in + progress but not completed. If so, apply the recovery procedure below. + - Perform the append procedure with the provided data. + - If the uncompressed data in the foo.gz file is 1MB or more, apply the + compress procedure. + - Delete the foo.lock file. + + Append procedure: + - Put what to append in the foo.add file so that the operation can be + restarted if this procedure is interrupted. + - Mark the foo.gz extra field with the append operation in progress. + + Restore the original last-block bit and stored block length of the last + stored block from the information in the extra field, in case a previous + append operation was interrupted. + - Append the provided data to the last stored block, creating new stored + blocks as needed and updating the stored blocks last-block bits and + lengths. + - Update the crc and length with the new data, and write the gzip trailer. + - Write over the extra field (with a single write operation) with the new + pointers, lengths, and crc's, and mark the gzip file as not in process. + Though there is still a foo.add file, it will be ignored since nothing + is in process. If a foo.add file is leftover from a previously + completed operation, it is truncated when writing new data to it. + - Delete the foo.add file. + + Compress and replace procedures: + - Read all of the uncompressed data in the stored blocks in foo.gz and write + it to foo.add. Also write foo.temp with the last 32K of that data to + provide a dictionary for the next invocation of this procedure. + - Rewrite the extra field marking foo.gz with a compression in process. + * If there is no data provided to compress (due to a missing foo.add file + when recovering), reconstruct and truncate the foo.gz file to contain + only the previous compressed data and proceed to the step after the next + one. Otherwise ... + - Compress the data with the dictionary in foo.dict, and write to the + foo.gz file starting at the bit immediately following the last previously + compressed block. If there is no foo.dict, proceed anyway with the + compression at slightly reduced efficiency. (For the foo.dict file to be + missing requires some external failure beyond simply the interruption of + a compress operation.) During this process, the foo.lock file is + periodically touched to assure that that file is not considered stale by + another process before we're done. The deflation is terminated with a + non-last empty static block (10 bits long), that is then located and + written over by a last-bit-set empty stored block. + - Append the crc and length of the data in the gzip file (previously + calculated during the append operations). + - Write over the extra field with the updated stored block offsets, bits + back, crc's, and lengths, and mark foo.gz as in process for a replacement + of the dictionary. + @ Delete the foo.add file. + - Replace foo.dict with foo.temp. + - Write over the extra field, marking foo.gz as complete. + + Recovery procedure: + - If not a replace recovery, read in the foo.add file, and provide that data + to the appropriate recovery below. If there is no foo.add file, provide + a zero data length to the recovery. In that case, the append recovery + restores the foo.gz to the previous compressed + uncompressed data state. + For the the compress recovery, a missing foo.add file results in foo.gz + being restored to the previous compressed-only data state. + - Append recovery: + - Pick up append at + step above + - Compress recovery: + - Pick up compress at * step above + - Replace recovery: + - Pick up compress at @ step above + - Log the repair with a date stamp in foo.repairs + */ + +#include +#include /* rename, fopen, fprintf, fclose */ +#include /* malloc, free */ +#include /* strlen, strrchr, strcpy, strncpy, strcmp */ +#include /* open */ +#include /* lseek, read, write, close, unlink, sleep, */ + /* ftruncate, fsync */ +#include /* errno */ +#include /* time, ctime */ +#include /* stat */ +#include /* utimes */ +#include "zlib.h" /* crc32 */ + +#include "gzlog.h" /* header for external access */ + +#define local static +typedef unsigned int uint; +typedef unsigned long ulong; + +/* Macro for debugging to deterministically force recovery operations */ +#ifdef GZLOG_DEBUG + #include /* longjmp */ + jmp_buf gzlog_jump; /* where to go back to */ + int gzlog_bail = 0; /* which point to bail at (1..8) */ + int gzlog_count = -1; /* number of times through to wait */ +# define BAIL(n) do { if (n == gzlog_bail && gzlog_count-- == 0) \ + longjmp(gzlog_jump, gzlog_bail); } while (0) +#else +# define BAIL(n) +#endif + +/* how old the lock file can be in seconds before considering it stale */ +#define PATIENCE 300 + +/* maximum stored block size in Kbytes -- must be in 1..63 */ +#define MAX_STORE 16 + +/* number of stored Kbytes to trigger compression (must be >= 32 to allow + dictionary construction, and <= 204 * MAX_STORE, in order for >> 10 to + discard the stored block headers contribution of five bytes each) */ +#define TRIGGER 1024 + +/* size of a deflate dictionary (this cannot be changed) */ +#define DICT 32768U + +/* values for the operation (2 bits) */ +#define NO_OP 0 +#define APPEND_OP 1 +#define COMPRESS_OP 2 +#define REPLACE_OP 3 + +/* macros to extract little-endian integers from an unsigned byte buffer */ +#define PULL2(p) ((p)[0]+((uint)((p)[1])<<8)) +#define PULL4(p) (PULL2(p)+((ulong)PULL2(p+2)<<16)) +#define PULL8(p) (PULL4(p)+((off_t)PULL4(p+4)<<32)) + +/* macros to store integers into a byte buffer in little-endian order */ +#define PUT2(p,a) do {(p)[0]=a;(p)[1]=(a)>>8;} while(0) +#define PUT4(p,a) do {PUT2(p,a);PUT2(p+2,a>>16);} while(0) +#define PUT8(p,a) do {PUT4(p,a);PUT4(p+4,a>>32);} while(0) + +/* internal structure for log information */ +#define LOGID "\106\035\172" /* should be three non-zero characters */ +struct log { + char id[4]; /* contains LOGID to detect inadvertent overwrites */ + int fd; /* file descriptor for .gz file, opened read/write */ + char *path; /* allocated path, e.g. "/var/log/foo" or "foo" */ + char *end; /* end of path, for appending suffices such as ".gz" */ + off_t first; /* offset of first stored block first length byte */ + int back; /* location of first block id in bits back from first */ + uint stored; /* bytes currently in last stored block */ + off_t last; /* offset of last stored block first length byte */ + ulong ccrc; /* crc of compressed data */ + ulong clen; /* length (modulo 2^32) of compressed data */ + ulong tcrc; /* crc of total data */ + ulong tlen; /* length (modulo 2^32) of total data */ + time_t lock; /* last modify time of our lock file */ +}; + +/* gzip header for gzlog */ +local unsigned char log_gzhead[] = { + 0x1f, 0x8b, /* magic gzip id */ + 8, /* compression method is deflate */ + 4, /* there is an extra field (no file name) */ + 0, 0, 0, 0, /* no modification time provided */ + 0, 0xff, /* no extra flags, no OS specified */ + 39, 0, 'a', 'p', 35, 0 /* extra field with "ap" subfield */ + /* 35 is EXTRA, 39 is EXTRA + 4 */ +}; + +#define HEAD sizeof(log_gzhead) /* should be 16 */ + +/* initial gzip extra field content (52 == HEAD + EXTRA + 1) */ +local unsigned char log_gzext[] = { + 52, 0, 0, 0, 0, 0, 0, 0, /* offset of first stored block length */ + 52, 0, 0, 0, 0, 0, 0, 0, /* offset of last stored block length */ + 0, 0, 0, 0, 0, 0, 0, 0, /* compressed data crc and length */ + 0, 0, 0, 0, 0, 0, 0, 0, /* total data crc and length */ + 0, 0, /* final stored block data length */ + 5 /* op is NO_OP, last bit 8 bits back */ +}; + +#define EXTRA sizeof(log_gzext) /* should be 35 */ + +/* initial gzip data and trailer */ +local unsigned char log_gzbody[] = { + 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */ + 0, 0, 0, 0, /* crc */ + 0, 0, 0, 0 /* uncompressed length */ +}; + +#define BODY sizeof(log_gzbody) + +/* Exclusively create foo.lock in order to negotiate exclusive access to the + foo.* files. If the modify time of an existing lock file is greater than + PATIENCE seconds in the past, then consider the lock file to have been + abandoned, delete it, and try the exclusive create again. Save the lock + file modify time for verification of ownership. Return 0 on success, or -1 + on failure, usually due to an access restriction or invalid path. Note that + if stat() or unlink() fails, it may be due to another process noticing the + abandoned lock file a smidge sooner and deleting it, so those are not + flagged as an error. */ +local int log_lock(struct log *log) +{ + int fd; + struct stat st; + + strcpy(log->end, ".lock"); + while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) { + if (errno != EEXIST) + return -1; + if (stat(log->path, &st) == 0 && time(NULL) - st.st_mtime > PATIENCE) { + unlink(log->path); + continue; + } + sleep(2); /* relinquish the CPU for two seconds while waiting */ + } + close(fd); + if (stat(log->path, &st) == 0) + log->lock = st.st_mtime; + return 0; +} + +/* Update the modify time of the lock file to now, in order to prevent another + task from thinking that the lock is stale. Save the lock file modify time + for verification of ownership. */ +local void log_touch(struct log *log) +{ + struct stat st; + + strcpy(log->end, ".lock"); + utimes(log->path, NULL); + if (stat(log->path, &st) == 0) + log->lock = st.st_mtime; +} + +/* Check the log file modify time against what is expected. Return true if + this is not our lock. If it is our lock, touch it to keep it. */ +local int log_check(struct log *log) +{ + struct stat st; + + strcpy(log->end, ".lock"); + if (stat(log->path, &st) || st.st_mtime != log->lock) + return 1; + log_touch(log); + return 0; +} + +/* Unlock a previously acquired lock, but only if it's ours. */ +local void log_unlock(struct log *log) +{ + if (log_check(log)) + return; + strcpy(log->end, ".lock"); + unlink(log->path); + log->lock = 0; +} + +/* Check the gzip header and read in the extra field, filling in the values in + the log structure. Return op on success or -1 if the gzip header was not as + expected. op is the current operation in progress last written to the extra + field. This assumes that the gzip file has already been opened, with the + file descriptor log->fd. */ +local int log_head(struct log *log) +{ + int op; + unsigned char buf[HEAD + EXTRA]; + + if (lseek(log->fd, 0, SEEK_SET) < 0 || + read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA || + memcmp(buf, log_gzhead, HEAD)) { + return -1; + } + log->first = PULL8(buf + HEAD); + log->last = PULL8(buf + HEAD + 8); + log->ccrc = PULL4(buf + HEAD + 16); + log->clen = PULL4(buf + HEAD + 20); + log->tcrc = PULL4(buf + HEAD + 24); + log->tlen = PULL4(buf + HEAD + 28); + log->stored = PULL2(buf + HEAD + 32); + log->back = 3 + (buf[HEAD + 34] & 7); + op = (buf[HEAD + 34] >> 3) & 3; + return op; +} + +/* Write over the extra field contents, marking the operation as op. Use fsync + to assure that the device is written to, and in the requested order. This + operation, and only this operation, is assumed to be atomic in order to + assure that the log is recoverable in the event of an interruption at any + point in the process. Return -1 if the write to foo.gz failed. */ +local int log_mark(struct log *log, int op) +{ + int ret; + unsigned char ext[EXTRA]; + + PUT8(ext, log->first); + PUT8(ext + 8, log->last); + PUT4(ext + 16, log->ccrc); + PUT4(ext + 20, log->clen); + PUT4(ext + 24, log->tcrc); + PUT4(ext + 28, log->tlen); + PUT2(ext + 32, log->stored); + ext[34] = log->back - 3 + (op << 3); + fsync(log->fd); + ret = lseek(log->fd, HEAD, SEEK_SET) < 0 || + write(log->fd, ext, EXTRA) != EXTRA ? -1 : 0; + fsync(log->fd); + return ret; +} + +/* Rewrite the last block header bits and subsequent zero bits to get to a byte + boundary, setting the last block bit if last is true, and then write the + remainder of the stored block header (length and one's complement). Leave + the file pointer after the end of the last stored block data. Return -1 if + there is a read or write failure on the foo.gz file */ +local int log_last(struct log *log, int last) +{ + int back, len, mask; + unsigned char buf[6]; + + /* determine the locations of the bytes and bits to modify */ + back = log->last == log->first ? log->back : 8; + len = back > 8 ? 2 : 1; /* bytes back from log->last */ + mask = 0x80 >> ((back - 1) & 7); /* mask for block last-bit */ + + /* get the byte to modify (one or two back) into buf[0] -- don't need to + read the byte if the last-bit is eight bits back, since in that case + the entire byte will be modified */ + buf[0] = 0; + if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 || + read(log->fd, buf, 1) != 1)) + return -1; + + /* change the last-bit of the last stored block as requested -- note + that all bits above the last-bit are set to zero, per the type bits + of a stored block being 00 and per the convention that the bits to + bring the stream to a byte boundary are also zeros */ + buf[1] = 0; + buf[2 - len] = (*buf & (mask - 1)) + (last ? mask : 0); + + /* write the modified stored block header and lengths, move the file + pointer to after the last stored block data */ + PUT2(buf + 2, log->stored); + PUT2(buf + 4, log->stored ^ 0xffff); + return lseek(log->fd, log->last - len, SEEK_SET) < 0 || + write(log->fd, buf + 2 - len, len + 4) != len + 4 || + lseek(log->fd, log->stored, SEEK_CUR) < 0 ? -1 : 0; +} + +/* Append len bytes from data to the locked and open log file. len may be zero + if recovering and no .add file was found. In that case, the previous state + of the foo.gz file is restored. The data is appended uncompressed in + deflate stored blocks. Return -1 if there was an error reading or writing + the foo.gz file. */ +local int log_append(struct log *log, unsigned char *data, size_t len) +{ + uint put; + off_t end; + unsigned char buf[8]; + + /* set the last block last-bit and length, in case recovering an + interrupted append, then position the file pointer to append to the + block */ + if (log_last(log, 1)) + return -1; + + /* append, adding stored blocks and updating the offset of the last stored + block as needed, and update the total crc and length */ + while (len) { + /* append as much as we can to the last block */ + put = (MAX_STORE << 10) - log->stored; + if (put > len) + put = (uint)len; + if (put) { + if (write(log->fd, data, put) != put) + return -1; + BAIL(1); + log->tcrc = crc32(log->tcrc, data, put); + log->tlen += put; + log->stored += put; + data += put; + len -= put; + } + + /* if we need to, add a new empty stored block */ + if (len) { + /* mark current block as not last */ + if (log_last(log, 0)) + return -1; + + /* point to new, empty stored block */ + log->last += 4 + log->stored + 1; + log->stored = 0; + } + + /* mark last block as last, update its length */ + if (log_last(log, 1)) + return -1; + BAIL(2); + } + + /* write the new crc and length trailer, and truncate just in case (could + be recovering from partial append with a missing foo.add file) */ + PUT4(buf, log->tcrc); + PUT4(buf + 4, log->tlen); + if (write(log->fd, buf, 8) != 8 || + (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) + return -1; + + /* write the extra field, marking the log file as done, delete .add file */ + if (log_mark(log, NO_OP)) + return -1; + strcpy(log->end, ".add"); + unlink(log->path); /* ignore error, since may not exist */ + return 0; +} + +/* Replace the foo.dict file with the foo.temp file. Also delete the foo.add + file, since the compress operation may have been interrupted before that was + done. Returns 1 if memory could not be allocated, or -1 if reading or + writing foo.gz fails, or if the rename fails for some reason other than + foo.temp not existing. foo.temp not existing is a permitted error, since + the replace operation may have been interrupted after the rename is done, + but before foo.gz is marked as complete. */ +local int log_replace(struct log *log) +{ + int ret; + char *dest; + + /* delete foo.add file */ + strcpy(log->end, ".add"); + unlink(log->path); /* ignore error, since may not exist */ + BAIL(3); + + /* rename foo.name to foo.dict, replacing foo.dict if it exists */ + strcpy(log->end, ".dict"); + dest = malloc(strlen(log->path) + 1); + if (dest == NULL) + return -2; + strcpy(dest, log->path); + strcpy(log->end, ".temp"); + ret = rename(log->path, dest); + free(dest); + if (ret && errno != ENOENT) + return -1; + BAIL(4); + + /* mark the foo.gz file as done */ + return log_mark(log, NO_OP); +} + +/* Compress the len bytes at data and append the compressed data to the + foo.gz deflate data immediately after the previous compressed data. This + overwrites the previous uncompressed data, which was stored in foo.add + and is the data provided in data[0..len-1]. If this operation is + interrupted, it picks up at the start of this routine, with the foo.add + file read in again. If there is no data to compress (len == 0), then we + simply terminate the foo.gz file after the previously compressed data, + appending a final empty stored block and the gzip trailer. Return -1 if + reading or writing the log.gz file failed, or -2 if there was a memory + allocation failure. */ +local int log_compress(struct log *log, unsigned char *data, size_t len) +{ + int fd; + uint got, max; + ssize_t dict; + off_t end; + z_stream strm; + unsigned char buf[DICT]; + + /* compress and append compressed data */ + if (len) { + /* set up for deflate, allocating memory */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + if (deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -15, 8, + Z_DEFAULT_STRATEGY) != Z_OK) + return -2; + + /* read in dictionary (last 32K of data that was compressed) */ + strcpy(log->end, ".dict"); + fd = open(log->path, O_RDONLY, 0); + if (fd >= 0) { + dict = read(fd, buf, DICT); + close(fd); + if (dict < 0) { + deflateEnd(&strm); + return -1; + } + if (dict) + deflateSetDictionary(&strm, buf, (uint)dict); + } + log_touch(log); + + /* prime deflate with last bits of previous block, position write + pointer to write those bits and overwrite what follows */ + if (lseek(log->fd, log->first - (log->back > 8 ? 2 : 1), + SEEK_SET) < 0 || + read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) { + deflateEnd(&strm); + return -1; + } + deflatePrime(&strm, (8 - log->back) & 7, *buf); + + /* compress, finishing with a partial non-last empty static block */ + strm.next_in = data; + max = (((uint)0 - 1) >> 1) + 1; /* in case int smaller than size_t */ + do { + strm.avail_in = len > max ? max : (uint)len; + len -= strm.avail_in; + do { + strm.avail_out = DICT; + strm.next_out = buf; + deflate(&strm, len ? Z_NO_FLUSH : Z_PARTIAL_FLUSH); + got = DICT - strm.avail_out; + if (got && write(log->fd, buf, got) != got) { + deflateEnd(&strm); + return -1; + } + log_touch(log); + } while (strm.avail_out == 0); + } while (len); + deflateEnd(&strm); + BAIL(5); + + /* find start of empty static block -- scanning backwards the first one + bit is the second bit of the block, if the last byte is zero, then + we know the byte before that has a one in the top bit, since an + empty static block is ten bits long */ + if ((log->first = lseek(log->fd, -1, SEEK_CUR)) < 0 || + read(log->fd, buf, 1) != 1) + return -1; + log->first++; + if (*buf) { + log->back = 1; + while ((*buf & ((uint)1 << (8 - log->back++))) == 0) + ; /* guaranteed to terminate, since *buf != 0 */ + } + else + log->back = 10; + + /* update compressed crc and length */ + log->ccrc = log->tcrc; + log->clen = log->tlen; + } + else { + /* no data to compress -- fix up existing gzip stream */ + log->tcrc = log->ccrc; + log->tlen = log->clen; + } + + /* complete and truncate gzip stream */ + log->last = log->first; + log->stored = 0; + PUT4(buf, log->tcrc); + PUT4(buf + 4, log->tlen); + if (log_last(log, 1) || write(log->fd, buf, 8) != 8 || + (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) + return -1; + BAIL(6); + + /* mark as being in the replace operation */ + if (log_mark(log, REPLACE_OP)) + return -1; + + /* execute the replace operation and mark the file as done */ + return log_replace(log); +} + +/* log a repair record to the .repairs file */ +local void log_log(struct log *log, int op, char *record) +{ + time_t now; + FILE *rec; + + now = time(NULL); + strcpy(log->end, ".repairs"); + rec = fopen(log->path, "a"); + if (rec == NULL) + return; + fprintf(rec, "%.24s %s recovery: %s\n", ctime(&now), op == APPEND_OP ? + "append" : (op == COMPRESS_OP ? "compress" : "replace"), record); + fclose(rec); + return; +} + +/* Recover the interrupted operation op. First read foo.add for recovering an + append or compress operation. Return -1 if there was an error reading or + writing foo.gz or reading an existing foo.add, or -2 if there was a memory + allocation failure. */ +local int log_recover(struct log *log, int op) +{ + int fd, ret = 0; + unsigned char *data = NULL; + size_t len = 0; + struct stat st; + + /* log recovery */ + log_log(log, op, "start"); + + /* load foo.add file if expected and present */ + if (op == APPEND_OP || op == COMPRESS_OP) { + strcpy(log->end, ".add"); + if (stat(log->path, &st) == 0 && st.st_size) { + len = (size_t)(st.st_size); + if ((off_t)len != st.st_size || + (data = malloc(st.st_size)) == NULL) { + log_log(log, op, "allocation failure"); + return -2; + } + if ((fd = open(log->path, O_RDONLY, 0)) < 0) { + log_log(log, op, ".add file read failure"); + return -1; + } + ret = (size_t)read(fd, data, len) != len; + close(fd); + if (ret) { + log_log(log, op, ".add file read failure"); + return -1; + } + log_log(log, op, "loaded .add file"); + } + else + log_log(log, op, "missing .add file!"); + } + + /* recover the interrupted operation */ + switch (op) { + case APPEND_OP: + ret = log_append(log, data, len); + break; + case COMPRESS_OP: + ret = log_compress(log, data, len); + break; + case REPLACE_OP: + ret = log_replace(log); + } + + /* log status */ + log_log(log, op, ret ? "failure" : "complete"); + + /* clean up */ + if (data != NULL) + free(data); + return ret; +} + +/* Close the foo.gz file (if open) and release the lock. */ +local void log_close(struct log *log) +{ + if (log->fd >= 0) + close(log->fd); + log->fd = -1; + log_unlock(log); +} + +/* Open foo.gz, verify the header, and load the extra field contents, after + first creating the foo.lock file to gain exclusive access to the foo.* + files. If foo.gz does not exist or is empty, then write the initial header, + extra, and body content of an empty foo.gz log file. If there is an error + creating the lock file due to access restrictions, or an error reading or + writing the foo.gz file, or if the foo.gz file is not a proper log file for + this object (e.g. not a gzip file or does not contain the expected extra + field), then return true. If there is an error, the lock is released. + Otherwise, the lock is left in place. */ +local int log_open(struct log *log) +{ + int op; + + /* release open file resource if left over -- can occur if lock lost + between gzlog_open() and gzlog_write() */ + if (log->fd >= 0) + close(log->fd); + log->fd = -1; + + /* negotiate exclusive access */ + if (log_lock(log) < 0) + return -1; + + /* open the log file, foo.gz */ + strcpy(log->end, ".gz"); + log->fd = open(log->path, O_RDWR | O_CREAT, 0644); + if (log->fd < 0) { + log_close(log); + return -1; + } + + /* if new, initialize foo.gz with an empty log, delete old dictionary */ + if (lseek(log->fd, 0, SEEK_END) == 0) { + if (write(log->fd, log_gzhead, HEAD) != HEAD || + write(log->fd, log_gzext, EXTRA) != EXTRA || + write(log->fd, log_gzbody, BODY) != BODY) { + log_close(log); + return -1; + } + strcpy(log->end, ".dict"); + unlink(log->path); + } + + /* verify log file and load extra field information */ + if ((op = log_head(log)) < 0) { + log_close(log); + return -1; + } + + /* check for interrupted process and if so, recover */ + if (op != NO_OP && log_recover(log, op)) { + log_close(log); + return -1; + } + + /* touch the lock file to prevent another process from grabbing it */ + log_touch(log); + return 0; +} + +/* See gzlog.h for the description of the external methods below */ +gzlog *gzlog_open(char *path) +{ + size_t n; + struct log *log; + + /* check arguments */ + if (path == NULL || *path == 0) + return NULL; + + /* allocate and initialize log structure */ + log = malloc(sizeof(struct log)); + if (log == NULL) + return NULL; + strcpy(log->id, LOGID); + log->fd = -1; + + /* save path and end of path for name construction */ + n = strlen(path); + log->path = malloc(n + 9); /* allow for ".repairs" */ + if (log->path == NULL) { + free(log); + return NULL; + } + strcpy(log->path, path); + log->end = log->path + n; + + /* gain exclusive access and verify log file -- may perform a + recovery operation if needed */ + if (log_open(log)) { + free(log->path); + free(log); + return NULL; + } + + /* return pointer to log structure */ + return log; +} + +/* gzlog_compress() return values: + 0: all good + -1: file i/o error (usually access issue) + -2: memory allocation failure + -3: invalid log pointer argument */ +int gzlog_compress(gzlog *logd) +{ + int fd, ret; + uint block; + size_t len, next; + unsigned char *data, buf[5]; + struct log *log = logd; + + /* check arguments */ + if (log == NULL || strcmp(log->id, LOGID)) + return -3; + + /* see if we lost the lock -- if so get it again and reload the extra + field information (it probably changed), recover last operation if + necessary */ + if (log_check(log) && log_open(log)) + return -1; + + /* create space for uncompressed data */ + len = ((size_t)(log->last - log->first) & ~(((size_t)1 << 10) - 1)) + + log->stored; + if ((data = malloc(len)) == NULL) + return -2; + + /* do statement here is just a cheap trick for error handling */ + do { + /* read in the uncompressed data */ + if (lseek(log->fd, log->first - 1, SEEK_SET) < 0) + break; + next = 0; + while (next < len) { + if (read(log->fd, buf, 5) != 5) + break; + block = PULL2(buf + 1); + if (next + block > len || + read(log->fd, (char *)data + next, block) != block) + break; + next += block; + } + if (lseek(log->fd, 0, SEEK_CUR) != log->last + 4 + log->stored) + break; + log_touch(log); + + /* write the uncompressed data to the .add file */ + strcpy(log->end, ".add"); + fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + break; + ret = (size_t)write(fd, data, len) != len; + if (ret | close(fd)) + break; + log_touch(log); + + /* write the dictionary for the next compress to the .temp file */ + strcpy(log->end, ".temp"); + fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + break; + next = DICT > len ? len : DICT; + ret = (size_t)write(fd, (char *)data + len - next, next) != next; + if (ret | close(fd)) + break; + log_touch(log); + + /* roll back to compressed data, mark the compress in progress */ + log->last = log->first; + log->stored = 0; + if (log_mark(log, COMPRESS_OP)) + break; + BAIL(7); + + /* compress and append the data (clears mark) */ + ret = log_compress(log, data, len); + free(data); + return ret; + } while (0); + + /* broke out of do above on i/o error */ + free(data); + return -1; +} + +/* gzlog_write() return values: + 0: all good + -1: file i/o error (usually access issue) + -2: memory allocation failure + -3: invalid log pointer argument */ +int gzlog_write(gzlog *logd, void *data, size_t len) +{ + int fd, ret; + struct log *log = logd; + + /* check arguments */ + if (log == NULL || strcmp(log->id, LOGID)) + return -3; + if (data == NULL || len <= 0) + return 0; + + /* see if we lost the lock -- if so get it again and reload the extra + field information (it probably changed), recover last operation if + necessary */ + if (log_check(log) && log_open(log)) + return -1; + + /* create and write .add file */ + strcpy(log->end, ".add"); + fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + return -1; + ret = (size_t)write(fd, data, len) != len; + if (ret | close(fd)) + return -1; + log_touch(log); + + /* mark log file with append in progress */ + if (log_mark(log, APPEND_OP)) + return -1; + BAIL(8); + + /* append data (clears mark) */ + if (log_append(log, data, len)) + return -1; + + /* check to see if it's time to compress -- if not, then done */ + if (((log->last - log->first) >> 10) + (log->stored >> 10) < TRIGGER) + return 0; + + /* time to compress */ + return gzlog_compress(log); +} + +/* gzlog_close() return values: + 0: ok + -3: invalid log pointer argument */ +int gzlog_close(gzlog *logd) +{ + struct log *log = logd; + + /* check arguments */ + if (log == NULL || strcmp(log->id, LOGID)) + return -3; + + /* close the log file and release the lock */ + log_close(log); + + /* free structure and return */ + if (log->path != NULL) + free(log->path); + strcpy(log->id, "bad"); + free(log); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.h new file mode 100644 index 000000000..86f0cecba --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/gzlog.h @@ -0,0 +1,91 @@ +/* gzlog.h + Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved + version 2.2, 14 Aug 2012 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + +/* Version History: + 1.0 26 Nov 2004 First version + 2.0 25 Apr 2008 Complete redesign for recovery of interrupted operations + Interface changed slightly in that now path is a prefix + Compression now occurs as needed during gzlog_write() + gzlog_write() now always leaves the log file as valid gzip + 2.1 8 Jul 2012 Fix argument checks in gzlog_compress() and gzlog_write() + 2.2 14 Aug 2012 Clean up signed comparisons + */ + +/* + The gzlog object allows writing short messages to a gzipped log file, + opening the log file locked for small bursts, and then closing it. The log + object works by appending stored (uncompressed) data to the gzip file until + 1 MB has been accumulated. At that time, the stored data is compressed, and + replaces the uncompressed data in the file. The log file is truncated to + its new size at that time. After each write operation, the log file is a + valid gzip file that can decompressed to recover what was written. + + The gzlog operations can be interupted at any point due to an application or + system crash, and the log file will be recovered the next time the log is + opened with gzlog_open(). + */ + +#ifndef GZLOG_H +#define GZLOG_H + +/* gzlog object type */ +typedef void gzlog; + +/* Open a gzlog object, creating the log file if it does not exist. Return + NULL on error. Note that gzlog_open() could take a while to complete if it + has to wait to verify that a lock is stale (possibly for five minutes), or + if there is significant contention with other instantiations of this object + when locking the resource. path is the prefix of the file names created by + this object. If path is "foo", then the log file will be "foo.gz", and + other auxiliary files will be created and destroyed during the process: + "foo.dict" for a compression dictionary, "foo.temp" for a temporary (next) + dictionary, "foo.add" for data being added or compressed, "foo.lock" for the + lock file, and "foo.repairs" to log recovery operations performed due to + interrupted gzlog operations. A gzlog_open() followed by a gzlog_close() + will recover a previously interrupted operation, if any. */ +gzlog *gzlog_open(char *path); + +/* Write to a gzlog object. Return zero on success, -1 if there is a file i/o + error on any of the gzlog files (this should not happen if gzlog_open() + succeeded, unless the device has run out of space or leftover auxiliary + files have permissions or ownership that prevent their use), -2 if there is + a memory allocation failure, or -3 if the log argument is invalid (e.g. if + it was not created by gzlog_open()). This function will write data to the + file uncompressed, until 1 MB has been accumulated, at which time that data + will be compressed. The log file will be a valid gzip file upon successful + return. */ +int gzlog_write(gzlog *log, void *data, size_t len); + +/* Force compression of any uncompressed data in the log. This should be used + sparingly, if at all. The main application would be when a log file will + not be appended to again. If this is used to compress frequently while + appending, it will both significantly increase the execution time and + reduce the compression ratio. The return codes are the same as for + gzlog_write(). */ +int gzlog_compress(gzlog *log); + +/* Close a gzlog object. Return zero on success, -3 if the log argument is + invalid. The log object is freed, and so cannot be referenced again. */ +int gzlog_close(gzlog *log); + +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zlib_how.html b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zlib_how.html new file mode 100644 index 000000000..444ff1c9a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zlib_how.html @@ -0,0 +1,545 @@ + + + + +zlib Usage Example + + + +

zlib Usage Example

+We often get questions about how the deflate() and inflate() functions should be used. +Users wonder when they should provide more input, when they should use more output, +what to do with a Z_BUF_ERROR, how to make sure the process terminates properly, and +so on. So for those who have read zlib.h (a few times), and +would like further edification, below is an annotated example in C of simple routines to compress and decompress +from an input file to an output file using deflate() and inflate() respectively. The +annotations are interspersed between lines of the code. So please read between the lines. +We hope this helps explain some of the intricacies of zlib. +

+Without further adieu, here is the program zpipe.c: +


+/* zpipe.c: example of proper use of zlib's inflate() and deflate()
+   Not copyrighted -- provided to the public domain
+   Version 1.4  11 December 2005  Mark Adler */
+
+/* Version history:
+   1.0  30 Oct 2004  First version
+   1.1   8 Nov 2004  Add void casting for unused return values
+                     Use switch statement for inflate() return values
+   1.2   9 Nov 2004  Add assertions to document zlib guarantees
+   1.3   6 Apr 2005  Remove incorrect assertion in inf()
+   1.4  11 Dec 2005  Add hack to avoid MSDOS end-of-line conversions
+                     Avoid some compiler warnings for input and output buffers
+ */
+
+We now include the header files for the required definitions. From +stdio.h we use fopen(), fread(), fwrite(), +feof(), ferror(), and fclose() for file i/o, and +fputs() for error messages. From string.h we use +strcmp() for command line argument processing. +From assert.h we use the assert() macro. +From zlib.h +we use the basic compression functions deflateInit(), +deflate(), and deflateEnd(), and the basic decompression +functions inflateInit(), inflate(), and +inflateEnd(). +

+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "zlib.h"
+
+This is an ugly hack required to avoid corruption of the input and output data on +Windows/MS-DOS systems. Without this, those systems would assume that the input and output +files are text, and try to convert the end-of-line characters from one standard to +another. That would corrupt binary data, and in particular would render the compressed data unusable. +This sets the input and output to binary which suppresses the end-of-line conversions. +SET_BINARY_MODE() will be used later on stdin and stdout, at the beginning of main(). +

+#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
+#  include <fcntl.h>
+#  include <io.h>
+#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#else
+#  define SET_BINARY_MODE(file)
+#endif
+
+CHUNK is simply the buffer size for feeding data to and pulling data +from the zlib routines. Larger buffer sizes would be more efficient, +especially for inflate(). If the memory is available, buffers sizes +on the order of 128K or 256K bytes should be used. +

+#define CHUNK 16384
+
+The def() routine compresses data from an input file to an output file. The output data +will be in the zlib format, which is different from the gzip or zip +formats. The zlib format has a very small header of only two bytes to identify it as +a zlib stream and to provide decoding information, and a four-byte trailer with a fast +check value to verify the integrity of the uncompressed data after decoding. +

+/* Compress from file source to file dest until EOF on source.
+   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
+   allocated for processing, Z_STREAM_ERROR if an invalid compression
+   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
+   version of the library linked do not match, or Z_ERRNO if there is
+   an error reading or writing the files. */
+int def(FILE *source, FILE *dest, int level)
+{
+
+Here are the local variables for def(). ret will be used for zlib +return codes. flush will keep track of the current flushing state for deflate(), +which is either no flushing, or flush to completion after the end of the input file is reached. +have is the amount of data returned from deflate(). The strm structure +is used to pass information to and from the zlib routines, and to maintain the +deflate() state. in and out are the input and output buffers for +deflate(). +

+    int ret, flush;
+    unsigned have;
+    z_stream strm;
+    unsigned char in[CHUNK];
+    unsigned char out[CHUNK];
+
+The first thing we do is to initialize the zlib state for compression using +deflateInit(). This must be done before the first use of deflate(). +The zalloc, zfree, and opaque fields in the strm +structure must be initialized before calling deflateInit(). Here they are +set to the zlib constant Z_NULL to request that zlib use +the default memory allocation routines. An application may also choose to provide +custom memory allocation routines here. deflateInit() will allocate on the +order of 256K bytes for the internal state. +(See zlib Technical Details.) +

+deflateInit() is called with a pointer to the structure to be initialized and +the compression level, which is an integer in the range of -1 to 9. Lower compression +levels result in faster execution, but less compression. Higher levels result in +greater compression, but slower execution. The zlib constant Z_DEFAULT_COMPRESSION, +equal to -1, +provides a good compromise between compression and speed and is equivalent to level 6. +Level 0 actually does no compression at all, and in fact expands the data slightly to produce +the zlib format (it is not a byte-for-byte copy of the input). +More advanced applications of zlib +may use deflateInit2() here instead. Such an application may want to reduce how +much memory will be used, at some price in compression. Or it may need to request a +gzip header and trailer instead of a zlib header and trailer, or raw +encoding with no header or trailer at all. +

+We must check the return value of deflateInit() against the zlib constant +Z_OK to make sure that it was able to +allocate memory for the internal state, and that the provided arguments were valid. +deflateInit() will also check that the version of zlib that the zlib.h +file came from matches the version of zlib actually linked with the program. This +is especially important for environments in which zlib is a shared library. +

+Note that an application can initialize multiple, independent zlib streams, which can +operate in parallel. The state information maintained in the structure allows the zlib +routines to be reentrant. +


+    /* allocate deflate state */
+    strm.zalloc = Z_NULL;
+    strm.zfree = Z_NULL;
+    strm.opaque = Z_NULL;
+    ret = deflateInit(&strm, level);
+    if (ret != Z_OK)
+        return ret;
+
+With the pleasantries out of the way, now we can get down to business. The outer do-loop +reads all of the input file and exits at the bottom of the loop once end-of-file is reached. +This loop contains the only call of deflate(). So we must make sure that all of the +input data has been processed and that all of the output data has been generated and consumed +before we fall out of the loop at the bottom. +

+    /* compress until end of file */
+    do {
+
+We start off by reading data from the input file. The number of bytes read is put directly +into avail_in, and a pointer to those bytes is put into next_in. We also +check to see if end-of-file on the input has been reached. If we are at the end of file, then flush is set to the +zlib constant Z_FINISH, which is later passed to deflate() to +indicate that this is the last chunk of input data to compress. We need to use feof() +to check for end-of-file as opposed to seeing if fewer than CHUNK bytes have been read. The +reason is that if the input file length is an exact multiple of CHUNK, we will miss +the fact that we got to the end-of-file, and not know to tell deflate() to finish +up the compressed stream. If we are not yet at the end of the input, then the zlib +constant Z_NO_FLUSH will be passed to deflate to indicate that we are still +in the middle of the uncompressed data. +

+If there is an error in reading from the input file, the process is aborted with +deflateEnd() being called to free the allocated zlib state before returning +the error. We wouldn't want a memory leak, now would we? deflateEnd() can be called +at any time after the state has been initialized. Once that's done, deflateInit() (or +deflateInit2()) would have to be called to start a new compression process. There is +no point here in checking the deflateEnd() return code. The deallocation can't fail. +


+        strm.avail_in = fread(in, 1, CHUNK, source);
+        if (ferror(source)) {
+            (void)deflateEnd(&strm);
+            return Z_ERRNO;
+        }
+        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
+        strm.next_in = in;
+
+The inner do-loop passes our chunk of input data to deflate(), and then +keeps calling deflate() until it is done producing output. Once there is no more +new output, deflate() is guaranteed to have consumed all of the input, i.e., +avail_in will be zero. +

+        /* run deflate() on input until output buffer not full, finish
+           compression if all of source has been read in */
+        do {
+
+Output space is provided to deflate() by setting avail_out to the number +of available output bytes and next_out to a pointer to that space. +

+            strm.avail_out = CHUNK;
+            strm.next_out = out;
+
+Now we call the compression engine itself, deflate(). It takes as many of the +avail_in bytes at next_in as it can process, and writes as many as +avail_out bytes to next_out. Those counters and pointers are then +updated past the input data consumed and the output data written. It is the amount of +output space available that may limit how much input is consumed. +Hence the inner loop to make sure that +all of the input is consumed by providing more output space each time. Since avail_in +and next_in are updated by deflate(), we don't have to mess with those +between deflate() calls until it's all used up. +

+The parameters to deflate() are a pointer to the strm structure containing +the input and output information and the internal compression engine state, and a parameter +indicating whether and how to flush data to the output. Normally deflate will consume +several K bytes of input data before producing any output (except for the header), in order +to accumulate statistics on the data for optimum compression. It will then put out a burst of +compressed data, and proceed to consume more input before the next burst. Eventually, +deflate() +must be told to terminate the stream, complete the compression with provided input data, and +write out the trailer check value. deflate() will continue to compress normally as long +as the flush parameter is Z_NO_FLUSH. Once the Z_FINISH parameter is provided, +deflate() will begin to complete the compressed output stream. However depending on how +much output space is provided, deflate() may have to be called several times until it +has provided the complete compressed stream, even after it has consumed all of the input. The flush +parameter must continue to be Z_FINISH for those subsequent calls. +

+There are other values of the flush parameter that are used in more advanced applications. You can +force deflate() to produce a burst of output that encodes all of the input data provided +so far, even if it wouldn't have otherwise, for example to control data latency on a link with +compressed data. You can also ask that deflate() do that as well as erase any history up to +that point so that what follows can be decompressed independently, for example for random access +applications. Both requests will degrade compression by an amount depending on how often such +requests are made. +

+deflate() has a return value that can indicate errors, yet we do not check it here. Why +not? Well, it turns out that deflate() can do no wrong here. Let's go through +deflate()'s return values and dispense with them one by one. The possible values are +Z_OK, Z_STREAM_END, Z_STREAM_ERROR, or Z_BUF_ERROR. Z_OK +is, well, ok. Z_STREAM_END is also ok and will be returned for the last call of +deflate(). This is already guaranteed by calling deflate() with Z_FINISH +until it has no more output. Z_STREAM_ERROR is only possible if the stream is not +initialized properly, but we did initialize it properly. There is no harm in checking for +Z_STREAM_ERROR here, for example to check for the possibility that some +other part of the application inadvertently clobbered the memory containing the zlib state. +Z_BUF_ERROR will be explained further below, but +suffice it to say that this is simply an indication that deflate() could not consume +more input or produce more output. deflate() can be called again with more output space +or more available input, which it will be in this code. +


+            ret = deflate(&strm, flush);    /* no bad return value */
+            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
+
+Now we compute how much output deflate() provided on the last call, which is the +difference between how much space was provided before the call, and how much output space +is still available after the call. Then that data, if any, is written to the output file. +We can then reuse the output buffer for the next call of deflate(). Again if there +is a file i/o error, we call deflateEnd() before returning to avoid a memory leak. +

+            have = CHUNK - strm.avail_out;
+            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+                (void)deflateEnd(&strm);
+                return Z_ERRNO;
+            }
+
+The inner do-loop is repeated until the last deflate() call fails to fill the +provided output buffer. Then we know that deflate() has done as much as it can with +the provided input, and that all of that input has been consumed. We can then fall out of this +loop and reuse the input buffer. +

+The way we tell that deflate() has no more output is by seeing that it did not fill +the output buffer, leaving avail_out greater than zero. However suppose that +deflate() has no more output, but just so happened to exactly fill the output buffer! +avail_out is zero, and we can't tell that deflate() has done all it can. +As far as we know, deflate() +has more output for us. So we call it again. But now deflate() produces no output +at all, and avail_out remains unchanged as CHUNK. That deflate() call +wasn't able to do anything, either consume input or produce output, and so it returns +Z_BUF_ERROR. (See, I told you I'd cover this later.) However this is not a problem at +all. Now we finally have the desired indication that deflate() is really done, +and so we drop out of the inner loop to provide more input to deflate(). +

+With flush set to Z_FINISH, this final set of deflate() calls will +complete the output stream. Once that is done, subsequent calls of deflate() would return +Z_STREAM_ERROR if the flush parameter is not Z_FINISH, and do no more processing +until the state is reinitialized. +

+Some applications of zlib have two loops that call deflate() +instead of the single inner loop we have here. The first loop would call +without flushing and feed all of the data to deflate(). The second loop would call +deflate() with no more +data and the Z_FINISH parameter to complete the process. As you can see from this +example, that can be avoided by simply keeping track of the current flush state. +


+        } while (strm.avail_out == 0);
+        assert(strm.avail_in == 0);     /* all input will be used */
+
+Now we check to see if we have already processed all of the input file. That information was +saved in the flush variable, so we see if that was set to Z_FINISH. If so, +then we're done and we fall out of the outer loop. We're guaranteed to get Z_STREAM_END +from the last deflate() call, since we ran it until the last chunk of input was +consumed and all of the output was generated. +

+        /* done when last data in file processed */
+    } while (flush != Z_FINISH);
+    assert(ret == Z_STREAM_END);        /* stream will be complete */
+
+The process is complete, but we still need to deallocate the state to avoid a memory leak +(or rather more like a memory hemorrhage if you didn't do this). Then +finally we can return with a happy return value. +

+    /* clean up and return */
+    (void)deflateEnd(&strm);
+    return Z_OK;
+}
+
+Now we do the same thing for decompression in the inf() routine. inf() +decompresses what is hopefully a valid zlib stream from the input file and writes the +uncompressed data to the output file. Much of the discussion above for def() +applies to inf() as well, so the discussion here will focus on the differences between +the two. +

+/* Decompress from file source to file dest until stream ends or EOF.
+   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
+   allocated for processing, Z_DATA_ERROR if the deflate data is
+   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
+   the version of the library linked do not match, or Z_ERRNO if there
+   is an error reading or writing the files. */
+int inf(FILE *source, FILE *dest)
+{
+
+The local variables have the same functionality as they do for def(). The +only difference is that there is no flush variable, since inflate() +can tell from the zlib stream itself when the stream is complete. +

+    int ret;
+    unsigned have;
+    z_stream strm;
+    unsigned char in[CHUNK];
+    unsigned char out[CHUNK];
+
+The initialization of the state is the same, except that there is no compression level, +of course, and two more elements of the structure are initialized. avail_in +and next_in must be initialized before calling inflateInit(). This +is because the application has the option to provide the start of the zlib stream in +order for inflateInit() to have access to information about the compression +method to aid in memory allocation. In the current implementation of zlib +(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of +inflate() anyway. However those fields must be initialized since later versions +of zlib that provide more compression methods may take advantage of this interface. +In any case, no decompression is performed by inflateInit(), so the +avail_out and next_out fields do not need to be initialized before calling. +

+Here avail_in is set to zero and next_in is set to Z_NULL to +indicate that no input data is being provided. +


+    /* allocate inflate state */
+    strm.zalloc = Z_NULL;
+    strm.zfree = Z_NULL;
+    strm.opaque = Z_NULL;
+    strm.avail_in = 0;
+    strm.next_in = Z_NULL;
+    ret = inflateInit(&strm);
+    if (ret != Z_OK)
+        return ret;
+
+The outer do-loop decompresses input until inflate() indicates +that it has reached the end of the compressed data and has produced all of the uncompressed +output. This is in contrast to def() which processes all of the input file. +If end-of-file is reached before the compressed data self-terminates, then the compressed +data is incomplete and an error is returned. +

+    /* decompress until deflate stream ends or end of file */
+    do {
+
+We read input data and set the strm structure accordingly. If we've reached the +end of the input file, then we leave the outer loop and report an error, since the +compressed data is incomplete. Note that we may read more data than is eventually consumed +by inflate(), if the input file continues past the zlib stream. +For applications where zlib streams are embedded in other data, this routine would +need to be modified to return the unused data, or at least indicate how much of the input +data was not used, so the application would know where to pick up after the zlib stream. +

+        strm.avail_in = fread(in, 1, CHUNK, source);
+        if (ferror(source)) {
+            (void)inflateEnd(&strm);
+            return Z_ERRNO;
+        }
+        if (strm.avail_in == 0)
+            break;
+        strm.next_in = in;
+
+The inner do-loop has the same function it did in def(), which is to +keep calling inflate() until has generated all of the output it can with the +provided input. +

+        /* run inflate() on input until output buffer not full */
+        do {
+
+Just like in def(), the same output space is provided for each call of inflate(). +

+            strm.avail_out = CHUNK;
+            strm.next_out = out;
+
+Now we run the decompression engine itself. There is no need to adjust the flush parameter, since +the zlib format is self-terminating. The main difference here is that there are +return values that we need to pay attention to. Z_DATA_ERROR +indicates that inflate() detected an error in the zlib compressed data format, +which means that either the data is not a zlib stream to begin with, or that the data was +corrupted somewhere along the way since it was compressed. The other error to be processed is +Z_MEM_ERROR, which can occur since memory allocation is deferred until inflate() +needs it, unlike deflate(), whose memory is allocated at the start by deflateInit(). +

+Advanced applications may use +deflateSetDictionary() to prime deflate() with a set of likely data to improve the +first 32K or so of compression. This is noted in the zlib header, so inflate() +requests that that dictionary be provided before it can start to decompress. Without the dictionary, +correct decompression is not possible. For this routine, we have no idea what the dictionary is, +so the Z_NEED_DICT indication is converted to a Z_DATA_ERROR. +

+inflate() can also return Z_STREAM_ERROR, which should not be possible here, +but could be checked for as noted above for def(). Z_BUF_ERROR does not need to be +checked for here, for the same reasons noted for def(). Z_STREAM_END will be +checked for later. +


+            ret = inflate(&strm, Z_NO_FLUSH);
+            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
+            switch (ret) {
+            case Z_NEED_DICT:
+                ret = Z_DATA_ERROR;     /* and fall through */
+            case Z_DATA_ERROR:
+            case Z_MEM_ERROR:
+                (void)inflateEnd(&strm);
+                return ret;
+            }
+
+The output of inflate() is handled identically to that of deflate(). +

+            have = CHUNK - strm.avail_out;
+            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+                (void)inflateEnd(&strm);
+                return Z_ERRNO;
+            }
+
+The inner do-loop ends when inflate() has no more output as indicated +by not filling the output buffer, just as for deflate(). In this case, we cannot +assert that strm.avail_in will be zero, since the deflate stream may end before the file +does. +

+        } while (strm.avail_out == 0);
+
+The outer do-loop ends when inflate() reports that it has reached the +end of the input zlib stream, has completed the decompression and integrity +check, and has provided all of the output. This is indicated by the inflate() +return value Z_STREAM_END. The inner loop is guaranteed to leave ret +equal to Z_STREAM_END if the last chunk of the input file read contained the end +of the zlib stream. So if the return value is not Z_STREAM_END, the +loop continues to read more input. +

+        /* done when inflate() says it's done */
+    } while (ret != Z_STREAM_END);
+
+At this point, decompression successfully completed, or we broke out of the loop due to no +more data being available from the input file. If the last inflate() return value +is not Z_STREAM_END, then the zlib stream was incomplete and a data error +is returned. Otherwise, we return with a happy return value. Of course, inflateEnd() +is called first to avoid a memory leak. +

+    /* clean up and return */
+    (void)inflateEnd(&strm);
+    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
+}
+
+That ends the routines that directly use zlib. The following routines make this +a command-line program by running data through the above routines from stdin to +stdout, and handling any errors reported by def() or inf(). +

+zerr() is used to interpret the possible error codes from def() +and inf(), as detailed in their comments above, and print out an error message. +Note that these are only a subset of the possible return values from deflate() +and inflate(). +


+/* report a zlib or i/o error */
+void zerr(int ret)
+{
+    fputs("zpipe: ", stderr);
+    switch (ret) {
+    case Z_ERRNO:
+        if (ferror(stdin))
+            fputs("error reading stdin\n", stderr);
+        if (ferror(stdout))
+            fputs("error writing stdout\n", stderr);
+        break;
+    case Z_STREAM_ERROR:
+        fputs("invalid compression level\n", stderr);
+        break;
+    case Z_DATA_ERROR:
+        fputs("invalid or incomplete deflate data\n", stderr);
+        break;
+    case Z_MEM_ERROR:
+        fputs("out of memory\n", stderr);
+        break;
+    case Z_VERSION_ERROR:
+        fputs("zlib version mismatch!\n", stderr);
+    }
+}
+
+Here is the main() routine used to test def() and inf(). The +zpipe command is simply a compression pipe from stdin to stdout, if +no arguments are given, or it is a decompression pipe if zpipe -d is used. If any other +arguments are provided, no compression or decompression is performed. Instead a usage +message is displayed. Examples are zpipe < foo.txt > foo.txt.z to compress, and +zpipe -d < foo.txt.z > foo.txt to decompress. +

+/* compress or decompress from stdin to stdout */
+int main(int argc, char **argv)
+{
+    int ret;
+
+    /* avoid end-of-line conversions */
+    SET_BINARY_MODE(stdin);
+    SET_BINARY_MODE(stdout);
+
+    /* do compression if no arguments */
+    if (argc == 1) {
+        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
+        if (ret != Z_OK)
+            zerr(ret);
+        return ret;
+    }
+
+    /* do decompression if -d specified */
+    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
+        ret = inf(stdin, stdout);
+        if (ret != Z_OK)
+            zerr(ret);
+        return ret;
+    }
+
+    /* otherwise, report usage */
+    else {
+        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
+        return 1;
+    }
+}
+
+
+Copyright (c) 2004, 2005 by Mark Adler
Last modified 11 December 2005
+ + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zpipe.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zpipe.c new file mode 100644 index 000000000..83535d169 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zpipe.c @@ -0,0 +1,205 @@ +/* zpipe.c: example of proper use of zlib's inflate() and deflate() + Not copyrighted -- provided to the public domain + Version 1.4 11 December 2005 Mark Adler */ + +/* Version history: + 1.0 30 Oct 2004 First version + 1.1 8 Nov 2004 Add void casting for unused return values + Use switch statement for inflate() return values + 1.2 9 Nov 2004 Add assertions to document zlib guarantees + 1.3 6 Apr 2005 Remove incorrect assertion in inf() + 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions + Avoid some compiler warnings for input and output buffers + */ + +#include +#include +#include +#include "zlib.h" + +#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) +# include +# include +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + +#define CHUNK 16384 + +/* Compress from file source to file dest until EOF on source. + def() returns Z_OK on success, Z_MEM_ERROR if memory could not be + allocated for processing, Z_STREAM_ERROR if an invalid compression + level is supplied, Z_VERSION_ERROR if the version of zlib.h and the + version of the library linked do not match, or Z_ERRNO if there is + an error reading or writing the files. */ +int def(FILE *source, FILE *dest, int level) +{ + int ret, flush; + unsigned have; + z_stream strm; + unsigned char in[CHUNK]; + unsigned char out[CHUNK]; + + /* allocate deflate state */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + ret = deflateInit(&strm, level); + if (ret != Z_OK) + return ret; + + /* compress until end of file */ + do { + strm.avail_in = fread(in, 1, CHUNK, source); + if (ferror(source)) { + (void)deflateEnd(&strm); + return Z_ERRNO; + } + flush = feof(source) ? Z_FINISH : Z_NO_FLUSH; + strm.next_in = in; + + /* run deflate() on input until output buffer not full, finish + compression if all of source has been read in */ + do { + strm.avail_out = CHUNK; + strm.next_out = out; + ret = deflate(&strm, flush); /* no bad return value */ + assert(ret != Z_STREAM_ERROR); /* state not clobbered */ + have = CHUNK - strm.avail_out; + if (fwrite(out, 1, have, dest) != have || ferror(dest)) { + (void)deflateEnd(&strm); + return Z_ERRNO; + } + } while (strm.avail_out == 0); + assert(strm.avail_in == 0); /* all input will be used */ + + /* done when last data in file processed */ + } while (flush != Z_FINISH); + assert(ret == Z_STREAM_END); /* stream will be complete */ + + /* clean up and return */ + (void)deflateEnd(&strm); + return Z_OK; +} + +/* Decompress from file source to file dest until stream ends or EOF. + inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be + allocated for processing, Z_DATA_ERROR if the deflate data is + invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and + the version of the library linked do not match, or Z_ERRNO if there + is an error reading or writing the files. */ +int inf(FILE *source, FILE *dest) +{ + int ret; + unsigned have; + z_stream strm; + unsigned char in[CHUNK]; + unsigned char out[CHUNK]; + + /* allocate inflate state */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit(&strm); + if (ret != Z_OK) + return ret; + + /* decompress until deflate stream ends or end of file */ + do { + strm.avail_in = fread(in, 1, CHUNK, source); + if (ferror(source)) { + (void)inflateEnd(&strm); + return Z_ERRNO; + } + if (strm.avail_in == 0) + break; + strm.next_in = in; + + /* run inflate() on input until output buffer not full */ + do { + strm.avail_out = CHUNK; + strm.next_out = out; + ret = inflate(&strm, Z_NO_FLUSH); + assert(ret != Z_STREAM_ERROR); /* state not clobbered */ + switch (ret) { + case Z_NEED_DICT: + ret = Z_DATA_ERROR; /* and fall through */ + case Z_DATA_ERROR: + case Z_MEM_ERROR: + (void)inflateEnd(&strm); + return ret; + } + have = CHUNK - strm.avail_out; + if (fwrite(out, 1, have, dest) != have || ferror(dest)) { + (void)inflateEnd(&strm); + return Z_ERRNO; + } + } while (strm.avail_out == 0); + + /* done when inflate() says it's done */ + } while (ret != Z_STREAM_END); + + /* clean up and return */ + (void)inflateEnd(&strm); + return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; +} + +/* report a zlib or i/o error */ +void zerr(int ret) +{ + fputs("zpipe: ", stderr); + switch (ret) { + case Z_ERRNO: + if (ferror(stdin)) + fputs("error reading stdin\n", stderr); + if (ferror(stdout)) + fputs("error writing stdout\n", stderr); + break; + case Z_STREAM_ERROR: + fputs("invalid compression level\n", stderr); + break; + case Z_DATA_ERROR: + fputs("invalid or incomplete deflate data\n", stderr); + break; + case Z_MEM_ERROR: + fputs("out of memory\n", stderr); + break; + case Z_VERSION_ERROR: + fputs("zlib version mismatch!\n", stderr); + } +} + +/* compress or decompress from stdin to stdout */ +int main(int argc, char **argv) +{ + int ret; + + /* avoid end-of-line conversions */ + SET_BINARY_MODE(stdin); + SET_BINARY_MODE(stdout); + + /* do compression if no arguments */ + if (argc == 1) { + ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); + if (ret != Z_OK) + zerr(ret); + return ret; + } + + /* do decompression if -d specified */ + else if (argc == 2 && strcmp(argv[1], "-d") == 0) { + ret = inf(stdin, stdout); + if (ret != Z_OK) + zerr(ret); + return ret; + } + + /* otherwise, report usage */ + else { + fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr); + return 1; + } +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zran.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zran.c new file mode 100644 index 000000000..4fec6594a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/examples/zran.c @@ -0,0 +1,409 @@ +/* zran.c -- example of zlib/gzip stream indexing and random access + * Copyright (C) 2005, 2012 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + Version 1.1 29 Sep 2012 Mark Adler */ + +/* Version History: + 1.0 29 May 2005 First version + 1.1 29 Sep 2012 Fix memory reallocation error + */ + +/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() + for random access of a compressed file. A file containing a zlib or gzip + stream is provided on the command line. The compressed stream is decoded in + its entirety, and an index built with access points about every SPAN bytes + in the uncompressed output. The compressed file is left open, and can then + be read randomly, having to decompress on the average SPAN/2 uncompressed + bytes before getting to the desired block of data. + + An access point can be created at the start of any deflate block, by saving + the starting file offset and bit of that block, and the 32K bytes of + uncompressed data that precede that block. Also the uncompressed offset of + that block is saved to provide a referece for locating a desired starting + point in the uncompressed stream. build_index() works by decompressing the + input zlib or gzip stream a block at a time, and at the end of each block + deciding if enough uncompressed data has gone by to justify the creation of + a new access point. If so, that point is saved in a data structure that + grows as needed to accommodate the points. + + To use the index, an offset in the uncompressed data is provided, for which + the latest access point at or preceding that offset is located in the index. + The input file is positioned to the specified location in the index, and if + necessary the first few bits of the compressed data is read from the file. + inflate is initialized with those bits and the 32K of uncompressed data, and + the decompression then proceeds until the desired offset in the file is + reached. Then the decompression continues to read the desired uncompressed + data from the file. + + Another approach would be to generate the index on demand. In that case, + requests for random access reads from the compressed data would try to use + the index, but if a read far enough past the end of the index is required, + then further index entries would be generated and added. + + There is some fair bit of overhead to starting inflation for the random + access, mainly copying the 32K byte dictionary. So if small pieces of the + file are being accessed, it would make sense to implement a cache to hold + some lookahead and avoid many calls to extract() for small lengths. + + Another way to build an index would be to use inflateCopy(). That would + not be constrained to have access points at block boundaries, but requires + more memory per access point, and also cannot be saved to file due to the + use of pointers in the state. The approach here allows for storage of the + index in a file. + */ + +#include +#include +#include +#include "zlib.h" + +#define local static + +#define SPAN 1048576L /* desired distance between access points */ +#define WINSIZE 32768U /* sliding window size */ +#define CHUNK 16384 /* file input buffer size */ + +/* access point entry */ +struct point { + off_t out; /* corresponding offset in uncompressed data */ + off_t in; /* offset in input file of first full byte */ + int bits; /* number of bits (1-7) from byte at in - 1, or 0 */ + unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */ +}; + +/* access point list */ +struct access { + int have; /* number of list entries filled in */ + int size; /* number of list entries allocated */ + struct point *list; /* allocated list */ +}; + +/* Deallocate an index built by build_index() */ +local void free_index(struct access *index) +{ + if (index != NULL) { + free(index->list); + free(index); + } +} + +/* Add an entry to the access point list. If out of memory, deallocate the + existing list and return NULL. */ +local struct access *addpoint(struct access *index, int bits, + off_t in, off_t out, unsigned left, unsigned char *window) +{ + struct point *next; + + /* if list is empty, create it (start with eight points) */ + if (index == NULL) { + index = malloc(sizeof(struct access)); + if (index == NULL) return NULL; + index->list = malloc(sizeof(struct point) << 3); + if (index->list == NULL) { + free(index); + return NULL; + } + index->size = 8; + index->have = 0; + } + + /* if list is full, make it bigger */ + else if (index->have == index->size) { + index->size <<= 1; + next = realloc(index->list, sizeof(struct point) * index->size); + if (next == NULL) { + free_index(index); + return NULL; + } + index->list = next; + } + + /* fill in entry and increment how many we have */ + next = index->list + index->have; + next->bits = bits; + next->in = in; + next->out = out; + if (left) + memcpy(next->window, window + WINSIZE - left, left); + if (left < WINSIZE) + memcpy(next->window + left, window, WINSIZE - left); + index->have++; + + /* return list, possibly reallocated */ + return index; +} + +/* Make one entire pass through the compressed stream and build an index, with + access points about every span bytes of uncompressed output -- span is + chosen to balance the speed of random access against the memory requirements + of the list, about 32K bytes per access point. Note that data after the end + of the first zlib or gzip stream in the file is ignored. build_index() + returns the number of access points on success (>= 1), Z_MEM_ERROR for out + of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a + file read error. On success, *built points to the resulting index. */ +local int build_index(FILE *in, off_t span, struct access **built) +{ + int ret; + off_t totin, totout; /* our own total counters to avoid 4GB limit */ + off_t last; /* totout value of last access point */ + struct access *index; /* access points being generated */ + z_stream strm; + unsigned char input[CHUNK]; + unsigned char window[WINSIZE]; + + /* initialize inflate */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */ + if (ret != Z_OK) + return ret; + + /* inflate the input, maintain a sliding window, and build an index -- this + also validates the integrity of the compressed data using the check + information at the end of the gzip or zlib stream */ + totin = totout = last = 0; + index = NULL; /* will be allocated by first addpoint() */ + strm.avail_out = 0; + do { + /* get some compressed data from input file */ + strm.avail_in = fread(input, 1, CHUNK, in); + if (ferror(in)) { + ret = Z_ERRNO; + goto build_index_error; + } + if (strm.avail_in == 0) { + ret = Z_DATA_ERROR; + goto build_index_error; + } + strm.next_in = input; + + /* process all of that, or until end of stream */ + do { + /* reset sliding window if necessary */ + if (strm.avail_out == 0) { + strm.avail_out = WINSIZE; + strm.next_out = window; + } + + /* inflate until out of input, output, or at end of block -- + update the total input and output counters */ + totin += strm.avail_in; + totout += strm.avail_out; + ret = inflate(&strm, Z_BLOCK); /* return at end of block */ + totin -= strm.avail_in; + totout -= strm.avail_out; + if (ret == Z_NEED_DICT) + ret = Z_DATA_ERROR; + if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) + goto build_index_error; + if (ret == Z_STREAM_END) + break; + + /* if at end of block, consider adding an index entry (note that if + data_type indicates an end-of-block, then all of the + uncompressed data from that block has been delivered, and none + of the compressed data after that block has been consumed, + except for up to seven bits) -- the totout == 0 provides an + entry point after the zlib or gzip header, and assures that the + index always has at least one access point; we avoid creating an + access point after the last block by checking bit 6 of data_type + */ + if ((strm.data_type & 128) && !(strm.data_type & 64) && + (totout == 0 || totout - last > span)) { + index = addpoint(index, strm.data_type & 7, totin, + totout, strm.avail_out, window); + if (index == NULL) { + ret = Z_MEM_ERROR; + goto build_index_error; + } + last = totout; + } + } while (strm.avail_in != 0); + } while (ret != Z_STREAM_END); + + /* clean up and return index (release unused entries in list) */ + (void)inflateEnd(&strm); + index->list = realloc(index->list, sizeof(struct point) * index->have); + index->size = index->have; + *built = index; + return index->size; + + /* return error */ + build_index_error: + (void)inflateEnd(&strm); + if (index != NULL) + free_index(index); + return ret; +} + +/* Use the index to read len bytes from offset into buf, return bytes read or + negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past + the end of the uncompressed data, then extract() will return a value less + than len, indicating how much as actually read into buf. This function + should not return a data error unless the file was modified since the index + was generated. extract() may also return Z_ERRNO if there is an error on + reading or seeking the input file. */ +local int extract(FILE *in, struct access *index, off_t offset, + unsigned char *buf, int len) +{ + int ret, skip; + z_stream strm; + struct point *here; + unsigned char input[CHUNK]; + unsigned char discard[WINSIZE]; + + /* proceed only if something reasonable to do */ + if (len < 0) + return 0; + + /* find where in stream to start */ + here = index->list; + ret = index->have; + while (--ret && here[1].out <= offset) + here++; + + /* initialize file and inflate state to start there */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, -15); /* raw inflate */ + if (ret != Z_OK) + return ret; + ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET); + if (ret == -1) + goto extract_ret; + if (here->bits) { + ret = getc(in); + if (ret == -1) { + ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR; + goto extract_ret; + } + (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits)); + } + (void)inflateSetDictionary(&strm, here->window, WINSIZE); + + /* skip uncompressed bytes until offset reached, then satisfy request */ + offset -= here->out; + strm.avail_in = 0; + skip = 1; /* while skipping to offset */ + do { + /* define where to put uncompressed data, and how much */ + if (offset == 0 && skip) { /* at offset now */ + strm.avail_out = len; + strm.next_out = buf; + skip = 0; /* only do this once */ + } + if (offset > WINSIZE) { /* skip WINSIZE bytes */ + strm.avail_out = WINSIZE; + strm.next_out = discard; + offset -= WINSIZE; + } + else if (offset != 0) { /* last skip */ + strm.avail_out = (unsigned)offset; + strm.next_out = discard; + offset = 0; + } + + /* uncompress until avail_out filled, or end of stream */ + do { + if (strm.avail_in == 0) { + strm.avail_in = fread(input, 1, CHUNK, in); + if (ferror(in)) { + ret = Z_ERRNO; + goto extract_ret; + } + if (strm.avail_in == 0) { + ret = Z_DATA_ERROR; + goto extract_ret; + } + strm.next_in = input; + } + ret = inflate(&strm, Z_NO_FLUSH); /* normal inflate */ + if (ret == Z_NEED_DICT) + ret = Z_DATA_ERROR; + if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) + goto extract_ret; + if (ret == Z_STREAM_END) + break; + } while (strm.avail_out != 0); + + /* if reach end of stream, then don't keep trying to get more */ + if (ret == Z_STREAM_END) + break; + + /* do until offset reached and requested data read, or stream ends */ + } while (skip); + + /* compute number of uncompressed bytes read after offset */ + ret = skip ? 0 : len - strm.avail_out; + + /* clean up and return bytes read or error */ + extract_ret: + (void)inflateEnd(&strm); + return ret; +} + +/* Demonstrate the use of build_index() and extract() by processing the file + provided on the command line, and the extracting 16K from about 2/3rds of + the way through the uncompressed output, and writing that to stdout. */ +int main(int argc, char **argv) +{ + int len; + off_t offset; + FILE *in; + struct access *index = NULL; + unsigned char buf[CHUNK]; + + /* open input file */ + if (argc != 2) { + fprintf(stderr, "usage: zran file.gz\n"); + return 1; + } + in = fopen(argv[1], "rb"); + if (in == NULL) { + fprintf(stderr, "zran: could not open %s for reading\n", argv[1]); + return 1; + } + + /* build index */ + len = build_index(in, SPAN, &index); + if (len < 0) { + fclose(in); + switch (len) { + case Z_MEM_ERROR: + fprintf(stderr, "zran: out of memory\n"); + break; + case Z_DATA_ERROR: + fprintf(stderr, "zran: compressed data error in %s\n", argv[1]); + break; + case Z_ERRNO: + fprintf(stderr, "zran: read error on %s\n", argv[1]); + break; + default: + fprintf(stderr, "zran: error %d while building index\n", len); + } + return 1; + } + fprintf(stderr, "zran: built index with %d access points\n", len); + + /* use index by reading some bytes from an arbitrary offset */ + offset = (index->list[index->have - 1].out << 1) / 3; + len = extract(in, index, offset, buf, CHUNK); + if (len < 0) + fprintf(stderr, "zran: extraction failed: %s error\n", + len == Z_MEM_ERROR ? "out of memory" : "input corrupted"); + else { + fwrite(buf, 1, len, stdout); + fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset); + } + + /* clean up and exit */ + free_index(index); + fclose(in); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzclose.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzclose.c new file mode 100644 index 000000000..caeb99a31 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzclose.c @@ -0,0 +1,25 @@ +/* gzclose.c -- zlib gzclose() function + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* gzclose() is in a separate file so that it is linked in only if it is used. + That way the other gzclose functions can be used instead to avoid linking in + unneeded compression or decompression routines. */ +int ZEXPORT gzclose(file) + gzFile file; +{ +#ifndef NO_GZCOMPRESS + gz_statep state; + + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); +#else + return gzclose_r(file); +#endif +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzguts.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzguts.h new file mode 100644 index 000000000..990a4d251 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzguts.h @@ -0,0 +1,218 @@ +/* gzguts.h -- zlib internal header definitions for gz* operations + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifdef _LARGEFILE64_SOURCE +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 +# endif +# ifdef _FILE_OFFSET_BITS +# undef _FILE_OFFSET_BITS +# endif +#endif + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include +#include "zlib.h" +#ifdef STDC +# include +# include +# include +#endif + +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif +#include + +#ifdef _WIN32 +# include +#endif + +#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) +# include +#endif + +#if defined(_WIN32) || defined(__CYGWIN__) +# define WIDECHAR +#endif + +#ifdef WINAPI_FAMILY +# define open _open +# define read _read +# define write _write +# define close _close +#endif + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(__CYGWIN__) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#ifndef HAVE_VSNPRINTF +# ifdef MSDOS +/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), + but for now we just assume it doesn't. */ +# define NO_vsnprintf +# endif +# ifdef __TURBOC__ +# define NO_vsnprintf +# endif +# ifdef WIN32 +/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ +# if !defined(vsnprintf) && !defined(NO_vsnprintf) +# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) +# define vsnprintf _vsnprintf +# endif +# endif +# endif +# ifdef __SASC +# define NO_vsnprintf +# endif +# ifdef VMS +# define NO_vsnprintf +# endif +# ifdef __OS400__ +# define NO_vsnprintf +# endif +# ifdef __MVS__ +# define NO_vsnprintf +# endif +#endif + +/* unlike snprintf (which is required in C99), _snprintf does not guarantee + null termination of the result -- however this is only used in gzlib.c where + the result is assured to fit in the space provided */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +# define snprintf _snprintf +#endif + +#ifndef local +# define local static +#endif +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ + +/* gz* functions always use library allocation functions */ +#ifndef STDC + extern voidp malloc OF((uInt size)); + extern void free OF((voidpf ptr)); +#endif + +/* get errno and strerror definition */ +#if defined UNDER_CE +# include +# define zstrerror() gz_strwinerror((DWORD)GetLastError()) +#else +# ifndef NO_STRERROR +# include +# define zstrerror() strerror(errno) +# else +# define zstrerror() "stdio error (consult errno)" +# endif +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); +#endif + +/* default memLevel */ +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif + +/* default i/o buffer size -- double this for output when reading (this and + twice this must be able to fit in an unsigned type) */ +#define GZBUFSIZE 8192 + +/* gzip modes, also provide a little integrity check on the passed structure */ +#define GZ_NONE 0 +#define GZ_READ 7247 +#define GZ_WRITE 31153 +#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ + +/* values for gz_state how */ +#define LOOK 0 /* look for a gzip header */ +#define COPY 1 /* copy input directly */ +#define GZIP 2 /* decompress a gzip stream */ + +/* internal gzip file state data structure */ +typedef struct { + /* exposed contents for gzgetc() macro */ + struct gzFile_s x; /* "x" for exposed */ + /* x.have: number of bytes available at x.next */ + /* x.next: next output data to deliver or write */ + /* x.pos: current position in uncompressed data */ + /* used for both reading and writing */ + int mode; /* see gzip modes above */ + int fd; /* file descriptor */ + char *path; /* path or fd for error messages */ + unsigned size; /* buffer size, zero if not allocated yet */ + unsigned want; /* requested buffer size, default is GZBUFSIZE */ + unsigned char *in; /* input buffer (double-sized when writing) */ + unsigned char *out; /* output buffer (double-sized when reading) */ + int direct; /* 0 if processing gzip, 1 if transparent */ + /* just for reading */ + int how; /* 0: get header, 1: copy, 2: decompress */ + z_off64_t start; /* where the gzip data started, for rewinding */ + int eof; /* true if end of input file reached */ + int past; /* true if read requested past end */ + /* just for writing */ + int level; /* compression level */ + int strategy; /* compression strategy */ + /* seek request */ + z_off64_t skip; /* amount to skip (already rewound if backwards) */ + int seek; /* true if seek request pending */ + /* error information */ + int err; /* error code */ + char *msg; /* error message */ + /* zlib inflate or deflate stream */ + z_stream strm; /* stream structure in-place (not a pointer) */ +} gz_state; +typedef gz_state FAR *gz_statep; + +/* shared functions */ +void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +#if defined UNDER_CE +char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); +#endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +#ifdef INT_MAX +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) +#else +unsigned ZLIB_INTERNAL gz_intmax OF((void)); +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzlib.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzlib.c new file mode 100644 index 000000000..4105e6aff --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzlib.c @@ -0,0 +1,637 @@ +/* gzlib.c -- zlib functions common to reading and writing gzip files + * Copyright (C) 2004-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) +# define LSEEK _lseeki64 +#else +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define LSEEK lseek64 +#else +# define LSEEK lseek +#endif +#endif + +/* Local functions */ +local void gz_reset OF((gz_statep)); +local gzFile gz_open OF((const void *, int, const char *)); + +#if defined UNDER_CE + +/* Map the Windows error number in ERROR to a locale-dependent error message + string and return a pointer to it. Typically, the values for ERROR come + from GetLastError. + + The string pointed to shall not be modified by the application, but may be + overwritten by a subsequent call to gz_strwinerror + + The gz_strwinerror function does not change the current setting of + GetLastError. */ +char ZLIB_INTERNAL *gz_strwinerror (error) + DWORD error; +{ + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +#endif /* UNDER_CE */ + +/* Reset gzip file state */ +local void gz_reset(state) + gz_statep state; +{ + state->x.have = 0; /* no output data available */ + if (state->mode == GZ_READ) { /* for reading ... */ + state->eof = 0; /* not at end of file */ + state->past = 0; /* have not read past end yet */ + state->how = LOOK; /* look for gzip header */ + } + state->seek = 0; /* no seek request pending */ + gz_error(state, Z_OK, NULL); /* clear error */ + state->x.pos = 0; /* no uncompressed data yet */ + state->strm.avail_in = 0; /* no input data yet */ +} + +/* Open a gzip file either by name or file descriptor. */ +local gzFile gz_open(path, fd, mode) + const void *path; + int fd; + const char *mode; +{ + gz_statep state; + z_size_t len; + int oflag; +#ifdef O_CLOEXEC + int cloexec = 0; +#endif +#ifdef O_EXCL + int exclusive = 0; +#endif + + /* check input */ + if (path == NULL) + return NULL; + + /* allocate gzFile structure to return */ + state = (gz_statep)malloc(sizeof(gz_state)); + if (state == NULL) + return NULL; + state->size = 0; /* no buffers allocated yet */ + state->want = GZBUFSIZE; /* requested buffer size */ + state->msg = NULL; /* no error message yet */ + + /* interpret mode */ + state->mode = GZ_NONE; + state->level = Z_DEFAULT_COMPRESSION; + state->strategy = Z_DEFAULT_STRATEGY; + state->direct = 0; + while (*mode) { + if (*mode >= '0' && *mode <= '9') + state->level = *mode - '0'; + else + switch (*mode) { + case 'r': + state->mode = GZ_READ; + break; +#ifndef NO_GZCOMPRESS + case 'w': + state->mode = GZ_WRITE; + break; + case 'a': + state->mode = GZ_APPEND; + break; +#endif + case '+': /* can't read and write at the same time */ + free(state); + return NULL; + case 'b': /* ignore -- will request binary anyway */ + break; +#ifdef O_CLOEXEC + case 'e': + cloexec = 1; + break; +#endif +#ifdef O_EXCL + case 'x': + exclusive = 1; + break; +#endif + case 'f': + state->strategy = Z_FILTERED; + break; + case 'h': + state->strategy = Z_HUFFMAN_ONLY; + break; + case 'R': + state->strategy = Z_RLE; + break; + case 'F': + state->strategy = Z_FIXED; + break; + case 'T': + state->direct = 1; + break; + default: /* could consider as an error, but just ignore */ + ; + } + mode++; + } + + /* must provide an "r", "w", or "a" */ + if (state->mode == GZ_NONE) { + free(state); + return NULL; + } + + /* can't force transparent read */ + if (state->mode == GZ_READ) { + if (state->direct) { + free(state); + return NULL; + } + state->direct = 1; /* for empty file */ + } + + /* save the path name for error messages */ +#ifdef WIDECHAR + if (fd == -2) { + len = wcstombs(NULL, path, 0); + if (len == (z_size_t)-1) + len = 0; + } + else +#endif + len = strlen((const char *)path); + state->path = (char *)malloc(len + 1); + if (state->path == NULL) { + free(state); + return NULL; + } +#ifdef WIDECHAR + if (fd == -2) + if (len) + wcstombs(state->path, path, len + 1); + else + *(state->path) = 0; + else +#endif +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(state->path, len + 1, "%s", (const char *)path); +#else + strcpy(state->path, path); +#endif + + /* compute the flags for open() */ + oflag = +#ifdef O_LARGEFILE + O_LARGEFILE | +#endif +#ifdef O_BINARY + O_BINARY | +#endif +#ifdef O_CLOEXEC + (cloexec ? O_CLOEXEC : 0) | +#endif + (state->mode == GZ_READ ? + O_RDONLY : + (O_WRONLY | O_CREAT | +#ifdef O_EXCL + (exclusive ? O_EXCL : 0) | +#endif + (state->mode == GZ_WRITE ? + O_TRUNC : + O_APPEND))); + + /* open the file with the appropriate flags (or just use fd) */ + state->fd = fd > -1 ? fd : ( +#ifdef WIDECHAR + fd == -2 ? _wopen(path, oflag, 0666) : +#endif + open((const char *)path, oflag, 0666)); + if (state->fd == -1) { + free(state->path); + free(state); + return NULL; + } + if (state->mode == GZ_APPEND) { + LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ + state->mode = GZ_WRITE; /* simplify later checks */ + } + + /* save the current position for rewinding (only if reading) */ + if (state->mode == GZ_READ) { + state->start = LSEEK(state->fd, 0, SEEK_CUR); + if (state->start == -1) state->start = 0; + } + + /* initialize stream */ + gz_reset(state); + + /* return stream */ + return (gzFile)state; +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen64(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzdopen(fd, mode) + int fd; + const char *mode; +{ + char *path; /* identifier for error messages */ + gzFile gz; + + if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) + return NULL; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(path, 7 + 3 * sizeof(int), "", fd); +#else + sprintf(path, "", fd); /* for debugging */ +#endif + gz = gz_open(path, fd, mode); + free(path); + return gz; +} + +/* -- see zlib.h -- */ +#ifdef WIDECHAR +gzFile ZEXPORT gzopen_w(path, mode) + const wchar_t *path; + const char *mode; +{ + return gz_open(path, -2, mode); +} +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzbuffer(file, size) + gzFile file; + unsigned size; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* make sure we haven't already allocated memory */ + if (state->size != 0) + return -1; + + /* check and set requested size */ + if ((size << 1) < size) + return -1; /* need to be able to double it */ + if (size < 2) + size = 2; /* need two bytes to check magic header */ + state->want = size; + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzrewind(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* back up and start over */ + if (LSEEK(state->fd, state->start, SEEK_SET) == -1) + return -1; + gz_reset(state); + return 0; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzseek64(file, offset, whence) + gzFile file; + z_off64_t offset; + int whence; +{ + unsigned n; + z_off64_t ret; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* check that there's no error */ + if (state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + + /* can only seek from start or relative to current position */ + if (whence != SEEK_SET && whence != SEEK_CUR) + return -1; + + /* normalize offset to a SEEK_CUR specification */ + if (whence == SEEK_SET) + offset -= state->x.pos; + else if (state->seek) + offset += state->skip; + state->seek = 0; + + /* if within raw area while reading, just go there */ + if (state->mode == GZ_READ && state->how == COPY && + state->x.pos + offset >= 0) { + ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); + if (ret == -1) + return -1; + state->x.have = 0; + state->eof = 0; + state->past = 0; + state->seek = 0; + gz_error(state, Z_OK, NULL); + state->strm.avail_in = 0; + state->x.pos += offset; + return state->x.pos; + } + + /* calculate skip amount, rewinding if needed for back seek when reading */ + if (offset < 0) { + if (state->mode != GZ_READ) /* writing -- can't go backwards */ + return -1; + offset += state->x.pos; + if (offset < 0) /* before start of file! */ + return -1; + if (gzrewind(file) == -1) /* rewind, then skip to offset */ + return -1; + } + + /* if reading, skip what's in output buffer (one less gzgetc() check) */ + if (state->mode == GZ_READ) { + n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? + (unsigned)offset : state->x.have; + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + offset -= n; + } + + /* request skip (if not zero) */ + if (offset) { + state->seek = 1; + state->skip = offset; + } + return state->x.pos + offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzseek(file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + z_off64_t ret; + + ret = gzseek64(file, (z_off64_t)offset, whence); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gztell64(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* return position */ + return state->x.pos + (state->seek ? state->skip : 0); +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gztell(file) + gzFile file; +{ + z_off64_t ret; + + ret = gztell64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzoffset64(file) + gzFile file; +{ + z_off64_t offset; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* compute and return effective offset in file */ + offset = LSEEK(state->fd, 0, SEEK_CUR); + if (offset == -1) + return -1; + if (state->mode == GZ_READ) /* reading */ + offset -= state->strm.avail_in; /* don't count buffered input */ + return offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzoffset(file) + gzFile file; +{ + z_off64_t ret; + + ret = gzoffset64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzeof(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return 0; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return 0; + + /* return end-of-file state */ + return state->mode == GZ_READ ? state->past : 0; +} + +/* -- see zlib.h -- */ +const char * ZEXPORT gzerror(file, errnum) + gzFile file; + int *errnum; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return NULL; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return NULL; + + /* return error information */ + if (errnum != NULL) + *errnum = state->err; + return state->err == Z_MEM_ERROR ? "out of memory" : + (state->msg == NULL ? "" : state->msg); +} + +/* -- see zlib.h -- */ +void ZEXPORT gzclearerr(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return; + + /* clear error and end-of-file */ + if (state->mode == GZ_READ) { + state->eof = 0; + state->past = 0; + } + gz_error(state, Z_OK, NULL); +} + +/* Create an error message in allocated memory and set state->err and + state->msg accordingly. Free any previous error message already there. Do + not try to free or allocate space if the error is Z_MEM_ERROR (out of + memory). Simply save the error message as a static string. If there is an + allocation failure constructing the error message, then convert the error to + out of memory. */ +void ZLIB_INTERNAL gz_error(state, err, msg) + gz_statep state; + int err; + const char *msg; +{ + /* free previously allocated message and clear */ + if (state->msg != NULL) { + if (state->err != Z_MEM_ERROR) + free(state->msg); + state->msg = NULL; + } + + /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ + if (err != Z_OK && err != Z_BUF_ERROR) + state->x.have = 0; + + /* set error code, and if no message, then done */ + state->err = err; + if (msg == NULL) + return; + + /* for an out of memory error, return literal string when requested */ + if (err == Z_MEM_ERROR) + return; + + /* construct error message with path */ + if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == + NULL) { + state->err = Z_MEM_ERROR; + return; + } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, + "%s%s%s", state->path, ": ", msg); +#else + strcpy(state->msg, state->path); + strcat(state->msg, ": "); + strcat(state->msg, msg); +#endif +} + +#ifndef INT_MAX +/* portably return maximum value for an int (when limits.h presumed not + available) -- we need to do this to cover cases where 2's complement not + used, since C standard permits 1's complement and sign-bit representations, + otherwise we could just use ((unsigned)-1) >> 1 */ +unsigned ZLIB_INTERNAL gz_intmax() +{ + unsigned p, q; + + p = 1; + do { + q = p; + p <<= 1; + p++; + } while (p > q); + return q >> 1; +} +#endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzread.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzread.c new file mode 100644 index 000000000..956b91ea7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzread.c @@ -0,0 +1,654 @@ +/* gzread.c -- zlib functions for reading gzip files + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); +local int gz_avail OF((gz_statep)); +local int gz_look OF((gz_statep)); +local int gz_decomp OF((gz_statep)); +local int gz_fetch OF((gz_statep)); +local int gz_skip OF((gz_statep, z_off64_t)); +local z_size_t gz_read OF((gz_statep, voidp, z_size_t)); + +/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from + state->fd, and update state->eof, state->err, and state->msg as appropriate. + This function needs to loop on read(), since read() is not guaranteed to + read the number of bytes requested, depending on the type of descriptor. */ +local int gz_load(state, buf, len, have) + gz_statep state; + unsigned char *buf; + unsigned len; + unsigned *have; +{ + int ret; + unsigned get, max = ((unsigned)-1 >> 2) + 1; + + *have = 0; + do { + get = len - *have; + if (get > max) + get = max; + ret = read(state->fd, buf + *have, get); + if (ret <= 0) + break; + *have += (unsigned)ret; + } while (*have < len); + if (ret < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (ret == 0) + state->eof = 1; + return 0; +} + +/* Load up input buffer and set eof flag if last data loaded -- return -1 on + error, 0 otherwise. Note that the eof flag is set when the end of the input + file is reached, even though there may be unused data in the buffer. Once + that data has been used, no more attempts will be made to read the file. + If strm->avail_in != 0, then the current data is moved to the beginning of + the input buffer, and then the remainder of the buffer is loaded with the + available data from the input file. */ +local int gz_avail(state) + gz_statep state; +{ + unsigned got; + z_streamp strm = &(state->strm); + + if (state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + if (state->eof == 0) { + if (strm->avail_in) { /* copy what's there to the start */ + unsigned char *p = state->in; + unsigned const char *q = strm->next_in; + unsigned n = strm->avail_in; + do { + *p++ = *q++; + } while (--n); + } + if (gz_load(state, state->in + strm->avail_in, + state->size - strm->avail_in, &got) == -1) + return -1; + strm->avail_in += got; + strm->next_in = state->in; + } + return 0; +} + +/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. + If this is the first time in, allocate required memory. state->how will be + left unchanged if there is no more input data available, will be set to COPY + if there is no gzip header and direct copying will be performed, or it will + be set to GZIP for decompression. If direct copying, then leftover input + data from the input buffer will be copied to the output buffer. In that + case, all further file reads will be directly to either the output buffer or + a user buffer. If decompressing, the inflate state will be initialized. + gz_look() will return 0 on success or -1 on failure. */ +local int gz_look(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + /* allocate read buffers and inflate memory */ + if (state->size == 0) { + /* allocate buffers */ + state->in = (unsigned char *)malloc(state->want); + state->out = (unsigned char *)malloc(state->want << 1); + if (state->in == NULL || state->out == NULL) { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + state->size = state->want; + + /* allocate inflate memory */ + state->strm.zalloc = Z_NULL; + state->strm.zfree = Z_NULL; + state->strm.opaque = Z_NULL; + state->strm.avail_in = 0; + state->strm.next_in = Z_NULL; + if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ + free(state->out); + free(state->in); + state->size = 0; + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + } + + /* get at least the magic bytes in the input buffer */ + if (strm->avail_in < 2) { + if (gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) + return 0; + } + + /* look for gzip magic bytes -- if there, do gzip decoding (note: there is + a logical dilemma here when considering the case of a partially written + gzip file, to wit, if a single 31 byte is written, then we cannot tell + whether this is a single-byte file, or just a partially written gzip + file -- for here we assume that if a gzip file is being written, then + the header will be written in a single operation, so that reading a + single byte is sufficient indication that it is not a gzip file) */ + if (strm->avail_in > 1 && + strm->next_in[0] == 31 && strm->next_in[1] == 139) { + inflateReset(strm); + state->how = GZIP; + state->direct = 0; + return 0; + } + + /* no gzip header -- if we were decoding gzip before, then this is trailing + garbage. Ignore the trailing garbage and finish. */ + if (state->direct == 0) { + strm->avail_in = 0; + state->eof = 1; + state->x.have = 0; + return 0; + } + + /* doing raw i/o, copy any leftover input to output -- this assumes that + the output buffer is larger than the input buffer, which also assures + space for gzungetc() */ + state->x.next = state->out; + if (strm->avail_in) { + memcpy(state->x.next, strm->next_in, strm->avail_in); + state->x.have = strm->avail_in; + strm->avail_in = 0; + } + state->how = COPY; + state->direct = 1; + return 0; +} + +/* Decompress from input to the provided next_out and avail_out in the state. + On return, state->x.have and state->x.next point to the just decompressed + data. If the gzip stream completes, state->how is reset to LOOK to look for + the next gzip stream or raw data, once state->x.have is depleted. Returns 0 + on success, -1 on failure. */ +local int gz_decomp(state) + gz_statep state; +{ + int ret = Z_OK; + unsigned had; + z_streamp strm = &(state->strm); + + /* fill output buffer up to end of deflate stream */ + had = strm->avail_out; + do { + /* get more input for inflate() */ + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) { + gz_error(state, Z_BUF_ERROR, "unexpected end of file"); + break; + } + + /* decompress and handle errors */ + ret = inflate(strm, Z_NO_FLUSH); + if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { + gz_error(state, Z_STREAM_ERROR, + "internal error: inflate stream corrupt"); + return -1; + } + if (ret == Z_MEM_ERROR) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ + gz_error(state, Z_DATA_ERROR, + strm->msg == NULL ? "compressed data error" : strm->msg); + return -1; + } + } while (strm->avail_out && ret != Z_STREAM_END); + + /* update available output */ + state->x.have = had - strm->avail_out; + state->x.next = strm->next_out - state->x.have; + + /* if the gzip stream completed successfully, look for another */ + if (ret == Z_STREAM_END) + state->how = LOOK; + + /* good decompression */ + return 0; +} + +/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. + Data is either copied from the input file or decompressed from the input + file depending on state->how. If state->how is LOOK, then a gzip header is + looked for to determine whether to copy or decompress. Returns -1 on error, + otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the + end of the input file has been reached and all data has been processed. */ +local int gz_fetch(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + do { + switch(state->how) { + case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ + if (gz_look(state) == -1) + return -1; + if (state->how == LOOK) + return 0; + break; + case COPY: /* -> COPY */ + if (gz_load(state, state->out, state->size << 1, &(state->x.have)) + == -1) + return -1; + state->x.next = state->out; + return 0; + case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ + strm->avail_out = state->size << 1; + strm->next_out = state->out; + if (gz_decomp(state) == -1) + return -1; + } + } while (state->x.have == 0 && (!state->eof || strm->avail_in)); + return 0; +} + +/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ +local int gz_skip(state, len) + gz_statep state; + z_off64_t len; +{ + unsigned n; + + /* skip over len bytes or reach end-of-file, whichever comes first */ + while (len) + /* skip over whatever is in output buffer */ + if (state->x.have) { + n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? + (unsigned)len : state->x.have; + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + len -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) + break; + + /* need more data to skip -- load up output buffer */ + else { + /* get more output, looking for header if required */ + if (gz_fetch(state) == -1) + return -1; + } + return 0; +} + +/* Read len bytes into buf from file, or less than len up to the end of the + input. Return the number of bytes read. If zero is returned, either the + end of file was reached, or there was an error. state->err must be + consulted in that case to determine which. */ +local z_size_t gz_read(state, buf, len) + gz_statep state; + voidp buf; + z_size_t len; +{ + z_size_t got; + unsigned n; + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return 0; + } + + /* get len bytes to buf, or less than len if at the end */ + got = 0; + do { + /* set n to the maximum amount of len that fits in an unsigned int */ + n = -1; + if (n > len) + n = len; + + /* first just try copying data from the output buffer */ + if (state->x.have) { + if (state->x.have < n) + n = state->x.have; + memcpy(buf, state->x.next, n); + state->x.next += n; + state->x.have -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) { + state->past = 1; /* tried to read past end */ + break; + } + + /* need output data -- for small len or new stream load up our output + buffer */ + else if (state->how == LOOK || n < (state->size << 1)) { + /* get more output, looking for header if required */ + if (gz_fetch(state) == -1) + return 0; + continue; /* no progress yet -- go back to copy above */ + /* the copy above assures that we will leave with space in the + output buffer, allowing at least one gzungetc() to succeed */ + } + + /* large len -- read directly into user buffer */ + else if (state->how == COPY) { /* read directly */ + if (gz_load(state, (unsigned char *)buf, n, &n) == -1) + return 0; + } + + /* large len -- decompress directly into user buffer */ + else { /* state->how == GZIP */ + state->strm.avail_out = n; + state->strm.next_out = (unsigned char *)buf; + if (gz_decomp(state) == -1) + return 0; + n = state->x.have; + state->x.have = 0; + } + + /* update progress */ + len -= n; + buf = (char *)buf + n; + got += n; + state->x.pos += n; + } while (len); + + /* return number of bytes read into user buffer */ + return got; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzread(file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids a flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in an int"); + return -1; + } + + /* read len or fewer bytes to buf */ + len = gz_read(state, buf, len); + + /* check for an error */ + if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + + /* return the number of bytes read (this is assured to fit in an int) */ + return (int)len; +} + +/* -- see zlib.h -- */ +z_size_t ZEXPORT gzfread(buf, size, nitems, file) + voidp buf; + z_size_t size; + z_size_t nitems; + gzFile file; +{ + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return 0; + + /* compute bytes to read -- error on overflow */ + len = nitems * size; + if (size && len / size != nitems) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); + return 0; + } + + /* read len or fewer bytes to buf, return the number of full items read */ + return len ? gz_read(state, buf, len) / size : 0; +} + +/* -- see zlib.h -- */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +#else +# undef gzgetc +#endif +int ZEXPORT gzgetc(file) + gzFile file; +{ + int ret; + unsigned char buf[1]; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* try output buffer (no need to check for skip request) */ + if (state->x.have) { + state->x.have--; + state->x.pos++; + return *(state->x.next)++; + } + + /* nothing there -- try gz_read() */ + ret = gz_read(state, buf, 1); + return ret < 1 ? -1 : buf[0]; +} + +int ZEXPORT gzgetc_(file) +gzFile file; +{ + return gzgetc(file); +} + +/* -- see zlib.h -- */ +int ZEXPORT gzungetc(c, file) + int c; + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* can't push EOF */ + if (c < 0) + return -1; + + /* if output buffer empty, put byte at end (allows more pushing) */ + if (state->x.have == 0) { + state->x.have = 1; + state->x.next = state->out + (state->size << 1) - 1; + state->x.next[0] = (unsigned char)c; + state->x.pos--; + state->past = 0; + return c; + } + + /* if no room, give up (must have already done a gzungetc()) */ + if (state->x.have == (state->size << 1)) { + gz_error(state, Z_DATA_ERROR, "out of room to push characters"); + return -1; + } + + /* slide output data if needed and insert byte before existing data */ + if (state->x.next == state->out) { + unsigned char *src = state->out + state->x.have; + unsigned char *dest = state->out + (state->size << 1); + while (src > state->out) + *--dest = *--src; + state->x.next = dest; + } + state->x.have++; + state->x.next--; + state->x.next[0] = (unsigned char)c; + state->x.pos--; + state->past = 0; + return c; +} + +/* -- see zlib.h -- */ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + unsigned left, n; + char *str; + unsigned char *eol; + gz_statep state; + + /* check parameters and get internal structure */ + if (file == NULL || buf == NULL || len < 1) + return NULL; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return NULL; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return NULL; + } + + /* copy output bytes up to new line or len - 1, whichever comes first -- + append a terminating zero to the string (we don't check for a zero in + the contents, let the user worry about that) */ + str = buf; + left = (unsigned)len - 1; + if (left) do { + /* assure that something is in the output buffer */ + if (state->x.have == 0 && gz_fetch(state) == -1) + return NULL; /* error */ + if (state->x.have == 0) { /* end of file */ + state->past = 1; /* read past end */ + break; /* return what we have */ + } + + /* look for end-of-line in current output buffer */ + n = state->x.have > left ? left : state->x.have; + eol = (unsigned char *)memchr(state->x.next, '\n', n); + if (eol != NULL) + n = (unsigned)(eol - state->x.next) + 1; + + /* copy through end-of-line, or remainder if not found */ + memcpy(buf, state->x.next, n); + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + left -= n; + buf += n; + } while (left && eol == NULL); + + /* return terminated string, or if nothing, end of file */ + if (buf == str) + return NULL; + buf[0] = 0; + return str; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzdirect(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* if the state is not known, but we can find out, then do so (this is + mainly for right after a gzopen() or gzdopen()) */ + if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) + (void)gz_look(state); + + /* return 1 if transparent, 0 if processing a gzip stream */ + return state->direct; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_r(file) + gzFile file; +{ + int ret, err; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return Z_STREAM_ERROR; + + /* free memory and close file */ + if (state->size) { + inflateEnd(&(state->strm)); + free(state->out); + free(state->in); + } + err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; + gz_error(state, Z_OK, NULL); + free(state->path); + ret = close(state->fd); + free(state); + return ret ? Z_ERRNO : err; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzwrite.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzwrite.c new file mode 100644 index 000000000..c7b5651d7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/gzwrite.c @@ -0,0 +1,665 @@ +/* gzwrite.c -- zlib functions for writing gzip files + * Copyright (C) 2004-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_init OF((gz_statep)); +local int gz_comp OF((gz_statep, int)); +local int gz_zero OF((gz_statep, z_off64_t)); +local z_size_t gz_write OF((gz_statep, voidpc, z_size_t)); + +/* Initialize state for writing a gzip file. Mark initialization by setting + state->size to non-zero. Return -1 on a memory allocation failure, or 0 on + success. */ +local int gz_init(state) + gz_statep state; +{ + int ret; + z_streamp strm = &(state->strm); + + /* allocate input buffer (double size for gzprintf) */ + state->in = (unsigned char *)malloc(state->want << 1); + if (state->in == NULL) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* only need output buffer and deflate state if compressing */ + if (!state->direct) { + /* allocate output buffer */ + state->out = (unsigned char *)malloc(state->want); + if (state->out == NULL) { + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* allocate deflate memory, set up for gzip compression */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = deflateInit2(strm, state->level, Z_DEFLATED, + MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); + if (ret != Z_OK) { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + strm->next_in = NULL; + } + + /* mark state as initialized */ + state->size = state->want; + + /* initialize write buffer if compressing */ + if (!state->direct) { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = strm->next_out; + } + return 0; +} + +/* Compress whatever is at avail_in and next_in and write to the output file. + Return -1 if there is an error writing to the output file or if gz_init() + fails to allocate memory, otherwise 0. flush is assumed to be a valid + deflate() flush value. If flush is Z_FINISH, then the deflate() state is + reset to start a new gzip stream. If gz->direct is true, then simply write + to the output file without compressing, and ignore flush. */ +local int gz_comp(state, flush) + gz_statep state; + int flush; +{ + int ret, writ; + unsigned have, put, max = ((unsigned)-1 >> 2) + 1; + z_streamp strm = &(state->strm); + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return -1; + + /* write directly if requested */ + if (state->direct) { + while (strm->avail_in) { + put = strm->avail_in > max ? max : strm->avail_in; + writ = write(state->fd, strm->next_in, put); + if (writ < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + strm->avail_in -= (unsigned)writ; + strm->next_in += writ; + } + return 0; + } + + /* run deflate() on provided input until it produces no more output */ + ret = Z_OK; + do { + /* write out current buffer contents if full, or if flushing, but if + doing Z_FINISH then don't write until we get to Z_STREAM_END */ + if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && + (flush != Z_FINISH || ret == Z_STREAM_END))) { + while (strm->next_out > state->x.next) { + put = strm->next_out - state->x.next > (int)max ? max : + (unsigned)(strm->next_out - state->x.next); + writ = write(state->fd, state->x.next, put); + if (writ < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + state->x.next += writ; + } + if (strm->avail_out == 0) { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = state->out; + } + } + + /* compress */ + have = strm->avail_out; + ret = deflate(strm, flush); + if (ret == Z_STREAM_ERROR) { + gz_error(state, Z_STREAM_ERROR, + "internal error: deflate stream corrupt"); + return -1; + } + have -= strm->avail_out; + } while (have); + + /* if that completed a deflate stream, allow another to start */ + if (flush == Z_FINISH) + deflateReset(strm); + + /* all done, no errors */ + return 0; +} + +/* Compress len zeros to output. Return -1 on a write error or memory + allocation failure by gz_comp(), or 0 on success. */ +local int gz_zero(state, len) + gz_statep state; + z_off64_t len; +{ + int first; + unsigned n; + z_streamp strm = &(state->strm); + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + + /* compress len zeros (len guaranteed > 0) */ + first = 1; + while (len) { + n = GT_OFF(state->size) || (z_off64_t)state->size > len ? + (unsigned)len : state->size; + if (first) { + memset(state->in, 0, n); + first = 0; + } + strm->avail_in = n; + strm->next_in = state->in; + state->x.pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + len -= n; + } + return 0; +} + +/* Write len bytes from buf to file. Return the number of bytes written. If + the returned value is less than len, then there was an error. */ +local z_size_t gz_write(state, buf, len) + gz_statep state; + voidpc buf; + z_size_t len; +{ + z_size_t put = len; + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* for small len, copy to input buffer, otherwise compress directly */ + if (len < state->size) { + /* copy to input buffer, compress when full */ + do { + unsigned have, copy; + + if (state->strm.avail_in == 0) + state->strm.next_in = state->in; + have = (unsigned)((state->strm.next_in + state->strm.avail_in) - + state->in); + copy = state->size - have; + if (copy > len) + copy = len; + memcpy(state->in + have, buf, copy); + state->strm.avail_in += copy; + state->x.pos += copy; + buf = (const char *)buf + copy; + len -= copy; + if (len && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } while (len); + } + else { + /* consume whatever's left in the input buffer */ + if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* directly compress user buffer to file */ + state->strm.next_in = (z_const Bytef *)buf; + do { + unsigned n = (unsigned)-1; + if (n > len) + n = len; + state->strm.avail_in = n; + state->x.pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + len -= n; + } while (len); + } + + /* input was all buffered or compressed */ + return put; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzwrite(file, buf, len) + gzFile file; + voidpc buf; + unsigned len; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids a flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); + return 0; + } + + /* write len bytes from buf (the return value will fit in an int) */ + return (int)gz_write(state, buf, len); +} + +/* -- see zlib.h -- */ +z_size_t ZEXPORT gzfwrite(buf, size, nitems, file) + voidpc buf; + z_size_t size; + z_size_t nitems; + gzFile file; +{ + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* compute bytes to read -- error on overflow */ + len = nitems * size; + if (size && len / size != nitems) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); + return 0; + } + + /* write len bytes to buf, return the number of full items written */ + return len ? gz_write(state, buf, len) / size : 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned have; + unsigned char buf[1]; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* try writing to input buffer for speed (state->size == 0 if buffer not + initialized) */ + if (state->size) { + if (strm->avail_in == 0) + strm->next_in = state->in; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + if (have < state->size) { + state->in[have] = (unsigned char)c; + strm->avail_in++; + state->x.pos++; + return c & 0xff; + } + } + + /* no room in buffer or not initialized, use gz_write() */ + buf[0] = (unsigned char)c; + if (gz_write(state, buf, 1) != 1) + return -1; + return c & 0xff; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputs(file, str) + gzFile file; + const char *str; +{ + int ret; + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* write string */ + len = strlen(str); + ret = gz_write(state, str, len); + return ret == 0 && len != 0 ? -1 : ret; +} + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +#include + +/* -- see zlib.h -- */ +int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) +{ + int len; + unsigned left; + char *next; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return state->err; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* do the printf() into the input buffer, put length in len -- the input + buffer is double-sized just for this function, so there is guaranteed to + be state->size bytes available after the current contents */ + if (strm->avail_in == 0) + strm->next_in = state->in; + next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in); + next[state->size - 1] = 0; +#ifdef NO_vsnprintf +# ifdef HAS_vsprintf_void + (void)vsprintf(next, format, va); + for (len = 0; len < state->size; len++) + if (next[len] == 0) break; +# else + len = vsprintf(next, format, va); +# endif +#else +# ifdef HAS_vsnprintf_void + (void)vsnprintf(next, state->size, format, va); + len = strlen(next); +# else + len = vsnprintf(next, state->size, format, va); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0) + return 0; + + /* update buffer and position, compress first half if past that */ + strm->avail_in += (unsigned)len; + state->x.pos += len; + if (strm->avail_in >= state->size) { + left = strm->avail_in - state->size; + strm->avail_in = state->size; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return state->err; + memcpy(state->in, state->in + state->size, left); + strm->next_in = state->in; + strm->avail_in = left; + } + return len; +} + +int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) +{ + va_list va; + int ret; + + va_start(va, format); + ret = gzvprintf(file, format, va); + va_end(va); + return ret; +} + +#else /* !STDC && !Z_HAVE_STDARG_H */ + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + unsigned len, left; + char *next; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that can really pass pointer in ints */ + if (sizeof(int) != sizeof(void *)) + return Z_STREAM_ERROR; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return state->error; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->error; + } + + /* do the printf() into the input buffer, put length in len -- the input + buffer is double-sized just for this function, so there is guaranteed to + be state->size bytes available after the current contents */ + if (strm->avail_in == 0) + strm->next_in = state->in; + next = (char *)(strm->next_in + strm->avail_in); + next[state->size - 1] = 0; +#ifdef NO_snprintf +# ifdef HAS_sprintf_void + sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, + a13, a14, a15, a16, a17, a18, a19, a20); + for (len = 0; len < size; len++) + if (next[len] == 0) + break; +# else + len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, + a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#else +# ifdef HAS_snprintf_void + snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, + a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + len = strlen(next); +# else + len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len == 0 || len >= state->size || next[state->size - 1] != 0) + return 0; + + /* update buffer and position, compress first half if past that */ + strm->avail_in += len; + state->x.pos += len; + if (strm->avail_in >= state->size) { + left = strm->avail_in - state->size; + strm->avail_in = state->size; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return state->err; + memcpy(state->in, state->in + state->size, left); + strm->next_in = state->in; + strm->avail_in = left; + } + return (int)len; +} + +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzflush(file, flush) + gzFile file; + int flush; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* check flush parameter */ + if (flush < 0 || flush > Z_FINISH) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* compress remaining data with requested flush */ + (void)gz_comp(state, flush); + return state->err; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzsetparams(file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* if no change is requested, then do nothing */ + if (level == state->level && strategy == state->strategy) + return Z_OK; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* change compression parameters for subsequent input */ + if (state->size) { + /* flush previous input with previous parameters before changing */ + if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1) + return state->err; + deflateParams(strm, level, strategy); + } + state->level = level; + state->strategy = strategy; + return Z_OK; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_w(file) + gzFile file; +{ + int ret = Z_OK; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing */ + if (state->mode != GZ_WRITE) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + ret = state->err; + } + + /* flush, free memory, and close file */ + if (gz_comp(state, Z_FINISH) == -1) + ret = state->err; + if (state->size) { + if (!state->direct) { + (void)deflateEnd(&(state->strm)); + free(state->out); + } + free(state->in); + } + gz_error(state, Z_OK, NULL); + free(state->path); + if (close(state->fd) == -1) + ret = Z_ERRNO; + free(state); + return ret; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/infback.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/infback.c new file mode 100644 index 000000000..59679ecbf --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/infback.c @@ -0,0 +1,640 @@ +/* infback.c -- inflate using a call-back interface + * Copyright (C) 1995-2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + This code is largely copied from inflate.c. Normally either infback.o or + inflate.o would be linked into an application--not both. The interface + with inffast.c is retained so that optimized assembler-coded versions of + inflate_fast() can be used with either inflate.c or infback.c. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* function prototypes */ +local void fixedtables OF((struct inflate_state FAR *state)); + +/* + strm provides memory allocation functions in zalloc and zfree, or + Z_NULL to use the library memory allocation functions. + + windowBits is in the range 8..15, and window is a user-supplied + window and output buffer that is 2**windowBits bytes. + */ +int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) +z_streamp strm; +int windowBits; +unsigned char FAR *window; +const char *version; +int stream_size; +{ + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL || + windowBits < 8 || windowBits > 15) + return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + state = (struct inflate_state FAR *)ZALLOC(strm, 1, + sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->dmax = 32768U; + state->wbits = (uInt)windowBits; + state->wsize = 1U << windowBits; + state->window = window; + state->wnext = 0; + state->whave = 0; + return Z_OK; +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables(state) +struct inflate_state FAR *state; +{ +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +/* Macros for inflateBack(): */ + +/* Load returned state from inflate_fast() */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Set state from registers for inflate_fast() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Assure that some input is available. If input is requested, but denied, + then return a Z_BUF_ERROR from inflateBack(). */ +#define PULL() \ + do { \ + if (have == 0) { \ + have = in(in_desc, &next); \ + if (have == 0) { \ + next = Z_NULL; \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflateBack() + with an error if there is no input available. */ +#define PULLBYTE() \ + do { \ + PULL(); \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflateBack() with + an error. */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Assure that some output space is available, by writing out the window + if it's full. If the write fails, return from inflateBack() with a + Z_BUF_ERROR. */ +#define ROOM() \ + do { \ + if (left == 0) { \ + put = state->window; \ + left = state->wsize; \ + state->whave = left; \ + if (out(out_desc, put, left)) { \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* + strm provides the memory allocation functions and window buffer on input, + and provides information on the unused input on return. For Z_DATA_ERROR + returns, strm will also provide an error message. + + in() and out() are the call-back input and output functions. When + inflateBack() needs more input, it calls in(). When inflateBack() has + filled the window with output, or when it completes with data in the + window, it calls out() to write out the data. The application must not + change the provided input until in() is called again or inflateBack() + returns. The application must not change the window/output buffer until + inflateBack() returns. + + in() and out() are called with a descriptor parameter provided in the + inflateBack() call. This parameter can be a structure that provides the + information required to do the read or write, as well as accumulated + information on the input and output such as totals and check values. + + in() should return zero on failure. out() should return non-zero on + failure. If either in() or out() fails, than inflateBack() returns a + Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it + was in() or out() that caused in the error. Otherwise, inflateBack() + returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format + error, or Z_MEM_ERROR if it could not allocate memory for the state. + inflateBack() can also return Z_STREAM_ERROR if the input parameters + are not correct, i.e. strm is Z_NULL or the state was not initialized. + */ +int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) +z_streamp strm; +in_func in; +void FAR *in_desc; +out_func out; +void FAR *out_desc; +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + /* Check that the strm exists and that the state was initialized */ + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* Reset the state */ + strm->msg = Z_NULL; + state->mode = TYPE; + state->last = 0; + state->whave = 0; + next = strm->next_in; + have = next != Z_NULL ? strm->avail_in : 0; + hold = 0; + bits = 0; + put = state->window; + left = state->wsize; + + /* Inflate until end of block marked as last */ + for (;;) + switch (state->mode) { + case TYPE: + /* determine and dispatch block type */ + if (state->last) { + BYTEBITS(); + state->mode = DONE; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + + case STORED: + /* get and verify stored block length */ + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + + /* copy stored block from input to output */ + while (state->length != 0) { + copy = state->length; + PULL(); + ROOM(); + if (copy > have) copy = have; + if (copy > left) copy = left; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + + case TABLE: + /* get dynamic table entries descriptor */ + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + + /* get code length code lengths (not a typo) */ + state->have = 0; + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + + /* get length and distance code code lengths */ + state->have = 0; + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = (unsigned)(state->lens[state->have - 1]); + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (code const FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN; + + case LEN: + /* use inflate_fast() if we have enough input and output */ + if (have >= 6 && left >= 258) { + RESTORE(); + if (state->whave < state->wsize) + state->whave = state->wsize - left; + inflate_fast(strm, state->wsize); + LOAD(); + break; + } + + /* get a literal, length, or end-of-block code */ + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + state->length = (unsigned)here.val; + + /* process literal */ + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + ROOM(); + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + } + + /* process end of block */ + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + + /* invalid code */ + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + + /* length code -- get extra bits, if any */ + state->extra = (unsigned)(here.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + + /* get distance code */ + for (;;) { + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)here.val; + + /* get distance extra bits, if any */ + state->extra = (unsigned)(here.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + } + if (state->offset > state->wsize - (state->whave < state->wsize ? + left : 0)) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + + /* copy match from window to output */ + do { + ROOM(); + copy = state->wsize - state->offset; + if (copy < left) { + from = put + copy; + copy = left - copy; + } + else { + from = put - state->offset; + copy = left; + } + if (copy > state->length) copy = state->length; + state->length -= copy; + left -= copy; + do { + *put++ = *from++; + } while (--copy); + } while (state->length != 0); + break; + + case DONE: + /* inflate stream terminated properly -- write leftover output */ + ret = Z_STREAM_END; + if (left < state->wsize) { + if (out(out_desc, state->window, state->wsize - left)) + ret = Z_BUF_ERROR; + } + goto inf_leave; + + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + + default: /* can't happen, but makes compilers happy */ + ret = Z_STREAM_ERROR; + goto inf_leave; + } + + /* Return unused input */ + inf_leave: + strm->next_in = next; + strm->avail_in = have; + return ret; +} + +int ZEXPORT inflateBackEnd(strm) +z_streamp strm; +{ + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.c new file mode 100644 index 000000000..0dbd1dbc0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.c @@ -0,0 +1,323 @@ +/* inffast.c -- fast decoding + * Copyright (C) 1995-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef ASMINF +# pragma message("Assembler code may have bugs -- use at your own risk") +#else + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ +void ZLIB_INTERNAL inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *in; /* local strm->next_in */ + z_const unsigned char FAR *last; /* have enough input while in < last */ + unsigned char FAR *out; /* local strm->next_out */ + unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ + unsigned char FAR *end; /* while out < end, enough space available */ +#ifdef INFLATE_STRICT + unsigned dmax; /* maximum distance from zlib header */ +#endif + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned wnext; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ + unsigned long hold; /* local strm->hold */ + unsigned bits; /* local strm->bits */ + code const FAR *lcode; /* local strm->lencode */ + code const FAR *dcode; /* local strm->distcode */ + unsigned lmask; /* mask for first level of length codes */ + unsigned dmask; /* mask for first level of distance codes */ + code here; /* retrieved table entry */ + unsigned op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + unsigned len; /* match length, unused bytes */ + unsigned dist; /* match distance */ + unsigned char FAR *from; /* where to copy match from */ + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + in = strm->next_in; + last = in + (strm->avail_in - 5); + out = strm->next_out; + beg = out - (start - strm->avail_out); + end = out + (strm->avail_out - 257); +#ifdef INFLATE_STRICT + dmax = state->dmax; +#endif + wsize = state->wsize; + whave = state->whave; + wnext = state->wnext; + window = state->window; + hold = state->hold; + bits = state->bits; + lcode = state->lencode; + dcode = state->distcode; + lmask = (1U << state->lenbits) - 1; + dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + do { + if (bits < 15) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: + op = (unsigned)(here.bits); + hold >>= op; + bits -= op; + op = (unsigned)(here.op); + if (op == 0) { /* literal */ + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + *out++ = (unsigned char)(here.val); + } + else if (op & 16) { /* length base */ + len = (unsigned)(here.val); + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + len += (unsigned)hold & ((1U << op) - 1); + hold >>= op; + bits -= op; + } + Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: + op = (unsigned)(here.bits); + hold >>= op; + bits -= op; + op = (unsigned)(here.op); + if (op & 16) { /* distance base */ + dist = (unsigned)(here.val); + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + } + dist += (unsigned)hold & ((1U << op) - 1); +#ifdef INFLATE_STRICT + if (dist > dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + hold >>= op; + bits -= op; + Tracevv((stderr, "inflate: distance %u\n", dist)); + op = (unsigned)(out - beg); /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state->sane) { + strm->msg = + (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + if (len <= op - whave) { + do { + *out++ = 0; + } while (--len); + continue; + } + len -= op - whave; + do { + *out++ = 0; + } while (--op > whave); + if (op == 0) { + from = out - dist; + do { + *out++ = *from++; + } while (--len); + continue; + } +#endif + } + from = window; + if (wnext == 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = window; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + while (len > 2) { + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; + len -= 3; + } + if (len) { + *out++ = *from++; + if (len > 1) + *out++ = *from++; + } + } + else { + from = out - dist; /* copy direct from output */ + do { /* minimum length is three */ + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; + len -= 3; + } while (len > 2); + if (len) { + *out++ = *from++; + if (len > 1) + *out++ = *from++; + } + } + } + else if ((op & 64) == 0) { /* 2nd level distance code */ + here = dcode[here.val + (hold & ((1U << op) - 1))]; + goto dodist; + } + else { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + } + else if ((op & 64) == 0) { /* 2nd level length code */ + here = lcode[here.val + (hold & ((1U << op) - 1))]; + goto dolen; + } + else if (op & 32) { /* end-of-block */ + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + else { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + } while (in < last && out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + in -= len; + bits -= len << 3; + hold &= (1U << bits) - 1; + + /* update state and return */ + strm->next_in = in; + strm->next_out = out; + strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); + strm->avail_out = (unsigned)(out < end ? + 257 + (end - out) : 257 - (out - end)); + state->hold = hold; + state->bits = bits; + return; +} + +/* + inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): + - Using bit fields for code structure + - Different op definition to avoid & for extra bits (do & for table bits) + - Three separate decoding do-loops for direct, window, and wnext == 0 + - Special case for distance > 1 copies to do overlapped load and store copy + - Explicit branch predictions (based on measured branch probabilities) + - Deferring match copy and interspersed it with decoding subsequent codes + - Swapping literal/length else + - Swapping window/direct else + - Larger unrolled copy loops (three is about right) + - Moving len -= 3 statement into middle of loop + */ + +#endif /* !ASMINF */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.h new file mode 100644 index 000000000..e5c1aa4ca --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffast.h @@ -0,0 +1,11 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2003, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffixed.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffixed.h new file mode 100644 index 000000000..d62832776 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inffixed.h @@ -0,0 +1,94 @@ + /* inffixed.h -- table for decoding fixed codes + * Generated automatically by makefixed(). + */ + + /* WARNING: this file should *not* be used by applications. + It is part of the implementation of this library and is + subject to change. Applications should only use zlib.h. + */ + + static const code lenfix[512] = { + {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, + {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, + {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, + {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, + {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, + {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, + {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, + {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, + {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, + {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, + {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, + {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, + {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, + {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, + {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, + {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, + {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, + {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, + {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, + {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, + {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, + {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, + {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, + {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, + {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, + {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, + {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, + {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, + {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, + {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, + {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, + {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, + {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, + {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, + {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, + {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, + {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, + {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, + {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, + {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, + {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, + {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, + {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, + {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, + {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, + {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, + {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, + {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, + {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, + {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, + {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, + {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, + {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, + {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, + {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, + {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, + {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, + {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, + {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, + {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, + {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, + {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, + {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, + {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, + {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, + {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, + {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, + {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, + {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, + {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, + {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, + {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, + {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, + {0,9,255} + }; + + static const code distfix[32] = { + {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, + {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, + {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, + {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, + {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, + {22,5,193},{64,5,0} + }; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c new file mode 100644 index 000000000..ac333e8c2 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c @@ -0,0 +1,1561 @@ +/* inflate.c -- zlib decompression + * Copyright (C) 1995-2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * Change history: + * + * 1.2.beta0 24 Nov 2002 + * - First version -- complete rewrite of inflate to simplify code, avoid + * creation of window when not needed, minimize use of window when it is + * needed, make inffast.c even faster, implement gzip decoding, and to + * improve code readability and style over the previous zlib inflate code + * + * 1.2.beta1 25 Nov 2002 + * - Use pointers for available input and output checking in inffast.c + * - Remove input and output counters in inffast.c + * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 + * - Remove unnecessary second byte pull from length extra in inffast.c + * - Unroll direct copy to three copies per loop in inffast.c + * + * 1.2.beta2 4 Dec 2002 + * - Change external routine names to reduce potential conflicts + * - Correct filename to inffixed.h for fixed tables in inflate.c + * - Make hbuf[] unsigned char to match parameter type in inflate.c + * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) + * to avoid negation problem on Alphas (64 bit) in inflate.c + * + * 1.2.beta3 22 Dec 2002 + * - Add comments on state->bits assertion in inffast.c + * - Add comments on op field in inftrees.h + * - Fix bug in reuse of allocated window after inflateReset() + * - Remove bit fields--back to byte structure for speed + * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths + * - Change post-increments to pre-increments in inflate_fast(), PPC biased? + * - Add compile time option, POSTINC, to use post-increments instead (Intel?) + * - Make MATCH copy in inflate() much faster for when inflate_fast() not used + * - Use local copies of stream next and avail values, as well as local bit + * buffer and bit count in inflate()--for speed when inflate_fast() not used + * + * 1.2.beta4 1 Jan 2003 + * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings + * - Move a comment on output buffer sizes from inffast.c to inflate.c + * - Add comments in inffast.c to introduce the inflate_fast() routine + * - Rearrange window copies in inflate_fast() for speed and simplification + * - Unroll last copy for window match in inflate_fast() + * - Use local copies of window variables in inflate_fast() for speed + * - Pull out common wnext == 0 case for speed in inflate_fast() + * - Make op and len in inflate_fast() unsigned for consistency + * - Add FAR to lcode and dcode declarations in inflate_fast() + * - Simplified bad distance check in inflate_fast() + * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new + * source file infback.c to provide a call-back interface to inflate for + * programs like gzip and unzip -- uses window as output buffer to avoid + * window copying + * + * 1.2.beta5 1 Jan 2003 + * - Improved inflateBack() interface to allow the caller to provide initial + * input in strm. + * - Fixed stored blocks bug in inflateBack() + * + * 1.2.beta6 4 Jan 2003 + * - Added comments in inffast.c on effectiveness of POSTINC + * - Typecasting all around to reduce compiler warnings + * - Changed loops from while (1) or do {} while (1) to for (;;), again to + * make compilers happy + * - Changed type of window in inflateBackInit() to unsigned char * + * + * 1.2.beta7 27 Jan 2003 + * - Changed many types to unsigned or unsigned short to avoid warnings + * - Added inflateCopy() function + * + * 1.2.0 9 Mar 2003 + * - Changed inflateBack() interface to provide separate opaque descriptors + * for the in() and out() functions + * - Changed inflateBack() argument and in_func typedef to swap the length + * and buffer address return values for the input function + * - Check next_in and next_out for Z_NULL on entry to inflate() + * + * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef MAKEFIXED +# ifndef BUILDFIXED +# define BUILDFIXED +# endif +#endif + +/* function prototypes */ +local int inflateStateCheck OF((z_streamp strm)); +local void fixedtables OF((struct inflate_state FAR *state)); +local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, + unsigned copy)); +#ifdef BUILDFIXED + void makefixed OF((void)); +#endif +local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, + unsigned len)); + +local int inflateStateCheck(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + state = (struct inflate_state FAR *)strm->state; + if (state == Z_NULL || state->strm != strm || + state->mode < HEAD || state->mode > SYNC) + return 1; + return 0; +} + +int ZEXPORT inflateResetKeep(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + strm->total_in = strm->total_out = state->total = 0; + strm->msg = Z_NULL; + if (state->wrap) /* to support ill-conceived Java test suite */ + strm->adler = state->wrap & 1; + state->mode = HEAD; + state->last = 0; + state->havedict = 0; + state->dmax = 32768U; + state->head = Z_NULL; + state->hold = 0; + state->bits = 0; + state->lencode = state->distcode = state->next = state->codes; + state->sane = 1; + state->back = -1; + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +int ZEXPORT inflateReset(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + state->wsize = 0; + state->whave = 0; + state->wnext = 0; + return inflateResetKeep(strm); +} + +int ZEXPORT inflateReset2(strm, windowBits) +z_streamp strm; +int windowBits; +{ + int wrap; + struct inflate_state FAR *state; + + /* get the state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 5; +#ifdef GUNZIP + if (windowBits < 48) + windowBits &= 15; +#endif + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) + return Z_STREAM_ERROR; + if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { + ZFREE(strm, state->window); + state->window = Z_NULL; + } + + /* update state and reset the rest of it */ + state->wrap = wrap; + state->wbits = (unsigned)windowBits; + return inflateReset(strm); +} + +int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) +z_streamp strm; +int windowBits; +const char *version; +int stream_size; +{ + int ret; + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL) return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + state = (struct inflate_state FAR *) + ZALLOC(strm, 1, sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->strm = strm; + state->window = Z_NULL; + state->mode = HEAD; /* to pass state test in inflateReset2() */ + ret = inflateReset2(strm, windowBits); + if (ret != Z_OK) { + ZFREE(strm, state); + strm->state = Z_NULL; + } + return ret; +} + +int ZEXPORT inflateInit_(strm, version, stream_size) +z_streamp strm; +const char *version; +int stream_size; +{ + return inflateInit2_(strm, DEF_WBITS, version, stream_size); +} + +int ZEXPORT inflatePrime(strm, bits, value) +z_streamp strm; +int bits; +int value; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (bits < 0) { + state->hold = 0; + state->bits = 0; + return Z_OK; + } + if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR; + value &= (1L << bits) - 1; + state->hold += (unsigned)value << state->bits; + state->bits += (uInt)bits; + return Z_OK; +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables(state) +struct inflate_state FAR *state; +{ +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +#ifdef MAKEFIXED +#include + +/* + Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also + defines BUILDFIXED, so the tables are built on the fly. makefixed() writes + those tables to stdout, which would be piped to inffixed.h. A small program + can simply call makefixed to do this: + + void makefixed(void); + + int main(void) + { + makefixed(); + return 0; + } + + Then that can be linked with zlib built with MAKEFIXED defined and run: + + a.out > inffixed.h + */ +void makefixed() +{ + unsigned low, size; + struct inflate_state state; + + fixedtables(&state); + puts(" /* inffixed.h -- table for decoding fixed codes"); + puts(" * Generated automatically by makefixed()."); + puts(" */"); + puts(""); + puts(" /* WARNING: this file should *not* be used by applications."); + puts(" It is part of the implementation of this library and is"); + puts(" subject to change. Applications should only use zlib.h."); + puts(" */"); + puts(""); + size = 1U << 9; + printf(" static const code lenfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 7) == 0) printf("\n "); + printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op, + state.lencode[low].bits, state.lencode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); + size = 1U << 5; + printf("\n static const code distfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 6) == 0) printf("\n "); + printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, + state.distcode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); +} +#endif /* MAKEFIXED */ + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +local int updatewindow(strm, end, copy) +z_streamp strm; +const Bytef *end; +unsigned copy; +{ + struct inflate_state FAR *state; + unsigned dist; + + state = (struct inflate_state FAR *)strm->state; + + /* if it hasn't been done already, allocate space for the window */ + if (state->window == Z_NULL) { + state->window = (unsigned char FAR *) + ZALLOC(strm, 1U << state->wbits, + sizeof(unsigned char)); + if (state->window == Z_NULL) return 1; + } + + /* if window not in use yet, initialize */ + if (state->wsize == 0) { + state->wsize = 1U << state->wbits; + state->wnext = 0; + state->whave = 0; + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state->wsize) { + zmemcpy(state->window, end - state->wsize, state->wsize); + state->wnext = 0; + state->whave = state->wsize; + } + else { + dist = state->wsize - state->wnext; + if (dist > copy) dist = copy; + zmemcpy(state->window + state->wnext, end - copy, dist); + copy -= dist; + if (copy) { + zmemcpy(state->window, end - copy, copy); + state->wnext = copy; + state->whave = state->wsize; + } + else { + state->wnext += dist; + if (state->wnext == state->wsize) state->wnext = 0; + if (state->whave < state->wsize) state->whave += dist; + } + } + return 0; +} + +/* Macros for inflate(): */ + +/* check function to use adler32() for zlib or crc32() for gzip */ +#ifdef GUNZIP +# define UPDATE(check, buf, len) \ + (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) +#else +# define UPDATE(check, buf, len) adler32(check, buf, len) +#endif + +/* check macros for header crc */ +#ifdef GUNZIP +# define CRC2(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + check = crc32(check, hbuf, 2); \ + } while (0) + +# define CRC4(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + hbuf[2] = (unsigned char)((word) >> 16); \ + hbuf[3] = (unsigned char)((word) >> 24); \ + check = crc32(check, hbuf, 4); \ + } while (0) +#endif + +/* Load registers with state in inflate() for speed */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Restore state from registers in inflate() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflate() + if there is no input available. */ +#define PULLBYTE() \ + do { \ + if (have == 0) goto inf_leave; \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflate(). */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* + inflate() uses a state machine to process as much input data and generate as + much output data as possible before returning. The state machine is + structured roughly as follows: + + for (;;) switch (state) { + ... + case STATEn: + if (not enough input data or output space to make progress) + return; + ... make progress ... + state = STATEm; + break; + ... + } + + so when inflate() is called again, the same case is attempted again, and + if the appropriate resources are provided, the machine proceeds to the + next state. The NEEDBITS() macro is usually the way the state evaluates + whether it can proceed or should return. NEEDBITS() does the return if + the requested bits are not available. The typical use of the BITS macros + is: + + NEEDBITS(n); + ... do something with BITS(n) ... + DROPBITS(n); + + where NEEDBITS(n) either returns from inflate() if there isn't enough + input left to load n bits into the accumulator, or it continues. BITS(n) + gives the low n bits in the accumulator. When done, DROPBITS(n) drops + the low n bits off the accumulator. INITBITS() clears the accumulator + and sets the number of available bits to zero. BYTEBITS() discards just + enough bits to put the accumulator on a byte boundary. After BYTEBITS() + and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. + + NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return + if there is no input available. The decoding of variable length codes uses + PULLBYTE() directly in order to pull just enough bytes to decode the next + code, and no more. + + Some states loop until they get enough input, making sure that enough + state information is maintained to continue the loop where it left off + if NEEDBITS() returns in the loop. For example, want, need, and keep + would all have to actually be part of the saved state in case NEEDBITS() + returns: + + case STATEw: + while (want < need) { + NEEDBITS(n); + keep[want++] = BITS(n); + DROPBITS(n); + } + state = STATEx; + case STATEx: + + As shown above, if the next state is also the next case, then the break + is omitted. + + A state may also return if there is not enough output space available to + complete that state. Those states are copying stored data, writing a + literal byte, and copying a matching string. + + When returning, a "goto inf_leave" is used to update the total counters, + update the check value, and determine whether any progress has been made + during that inflate() call in order to return the proper return code. + Progress is defined as a change in either strm->avail_in or strm->avail_out. + When there is a window, goto inf_leave will update the window with the last + output written. If a goto inf_leave occurs in the middle of decompression + and there is no window currently, goto inf_leave will create one and copy + output to the window for the next call of inflate(). + + In this implementation, the flush parameter of inflate() only affects the + return code (per zlib.h). inflate() always writes as much as possible to + strm->next_out, given the space available and the provided input--the effect + documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers + the allocation of and copying into a sliding window until necessary, which + provides the effect documented in zlib.h for Z_FINISH when the entire input + stream available. So the only thing the flush parameter actually does is: + when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it + will return Z_BUF_ERROR if it has not reached the end of the stream. + */ + +int ZEXPORT inflate(strm, flush) +z_streamp strm; +int flush; +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned in, out; /* save starting available input and output */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ +#ifdef GUNZIP + unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ +#endif + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + if (inflateStateCheck(strm) || strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0)) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; + if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ + LOAD(); + in = have; + out = left; + ret = Z_OK; + for (;;) + switch (state->mode) { + case HEAD: + if (state->wrap == 0) { + state->mode = TYPEDO; + break; + } + NEEDBITS(16); +#ifdef GUNZIP + if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + if (state->wbits == 0) + state->wbits = 15; + state->check = crc32(0L, Z_NULL, 0); + CRC2(state->check, hold); + INITBITS(); + state->mode = FLAGS; + break; + } + state->flags = 0; /* expect zlib header */ + if (state->head != Z_NULL) + state->head->done = -1; + if (!(state->wrap & 1) || /* check if zlib header allowed */ +#else + if ( +#endif + ((BITS(8) << 8) + (hold >> 8)) % 31) { + strm->msg = (char *)"incorrect header check"; + state->mode = BAD; + break; + } + if (BITS(4) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + DROPBITS(4); + len = BITS(4) + 8; + if (state->wbits == 0) + state->wbits = len; + if (len > 15 || len > state->wbits) { + strm->msg = (char *)"invalid window size"; + state->mode = BAD; + break; + } + state->dmax = 1U << len; + Tracev((stderr, "inflate: zlib header ok\n")); + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = hold & 0x200 ? DICTID : TYPE; + INITBITS(); + break; +#ifdef GUNZIP + case FLAGS: + NEEDBITS(16); + state->flags = (int)(hold); + if ((state->flags & 0xff) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + if (state->flags & 0xe000) { + strm->msg = (char *)"unknown header flags set"; + state->mode = BAD; + break; + } + if (state->head != Z_NULL) + state->head->text = (int)((hold >> 8) & 1); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + state->mode = TIME; + case TIME: + NEEDBITS(32); + if (state->head != Z_NULL) + state->head->time = hold; + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC4(state->check, hold); + INITBITS(); + state->mode = OS; + case OS: + NEEDBITS(16); + if (state->head != Z_NULL) { + state->head->xflags = (int)(hold & 0xff); + state->head->os = (int)(hold >> 8); + } + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + state->mode = EXLEN; + case EXLEN: + if (state->flags & 0x0400) { + NEEDBITS(16); + state->length = (unsigned)(hold); + if (state->head != Z_NULL) + state->head->extra_len = (unsigned)hold; + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + } + else if (state->head != Z_NULL) + state->head->extra = Z_NULL; + state->mode = EXTRA; + case EXTRA: + if (state->flags & 0x0400) { + copy = state->length; + if (copy > have) copy = have; + if (copy) { + if (state->head != Z_NULL && + state->head->extra != Z_NULL) { + len = state->head->extra_len - state->length; + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); + } + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + state->length -= copy; + } + if (state->length) goto inf_leave; + } + state->length = 0; + state->mode = NAME; + case NAME: + if (state->flags & 0x0800) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->name != Z_NULL && + state->length < state->head->name_max) + state->head->name[state->length++] = (Bytef)len; + } while (len && copy < have); + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->name = Z_NULL; + state->length = 0; + state->mode = COMMENT; + case COMMENT: + if (state->flags & 0x1000) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->comment != Z_NULL && + state->length < state->head->comm_max) + state->head->comment[state->length++] = (Bytef)len; + } while (len && copy < have); + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->comment = Z_NULL; + state->mode = HCRC; + case HCRC: + if (state->flags & 0x0200) { + NEEDBITS(16); + if ((state->wrap & 4) && hold != (state->check & 0xffff)) { + strm->msg = (char *)"header crc mismatch"; + state->mode = BAD; + break; + } + INITBITS(); + } + if (state->head != Z_NULL) { + state->head->hcrc = (int)((state->flags >> 9) & 1); + state->head->done = 1; + } + strm->adler = state->check = crc32(0L, Z_NULL, 0); + state->mode = TYPE; + break; +#endif + case DICTID: + NEEDBITS(32); + strm->adler = state->check = ZSWAP32(hold); + INITBITS(); + state->mode = DICT; + case DICT: + if (state->havedict == 0) { + RESTORE(); + return Z_NEED_DICT; + } + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = TYPE; + case TYPE: + if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; + case TYPEDO: + if (state->last) { + BYTEBITS(); + state->mode = CHECK; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN_; /* decode codes */ + if (flush == Z_TREES) { + DROPBITS(2); + goto inf_leave; + } + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + case STORED: + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + state->mode = COPY_; + if (flush == Z_TREES) goto inf_leave; + case COPY_: + state->mode = COPY; + case COPY: + copy = state->length; + if (copy) { + if (copy > have) copy = have; + if (copy > left) copy = left; + if (copy == 0) goto inf_leave; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + break; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + case TABLE: + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + state->have = 0; + state->mode = LENLENS; + case LENLENS: + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (const code FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + state->have = 0; + state->mode = CODELENS; + case CODELENS: + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = state->lens[state->have - 1]; + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + state->lencode = (const code FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (const code FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN_; + if (flush == Z_TREES) goto inf_leave; + case LEN_: + state->mode = LEN; + case LEN: + if (have >= 6 && left >= 258) { + RESTORE(); + inflate_fast(strm, out); + LOAD(); + if (state->mode == TYPE) + state->back = -1; + break; + } + state->back = 0; + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + state->back += last.bits; + } + DROPBITS(here.bits); + state->back += here.bits; + state->length = (unsigned)here.val; + if ((int)(here.op) == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + state->mode = LIT; + break; + } + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->back = -1; + state->mode = TYPE; + break; + } + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + state->extra = (unsigned)(here.op) & 15; + state->mode = LENEXT; + case LENEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + state->back += state->extra; + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + state->was = state->length; + state->mode = DIST; + case DIST: + for (;;) { + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + state->back += last.bits; + } + DROPBITS(here.bits); + state->back += here.bits; + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)here.val; + state->extra = (unsigned)(here.op) & 15; + state->mode = DISTEXT; + case DISTEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + state->back += state->extra; + } +#ifdef INFLATE_STRICT + if (state->offset > state->dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + state->mode = MATCH; + case MATCH: + if (left == 0) goto inf_leave; + copy = out - left; + if (state->offset > copy) { /* copy from window */ + copy = state->offset - copy; + if (copy > state->whave) { + if (state->sane) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + Trace((stderr, "inflate.c too far\n")); + copy -= state->whave; + if (copy > state->length) copy = state->length; + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = 0; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; +#endif + } + if (copy > state->wnext) { + copy -= state->wnext; + from = state->window + (state->wsize - copy); + } + else + from = state->window + (state->wnext - copy); + if (copy > state->length) copy = state->length; + } + else { /* copy from output */ + from = put - state->offset; + copy = state->length; + } + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = *from++; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; + case LIT: + if (left == 0) goto inf_leave; + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + case CHECK: + if (state->wrap) { + NEEDBITS(32); + out -= left; + strm->total_out += out; + state->total += out; + if ((state->wrap & 4) && out) + strm->adler = state->check = + UPDATE(state->check, put - out, out); + out = left; + if ((state->wrap & 4) && ( +#ifdef GUNZIP + state->flags ? hold : +#endif + ZSWAP32(hold)) != state->check) { + strm->msg = (char *)"incorrect data check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: check matches trailer\n")); + } +#ifdef GUNZIP + state->mode = LENGTH; + case LENGTH: + if (state->wrap && state->flags) { + NEEDBITS(32); + if (hold != (state->total & 0xffffffffUL)) { + strm->msg = (char *)"incorrect length check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: length matches trailer\n")); + } +#endif + state->mode = DONE; + case DONE: + ret = Z_STREAM_END; + goto inf_leave; + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + default: + return Z_STREAM_ERROR; + } + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + inf_leave: + RESTORE(); + if (state->wsize || (out != strm->avail_out && state->mode < BAD && + (state->mode < CHECK || flush != Z_FINISH))) + if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { + state->mode = MEM; + return Z_MEM_ERROR; + } + in -= strm->avail_in; + out -= strm->avail_out; + strm->total_in += in; + strm->total_out += out; + state->total += out; + if ((state->wrap & 4) && out) + strm->adler = state->check = + UPDATE(state->check, strm->next_out - out, out); + strm->data_type = (int)state->bits + (state->last ? 64 : 0) + + (state->mode == TYPE ? 128 : 0) + + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); + if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) + ret = Z_BUF_ERROR; + return ret; +} + +int ZEXPORT inflateEnd(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->window != Z_NULL) ZFREE(strm, state->window); + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + +int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) +z_streamp strm; +Bytef *dictionary; +uInt *dictLength; +{ + struct inflate_state FAR *state; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* copy dictionary */ + if (state->whave && dictionary != Z_NULL) { + zmemcpy(dictionary, state->window + state->wnext, + state->whave - state->wnext); + zmemcpy(dictionary + state->whave - state->wnext, + state->window, state->wnext); + } + if (dictLength != Z_NULL) + *dictLength = state->whave; + return Z_OK; +} + +int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) +z_streamp strm; +const Bytef *dictionary; +uInt dictLength; +{ + struct inflate_state FAR *state; + unsigned long dictid; + int ret; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->wrap != 0 && state->mode != DICT) + return Z_STREAM_ERROR; + + /* check for correct dictionary identifier */ + if (state->mode == DICT) { + dictid = adler32(0L, Z_NULL, 0); + dictid = adler32(dictid, dictionary, dictLength); + if (dictid != state->check) + return Z_DATA_ERROR; + } + + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary + dictLength, dictLength); + if (ret) { + state->mode = MEM; + return Z_MEM_ERROR; + } + state->havedict = 1; + Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +int ZEXPORT inflateGetHeader(strm, head) +z_streamp strm; +gz_headerp head; +{ + struct inflate_state FAR *state; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; + + /* save header structure */ + state->head = head; + head->done = 0; + return Z_OK; +} + +/* + Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found + or when out of input. When called, *have is the number of pattern bytes + found in order so far, in 0..3. On return *have is updated to the new + state. If on return *have equals four, then the pattern was found and the + return value is how many bytes were read including the last byte of the + pattern. If *have is less than four, then the pattern has not been found + yet and the return value is len. In the latter case, syncsearch() can be + called again with more data and the *have state. *have is initialized to + zero for the first call. + */ +local unsigned syncsearch(have, buf, len) +unsigned FAR *have; +const unsigned char FAR *buf; +unsigned len; +{ + unsigned got; + unsigned next; + + got = *have; + next = 0; + while (next < len && got < 4) { + if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) + got++; + else if (buf[next]) + got = 0; + else + got = 4 - got; + next++; + } + *have = got; + return next; +} + +int ZEXPORT inflateSync(strm) +z_streamp strm; +{ + unsigned len; /* number of bytes to look at or looked at */ + unsigned long in, out; /* temporary to save total_in and total_out */ + unsigned char buf[4]; /* to restore bit buffer to byte string */ + struct inflate_state FAR *state; + + /* check parameters */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; + + /* if first time, start search in bit buffer */ + if (state->mode != SYNC) { + state->mode = SYNC; + state->hold <<= state->bits & 7; + state->bits -= state->bits & 7; + len = 0; + while (state->bits >= 8) { + buf[len++] = (unsigned char)(state->hold); + state->hold >>= 8; + state->bits -= 8; + } + state->have = 0; + syncsearch(&(state->have), buf, len); + } + + /* search available input */ + len = syncsearch(&(state->have), strm->next_in, strm->avail_in); + strm->avail_in -= len; + strm->next_in += len; + strm->total_in += len; + + /* return no joy or set up to restart inflate() on a new block */ + if (state->have != 4) return Z_DATA_ERROR; + in = strm->total_in; out = strm->total_out; + inflateReset(strm); + strm->total_in = in; strm->total_out = out; + state->mode = TYPE; + return Z_OK; +} + +/* + Returns true if inflate is currently at the end of a block generated by + Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses + Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored + block. When decompressing, PPP checks that at the end of input packet, + inflate is waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + return state->mode == STORED && state->bits == 0; +} + +int ZEXPORT inflateCopy(dest, source) +z_streamp dest; +z_streamp source; +{ + struct inflate_state FAR *state; + struct inflate_state FAR *copy; + unsigned char FAR *window; + unsigned wsize; + + /* check input */ + if (inflateStateCheck(source) || dest == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)source->state; + + /* allocate space */ + copy = (struct inflate_state FAR *) + ZALLOC(source, 1, sizeof(struct inflate_state)); + if (copy == Z_NULL) return Z_MEM_ERROR; + window = Z_NULL; + if (state->window != Z_NULL) { + window = (unsigned char FAR *) + ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); + if (window == Z_NULL) { + ZFREE(source, copy); + return Z_MEM_ERROR; + } + } + + /* copy state */ + zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); + copy->strm = dest; + if (state->lencode >= state->codes && + state->lencode <= state->codes + ENOUGH - 1) { + copy->lencode = copy->codes + (state->lencode - state->codes); + copy->distcode = copy->codes + (state->distcode - state->codes); + } + copy->next = copy->codes + (state->next - state->codes); + if (window != Z_NULL) { + wsize = 1U << state->wbits; + zmemcpy(window, state->window, wsize); + } + copy->window = window; + dest->state = (struct internal_state FAR *)copy; + return Z_OK; +} + +int ZEXPORT inflateUndermine(strm, subvert) +z_streamp strm; +int subvert; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + state->sane = !subvert; + return Z_OK; +#else + (void)subvert; + state->sane = 1; + return Z_DATA_ERROR; +#endif +} + +int ZEXPORT inflateValidate(strm, check) +z_streamp strm; +int check; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (check) + state->wrap |= 4; + else + state->wrap &= ~4; + return Z_OK; +} + +long ZEXPORT inflateMark(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) + return -(1L << 16); + state = (struct inflate_state FAR *)strm->state; + return (long)(((unsigned long)((long)state->back)) << 16) + + (state->mode == COPY ? state->length : + (state->mode == MATCH ? state->was - state->length : 0)); +} + +unsigned long ZEXPORT inflateCodesUsed(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) return (unsigned long)-1; + state = (struct inflate_state FAR *)strm->state; + return (unsigned long)(state->next - state->codes); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.h new file mode 100644 index 000000000..a46cce6b6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.h @@ -0,0 +1,125 @@ +/* inflate.h -- internal inflate state definition + * Copyright (C) 1995-2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer decoding by inflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip decoding + should be left enabled. */ +#ifndef NO_GZIP +# define GUNZIP +#endif + +/* Possible inflate modes between inflate() calls */ +typedef enum { + HEAD = 16180, /* i: waiting for magic header */ + FLAGS, /* i: waiting for method and flags (gzip) */ + TIME, /* i: waiting for modification time (gzip) */ + OS, /* i: waiting for extra flags and operating system (gzip) */ + EXLEN, /* i: waiting for extra length (gzip) */ + EXTRA, /* i: waiting for extra bytes (gzip) */ + NAME, /* i: waiting for end of file name (gzip) */ + COMMENT, /* i: waiting for end of comment (gzip) */ + HCRC, /* i: waiting for header crc (gzip) */ + DICTID, /* i: waiting for dictionary check value */ + DICT, /* waiting for inflateSetDictionary() call */ + TYPE, /* i: waiting for type bits, including last-flag bit */ + TYPEDO, /* i: same, but skip check to exit inflate on new block */ + STORED, /* i: waiting for stored size (length and complement) */ + COPY_, /* i/o: same as COPY below, but only first time in */ + COPY, /* i/o: waiting for input or output to copy stored block */ + TABLE, /* i: waiting for dynamic block table lengths */ + LENLENS, /* i: waiting for code length code lengths */ + CODELENS, /* i: waiting for length/lit and distance code lengths */ + LEN_, /* i: same as LEN below, but only first time in */ + LEN, /* i: waiting for length/lit/eob code */ + LENEXT, /* i: waiting for length extra bits */ + DIST, /* i: waiting for distance code */ + DISTEXT, /* i: waiting for distance extra bits */ + MATCH, /* o: waiting for output space to copy string */ + LIT, /* o: waiting for output space to write literal */ + CHECK, /* i: waiting for 32-bit check value */ + LENGTH, /* i: waiting for 32-bit length (gzip) */ + DONE, /* finished check, done -- remain here until reset */ + BAD, /* got a data error -- remain here until reset */ + MEM, /* got an inflate() memory error -- remain here until reset */ + SYNC /* looking for synchronization bytes to restart inflate() */ +} inflate_mode; + +/* + State transitions between above modes - + + (most modes can go to BAD or MEM on error -- not shown for clarity) + + Process header: + HEAD -> (gzip) or (zlib) or (raw) + (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> + HCRC -> TYPE + (zlib) -> DICTID or TYPE + DICTID -> DICT -> TYPE + (raw) -> TYPEDO + Read deflate blocks: + TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK + STORED -> COPY_ -> COPY -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN_ + LEN_ -> LEN + Read deflate codes in fixed or dynamic block: + LEN -> LENEXT or LIT or TYPE + LENEXT -> DIST -> DISTEXT -> MATCH -> LEN + LIT -> LEN + Process trailer: + CHECK -> LENGTH -> DONE + */ + +/* State maintained between inflate() calls -- approximately 7K bytes, not + including the allocated sliding window, which is up to 32K bytes. */ +struct inflate_state { + z_streamp strm; /* pointer back to this zlib stream */ + inflate_mode mode; /* current inflate mode */ + int last; /* true if processing last block */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ + int havedict; /* true if dictionary provided */ + int flags; /* gzip header method and flags (0 if zlib) */ + unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ + unsigned long check; /* protected copy of check value */ + unsigned long total; /* protected copy of output count */ + gz_headerp head; /* where to save gzip header information */ + /* sliding window */ + unsigned wbits; /* log base 2 of requested window size */ + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned wnext; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + /* bit accumulator */ + unsigned long hold; /* input bit accumulator */ + unsigned bits; /* number of bits in "in" */ + /* for string and stored block copying */ + unsigned length; /* literal or length of data to copy */ + unsigned offset; /* distance back to copy string from */ + /* for table and code decoding */ + unsigned extra; /* extra bits needed */ + /* fixed and dynamic code tables */ + code const FAR *lencode; /* starting table for length/literal codes */ + code const FAR *distcode; /* starting table for distance codes */ + unsigned lenbits; /* index bits for lencode */ + unsigned distbits; /* index bits for distcode */ + /* dynamic table building */ + unsigned ncode; /* number of code length code lengths */ + unsigned nlen; /* number of length code lengths */ + unsigned ndist; /* number of distance code lengths */ + unsigned have; /* number of code lengths in lens[] */ + code FAR *next; /* next available space in codes[] */ + unsigned short lens[320]; /* temporary storage for code lengths */ + unsigned short work[288]; /* work area for code table building */ + code codes[ENOUGH]; /* space for code tables */ + int sane; /* if false, allow invalid distance too far */ + int back; /* bits back of last unprocessed length/lit */ + unsigned was; /* initial length of match */ +}; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.c new file mode 100644 index 000000000..2ea08fc13 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.c @@ -0,0 +1,304 @@ +/* inftrees.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" + +#define MAXBITS 15 + +const char inflate_copyright[] = + " inflate 1.2.11 Copyright 1995-2017 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* + Build a set of tables to decode the provided canonical Huffman code. + The code lengths are lens[0..codes-1]. The result starts at *table, + whose indices are 0..2^bits-1. work is a writable array of at least + lens shorts, which is used as a work area. type is the type of code + to be generated, CODES, LENS, or DISTS. On return, zero is success, + -1 is an invalid code, and +1 means that ENOUGH isn't enough. table + on return points to the next available entry's address. bits is the + requested root table index bits, and on return it is the actual root + table index bits. It will differ if the request is greater than the + longest code or if it is less than the shortest code. + */ +int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) +codetype type; +unsigned short FAR *lens; +unsigned codes; +code FAR * FAR *table; +unsigned FAR *bits; +unsigned short FAR *work; +{ + unsigned len; /* a code's length in bits */ + unsigned sym; /* index of code symbols */ + unsigned min, max; /* minimum and maximum code lengths */ + unsigned root; /* number of index bits for root table */ + unsigned curr; /* number of index bits for current table */ + unsigned drop; /* code bits to drop for sub-table */ + int left; /* number of prefix codes available */ + unsigned used; /* code entries in table used */ + unsigned huff; /* Huffman code */ + unsigned incr; /* for incrementing code, index */ + unsigned fill; /* index for replicating entries */ + unsigned low; /* low bits for current root entry */ + unsigned mask; /* mask for low root bits */ + code here; /* table entry for duplication */ + code FAR *next; /* next available space in table */ + const unsigned short FAR *base; /* base value table to use */ + const unsigned short FAR *extra; /* extra bits table to use */ + unsigned match; /* use base and extra for symbol >= match */ + unsigned short count[MAXBITS+1]; /* number of codes of each length */ + unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ + static const unsigned short lbase[31] = { /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + static const unsigned short lext[31] = { /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202}; + static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0}; + static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64}; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) + count[len] = 0; + for (sym = 0; sym < codes; sym++) + count[lens[sym]]++; + + /* bound code lengths, force root to be within code lengths */ + root = *bits; + for (max = MAXBITS; max >= 1; max--) + if (count[max] != 0) break; + if (root > max) root = max; + if (max == 0) { /* no symbols to code at all */ + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)1; + here.val = (unsigned short)0; + *(*table)++ = here; /* make a table to force an error */ + *(*table)++ = here; + *bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) + if (count[min] != 0) break; + if (root < min) root = min; + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) return -1; /* over-subscribed */ + } + if (left > 0 && (type == CODES || max != 1)) + return -1; /* incomplete set */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + count[len]; + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) + if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + switch (type) { + case CODES: + base = extra = work; /* dummy value--not used */ + match = 20; + break; + case LENS: + base = lbase; + extra = lext; + match = 257; + break; + default: /* DISTS */ + base = dbase; + extra = dext; + match = 0; + } + + /* initialize state for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = *table; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = (unsigned)(-1); /* trigger new sub-table when len > root */ + used = 1U << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) + return 1; + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here.bits = (unsigned char)(len - drop); + if (work[sym] + 1U < match) { + here.op = (unsigned char)0; + here.val = work[sym]; + } + else if (work[sym] >= match) { + here.op = (unsigned char)(extra[work[sym] - match]); + here.val = base[work[sym] - match]; + } + else { + here.op = (unsigned char)(32 + 64); /* end of block */ + here.val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1U << (len - drop); + fill = 1U << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + next[(huff >> drop) + fill] = here; + } while (fill != 0); + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + + /* go to next symbol, update count, len */ + sym++; + if (--(count[len]) == 0) { + if (len == max) break; + len = lens[work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) != low) { + /* if first time, transition to sub-tables */ + if (drop == 0) + drop = root; + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = (int)(1 << curr); + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) break; + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1U << curr; + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) + return 1; + + /* point entry in root table to sub-table */ + low = huff & mask; + (*table)[low].op = (unsigned char)curr; + (*table)[low].bits = (unsigned char)root; + (*table)[low].val = (unsigned short)(next - *table); + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff != 0) { + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)(len - drop); + here.val = (unsigned short)0; + next[huff] = here; + } + + /* set return parameters */ + *table += used; + *bits = root; + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.h new file mode 100644 index 000000000..baa53a0b1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inftrees.h @@ -0,0 +1,62 @@ +/* inftrees.h -- header to use inftrees.c + * Copyright (C) 1995-2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Structure for decoding tables. Each entry provides either the + information needed to do the operation requested by the code that + indexed that table entry, or it provides a pointer to another + table that indexes more bits of the code. op indicates whether + the entry is a pointer to another table, a literal, a length or + distance, an end-of-block, or an invalid code. For a table + pointer, the low four bits of op is the number of index bits of + that table. For a length or distance, the low four bits of op + is the number of extra bits to get after the code. bits is + the number of bits in this code or part of the code to drop off + of the bit buffer. val is the actual byte to output in the case + of a literal, the base length or distance, or the offset from + the current table to the next table. Each entry is four bytes. */ +typedef struct { + unsigned char op; /* operation, extra bits, table bits */ + unsigned char bits; /* bits in this part of the code */ + unsigned short val; /* offset in table or code value */ +} code; + +/* op values as set by inflate_table(): + 00000000 - literal + 0000tttt - table link, tttt != 0 is the number of table index bits + 0001eeee - length or distance, eeee is the number of extra bits + 01100000 - end of block + 01000000 - invalid code + */ + +/* Maximum size of the dynamic table. The maximum number of code structures is + 1444, which is the sum of 852 for literal/length codes and 592 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribtution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns returns 852, and "enough 30 6 15" for distance codes returns 592. + The initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in inflate.c and infback.c. If the root table size is + changed, then these maximum sizes would be need to be recalculated and + updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 592 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) + +/* Type of code to build for inflate_table() */ +typedef enum { + CODES, + LENS, + DISTS +} codetype; + +int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work)); diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/make_vms.com b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/make_vms.com new file mode 100644 index 000000000..65e9d0cbc --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/make_vms.com @@ -0,0 +1,867 @@ +$! make libz under VMS written by +$! Martin P.J. Zinser +$! +$! In case of problems with the install you might contact me at +$! zinser@zinser.no-ip.info(preferred) or +$! martin.zinser@eurexchange.com (work) +$! +$! Make procedure history for Zlib +$! +$!------------------------------------------------------------------------------ +$! Version history +$! 0.01 20060120 First version to receive a number +$! 0.02 20061008 Adapt to new Makefile.in +$! 0.03 20091224 Add support for large file check +$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite +$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in +$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples +$! subdir path, update module search in makefile.in +$! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned +$! shared image creation +$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared +$! image +$! 0.09 20120305 SMS. P1 sets builder ("MMK", "MMS", " " (built-in)). +$! "" -> automatic, preference: MMK, MMS, built-in. +$! +$ on error then goto err_exit +$! +$ true = 1 +$ false = 0 +$ tmpnam = "temp_" + f$getjpi("","pid") +$ tt = tmpnam + ".txt" +$ tc = tmpnam + ".c" +$ th = tmpnam + ".h" +$ define/nolog tconfig 'th' +$ its_decc = false +$ its_vaxc = false +$ its_gnuc = false +$ s_case = False +$! +$! Setup variables holding "config" information +$! +$ Make = "''p1'" +$ name = "Zlib" +$ version = "?.?.?" +$ v_string = "ZLIB_VERSION" +$ v_file = "zlib.h" +$ ccopt = "/include = []" +$ lopts = "" +$ dnsrl = "" +$ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in" +$ conf_check_string = "" +$ linkonly = false +$ optfile = name + ".opt" +$ mapfile = name + ".map" +$ libdefs = "" +$ vax = f$getsyi("HW_MODEL").lt.1024 +$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 +$ ia64 = f$getsyi("HW_MODEL").ge.4096 +$! +$! 2012-03-05 SMS. +$! Why is this needed? And if it is needed, why not simply ".not. vax"? +$! +$!!! if axp .or. ia64 then set proc/parse=extended +$! +$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL") +$ mydef = F$parse(whoami,,,"DEVICE") +$ mydir = f$parse(whoami,,,"DIRECTORY") - "][" +$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type") +$! +$! Check for MMK/MMS +$! +$ if (Make .eqs. "") +$ then +$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" +$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" +$ else +$ Make = f$edit( Make, "trim") +$ endif +$! +$ gosub find_version +$! +$ open/write topt tmp.opt +$ open/write optf 'optfile' +$! +$ gosub check_opts +$! +$! Look for the compiler used +$! +$ gosub check_compiler +$ close topt +$ close optf +$! +$ if its_decc +$ then +$ ccopt = "/prefix=all" + ccopt +$ if f$trnlnm("SYS") .eqs. "" +$ then +$ if axp +$ then +$ define sys sys$library: +$ else +$ ccopt = "/decc" + ccopt +$ define sys decc$library_include: +$ endif +$ endif +$! +$! 2012-03-05 SMS. +$! Why /NAMES = AS_IS? Why not simply ".not. vax"? And why not on VAX? +$! +$ if axp .or. ia64 +$ then +$ ccopt = ccopt + "/name=as_is/opt=(inline=speed)" +$ s_case = true +$ endif +$ endif +$ if its_vaxc .or. its_gnuc +$ then +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ endif +$! +$! Build a fake configure input header +$! +$ open/write conf_hin config.hin +$ write conf_hin "#undef _LARGEFILE64_SOURCE" +$ close conf_hin +$! +$! +$ i = 0 +$FIND_ACONF: +$ fname = f$element(i,"#",aconf_in_file) +$ if fname .eqs. "#" then goto AMISS_ERR +$ if f$search(fname) .eqs. "" +$ then +$ i = i + 1 +$ goto find_aconf +$ endif +$ open/read/err=aconf_err aconf_in 'fname' +$ open/write aconf zconf.h +$ACONF_LOOP: +$ read/end_of_file=aconf_exit aconf_in line +$ work = f$edit(line, "compress,trim") +$ if f$extract(0,6,work) .nes. "#undef" +$ then +$ if f$extract(0,12,work) .nes. "#cmakedefine" +$ then +$ write aconf line +$ endif +$ else +$ cdef = f$element(1," ",work) +$ gosub check_config +$ endif +$ goto aconf_loop +$ACONF_EXIT: +$ write aconf "" +$ write aconf "/* VMS specifics added by make_vms.com: */" +$ write aconf "#define VMS 1" +$ write aconf "#include " +$ write aconf "#include " +$ write aconf "#ifdef _LARGEFILE" +$ write aconf "# define off64_t __off64_t" +$ write aconf "# define fopen64 fopen" +$ write aconf "# define fseeko64 fseeko" +$ write aconf "# define lseek64 lseek" +$ write aconf "# define ftello64 ftell" +$ write aconf "#endif" +$ write aconf "#if !defined( __VAX) && (__CRTL_VER >= 70312000)" +$ write aconf "# define HAVE_VSNPRINTF" +$ write aconf "#endif" +$ close aconf_in +$ close aconf +$ if f$search("''th'") .nes. "" then delete 'th';* +$! Build the thing plain or with mms +$! +$ write sys$output "Compiling Zlib sources ..." +$ if make.eqs."" +$ then +$ if (f$search( "example.obj;*") .nes. "") then delete example.obj;* +$ if (f$search( "minigzip.obj;*") .nes. "") then delete minigzip.obj;* +$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - + adler32.c zlib.h zconf.h +$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - + compress.c zlib.h zconf.h +$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - + crc32.c zlib.h zconf.h +$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - + deflate.c deflate.h zutil.h zlib.h zconf.h +$ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" - + gzclose.c zutil.h zlib.h zconf.h +$ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" - + gzlib.c zutil.h zlib.h zconf.h +$ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" - + gzread.c zutil.h zlib.h zconf.h +$ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" - + gzwrite.c zutil.h zlib.h zconf.h +$ CALL MAKE infback.OBJ "CC ''CCOPT' infback" - + infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h +$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - + inffast.c zutil.h zlib.h zconf.h inffast.h +$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" - + inflate.c zutil.h zlib.h zconf.h infblock.h +$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" - + inftrees.c zutil.h zlib.h zconf.h inftrees.h +$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" - + trees.c deflate.h zutil.h zlib.h zconf.h +$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" - + uncompr.c zlib.h zconf.h +$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - + zutil.c zutil.h zlib.h zconf.h +$ write sys$output "Building Zlib ..." +$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ +$ write sys$output "Building example..." +$ CALL MAKE example.OBJ "CC ''CCOPT' [.test]example" - + [.test]example.c zlib.h zconf.h +$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb +$ write sys$output "Building minigzip..." +$ CALL MAKE minigzip.OBJ "CC ''CCOPT' [.test]minigzip" - + [.test]minigzip.c zlib.h zconf.h +$ call make minigzip.exe - + "LINK minigzip,libz.olb/lib" - + minigzip.obj libz.olb +$ else +$ gosub crea_mms +$ write sys$output "Make ''name' ''version' with ''Make' " +$ 'make' +$ endif +$! +$! Create shareable image +$! +$ gosub crea_olist +$ write sys$output "Creating libzshr.exe" +$ call map_2_shopt 'mapfile' 'optfile' +$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt +$ write sys$output "Zlib build completed" +$ delete/nolog tmp.opt;* +$ exit +$AMISS_ERR: +$ write sys$output "No source for config.hin found." +$ write sys$output "Tried any of ''aconf_in_file'" +$ goto err_exit +$CC_ERR: +$ write sys$output "C compiler required to build ''name'" +$ goto err_exit +$ERR_EXIT: +$ set message/facil/ident/sever/text +$ close/nolog optf +$ close/nolog topt +$ close/nolog aconf_in +$ close/nolog aconf +$ close/nolog out +$ close/nolog min +$ close/nolog mod +$ close/nolog h_in +$ write sys$output "Exiting..." +$ exit 2 +$! +$! +$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES +$ V = 'F$Verify(0) +$! P1 = What we are trying to make +$! P2 = Command to make it +$! P3 - P8 What it depends on +$ +$ If F$Search(P1) .Eqs. "" Then Goto Makeit +$ Time = F$CvTime(F$File(P1,"RDT")) +$arg=3 +$Loop: +$ Argument = P'arg +$ If Argument .Eqs. "" Then Goto Exit +$ El=0 +$Loop2: +$ File = F$Element(El," ",Argument) +$ If File .Eqs. " " Then Goto Endl +$ AFile = "" +$Loop3: +$ OFile = AFile +$ AFile = F$Search(File) +$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl +$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit +$ Goto Loop3 +$NextEL: +$ El = El + 1 +$ Goto Loop2 +$EndL: +$ arg=arg+1 +$ If arg .Le. 8 Then Goto Loop +$ Goto Exit +$ +$Makeit: +$ VV=F$VERIFY(0) +$ write sys$output P2 +$ 'P2 +$ VV='F$Verify(VV) +$Exit: +$ If V Then Set Verify +$ENDSUBROUTINE +$!------------------------------------------------------------------------------ +$! +$! Check command line options and set symbols accordingly +$! +$!------------------------------------------------------------------------------ +$! Version history +$! 0.01 20041206 First version to receive a number +$! 0.02 20060126 Add new "HELP" target +$ CHECK_OPTS: +$ i = 1 +$ OPT_LOOP: +$ if i .lt. 9 +$ then +$ cparm = f$edit(p'i',"upcase") +$! +$! Check if parameter actually contains something +$! +$ if f$edit(cparm,"trim") .nes. "" +$ then +$ if cparm .eqs. "DEBUG" +$ then +$ ccopt = ccopt + "/noopt/deb" +$ lopts = lopts + "/deb" +$ endif +$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ ccopt = ccopt + f$extract(start,len,cparm) +$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - + then s_case = true +$ endif +$ if cparm .eqs. "LINK" then linkonly = true +$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ lopts = lopts + f$extract(start,len,cparm) +$ endif +$ if f$locate("CC=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ cc_com = f$extract(start,len,cparm) + if (cc_com .nes. "DECC") .and. - + (cc_com .nes. "VAXC") .and. - + (cc_com .nes. "GNUC") +$ then +$ write sys$output "Unsupported compiler choice ''cc_com' ignored" +$ write sys$output "Use DECC, VAXC, or GNUC instead" +$ else +$ if cc_com .eqs. "DECC" then its_decc = true +$ if cc_com .eqs. "VAXC" then its_vaxc = true +$ if cc_com .eqs. "GNUC" then its_gnuc = true +$ endif +$ endif +$ if f$locate("MAKE=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ mmks = f$extract(start,len,cparm) +$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") +$ then +$ make = mmks +$ else +$ write sys$output "Unsupported make choice ''mmks' ignored" +$ write sys$output "Use MMK or MMS instead" +$ endif +$ endif +$ if cparm .eqs. "HELP" then gosub bhelp +$ endif +$ i = i + 1 +$ goto opt_loop +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Look for the compiler used +$! +$! Version history +$! 0.01 20040223 First version to receive a number +$! 0.02 20040229 Save/set value of decc$no_rooted_search_lists +$! 0.03 20060202 Extend handling of GNU C +$! 0.04 20090402 Compaq -> hp +$CHECK_COMPILER: +$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) +$ then +$ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "") +$ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "") +$ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "") +$ endif +$! +$! Exit if no compiler available +$! +$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) +$ then goto CC_ERR +$ else +$ if its_decc +$ then +$ write sys$output "CC compiler check ... hp C" +$ if f$trnlnm("decc$no_rooted_search_lists") .nes. "" +$ then +$ dnrsl = f$trnlnm("decc$no_rooted_search_lists") +$ endif +$ define/nolog decc$no_rooted_search_lists 1 +$ else +$ if its_vaxc then write sys$output "CC compiler check ... VAX C" +$ if its_gnuc +$ then +$ write sys$output "CC compiler check ... GNU C" +$ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib" +$ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib" +$ cc = "gcc" +$ endif +$ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share" +$ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share" +$ endif +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! If MMS/MMK are available dump out the descrip.mms if required +$! +$CREA_MMS: +$ write sys$output "Creating descrip.mms..." +$ create descrip.mms +$ open/append out descrip.mms +$ copy sys$input: out +$ deck +# descrip.mms: MMS description file for building zlib on VMS +# written by Martin P.J. Zinser +# + +OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ + gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\ + deflate.obj, trees.obj, zutil.obj, inflate.obj, \ + inftrees.obj, inffast.obj + +$ eod +$ write out "CFLAGS=", ccopt +$ write out "LOPTS=", lopts +$ write out "all : example.exe minigzip.exe libz.olb" +$ copy sys$input: out +$ deck + @ write sys$output " Example applications available" + +libz.olb : libz.olb($(OBJS)) + @ write sys$output " libz available" + +example.exe : example.obj libz.olb + link $(LOPTS) example,libz.olb/lib + +minigzip.exe : minigzip.obj libz.olb + link $(LOPTS) minigzip,libz.olb/lib + +clean : + delete *.obj;*,libz.olb;*,*.opt;*,*.exe;* + + +# Other dependencies. +adler32.obj : adler32.c zutil.h zlib.h zconf.h +compress.obj : compress.c zlib.h zconf.h +crc32.obj : crc32.c zutil.h zlib.h zconf.h +deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h +example.obj : [.test]example.c zlib.h zconf.h +gzclose.obj : gzclose.c zutil.h zlib.h zconf.h +gzlib.obj : gzlib.c zutil.h zlib.h zconf.h +gzread.obj : gzread.c zutil.h zlib.h zconf.h +gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h +inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h +inflate.obj : inflate.c zutil.h zlib.h zconf.h +inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h +minigzip.obj : [.test]minigzip.c zlib.h zconf.h +trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h +uncompr.obj : uncompr.c zlib.h zconf.h +zutil.obj : zutil.c zutil.h zlib.h zconf.h +infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h +$ eod +$ close out +$ return +$!------------------------------------------------------------------------------ +$! +$! Read list of core library sources from makefile.in and create options +$! needed to build shareable image +$! +$CREA_OLIST: +$ open/read min makefile.in +$ open/write mod modules.opt +$ src_check_list = "OBJZ =#OBJG =" +$MRLOOP: +$ read/end=mrdone min rec +$ i = 0 +$SRC_CHECK_LOOP: +$ src_check = f$element(i, "#", src_check_list) +$ i = i+1 +$ if src_check .eqs. "#" then goto mrloop +$ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop +$ rec = rec - src_check +$ gosub extra_filnam +$ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop +$MRSLOOP: +$ read/end=mrdone min rec +$ gosub extra_filnam +$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop +$MRDONE: +$ close min +$ close mod +$ return +$!------------------------------------------------------------------------------ +$! +$! Take record extracted in crea_olist and split it into single filenames +$! +$EXTRA_FILNAM: +$ myrec = f$edit(rec - "\", "trim,compress") +$ i = 0 +$FELOOP: +$ srcfil = f$element(i," ", myrec) +$ if (srcfil .nes. " ") +$ then +$ write mod f$parse(srcfil,,,"NAME"), ".obj" +$ i = i + 1 +$ goto feloop +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Find current Zlib version number +$! +$FIND_VERSION: +$ open/read h_in 'v_file' +$hloop: +$ read/end=hdone h_in rec +$ rec = f$edit(rec,"TRIM") +$ if (f$extract(0,1,rec) .nes. "#") then goto hloop +$ rec = f$edit(rec - "#", "TRIM") +$ if f$element(0," ",rec) .nes. "define" then goto hloop +$ if f$element(1," ",rec) .eqs. v_string +$ then +$ version = 'f$element(2," ",rec)' +$ goto hdone +$ endif +$ goto hloop +$hdone: +$ close h_in +$ return +$!------------------------------------------------------------------------------ +$! +$CHECK_CONFIG: +$! +$ in_ldef = f$locate(cdef,libdefs) +$ if (in_ldef .lt. f$length(libdefs)) +$ then +$ write aconf "#define ''cdef' 1" +$ libdefs = f$extract(0,in_ldef,libdefs) + - + f$extract(in_ldef + f$length(cdef) + 1, - + f$length(libdefs) - in_ldef - f$length(cdef) - 1, - + libdefs) +$ else +$ if (f$type('cdef') .eqs. "INTEGER") +$ then +$ write aconf "#define ''cdef' ", 'cdef' +$ else +$ if (f$type('cdef') .eqs. "STRING") +$ then +$ write aconf "#define ''cdef' ", """", '''cdef'', """" +$ else +$ gosub check_cc_def +$ endif +$ endif +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Check if this is a define relating to the properties of the C/C++ +$! compiler +$! +$ CHECK_CC_DEF: +$ if (cdef .eqs. "_LARGEFILE64_SOURCE") +$ then +$ copy sys$input: 'tc' +$ deck +#include "tconfig" +#define _LARGEFILE +#include + +int main(){ +FILE *fp; + fp = fopen("temp.txt","r"); + fseeko(fp,1,SEEK_SET); + fclose(fp); +} + +$ eod +$ test_inv = false +$ comm_h = false +$ gosub cc_prop_check +$ return +$ endif +$ write aconf "/* ", line, " */" +$ return +$!------------------------------------------------------------------------------ +$! +$! Check for properties of C/C++ compiler +$! +$! Version history +$! 0.01 20031020 First version to receive a number +$! 0.02 20031022 Added logic for defines with value +$! 0.03 20040309 Make sure local config file gets not deleted +$! 0.04 20041230 Also write include for configure run +$! 0.05 20050103 Add processing of "comment defines" +$CC_PROP_CHECK: +$ cc_prop = true +$ is_need = false +$ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true) +$ if f$search(th) .eqs. "" then create 'th' +$ set message/nofac/noident/nosever/notext +$ on error then continue +$ cc 'tmpnam' +$ if .not. ($status) then cc_prop = false +$ on error then continue +$! The headers might lie about the capabilities of the RTL +$ link 'tmpnam',tmp.opt/opt +$ if .not. ($status) then cc_prop = false +$ set message/fac/ident/sever/text +$ on error then goto err_exit +$ delete/nolog 'tmpnam'.*;*/exclude='th' +$ if (cc_prop .and. .not. is_need) .or. - + (.not. cc_prop .and. is_need) +$ then +$ write sys$output "Checking for ''cdef'... yes" +$ if f$type('cdef_val'_yes) .nes. "" +$ then +$ if f$type('cdef_val'_yes) .eqs. "INTEGER" - + then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes) +$ if f$type('cdef_val'_yes) .eqs. "STRING" - + then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes) +$ else +$ call write_config f$fao("#define !AS 1",cdef) +$ endif +$ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. - + (cdef .eqs. "_LARGEFILE64_SOURCE") then - + call write_config f$string("#define _LARGEFILE 1") +$ else +$ write sys$output "Checking for ''cdef'... no" +$ if (comm_h) +$ then + call write_config f$fao("/* !AS */",line) +$ else +$ if f$type('cdef_val'_no) .nes. "" +$ then +$ if f$type('cdef_val'_no) .eqs. "INTEGER" - + then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no) +$ if f$type('cdef_val'_no) .eqs. "STRING" - + then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no) +$ else +$ call write_config f$fao("#undef !AS",cdef) +$ endif +$ endif +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Check for properties of C/C++ compiler with multiple result values +$! +$! Version history +$! 0.01 20040127 First version +$! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05 +$CC_MPROP_CHECK: +$ cc_prop = true +$ i = 1 +$ idel = 1 +$ MT_LOOP: +$ if f$type(result_'i') .eqs. "STRING" +$ then +$ set message/nofac/noident/nosever/notext +$ on error then continue +$ cc 'tmpnam'_'i' +$ if .not. ($status) then cc_prop = false +$ on error then continue +$! The headers might lie about the capabilities of the RTL +$ link 'tmpnam'_'i',tmp.opt/opt +$ if .not. ($status) then cc_prop = false +$ set message/fac/ident/sever/text +$ on error then goto err_exit +$ delete/nolog 'tmpnam'_'i'.*;* +$ if (cc_prop) +$ then +$ write sys$output "Checking for ''cdef'... ", mdef_'i' +$ if f$type(mdef_'i') .eqs. "INTEGER" - + then call write_config f$fao("#define !AS !UL",cdef,mdef_'i') +$ if f$type('cdef_val'_yes) .eqs. "STRING" - + then call write_config f$fao("#define !AS !AS",cdef,mdef_'i') +$ goto msym_clean +$ else +$ i = i + 1 +$ goto mt_loop +$ endif +$ endif +$ write sys$output "Checking for ''cdef'... no" +$ call write_config f$fao("#undef !AS",cdef) +$ MSYM_CLEAN: +$ if (idel .le. msym_max) +$ then +$ delete/sym mdef_'idel' +$ idel = idel + 1 +$ goto msym_clean +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Write configuration to both permanent and temporary config file +$! +$! Version history +$! 0.01 20031029 First version to receive a number +$! +$WRITE_CONFIG: SUBROUTINE +$ write aconf 'p1' +$ open/append confh 'th' +$ write confh 'p1' +$ close confh +$ENDSUBROUTINE +$!------------------------------------------------------------------------------ +$! +$! Analyze the project map file and create the symbol vector for a shareable +$! image from it +$! +$! Version history +$! 0.01 20120128 First version +$! 0.02 20120226 Add pre-load logic +$! +$ MAP_2_SHOPT: Subroutine +$! +$ SAY := "WRITE_ SYS$OUTPUT" +$! +$ IF F$SEARCH("''P1'") .EQS. "" +$ THEN +$ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available" +$ goto exit_m2s +$ ENDIF +$ IF "''P2'" .EQS. "" +$ THEN +$ SAY "MAP_2_SHOPT: Error, no output file provided" +$ goto exit_m2s +$ ENDIF +$! +$ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary" +$ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread" +$ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary" +$ module4 = "inflateSync#uncompress#zlibVersion#compress" +$ open/read map 'p1 +$ if axp .or. ia64 +$ then +$ open/write aopt a.opt +$ open/write bopt b.opt +$ write aopt " CASE_SENSITIVE=YES" +$ write bopt "SYMBOL_VECTOR= (-" +$ mod_sym_num = 1 +$ MOD_SYM_LOOP: +$ if f$type(module'mod_sym_num') .nes. "" +$ then +$ mod_in = 0 +$ MOD_SYM_IN: +$ shared_proc = f$element(mod_in, "#", module'mod_sym_num') +$ if shared_proc .nes. "#" +$ then +$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- + f$edit(shared_proc,"upcase"),shared_proc) +$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) +$ mod_in = mod_in + 1 +$ goto mod_sym_in +$ endif +$ mod_sym_num = mod_sym_num + 1 +$ goto mod_sym_loop +$ endif +$MAP_LOOP: +$ read/end=map_end map line +$ if (f$locate("{",line).lt. f$length(line)) .or. - + (f$locate("global:", line) .lt. f$length(line)) +$ then +$ proc = true +$ goto map_loop +$ endif +$ if f$locate("}",line).lt. f$length(line) then proc = false +$ if f$locate("local:", line) .lt. f$length(line) then proc = false +$ if proc +$ then +$ shared_proc = f$edit(line,"collapse") +$ chop_semi = f$locate(";", shared_proc) +$ if chop_semi .lt. f$length(shared_proc) then - + shared_proc = f$extract(0, chop_semi, shared_proc) +$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- + f$edit(shared_proc,"upcase"),shared_proc) +$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) +$ endif +$ goto map_loop +$MAP_END: +$ close/nolog aopt +$ close/nolog bopt +$ open/append libopt 'p2' +$ open/read aopt a.opt +$ open/read bopt b.opt +$ALOOP: +$ read/end=aloop_end aopt line +$ write libopt line +$ goto aloop +$ALOOP_END: +$ close/nolog aopt +$ sv = "" +$BLOOP: +$ read/end=bloop_end bopt svn +$ if (svn.nes."") +$ then +$ if (sv.nes."") then write libopt sv +$ sv = svn +$ endif +$ goto bloop +$BLOOP_END: +$ write libopt f$extract(0,f$length(sv)-2,sv), "-" +$ write libopt ")" +$ close/nolog bopt +$ delete/nolog/noconf a.opt;*,b.opt;* +$ else +$ if vax +$ then +$ open/append libopt 'p2' +$ mod_sym_num = 1 +$ VMOD_SYM_LOOP: +$ if f$type(module'mod_sym_num') .nes. "" +$ then +$ mod_in = 0 +$ VMOD_SYM_IN: +$ shared_proc = f$element(mod_in, "#", module'mod_sym_num') +$ if shared_proc .nes. "#" +$ then +$ write libopt f$fao("UNIVERSAL=!AS",- + f$edit(shared_proc,"upcase")) +$ mod_in = mod_in + 1 +$ goto vmod_sym_in +$ endif +$ mod_sym_num = mod_sym_num + 1 +$ goto vmod_sym_loop +$ endif +$VMAP_LOOP: +$ read/end=vmap_end map line +$ if (f$locate("{",line).lt. f$length(line)) .or. - + (f$locate("global:", line) .lt. f$length(line)) +$ then +$ proc = true +$ goto vmap_loop +$ endif +$ if f$locate("}",line).lt. f$length(line) then proc = false +$ if f$locate("local:", line) .lt. f$length(line) then proc = false +$ if proc +$ then +$ shared_proc = f$edit(line,"collapse") +$ chop_semi = f$locate(";", shared_proc) +$ if chop_semi .lt. f$length(shared_proc) then - + shared_proc = f$extract(0, chop_semi, shared_proc) +$ write libopt f$fao("UNIVERSAL=!AS",- + f$edit(shared_proc,"upcase")) +$ endif +$ goto vmap_loop +$VMAP_END: +$ else +$ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)" +$ write sys$output "No options file created" +$ endif +$ endif +$ EXIT_M2S: +$ close/nolog map +$ close/nolog libopt +$ endsubroutine diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.bor b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.bor new file mode 100644 index 000000000..3d12a2c25 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.bor @@ -0,0 +1,115 @@ +# Makefile for zlib +# Borland C++ +# Last updated: 15-Mar-2003 + +# To use, do "make -fmakefile.bor" +# To compile in small model, set below: MODEL=s + +# WARNING: the small model is supported but only for small values of +# MAX_WBITS and MAX_MEM_LEVEL. For example: +# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to the LOC macro below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See zconf.h for details about the memory requirements. + +# ------------ Turbo C++, Borland C++ ------------ + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_ZLIB) + +# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 0 + +# memory model: one of s, m, c, l (small, medium, compact, large) +MODEL=l + +# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version +CC=bcc +LD=bcc +AR=tlib + +# compiler flags +# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0 +CFLAGS=-O2 -Z -m$(MODEL) $(LOC) + +LDFLAGS=-m$(MODEL) -f- + + +# variables +ZLIB_LIB = zlib_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: test/example.c zlib.h zconf.h + +minigzip.obj: test/minigzip.c zlib.h zconf.h + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del zlib_*.bak + -del foo.gz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.dj2 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.dj2 new file mode 100644 index 000000000..59d2037d6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.dj2 @@ -0,0 +1,104 @@ +# Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. +# Copyright (C) 1995-1998 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.dj2; make test -fmakefile.dj2 +# +# To install libz.a, zconf.h and zlib.h in the djgpp directories, type: +# +# make install -fmakefile.dj2 +# +# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as +# in the sample below if the pattern of the DJGPP distribution is to +# be followed. Remember that, while 'es around <=> are ignored in +# makefiles, they are *not* in batch files or in djgpp.env. +# - - - - - +# [make] +# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include +# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib +# BUTT=-m486 +# - - - - - +# Alternately, these variables may be defined below, overriding the values +# in djgpp.env, as +# INCLUDE_PATH=c:\usr\include +# LIBRARY_PATH=c:\usr\lib + +CC=gcc + +#CFLAGS=-MMD -O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-MMD -g -DZLIB_DEBUG +CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + -Wstrict-prototypes -Wmissing-prototypes + +# If cp.exe is available, replace "copy /Y" with "cp -fp" . +CP=copy /Y +# If gnu install.exe is available, replace $(CP) with ginstall. +INSTALL=$(CP) +# The default value of RM is "rm -f." If "rm.exe" is found, comment out: +RM=del +LDLIBS=-L. -lz +LD=$(CC) -s -o +LDSHARED=$(CC) + +INCL=zlib.h zconf.h +LIBS=libz.a + +AR=ar rcs + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o + +OBJA = +# to use the asm code: make OBJA=match.o + +TEST_OBJS = example.o minigzip.o + +all: example.exe minigzip.exe + +check: test +test: all + ./example + echo hello world | .\minigzip | .\minigzip -d + +%.o : %.c + $(CC) $(CFLAGS) -c $< -o $@ + +libz.a: $(OBJS) $(OBJA) + $(AR) $@ $(OBJS) $(OBJA) + +%.exe : %.o $(LIBS) + $(LD) $@ $< $(LDLIBS) + +# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env . + +.PHONY : uninstall clean + +install: $(INCL) $(LIBS) + -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) + -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) + $(INSTALL) zlib.h $(INCLUDE_PATH) + $(INSTALL) zconf.h $(INCLUDE_PATH) + $(INSTALL) libz.a $(LIBRARY_PATH) + +uninstall: + $(RM) $(INCLUDE_PATH)\zlib.h + $(RM) $(INCLUDE_PATH)\zconf.h + $(RM) $(LIBRARY_PATH)\libz.a + +clean: + $(RM) *.d + $(RM) *.o + $(RM) *.exe + $(RM) libz.a + $(RM) foo.gz + +DEPS := $(wildcard *.d) +ifneq ($(DEPS),) +include $(DEPS) +endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.emx b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.emx new file mode 100644 index 000000000..e30f67bed --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.emx @@ -0,0 +1,69 @@ +# Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98. +# Copyright (C) 1995-1998 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.emx; make test -fmakefile.emx +# + +CC=gcc + +#CFLAGS=-MMD -O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-MMD -g -DZLIB_DEBUG +CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + -Wstrict-prototypes -Wmissing-prototypes + +# If cp.exe is available, replace "copy /Y" with "cp -fp" . +CP=copy /Y +# If gnu install.exe is available, replace $(CP) with ginstall. +INSTALL=$(CP) +# The default value of RM is "rm -f." If "rm.exe" is found, comment out: +RM=del +LDLIBS=-L. -lzlib +LD=$(CC) -s -o +LDSHARED=$(CC) + +INCL=zlib.h zconf.h +LIBS=zlib.a + +AR=ar rcs + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: example.exe minigzip.exe + +test: all + ./example + echo hello world | .\minigzip | .\minigzip -d + +%.o : %.c + $(CC) $(CFLAGS) -c $< -o $@ + +zlib.a: $(OBJS) + $(AR) $@ $(OBJS) + +%.exe : %.o $(LIBS) + $(LD) $@ $< $(LDLIBS) + + +.PHONY : clean + +clean: + $(RM) *.d + $(RM) *.o + $(RM) *.exe + $(RM) zlib.a + $(RM) foo.gz + +DEPS := $(wildcard *.d) +ifneq ($(DEPS),) +include $(DEPS) +endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.msc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.msc new file mode 100644 index 000000000..ae8378615 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.msc @@ -0,0 +1,112 @@ +# Makefile for zlib +# Microsoft C 5.1 or later +# Last updated: 19-Mar-2003 + +# To use, do "make makefile.msc" +# To compile in small model, set below: MODEL=S + +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to the LOC macro below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See zconf.h for details about the memory requirements. + +# ------------- Microsoft C 5.1 and later ------------- + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_ZLIB) + +# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 0 + +# Memory model: one of S, M, C, L (small, medium, compact, large) +MODEL=L + +CC=cl +CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC) +#-Ox generates bad code with MSC 5.1 +LIB_CFLAGS=-Zl $(CFLAGS) + +LD=link +LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode +# "/farcall/packcode" are only useful for `large code' memory models +# but should be a "no-op" for small code models. + + +# variables +ZLIB_LIB = zlib_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(LIB_CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: test/example.c zlib.h zconf.h + $(CC) -c $(CFLAGS) $*.c + +minigzip.obj: test/minigzip.c zlib.h zconf.h + $(CC) -c $(CFLAGS) $*.c + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + if exist $(ZLIB_LIB) del $(ZLIB_LIB) + lib $(ZLIB_LIB) $(OBJ1); + lib $(ZLIB_LIB) $(OBJ2); + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB); + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB); + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del *.map + -del zlib_*.bak + -del foo.gz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.tc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.tc new file mode 100644 index 000000000..5aec82a9d --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/msdos/Makefile.tc @@ -0,0 +1,100 @@ +# Makefile for zlib +# Turbo C 2.01, Turbo C++ 1.01 +# Last updated: 15-Mar-2003 + +# To use, do "make -fmakefile.tc" +# To compile in small model, set below: MODEL=s + +# WARNING: the small model is supported but only for small values of +# MAX_WBITS and MAX_MEM_LEVEL. For example: +# -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to CFLAGS below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See zconf.h for details about the memory requirements. + +# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------ +MODEL=l +CC=tcc +LD=tcc +AR=tlib +# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 +CFLAGS=-O2 -G -Z -m$(MODEL) +LDFLAGS=-m$(MODEL) -f- + + +# variables +ZLIB_LIB = zlib_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: test/example.c zlib.h zconf.h + +minigzip.obj: test/minigzip.c zlib.h zconf.h + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del zlib_*.bak + -del foo.gz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/Makefile b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/Makefile new file mode 100644 index 000000000..21337d01a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/Makefile @@ -0,0 +1,126 @@ +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- + +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") +endif + +include $(DEVKITARM)/ds_rules + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# DATA is a list of directories containing data files +# INCLUDES is a list of directories containing header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := ../../ +DATA := data +INCLUDES := include + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb -mthumb-interwork + +CFLAGS := -Wall -O2\ + -march=armv5te -mtune=arm946e-s \ + -fomit-frame-pointer -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 +CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions + +ASFLAGS := $(ARCH) -march=armv5te -mtune=arm946e-s +LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(LIBNDS) + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/lib/libz.a + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ + $(foreach dir,$(DATA),$(CURDIR)/$(dir)) + +export DEPSDIR := $(CURDIR)/$(BUILD) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) + +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +ifeq ($(strip $(CPPFILES)),) +#--------------------------------------------------------------------------------- + export LD := $(CC) +#--------------------------------------------------------------------------------- +else +#--------------------------------------------------------------------------------- + export LD := $(CXX) +#--------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------- + +export OFILES := $(addsuffix .o,$(BINFILES)) \ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(CURDIR)/$(BUILD) + +.PHONY: $(BUILD) clean all + +#--------------------------------------------------------------------------------- +all: $(BUILD) + @[ -d $@ ] || mkdir -p include + @cp ../../*.h include + +lib: + @[ -d $@ ] || mkdir -p $@ + +$(BUILD): lib + @[ -d $@ ] || mkdir -p $@ + @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ... + @rm -fr $(BUILD) lib + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT) : $(OFILES) + +#--------------------------------------------------------------------------------- +%.bin.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) + +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/README new file mode 100644 index 000000000..ba7a37dbe --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/nintendods/README @@ -0,0 +1,5 @@ +This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. + +Eduardo Costa +January 3, 2009 + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.emx b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.emx new file mode 100644 index 000000000..612b03791 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.emx @@ -0,0 +1,69 @@ +# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. +# Copyright (C) 1995-1998 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.emx; make test -fmakefile.emx +# + +CC=gcc -Zwin32 + +#CFLAGS=-MMD -O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-MMD -g -DZLIB_DEBUG +CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + -Wstrict-prototypes -Wmissing-prototypes + +# If cp.exe is available, replace "copy /Y" with "cp -fp" . +CP=copy /Y +# If gnu install.exe is available, replace $(CP) with ginstall. +INSTALL=$(CP) +# The default value of RM is "rm -f." If "rm.exe" is found, comment out: +RM=del +LDLIBS=-L. -lzlib +LD=$(CC) -s -o +LDSHARED=$(CC) + +INCL=zlib.h zconf.h +LIBS=zlib.a + +AR=ar rcs + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o + +TEST_OBJS = example.o minigzip.o + +all: example.exe minigzip.exe + +test: all + ./example + echo hello world | .\minigzip | .\minigzip -d + +%.o : %.c + $(CC) $(CFLAGS) -c $< -o $@ + +zlib.a: $(OBJS) + $(AR) $@ $(OBJS) + +%.exe : %.o $(LIBS) + $(LD) $@ $< $(LDLIBS) + + +.PHONY : clean + +clean: + $(RM) *.d + $(RM) *.o + $(RM) *.exe + $(RM) zlib.a + $(RM) foo.gz + +DEPS := $(wildcard *.d) +ifneq ($(DEPS),) +include $(DEPS) +endif diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.riscos b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.riscos new file mode 100644 index 000000000..57e29d3fb --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/Makefile.riscos @@ -0,0 +1,151 @@ +# Project: zlib_1_03 +# Patched for zlib 1.1.2 rw@shadow.org.uk 19980430 +# test works out-of-the-box, installs `somewhere' on demand + +# Toolflags: +CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah +C++flags = -c -depend !Depend -IC: -throwback +Linkflags = -aif -c++ -o $@ +ObjAsmflags = -throwback -NoCache -depend !Depend +CMHGflags = +LibFileflags = -c -l -o $@ +Squeezeflags = -o $@ + +# change the line below to where _you_ want the library installed. +libdest = lib:zlib + +# Final targets: +@.lib: @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \ + @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \ + @.o.uncompr @.o.zutil + LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \ + @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \ + @.o.trees @.o.uncompr @.o.zutil +test: @.minigzip @.example @.lib + @copy @.lib @.libc A~C~DF~L~N~P~Q~RS~TV + @echo running tests: hang on. + @/@.minigzip -f -9 libc + @/@.minigzip -d libc-gz + @/@.minigzip -f -1 libc + @/@.minigzip -d libc-gz + @/@.minigzip -h -9 libc + @/@.minigzip -d libc-gz + @/@.minigzip -h -1 libc + @/@.minigzip -d libc-gz + @/@.minigzip -9 libc + @/@.minigzip -d libc-gz + @/@.minigzip -1 libc + @/@.minigzip -d libc-gz + @diff @.lib @.libc + @echo that should have reported '@.lib and @.libc identical' if you have diff. + @/@.example @.fred @.fred + @echo that will have given lots of hello!'s. + +@.minigzip: @.o.minigzip @.lib C:o.Stubs + Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs +@.example: @.o.example @.lib C:o.Stubs + Link $(Linkflags) @.o.example @.lib C:o.Stubs + +install: @.lib + cdir $(libdest) + cdir $(libdest).h + @copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV + @copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV + @copy @.lib $(libdest).lib A~C~DF~L~N~P~Q~RS~TV + @echo okay, installed zlib in $(libdest) + +clean:; remove @.minigzip + remove @.example + remove @.libc + -wipe @.o.* F~r~cV + remove @.fred + +# User-editable dependencies: +.c.o: + cc $(ccflags) -o $@ $< + +# Static dependencies: + +# Dynamic dependencies: +o.example: c.example +o.example: h.zlib +o.example: h.zconf +o.minigzip: c.minigzip +o.minigzip: h.zlib +o.minigzip: h.zconf +o.adler32: c.adler32 +o.adler32: h.zlib +o.adler32: h.zconf +o.compress: c.compress +o.compress: h.zlib +o.compress: h.zconf +o.crc32: c.crc32 +o.crc32: h.zlib +o.crc32: h.zconf +o.deflate: c.deflate +o.deflate: h.deflate +o.deflate: h.zutil +o.deflate: h.zlib +o.deflate: h.zconf +o.gzio: c.gzio +o.gzio: h.zutil +o.gzio: h.zlib +o.gzio: h.zconf +o.infblock: c.infblock +o.infblock: h.zutil +o.infblock: h.zlib +o.infblock: h.zconf +o.infblock: h.infblock +o.infblock: h.inftrees +o.infblock: h.infcodes +o.infblock: h.infutil +o.infcodes: c.infcodes +o.infcodes: h.zutil +o.infcodes: h.zlib +o.infcodes: h.zconf +o.infcodes: h.inftrees +o.infcodes: h.infblock +o.infcodes: h.infcodes +o.infcodes: h.infutil +o.infcodes: h.inffast +o.inffast: c.inffast +o.inffast: h.zutil +o.inffast: h.zlib +o.inffast: h.zconf +o.inffast: h.inftrees +o.inffast: h.infblock +o.inffast: h.infcodes +o.inffast: h.infutil +o.inffast: h.inffast +o.inflate: c.inflate +o.inflate: h.zutil +o.inflate: h.zlib +o.inflate: h.zconf +o.inflate: h.infblock +o.inftrees: c.inftrees +o.inftrees: h.zutil +o.inftrees: h.zlib +o.inftrees: h.zconf +o.inftrees: h.inftrees +o.inftrees: h.inffixed +o.infutil: c.infutil +o.infutil: h.zutil +o.infutil: h.zlib +o.infutil: h.zconf +o.infutil: h.infblock +o.infutil: h.inftrees +o.infutil: h.infcodes +o.infutil: h.infutil +o.trees: c.trees +o.trees: h.deflate +o.trees: h.zutil +o.trees: h.zlib +o.trees: h.zconf +o.trees: h.trees +o.uncompr: c.uncompr +o.uncompr: h.zlib +o.uncompr: h.zconf +o.zutil: c.zutil +o.zutil: h.zutil +o.zutil: h.zlib +o.zutil: h.zconf diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/README b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/README new file mode 100644 index 000000000..800bf0798 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/README @@ -0,0 +1,3 @@ +This directory contains files that have not been updated for zlib 1.2.x + +(Volunteers are encouraged to help clean this up. Thanks.) diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/descrip.mms b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/descrip.mms new file mode 100644 index 000000000..7066da5b5 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/descrip.mms @@ -0,0 +1,48 @@ +# descrip.mms: MMS description file for building zlib on VMS +# written by Martin P.J. Zinser + +cc_defs = +c_deb = + +.ifdef __DECC__ +pref = /prefix=all +.endif + +OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ + deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ + inftrees.obj, infcodes.obj, infutil.obj, inffast.obj + +CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) + +all : example.exe minigzip.exe + @ write sys$output " Example applications available" +libz.olb : libz.olb($(OBJS)) + @ write sys$output " libz available" + +example.exe : example.obj libz.olb + link example,libz.olb/lib + +minigzip.exe : minigzip.obj libz.olb + link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib + +clean : + delete *.obj;*,libz.olb;* + + +# Other dependencies. +adler32.obj : zutil.h zlib.h zconf.h +compress.obj : zlib.h zconf.h +crc32.obj : zutil.h zlib.h zconf.h +deflate.obj : deflate.h zutil.h zlib.h zconf.h +example.obj : zlib.h zconf.h +gzio.obj : zutil.h zlib.h zconf.h +infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h +infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h +inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h +inflate.obj : zutil.h zlib.h zconf.h infblock.h +inftrees.obj : zutil.h zlib.h zconf.h inftrees.h +infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h +minigzip.obj : zlib.h zconf.h +trees.obj : deflate.h zutil.h zlib.h zconf.h +uncompr.obj : zlib.h zconf.h +zutil.obj : zutil.h zlib.h zconf.h diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/Makefile.os2 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/Makefile.os2 new file mode 100644 index 000000000..bb426c0d8 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/Makefile.os2 @@ -0,0 +1,136 @@ +# Makefile for zlib under OS/2 using GCC (PGCC) +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile and test, type: +# cp Makefile.os2 .. +# cd .. +# make -f Makefile.os2 test + +# This makefile will build a static library z.lib, a shared library +# z.dll and a import library zdll.lib. You can use either z.lib or +# zdll.lib by specifying either -lz or -lzdll on gcc's command line + +CC=gcc -Zomf -s + +CFLAGS=-O6 -Wall +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-g -DZLIB_DEBUG +#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +# -Wstrict-prototypes -Wmissing-prototypes + +#################### BUG WARNING: ##################### +## infcodes.c hits a bug in pgcc-1.0, so you have to use either +## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem) +## This bug is reportedly fixed in pgcc >1.0, but this was not tested +CFLAGS+=-fno-force-mem + +LDFLAGS=-s -L. -lzdll -Zcrtdll +LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll + +VER=1.1.0 +ZLIB=z.lib +SHAREDLIB=z.dll +SHAREDLIBIMP=zdll.lib +LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP) + +AR=emxomfar cr +IMPLIB=emximp +RANLIB=echo +TAR=tar +SHELL=bash + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o + +TEST_OBJS = example.o minigzip.o + +DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ + algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ + nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \ + contrib/asm386/*.asm contrib/asm386/*.c \ + contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \ + contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ + contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 + +all: example.exe minigzip.exe + +test: all + @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + echo hello world | ./minigzip | ./minigzip -d || \ + echo ' *** minigzip test FAILED ***' ; \ + if ./example; then \ + echo ' *** zlib test OK ***'; \ + else \ + echo ' *** zlib test FAILED ***'; \ + fi + +$(ZLIB): $(OBJS) + $(AR) $@ $(OBJS) + -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 + +$(SHAREDLIB): $(OBJS) os2/z.def + $(LDSHARED) -o $@ $^ + +$(SHAREDLIBIMP): os2/z.def + $(IMPLIB) -o $@ $^ + +example.exe: example.o $(LIBS) + $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) + +minigzip.exe: minigzip.o $(LIBS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + +clean: + rm -f *.o *~ example minigzip libz.a libz.so* foo.gz + +distclean: clean + +zip: + mv Makefile Makefile~; cp -p Makefile.in Makefile + rm -f test.c ztest*.c + v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ + zip -ul9 zlib$$v $(DISTFILES) + mv Makefile~ Makefile + +dist: + mv Makefile Makefile~; cp -p Makefile.in Makefile + rm -f test.c ztest*.c + d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ + rm -f $$d.tar.gz; \ + if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ + files=""; \ + for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ + cd ..; \ + GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ + if test ! -d $$d; then rm -f $$d; fi + mv Makefile~ Makefile + +tags: + etags *.[ch] + +depend: + makedepend -- $(CFLAGS) -- *.[ch] + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzio.o: zutil.h zlib.h zconf.h +infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h +infcodes.o: zutil.h zlib.h zconf.h +infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h +inffast.o: infblock.h infcodes.h infutil.h inffast.h +inflate.o: zutil.h zlib.h zconf.h infblock.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/zlib.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/zlib.def new file mode 100644 index 000000000..4c753f1a3 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/os2/zlib.def @@ -0,0 +1,51 @@ +; +; Slightly modified version of ../nt/zlib.dnt :-) +; + +LIBRARY Z +DESCRIPTION "Zlib compression library for OS/2" +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE + +EXPORTS + adler32 + compress + crc32 + deflate + deflateCopy + deflateEnd + deflateInit2_ + deflateInit_ + deflateParams + deflateReset + deflateSetDictionary + gzclose + gzdopen + gzerror + gzflush + gzopen + gzread + gzwrite + inflate + inflateEnd + inflateInit2_ + inflateInit_ + inflateReset + inflateSetDictionary + inflateSync + uncompress + zlibVersion + gzprintf + gzputc + gzgetc + gzseek + gzrewind + gztell + gzeof + gzsetparams + zError + inflateSyncPoint + get_crc_table + compress2 + gzputs + gzgets diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/visual-basic.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/visual-basic.txt new file mode 100644 index 000000000..57efe5812 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/old/visual-basic.txt @@ -0,0 +1,160 @@ +See below some functions declarations for Visual Basic. + +Frequently Asked Question: + +Q: Each time I use the compress function I get the -5 error (not enough + room in the output buffer). + +A: Make sure that the length of the compressed buffer is passed by + reference ("as any"), not by value ("as long"). Also check that + before the call of compress this length is equal to the total size of + the compressed buffer and not zero. + + +From: "Jon Caruana" +Subject: Re: How to port zlib declares to vb? +Date: Mon, 28 Oct 1996 18:33:03 -0600 + +Got the answer! (I haven't had time to check this but it's what I got, and +looks correct): + +He has the following routines working: + compress + uncompress + gzopen + gzwrite + gzread + gzclose + +Declares follow: (Quoted from Carlos Rios , in Vb4 form) + +#If Win16 Then 'Use Win16 calls. +Declare Function compress Lib "ZLIB.DLL" (ByVal compr As + String, comprLen As Any, ByVal buf As String, ByVal buflen + As Long) As Integer +Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr + As String, uncomprLen As Any, ByVal compr As String, ByVal + lcompr As Long) As Integer +Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As + String, ByVal mode As String) As Long +Declare Function gzread Lib "ZLIB.DLL" (ByVal file As + Long, ByVal uncompr As String, ByVal uncomprLen As Integer) + As Integer +Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As + Long, ByVal uncompr As String, ByVal uncomprLen As Integer) + As Integer +Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As + Long) As Integer +#Else +Declare Function compress Lib "ZLIB32.DLL" + (ByVal compr As String, comprLen As Any, ByVal buf As + String, ByVal buflen As Long) As Integer +Declare Function uncompress Lib "ZLIB32.DLL" + (ByVal uncompr As String, uncomprLen As Any, ByVal compr As + String, ByVal lcompr As Long) As Long +Declare Function gzopen Lib "ZLIB32.DLL" + (ByVal file As String, ByVal mode As String) As Long +Declare Function gzread Lib "ZLIB32.DLL" + (ByVal file As Long, ByVal uncompr As String, ByVal + uncomprLen As Long) As Long +Declare Function gzwrite Lib "ZLIB32.DLL" + (ByVal file As Long, ByVal uncompr As String, ByVal + uncomprLen As Long) As Long +Declare Function gzclose Lib "ZLIB32.DLL" + (ByVal file As Long) As Long +#End If + +-Jon Caruana +jon-net@usa.net +Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member + + +Here is another example from Michael that he +says conforms to the VB guidelines, and that solves the problem of not +knowing the uncompressed size by storing it at the end of the file: + +'Calling the functions: +'bracket meaning: [optional] {Range of possible values} +'Call subCompressFile( [, , [level of compression {1..9}]]) +'Call subUncompressFile() + +Option Explicit +Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller' +Private Const SUCCESS As Long = 0 +Private Const strFilExt As String = ".cpr" +Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef +dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long, +ByVal level As Integer) As Long +Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef +dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long) +As Long + +Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal +strargCprFilPth As String, Optional ByVal intLvl As Integer = 9) + Dim strCprPth As String + Dim lngOriSiz As Long + Dim lngCprSiz As Long + Dim bytaryOri() As Byte + Dim bytaryCpr() As Byte + lngOriSiz = FileLen(strargOriFilPth) + ReDim bytaryOri(lngOriSiz - 1) + Open strargOriFilPth For Binary Access Read As #1 + Get #1, , bytaryOri() + Close #1 + strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth) +'Select file path and name + strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) = +strFilExt, "", strFilExt) 'Add file extension if not exists + lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit +more space then original file size + ReDim bytaryCpr(lngCprSiz - 1) + If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) = +SUCCESS Then + lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100 + ReDim Preserve bytaryCpr(lngCprSiz - 1) + Open strCprPth For Binary Access Write As #1 + Put #1, , bytaryCpr() + Put #1, , lngOriSiz 'Add the the original size value to the end +(last 4 bytes) + Close #1 + Else + MsgBox "Compression error" + End If + Erase bytaryCpr + Erase bytaryOri +End Sub + +Public Sub subUncompressFile(ByVal strargFilPth As String) + Dim bytaryCpr() As Byte + Dim bytaryOri() As Byte + Dim lngOriSiz As Long + Dim lngCprSiz As Long + Dim strOriPth As String + lngCprSiz = FileLen(strargFilPth) + ReDim bytaryCpr(lngCprSiz - 1) + Open strargFilPth For Binary Access Read As #1 + Get #1, , bytaryCpr() + Close #1 + 'Read the original file size value: + lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _ + + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _ + + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _ + + bytaryCpr(lngCprSiz - 4) + ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value + ReDim bytaryOri(lngOriSiz - 1) + If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS +Then + strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt)) + Open strOriPth For Binary Access Write As #1 + Put #1, , bytaryOri() + Close #1 + Else + MsgBox "Uncompression error" + End If + Erase bytaryCpr + Erase bytaryOri +End Sub +Public Property Get lngPercentSmaller() As Long + lngPercentSmaller = lngpvtPcnSml +End Property diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/README400 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/README400 new file mode 100644 index 000000000..4f98334f5 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/README400 @@ -0,0 +1,48 @@ + ZLIB version 1.2.11 for OS/400 installation instructions + +1) Download and unpack the zlib tarball to some IFS directory. + (i.e.: /path/to/the/zlib/ifs/source/directory) + + If the installed IFS command suppors gzip format, this is straightforward, +else you have to unpack first to some directory on a system supporting it, +then move the whole directory to the IFS via the network (via SMB or FTP). + +2) Edit the configuration parameters in the compilation script. + + EDTF STMF('/path/to/the/zlib/ifs/source/directory/os400/make.sh') + +Tune the parameters according to your needs if not matching the defaults. +Save the file and exit after edition. + +3) Enter qshell, then work in the zlib OS/400 specific directory. + + QSH + cd /path/to/the/zlib/ifs/source/directory/os400 + +4) Compile and install + + sh make.sh + +The script will: +- create the libraries, objects and IFS directories for the zlib environment, +- compile all modules, +- create a service program, +- create a static and a dynamic binding directory, +- install header files for C/C++ and for ILE/RPG, both for compilation in + DB2 and IFS environments. + +That's all. + + +Notes: For OS/400 ILE RPG programmers, a /copy member defining the ZLIB + API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC). + In the ILE environment, the same definitions are available from + file zlib.inc located in the same IFS include directory as the + C/C++ header files. + Please read comments in this member for more information. + + Remember that most foreign textual data are ASCII coded: this + implementation does not handle conversion from/to ASCII, so + text data code conversions must be done explicitely. + + Mainly for the reason above, always open zipped files in binary mode. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/bndsrc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/bndsrc new file mode 100644 index 000000000..5e6e0a2f0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/bndsrc @@ -0,0 +1,119 @@ +STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.1.3 entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("adler32") + EXPORT SYMBOL("compress") + EXPORT SYMBOL("compress2") + EXPORT SYMBOL("crc32") + EXPORT SYMBOL("get_crc_table") + EXPORT SYMBOL("deflate") + EXPORT SYMBOL("deflateEnd") + EXPORT SYMBOL("deflateSetDictionary") + EXPORT SYMBOL("deflateCopy") + EXPORT SYMBOL("deflateReset") + EXPORT SYMBOL("deflateParams") + EXPORT SYMBOL("deflatePrime") + EXPORT SYMBOL("deflateInit_") + EXPORT SYMBOL("deflateInit2_") + EXPORT SYMBOL("gzopen") + EXPORT SYMBOL("gzdopen") + EXPORT SYMBOL("gzsetparams") + EXPORT SYMBOL("gzread") + EXPORT SYMBOL("gzwrite") + EXPORT SYMBOL("gzprintf") + EXPORT SYMBOL("gzputs") + EXPORT SYMBOL("gzgets") + EXPORT SYMBOL("gzputc") + EXPORT SYMBOL("gzgetc") + EXPORT SYMBOL("gzflush") + EXPORT SYMBOL("gzseek") + EXPORT SYMBOL("gzrewind") + EXPORT SYMBOL("gztell") + EXPORT SYMBOL("gzeof") + EXPORT SYMBOL("gzclose") + EXPORT SYMBOL("gzerror") + EXPORT SYMBOL("inflate") + EXPORT SYMBOL("inflateEnd") + EXPORT SYMBOL("inflateSetDictionary") + EXPORT SYMBOL("inflateSync") + EXPORT SYMBOL("inflateReset") + EXPORT SYMBOL("inflateInit_") + EXPORT SYMBOL("inflateInit2_") + EXPORT SYMBOL("inflateSyncPoint") + EXPORT SYMBOL("uncompress") + EXPORT SYMBOL("zlibVersion") + EXPORT SYMBOL("zError") + EXPORT SYMBOL("z_errmsg") + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.2.1 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("compressBound") + EXPORT SYMBOL("deflateBound") + EXPORT SYMBOL("deflatePending") + EXPORT SYMBOL("gzungetc") + EXPORT SYMBOL("gzclearerr") + EXPORT SYMBOL("inflateBack") + EXPORT SYMBOL("inflateBackEnd") + EXPORT SYMBOL("inflateBackInit_") + EXPORT SYMBOL("inflateCopy") + EXPORT SYMBOL("zlibCompileFlags") + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.2.4 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("adler32_combine") + EXPORT SYMBOL("adler32_combine64") + EXPORT SYMBOL("crc32_combine") + EXPORT SYMBOL("crc32_combine64") + EXPORT SYMBOL("deflateSetHeader") + EXPORT SYMBOL("deflateTune") + EXPORT SYMBOL("gzbuffer") + EXPORT SYMBOL("gzclose_r") + EXPORT SYMBOL("gzclose_w") + EXPORT SYMBOL("gzdirect") + EXPORT SYMBOL("gzoffset") + EXPORT SYMBOL("gzoffset64") + EXPORT SYMBOL("gzopen64") + EXPORT SYMBOL("gzseek64") + EXPORT SYMBOL("gztell64") + EXPORT SYMBOL("inflateGetHeader") + EXPORT SYMBOL("inflateMark") + EXPORT SYMBOL("inflatePrime") + EXPORT SYMBOL("inflateReset2") + EXPORT SYMBOL("inflateUndermine") + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.2.6 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("deflateResetKeep") + EXPORT SYMBOL("gzgetc_") + EXPORT SYMBOL("inflateResetKeep") + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.2.8 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("gzvprintf") + EXPORT SYMBOL("inflateGetDictionary") + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.2.9 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("adler32_z") + EXPORT SYMBOL("crc32_z") + EXPORT SYMBOL("deflateGetDictionary") + EXPORT SYMBOL("gzfread") + EXPORT SYMBOL("gzfwrite") + EXPORT SYMBOL("inflateCodesUsed") + EXPORT SYMBOL("inflateValidate") + EXPORT SYMBOL("uncompress2") + +ENDPGMEXP diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/make.sh b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/make.sh new file mode 100644 index 000000000..19eec117a --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/os400/make.sh @@ -0,0 +1,366 @@ +#!/bin/sh +# +# ZLIB compilation script for the OS/400. +# +# +# This is a shell script since make is not a standard component of OS/400. + + +################################################################################ +# +# Tunable configuration parameters. +# +################################################################################ + +TARGETLIB='ZLIB' # Target OS/400 program library +STATBNDDIR='ZLIB_A' # Static binding directory. +DYNBNDDIR='ZLIB' # Dynamic binding directory. +SRVPGM="ZLIB" # Service program. +IFSDIR='/zlib' # IFS support base directory. +TGTCCSID='500' # Target CCSID of objects +DEBUG='*NONE' # Debug level +OPTIMIZE='40' # Optimisation level +OUTPUT='*NONE' # Compilation output option. +TGTRLS='V6R1M0' # Target OS release + +export TARGETLIB STATBNDDIR DYNBNDDIR SRVPGM IFSDIR +export TGTCCSID DEBUG OPTIMIZE OUTPUT TGTRLS + + +################################################################################ +# +# OS/400 specific definitions. +# +################################################################################ + +LIBIFSNAME="/QSYS.LIB/${TARGETLIB}.LIB" + + +################################################################################ +# +# Procedures. +# +################################################################################ + +# action_needed dest [src] +# +# dest is an object to build +# if specified, src is an object on which dest depends. +# +# exit 0 (succeeds) if some action has to be taken, else 1. + +action_needed() + +{ + [ ! -e "${1}" ] && return 0 + [ "${2}" ] || return 1 + [ "${1}" -ot "${2}" ] && return 0 + return 1 +} + + +# make_module module_name source_name [additional_definitions] +# +# Compile source name into module if needed. +# As side effect, append the module name to variable MODULES. +# Set LINK to "YES" if the module has been compiled. + +make_module() + +{ + MODULES="${MODULES} ${1}" + MODIFSNAME="${LIBIFSNAME}/${1}.MODULE" + CSRC="`basename \"${2}\"`" + + if action_needed "${MODIFSNAME}" "${2}" + then : + elif [ ! "`sed -e \"//,/<\\\\/source>/!d\" \ + -e '/ tmphdrfile + + # Need to translate to target CCSID. + + CMD="CPY OBJ('`pwd`/tmphdrfile') TOOBJ('${DEST}')" + CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)" + system "${CMD}" + # touch -r "${HFILE}" "${DEST}" + rm -f tmphdrfile + fi + + IFSFILE="${IFSDIR}/include/`basename \"${HFILE}\"`" + + if action_needed "${IFSFILE}" "${DEST}" + then rm -f "${IFSFILE}" + ln -s "${DEST}" "${IFSFILE}" + fi +done + + +# Install the ILE/RPG header file. + + +HFILE="${SCRIPTDIR}/zlib.inc" +DEST="${SRCPF}/ZLIB.INC.MBR" + +if action_needed "${DEST}" "${HFILE}" +then CMD="CPY OBJ('${HFILE}') TOOBJ('${DEST}')" + CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)" + system "${CMD}" + # touch -r "${HFILE}" "${DEST}" +fi + +IFSFILE="${IFSDIR}/include/`basename \"${HFILE}\"`" + +if action_needed "${IFSFILE}" "${DEST}" +then rm -f "${IFSFILE}" + ln -s "${DEST}" "${IFSFILE}" +fi + + +# Create and compile the identification source file. + +echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c +echo '#pragma comment(user, __DATE__)' >> os400.c +echo '#pragma comment(user, __TIME__)' >> os400.c +echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c +make_module OS400 os400.c +LINK= # No need to rebuild service program yet. +MODULES= + + +# Get source list. + +CSOURCES=`sed -e '/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Library + + Medium + + 2.0 + + + + zlib + zlib + alain.bonnefoy@icbt.com + Public + public + www.gzip.org/zlib + + + Jean-Loup Gailly,Mark Adler + www.gzip.org/zlib + + zlib@gzip.org + + + A massively spiffy yet delicately unobtrusive compression library. + zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system. + http://www.gzip.org/zlib + + + + + 1.2.11 + Medium + Stable + + + + + + + No License + + + + Software Development/Libraries and Extensions/C Libraries + zlib,compression + qnx6 + qnx6 + None + Developer + + + + + + + + + + + + + + Install + Post + No + Ignore + + No + Optional + + + + + + + + + + + + + InstallOver + zlib + + + + + + + + + + + + + InstallOver + zlib-dev + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/example.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/example.c new file mode 100644 index 000000000..eee17ce7c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/example.c @@ -0,0 +1,602 @@ +/* example.c -- usage example of the zlib compression library + * Copyright (C) 1995-2006, 2011, 2016 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" +#include + +#ifdef STDC +# include +# include +#endif + +#if defined(VMS) || defined(RISCOS) +# define TESTFILE "foo-gz" +#else +# define TESTFILE "foo.gz" +#endif + +#define CHECK_ERR(err, msg) { \ + if (err != Z_OK) { \ + fprintf(stderr, "%s error: %d\n", msg, err); \ + exit(1); \ + } \ +} + +static z_const char hello[] = "hello, hello!"; +/* "hello world" would be more standard, but the repeated "hello" + * stresses the compression code better, sorry... + */ + +static const char dictionary[] = "hello"; +static uLong dictId; /* Adler32 value of the dictionary */ + +void test_deflate OF((Byte *compr, uLong comprLen)); +void test_inflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_large_deflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_large_inflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_flush OF((Byte *compr, uLong *comprLen)); +void test_sync OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_dict_deflate OF((Byte *compr, uLong comprLen)); +void test_dict_inflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +int main OF((int argc, char *argv[])); + + +#ifdef Z_SOLO + +void *myalloc OF((void *, unsigned, unsigned)); +void myfree OF((void *, void *)); + +void *myalloc(q, n, m) + void *q; + unsigned n, m; +{ + (void)q; + return calloc(n, m); +} + +void myfree(void *q, void *p) +{ + (void)q; + free(p); +} + +static alloc_func zalloc = myalloc; +static free_func zfree = myfree; + +#else /* !Z_SOLO */ + +static alloc_func zalloc = (alloc_func)0; +static free_func zfree = (free_func)0; + +void test_compress OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_gzio OF((const char *fname, + Byte *uncompr, uLong uncomprLen)); + +/* =========================================================================== + * Test compress() and uncompress() + */ +void test_compress(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + uLong len = (uLong)strlen(hello)+1; + + err = compress(compr, &comprLen, (const Bytef*)hello, len); + CHECK_ERR(err, "compress"); + + strcpy((char*)uncompr, "garbage"); + + err = uncompress(uncompr, &uncomprLen, compr, comprLen); + CHECK_ERR(err, "uncompress"); + + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad uncompress\n"); + exit(1); + } else { + printf("uncompress(): %s\n", (char *)uncompr); + } +} + +/* =========================================================================== + * Test read/write of .gz files + */ +void test_gzio(fname, uncompr, uncomprLen) + const char *fname; /* compressed file name */ + Byte *uncompr; + uLong uncomprLen; +{ +#ifdef NO_GZCOMPRESS + fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); +#else + int err; + int len = (int)strlen(hello)+1; + gzFile file; + z_off_t pos; + + file = gzopen(fname, "wb"); + if (file == NULL) { + fprintf(stderr, "gzopen error\n"); + exit(1); + } + gzputc(file, 'h'); + if (gzputs(file, "ello") != 4) { + fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); + exit(1); + } + if (gzprintf(file, ", %s!", "hello") != 8) { + fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); + exit(1); + } + gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ + gzclose(file); + + file = gzopen(fname, "rb"); + if (file == NULL) { + fprintf(stderr, "gzopen error\n"); + exit(1); + } + strcpy((char*)uncompr, "garbage"); + + if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { + fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); + exit(1); + } + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); + exit(1); + } else { + printf("gzread(): %s\n", (char*)uncompr); + } + + pos = gzseek(file, -8L, SEEK_CUR); + if (pos != 6 || gztell(file) != pos) { + fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", + (long)pos, (long)gztell(file)); + exit(1); + } + + if (gzgetc(file) != ' ') { + fprintf(stderr, "gzgetc error\n"); + exit(1); + } + + if (gzungetc(' ', file) != ' ') { + fprintf(stderr, "gzungetc error\n"); + exit(1); + } + + gzgets(file, (char*)uncompr, (int)uncomprLen); + if (strlen((char*)uncompr) != 7) { /* " hello!" */ + fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); + exit(1); + } + if (strcmp((char*)uncompr, hello + 6)) { + fprintf(stderr, "bad gzgets after gzseek\n"); + exit(1); + } else { + printf("gzgets() after gzseek: %s\n", (char*)uncompr); + } + + gzclose(file); +#endif +} + +#endif /* Z_SOLO */ + +/* =========================================================================== + * Test deflate() with small buffers + */ +void test_deflate(compr, comprLen) + Byte *compr; + uLong comprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + uLong len = (uLong)strlen(hello)+1; + + c_stream.zalloc = zalloc; + c_stream.zfree = zfree; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, "deflateInit"); + + c_stream.next_in = (z_const unsigned char *)hello; + c_stream.next_out = compr; + + while (c_stream.total_in != len && c_stream.total_out < comprLen) { + c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + } + /* Finish the stream, still forcing small buffers: */ + for (;;) { + c_stream.avail_out = 1; + err = deflate(&c_stream, Z_FINISH); + if (err == Z_STREAM_END) break; + CHECK_ERR(err, "deflate"); + } + + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); +} + +/* =========================================================================== + * Test inflate() with small buffers + */ +void test_inflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = zalloc; + d_stream.zfree = zfree; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = 0; + d_stream.next_out = uncompr; + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { + d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ + err = inflate(&d_stream, Z_NO_FLUSH); + if (err == Z_STREAM_END) break; + CHECK_ERR(err, "inflate"); + } + + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad inflate\n"); + exit(1); + } else { + printf("inflate(): %s\n", (char *)uncompr); + } +} + +/* =========================================================================== + * Test deflate() with large buffers and dynamic change of compression level + */ +void test_large_deflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + + c_stream.zalloc = zalloc; + c_stream.zfree = zfree; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_BEST_SPEED); + CHECK_ERR(err, "deflateInit"); + + c_stream.next_out = compr; + c_stream.avail_out = (uInt)comprLen; + + /* At this point, uncompr is still mostly zeroes, so it should compress + * very well: + */ + c_stream.next_in = uncompr; + c_stream.avail_in = (uInt)uncomprLen; + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + if (c_stream.avail_in != 0) { + fprintf(stderr, "deflate not greedy\n"); + exit(1); + } + + /* Feed in already compressed data and switch to no compression: */ + deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); + c_stream.next_in = compr; + c_stream.avail_in = (uInt)comprLen/2; + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + + /* Switch back to compressing mode: */ + deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); + c_stream.next_in = uncompr; + c_stream.avail_in = (uInt)uncomprLen; + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + + err = deflate(&c_stream, Z_FINISH); + if (err != Z_STREAM_END) { + fprintf(stderr, "deflate should report Z_STREAM_END\n"); + exit(1); + } + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); +} + +/* =========================================================================== + * Test inflate() with large buffers + */ +void test_large_inflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = zalloc; + d_stream.zfree = zfree; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = (uInt)comprLen; + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + for (;;) { + d_stream.next_out = uncompr; /* discard the output */ + d_stream.avail_out = (uInt)uncomprLen; + err = inflate(&d_stream, Z_NO_FLUSH); + if (err == Z_STREAM_END) break; + CHECK_ERR(err, "large inflate"); + } + + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + if (d_stream.total_out != 2*uncomprLen + comprLen/2) { + fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); + exit(1); + } else { + printf("large_inflate(): OK\n"); + } +} + +/* =========================================================================== + * Test deflate() with full flush + */ +void test_flush(compr, comprLen) + Byte *compr; + uLong *comprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + uInt len = (uInt)strlen(hello)+1; + + c_stream.zalloc = zalloc; + c_stream.zfree = zfree; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, "deflateInit"); + + c_stream.next_in = (z_const unsigned char *)hello; + c_stream.next_out = compr; + c_stream.avail_in = 3; + c_stream.avail_out = (uInt)*comprLen; + err = deflate(&c_stream, Z_FULL_FLUSH); + CHECK_ERR(err, "deflate"); + + compr[3]++; /* force an error in first compressed block */ + c_stream.avail_in = len - 3; + + err = deflate(&c_stream, Z_FINISH); + if (err != Z_STREAM_END) { + CHECK_ERR(err, "deflate"); + } + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); + + *comprLen = c_stream.total_out; +} + +/* =========================================================================== + * Test inflateSync() + */ +void test_sync(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = zalloc; + d_stream.zfree = zfree; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = 2; /* just read the zlib header */ + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + d_stream.next_out = uncompr; + d_stream.avail_out = (uInt)uncomprLen; + + err = inflate(&d_stream, Z_NO_FLUSH); + CHECK_ERR(err, "inflate"); + + d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */ + err = inflateSync(&d_stream); /* but skip the damaged part */ + CHECK_ERR(err, "inflateSync"); + + err = inflate(&d_stream, Z_FINISH); + if (err != Z_DATA_ERROR) { + fprintf(stderr, "inflate should report DATA_ERROR\n"); + /* Because of incorrect adler32 */ + exit(1); + } + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + printf("after inflateSync(): hel%s\n", (char *)uncompr); +} + +/* =========================================================================== + * Test deflate() with preset dictionary + */ +void test_dict_deflate(compr, comprLen) + Byte *compr; + uLong comprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + + c_stream.zalloc = zalloc; + c_stream.zfree = zfree; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_BEST_COMPRESSION); + CHECK_ERR(err, "deflateInit"); + + err = deflateSetDictionary(&c_stream, + (const Bytef*)dictionary, (int)sizeof(dictionary)); + CHECK_ERR(err, "deflateSetDictionary"); + + dictId = c_stream.adler; + c_stream.next_out = compr; + c_stream.avail_out = (uInt)comprLen; + + c_stream.next_in = (z_const unsigned char *)hello; + c_stream.avail_in = (uInt)strlen(hello)+1; + + err = deflate(&c_stream, Z_FINISH); + if (err != Z_STREAM_END) { + fprintf(stderr, "deflate should report Z_STREAM_END\n"); + exit(1); + } + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); +} + +/* =========================================================================== + * Test inflate() with a preset dictionary + */ +void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = zalloc; + d_stream.zfree = zfree; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = (uInt)comprLen; + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + d_stream.next_out = uncompr; + d_stream.avail_out = (uInt)uncomprLen; + + for (;;) { + err = inflate(&d_stream, Z_NO_FLUSH); + if (err == Z_STREAM_END) break; + if (err == Z_NEED_DICT) { + if (d_stream.adler != dictId) { + fprintf(stderr, "unexpected dictionary"); + exit(1); + } + err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, + (int)sizeof(dictionary)); + } + CHECK_ERR(err, "inflate with dict"); + } + + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad inflate with dict\n"); + exit(1); + } else { + printf("inflate with dictionary: %s\n", (char *)uncompr); + } +} + +/* =========================================================================== + * Usage: example [output.gz [input.gz]] + */ + +int main(argc, argv) + int argc; + char *argv[]; +{ + Byte *compr, *uncompr; + uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ + uLong uncomprLen = comprLen; + static const char* myVersion = ZLIB_VERSION; + + if (zlibVersion()[0] != myVersion[0]) { + fprintf(stderr, "incompatible zlib version\n"); + exit(1); + + } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { + fprintf(stderr, "warning: different zlib version\n"); + } + + printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", + ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); + + compr = (Byte*)calloc((uInt)comprLen, 1); + uncompr = (Byte*)calloc((uInt)uncomprLen, 1); + /* compr and uncompr are cleared to avoid reading uninitialized + * data and to ensure that uncompr compresses well. + */ + if (compr == Z_NULL || uncompr == Z_NULL) { + printf("out of memory\n"); + exit(1); + } + +#ifdef Z_SOLO + (void)argc; + (void)argv; +#else + test_compress(compr, comprLen, uncompr, uncomprLen); + + test_gzio((argc > 1 ? argv[1] : TESTFILE), + uncompr, uncomprLen); +#endif + + test_deflate(compr, comprLen); + test_inflate(compr, comprLen, uncompr, uncomprLen); + + test_large_deflate(compr, comprLen, uncompr, uncomprLen); + test_large_inflate(compr, comprLen, uncompr, uncomprLen); + + test_flush(compr, &comprLen); + test_sync(compr, comprLen, uncompr, uncomprLen); + comprLen = uncomprLen; + + test_dict_deflate(compr, comprLen); + test_dict_inflate(compr, comprLen, uncompr, uncomprLen); + + free(compr); + free(uncompr); + + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/infcover.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/infcover.c new file mode 100644 index 000000000..2be01646c --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/infcover.c @@ -0,0 +1,671 @@ +/* infcover.c -- test zlib's inflate routines with full code coverage + * Copyright (C) 2011, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* to use, do: ./configure --cover && make cover */ + +#include +#include +#include +#include +#include "zlib.h" + +/* get definition of internal structure so we can mess with it (see pull()), + and so we can call inflate_trees() (see cover5()) */ +#define ZLIB_INTERNAL +#include "inftrees.h" +#include "inflate.h" + +#define local static + +/* -- memory tracking routines -- */ + +/* + These memory tracking routines are provided to zlib and track all of zlib's + allocations and deallocations, check for LIFO operations, keep a current + and high water mark of total bytes requested, optionally set a limit on the + total memory that can be allocated, and when done check for memory leaks. + + They are used as follows: + + z_stream strm; + mem_setup(&strm) initializes the memory tracking and sets the + zalloc, zfree, and opaque members of strm to use + memory tracking for all zlib operations on strm + mem_limit(&strm, limit) sets a limit on the total bytes requested -- a + request that exceeds this limit will result in an + allocation failure (returns NULL) -- setting the + limit to zero means no limit, which is the default + after mem_setup() + mem_used(&strm, "msg") prints to stderr "msg" and the total bytes used + mem_high(&strm, "msg") prints to stderr "msg" and the high water mark + mem_done(&strm, "msg") ends memory tracking, releases all allocations + for the tracking as well as leaked zlib blocks, if + any. If there was anything unusual, such as leaked + blocks, non-FIFO frees, or frees of addresses not + allocated, then "msg" and information about the + problem is printed to stderr. If everything is + normal, nothing is printed. mem_done resets the + strm members to Z_NULL to use the default memory + allocation routines on the next zlib initialization + using strm. + */ + +/* these items are strung together in a linked list, one for each allocation */ +struct mem_item { + void *ptr; /* pointer to allocated memory */ + size_t size; /* requested size of allocation */ + struct mem_item *next; /* pointer to next item in list, or NULL */ +}; + +/* this structure is at the root of the linked list, and tracks statistics */ +struct mem_zone { + struct mem_item *first; /* pointer to first item in list, or NULL */ + size_t total, highwater; /* total allocations, and largest total */ + size_t limit; /* memory allocation limit, or 0 if no limit */ + int notlifo, rogue; /* counts of non-LIFO frees and rogue frees */ +}; + +/* memory allocation routine to pass to zlib */ +local void *mem_alloc(void *mem, unsigned count, unsigned size) +{ + void *ptr; + struct mem_item *item; + struct mem_zone *zone = mem; + size_t len = count * (size_t)size; + + /* induced allocation failure */ + if (zone == NULL || (zone->limit && zone->total + len > zone->limit)) + return NULL; + + /* perform allocation using the standard library, fill memory with a + non-zero value to make sure that the code isn't depending on zeros */ + ptr = malloc(len); + if (ptr == NULL) + return NULL; + memset(ptr, 0xa5, len); + + /* create a new item for the list */ + item = malloc(sizeof(struct mem_item)); + if (item == NULL) { + free(ptr); + return NULL; + } + item->ptr = ptr; + item->size = len; + + /* insert item at the beginning of the list */ + item->next = zone->first; + zone->first = item; + + /* update the statistics */ + zone->total += item->size; + if (zone->total > zone->highwater) + zone->highwater = zone->total; + + /* return the allocated memory */ + return ptr; +} + +/* memory free routine to pass to zlib */ +local void mem_free(void *mem, void *ptr) +{ + struct mem_item *item, *next; + struct mem_zone *zone = mem; + + /* if no zone, just do a free */ + if (zone == NULL) { + free(ptr); + return; + } + + /* point next to the item that matches ptr, or NULL if not found -- remove + the item from the linked list if found */ + next = zone->first; + if (next) { + if (next->ptr == ptr) + zone->first = next->next; /* first one is it, remove from list */ + else { + do { /* search the linked list */ + item = next; + next = item->next; + } while (next != NULL && next->ptr != ptr); + if (next) { /* if found, remove from linked list */ + item->next = next->next; + zone->notlifo++; /* not a LIFO free */ + } + + } + } + + /* if found, update the statistics and free the item */ + if (next) { + zone->total -= next->size; + free(next); + } + + /* if not found, update the rogue count */ + else + zone->rogue++; + + /* in any case, do the requested free with the standard library function */ + free(ptr); +} + +/* set up a controlled memory allocation space for monitoring, set the stream + parameters to the controlled routines, with opaque pointing to the space */ +local void mem_setup(z_stream *strm) +{ + struct mem_zone *zone; + + zone = malloc(sizeof(struct mem_zone)); + assert(zone != NULL); + zone->first = NULL; + zone->total = 0; + zone->highwater = 0; + zone->limit = 0; + zone->notlifo = 0; + zone->rogue = 0; + strm->opaque = zone; + strm->zalloc = mem_alloc; + strm->zfree = mem_free; +} + +/* set a limit on the total memory allocation, or 0 to remove the limit */ +local void mem_limit(z_stream *strm, size_t limit) +{ + struct mem_zone *zone = strm->opaque; + + zone->limit = limit; +} + +/* show the current total requested allocations in bytes */ +local void mem_used(z_stream *strm, char *prefix) +{ + struct mem_zone *zone = strm->opaque; + + fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total); +} + +/* show the high water allocation in bytes */ +local void mem_high(z_stream *strm, char *prefix) +{ + struct mem_zone *zone = strm->opaque; + + fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater); +} + +/* release the memory allocation zone -- if there are any surprises, notify */ +local void mem_done(z_stream *strm, char *prefix) +{ + int count = 0; + struct mem_item *item, *next; + struct mem_zone *zone = strm->opaque; + + /* show high water mark */ + mem_high(strm, prefix); + + /* free leftover allocations and item structures, if any */ + item = zone->first; + while (item != NULL) { + free(item->ptr); + next = item->next; + free(item); + item = next; + count++; + } + + /* issue alerts about anything unexpected */ + if (count || zone->total) + fprintf(stderr, "** %s: %lu bytes in %d blocks not freed\n", + prefix, zone->total, count); + if (zone->notlifo) + fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo); + if (zone->rogue) + fprintf(stderr, "** %s: %d frees not recognized\n", + prefix, zone->rogue); + + /* free the zone and delete from the stream */ + free(zone); + strm->opaque = Z_NULL; + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; +} + +/* -- inflate test routines -- */ + +/* Decode a hexadecimal string, set *len to length, in[] to the bytes. This + decodes liberally, in that hex digits can be adjacent, in which case two in + a row writes a byte. Or they can be delimited by any non-hex character, + where the delimiters are ignored except when a single hex digit is followed + by a delimiter, where that single digit writes a byte. The returned data is + allocated and must eventually be freed. NULL is returned if out of memory. + If the length is not needed, then len can be NULL. */ +local unsigned char *h2b(const char *hex, unsigned *len) +{ + unsigned char *in, *re; + unsigned next, val; + + in = malloc((strlen(hex) + 1) >> 1); + if (in == NULL) + return NULL; + next = 0; + val = 1; + do { + if (*hex >= '0' && *hex <= '9') + val = (val << 4) + *hex - '0'; + else if (*hex >= 'A' && *hex <= 'F') + val = (val << 4) + *hex - 'A' + 10; + else if (*hex >= 'a' && *hex <= 'f') + val = (val << 4) + *hex - 'a' + 10; + else if (val != 1 && val < 32) /* one digit followed by delimiter */ + val += 240; /* make it look like two digits */ + if (val > 255) { /* have two digits */ + in[next++] = val & 0xff; /* save the decoded byte */ + val = 1; /* start over */ + } + } while (*hex++); /* go through the loop with the terminating null */ + if (len != NULL) + *len = next; + re = realloc(in, next); + return re == NULL ? in : re; +} + +/* generic inflate() run, where hex is the hexadecimal input data, what is the + text to include in an error message, step is how much input data to feed + inflate() on each call, or zero to feed it all, win is the window bits + parameter to inflateInit2(), len is the size of the output buffer, and err + is the error code expected from the first inflate() call (the second + inflate() call is expected to return Z_STREAM_END). If win is 47, then + header information is collected with inflateGetHeader(). If a zlib stream + is looking for a dictionary, then an empty dictionary is provided. + inflate() is run until all of the input data is consumed. */ +local void inf(char *hex, char *what, unsigned step, int win, unsigned len, + int err) +{ + int ret; + unsigned have; + unsigned char *in, *out; + z_stream strm, copy; + gz_header head; + + mem_setup(&strm); + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, win); + if (ret != Z_OK) { + mem_done(&strm, what); + return; + } + out = malloc(len); assert(out != NULL); + if (win == 47) { + head.extra = out; + head.extra_max = len; + head.name = out; + head.name_max = len; + head.comment = out; + head.comm_max = len; + ret = inflateGetHeader(&strm, &head); assert(ret == Z_OK); + } + in = h2b(hex, &have); assert(in != NULL); + if (step == 0 || step > have) + step = have; + strm.avail_in = step; + have -= step; + strm.next_in = in; + do { + strm.avail_out = len; + strm.next_out = out; + ret = inflate(&strm, Z_NO_FLUSH); assert(err == 9 || ret == err); + if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_NEED_DICT) + break; + if (ret == Z_NEED_DICT) { + ret = inflateSetDictionary(&strm, in, 1); + assert(ret == Z_DATA_ERROR); + mem_limit(&strm, 1); + ret = inflateSetDictionary(&strm, out, 0); + assert(ret == Z_MEM_ERROR); + mem_limit(&strm, 0); + ((struct inflate_state *)strm.state)->mode = DICT; + ret = inflateSetDictionary(&strm, out, 0); + assert(ret == Z_OK); + ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_BUF_ERROR); + } + ret = inflateCopy(©, &strm); assert(ret == Z_OK); + ret = inflateEnd(©); assert(ret == Z_OK); + err = 9; /* don't care next time around */ + have += strm.avail_in; + strm.avail_in = step > have ? have : step; + have -= strm.avail_in; + } while (strm.avail_in); + free(in); + free(out); + ret = inflateReset2(&strm, -8); assert(ret == Z_OK); + ret = inflateEnd(&strm); assert(ret == Z_OK); + mem_done(&strm, what); +} + +/* cover all of the lines in inflate.c up to inflate() */ +local void cover_support(void) +{ + int ret; + z_stream strm; + + mem_setup(&strm); + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit(&strm); assert(ret == Z_OK); + mem_used(&strm, "inflate init"); + ret = inflatePrime(&strm, 5, 31); assert(ret == Z_OK); + ret = inflatePrime(&strm, -1, 0); assert(ret == Z_OK); + ret = inflateSetDictionary(&strm, Z_NULL, 0); + assert(ret == Z_STREAM_ERROR); + ret = inflateEnd(&strm); assert(ret == Z_OK); + mem_done(&strm, "prime"); + + inf("63 0", "force window allocation", 0, -15, 1, Z_OK); + inf("63 18 5", "force window replacement", 0, -8, 259, Z_OK); + inf("63 18 68 30 d0 0 0", "force split window update", 4, -8, 259, Z_OK); + inf("3 0", "use fixed blocks", 0, -15, 1, Z_STREAM_END); + inf("", "bad window size", 0, 1, 0, Z_STREAM_ERROR); + + mem_setup(&strm); + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream)); + assert(ret == Z_VERSION_ERROR); + mem_done(&strm, "wrong version"); + + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit(&strm); assert(ret == Z_OK); + ret = inflateEnd(&strm); assert(ret == Z_OK); + fputs("inflate built-in memory routines\n", stderr); +} + +/* cover all inflate() header and trailer cases and code after inflate() */ +local void cover_wrap(void) +{ + int ret; + z_stream strm, copy; + unsigned char dict[257]; + + ret = inflate(Z_NULL, 0); assert(ret == Z_STREAM_ERROR); + ret = inflateEnd(Z_NULL); assert(ret == Z_STREAM_ERROR); + ret = inflateCopy(Z_NULL, Z_NULL); assert(ret == Z_STREAM_ERROR); + fputs("inflate bad parameters\n", stderr); + + inf("1f 8b 0 0", "bad gzip method", 0, 31, 0, Z_DATA_ERROR); + inf("1f 8b 8 80", "bad gzip flags", 0, 31, 0, Z_DATA_ERROR); + inf("77 85", "bad zlib method", 0, 15, 0, Z_DATA_ERROR); + inf("8 99", "set window size from header", 0, 0, 0, Z_OK); + inf("78 9c", "bad zlib window size", 0, 8, 0, Z_DATA_ERROR); + inf("78 9c 63 0 0 0 1 0 1", "check adler32", 0, 15, 1, Z_STREAM_END); + inf("1f 8b 8 1e 0 0 0 0 0 0 1 0 0 0 0 0 0", "bad header crc", 0, 47, 1, + Z_DATA_ERROR); + inf("1f 8b 8 2 0 0 0 0 0 0 1d 26 3 0 0 0 0 0 0 0 0 0", "check gzip length", + 0, 47, 0, Z_STREAM_END); + inf("78 90", "bad zlib header check", 0, 47, 0, Z_DATA_ERROR); + inf("8 b8 0 0 0 1", "need dictionary", 0, 8, 0, Z_NEED_DICT); + inf("78 9c 63 0", "compute adler32", 0, 15, 1, Z_OK); + + mem_setup(&strm); + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, -8); + strm.avail_in = 2; + strm.next_in = (void *)"\x63"; + strm.avail_out = 1; + strm.next_out = (void *)&ret; + mem_limit(&strm, 1); + ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR); + ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR); + mem_limit(&strm, 0); + memset(dict, 0, 257); + ret = inflateSetDictionary(&strm, dict, 257); + assert(ret == Z_OK); + mem_limit(&strm, (sizeof(struct inflate_state) << 1) + 256); + ret = inflatePrime(&strm, 16, 0); assert(ret == Z_OK); + strm.avail_in = 2; + strm.next_in = (void *)"\x80"; + ret = inflateSync(&strm); assert(ret == Z_DATA_ERROR); + ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_STREAM_ERROR); + strm.avail_in = 4; + strm.next_in = (void *)"\0\0\xff\xff"; + ret = inflateSync(&strm); assert(ret == Z_OK); + (void)inflateSyncPoint(&strm); + ret = inflateCopy(©, &strm); assert(ret == Z_MEM_ERROR); + mem_limit(&strm, 0); + ret = inflateUndermine(&strm, 1); assert(ret == Z_DATA_ERROR); + (void)inflateMark(&strm); + ret = inflateEnd(&strm); assert(ret == Z_OK); + mem_done(&strm, "miscellaneous, force memory errors"); +} + +/* input and output functions for inflateBack() */ +local unsigned pull(void *desc, unsigned char **buf) +{ + static unsigned int next = 0; + static unsigned char dat[] = {0x63, 0, 2, 0}; + struct inflate_state *state; + + if (desc == Z_NULL) { + next = 0; + return 0; /* no input (already provided at next_in) */ + } + state = (void *)((z_stream *)desc)->state; + if (state != Z_NULL) + state->mode = SYNC; /* force an otherwise impossible situation */ + return next < sizeof(dat) ? (*buf = dat + next++, 1) : 0; +} + +local int push(void *desc, unsigned char *buf, unsigned len) +{ + buf += len; + return desc != Z_NULL; /* force error if desc not null */ +} + +/* cover inflateBack() up to common deflate data cases and after those */ +local void cover_back(void) +{ + int ret; + z_stream strm; + unsigned char win[32768]; + + ret = inflateBackInit_(Z_NULL, 0, win, 0, 0); + assert(ret == Z_VERSION_ERROR); + ret = inflateBackInit(Z_NULL, 0, win); assert(ret == Z_STREAM_ERROR); + ret = inflateBack(Z_NULL, Z_NULL, Z_NULL, Z_NULL, Z_NULL); + assert(ret == Z_STREAM_ERROR); + ret = inflateBackEnd(Z_NULL); assert(ret == Z_STREAM_ERROR); + fputs("inflateBack bad parameters\n", stderr); + + mem_setup(&strm); + ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK); + strm.avail_in = 2; + strm.next_in = (void *)"\x03"; + ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL); + assert(ret == Z_STREAM_END); + /* force output error */ + strm.avail_in = 3; + strm.next_in = (void *)"\x63\x00"; + ret = inflateBack(&strm, pull, Z_NULL, push, &strm); + assert(ret == Z_BUF_ERROR); + /* force mode error by mucking with state */ + ret = inflateBack(&strm, pull, &strm, push, Z_NULL); + assert(ret == Z_STREAM_ERROR); + ret = inflateBackEnd(&strm); assert(ret == Z_OK); + mem_done(&strm, "inflateBack bad state"); + + ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK); + ret = inflateBackEnd(&strm); assert(ret == Z_OK); + fputs("inflateBack built-in memory routines\n", stderr); +} + +/* do a raw inflate of data in hexadecimal with both inflate and inflateBack */ +local int try(char *hex, char *id, int err) +{ + int ret; + unsigned len, size; + unsigned char *in, *out, *win; + char *prefix; + z_stream strm; + + /* convert to hex */ + in = h2b(hex, &len); + assert(in != NULL); + + /* allocate work areas */ + size = len << 3; + out = malloc(size); + assert(out != NULL); + win = malloc(32768); + assert(win != NULL); + prefix = malloc(strlen(id) + 6); + assert(prefix != NULL); + + /* first with inflate */ + strcpy(prefix, id); + strcat(prefix, "-late"); + mem_setup(&strm); + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, err < 0 ? 47 : -15); + assert(ret == Z_OK); + strm.avail_in = len; + strm.next_in = in; + do { + strm.avail_out = size; + strm.next_out = out; + ret = inflate(&strm, Z_TREES); + assert(ret != Z_STREAM_ERROR && ret != Z_MEM_ERROR); + if (ret == Z_DATA_ERROR || ret == Z_NEED_DICT) + break; + } while (strm.avail_in || strm.avail_out == 0); + if (err) { + assert(ret == Z_DATA_ERROR); + assert(strcmp(id, strm.msg) == 0); + } + inflateEnd(&strm); + mem_done(&strm, prefix); + + /* then with inflateBack */ + if (err >= 0) { + strcpy(prefix, id); + strcat(prefix, "-back"); + mem_setup(&strm); + ret = inflateBackInit(&strm, 15, win); + assert(ret == Z_OK); + strm.avail_in = len; + strm.next_in = in; + ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL); + assert(ret != Z_STREAM_ERROR); + if (err) { + assert(ret == Z_DATA_ERROR); + assert(strcmp(id, strm.msg) == 0); + } + inflateBackEnd(&strm); + mem_done(&strm, prefix); + } + + /* clean up */ + free(prefix); + free(win); + free(out); + free(in); + return ret; +} + +/* cover deflate data cases in both inflate() and inflateBack() */ +local void cover_inflate(void) +{ + try("0 0 0 0 0", "invalid stored block lengths", 1); + try("3 0", "fixed", 0); + try("6", "invalid block type", 1); + try("1 1 0 fe ff 0", "stored", 0); + try("fc 0 0", "too many length or distance symbols", 1); + try("4 0 fe ff", "invalid code lengths set", 1); + try("4 0 24 49 0", "invalid bit length repeat", 1); + try("4 0 24 e9 ff ff", "invalid bit length repeat", 1); + try("4 0 24 e9 ff 6d", "invalid code -- missing end-of-block", 1); + try("4 80 49 92 24 49 92 24 71 ff ff 93 11 0", + "invalid literal/lengths set", 1); + try("4 80 49 92 24 49 92 24 f b4 ff ff c3 84", "invalid distances set", 1); + try("4 c0 81 8 0 0 0 0 20 7f eb b 0 0", "invalid literal/length code", 1); + try("2 7e ff ff", "invalid distance code", 1); + try("c c0 81 0 0 0 0 0 90 ff 6b 4 0", "invalid distance too far back", 1); + + /* also trailer mismatch just in inflate() */ + try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 1", "incorrect data check", -1); + try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 1", + "incorrect length check", -1); + try("5 c0 21 d 0 0 0 80 b0 fe 6d 2f 91 6c", "pull 17", 0); + try("5 e0 81 91 24 cb b2 2c 49 e2 f 2e 8b 9a 47 56 9f fb fe ec d2 ff 1f", + "long code", 0); + try("ed c0 1 1 0 0 0 40 20 ff 57 1b 42 2c 4f", "length extra", 0); + try("ed cf c1 b1 2c 47 10 c4 30 fa 6f 35 1d 1 82 59 3d fb be 2e 2a fc f c", + "long distance and extra", 0); + try("ed c0 81 0 0 0 0 80 a0 fd a9 17 a9 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 6", "window end", 0); + inf("2 8 20 80 0 3 0", "inflate_fast TYPE return", 0, -15, 258, + Z_STREAM_END); + inf("63 18 5 40 c 0", "window wrap", 3, -8, 300, Z_OK); +} + +/* cover remaining lines in inftrees.c */ +local void cover_trees(void) +{ + int ret; + unsigned bits; + unsigned short lens[16], work[16]; + code *next, table[ENOUGH_DISTS]; + + /* we need to call inflate_table() directly in order to manifest not- + enough errors, since zlib insures that enough is always enough */ + for (bits = 0; bits < 15; bits++) + lens[bits] = (unsigned short)(bits + 1); + lens[15] = 15; + next = table; + bits = 15; + ret = inflate_table(DISTS, lens, 16, &next, &bits, work); + assert(ret == 1); + next = table; + bits = 1; + ret = inflate_table(DISTS, lens, 16, &next, &bits, work); + assert(ret == 1); + fputs("inflate_table not enough errors\n", stderr); +} + +/* cover remaining inffast.c decoding and window copying */ +local void cover_fast(void) +{ + inf("e5 e0 81 ad 6d cb b2 2c c9 01 1e 59 63 ae 7d ee fb 4d fd b5 35 41 68" + " ff 7f 0f 0 0 0", "fast length extra bits", 0, -8, 258, Z_DATA_ERROR); + inf("25 fd 81 b5 6d 59 b6 6a 49 ea af 35 6 34 eb 8c b9 f6 b9 1e ef 67 49" + " 50 fe ff ff 3f 0 0", "fast distance extra bits", 0, -8, 258, + Z_DATA_ERROR); + inf("3 7e 0 0 0 0 0", "fast invalid distance code", 0, -8, 258, + Z_DATA_ERROR); + inf("1b 7 0 0 0 0 0", "fast invalid literal/length code", 0, -8, 258, + Z_DATA_ERROR); + inf("d c7 1 ae eb 38 c 4 41 a0 87 72 de df fb 1f b8 36 b1 38 5d ff ff 0", + "fast 2nd level codes and too far back", 0, -8, 258, Z_DATA_ERROR); + inf("63 18 5 8c 10 8 0 0 0 0", "very common case", 0, -8, 259, Z_OK); + inf("63 60 60 18 c9 0 8 18 18 18 26 c0 28 0 29 0 0 0", + "contiguous and wrap around window", 6, -8, 259, Z_OK); + inf("63 0 3 0 0 0 0 0", "copy direct from output", 0, -8, 259, + Z_STREAM_END); +} + +int main(void) +{ + fprintf(stderr, "%s\n", zlibVersion()); + cover_support(); + cover_wrap(); + cover_back(); + cover_inflate(); + cover_trees(); + cover_fast(); + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/minigzip.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/minigzip.c new file mode 100644 index 000000000..e22fb08c0 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/test/minigzip.c @@ -0,0 +1,651 @@ +/* minigzip.c -- simulate gzip using the zlib compression library + * Copyright (C) 1995-2006, 2010, 2011, 2016 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * minigzip is a minimal implementation of the gzip utility. This is + * only an example of using zlib and isn't meant to replace the + * full-featured gzip. No attempt is made to deal with file systems + * limiting names to 14 or 8+3 characters, etc... Error checking is + * very limited. So use minigzip only for testing; use gzip for the + * real thing. On MSDOS, use only on file names without extension + * or in pipe mode. + */ + +/* @(#) $Id$ */ + +#include "zlib.h" +#include + +#ifdef STDC +# include +# include +#endif + +#ifdef USE_MMAP +# include +# include +# include +#endif + +#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) +# include +# include +# ifdef UNDER_CE +# include +# endif +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + +#if defined(_MSC_VER) && _MSC_VER < 1900 +# define snprintf _snprintf +#endif + +#ifdef VMS +# define unlink delete +# define GZ_SUFFIX "-gz" +#endif +#ifdef RISCOS +# define unlink remove +# define GZ_SUFFIX "-gz" +# define fileno(file) file->__file +#endif +#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fileno */ +#endif + +#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) +#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ + extern int unlink OF((const char *)); +#endif +#endif + +#if defined(UNDER_CE) +# include +# define perror(s) pwinerror(s) + +/* Map the Windows error number in ERROR to a locale-dependent error + message string and return a pointer to it. Typically, the values + for ERROR come from GetLastError. + + The string pointed to shall not be modified by the application, + but may be overwritten by a subsequent call to strwinerror + + The strwinerror function does not change the current setting + of GetLastError. */ + +static char *strwinerror (error) + DWORD error; +{ + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +static void pwinerror (s) + const char *s; +{ + if (s && *s) + fprintf(stderr, "%s: %s\n", s, strwinerror(GetLastError ())); + else + fprintf(stderr, "%s\n", strwinerror(GetLastError ())); +} + +#endif /* UNDER_CE */ + +#ifndef GZ_SUFFIX +# define GZ_SUFFIX ".gz" +#endif +#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1) + +#define BUFLEN 16384 +#define MAX_NAME_LEN 1024 + +#ifdef MAXSEG_64K +# define local static + /* Needed for systems with limitation on stack size. */ +#else +# define local +#endif + +#ifdef Z_SOLO +/* for Z_SOLO, create simplified gz* functions using deflate and inflate */ + +#if defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE) +# include /* for unlink() */ +#endif + +void *myalloc OF((void *, unsigned, unsigned)); +void myfree OF((void *, void *)); + +void *myalloc(q, n, m) + void *q; + unsigned n, m; +{ + (void)q; + return calloc(n, m); +} + +void myfree(q, p) + void *q, *p; +{ + (void)q; + free(p); +} + +typedef struct gzFile_s { + FILE *file; + int write; + int err; + char *msg; + z_stream strm; +} *gzFile; + +gzFile gzopen OF((const char *, const char *)); +gzFile gzdopen OF((int, const char *)); +gzFile gz_open OF((const char *, int, const char *)); + +gzFile gzopen(path, mode) +const char *path; +const char *mode; +{ + return gz_open(path, -1, mode); +} + +gzFile gzdopen(fd, mode) +int fd; +const char *mode; +{ + return gz_open(NULL, fd, mode); +} + +gzFile gz_open(path, fd, mode) + const char *path; + int fd; + const char *mode; +{ + gzFile gz; + int ret; + + gz = malloc(sizeof(struct gzFile_s)); + if (gz == NULL) + return NULL; + gz->write = strchr(mode, 'w') != NULL; + gz->strm.zalloc = myalloc; + gz->strm.zfree = myfree; + gz->strm.opaque = Z_NULL; + if (gz->write) + ret = deflateInit2(&(gz->strm), -1, 8, 15 + 16, 8, 0); + else { + gz->strm.next_in = 0; + gz->strm.avail_in = Z_NULL; + ret = inflateInit2(&(gz->strm), 15 + 16); + } + if (ret != Z_OK) { + free(gz); + return NULL; + } + gz->file = path == NULL ? fdopen(fd, gz->write ? "wb" : "rb") : + fopen(path, gz->write ? "wb" : "rb"); + if (gz->file == NULL) { + gz->write ? deflateEnd(&(gz->strm)) : inflateEnd(&(gz->strm)); + free(gz); + return NULL; + } + gz->err = 0; + gz->msg = ""; + return gz; +} + +int gzwrite OF((gzFile, const void *, unsigned)); + +int gzwrite(gz, buf, len) + gzFile gz; + const void *buf; + unsigned len; +{ + z_stream *strm; + unsigned char out[BUFLEN]; + + if (gz == NULL || !gz->write) + return 0; + strm = &(gz->strm); + strm->next_in = (void *)buf; + strm->avail_in = len; + do { + strm->next_out = out; + strm->avail_out = BUFLEN; + (void)deflate(strm, Z_NO_FLUSH); + fwrite(out, 1, BUFLEN - strm->avail_out, gz->file); + } while (strm->avail_out == 0); + return len; +} + +int gzread OF((gzFile, void *, unsigned)); + +int gzread(gz, buf, len) + gzFile gz; + void *buf; + unsigned len; +{ + int ret; + unsigned got; + unsigned char in[1]; + z_stream *strm; + + if (gz == NULL || gz->write) + return 0; + if (gz->err) + return 0; + strm = &(gz->strm); + strm->next_out = (void *)buf; + strm->avail_out = len; + do { + got = fread(in, 1, 1, gz->file); + if (got == 0) + break; + strm->next_in = in; + strm->avail_in = 1; + ret = inflate(strm, Z_NO_FLUSH); + if (ret == Z_DATA_ERROR) { + gz->err = Z_DATA_ERROR; + gz->msg = strm->msg; + return 0; + } + if (ret == Z_STREAM_END) + inflateReset(strm); + } while (strm->avail_out); + return len - strm->avail_out; +} + +int gzclose OF((gzFile)); + +int gzclose(gz) + gzFile gz; +{ + z_stream *strm; + unsigned char out[BUFLEN]; + + if (gz == NULL) + return Z_STREAM_ERROR; + strm = &(gz->strm); + if (gz->write) { + strm->next_in = Z_NULL; + strm->avail_in = 0; + do { + strm->next_out = out; + strm->avail_out = BUFLEN; + (void)deflate(strm, Z_FINISH); + fwrite(out, 1, BUFLEN - strm->avail_out, gz->file); + } while (strm->avail_out == 0); + deflateEnd(strm); + } + else + inflateEnd(strm); + fclose(gz->file); + free(gz); + return Z_OK; +} + +const char *gzerror OF((gzFile, int *)); + +const char *gzerror(gz, err) + gzFile gz; + int *err; +{ + *err = gz->err; + return gz->msg; +} + +#endif + +static char *prog; + +void error OF((const char *msg)); +void gz_compress OF((FILE *in, gzFile out)); +#ifdef USE_MMAP +int gz_compress_mmap OF((FILE *in, gzFile out)); +#endif +void gz_uncompress OF((gzFile in, FILE *out)); +void file_compress OF((char *file, char *mode)); +void file_uncompress OF((char *file)); +int main OF((int argc, char *argv[])); + +/* =========================================================================== + * Display error message and exit + */ +void error(msg) + const char *msg; +{ + fprintf(stderr, "%s: %s\n", prog, msg); + exit(1); +} + +/* =========================================================================== + * Compress input to output then close both files. + */ + +void gz_compress(in, out) + FILE *in; + gzFile out; +{ + local char buf[BUFLEN]; + int len; + int err; + +#ifdef USE_MMAP + /* Try first compressing with mmap. If mmap fails (minigzip used in a + * pipe), use the normal fread loop. + */ + if (gz_compress_mmap(in, out) == Z_OK) return; +#endif + for (;;) { + len = (int)fread(buf, 1, sizeof(buf), in); + if (ferror(in)) { + perror("fread"); + exit(1); + } + if (len == 0) break; + + if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); + } + fclose(in); + if (gzclose(out) != Z_OK) error("failed gzclose"); +} + +#ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ + +/* Try compressing the input file at once using mmap. Return Z_OK if + * if success, Z_ERRNO otherwise. + */ +int gz_compress_mmap(in, out) + FILE *in; + gzFile out; +{ + int len; + int err; + int ifd = fileno(in); + caddr_t buf; /* mmap'ed buffer for the entire input file */ + off_t buf_len; /* length of the input file */ + struct stat sb; + + /* Determine the size of the file, needed for mmap: */ + if (fstat(ifd, &sb) < 0) return Z_ERRNO; + buf_len = sb.st_size; + if (buf_len <= 0) return Z_ERRNO; + + /* Now do the actual mmap: */ + buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); + if (buf == (caddr_t)(-1)) return Z_ERRNO; + + /* Compress the whole file at once: */ + len = gzwrite(out, (char *)buf, (unsigned)buf_len); + + if (len != (int)buf_len) error(gzerror(out, &err)); + + munmap(buf, buf_len); + fclose(in); + if (gzclose(out) != Z_OK) error("failed gzclose"); + return Z_OK; +} +#endif /* USE_MMAP */ + +/* =========================================================================== + * Uncompress input to output then close both files. + */ +void gz_uncompress(in, out) + gzFile in; + FILE *out; +{ + local char buf[BUFLEN]; + int len; + int err; + + for (;;) { + len = gzread(in, buf, sizeof(buf)); + if (len < 0) error (gzerror(in, &err)); + if (len == 0) break; + + if ((int)fwrite(buf, 1, (unsigned)len, out) != len) { + error("failed fwrite"); + } + } + if (fclose(out)) error("failed fclose"); + + if (gzclose(in) != Z_OK) error("failed gzclose"); +} + + +/* =========================================================================== + * Compress the given file: create a corresponding .gz file and remove the + * original. + */ +void file_compress(file, mode) + char *file; + char *mode; +{ + local char outfile[MAX_NAME_LEN]; + FILE *in; + gzFile out; + + if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { + fprintf(stderr, "%s: filename too long\n", prog); + exit(1); + } + +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(outfile, sizeof(outfile), "%s%s", file, GZ_SUFFIX); +#else + strcpy(outfile, file); + strcat(outfile, GZ_SUFFIX); +#endif + + in = fopen(file, "rb"); + if (in == NULL) { + perror(file); + exit(1); + } + out = gzopen(outfile, mode); + if (out == NULL) { + fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); + exit(1); + } + gz_compress(in, out); + + unlink(file); +} + + +/* =========================================================================== + * Uncompress the given file and remove the original. + */ +void file_uncompress(file) + char *file; +{ + local char buf[MAX_NAME_LEN]; + char *infile, *outfile; + FILE *out; + gzFile in; + unsigned len = strlen(file); + + if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { + fprintf(stderr, "%s: filename too long\n", prog); + exit(1); + } + +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(buf, sizeof(buf), "%s", file); +#else + strcpy(buf, file); +#endif + + if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { + infile = file; + outfile = buf; + outfile[len-3] = '\0'; + } else { + outfile = file; + infile = buf; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(buf + len, sizeof(buf) - len, "%s", GZ_SUFFIX); +#else + strcat(infile, GZ_SUFFIX); +#endif + } + in = gzopen(infile, "rb"); + if (in == NULL) { + fprintf(stderr, "%s: can't gzopen %s\n", prog, infile); + exit(1); + } + out = fopen(outfile, "wb"); + if (out == NULL) { + perror(file); + exit(1); + } + + gz_uncompress(in, out); + + unlink(infile); +} + + +/* =========================================================================== + * Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...] + * -c : write to standard output + * -d : decompress + * -f : compress with Z_FILTERED + * -h : compress with Z_HUFFMAN_ONLY + * -r : compress with Z_RLE + * -1 to -9 : compression level + */ + +int main(argc, argv) + int argc; + char *argv[]; +{ + int copyout = 0; + int uncompr = 0; + gzFile file; + char *bname, outmode[20]; + +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(outmode, sizeof(outmode), "%s", "wb6 "); +#else + strcpy(outmode, "wb6 "); +#endif + + prog = argv[0]; + bname = strrchr(argv[0], '/'); + if (bname) + bname++; + else + bname = argv[0]; + argc--, argv++; + + if (!strcmp(bname, "gunzip")) + uncompr = 1; + else if (!strcmp(bname, "zcat")) + copyout = uncompr = 1; + + while (argc > 0) { + if (strcmp(*argv, "-c") == 0) + copyout = 1; + else if (strcmp(*argv, "-d") == 0) + uncompr = 1; + else if (strcmp(*argv, "-f") == 0) + outmode[3] = 'f'; + else if (strcmp(*argv, "-h") == 0) + outmode[3] = 'h'; + else if (strcmp(*argv, "-r") == 0) + outmode[3] = 'R'; + else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' && + (*argv)[2] == 0) + outmode[2] = (*argv)[1]; + else + break; + argc--, argv++; + } + if (outmode[3] == ' ') + outmode[3] = 0; + if (argc == 0) { + SET_BINARY_MODE(stdin); + SET_BINARY_MODE(stdout); + if (uncompr) { + file = gzdopen(fileno(stdin), "rb"); + if (file == NULL) error("can't gzdopen stdin"); + gz_uncompress(file, stdout); + } else { + file = gzdopen(fileno(stdout), outmode); + if (file == NULL) error("can't gzdopen stdout"); + gz_compress(stdin, file); + } + } else { + if (copyout) { + SET_BINARY_MODE(stdout); + } + do { + if (uncompr) { + if (copyout) { + file = gzopen(*argv, "rb"); + if (file == NULL) + fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv); + else + gz_uncompress(file, stdout); + } else { + file_uncompress(*argv); + } + } else { + if (copyout) { + FILE * in = fopen(*argv, "rb"); + + if (in == NULL) { + perror(*argv); + } else { + file = gzdopen(fileno(stdout), outmode); + if (file == NULL) error("can't gzdopen stdout"); + + gz_compress(in, file); + } + + } else { + file_compress(*argv, outmode); + } + } + } while (argv++, --argc); + } + return 0; +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/treebuild.xml b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/treebuild.xml new file mode 100644 index 000000000..fd75525f9 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/treebuild.xml @@ -0,0 +1,116 @@ + + + + zip compression library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.c new file mode 100644 index 000000000..50cf4b457 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.c @@ -0,0 +1,1203 @@ +/* trees.c -- output deflated data using Huffman coding + * Copyright (C) 1995-2017 Jean-loup Gailly + * detect_data_type() function provided freely by Cosmin Truta, 2006 + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process uses several Huffman trees. The more + * common source values are represented by shorter bit sequences. + * + * Each code tree is stored in a compressed form which is itself + * a Huffman encoding of the lengths of all the code strings (in + * ascending order by source values). The actual code strings are + * reconstructed from the lengths in the inflate process, as described + * in the deflate specification. + * + * REFERENCES + * + * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". + * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc + * + * Storer, James A. + * Data Compression: Methods and Theory, pp. 49-50. + * Computer Science Press, 1988. ISBN 0-7167-8156-5. + * + * Sedgewick, R. + * Algorithms, p290. + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +/* @(#) $Id$ */ + +/* #define GEN_TREES_H */ + +#include "deflate.h" + +#ifdef ZLIB_DEBUG +# include +#endif + +/* =========================================================================== + * Constants + */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local const int extra_dbits[D_CODES] /* extra bits for each distance code */ + = {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}; + +local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +local const uch bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ + +#if defined(GEN_TREES_H) || !defined(STDC) +/* non ANSI compilers may not accept trees.h */ + +local ct_data static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +local ct_data static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +uch _dist_code[DIST_CODE_LEN]; +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +uch _length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local int base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#else +# include "trees.h" +#endif /* GEN_TREES_H */ + +struct static_tree_desc_s { + const ct_data *static_tree; /* static tree or NULL */ + const intf *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ +}; + +local const static_tree_desc static_l_desc = +{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; + +local const static_tree_desc static_d_desc = +{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; + +local const static_tree_desc static_bl_desc = +{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; + +/* =========================================================================== + * Local (static) routines in this file. + */ + +local void tr_static_init OF((void)); +local void init_block OF((deflate_state *s)); +local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); +local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); +local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); +local void build_tree OF((deflate_state *s, tree_desc *desc)); +local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local int build_bl_tree OF((deflate_state *s)); +local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, + int blcodes)); +local void compress_block OF((deflate_state *s, const ct_data *ltree, + const ct_data *dtree)); +local int detect_data_type OF((deflate_state *s)); +local unsigned bi_reverse OF((unsigned value, int length)); +local void bi_windup OF((deflate_state *s)); +local void bi_flush OF((deflate_state *s)); + +#ifdef GEN_TREES_H +local void gen_trees_header OF((void)); +#endif + +#ifndef ZLIB_DEBUG +# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#else /* !ZLIB_DEBUG */ +# define send_code(s, c, tree) \ + { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ + send_bits(s, tree[c].Code, tree[c].Len); } +#endif + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +#ifdef ZLIB_DEBUG +local void send_bits OF((deflate_state *s, int value, int length)); + +local void send_bits(s, value, length) + deflate_state *s; + int value; /* value to send */ + int length; /* number of bits */ +{ + Tracevv((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + s->bits_sent += (ulg)length; + + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) + * unused bits in value. + */ + if (s->bi_valid > (int)Buf_size - length) { + s->bi_buf |= (ush)value << s->bi_valid; + put_short(s, s->bi_buf); + s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); + s->bi_valid += length - Buf_size; + } else { + s->bi_buf |= (ush)value << s->bi_valid; + s->bi_valid += length; + } +} +#else /* !ZLIB_DEBUG */ + +#define send_bits(s, value, length) \ +{ int len = length;\ + if (s->bi_valid > (int)Buf_size - len) {\ + int val = (int)value;\ + s->bi_buf |= (ush)val << s->bi_valid;\ + put_short(s, s->bi_buf);\ + s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ + s->bi_valid += len - Buf_size;\ + } else {\ + s->bi_buf |= (ush)(value) << s->bi_valid;\ + s->bi_valid += len;\ + }\ +} +#endif /* ZLIB_DEBUG */ + + +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the various 'constant' tables. + */ +local void tr_static_init() +{ +#if defined(GEN_TREES_H) || !defined(STDC) + static int static_init_done = 0; + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ +#ifdef NO_INIT_GLOBAL_POINTERS + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; +#endif + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1< dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { + _dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse((unsigned)n, 5); + } + static_init_done = 1; + +# ifdef GEN_TREES_H + gen_trees_header(); +# endif +#endif /* defined(GEN_TREES_H) || !defined(STDC) */ +} + +/* =========================================================================== + * Genererate the file trees.h describing the static trees. + */ +#ifdef GEN_TREES_H +# ifndef ZLIB_DEBUG +# include +# endif + +# define SEPARATOR(i, last, width) \ + ((i) == (last)? "\n};\n\n" : \ + ((i) % (width) == (width)-1 ? ",\n" : ", ")) + +void gen_trees_header() +{ + FILE *header = fopen("trees.h", "w"); + int i; + + Assert (header != NULL, "Can't open trees.h"); + fprintf(header, + "/* header created automatically with -DGEN_TREES_H */\n\n"); + + fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); + for (i = 0; i < L_CODES+2; i++) { + fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, + static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); + } + + fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, + static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); + } + + fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); + for (i = 0; i < DIST_CODE_LEN; i++) { + fprintf(header, "%2u%s", _dist_code[i], + SEPARATOR(i, DIST_CODE_LEN-1, 20)); + } + + fprintf(header, + "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { + fprintf(header, "%2u%s", _length_code[i], + SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); + } + + fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); + for (i = 0; i < LENGTH_CODES; i++) { + fprintf(header, "%1u%s", base_length[i], + SEPARATOR(i, LENGTH_CODES-1, 20)); + } + + fprintf(header, "local const int base_dist[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "%5u%s", base_dist[i], + SEPARATOR(i, D_CODES-1, 10)); + } + + fclose(header); +} +#endif /* GEN_TREES_H */ + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void ZLIB_INTERNAL _tr_init(s) + deflate_state *s; +{ + tr_static_init(); + + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef ZLIB_DEBUG + s->compressed_len = 0L; + s->bits_sent = 0L; +#endif + + /* Initialize the first block of the first file: */ + init_block(s); +} + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(s) + deflate_state *s; +{ + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->last_lit = s->matches = 0; +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(s, tree, top) \ +{\ + top = s->heap[SMALLEST]; \ + s->heap[SMALLEST] = s->heap[s->heap_len--]; \ + pqdownheap(s, tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m, depth) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(s, tree, k) + deflate_state *s; + ct_data *tree; /* the tree to restore */ + int k; /* node to move down */ +{ + int v = s->heap[k]; + int j = k << 1; /* left son of k */ + while (j <= s->heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s->heap_len && + smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s->heap[j], s->depth)) break; + + /* Exchange v with the smallest son */ + s->heap[k] = s->heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s->heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(s, desc) + deflate_state *s; + tree_desc *desc; /* the tree descriptor */ +{ + ct_data *tree = desc->dyn_tree; + int max_code = desc->max_code; + const ct_data *stree = desc->stat_desc->static_tree; + const intf *extra = desc->stat_desc->extra_bits; + int base = desc->stat_desc->extra_base; + int max_length = desc->stat_desc->max_length; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ + + for (h = s->heap_max+1; h < HEAP_SIZE; h++) { + n = s->heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + s->bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n-base]; + f = tree[n].Freq; + s->opt_len += (ulg)f * (unsigned)(bits + xbits); + if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits); + } + if (overflow == 0) return; + + Tracev((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length-1; + while (s->bl_count[bits] == 0) bits--; + s->bl_count[bits]--; /* move one leaf down the tree */ + s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ + s->bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = s->bl_count[bits]; + while (n != 0) { + m = s->heap[--h]; + if (m > max_code) continue; + if ((unsigned) tree[m].Len != (unsigned) bits) { + Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes (tree, max_code, bl_count) + ct_data *tree; /* the tree to decorate */ + int max_code; /* largest code with non zero frequency */ + ushf *bl_count; /* number of codes at each bit length */ +{ + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + unsigned code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + code = (code + bl_count[bits-1]) << 1; + next_code[bits] = (ush)code; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; + const ct_data *stree = desc->stat_desc->static_tree; + int elems = desc->stat_desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s->heap_len = 0, s->heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + s->heap[++(s->heap_len)] = max_code = n; + s->depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s->heap_len < 2) { + node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); + tree[node].Freq = 1; + s->depth[node] = 0; + s->opt_len--; if (stree) s->static_len -= stree[node].Len; + /* node is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + pqremove(s, tree, n); /* n = node of least frequency */ + m = s->heap[SMALLEST]; /* m = node of next least frequency */ + + s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ + s->heap[--(s->heap_max)] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? + s->depth[n] : s->depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == s->bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + s->heap[SMALLEST] = node++; + pqdownheap(s, tree, SMALLEST); + + } while (s->heap_len >= 2); + + s->heap[--(s->heap_max)] = s->heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, (tree_desc *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data *)tree, max_code, s->bl_count); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +local void scan_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code+1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + s->bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) s->bl_tree[curlen].Freq++; + s->bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + s->bl_tree[REPZ_3_10].Freq++; + } else { + s->bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(s, curlen, s->bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(s, curlen, s->bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); + + } else { + send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree(s) + deflate_state *s; +{ + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); + scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, (tree_desc *)(&(s->bl_desc))); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + s->opt_len += 3*((ulg)max_blindex+1) + 5+5+4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + s->opt_len, s->static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(s, lcodes, dcodes, blcodes) + deflate_state *s; + int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes-1, 5); + send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + +/* =========================================================================== + * Send a stored block + */ +void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) + deflate_state *s; + charf *buf; /* input block */ + ulg stored_len; /* length of input block */ + int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ + bi_windup(s); /* align on byte boundary */ + put_short(s, (ush)stored_len); + put_short(s, (ush)~stored_len); + zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len); + s->pending += stored_len; +#ifdef ZLIB_DEBUG + s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; + s->compressed_len += (stored_len + 4) << 3; + s->bits_sent += 2*16; + s->bits_sent += stored_len<<3; +#endif +} + +/* =========================================================================== + * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) + */ +void ZLIB_INTERNAL _tr_flush_bits(s) + deflate_state *s; +{ + bi_flush(s); +} + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +void ZLIB_INTERNAL _tr_align(s) + deflate_state *s; +{ + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef ZLIB_DEBUG + s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ +#endif + bi_flush(s); +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and write out the encoded block. + */ +void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) + deflate_state *s; + charf *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ + int last; /* one if this is the last block for a file */ +{ + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s->level > 0) { + + /* Check if the file is binary or text */ + if (s->strm->data_type == Z_UNKNOWN) + s->strm->data_type = detect_data_type(s); + + /* Construct the literal and distance trees */ + build_tree(s, (tree_desc *)(&(s->l_desc))); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + + build_tree(s, (tree_desc *)(&(s->d_desc))); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s->opt_len+3+7)>>3; + static_lenb = (s->static_len+3+7)>>3; + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + s->last_lit)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + + } else { + Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + +#ifdef FORCE_STORED + if (buf != (char*)0) { /* force stored block */ +#else + if (stored_len+4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + +#ifdef FORCE_STATIC + } else if (static_lenb >= 0) { /* force static trees */ +#else + } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { +#endif + send_bits(s, (STATIC_TREES<<1)+last, 3); + compress_block(s, (const ct_data *)static_ltree, + (const ct_data *)static_dtree); +#ifdef ZLIB_DEBUG + s->compressed_len += 3 + s->static_len; +#endif + } else { + send_bits(s, (DYN_TREES<<1)+last, 3); + send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, + max_blindex+1); + compress_block(s, (const ct_data *)s->dyn_ltree, + (const ct_data *)s->dyn_dtree); +#ifdef ZLIB_DEBUG + s->compressed_len += 3 + s->opt_len; +#endif + } + Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); +#ifdef ZLIB_DEBUG + s->compressed_len += 7; /* align on byte boundary */ +#endif + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int ZLIB_INTERNAL _tr_tally (s, dist, lc) + deflate_state *s; + unsigned dist; /* distance of matched string */ + unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + s->d_buf[s->last_lit] = (ush)dist; + s->l_buf[s->last_lit++] = (uch)lc; + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; + } else { + s->matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST(s) && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } + +#ifdef TRUNCATE_BLOCK + /* Try to guess if it is profitable to stop the current block here */ + if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { + /* Compute an upper bound for the compressed length */ + ulg out_length = (ulg)s->last_lit*8L; + ulg in_length = (ulg)((long)s->strstart - s->block_start); + int dcode; + for (dcode = 0; dcode < D_CODES; dcode++) { + out_length += (ulg)s->dyn_dtree[dcode].Freq * + (5L+extra_dbits[dcode]); + } + out_length >>= 3; + Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", + s->last_lit, in_length, out_length, + 100L - out_length*100L/in_length)); + if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; + } +#endif + return (s->last_lit == s->lit_bufsize-1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(s, ltree, dtree) + deflate_state *s; + const ct_data *ltree; /* literal tree */ + const ct_data *dtree; /* distance tree */ +{ + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned lx = 0; /* running index in l_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->last_lit != 0) do { + dist = s->d_buf[lx]; + lc = s->l_buf[lx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code+LITERALS+1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= (unsigned)base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + "pendingBuf overflow"); + + } while (lx < s->last_lit); + + send_code(s, END_BLOCK, ltree); +} + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +local int detect_data_type(s) + deflate_state *s; +{ + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + unsigned long black_mask = 0xf3ffc07fUL; + int n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>= 1) + if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) + return Z_BINARY; + + /* Check for textual ("white-listed") bytes. */ + if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 + || s->dyn_ltree[13].Freq != 0) + return Z_TEXT; + for (n = 32; n < LITERALS; n++) + if (s->dyn_ltree[n].Freq != 0) + return Z_TEXT; + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +local unsigned bi_reverse(code, len) + unsigned code; /* the value to invert */ + int len; /* its bit length */ +{ + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(s) + deflate_state *s; +{ + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(s) + deflate_state *s; +{ + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef ZLIB_DEBUG + s->bits_sent = (s->bits_sent+7) & ~7; +#endif +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.h new file mode 100644 index 000000000..d35639d82 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/trees.h @@ -0,0 +1,128 @@ +/* header created automatically with -DGEN_TREES_H */ + +local const ct_data static_ltree[L_CODES+2] = { +{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, +{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, +{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, +{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, +{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, +{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, +{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, +{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, +{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, +{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, +{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, +{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, +{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, +{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, +{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, +{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, +{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, +{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, +{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, +{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, +{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, +{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, +{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, +{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, +{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, +{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, +{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, +{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, +{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, +{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, +{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, +{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, +{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, +{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, +{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, +{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, +{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, +{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, +{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, +{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, +{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, +{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, +{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, +{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, +{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, +{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, +{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, +{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, +{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, +{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, +{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, +{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, +{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, +{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, +{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, +{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, +{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, +{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} +}; + +local const ct_data static_dtree[D_CODES] = { +{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, +{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, +{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, +{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, +{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, +{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} +}; + +const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, +12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, +18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 +}; + +const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, +13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, +17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, +19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 +}; + +local const int base_length[LENGTH_CODES] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, +64, 80, 96, 112, 128, 160, 192, 224, 0 +}; + +local const int base_dist[D_CODES] = { + 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 +}; + diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/uncompr.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/uncompr.c new file mode 100644 index 000000000..f03a1a865 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/uncompr.c @@ -0,0 +1,93 @@ +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#define ZLIB_INTERNAL +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. *sourceLen is + the byte length of the source buffer. Upon entry, *destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, + *destLen is the size of the decompressed data and *sourceLen is the number + of source bytes consumed. Upon return, source + *sourceLen points to the + first unused input byte. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, or + Z_DATA_ERROR if the input data was corrupted, including if the input data is + an incomplete zlib stream. +*/ +int ZEXPORT uncompress2 (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong *sourceLen; +{ + z_stream stream; + int err; + const uInt max = (uInt)-1; + uLong len, left; + Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ + + len = *sourceLen; + if (*destLen) { + left = *destLen; + *destLen = 0; + } + else { + left = 1; + dest = buf; + } + + stream.next_in = (z_const Bytef *)source; + stream.avail_in = 0; + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + stream.next_out = dest; + stream.avail_out = 0; + + do { + if (stream.avail_out == 0) { + stream.avail_out = left > (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = len > (uLong)max ? max : (uInt)len; + len -= stream.avail_in; + } + err = inflate(&stream, Z_NO_FLUSH); + } while (err == Z_OK); + + *sourceLen -= len + stream.avail_in; + if (dest != buf) + *destLen = stream.total_out; + else if (stream.total_out && err == Z_BUF_ERROR) + left = 1; + + inflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : + err == Z_NEED_DICT ? Z_DATA_ERROR : + err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR : + err; +} + +int ZEXPORT uncompress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return uncompress2(dest, destLen, source, &sourceLen); +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_f.mak b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_f.mak new file mode 100644 index 000000000..37f4d74c1 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_f.mak @@ -0,0 +1,43 @@ +# Makefile for zlib +# OpenWatcom flat model +# Last updated: 28-Dec-2005 + +# To use, do "wmake -f watcom_f.mak" + +C_SOURCE = adler32.c compress.c crc32.c deflate.c & + gzclose.c gzlib.c gzread.c gzwrite.c & + infback.c inffast.c inflate.c inftrees.c & + trees.c uncompr.c zutil.c + +OBJS = adler32.obj compress.obj crc32.obj deflate.obj & + gzclose.obj gzlib.obj gzread.obj gzwrite.obj & + infback.obj inffast.obj inflate.obj inftrees.obj & + trees.obj uncompr.obj zutil.obj + +CC = wcc386 +LINKER = wcl386 +CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx +ZLIB_LIB = zlib_f.lib + +.C.OBJ: + $(CC) $(CFLAGS) $[@ + +all: $(ZLIB_LIB) example.exe minigzip.exe + +$(ZLIB_LIB): $(OBJS) + wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj + wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj + wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj + wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj + wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj + +example.exe: $(ZLIB_LIB) example.obj + $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) + +minigzip.exe: $(ZLIB_LIB) minigzip.obj + $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) + +clean: .SYMBOLIC + del *.obj + del $(ZLIB_LIB) + @echo Cleaning done diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_l.mak b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_l.mak new file mode 100644 index 000000000..193eed7b3 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/watcom/watcom_l.mak @@ -0,0 +1,43 @@ +# Makefile for zlib +# OpenWatcom large model +# Last updated: 28-Dec-2005 + +# To use, do "wmake -f watcom_l.mak" + +C_SOURCE = adler32.c compress.c crc32.c deflate.c & + gzclose.c gzlib.c gzread.c gzwrite.c & + infback.c inffast.c inflate.c inftrees.c & + trees.c uncompr.c zutil.c + +OBJS = adler32.obj compress.obj crc32.obj deflate.obj & + gzclose.obj gzlib.obj gzread.obj gzwrite.obj & + infback.obj inffast.obj inflate.obj inftrees.obj & + trees.obj uncompr.obj zutil.obj + +CC = wcc +LINKER = wcl +CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx +ZLIB_LIB = zlib_l.lib + +.C.OBJ: + $(CC) $(CFLAGS) $[@ + +all: $(ZLIB_LIB) example.exe minigzip.exe + +$(ZLIB_LIB): $(OBJS) + wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj + wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj + wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj + wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj + wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj + +example.exe: $(ZLIB_LIB) example.obj + $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) + +minigzip.exe: $(ZLIB_LIB) minigzip.obj + $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) + +clean: .SYMBOLIC + del *.obj + del $(ZLIB_LIB) + @echo Cleaning done diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/DLL_FAQ.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/DLL_FAQ.txt new file mode 100644 index 000000000..12c009018 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/DLL_FAQ.txt @@ -0,0 +1,397 @@ + + Frequently Asked Questions about ZLIB1.DLL + + +This document describes the design, the rationale, and the usage +of the official DLL build of zlib, named ZLIB1.DLL. If you have +general questions about zlib, you should see the file "FAQ" found +in the zlib distribution, or at the following location: + http://www.gzip.org/zlib/zlib_faq.html + + + 1. What is ZLIB1.DLL, and how can I get it? + + - ZLIB1.DLL is the official build of zlib as a DLL. + (Please remark the character '1' in the name.) + + Pointers to a precompiled ZLIB1.DLL can be found in the zlib + web site at: + http://www.zlib.net/ + + Applications that link to ZLIB1.DLL can rely on the following + specification: + + * The exported symbols are exclusively defined in the source + files "zlib.h" and "zlib.def", found in an official zlib + source distribution. + * The symbols are exported by name, not by ordinal. + * The exported names are undecorated. + * The calling convention of functions is "C" (CDECL). + * The ZLIB1.DLL binary is linked to MSVCRT.DLL. + + The archive in which ZLIB1.DLL is bundled contains compiled + test programs that must run with a valid build of ZLIB1.DLL. + It is recommended to download the prebuilt DLL from the zlib + web site, instead of building it yourself, to avoid potential + incompatibilities that could be introduced by your compiler + and build settings. If you do build the DLL yourself, please + make sure that it complies with all the above requirements, + and it runs with the precompiled test programs, bundled with + the original ZLIB1.DLL distribution. + + If, for any reason, you need to build an incompatible DLL, + please use a different file name. + + + 2. Why did you change the name of the DLL to ZLIB1.DLL? + What happened to the old ZLIB.DLL? + + - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required + compilation settings that were incompatible to those used by + a static build. The DLL settings were supposed to be enabled + by defining the macro ZLIB_DLL, before including "zlib.h". + Incorrect handling of this macro was silently accepted at + build time, resulting in two major problems: + + * ZLIB_DLL was missing from the old makefile. When building + the DLL, not all people added it to the build options. In + consequence, incompatible incarnations of ZLIB.DLL started + to circulate around the net. + + * When switching from using the static library to using the + DLL, applications had to define the ZLIB_DLL macro and + to recompile all the sources that contained calls to zlib + functions. Failure to do so resulted in creating binaries + that were unable to run with the official ZLIB.DLL build. + + The only possible solution that we could foresee was to make + a binary-incompatible change in the DLL interface, in order to + remove the dependency on the ZLIB_DLL macro, and to release + the new DLL under a different name. + + We chose the name ZLIB1.DLL, where '1' indicates the major + zlib version number. We hope that we will not have to break + the binary compatibility again, at least not as long as the + zlib-1.x series will last. + + There is still a ZLIB_DLL macro, that can trigger a more + efficient build and use of the DLL, but compatibility no + longer dependents on it. + + + 3. Can I build ZLIB.DLL from the new zlib sources, and replace + an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier? + + - In principle, you can do it by assigning calling convention + keywords to the macros ZEXPORT and ZEXPORTVA. In practice, + it depends on what you mean by "an old ZLIB.DLL", because the + old DLL exists in several mutually-incompatible versions. + You have to find out first what kind of calling convention is + being used in your particular ZLIB.DLL build, and to use the + same one in the new build. If you don't know what this is all + about, you might be better off if you would just leave the old + DLL intact. + + + 4. Can I compile my application using the new zlib interface, and + link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or + earlier? + + - The official answer is "no"; the real answer depends again on + what kind of ZLIB.DLL you have. Even if you are lucky, this + course of action is unreliable. + + If you rebuild your application and you intend to use a newer + version of zlib (post- 1.1.4), it is strongly recommended to + link it to the new ZLIB1.DLL. + + + 5. Why are the zlib symbols exported by name, and not by ordinal? + + - Although exporting symbols by ordinal is a little faster, it + is risky. Any single glitch in the maintenance or use of the + DEF file that contains the ordinals can result in incompatible + builds and frustrating crashes. Simply put, the benefits of + exporting symbols by ordinal do not justify the risks. + + Technically, it should be possible to maintain ordinals in + the DEF file, and still export the symbols by name. Ordinals + exist in every DLL, and even if the dynamic linking performed + at the DLL startup is searching for names, ordinals serve as + hints, for a faster name lookup. However, if the DEF file + contains ordinals, the Microsoft linker automatically builds + an implib that will cause the executables linked to it to use + those ordinals, and not the names. It is interesting to + notice that the GNU linker for Win32 does not suffer from this + problem. + + It is possible to avoid the DEF file if the exported symbols + are accompanied by a "__declspec(dllexport)" attribute in the + source files. You can do this in zlib by predefining the + ZLIB_DLL macro. + + + 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling + convention. Why not use the STDCALL convention? + STDCALL is the standard convention in Win32, and I need it in + my Visual Basic project! + + (For readability, we use CDECL to refer to the convention + triggered by the "__cdecl" keyword, STDCALL to refer to + the convention triggered by "__stdcall", and FASTCALL to + refer to the convention triggered by "__fastcall".) + + - Most of the native Windows API functions (without varargs) use + indeed the WINAPI convention (which translates to STDCALL in + Win32), but the standard C functions use CDECL. If a user + application is intrinsically tied to the Windows API (e.g. + it calls native Windows API functions such as CreateFile()), + sometimes it makes sense to decorate its own functions with + WINAPI. But if ANSI C or POSIX portability is a goal (e.g. + it calls standard C functions such as fopen()), it is not a + sound decision to request the inclusion of , or to + use non-ANSI constructs, for the sole purpose to make the user + functions STDCALL-able. + + The functionality offered by zlib is not in the category of + "Windows functionality", but is more like "C functionality". + + Technically, STDCALL is not bad; in fact, it is slightly + faster than CDECL, and it works with variable-argument + functions, just like CDECL. It is unfortunate that, in spite + of using STDCALL in the Windows API, it is not the default + convention used by the C compilers that run under Windows. + The roots of the problem reside deep inside the unsafety of + the K&R-style function prototypes, where the argument types + are not specified; but that is another story for another day. + + The remaining fact is that CDECL is the default convention. + Even if an explicit convention is hard-coded into the function + prototypes inside C headers, problems may appear. The + necessity to expose the convention in users' callbacks is one + of these problems. + + The calling convention issues are also important when using + zlib in other programming languages. Some of them, like Ada + (GNAT) and Fortran (GNU G77), have C bindings implemented + initially on Unix, and relying on the C calling convention. + On the other hand, the pre- .NET versions of Microsoft Visual + Basic require STDCALL, while Borland Delphi prefers, although + it does not require, FASTCALL. + + In fairness to all possible uses of zlib outside the C + programming language, we choose the default "C" convention. + Anyone interested in different bindings or conventions is + encouraged to maintain specialized projects. The "contrib/" + directory from the zlib distribution already holds a couple + of foreign bindings, such as Ada, C++, and Delphi. + + + 7. I need a DLL for my Visual Basic project. What can I do? + + - Define the ZLIB_WINAPI macro before including "zlib.h", when + building both the DLL and the user application (except that + you don't need to define anything when using the DLL in Visual + Basic). The ZLIB_WINAPI macro will switch on the WINAPI + (STDCALL) convention. The name of this DLL must be different + than the official ZLIB1.DLL. + + Gilles Vollant has contributed a build named ZLIBWAPI.DLL, + with the ZLIB_WINAPI macro turned on, and with the minizip + functionality built in. For more information, please read + the notes inside "contrib/vstudio/readme.txt", found in the + zlib distribution. + + + 8. I need to use zlib in my Microsoft .NET project. What can I + do? + + - Henrik Ravn has contributed a .NET wrapper around zlib. Look + into contrib/dotzlib/, inside the zlib distribution. + + + 9. If my application uses ZLIB1.DLL, should I link it to + MSVCRT.DLL? Why? + + - It is not required, but it is recommended to link your + application to MSVCRT.DLL, if it uses ZLIB1.DLL. + + The executables (.EXE, .DLL, etc.) that are involved in the + same process and are using the C run-time library (i.e. they + are calling standard C functions), must link to the same + library. There are several libraries in the Win32 system: + CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc. + Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that + depend on it should also be linked to MSVCRT.DLL. + + +10. Why are you saying that ZLIB1.DLL and my application should + be linked to the same C run-time (CRT) library? I linked my + application and my DLLs to different C libraries (e.g. my + application to a static library, and my DLLs to MSVCRT.DLL), + and everything works fine. + + - If a user library invokes only pure Win32 API (accessible via + and the related headers), its DLL build will work + in any context. But if this library invokes standard C API, + things get more complicated. + + There is a single Win32 library in a Win32 system. Every + function in this library resides in a single DLL module, that + is safe to call from anywhere. On the other hand, there are + multiple versions of the C library, and each of them has its + own separate internal state. Standalone executables and user + DLLs that call standard C functions must link to a C run-time + (CRT) library, be it static or shared (DLL). Intermixing + occurs when an executable (not necessarily standalone) and a + DLL are linked to different CRTs, and both are running in the + same process. + + Intermixing multiple CRTs is possible, as long as their + internal states are kept intact. The Microsoft Knowledge Base + articles KB94248 "HOWTO: Use the C Run-Time" and KB140584 + "HOWTO: Link with the Correct C Run-Time (CRT) Library" + mention the potential problems raised by intermixing. + + If intermixing works for you, it's because your application + and DLLs are avoiding the corruption of each of the CRTs' + internal states, maybe by careful design, or maybe by fortune. + + Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such + as those provided by Borland, raises similar problems. + + +11. Why are you linking ZLIB1.DLL to MSVCRT.DLL? + + - MSVCRT.DLL exists on every Windows 95 with a new service pack + installed, or with Microsoft Internet Explorer 4 or later, and + on all other Windows 4.x or later (Windows 98, Windows NT 4, + or later). It is freely distributable; if not present in the + system, it can be downloaded from Microsoft or from other + software provider for free. + + The fact that MSVCRT.DLL does not exist on a virgin Windows 95 + is not so problematic. Windows 95 is scarcely found nowadays, + Microsoft ended its support a long time ago, and many recent + applications from various vendors, including Microsoft, do not + even run on it. Furthermore, no serious user should run + Windows 95 without a proper update installed. + + +12. Why are you not linking ZLIB1.DLL to + <> ? + + - We considered and abandoned the following alternatives: + + * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or + LIBCMT.LIB) is not a good option. People are using the DLL + mainly to save disk space. If you are linking your program + to a static C library, you may as well consider linking zlib + in statically, too. + + * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because + CRTDLL.DLL is present on every Win32 installation. + Unfortunately, it has a series of problems: it does not + work properly with Microsoft's C++ libraries, it does not + provide support for 64-bit file offsets, (and so on...), + and Microsoft discontinued its support a long time ago. + + * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied + with the Microsoft .NET platform, and Visual C++ 7.0/7.1, + raises problems related to the status of ZLIB1.DLL as a + system component. According to the Microsoft Knowledge Base + article KB326922 "INFO: Redistribution of the Shared C + Runtime Component in Visual C++ .NET", MSVCR70.DLL and + MSVCR71.DLL are not supposed to function as system DLLs, + because they may clash with MSVCRT.DLL. Instead, the + application's installer is supposed to put these DLLs + (if needed) in the application's private directory. + If ZLIB1.DLL depends on a non-system runtime, it cannot + function as a redistributable system component. + + * Linking ZLIB1.DLL to non-Microsoft runtimes, such as + Borland's, or Cygwin's, raises problems related to the + reliable presence of these runtimes on Win32 systems. + It's easier to let the DLL build of zlib up to the people + who distribute these runtimes, and who may proceed as + explained in the answer to Question 14. + + +13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL, + how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0 + (Visual Studio .NET) or newer? + + - Due to the problems explained in the Microsoft Knowledge Base + article KB326922 (see the previous answer), the C runtime that + comes with the VC7 environment is no longer considered a + system component. That is, it should not be assumed that this + runtime exists, or may be installed in a system directory. + Since ZLIB1.DLL is supposed to be a system component, it may + not depend on a non-system component. + + In order to link ZLIB1.DLL and your application to MSVCRT.DLL + in VC7, you need the library of Visual C++ 6.0 or older. If + you don't have this library at hand, it's probably best not to + use ZLIB1.DLL. + + We are hoping that, in the future, Microsoft will provide a + way to build applications linked to a proper system runtime, + from the Visual C++ environment. Until then, you have a + couple of alternatives, such as linking zlib in statically. + If your application requires dynamic linking, you may proceed + as explained in the answer to Question 14. + + +14. I need to link my own DLL build to a CRT different than + MSVCRT.DLL. What can I do? + + - Feel free to rebuild the DLL from the zlib sources, and link + it the way you want. You should, however, clearly state that + your build is unofficial. You should give it a different file + name, and/or install it in a private directory that can be + accessed by your application only, and is not visible to the + others (i.e. it's neither in the PATH, nor in the SYSTEM or + SYSTEM32 directories). Otherwise, your build may clash with + applications that link to the official build. + + For example, in Cygwin, zlib is linked to the Cygwin runtime + CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. + + +15. May I include additional pieces of code that I find useful, + link them in ZLIB1.DLL, and export them? + + - No. A legitimate build of ZLIB1.DLL must not include code + that does not originate from the official zlib source code. + But you can make your own private DLL build, under a different + file name, as suggested in the previous answer. + + For example, zlib is a part of the VCL library, distributed + with Borland Delphi and C++ Builder. The DLL build of VCL + is a redistributable file, named VCLxx.DLL. + + +16. May I remove some functionality out of ZLIB1.DLL, by enabling + macros like NO_GZCOMPRESS or NO_GZIP at compile time? + + - No. A legitimate build of ZLIB1.DLL must provide the complete + zlib functionality, as implemented in the official zlib source + code. But you can make your own private DLL build, under a + different file name, as suggested in the previous answer. + + +17. I made my own ZLIB1.DLL build. Can I test it for compliance? + + - We prefer that you download the official DLL from the zlib + web site. If you need something peculiar from this DLL, you + can send your suggestion to the zlib mailing list. + + However, in case you do rebuild the DLL yourself, you can run + it with the test programs found in the DLL distribution. + Running these test programs is not a guarantee of compliance, + but a failure can imply a detected problem. + +** + +This document is written and maintained by +Cosmin Truta diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.bor b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.bor new file mode 100644 index 000000000..d152bbb7f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.bor @@ -0,0 +1,110 @@ +# Makefile for zlib +# Borland C++ for Win32 +# +# Usage: +# make -f win32/Makefile.bor +# make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj + +# ------------ Borland C++ ------------ + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or +# added to the declaration of LOC here: +LOC = $(LOCAL_ZLIB) + +CC = bcc32 +AS = bcc32 +LD = bcc32 +AR = tlib +CFLAGS = -a -d -k- -O2 $(LOC) +ASFLAGS = $(LOC) +LDFLAGS = $(LOC) + + +# variables +ZLIB_LIB = zlib.lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +#OBJA = +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +#OBJPA= + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $< + +.asm.obj: + $(AS) -c $(ASFLAGS) $< + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: test/example.c zlib.h zconf.h + +minigzip.obj: test/minigzip.c zlib.h zconf.h + + +# For the sake of the old Borland make, +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + $(AR) $(ZLIB_LIB) $(OBJPA) + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + + +# cleanup +clean: + -del $(ZLIB_LIB) + -del *.obj + -del *.exe + -del *.tds + -del zlib.bak + -del foo.gz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.gcc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.gcc new file mode 100644 index 000000000..305be50af --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.gcc @@ -0,0 +1,182 @@ +# Makefile for zlib, derived from Makefile.dj2. +# Modified for mingw32 by C. Spieler, 6/16/98. +# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. +# Last updated: Mar 2012. +# Tested under Cygwin and MinGW. + +# Copyright (C) 1995-2003 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type from the top level zlib directory: +# +# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc +# +# To use the asm code, type: +# cp contrib/asm?86/match.S ./match.S +# make LOC=-DASMV OBJA=match.o -fwin32/Makefile.gcc +# +# To install libz.a, zconf.h and zlib.h in the system directories, type: +# +# make install -fwin32/Makefile.gcc +# +# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. +# +# To install the shared lib, append SHARED_MODE=1 to the make command : +# +# make install -fwin32/Makefile.gcc SHARED_MODE=1 + +# Note: +# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN), +# the DLL name should be changed from "zlib1.dll". + +STATICLIB = libz.a +SHAREDLIB = zlib1.dll +IMPLIB = libz.dll.a + +# +# Set to 1 if shared object needs to be installed +# +SHARED_MODE=0 + +#LOC = -DASMV +#LOC = -DZLIB_DEBUG -g + +PREFIX = +CC = $(PREFIX)gcc +CFLAGS = $(LOC) -O3 -Wall + +AS = $(CC) +ASFLAGS = $(LOC) -Wall + +LD = $(CC) +LDFLAGS = $(LOC) + +AR = $(PREFIX)ar +ARFLAGS = rcs + +RC = $(PREFIX)windres +RCFLAGS = --define GCC_WINDRES + +STRIP = $(PREFIX)strip + +CP = cp -fp +# If GNU install is available, replace $(CP) with install. +INSTALL = $(CP) +RM = rm -f + +prefix ?= /usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o +OBJA = + +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe + +test: example.exe minigzip.exe + ./example + echo hello world | ./minigzip | ./minigzip -d + +testdll: example_d.exe minigzip_d.exe + ./example_d + echo hello world | ./minigzip_d | ./minigzip_d -d + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +.S.o: + $(AS) $(ASFLAGS) -c -o $@ $< + +$(STATICLIB): $(OBJS) $(OBJA) + $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA) + +$(IMPLIB): $(SHAREDLIB) + +$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o + $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \ + -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o + $(STRIP) $@ + +example.exe: example.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) + $(STRIP) $@ + +minigzip.exe: minigzip.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) + $(STRIP) $@ + +example_d.exe: example.o $(IMPLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) + $(STRIP) $@ + +minigzip_d.exe: minigzip.o $(IMPLIB) + $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) + $(STRIP) $@ + +example.o: test/example.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/example.c + +minigzip.o: test/minigzip.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c + +zlibrc.o: win32/zlib1.rc + $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc + +.PHONY: install uninstall clean + +install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) + @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ + echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ + exit 1; \ + fi + -@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)' + -@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig + -if [ "$(SHARED_MODE)" = "1" ]; then \ + mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \ + $(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \ + $(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \ + fi + -$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)' + -$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)' + -$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)' + sed \ + -e 's|@prefix@|${prefix}|g' \ + -e 's|@exec_prefix@|${exec_prefix}|g' \ + -e 's|@libdir@|$(LIBRARY_PATH)|g' \ + -e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \ + -e 's|@includedir@|$(INCLUDE_PATH)|g' \ + -e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \ + zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc + +uninstall: + -if [ "$(SHARED_MODE)" = "1" ]; then \ + $(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \ + $(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \ + fi + -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h + -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h + -$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB) + +clean: + -$(RM) $(STATICLIB) + -$(RM) $(SHAREDLIB) + -$(RM) $(IMPLIB) + -$(RM) *.o + -$(RM) *.exe + -$(RM) foo.gz + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +gzclose.o: zlib.h zconf.h gzguts.h +gzlib.o: zlib.h zconf.h gzguts.h +gzread.o: zlib.h zconf.h gzguts.h +gzwrite.o: zlib.h zconf.h gzguts.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.msc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.msc new file mode 100644 index 000000000..6831882de --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/Makefile.msc @@ -0,0 +1,163 @@ +# Makefile for zlib using Microsoft (Visual) C +# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler +# +# Usage: +# nmake -f win32/Makefile.msc (standard build) +# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) +# nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" \ +# OBJA="inffas32.obj match686.obj" (use ASM code, x86) +# nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF -I." \ +# OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" (use ASM code, x64) + +# The toplevel directory of the source tree. +# +TOP = . + +# optional build flags +LOC = + +# variables +STATICLIB = zlib.lib +SHAREDLIB = zlib1.dll +IMPLIB = zdll.lib + +CC = cl +AS = ml +LD = link +AR = lib +RC = rc +CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) +WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE +ASFLAGS = -coff -Zi $(LOC) +LDFLAGS = -nologo -debug -incremental:no -opt:ref +ARFLAGS = -nologo +RCFLAGS = /dWIN32 /r + +OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ + gzwrite.obj infback.obj inflate.obj inftrees.obj inffast.obj trees.obj uncompr.obj zutil.obj +OBJA = + + +# targets +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \ + example.exe minigzip.exe example_d.exe minigzip_d.exe + +$(STATICLIB): $(OBJS) $(OBJA) + $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA) + +$(IMPLIB): $(SHAREDLIB) + +$(SHAREDLIB): $(TOP)/win32/zlib.def $(OBJS) $(OBJA) zlib1.res + $(LD) $(LDFLAGS) -def:$(TOP)/win32/zlib.def -dll -implib:$(IMPLIB) \ + -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;2 + +example.exe: example.obj $(STATICLIB) + $(LD) $(LDFLAGS) example.obj $(STATICLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 + +minigzip.exe: minigzip.obj $(STATICLIB) + $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 + +example_d.exe: example.obj $(IMPLIB) + $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 + +minigzip_d.exe: minigzip.obj $(IMPLIB) + $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 + +{$(TOP)}.c.obj: + $(CC) -c $(WFLAGS) $(CFLAGS) $< + +{$(TOP)/test}.c.obj: + $(CC) -c -I$(TOP) $(WFLAGS) $(CFLAGS) $< + +{$(TOP)/contrib/masmx64}.c.obj: + $(CC) -c $(WFLAGS) $(CFLAGS) $< + +{$(TOP)/contrib/masmx64}.asm.obj: + $(AS) -c $(ASFLAGS) $< + +{$(TOP)/contrib/masmx86}.asm.obj: + $(AS) -c $(ASFLAGS) $< + +adler32.obj: $(TOP)/adler32.c $(TOP)/zlib.h $(TOP)/zconf.h + +compress.obj: $(TOP)/compress.c $(TOP)/zlib.h $(TOP)/zconf.h + +crc32.obj: $(TOP)/crc32.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/crc32.h + +deflate.obj: $(TOP)/deflate.c $(TOP)/deflate.h $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h + +gzclose.obj: $(TOP)/gzclose.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h + +gzlib.obj: $(TOP)/gzlib.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h + +gzread.obj: $(TOP)/gzread.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h + +gzwrite.obj: $(TOP)/gzwrite.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h + +infback.obj: $(TOP)/infback.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ + $(TOP)/inffast.h $(TOP)/inffixed.h + +inffast.obj: $(TOP)/inffast.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ + $(TOP)/inffast.h + +inflate.obj: $(TOP)/inflate.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ + $(TOP)/inffast.h $(TOP)/inffixed.h + +inftrees.obj: $(TOP)/inftrees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h + +trees.obj: $(TOP)/trees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/deflate.h $(TOP)/trees.h + +uncompr.obj: $(TOP)/uncompr.c $(TOP)/zlib.h $(TOP)/zconf.h + +zutil.obj: $(TOP)/zutil.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h + +gvmat64.obj: $(TOP)/contrib\masmx64\gvmat64.asm + +inffasx64.obj: $(TOP)/contrib\masmx64\inffasx64.asm + +inffas8664.obj: $(TOP)/contrib\masmx64\inffas8664.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h \ + $(TOP)/inftrees.h $(TOP)/inflate.h $(TOP)/inffast.h + +inffas32.obj: $(TOP)/contrib\masmx86\inffas32.asm + +match686.obj: $(TOP)/contrib\masmx86\match686.asm + +example.obj: $(TOP)/test/example.c $(TOP)/zlib.h $(TOP)/zconf.h + +minigzip.obj: $(TOP)/test/minigzip.c $(TOP)/zlib.h $(TOP)/zconf.h + +zlib1.res: $(TOP)/win32/zlib1.rc + $(RC) $(RCFLAGS) /fo$@ $(TOP)/win32/zlib1.rc + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +testdll: example_d.exe minigzip_d.exe + example_d + echo hello world | minigzip_d | minigzip_d -d + + +# cleanup +clean: + -del $(STATICLIB) + -del $(SHAREDLIB) + -del $(IMPLIB) + -del *.obj + -del *.res + -del *.exp + -del *.exe + -del *.pdb + -del *.manifest + -del foo.gz diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/README-WIN32.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/README-WIN32.txt new file mode 100644 index 000000000..df7ab7f4b --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/README-WIN32.txt @@ -0,0 +1,103 @@ +ZLIB DATA COMPRESSION LIBRARY + +zlib 1.2.11 is a general purpose data compression library. All the code is +thread safe. The data format used by the zlib library is described by RFCs +(Request for Comments) 1950 to 1952 in the files +http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) +and rfc1952.txt (gzip format). + +All functions of the compression library are documented in the file zlib.h +(volunteer to write man pages welcome, contact zlib@gzip.org). Two compiled +examples are distributed in this package, example and minigzip. The example_d +and minigzip_d flavors validate that the zlib1.dll file is working correctly. + +Questions about zlib should be sent to . The zlib home page +is http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. + +PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html +before asking for help. + + +Manifest: + +The package zlib-1.2.11-win32-x86.zip will contain the following files: + + README-WIN32.txt This document + ChangeLog Changes since previous zlib packages + DLL_FAQ.txt Frequently asked questions about zlib1.dll + zlib.3.pdf Documentation of this library in Adobe Acrobat format + + example.exe A statically-bound example (using zlib.lib, not the dll) + example.pdb Symbolic information for debugging example.exe + + example_d.exe A zlib1.dll bound example (using zdll.lib) + example_d.pdb Symbolic information for debugging example_d.exe + + minigzip.exe A statically-bound test program (using zlib.lib, not the dll) + minigzip.pdb Symbolic information for debugging minigzip.exe + + minigzip_d.exe A zlib1.dll bound test program (using zdll.lib) + minigzip_d.pdb Symbolic information for debugging minigzip_d.exe + + zlib.h Install these files into the compilers' INCLUDE path to + zconf.h compile programs which use zlib.lib or zdll.lib + + zdll.lib Install these files into the compilers' LIB path if linking + zdll.exp a compiled program to the zlib1.dll binary + + zlib.lib Install these files into the compilers' LIB path to link zlib + zlib.pdb into compiled programs, without zlib1.dll runtime dependency + (zlib.pdb provides debugging info to the compile time linker) + + zlib1.dll Install this binary shared library into the system PATH, or + the program's runtime directory (where the .exe resides) + zlib1.pdb Install in the same directory as zlib1.dll, in order to debug + an application crash using WinDbg or similar tools. + +All .pdb files above are entirely optional, but are very useful to a developer +attempting to diagnose program misbehavior or a crash. Many additional +important files for developers can be found in the zlib127.zip source package +available from http://zlib.net/ - review that package's README file for details. + + +Acknowledgments: + +The deflate format used by zlib was defined by Phil Katz. The deflate and +zlib specifications were written by L. Peter Deutsch. Thanks to all the +people who reported problems and suggested various improvements in zlib; they +are too numerous to cite here. + + +Copyright notice: + + (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/VisualC.txt b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/VisualC.txt new file mode 100644 index 000000000..1005b2194 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/VisualC.txt @@ -0,0 +1,3 @@ + +To build zlib using the Microsoft Visual C++ environment, +use the appropriate project from the contrib/vstudio/ directory. diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib.def b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib.def new file mode 100644 index 000000000..a2188b000 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib.def @@ -0,0 +1,94 @@ +; zlib data compression library +EXPORTS +; basic functions + zlibVersion + deflate + deflateEnd + inflate + inflateEnd +; advanced functions + deflateSetDictionary + deflateGetDictionary + deflateCopy + deflateReset + deflateParams + deflateTune + deflateBound + deflatePending + deflatePrime + deflateSetHeader + inflateSetDictionary + inflateGetDictionary + inflateSync + inflateCopy + inflateReset + inflateReset2 + inflatePrime + inflateMark + inflateGetHeader + inflateBack + inflateBackEnd + zlibCompileFlags +; utility functions + compress + compress2 + compressBound + uncompress + uncompress2 + gzopen + gzdopen + gzbuffer + gzsetparams + gzread + gzfread + gzwrite + gzfwrite + gzprintf + gzvprintf + gzputs + gzgets + gzputc + gzgetc + gzungetc + gzflush + gzseek + gzrewind + gztell + gzoffset + gzeof + gzdirect + gzclose + gzclose_r + gzclose_w + gzerror + gzclearerr +; large file functions + gzopen64 + gzseek64 + gztell64 + gzoffset64 + adler32_combine64 + crc32_combine64 +; checksum functions + adler32 + adler32_z + crc32 + crc32_z + adler32_combine + crc32_combine +; various hacks, don't look :) + deflateInit_ + deflateInit2_ + inflateInit_ + inflateInit2_ + inflateBackInit_ + gzgetc_ + zError + inflateSyncPoint + get_crc_table + inflateUndermine + inflateValidate + inflateCodesUsed + inflateResetKeep + deflateResetKeep + gzopen_w diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib1.rc b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib1.rc new file mode 100644 index 000000000..234e641c3 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/win32/zlib1.rc @@ -0,0 +1,40 @@ +#include +#include "../zlib.h" + +#ifdef GCC_WINDRES +VS_VERSION_INFO VERSIONINFO +#else +VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE +#endif + FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 + PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS 1 +#else + FILEFLAGS 0 +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + BEGIN + VALUE "FileDescription", "zlib data compression library\0" + VALUE "FileVersion", ZLIB_VERSION "\0" + VALUE "InternalName", "zlib1.dll\0" + VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" + VALUE "OriginalFilename", "zlib1.dll\0" + VALUE "ProductName", "zlib\0" + VALUE "ProductVersion", ZLIB_VERSION "\0" + VALUE "Comments", "For more information visit http://www.zlib.net/\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h new file mode 100644 index 000000000..5e1d68a00 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h @@ -0,0 +1,534 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) +# define Z_HAVE_UNISTD_H +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.cmakein b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.cmakein new file mode 100644 index 000000000..a7f24cce6 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.cmakein @@ -0,0 +1,536 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H +#cmakedefine Z_PREFIX +#cmakedefine Z_HAVE_UNISTD_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) +# define Z_HAVE_UNISTD_H +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.in b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.in new file mode 100644 index 000000000..5e1d68a00 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zconf.h.in @@ -0,0 +1,534 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) +# define Z_HAVE_UNISTD_H +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3 b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3 new file mode 100644 index 000000000..bda4eb073 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3 @@ -0,0 +1,149 @@ +.TH ZLIB 3 "15 Jan 2017" +.SH NAME +zlib \- compression/decompression library +.SH SYNOPSIS +[see +.I zlib.h +for full description] +.SH DESCRIPTION +The +.I zlib +library is a general purpose data compression library. +The code is thread safe, assuming that the standard library functions +used are thread safe, such as memory allocation routines. +It provides in-memory compression and decompression functions, +including integrity checks of the uncompressed data. +This version of the library supports only one compression method (deflation) +but other algorithms may be added later +with the same stream interface. +.LP +Compression can be done in a single step if the buffers are large enough +or can be done by repeated calls of the compression function. +In the latter case, +the application must provide more input and/or consume the output +(providing more output space) before each call. +.LP +The library also supports reading and writing files in +.IR gzip (1) +(.gz) format +with an interface similar to that of stdio. +.LP +The library does not install any signal handler. +The decoder checks the consistency of the compressed data, +so the library should never crash even in the case of corrupted input. +.LP +All functions of the compression library are documented in the file +.IR zlib.h . +The distribution source includes examples of use of the library +in the files +.I test/example.c +and +.IR test/minigzip.c, +as well as other examples in the +.IR examples/ +directory. +.LP +Changes to this version are documented in the file +.I ChangeLog +that accompanies the source. +.LP +.I zlib +is built in to many languages and operating systems, including but not limited to +Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go. +.LP +An experimental package to read and write files in the .zip format, +written on top of +.I zlib +by Gilles Vollant (info@winimage.com), +is available at: +.IP +http://www.winimage.com/zLibDll/minizip.html +and also in the +.I contrib/minizip +directory of the main +.I zlib +source distribution. +.SH "SEE ALSO" +The +.I zlib +web site can be found at: +.IP +http://zlib.net/ +.LP +The data format used by the +.I zlib +library is described by RFC +(Request for Comments) 1950 to 1952 in the files: +.IP +http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) +.br +http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format) +.br +http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format) +.LP +Mark Nelson wrote an article about +.I zlib +for the Jan. 1997 issue of Dr. Dobb's Journal; +a copy of the article is available at: +.IP +http://marknelson.us/1997/01/01/zlib-engine/ +.SH "REPORTING PROBLEMS" +Before reporting a problem, +please check the +.I zlib +web site to verify that you have the latest version of +.IR zlib ; +otherwise, +obtain the latest version and see if the problem still exists. +Please read the +.I zlib +FAQ at: +.IP +http://zlib.net/zlib_faq.html +.LP +before asking for help. +Send questions and/or comments to zlib@gzip.org, +or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). +.SH AUTHORS AND LICENSE +Version 1.2.11 +.LP +Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler +.LP +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. +.LP +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: +.LP +.nr step 1 1 +.IP \n[step]. 3 +The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +.IP \n+[step]. +Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +.IP \n+[step]. +This notice may not be removed or altered from any source distribution. +.LP +Jean-loup Gailly Mark Adler +.br +jloup@gzip.org madler@alumni.caltech.edu +.LP +The deflate format used by +.I zlib +was defined by Phil Katz. +The deflate and +.I zlib +specifications were written by L. Peter Deutsch. +Thanks to all the people who reported problems and suggested various +improvements in +.IR zlib ; +who are too numerous to cite here. +.LP +UNIX manual page by R. P. C. Rodgers, +U.S. National Library of Medicine (rodgers@nlm.nih.gov). +.\" end of man page diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3.pdf b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3.pdf new file mode 100644 index 000000000..6fa519c5b Binary files /dev/null and b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.3.pdf differ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.h new file mode 100644 index 000000000..f09cdaf1e --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.h @@ -0,0 +1,1912 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.11, January 15th, 2017 + + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). +*/ + +#ifndef ZLIB_H +#define ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.2.11" +#define ZLIB_VERNUM 0x12b0 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 11 +#define ZLIB_VER_SUBREVISION 0 + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip and raw deflate streams in + memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in the case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + z_const Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total number of input bytes read so far */ + + Bytef *next_out; /* next output byte will go here */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total number of bytes output so far */ + + z_const char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use by the decompressor (particularly + if the decompressor wants to decompress everything in a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +#define Z_BLOCK 5 +#define Z_TREES 6 +/* Allowed flush values; see deflate() and inflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ +#define Z_UNKNOWN 2 +/* Possible values of the data_type field for deflate() */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary. Some output may be provided even if + flush is zero. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more ouput + in that case. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumulate before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed + codes block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six to avoid repeated flush markers due to + avail_out == 0 on return. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. + + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. + + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + To assist in this, on return inflate() always sets strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all of the uncompressed data for the + operation to complete. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The use of Z_FINISH is not + required to perform an inflation in one step. However it may be used to + inform inflate that a faster approach can be used for the single inflate() + call. Z_FINISH also informs inflate to not maintain a sliding window if the + stream completes, which reduces inflate's memory footprint. If the stream + does not complete, either because not all of the stream is provided or not + enough output space is provided, then a sliding window will be allocated and + inflate() can be called again to continue the operation as if Z_NO_FLUSH had + been used. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the effects of the flush parameter in this implementation are + on the return value of inflate() as noted below, when inflate() returns early + when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of + memory for a sliding window when Z_FINISH is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the Adler-32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the Adler-32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed Adler-32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained unless inflateGetHeader() is used. When processing + gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is to be attempted. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. +*/ + + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by the + caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute a check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. When using the zlib format, this + function must be called immediately after deflateInit, deflateInit2 or + deflateReset, and before any call of deflate. When doing raw deflate, this + function must be called either before any call of deflate, or immediately + after the completion of a deflate block, i.e. after all input has been + consumed and all output has been delivered when using any of the flush + options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The + compressor and decompressor must use exactly the same dictionary (see + inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the Adler-32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler-32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + Adler-32 value is not computed and strm->adler is not set. + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if not at a block boundary for raw deflate). deflateSetDictionary does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2(). This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different strategy. + If the compression approach (which is a function of the level) or the + strategy is changed, and if any input has been consumed in a previous + deflate() call, then the input available so far is compressed with the old + level and strategy using deflate(strm, Z_BLOCK). There are three approaches + for the compression levels 0, 1..3, and 4..9 respectively. The new level + and strategy will take effect at the next call of deflate(). + + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. + + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. +*/ + +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ + +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). If that first deflate() call is provided the + sourceLen input bytes, an output buffer allocated to the size returned by + deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed + to return Z_STREAM_END. Note that it is possible for the compressed size to + be larger than the value returned by deflateBound() if flush options other + than Z_FINISH or Z_NO_FLUSH are used. +*/ + +ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, + unsigned *pending, + int *bits)); +/* + deflatePending() returns the number of bytes and bits of output that have + been generated, but not yet provided in the available output. The bytes not + provided would be due to the available output space having being consumed. + The number of bits of output not provided are between 0 and 7, where they + await more bits to join them in order to fill out a full byte. If pending + or bits are Z_NULL, then those values are not set. + + deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. + */ + +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough + room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to 255, with no extra, name, or comment + fields. The gzip header is returned to the default state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an Adler-32 or a CRC-32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will not automatically decode concatenated gzip streams. + inflate() will return Z_STREAM_END at the end of the gzip stream. The state + would need to be reset to continue decoding a subsequent gzip stream. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler-32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called at any + time to set the dictionary. If the provided dictionary is smaller than the + window and there is already data in the window, then the provided dictionary + will amend what's there. The application must insure that the dictionary + that was used for compression is provided. + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler-32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a possible full flush point (see above + for the description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync searches for a 00 00 FF FF pattern in the compressed data. + All full flush points have this pattern, but not all occurrences of this + pattern are full flush points. + + inflateSync returns Z_OK if a possible full flush point has been found, + Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point + has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. + In the success case, the application may save the current current value of + total_in which indicates where valid compressed data was found. In the + error case, the application may repeatedly call inflateSync, providing more + input each time, until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. +*/ + +ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above, or -65536 if the provided + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + gz_headerp head)); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, + unsigned char FAR *window)); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the parameters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. +*/ + +typedef unsigned (*in_func) OF((void FAR *, + z_const unsigned char FAR * FAR *)); +typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); + +ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. +*/ + +ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: ZLIB_DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + +#ifndef Z_SOLO + + /* utility functions */ + +/* + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. + + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed data. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In + the case where there is not enough room, uncompress() will fill the output + buffer with the uncompressed data up to that point. +*/ + +ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen)); +/* + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Opens a gzip (.gz) file for reading or writing. The mode parameter is as + in fopen ("rb" or "wb") but can also include a compression level ("wb9") or + a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only + compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' + for fixed code compression as in "wb9F". (See the description of + deflateInit2 for more information about the strategy parameter.) 'T' will + request transparent writing or appending with no compression and not using + the gzip format. + + "a" can be used instead of "w" to request that the gzip stream that will + be written be appended to the file. "+" will result in an error, since + reading and writing to the same gzip file is not supported. The addition of + "x" when writing will create the file exclusively, which fails if the file + already exists. On systems that support it, the addition of "e" when + reading or writing will set the flag to close the file on an execve() call. + + These functions, as well as gzip, will read and decode a sequence of gzip + streams in a file. The append function of gzopen() can be used to create + such a file. (Also see gzflush() for another way to do this.) When + appending, gzopen does not test whether the file begins with a gzip stream, + nor does it look for the end of the gzip streams to begin appending. gzopen + will simply append a gzip stream to the existing file. + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. When + reading, this will be detected automatically by looking for the magic two- + byte gzip header. + + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen associates a gzFile with the file descriptor fd. File descriptors + are obtained from calls like open, dup, creat, pipe or fileno (if the file + has been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. If you are using fileno() to get the + file descriptor from a FILE *, then you will have to use dup() to avoid + double-close()ing the file descriptor. Both gzclose() and fclose() will + close the associated file descriptor, so they need to have different file + descriptors. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +/* + Set the internal buffer size used by this library's functions. The + default buffer size is 8192 bytes. This function must be called after + gzopen() or gzdopen(), and before any other calls that read or write the + file. The buffer memory allocation is always deferred to the first read or + write. Three times that size in buffer space is allocated. A larger buffer + size of, for example, 64K or 128K bytes will noticeably increase the speed + of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. Previously provided + data is flushed before the parameter change. + + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. If + the input file is not in gzip format, gzread copies the given number of + bytes into the buffer directly from the file. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream. Any number of gzip streams may be + concatenated in the input file, and will all be decompressed by gzread(). + If something other than a gzip stream is encountered after a gzip stream, + that remaining trailing garbage is ignored (and no error is returned). + + gzread can be used to read a gzip file that is being concurrently written. + Upon reaching the end of the input, gzread will return with the available + data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then + gzclearerr can be used to clear the end of file indicator in order to permit + gzread to be tried again. Z_OK indicates that a gzip stream was completed + on the last gzread. Z_BUF_ERROR indicates that the input file ended in the + middle of a gzip stream. Note that gzread does not return -1 in the event + of an incomplete gzip stream. This error is deferred until gzclose(), which + will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip + stream. Alternatively, gzerror can be used before gzclose to detect this + case. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ + +ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, + gzFile file)); +/* + Read up to nitems items of size size from file to buf, otherwise operating + as gzread() does. This duplicates the interface of stdio's fread(), with + size_t request and return types. If the library defines size_t, then + z_size_t is identical to size_t. If not, then z_size_t is an unsigned + integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevetheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, reseting and retrying on end-of-file, when size is not 1. +*/ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes written or 0 in case of + error. +*/ + +ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, + z_size_t nitems, gzFile file)); +/* + gzfwrite() writes nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + +ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the arguments to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf() + because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or a + newline character is read and transferred to buf, or an end-of-file + condition is encountered. If any characters are read or if len == 1, the + string is terminated with a null character. If no characters are read due + to an end-of-file or len < 1, then the buffer is left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. gzputc + returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte or -1 + in case of end of file or error. This is implemented as a macro for speed. + As such, it does not do all of the checking the other functions do. I.e. + it does not check to see if file is NULL, nor whether the structure file + points to has been clobbered or not. +*/ + +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +/* + Push one character back onto the stream to be read as the first character + on the next read. At least one character of push-back is allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter flush + is as in the deflate() function. The return value is the zlib error number + (see function gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatenated gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); + + Returns the starting position for the next gzread or gzwrite on the given + compressed file. This position represents a number of bytes in the + uncompressed data stream, and is zero when starting, even if appending or + reading a gzip stream from the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); + + Returns the current offset in the file being read or written. This offset + includes the count of bytes that precede the gzip stream, for example when + appending or when using gzdopen() for reading. When reading, the offset + does not include as yet unused buffered input. This information can be used + for a progress indicator. On error, gzoffset() returns -1. +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns true (1) if the end-of-file indicator has been set while reading, + false (0) otherwise. Note that the end-of-file indicator is set only if the + read tried to go past the end of the input, but came up short. Therefore, + just like feof(), gzeof() may return false even if there is no more data to + read, in the event that the last read request was for the exact number of + bytes remaining in the input file. This will happen if the input file size + is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. +*/ + +ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +/* + Returns true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). + + When writing, gzdirect() returns true (1) if transparent writing was + requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: + gzdirect() is not needed when writing. Transparent writing must be + explicitly requested, so the application already knows the answer. When + linking statically, using gzdirect() will include all of the zlib code for + gzip file reading and decompression, which may not be desired.) +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file and + deallocates the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the + last read ended in the middle of a gzip stream, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the given + compressed file. errnum is set to zlib error number. If an error occurred + in the file system and not in the compression library, errnum is set to + Z_ERRNO and the application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. +*/ + +ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +/* + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + +#endif /* !Z_SOLO */ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the compression + library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is Z_NULL, this function returns the + required initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed + much faster. + + Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as adler32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, + z_off_t len2)); + + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note + that the z_off_t type (like off_t) is a signed integer. If len2 is + negative, the result has no meaning or utility. +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. If buf is Z_NULL, this function returns the required + initial value for the crc. Pre- and post-conditioning (one's complement) is + performed within this function so it shouldn't be done by the application. + + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as crc32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size)); +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#endif + +#ifndef Z_SOLO + +/* gzgetc() macro and its supporting function and exposed data structure. Note + * that the real internal state is much larger than the exposed structure. + * This abbreviated structure exposes just enough for the gzgetc() macro. The + * user should not mess with these exposed elements, since their names or + * behavior could change in the future, perhaps even capriciously. They can + * only be used by the gzgetc() macro. You have been warned. + */ +struct gzFile_s { + unsigned have; + unsigned char *next; + z_off64_t pos; +}; +ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +# define z_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#else +# define gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#endif + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#ifdef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); +#endif + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) +# ifdef Z_PREFIX_SET +# define z_gzopen z_gzopen64 +# define z_gzseek z_gzseek64 +# define z_gztell z_gztell64 +# define z_gzoffset z_gzoffset64 +# define z_adler32_combine z_adler32_combine64 +# define z_crc32_combine z_crc32_combine64 +# else +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# endif +# ifndef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +#endif + +#else /* Z_SOLO */ + + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + +#endif /* !Z_SOLO */ + +/* undocumented functions */ +ZEXTERN const char * ZEXPORT zError OF((int)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); +ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); +ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); +ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) +ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, + const char *mode)); +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, + const char *format, + va_list va)); +# endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ZLIB_H */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.map b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.map new file mode 100644 index 000000000..82ce98cf7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.map @@ -0,0 +1,94 @@ +ZLIB_1.2.0 { + global: + compressBound; + deflateBound; + inflateBack; + inflateBackEnd; + inflateBackInit_; + inflateCopy; + local: + deflate_copyright; + inflate_copyright; + inflate_fast; + inflate_table; + zcalloc; + zcfree; + z_errmsg; + gz_error; + gz_intmax; + _*; +}; + +ZLIB_1.2.0.2 { + gzclearerr; + gzungetc; + zlibCompileFlags; +} ZLIB_1.2.0; + +ZLIB_1.2.0.8 { + deflatePrime; +} ZLIB_1.2.0.2; + +ZLIB_1.2.2 { + adler32_combine; + crc32_combine; + deflateSetHeader; + inflateGetHeader; +} ZLIB_1.2.0.8; + +ZLIB_1.2.2.3 { + deflateTune; + gzdirect; +} ZLIB_1.2.2; + +ZLIB_1.2.2.4 { + inflatePrime; +} ZLIB_1.2.2.3; + +ZLIB_1.2.3.3 { + adler32_combine64; + crc32_combine64; + gzopen64; + gzseek64; + gztell64; + inflateUndermine; +} ZLIB_1.2.2.4; + +ZLIB_1.2.3.4 { + inflateReset2; + inflateMark; +} ZLIB_1.2.3.3; + +ZLIB_1.2.3.5 { + gzbuffer; + gzoffset; + gzoffset64; + gzclose_r; + gzclose_w; +} ZLIB_1.2.3.4; + +ZLIB_1.2.5.1 { + deflatePending; +} ZLIB_1.2.3.5; + +ZLIB_1.2.5.2 { + deflateResetKeep; + gzgetc_; + inflateResetKeep; +} ZLIB_1.2.5.1; + +ZLIB_1.2.7.1 { + inflateGetDictionary; + gzvprintf; +} ZLIB_1.2.5.2; + +ZLIB_1.2.9 { + inflateCodesUsed; + inflateValidate; + uncompress2; + gzfread; + gzfwrite; + deflateGetDictionary; + adler32_z; + crc32_z; +} ZLIB_1.2.7.1; diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.cmakein b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.cmakein new file mode 100644 index 000000000..a5e642938 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.cmakein @@ -0,0 +1,13 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@INSTALL_LIB_DIR@ +sharedlibdir=@INSTALL_LIB_DIR@ +includedir=@INSTALL_INC_DIR@ + +Name: zlib +Description: zlib compression library +Version: @VERSION@ + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: -I${includedir} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.in b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.in new file mode 100644 index 000000000..7e5acf9c7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +sharedlibdir=@sharedlibdir@ +includedir=@includedir@ + +Name: zlib +Description: zlib compression library +Version: @VERSION@ + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: -I${includedir} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib2ansi b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib2ansi new file mode 100644 index 000000000..15e3e165f --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zlib2ansi @@ -0,0 +1,152 @@ +#!/usr/bin/perl + +# Transform K&R C function definitions into ANSI equivalent. +# +# Author: Paul Marquess +# Version: 1.0 +# Date: 3 October 2006 + +# TODO +# +# Asumes no function pointer parameters. unless they are typedefed. +# Assumes no literal strings that look like function definitions +# Assumes functions start at the beginning of a line + +use strict; +use warnings; + +local $/; +$_ = <>; + +my $sp = qr{ \s* (?: /\* .*? \*/ )? \s* }x; # assume no nested comments + +my $d1 = qr{ $sp (?: [\w\*\s]+ $sp)* $sp \w+ $sp [\[\]\s]* $sp }x ; +my $decl = qr{ $sp (?: \w+ $sp )+ $d1 }xo ; +my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ; + + +while (s/^ + ( # Start $1 + ( # Start $2 + .*? # Minimal eat content + ( ^ \w [\w\s\*]+ ) # $3 -- function name + \s* # optional whitespace + ) # $2 - Matched up to before parameter list + + \( \s* # Literal "(" + optional whitespace + ( [^\)]+ ) # $4 - one or more anythings except ")" + \s* \) # optional whitespace surrounding a Literal ")" + + ( (?: $dList )+ ) # $5 + + $sp ^ { # literal "{" at start of line + ) # Remember to $1 + //xsom + ) +{ + my $all = $1 ; + my $prefix = $2; + my $param_list = $4 ; + my $params = $5; + + StripComments($params); + StripComments($param_list); + $param_list =~ s/^\s+//; + $param_list =~ s/\s+$//; + + my $i = 0 ; + my %pList = map { $_ => $i++ } + split /\s*,\s*/, $param_list; + my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ; + + my @params = split /\s*;\s*/, $params; + my @outParams = (); + foreach my $p (@params) + { + if ($p =~ /,/) + { + my @bits = split /\s*,\s*/, $p; + my $first = shift @bits; + $first =~ s/^\s*//; + push @outParams, $first; + $first =~ /^(\w+\s*)/; + my $type = $1 ; + push @outParams, map { $type . $_ } @bits; + } + else + { + $p =~ s/^\s+//; + push @outParams, $p; + } + } + + + my %tmp = map { /$pMatch/; $_ => $pList{$1} } + @outParams ; + + @outParams = map { " $_" } + sort { $tmp{$a} <=> $tmp{$b} } + @outParams ; + + print $prefix ; + print "(\n" . join(",\n", @outParams) . ")\n"; + print "{" ; + +} + +# Output any trailing code. +print ; +exit 0; + + +sub StripComments +{ + + no warnings; + + # Strip C & C++ coments + # From the perlfaq + $_[0] =~ + + s{ + /\* ## Start of /* ... */ comment + [^*]*\*+ ## Non-* followed by 1-or-more *'s + ( + [^/*][^*]*\*+ + )* ## 0-or-more things which don't start with / + ## but do end with '*' + / ## End of /* ... */ comment + + | ## OR C++ Comment + // ## Start of C++ comment // + [^\n]* ## followed by 0-or-more non end of line characters + + | ## OR various things which aren't comments: + + ( + " ## Start of " ... " string + ( + \\. ## Escaped char + | ## OR + [^"\\] ## Non "\ + )* + " ## End of " ... " string + + | ## OR + + ' ## Start of ' ... ' string + ( + \\. ## Escaped char + | ## OR + [^'\\] ## Non '\ + )* + ' ## End of ' ... ' string + + | ## OR + + . ## Anything other char + [^/"'\\]* ## Chars which doesn't start a comment, string or escape + ) + }{$2}gxs; + +} diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.c new file mode 100644 index 000000000..a76c6b0c7 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.c @@ -0,0 +1,325 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2017 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" +#ifndef Z_SOLO +# include "gzguts.h" +#endif + +z_const char * const z_errmsg[10] = { + (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ + (z_const char *)"stream end", /* Z_STREAM_END 1 */ + (z_const char *)"", /* Z_OK 0 */ + (z_const char *)"file error", /* Z_ERRNO (-1) */ + (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */ + (z_const char *)"data error", /* Z_DATA_ERROR (-3) */ + (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */ + (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */ + (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */ + (z_const char *)"" +}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +uLong ZEXPORT zlibCompileFlags() +{ + uLong flags; + + flags = 0; + switch ((int)(sizeof(uInt))) { + case 2: break; + case 4: flags += 1; break; + case 8: flags += 2; break; + default: flags += 3; + } + switch ((int)(sizeof(uLong))) { + case 2: break; + case 4: flags += 1 << 2; break; + case 8: flags += 2 << 2; break; + default: flags += 3 << 2; + } + switch ((int)(sizeof(voidpf))) { + case 2: break; + case 4: flags += 1 << 4; break; + case 8: flags += 2 << 4; break; + default: flags += 3 << 4; + } + switch ((int)(sizeof(z_off_t))) { + case 2: break; + case 4: flags += 1 << 6; break; + case 8: flags += 2 << 6; break; + default: flags += 3 << 6; + } +#ifdef ZLIB_DEBUG + flags += 1 << 8; +#endif +#if defined(ASMV) || defined(ASMINF) + flags += 1 << 9; +#endif +#ifdef ZLIB_WINAPI + flags += 1 << 10; +#endif +#ifdef BUILDFIXED + flags += 1 << 12; +#endif +#ifdef DYNAMIC_CRC_TABLE + flags += 1 << 13; +#endif +#ifdef NO_GZCOMPRESS + flags += 1L << 16; +#endif +#ifdef NO_GZIP + flags += 1L << 17; +#endif +#ifdef PKZIP_BUG_WORKAROUND + flags += 1L << 20; +#endif +#ifdef FASTEST + flags += 1L << 21; +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifdef NO_vsnprintf + flags += 1L << 25; +# ifdef HAS_vsprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_vsnprintf_void + flags += 1L << 26; +# endif +# endif +#else + flags += 1L << 24; +# ifdef NO_snprintf + flags += 1L << 25; +# ifdef HAS_sprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_snprintf_void + flags += 1L << 26; +# endif +# endif +#endif + return flags; +} + +#ifdef ZLIB_DEBUG +#include +# ifndef verbose +# define verbose 0 +# endif +int ZLIB_INTERNAL z_verbose = verbose; + +void ZLIB_INTERNAL z_error (m) + char *m; +{ + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + +#if defined(_WIN32_WCE) + /* The Microsoft C Run-Time Library for Windows CE doesn't have + * errno. We define it as a global variable to simplify porting. + * Its value is always 0 and should not be used. + */ + int errno = 0; +#endif + +#ifndef HAVE_MEMCPY + +void ZLIB_INTERNAL zmemcpy(dest, source, len) + Bytef* dest; + const Bytef* source; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int ZLIB_INTERNAL zmemcmp(s1, s2, len) + const Bytef* s1; + const Bytef* s2; + uInt len; +{ + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void ZLIB_INTERNAL zmemzero(dest, len) + Bytef* dest; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + +#ifndef Z_SOLO + +#ifdef SYS16BIT + +#ifdef __TURBOC__ +/* Turbo C in 16-bit mode */ + +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + voidpf buf; + ulg bsize = (ulg)items*size; + + (void)opaque; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) +{ + int n; + + (void)opaque; + + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + Assert(0, "zcfree: ptr not found"); +} + +#endif /* __TURBOC__ */ + + +#ifdef M_I86 +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) +{ + (void)opaque; + return _halloc((long)items, size); +} + +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) +{ + (void)opaque; + _hfree(ptr); +} + +#endif /* M_I86 */ + +#endif /* SYS16BIT */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp malloc OF((uInt size)); +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); +#endif + +voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) + voidpf opaque; + unsigned items; + unsigned size; +{ + (void)opaque; + return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : + (voidpf)calloc(items, size); +} + +void ZLIB_INTERNAL zcfree (opaque, ptr) + voidpf opaque; + voidpf ptr; +{ + (void)opaque; + free(ptr); +} + +#endif /* MY_ZCALLOC */ + +#endif /* !Z_SOLO */ diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.h b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.h new file mode 100644 index 000000000..b079ea6a8 --- /dev/null +++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/zutil.h @@ -0,0 +1,271 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef ZUTIL_H +#define ZUTIL_H + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include "zlib.h" + +#if defined(STDC) && !defined(Z_SOLO) +# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) +# include +# endif +# include +# include +#endif + +#ifdef Z_SOLO + typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ +#endif + +#ifndef local +# define local static +#endif +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ + +typedef unsigned char uch; +typedef uch FAR uchf; +typedef unsigned short ush; +typedef ush FAR ushf; +typedef unsigned long ulg; + +extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] + +#define ERR_RETURN(strm,err) \ + return (strm->msg = ERR_MSG(err), (err)) +/* To be used only when the state is known to be valid */ + + /* common constants */ + +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +/* The minimum and maximum match lengths */ + +#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ + + /* target dependencies */ + +#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) +# define OS_CODE 0x00 +# ifndef Z_SOLO +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include +# endif +# else /* MSC or DJGPP */ +# include +# endif +# endif +#endif + +#ifdef AMIGA +# define OS_CODE 1 +#endif + +#if defined(VAXC) || defined(VMS) +# define OS_CODE 2 +# define F_OPEN(name, mode) \ + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") +#endif + +#ifdef __370__ +# if __TARGET_LIB__ < 0x20000000 +# define OS_CODE 4 +# elif __TARGET_LIB__ < 0x40000000 +# define OS_CODE 11 +# else +# define OS_CODE 8 +# endif +#endif + +#if defined(ATARI) || defined(atarist) +# define OS_CODE 5 +#endif + +#ifdef OS2 +# define OS_CODE 6 +# if defined(M_I86) && !defined(Z_SOLO) +# include +# endif +#endif + +#if defined(MACOS) || defined(TARGET_OS_MAC) +# define OS_CODE 7 +# ifndef Z_SOLO +# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fdopen */ +# else +# ifndef fdopen +# define fdopen(fd,mode) NULL /* No fdopen() */ +# endif +# endif +# endif +#endif + +#ifdef __acorn +# define OS_CODE 13 +#endif + +#if defined(WIN32) && !defined(__CYGWIN__) +# define OS_CODE 10 +#endif + +#ifdef _BEOS_ +# define OS_CODE 16 +#endif + +#ifdef __TOS_OS400__ +# define OS_CODE 18 +#endif + +#ifdef __APPLE__ +# define OS_CODE 19 +#endif + +#if defined(_BEOS_) || defined(RISCOS) +# define fdopen(fd,mode) NULL /* No fdopen() */ +#endif + +#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX +# if defined(_WIN32_WCE) +# define fdopen(fd,mode) NULL /* No fdopen() */ +# ifndef _PTRDIFF_T_DEFINED + typedef int ptrdiff_t; +# define _PTRDIFF_T_DEFINED +# endif +# else +# define fdopen(fd,type) _fdopen(fd,type) +# endif +#endif + +#if defined(__BORLANDC__) && !defined(MSDOS) + #pragma warn -8004 + #pragma warn -8008 + #pragma warn -8066 +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_WIN32) && \ + (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +#endif + + /* common defaults */ + +#ifndef OS_CODE +# define OS_CODE 3 /* assume Unix */ +#endif + +#ifndef F_OPEN +# define F_OPEN(name, mode) fopen((name), (mode)) +#endif + + /* functions */ + +#if defined(pyr) || defined(Z_SOLO) +# define NO_MEMCPY +#endif +#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) + /* Use our own functions for small and medium model with MSC <= 5.0. + * You may have to use the same strategy for Borland C (untested). + * The __SC__ check is for Symantec. + */ +# define NO_MEMCPY +#endif +#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) +# define HAVE_MEMCPY +#endif +#ifdef HAVE_MEMCPY +# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# define zmemcpy _fmemcpy +# define zmemcmp _fmemcmp +# define zmemzero(dest, len) _fmemset(dest, 0, len) +# else +# define zmemcpy memcpy +# define zmemcmp memcmp +# define zmemzero(dest, len) memset(dest, 0, len) +# endif +#else + void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); +#endif + +/* Diagnostic functions */ +#ifdef ZLIB_DEBUG +# include + extern int ZLIB_INTERNAL z_verbose; + extern void ZLIB_INTERNAL z_error OF((char *m)); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +# define Trace(x) {if (z_verbose>=0) fprintf x ;} +# define Tracev(x) {if (z_verbose>0) fprintf x ;} +# define Tracevv(x) {if (z_verbose>1) fprintf x ;} +# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} +# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + +#ifndef Z_SOLO + voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, + unsigned size)); + void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); +#endif + +#define ZALLOC(strm, items, size) \ + (*((strm)->zalloc))((strm)->opaque, (items), (size)) +#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) +#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} + +/* Reverse the bytes in a 32-bit value */ +#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ + (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) + +#endif /* ZUTIL_H */ diff --git a/src/boost/tools/boost_install/test/log/CMakeLists.txt b/src/boost/tools/boost_install/test/log/CMakeLists.txt new file mode 100644 index 000000000..fedd470a0 --- /dev/null +++ b/src/boost/tools/boost_install/test/log/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigLogTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_ALL_COMPONENTS) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED ALL ${BOOST_HINTS}) + +elseif(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS log ${BOOST_HINTS}) + +else() + + find_package(boost_log ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::log) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/log/quick.cpp b/src/boost/tools/boost_install/test/log/quick.cpp new file mode 100644 index 000000000..831274e12 --- /dev/null +++ b/src/boost/tools/boost_install/test/log/quick.cpp @@ -0,0 +1,15 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +int main() +{ + BOOST_LOG_TRIVIAL(info) << "An informational message"; + BOOST_LOG_TRIVIAL(warning) << "A warning message"; +} diff --git a/src/boost/tools/boost_install/test/mpi/CMakeLists.txt b/src/boost/tools/boost_install/test/mpi/CMakeLists.txt new file mode 100644 index 000000000..83e02d5c9 --- /dev/null +++ b/src/boost/tools/boost_install/test/mpi/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigMpiTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS mpi ${BOOST_HINTS}) + +else() + + find_package(boost_mpi ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::mpi) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/mpi/quick.cpp b/src/boost/tools/boost_install/test/mpi/quick.cpp new file mode 100644 index 000000000..e988d44a6 --- /dev/null +++ b/src/boost/tools/boost_install/test/mpi/quick.cpp @@ -0,0 +1,20 @@ + +// Copyright 2019 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +int main() +{ + std::pair ver = boost::mpi::environment::version(); + + BOOST_TEST_EQ( ver.first, MPI_VERSION ); + BOOST_TEST_EQ( ver.second, MPI_SUBVERSION ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/program_options/CMakeLists.txt b/src/boost/tools/boost_install/test/program_options/CMakeLists.txt new file mode 100644 index 000000000..11b049658 --- /dev/null +++ b/src/boost/tools/boost_install/test/program_options/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigProgramOptionsTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS program_options ${BOOST_HINTS}) + +else() + + find_package(boost_program_options ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::program_options) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(NAME main COMMAND main --path=initial) diff --git a/src/boost/tools/boost_install/test/program_options/quick.cpp b/src/boost/tools/boost_install/test/program_options/quick.cpp new file mode 100644 index 000000000..edf45c4a2 --- /dev/null +++ b/src/boost/tools/boost_install/test/program_options/quick.cpp @@ -0,0 +1,49 @@ + +// Copyright 2017 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +// See library home page at http://www.boost.org/libs/program_options + +#include +#include + +namespace po = boost::program_options; + +int main( int argc, char const* argv[] ) +{ + po::options_description desc( "Allowed options" ); + + desc.add_options() + ( "path,p", po::value(), "set initial path" ) + ; + + po::variables_map vm; + + try + { + po::store( po::parse_command_line( argc, argv, desc ), vm ); + po::notify( vm ); + } + catch( std::exception const & x ) + { + std::cerr << "Error: " << x.what() << std::endl; + return 1; + } + + std::string p; + + if( vm.count( "path" ) ) + { + p = vm[ "path" ].as(); + } + + std::string expected( "initial" ); + + BOOST_TEST_EQ( p, expected ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/python/CMakeLists.txt b/src/boost/tools/boost_install/test/python/CMakeLists.txt new file mode 100644 index 000000000..1637aaaa1 --- /dev/null +++ b/src/boost/tools/boost_install/test/python/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright 2018-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigPythonTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +find_package(PythonLibs ${USE_PYTHON_VERSION} REQUIRED) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +set(component python) + +if(USE_PYTHON_COMPONENT) + + set(component ${USE_PYTHON_COMPONENT}) + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS ${component} ${BOOST_HINTS}) + +else() + + # use the found Python version in case more than one Boost.Python is installed + set(Boost_PYTHON_VERSION ${PYTHONLIBS_VERSION_STRING}) + + if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS python ${BOOST_HINTS}) + + else() + + find_package(boost_python ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + + endif() +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::${component} ${PYTHON_LIBRARIES}) +target_include_directories(main PRIVATE ${PYTHON_INCLUDE_DIRS}) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/python/quick.cpp b/src/boost/tools/boost_install/test/python/quick.cpp new file mode 100644 index 000000000..4f31cb9e8 --- /dev/null +++ b/src/boost/tools/boost_install/test/python/quick.cpp @@ -0,0 +1,27 @@ + +// Copyright 2017, 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#if defined(_WIN32) +# define BOOST_PYTHON_STATIC_LIB +#endif +#include +#include + +namespace python = boost::python; + +int main() +{ + Py_Initialize(); + + python::dict env; + python::object result = python::exec( "number = 42", env, env ); + + BOOST_TEST_EQ( python::extract( env["number"] ), 42 ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/random/CMakeLists.txt b/src/boost/tools/boost_install/test/random/CMakeLists.txt new file mode 100644 index 000000000..66e5a47d0 --- /dev/null +++ b/src/boost/tools/boost_install/test/random/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright 2018-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigRandomTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS random ${BOOST_HINTS}) + +else() + + find_package(boost_random ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_library(lib lib.cpp) +target_link_libraries(lib PRIVATE Boost::random) + +add_executable(main main.cpp) +target_link_libraries(main PRIVATE lib Boost::headers) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/random/lib.cpp b/src/boost/tools/boost_install/test/random/lib.cpp new file mode 100644 index 000000000..c9ce5103f --- /dev/null +++ b/src/boost/tools/boost_install/test/random/lib.cpp @@ -0,0 +1,18 @@ + +// Copyright 2017-2020 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +#if defined(_MSC_VER) +__declspec(dllexport) +#endif +unsigned get_random_number() +{ + boost::random::random_device dev; + return dev(); +} diff --git a/src/boost/tools/boost_install/test/random/main.cpp b/src/boost/tools/boost_install/test/random/main.cpp new file mode 100644 index 000000000..97175e98c --- /dev/null +++ b/src/boost/tools/boost_install/test/random/main.cpp @@ -0,0 +1,17 @@ + +// Copyright 2017-2020 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +unsigned get_random_number(); + +int main() +{ + BOOST_TEST_NE( get_random_number(), get_random_number() ); + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/regex/CMakeLists.txt b/src/boost/tools/boost_install/test/regex/CMakeLists.txt new file mode 100644 index 000000000..ed88b680d --- /dev/null +++ b/src/boost/tools/boost_install/test/regex/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigRegexTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS regex ${BOOST_HINTS}) + + # Using `include_directories`, `link_directories`, `link_libraries` + # is bad practice, done here for testing purposes. The right, "modern + # CMake", thing to do is `target_link_libraries(main Boost::regex)`. + + include_directories(${Boost_INCLUDE_DIRS}) + link_directories(${Boost_LIBRARY_DIRS}) + link_libraries(${Boost_LIBRARIES}) + +else() + + find_package(boost_regex ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) + +if(NOT USE_BOOST_PACKAGE) + + target_link_libraries(main Boost::regex) + +endif() + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/regex/quick.cpp b/src/boost/tools/boost_install/test/regex/quick.cpp new file mode 100644 index 000000000..f3421ea7c --- /dev/null +++ b/src/boost/tools/boost_install/test/regex/quick.cpp @@ -0,0 +1,21 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +int main() +{ + boost::regex rx( "(\\d+)-+(\\d+)-+(\\d+)" ); + + std::string s = boost::regex_replace( std::string( "+1--2--3+" ), rx, "$1$2$3" ); + + BOOST_TEST_EQ( s, "+123+" ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/serialization/CMakeLists.txt b/src/boost/tools/boost_install/test/serialization/CMakeLists.txt new file mode 100644 index 000000000..c1003a45f --- /dev/null +++ b/src/boost/tools/boost_install/test/serialization/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigSerializationTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS serialization wserialization ${BOOST_HINTS}) + +else() + + find_package(boost_serialization ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + find_package(boost_wserialization ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(quick quick.cpp) +target_link_libraries(quick Boost::serialization) + +add_executable(wquick wquick.cpp) +target_link_libraries(wquick Boost::wserialization) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(quick quick) +add_test(wquick wquick) diff --git a/src/boost/tools/boost_install/test/serialization/quick.cpp b/src/boost/tools/boost_install/test/serialization/quick.cpp new file mode 100644 index 000000000..ba1a022c2 --- /dev/null +++ b/src/boost/tools/boost_install/test/serialization/quick.cpp @@ -0,0 +1,36 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include + +int main() +{ + std::ostringstream os; + std::string s1( "pumpkin pie" ); + + { + boost::archive::text_oarchive oa( os ); + oa << s1; + } + + std::istringstream is( os.str() ); + std::string s2; + + { + boost::archive::text_iarchive ia( is ); + ia >> s2; + } + + BOOST_TEST_EQ( s1, s2 ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/serialization/wquick.cpp b/src/boost/tools/boost_install/test/serialization/wquick.cpp new file mode 100644 index 000000000..019d5536f --- /dev/null +++ b/src/boost/tools/boost_install/test/serialization/wquick.cpp @@ -0,0 +1,36 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include + +int main() +{ + std::wostringstream os; + std::string s1( "pumpkin pie" ); + + { + boost::archive::text_woarchive oa( os ); + oa << s1; + } + + std::wistringstream is( os.str() ); + std::string s2; + + { + boost::archive::text_wiarchive ia( is ); + ia >> s2; + } + + BOOST_TEST_EQ( s1, s2 ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/system/CMakeLists.txt b/src/boost/tools/boost_install/test/system/CMakeLists.txt new file mode 100644 index 000000000..a729e27db --- /dev/null +++ b/src/boost/tools/boost_install/test/system/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigSystemTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS system ${BOOST_HINTS}) + +else() + + find_package(boost_system ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::system) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/system/quick.cpp b/src/boost/tools/boost_install/test/system/quick.cpp new file mode 100644 index 000000000..ca669832d --- /dev/null +++ b/src/boost/tools/boost_install/test/system/quick.cpp @@ -0,0 +1,36 @@ + +// Copyright 2017 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +// See library home page at http://www.boost.org/libs/system + +#include +#include +#include + +int main() +{ + boost::system::error_category const & bt = boost::system::generic_category(); + + int ev = ENOENT; + + boost::system::error_code bc( ev, bt ); + + BOOST_TEST_EQ( bc.value(), ev ); + BOOST_TEST_EQ( &bc.category(), &bt ); + + boost::system::error_condition bn = bt.default_error_condition( ev ); + + BOOST_TEST_EQ( bn.value(), ev ); + BOOST_TEST_EQ( &bn.category(), &bt ); + + BOOST_TEST( bt.equivalent( ev, bn ) ); + + BOOST_TEST( bc == bn ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/test/CMakeLists.txt b/src/boost/tools/boost_install/test/test/CMakeLists.txt new file mode 100644 index 000000000..50769d5b8 --- /dev/null +++ b/src/boost/tools/boost_install/test/test/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigTestTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS prg_exec_monitor unit_test_framework ${BOOST_HINTS}) + +else() + + find_package(boost_prg_exec_monitor ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + find_package(boost_unit_test_framework ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(test_mon test_mon.cpp) +target_link_libraries(test_mon Boost::prg_exec_monitor) + +add_executable(test_utf test_utf.cpp) +target_link_libraries(test_utf Boost::unit_test_framework) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(test_mon test_mon) +add_test(test_utf test_utf) diff --git a/src/boost/tools/boost_install/test/test/test_mon.cpp b/src/boost/tools/boost_install/test/test/test_mon.cpp new file mode 100644 index 000000000..5aabdc90c --- /dev/null +++ b/src/boost/tools/boost_install/test/test/test_mon.cpp @@ -0,0 +1,14 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +int cpp_main( int, char*[] ) +{ + return 0; +} diff --git a/src/boost/tools/boost_install/test/test/test_utf.cpp b/src/boost/tools/boost_install/test/test/test_utf.cpp new file mode 100644 index 000000000..0dc6a9869 --- /dev/null +++ b/src/boost/tools/boost_install/test/test/test_utf.cpp @@ -0,0 +1,16 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#define BOOST_TEST_MODULE main +#include + +BOOST_AUTO_TEST_CASE( t1 ) +{ + int i = 0; + BOOST_TEST( i == 0 ); +} diff --git a/src/boost/tools/boost_install/test/thread/CMakeLists.txt b/src/boost/tools/boost_install/test/thread/CMakeLists.txt new file mode 100644 index 000000000..6c49551c2 --- /dev/null +++ b/src/boost/tools/boost_install/test/thread/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +project(CmakeConfigThreadTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS thread) + +else() + + find_package(boost_thread ${BOOST_VERSION} EXACT CONFIG REQUIRED) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::thread) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/thread/quick.cpp b/src/boost/tools/boost_install/test/thread/quick.cpp new file mode 100644 index 000000000..387489209 --- /dev/null +++ b/src/boost/tools/boost_install/test/thread/quick.cpp @@ -0,0 +1,27 @@ + +// Copyright 2017, 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +void f( int & x, int y ) +{ + x = y; +} + +int main() +{ + int x = 0; + + boost::thread th( f, boost::ref( x ), 12 ); + th.join(); + + BOOST_TEST_EQ( x, 12 ); + + return boost::report_errors(); +} diff --git a/src/boost/tools/boost_install/test/wave/CMakeLists.txt b/src/boost/tools/boost_install/test/wave/CMakeLists.txt new file mode 100644 index 000000000..f2eb9885f --- /dev/null +++ b/src/boost/tools/boost_install/test/wave/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +cmake_minimum_required(VERSION 3.5) + +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +project(CmakeConfigWaveTest LANGUAGES CXX) + +include(${CMAKE_CURRENT_LIST_DIR}/../BoostVersion.cmake) + +set(BOOST_HINTS) + +if(USE_STAGED_BOOST) + set(BOOST_HINTS HINTS ../../../../stage) +endif() + +if(USE_BOOST_PACKAGE) + + find_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS wave ${BOOST_HINTS}) + +else() + + find_package(boost_wave ${BOOST_VERSION} EXACT CONFIG REQUIRED ${BOOST_HINTS}) + +endif() + +add_executable(main quick.cpp) +target_link_libraries(main Boost::wave) + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + +add_test(main main) diff --git a/src/boost/tools/boost_install/test/wave/quick.cpp b/src/boost/tools/boost_install/test/wave/quick.cpp new file mode 100644 index 000000000..47bd9f224 --- /dev/null +++ b/src/boost/tools/boost_install/test/wave/quick.cpp @@ -0,0 +1,49 @@ + +// Copyright 2018 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include + +int main() +{ + std::string input( + "#if 0\n" + "6.28\n" + "#else\n" + "3.14\n" + "#endif\n" + ); + + try + { + typedef boost::wave::cpplexer::lex_token<> token_type; + typedef boost::wave::cpplexer::lex_iterator lex_iterator_type; + typedef boost::wave::context context_type; + + context_type ctx( input.begin(), input.end(), "input.cpp" ); + + for( context_type::iterator_type first = ctx.begin(), last = ctx.end(); first != last; ++first ) + { + std::cout << first->get_value(); + } + + return 0; + } + catch( boost::wave::cpp_exception const & x ) + { + std::cerr << x.file_name() << "(" << x.line_no() << "): " << x.description() << std::endl; + return 1; + } + catch( std::exception const & x ) + { + std::cerr << "Exception: " << x.what() << std::endl; + return 2; + } +} diff --git a/src/boost/tools/boostbook/dtd/1.1/boost-no-inspect b/src/boost/tools/boostbook/dtd/1.1/boost-no-inspect new file mode 100644 index 000000000..37dfd21c3 --- /dev/null +++ b/src/boost/tools/boostbook/dtd/1.1/boost-no-inspect @@ -0,0 +1,4 @@ +Inspect complains that this directory is called '1.1', but that's the +standard naming style for DTDs, and this needs to match the url of the +DTD on the website. Any platform which has problems with this domain +name probably won't be able to build the documentation anyway. \ No newline at end of file diff --git a/src/boost/tools/boostbook/dtd/1.1/boostbook.dtd b/src/boost/tools/boostbook/dtd/1.1/boostbook.dtd new file mode 100644 index 000000000..9805ec706 --- /dev/null +++ b/src/boost/tools/boostbook/dtd/1.1/boostbook.dtd @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%DocBook; diff --git a/src/boost/tools/boostbook/dtd/boostbook.dtd b/src/boost/tools/boostbook/dtd/boostbook.dtd new file mode 100644 index 000000000..bd4c3f871 --- /dev/null +++ b/src/boost/tools/boostbook/dtd/boostbook.dtd @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%DocBook; diff --git a/src/boost/tools/boostbook/index.html b/src/boost/tools/boostbook/index.html new file mode 100644 index 000000000..5444113a7 --- /dev/null +++ b/src/boost/tools/boostbook/index.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + Automatic redirection failed, please go to ../../doc/html/boostbook.html + + diff --git a/src/boost/tools/boostbook/setup_boostbook.py b/src/boost/tools/boostbook/setup_boostbook.py new file mode 100644 index 000000000..032587d8a --- /dev/null +++ b/src/boost/tools/boostbook/setup_boostbook.py @@ -0,0 +1,300 @@ +# Copyright (c) 2002 Douglas Gregor +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# This is a rewrite of setup_boostbook.sh in Python +# It will work on Posix and Windows systems +# The rewrite is not finished yet, so please don't use it +# right now it is used only be release scripts + +# User configuration +# (MAINTANERS: please, keep in synch with setup_boostbook.sh) +DOCBOOK_XSL_VERSION = "1.75.2" +DOCBOOK_DTD_VERSION = "4.2" +FOP_VERSION = "0.94" +FOP_JDK_VERSION="1.4" +# FOP_MIRROR = "http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop/binaries" +FOP_MIRROR = "http://archive.apache.org/dist/xmlgraphics/fop/binaries/" +SOURCEFORGE_DOWNLOAD = "http://sourceforge.net/projects/docbook/files" + +# No user configuration below this point------------------------------------- + +import os +import re +import sys +import optparse +import shutil + +sys.path.append( os.path.join( os.path.dirname( sys.modules[ __name__ ].__file__ ) + , "../regression/xsl_reports/utils" ) ) + +import checked_system +import urllib2 +import tarfile +import zipfile + +def accept_args( args ): + parser = optparse.OptionParser() + parser.add_option( "-t", "--tools", dest="tools", help="directory downloaded tools will be installed into. Optional. Used by release scripts to put the tools separately from the tree to be archived." ) + parser.usage = "setup_boostbook [options]" + + ( options, args ) = parser.parse_args( args ) + if options.tools is None: + options.tools = os.getcwd() + + + return options.tools + +def to_posix( path ): + return path.replace( "\\", "/" ) + +def unzip( archive_path, result_dir ): + z = zipfile.ZipFile( archive_path, 'r', zipfile.ZIP_DEFLATED ) + for f in z.infolist(): + print f.filename + if not os.path.exists( os.path.join( result_dir, os.path.dirname( f.filename ) ) ): + os.makedirs( os.path.join( result_dir, os.path.dirname( f.filename ) ) ) + result = open( os.path.join( result_dir, f.filename ), 'wb' ) + result.write( z.read( f.filename ) ) + result.close() + + z.close() + +def gunzip( archive_path, result_dir ): + tar = tarfile.open( archive_path, 'r:gz' ) + for tarinfo in tar: + tar.extract( tarinfo, result_dir ) + tar.close() + +def http_get( file, url ): + f = open( file, "wb" ) + f.write( urllib2.urlopen( url ).read() ) + f.close() + +def find_executable( executable_name, env_variable, test_args, error_message ): + print "Looking for %s ..." % executable_name + if os.environ.has_key( env_variable ): + specified = os.environ[ env_variable ] + print " Trying %s specified in env. variable %s" % ( specified, env_variable ) + if os.path.exists( specified ): + return specified.replace( "\\", "/" ) + else: + print "Cannot find %s specified in env. variable %s" % ( specified, env_variable ) + + rc = checked_system.system( [ "%s %s" % ( executable_name, test_args ) ] ) + print "" + if rc != 0: + print error_message + return None + else: + return executable_name.replace( "\\", "/" ) + +def adjust_user_config( config_file + , docbook_xsl_dir + , docbook_dtd_dir + , xsltproc + , doxygen + , fop + , java + ): + print "Modifying user-config.jam ..." + r = [] + using_boostbook = 0 + eaten=0 + lines = open( config_file, "r" ).readlines() + for line in lines: + if re.match( "^\s*using boostbook", line ): + using_boostbook = 1 + r.append( "using boostbook\n" ) + r.append( " : %s\n" % docbook_xsl_dir ) + r.append( " : %s\n" % docbook_dtd_dir ) + r.append( " ; \n" ) + eaten = 1 + + elif using_boostbook == 1 and re.match( ";", line ): + using_boostbook = 2 + elif using_boostbook == 1: + eaten=1 + elif re.match( "^\s*using xsltproc.*$", line ): + eaten=1 + elif re.match( "^\s*using doxygen.*$", line ): + eaten=1 + elif re.match( "^\s*using fop.*$", line ): + eaten=1 + else: + if eaten == 0: + r.append( line ) + eaten=0 + + if using_boostbook==0: + r.append( "using boostbook\n" ) + r.append( " : %s\n" % docbook_xsl_dir ) + r.append( " : %s\n" % docbook_dtd_dir ) + r.append( " ;\n" ) + + r.append( "using xsltproc : %s ;\n" % xsltproc ) + if doxygen is not None: + r.append( "using doxygen : %s ;\n" % doxygen ) + if fop is not None: + print r.append( "using fop : %s : : %s ;\n" % ( fop, java ) ) + + open( config_file + ".tmp", "w" ).writelines( r ) + try: + os.rename( config_file + ".tmp", config_file ) + except OSError, e: + os.unlink( config_file ) + os.rename( config_file + ".tmp", config_file ) + + +def setup_docbook_xsl( tools_directory ): + print "DocBook XSLT Stylesheets ..." + DOCBOOK_XSL_TARBALL = os.path.join( tools_directory, "docbook-xsl-%s.tar.gz" % DOCBOOK_XSL_VERSION ) + DOCBOOK_XSL_URL = "%s/docbook-xsl/%s/%s/download" % (SOURCEFORGE_DOWNLOAD, DOCBOOK_XSL_VERSION, os.path.basename( DOCBOOK_XSL_TARBALL ) ) + + if os.path.exists( DOCBOOK_XSL_TARBALL ): + print " Using existing DocBook XSLT Stylesheets (version %s)." % DOCBOOK_XSL_VERSION + else: + print " Downloading DocBook XSLT Stylesheets version %s..." % DOCBOOK_XSL_VERSION + print " from %s" % DOCBOOK_XSL_URL + http_get( DOCBOOK_XSL_TARBALL, DOCBOOK_XSL_URL ) + + DOCBOOK_XSL_DIR = to_posix( os.path.join( tools_directory, "docbook-xsl-%s" % DOCBOOK_XSL_VERSION ) ) + + if not os.path.exists( DOCBOOK_XSL_DIR ): + print " Expanding DocBook XSLT Stylesheets into %s..." % DOCBOOK_XSL_DIR + gunzip( DOCBOOK_XSL_TARBALL, tools_directory ) + print " done." + + return DOCBOOK_XSL_DIR + +def setup_docbook_dtd( tools_directory ): + print "DocBook DTD ..." + DOCBOOK_DTD_ZIP = to_posix( os.path.join( tools_directory, "docbook-xml-%s.zip" % DOCBOOK_DTD_VERSION ) ) + DOCBOOK_DTD_URL = "http://www.oasis-open.org/docbook/xml/%s/%s" % ( DOCBOOK_DTD_VERSION, os.path.basename( DOCBOOK_DTD_ZIP ) ) + if os.path.exists( DOCBOOK_DTD_ZIP ): + print " Using existing DocBook XML DTD (version %s)." % DOCBOOK_DTD_VERSION + else: + print " Downloading DocBook XML DTD version %s..." % DOCBOOK_DTD_VERSION + http_get( DOCBOOK_DTD_ZIP, DOCBOOK_DTD_URL ) + + DOCBOOK_DTD_DIR = to_posix( os.path.join( tools_directory, "docbook-dtd-%s" % DOCBOOK_DTD_VERSION ) ) + if not os.path.exists( DOCBOOK_DTD_DIR ): + print "Expanding DocBook XML DTD into %s... " % DOCBOOK_DTD_DIR + unzip( DOCBOOK_DTD_ZIP, DOCBOOK_DTD_DIR ) + print "done." + + return DOCBOOK_DTD_DIR + +def find_xsltproc(): + return to_posix( find_executable( "xsltproc", "XSLTPROC", "--version" + , "If you have already installed xsltproc, please set the environment\n" + + "variable XSLTPROC to the xsltproc executable. If you do not have\n" + + "xsltproc, you may download it from http://xmlsoft.org/XSLT/." ) ) + +def find_doxygen(): + return to_posix( find_executable( "doxygen", "DOXYGEN", "--version" + , "Warning: unable to find Doxygen executable. You will not be able to\n" + + " use Doxygen to generate BoostBook documentation. If you have Doxygen,\n" + + " please set the DOXYGEN environment variable to the path of the doxygen\n" + + " executable." ) ) + + +def find_java(): + return to_posix( find_executable( "java", "JAVA", "-version" + , "Warning: unable to find Java executable. You will not be able to\n" + + " generate PDF documentation. If you have Java, please set the JAVA\n" + + " environment variable to the path of the java executable." ) ) + +def setup_fop( tools_directory ): + print "FOP ..." + FOP_TARBALL = os.path.join( tools_directory, "fop-%s-bin-jdk%s.tar.gz" % ( FOP_VERSION, FOP_JDK_VERSION ) ) + FOP_URL = "%s/%s" % ( FOP_MIRROR, os.path.basename( FOP_TARBALL ) ) + FOP_DIR = to_posix( "%s/fop-%s" % ( tools_directory, FOP_VERSION ) ) + if sys.platform == 'win32': + fop_driver = "fop.bat" + else: + fop_driver = "fop" + + FOP = to_posix( os.path.join( FOP_DIR, fop_driver ) ) + + if os.path.exists( FOP_TARBALL ) : + print " Using existing FOP distribution (version %s)." % FOP_VERSION + else: + print " Downloading FOP distribution version %s..." % FOP_VERSION + http_get( FOP_TARBALL, FOP_URL ) + + if not os.path.exists( FOP_DIR ): + print " Expanding FOP distribution into %s... " % FOP_DIR + gunzip( FOP_TARBALL, tools_directory ) + print " done." + + return FOP + +def find_user_config(): + print "Looking for user-config.jam ..." + JAM_CONFIG_OUT = os.path.join( os.environ[ "HOME" ], "user-config.jam" ) + if os.path.exists( JAM_CONFIG_OUT ): + JAM_CONFIG_IN ="user-config-backup.jam" + print " Found user-config.jam in HOME directory (%s)" % JAM_CONFIG_IN + shutil.copyfile( JAM_CONFIG_OUT, os.path.join( os.environ[ "HOME" ], "user-config-backup.jam" ) ) + JAM_CONFIG_IN_TEMP="yes" + print " Updating Boost.Jam configuration in %s... " % JAM_CONFIG_OUT + return JAM_CONFIG_OUT + elif os.environ.has_key( "BOOST_ROOT" ) and os.path.exists( os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/user-config.jam" ) ): + JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/user-config.jam" ) + print " Found user-config.jam in BOOST_ROOT directory (%s)" % JAM_CONFIG_IN + JAM_CONFIG_IN_TEMP="no" + print " Writing Boost.Jam configuration to %s... " % JAM_CONFIG_OUT + return JAM_CONFIG_IN + return None + +def setup_boostbook( tools_directory ): + print "Setting up boostbook tools..." + print "-----------------------------" + print "" + + DOCBOOK_XSL_DIR = setup_docbook_xsl( tools_directory ) + DOCBOOK_DTD_DIR = setup_docbook_dtd( tools_directory ) + XSLTPROC = find_xsltproc() + DOXYGEN = find_doxygen() + JAVA = find_java() + + FOP = None + if JAVA is not None: + print "Java is present." + FOP = setup_fop( tools_directory ) + + user_config = find_user_config() + + # Find the input jamfile to configure + + if user_config is None: + print "ERROR: Please set the BOOST_ROOT environment variable to refer to your" + print "Boost installation or copy user-config.jam into your home directory." + sys.exit() + + adjust_user_config( config_file = user_config + , docbook_xsl_dir = DOCBOOK_XSL_DIR + , docbook_dtd_dir = DOCBOOK_DTD_DIR + , xsltproc = XSLTPROC + , doxygen = DOXYGEN + , fop = FOP + , java = JAVA + ) + + print "done." + + print "Done! Execute \"b2\" in a documentation directory to generate" + print "documentation with BoostBook. If you have not already, you will need" + print "to compile Boost.Jam." + +def main(): + ( tools_directory ) = accept_args( sys.argv[ 1: ] ) + setup_boostbook( tools_directory ) + +if __name__ == "__main__": + main() + + diff --git a/src/boost/tools/boostbook/setup_boostbook.sh b/src/boost/tools/boostbook/setup_boostbook.sh new file mode 100755 index 000000000..54348361f --- /dev/null +++ b/src/boost/tools/boostbook/setup_boostbook.sh @@ -0,0 +1,181 @@ +#!/bin/sh +# Copyright (c) 2002 Douglas Gregor +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# User configuration +# (MAINTANERS: please, keep in synch with setup_boostbook.py) +DOCBOOK_XSL_VERSION=1.75.2 +DOCBOOK_DTD_VERSION=4.2 +FOP_VERSION=0.94 +FOP_JDK_VERSION=1.4 +# FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop/binaries +FOP_MIRROR=http://archive.apache.org/dist/xmlgraphics/fop/binaries/ +SOURCEFORGE_DOWNLOAD=http://sourceforge.net/projects/docbook/files/ +HTTP_GET_CMD="curl -O -L" + +# No user configuration below this point------------------------------------- + +# Get the DocBook XSLT Stylesheets +DOCBOOK_XSL_TARBALL=docbook-xsl-$DOCBOOK_XSL_VERSION.tar.gz +DOCBOOK_XSL_URL=$SOURCEFORGE_DOWNLOAD/docbook-xsl/$DOCBOOK_XSL_VERSION/$DOCBOOK_XSL_TARBALL +if test -f $DOCBOOK_XSL_TARBALL; then + echo "Using existing DocBook XSLT Stylesheets (version $DOCBOOK_XSL_VERSION)." +else + echo "Downloading DocBook XSLT Stylesheets version $DOCBOOK_XSL_VERSION..." + $HTTP_GET_CMD $DOCBOOK_XSL_URL +fi + +DOCBOOK_XSL_DIR="$PWD/docbook-xsl-$DOCBOOK_XSL_VERSION" +if test ! -d docbook-xsl-$DOCBOOK_XSL_VERSION; then + echo -n "Expanding DocBook XSLT Stylesheets into $DOCBOOK_XSL_DIR..." + gunzip -cd $DOCBOOK_XSL_TARBALL | tar xf - + echo "done." +fi + +# Get the DocBook DTD +DOCBOOK_DTD_ZIP=docbook-xml-$DOCBOOK_DTD_VERSION.zip +DOCBOOK_DTD_URL=http://www.oasis-open.org/docbook/xml/$DOCBOOK_DTD_VERSION/$DOCBOOK_DTD_ZIP +if test -f $DOCBOOK_DTD_ZIP; then + echo "Using existing DocBook XML DTD (version $DOCBOOK_DTD_VERSION)." +else + echo "Downloading DocBook XML DTD version $DOCBOOK_DTD_VERSION..." + $HTTP_GET_CMD $DOCBOOK_DTD_URL +fi + +DOCBOOK_DTD_DIR="$PWD/docbook-dtd-$DOCBOOK_DTD_VERSION" +if test ! -d docbook-dtd-$DOCBOOK_DTD_VERSION; then + echo -n "Expanding DocBook XML DTD into $DOCBOOK_DTD_DIR... " + unzip -q $DOCBOOK_DTD_ZIP -d $DOCBOOK_DTD_DIR + echo "done." +fi + +# Find xsltproc, doxygen, and java +OLD_IFS=$IFS +IFS=: +for dir in $PATH; do + if test -f $dir/xsltproc && test -x $dir/xsltproc; then + XSLTPROC="$dir/xsltproc" + fi + if test -f $dir/doxygen && test -x $dir/doxygen; then + DOXYGEN="$dir/doxygen" + fi + if test -f $dir/java && test -x $dir/java; then + JAVA="$dir/java" + fi +done +IFS=$OLD_IFS + +# Make sure we have xsltproc +if test ! -f "$XSLTPROC" && test ! -x "$XSLTPROC"; then + echo "Searching for xsltproc... NOT FOUND."; + echo "ERROR: Unable to find xsltproc executable." + echo "If you have already installed xsltproc, please set the environment" + echo "variable XSLTPROC to the xsltproc executable. If you do not have" + echo "xsltproc, you may download it from http://xmlsoft.org/XSLT/." + exit 0; +else + echo "Searching for xsltproc... $XSLTPROC."; +fi + +# Just notify the user if we haven't found doxygen. +if test ! -f "$DOXYGEN" && test ! -x "$DOXYGEN"; then + echo "Searching for Doxygen... not found."; + echo "Warning: unable to find Doxygen executable. You will not be able to" + echo " use Doxygen to generate BoostBook documentation. If you have Doxygen," + echo " please set the DOXYGEN environment variable to the path of the doxygen" + echo " executable." + HAVE_DOXYGEN="no" +else + echo "Searching for Doxygen... $DOXYGEN."; + HAVE_DOXYGEN="yes" +fi + +# Just notify the user if we haven't found Java. Otherwise, go get FOP. +if test ! -f "$JAVA" && test ! -x "$JAVA"; then + echo "Searching for Java... not found."; + echo "Warning: unable to find Java executable. You will not be able to" + echo " generate PDF documentation. If you have Java, please set the JAVA" + echo " environment variable to the path of the java executable." + HAVE_FOP="no" +else + echo "Searching for Java... $JAVA."; + FOP_TARBALL="fop-$FOP_VERSION-bin-jdk$FOP_JDK_VERSION.tar.gz" + FOP_URL="$FOP_MIRROR/$FOP_TARBALL" + FOP_DIR="$PWD/fop-$FOP_VERSION" + FOP="$FOP_DIR/fop" + if test -f $FOP_TARBALL; then + echo "Using existing FOP distribution (version $FOP_VERSION)." + else + echo "Downloading FOP distribution version $FOP_VERSION..." + $HTTP_GET_CMD $FOP_URL + fi + + if test ! -d $FOP_DIR; then + echo -n "Expanding FOP distribution into $FOP_DIR... "; + gunzip -cd $FOP_TARBALL | tar xf - + echo "done."; + fi + HAVE_FOP="yes" +fi + +# Find the input jamfile to configure +JAM_CONFIG_OUT="$HOME/user-config.jam" +if test -r "$HOME/user-config.jam"; then + JAM_CONFIG_IN="user-config-backup.jam" + cp $JAM_CONFIG_OUT user-config-backup.jam + JAM_CONFIG_IN_TEMP="yes" + echo -n "Updating Boost.Jam configuration in $JAM_CONFIG_OUT... " + +elif test -r "$BOOST_ROOT/tools/build/user-config.jam"; then + JAM_CONFIG_IN="$BOOST_ROOT/tools/build/user-config.jam"; + JAM_CONFIG_IN_TEMP="no" + echo -n "Writing Boost.Jam configuration to $JAM_CONFIG_OUT... " +else + echo "ERROR: Please set the BOOST_ROOT environment variable to refer to your" + echo "Boost installation or copy user-config.jam into your home directory." + exit 0 +fi + +cat > setup_boostbook.awk < $JAM_CONFIG_OUT +rm -f setup_boostbook.awk +echo "done." + +echo "Done! Execute \"b2\" in a documentation directory to generate" +echo "documentation with BoostBook. If you have not already, you will need" +echo "to compile Boost.Jam." diff --git a/src/boost/tools/boostbook/test/Jamfile.v2 b/src/boost/tools/boostbook/test/Jamfile.v2 new file mode 100644 index 000000000..fc72f13bb --- /dev/null +++ b/src/boost/tools/boostbook/test/Jamfile.v2 @@ -0,0 +1,13 @@ +# Copyright (c) 2009 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +project /boost/boostbook/test ; +using boostbook ; + +boostbook alt : alt.xml : + boost.root=../../../.. + ; + diff --git a/src/boost/tools/boostbook/test/alt.xml b/src/boost/tools/boostbook/test/alt.xml new file mode 100644 index 000000000..aed8a75f1 --- /dev/null +++ b/src/boost/tools/boostbook/test/alt.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + Daniel + James + + Fictional example + + + Fictional example library, for testing + +
+ Alt Tests + + Example header + Example header: example.hpp + + Example macro + Example macro: EXAMPLE +
+ + +
+ + Example macro + +
+
+
diff --git a/src/boost/tools/boostbook/test/doxygen/Jamfile.v2 b/src/boost/tools/boostbook/test/doxygen/Jamfile.v2 new file mode 100644 index 000000000..d9f34f046 --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/Jamfile.v2 @@ -0,0 +1,41 @@ + +# Copyright 2009 Daniel James. +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +using boostbook ; +using doxygen ; +import os ; + +doxygen autodoc + : + [ glob boost/*.hpp ] + : + "boost.doxygen.reftitle=Example Reference" + ; + +if [ os.name ] = NT +{ + actions compare + { + comp /A $(>[1]) $(>[2]) && echo "Stamped" >$(<) + } + +} +else +{ + actions compare + { + diff -u -w $(>[1]) $(>[2]) && echo "Stamped" >$(<) + } +} + +make check : autodoc.xml autodoc.gold : @compare ; + +boostbook standalone + : + example.xml + : + boost.root=../../../../.. + autodoc + ; diff --git a/src/boost/tools/boostbook/test/doxygen/autodoc.gold b/src/boost/tools/boostbook/test/doxygen/autodoc.gold new file mode 100644 index 000000000..58434b12f --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/autodoc.gold @@ -0,0 +1,113 @@ + +Example Reference
+ +Documentation for class example. Detailed documentationvoid class_code_sample(); + int + +This type has documentation. int +This type has documentation. long +This type has documentation. long double +short +double +int +int +const int +int +const int + +int +int +int +intintdefault_value +intint(*)()volatile char +intchar *")"volatile char +intchar *"("volatile char +intchar'('volatile char +intchar')'volatile char +intint(*)()volatile char +intchar *")"volatile char +intchar *"("volatile char +intchar'('volatile char +intchar')'volatile char +void +void +void +void +void +void +void +void +void +void +int + +example const & +example &example const & + +int +int + +Test some doxygen markupThis is just an example. +Embedded docbook list: +12 +Special Bold Typewriter Italics emphasis parameter +Arg1 first argument. +Arg2 second argument. + + +First list item. +Second list item + +Line 1 +Line 2void foo() {} +void foo2() {} +void bar() {} + +void bar2() {} +Alternative way of writing code, has a complicated workaround because doxygen treats the empty line as a paragraph separator: +int bar(); + +int bar2(); +Unfortunately the workaround will merge consecutive blocks, like this: +int foo(); + + + +int foo2(); + +T * + +A constructor. +A destructor. +unspecifiedconst specialization_test &An assignment operator. + +int +int +const int +const int +voidintParameter description. +void function_code_sample(); + +intintA function parameter intAnother + + +This is a test function. Link to class Link to class template This is a note. +See Also:example::example and example_template +i > jThe answer +voidTesting a function template. + + +Documentation for macro example. +
+
\ No newline at end of file diff --git a/src/boost/tools/boostbook/test/doxygen/boost/example.hpp b/src/boost/tools/boostbook/test/doxygen/boost/example.hpp new file mode 100644 index 000000000..9b32da0bd --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/boost/example.hpp @@ -0,0 +1,233 @@ + +// Copyright 2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +/*! + \class example::example + + \brief Documentation for class example + + Detailed documentation + + \code{.cpp} + void class_code_sample(); + \endcode + */ + +/*! + \def EXAMPLE + + \brief Documentation for macro example + */ + +int global_integer; +static int global_static_integer; +const int global_const_integer = 1; +static const int global_static_const_integer = 2; +enum global_enum { enumerator1 = 1, enumerator2 }; + +namespace example +{ + /*! + + \param x Parameter description. + + \code{.cpp} + void function_code_sample(); + \endcode + */ + void free_function(int x); + + int namespace_integer; + static int namespace_static_integer; + const int namespace_const_integer = 1; + static const int namespace_static_const_integer = 2; + enum namespace_enum { enumerator }; + + class example + { + public: + example(example const&) = default; + example& operator=(example const&) = delete; + virtual int virtual_method(); + virtual int virtual_abstract_method() = 0; + virtual int virtual_const_method() const; + int method_with_default_value(int = default_value); + + int method_with_fp(int (*fp)(), volatile char); + int method_with_string_default1(char* = ")", volatile char); + int method_with_string_default2(char* = "(", volatile char); + int method_with_char_default1(char = '(', volatile char); + int method_with_char_default2(char = ')', volatile char); + + int volatile_method_with_fp(int (*fp)(), volatile char) volatile; + int volatile_method_with_string_default1(char* = ")", volatile char) volatile; + int volatile_method_with_string_default2(char* = "(", volatile char) volatile; + int volatile_method_with_char_default1(char = '(', volatile char) volatile; + int volatile_method_with_char_default2(char = ')', volatile char) volatile; + + void const_method() const; + void volatile_method() volatile; + + void trad_noexcept() noexcept; + void trad_noexcept_if() noexcept(a == b && (c || d)); + void boost_noexcept() BOOST_NOEXCEPT; + void boost_noexcept_if() BOOST_NOEXCEPT_IF(a == b && (c || d)); + + void trad_constexpr() constexpr; + void boost_constexpr() BOOST_CONSTEXPR; + void boost_constexpr_or_const() BOOST_CONSTEXPR_OR_CONST; + + void constexpr_noexcept() constexpr noexcept; + + static int static_method(); + static int static_constexpr() constexpr; + + int integer; + static int static_integer; + mutable int mutable_integer; + const int const_integer; + static const int static_const_integer; + + // Visual check of typedef alignment. + /** This type has documentation. */ + typedef int documented_type1; + /** \brief This type has documentation. */ + typedef long documented_type2; + /** This type has documentation. */ + typedef long double documented_type3; + typedef short undocumented_type1; + typedef double undocumented_type2; + + class inner_class { + public: + int x; + }; + + enum class_enum { enumerator }; + + /// INTERNAL ONLY + enum internal_enum { internal_enumerator }; + + explicit operator int(); + protected: + int protected_integer; + static int protected_static_integer; + mutable int protected_mutable_integer; + const int protected_const_integer; + static const int protected_static_const_integer; + + enum protected_class_enum { enumerator2 }; + private: + int private_integer; + static int private_static_integer; + mutable int private_mutable_integer; + const int private_const_integer; + static const int private_static_const_integer; + + enum private_class_enum { enumerator3 }; + }; + + /** + * Test some doxygen markup + * + * \warning This is just an example. + * + * Embedded docbook list: + * + * \xmlonly + * 12 + * \endxmlonly + * + * \a Special \b Bold \c Typewriter \e Italics \em emphasis \p parameter + * + * \arg Arg1 first argument. + * \arg Arg2 second argument. + * + * \li First list item. + * \li Second list item + * + * Line 1\n + * Line 2 + * + * \code + * void foo() {} + * void foo2() {} + * \endcode + * + * \code + * void bar() {} + * + * void bar2() {} + * \endcode + * + * Alternative way of writing code, has a complicated workaround + * because doxygen treats the empty line as a paragraph + * separator: + * + *
+     * int bar();
+     *
+     * int bar2();
+     * 
+ * + * Unfortunately the workaround will merge consecutive blocks, + * like this: + * + *
+     * int foo();
+     * 
+ * + *
+     * int foo2();
+     * 
+ * + * \tparam TypeParameter A template parameter + * \tparam NonTypeParameter This is a non-type template parameter + * \tparam TypeParameterWithDefault This is a template parameter with a default argument + */ + + template + struct example_template {}; + + /** + * \param i A function parameter + * \param j Another + * \return The answer + * \pre i > j + * + * This is a test function. + * \ref example::example "Link to class" + * \ref example_template "Link to class template" + * \note This is a note. + * + * \see example::example and example_template + */ + int namespace_func(int i, int j); + + /** + * Testing a function template. + * \tparam TypeParameter A template parameter + * \tparam NonTypeParameter This is a non-type template parameter + */ + template + void namespace_func_template(); + + template + struct specialization_test { + }; + + template + struct specialization_test { + /** A constructor. */ + specialization_test(); + /** A destructor. */ + ~specialization_test(); + /** An assignment operator. */ + detail::unspecified& operator=(const specialization_test&); + }; +} + +#define EXAMPLE(m) The macro diff --git a/src/boost/tools/boostbook/test/doxygen/example.xml b/src/boost/tools/boostbook/test/doxygen/example.xml new file mode 100644 index 000000000..1858ce4c8 --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/example.xml @@ -0,0 +1,13 @@ + + + + + + +Example + + diff --git a/src/boost/tools/boostbook/xsl/admon.xsl b/src/boost/tools/boostbook/xsl/admon.xsl new file mode 100644 index 000000000..d29053ac1 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/admon.xsl @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + note + warning + caution + tip + important + note + + + + + + diff --git a/src/boost/tools/boostbook/xsl/annotation.xsl b/src/boost/tools/boostbook/xsl/annotation.xsl new file mode 100644 index 000000000..1d9b79e60 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/annotation.xsl @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + warning: Cannot find library ' + + ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + warning: cannot find macro ` + + ' + + + + + + + + + + + + + + + + + + error: macro ` + + ' is multiply defined. + + + + + + + + + + + + + + + + + + + + + + + warning: cannot find header ` + + ' + + + + + + + + + + + + + + + + + + error: header ` + + ' is multiply defined. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/callout.xsl b/src/boost/tools/boostbook/xsl/callout.xsl new file mode 100644 index 000000000..8faa5340b --- /dev/null +++ b/src/boost/tools/boostbook/xsl/callout.xsl @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + {$conum} + + + + + + + + + + + + + + + + + + + + + Don't know how to generate Unicode callouts + when $callout.unicode.start.character is + + + ( + + ) + + + + + ( + + ) + + + + + diff --git a/src/boost/tools/boostbook/xsl/caramel/LICENSE b/src/boost/tools/boostbook/xsl/caramel/LICENSE new file mode 100644 index 000000000..d26de04a0 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/caramel/LICENSE @@ -0,0 +1,58 @@ +Software License, Version 1.0 + +Copyright 2002-2003, Trustees of Indiana University. +Copyright 2000-2001, University of Notre Dame. +All rights reserved. + +Indiana University has the exclusive rights to license this product under the +following license. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * All redistributions of source code must retain the above copyright notice, + the list of authors in the original source code, this list of conditions + and the disclaimer listed in this license; + + * All redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the disclaimer listed in this license + in the documentation and/or other materials provided with the distribution; + + * Any documentation included with all redistributions must include the + following acknowledgement: + + "This product includes software developed at the University of Notre Dame + and the Pervasive Technology Labs at Indiana University. For technical + information contact Andrew Lumsdaine at the Pervasive Technology Labs at + Indiana University. For administrative and license questions contact the + Advanced Research and Technology Institute at 351 West 10th Street. + Indianapolis, Indiana 46202, phone 317-278-4100, fax 317-274-5902." + + Alternatively, this acknowledgement may appear in the software itself, and + wherever such third-party acknowledgments normally appear. + + * The name Indiana University, the University of Notre Dame or "Caramel" + shall not be used to endorse or promote products derived from this software + without prior written permission from Indiana University. For written + permission, please contact Indiana University Advanced Research & + Technology Institute. + + * Products derived from this software may not be called "Caramel", nor may + Indiana University, the University of Notre Dame or "Caramel" appear in + their name, without prior written permission of Indiana University Advanced + Research & Technology Institute. + +Indiana University provides no reassurances that the source code provided does +not infringe the patent or any other intellectual property rights of any other +entity. Indiana University disclaims any liability to any recipient for claims +brought by any other entity based on infringement of intellectual property +rights or otherwise. + +LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES +AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES NO WARRANTIES +AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD +PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES +NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", +"TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE RISK +AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO THE +PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. diff --git a/src/boost/tools/boostbook/xsl/caramel/concept2docbook.xsl b/src/boost/tools/boostbook/xsl/caramel/concept2docbook.xsl new file mode 100644 index 000000000..655498066 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/caramel/concept2docbook.xsl @@ -0,0 +1,812 @@ + + + + + + + + + + + + + + + + + + + + + + Concept + 7 + + + + + + + + + + + + + + + + + Description + + + + + + + + + + Refinement of + + + + + + + + + + + + + + + + + When mutable: + + + + + + + + + + + + + + + + + + @(@=@)@ + + + + + + + + + + + + + + + + + + + @@(@@ + + + + + @@=@@@@)@@ + + + + + + + + Definitions + +

+
+
+
+ + + + Type expressions + + + + + + + + + + + + + + + + + + + + + + Only when mutable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + must be + + , + and + + + + + + . + + + + + + + + + + + + + + + + + Valid expressions + + + + T + + + P + + + S + + + O + + + + + + + + + + + Name + Expression + + Type + + + Precondition + + + Semantics + + + Postcondition + + + + + + + + + + + + + + + + + + + Complexity + + + + + + + + + Invariants + + + + + + + + + + + + + + + + Models + + + + + + + + + + + + + + + + + + + + + + + + + + See also + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + identical to + + + + + + + + + + + convertible to + Convertible to + convertible to + + + + + + + + + + + + derived from + Derived from + derived from + + + + + + + + + + + + assignable to + Assignable to + assignable to + + + + + + + + + + + + a model + Models + models + + + (along with + + + + + + + + and + , and + , + + ) + + of + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Associated types + + + + + + + + + + + + + + + + + + + + + + + Name + Code + Description + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + and + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Notation + + + + + + + A type playing the role of + + in the + + + + concept. + + + + + + + + + + + + + + + + + Objects of type + + + + + + + + + + + + + + + + + + + + + + + + + + warning: cannot find concept ' + + ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/boost/tools/boostbook/xsl/caramel/cpp-operators.xml b/src/boost/tools/boostbook/xsl/caramel/cpp-operators.xml new file mode 100644 index 000000000..68626acbb --- /dev/null +++ b/src/boost/tools/boostbook/xsl/caramel/cpp-operators.xml @@ -0,0 +1,288 @@ + + + + + + + + + ++ + operator++(int) + + + + -- + operator--(int) + + + + () + () + + + + .() + () + + + + ->() + Error + + + + () + operator()() + + + + () + () + + + + [] + operator[]() + + + + . + Error + + + + + ->{member-name} (return type is pointer-to-object type) + operator->() + + + + ++ + operator++() + + + + -- + operator--() + + + + ! + operator!() + + + + ~ + operator~() + + + + & + operator&() + + + + * + operator*() + + + + + + operator+() + + + + - + operator-() + + + + .* + Error + + + + ->* + operator->*() + + + + * + operator * () + + + + / + operator / () + + + + % + operator % () + + + + + + operator + () + + + + - + operator - () + + + + << + operator << () + + + + >> + operator >> () + + + + < + operator < () + + + + > + operator > () + + + + <= + operator <= () + + + + >= + operator >= () + + + + == + operator == () + + + + != + operator != () + + + + & + operator & () + + + + | + operator | () + + + + ^ + operator ^ () + + + + && + operator && () + + + + || + operator || () + + + + ? : + Error + + + + = + operator = () + + + + += + operator += () + + + + -= + operator -= () + + + + *= + operator *= () + + + + /= + operator /= () + + + + %= + operator %= () + + + + <<= + operator <<= () + + + + >>= + operator >>= () + + + + &= + operator &= () + + + + |= + operator |= () + + + + ^= + operator ^= () + + + + , + operator , () + + + + (*)() + Error + + + + + functorization of operator on arguments {} + Error + + + + + functorization of function on arguments {} + Error + + + diff --git a/src/boost/tools/boostbook/xsl/caramel/unparser.xsl b/src/boost/tools/boostbook/xsl/caramel/unparser.xsl new file mode 100644 index 000000000..63db55fff --- /dev/null +++ b/src/boost/tools/boostbook/xsl/caramel/unparser.xsl @@ -0,0 +1,497 @@ + + + + + + + + + 0 + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + ( + + + + boost::sample_value < >() + + & + + * + + const + + + + + + volatile + + + + < + , + + + + + + + > + + + :: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (Unrecognized tag ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *@@@* + + + + + + + 1 + + + + + + + + + + + + + + + + *@@@* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *@@@* + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invalid tag in operator definition: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + typename + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/chunk-common.xsl b/src/boost/tools/boostbook/xsl/chunk-common.xsl new file mode 100644 index 000000000..e3a04a207 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/chunk-common.xsl @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + xxx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XXX + + XXX + + + + + + diff --git a/src/boost/tools/boostbook/xsl/docbook-layout.xsl b/src/boost/tools/boostbook/xsl/docbook-layout.xsl new file mode 100644 index 000000000..9a382ad5b --- /dev/null +++ b/src/boost/tools/boostbook/xsl/docbook-layout.xsl @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + +
+
+ + +

Synopsis

+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100% + + + + + + + + + + + + + + + + + + 100% + + + + + + + + + + + + + + + + + + No convertLength function available. + + + + + + + + + + + + + + + + + + + + + No adjustColumnWidths function available. + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/boost/tools/boostbook/xsl/docbook.xsl b/src/boost/tools/boostbook/xsl/docbook.xsl new file mode 100644 index 000000000..a862bb107 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/docbook.xsl @@ -0,0 +1,538 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + .reference + + + + + + <xsl:text>Reference</xsl:text> + + + + +
+ + + + + .concepts + + + + + + .concepts + + + + + Concepts + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + + +
+ + + + + + <xsl:text>Header <</xsl:text> + <ulink> + <xsl:attribute name="url"> + <xsl:value-of select="$boost.header.root"/> + <xsl:text>/</xsl:text> + <xsl:value-of select="@name"/> + </xsl:attribute> + <xsl:value-of select="@name"/> + </ulink> + <xsl:text>></xsl:text> + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + header. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + anchor + + + link + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Error: XSL template 'link-or-anchor' called with invalid link-type '' + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + Description + + + + + + + + + + + + <xsl:copy-of select="$name"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + // In header: < + + + + + + + + + > + + + + +
+ diff --git a/src/boost/tools/boostbook/xsl/doxygen/collect.xsl b/src/boost/tools/boostbook/xsl/doxygen/collect.xsl new file mode 100644 index 000000000..3ec164bed --- /dev/null +++ b/src/boost/tools/boostbook/xsl/doxygen/collect.xsl @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl b/src/boost/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl new file mode 100644 index 000000000..5d68930e0 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl @@ -0,0 +1,1846 @@ + + + + + + + + + + + + + + This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. + + + + detail + + + :: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:copy-of select="$boost.doxygen.reftitle"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -specialization + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + + + + + + + + + + + yes + + + + + + + + + yes + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unspecified + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + explicit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + conversion-operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + static + + + mutable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See Also: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Will not throw. + + + + + + + + + + + + + + + + + unspecified + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <alt> + <xsl:value-of select="*|text()"/> + </alt> + <mediaobject> + <imageobject role="html"> + <imagedata format="PNG" align="center"> + <xsl:attribute name="fileref"> + <xsl:value-of select="concat(concat(concat($boost.doxygen.formuladir.fixed, 'form_'), @id), '.png')"/> + </xsl:attribute> + </imagedata> + </imageobject> + <textobject role="tex"> + <phrase> + <xsl:value-of select="*|text()"/> + </phrase> + </textobject> + </mediaobject> + </equation> + </xsl:when> + <xsl:otherwise> + <inlineequation> + <alt> + <xsl:value-of select="*|text()"/> + </alt> + <inlinemediaobject> + <imageobject role="html"> + <imagedata format="PNG"> + <xsl:attribute name="fileref"> + <xsl:value-of select="concat(concat(concat($boost.doxygen.formuladir.fixed, 'form_'), @id), '.png')"/> + </xsl:attribute> + </imagedata> + </imageobject> + <textobject role="tex"> + <phrase> + <xsl:value-of select="*|text()"/> + </phrase> + </textobject> + </inlinemediaobject> + </inlineequation> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + </xsl:stylesheet> diff --git a/src/boost/tools/boostbook/xsl/dtd/dtd2boostbook.xsl b/src/boost/tools/boostbook/xsl/dtd/dtd2boostbook.xsl new file mode 100644 index 000000000..38bf815fa --- /dev/null +++ b/src/boost/tools/boostbook/xsl/dtd/dtd2boostbook.xsl @@ -0,0 +1,217 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com> + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) + --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="xml" indent="yes" standalone="yes"/> + + <xsl:strip-space elements="sequence-group or-group element element-name"/> + + <xsl:key name="elements" match="element" use="@name"/> + <xsl:key name="attributes" match="attlist" use="@name"/> + <xsl:key name="attribute-purposes" match="attpurpose" use="@name"/> + + <xsl:template match="dtd"> + <section id="reference"> + <title>Reference + + Elements: + + + + + + + + + + + + + + + + + + + Element + + - + + + + + + + + + + + + + + + + BoostBook element + + 9 + + + + + + + ::= + + + + + + + + + + + + + + + + + + + ( + + + + ) + + + + + + + + + + + ( + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #PCDATA + + + + + ANY + + + + + EMPTY + + + + + + + + + + + Description + + + + + + + + Attributes + + + + + + Name + Type + Value + Purpose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/boost/tools/boostbook/xsl/error.xsl b/src/boost/tools/boostbook/xsl/error.xsl new file mode 100644 index 000000000..a1c160107 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/error.xsl @@ -0,0 +1,19 @@ + + + + + + In + + + + + + diff --git a/src/boost/tools/boostbook/xsl/fo.xsl b/src/boost/tools/boostbook/xsl/fo.xsl new file mode 100644 index 000000000..44d325526 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/fo.xsl @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + page + + + auto + + + + + + + + page + + + auto + + + + + + + + page + + + auto + + + + + + + + page + + + auto + + + + + + + + page + + + auto + + + + + + + + page + + + auto + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + blue + + + + + #FF8080 + 1px + solid + 0.2cm + 0.2cm + 0.2cm + 0.2cm + 1 + 0pt + 0pt + + + + + #DCDCDC + 1px + solid + 0.2cm + 0.2cm + 0.2cm + 0.2cm + 6 + 40 + 9pt + true + wrap + + 0pt + 0pt + + + +monospace,Symbol + + + + 9pt + + + + + 0.2cm + 0.2cm + 0.2cm + 0.2cm + + + + + 1 + + + 1 + + + +#DCDCDC +#DCDCDC +0pt +0.5in +0.5in +A4 +1 +.svg +no +http://www.boost.org/doc/libs/develop/doc/src/images/ +http://www.boost.org/doc/libs/develop/doc/src/images/callouts/ +http://www.boost.org/doc/libs/devlop/doc/html/ + + + diff --git a/src/boost/tools/boostbook/xsl/function.xsl b/src/boost/tools/boostbook/xsl/function.xsl new file mode 100644 index 000000000..edba8ed1c --- /dev/null +++ b/src/boost/tools/boostbook/xsl/function.xsl @@ -0,0 +1,1217 @@ + + + + + + + + 1 + + + 12 + + + + + + + + + + + + + + anchor + + + link + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + operator + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + ( + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + construct-copy-destruct + + + + + + + + + + + + + + + + + + + + + + + + + construct-copy-destruct + + + + + + + + + + + construct/copy/destruct + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + list-presentation="table" + + + + + + Parameters: + + + + list-presentation="table" + + + + + + + + + + + + + + + + + + + + + + + + + Template Parameters: + + + + list-presentation="table" + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + Warning: Use of 'para' elements in a function is deprecated. + Wrap them in a 'description' element. + + + + + + + + + + + Requires + Effects + + Postconditions + + Returns + Throws + Complexity + Notes + Rationale + + + Error: unhandled node type ` + + ' in template function.requirement.name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Function + + template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Function + + template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/global.xsl b/src/boost/tools/boostbook/xsl/global.xsl new file mode 100644 index 000000000..bb22160ab --- /dev/null +++ b/src/boost/tools/boostbook/xsl/global.xsl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Global + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/html-base.xsl b/src/boost/tools/boostbook/xsl/html-base.xsl new file mode 100644 index 000000000..a1031710b --- /dev/null +++ b/src/boost/tools/boostbook/xsl/html-base.xsl @@ -0,0 +1,428 @@ + + + + + + + + + + + boostbook.css + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + false + yes + UTF-8 + + 2 + 15 + + + + + + + + + + + + + +appendix toc,title +article/appendix nop +article toc,title +book toc,title +chapter toc,title +part toc,title +preface toc,title +qandadiv toc +qandaset toc +reference toc,title +sect1 toc +sect2 toc +sect3 toc +sect4 toc +sect5 toc +section toc +set toc,title + + + + + + + + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + + + + + + + + + + +
+
+ + + + + + copyright + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +

+ + Last revised: + + + + + + + + + + + + + + + + +

+
+
+
+ +
+
+ + + + + + + +
+
+ + +

Synopsis

+
+ +
+
+ + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/src/boost/tools/boostbook/xsl/html-help.xsl b/src/boost/tools/boostbook/xsl/html-help.xsl new file mode 100644 index 000000000..2234af36f --- /dev/null +++ b/src/boost/tools/boostbook/xsl/html-help.xsl @@ -0,0 +1,49 @@ + + + + + + + + + 1 + + + + + + + + + 15 + no + + + + + + + + +
+
+ + +

Synopsis

+
+ +
+
+ +
diff --git a/src/boost/tools/boostbook/xsl/html-single.xsl b/src/boost/tools/boostbook/xsl/html-single.xsl new file mode 100644 index 000000000..57547aafb --- /dev/null +++ b/src/boost/tools/boostbook/xsl/html-single.xsl @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + 1 + + + + + + diff --git a/src/boost/tools/boostbook/xsl/html.xsl b/src/boost/tools/boostbook/xsl/html.xsl new file mode 100644 index 000000000..11a110b9a --- /dev/null +++ b/src/boost/tools/boostbook/xsl/html.xsl @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/index.xsl b/src/boost/tools/boostbook/xsl/index.xsl new file mode 100644 index 000000000..3a9319395 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/index.xsl @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/library.xsl b/src/boost/tools/boostbook/xsl/library.xsl new file mode 100644 index 000000000..4d299feed --- /dev/null +++ b/src/boost/tools/boostbook/xsl/library.xsl @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + , from + + + + + + , + + + + + + and + + + + + + . + + + + + + + + +
+ <xsl:apply-templates/> + + + + + + +
+
+ + + + + + + + + +
diff --git a/src/boost/tools/boostbook/xsl/lookup.xsl b/src/boost/tools/boostbook/xsl/lookup.xsl new file mode 100644 index 000000000..91b4a59d4 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/lookup.xsl @@ -0,0 +1,457 @@ + + + + + + 26 + + + + + + + + + + + -bb + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + :: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + ... + + + + + + < + + > + + + + + + + :: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + random text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cannot find + + named ' + + ' + + + + + + + + Reference to + + ' + + ' is ambiguous. Found: + + + Match in namespace :: + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/macro.xsl b/src/boost/tools/boostbook/xsl/macro.xsl new file mode 100644 index 000000000..40457a4e5 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/macro.xsl @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Macro + + + + + + + + + + + + + + + + + list-presentation="table" + + + + + + Parameters: + + + + list-presentation="table" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( + + + , + + + + ) + + + + + + + + + _ + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/manpages.xsl b/src/boost/tools/boostbook/xsl/manpages.xsl new file mode 100644 index 000000000..2f781c299 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/manpages.xsl @@ -0,0 +1,195 @@ + + + + + + + + + man.manifest + + + .nf + + .fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No refentry elements! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\"Generated by db2man.xsl. Don't modify this, modify the source. +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH " + + " + + " + + " " + + " " + + " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/navbar.xsl b/src/boost/tools/boostbook/xsl/navbar.xsl new file mode 100644 index 000000000..7c320bbd7 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/navbar.xsl @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + horizontal + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {$boost.image.alt} + + + + + + +
+
+
+ + + + boost-head + + + + + + + + + +
+ + background-color: white; width: 50%; + + + {$boost.image.alt} + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Home + + Libraries + + People + FAQ + More + + Home + Libraries + People + FAQ + More + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + boost-toc + + + + + + +
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + | + + + + + + -toc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/boost/tools/boostbook/xsl/reference.xsl b/src/boost/tools/boostbook/xsl/reference.xsl new file mode 100644 index 000000000..b46e591b3 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/reference.xsl @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/relative-href.xsl b/src/boost/tools/boostbook/xsl/relative-href.xsl new file mode 100644 index 000000000..8218d2f4c --- /dev/null +++ b/src/boost/tools/boostbook/xsl/relative-href.xsl @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/source-highlight.xsl b/src/boost/tools/boostbook/xsl/source-highlight.xsl new file mode 100644 index 000000000..7a34b8fbc --- /dev/null +++ b/src/boost/tools/boostbook/xsl/source-highlight.xsl @@ -0,0 +1,578 @@ + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/template.xsl b/src/boost/tools/boostbook/xsl/template.xsl new file mode 100644 index 000000000..2e7d60993 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/template.xsl @@ -0,0 +1,601 @@ + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + template + < + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + template + < + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + // + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + typename + + + + + + + + + + + ... + + + + + + + + + + + + + + + Warning: 'default' attribute of template parameter element is deprecated. Use 'default' element. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + < + + + + + + + + + + + + + > + + + + + + + + + + + + + + + , + + + + + + + + + + + + + ... + + + + + + diff --git a/src/boost/tools/boostbook/xsl/testing/Jamfile.xsl b/src/boost/tools/boostbook/xsl/testing/Jamfile.xsl new file mode 100644 index 000000000..f8648e42f --- /dev/null +++ b/src/boost/tools/boostbook/xsl/testing/Jamfile.xsl @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Please set the XSL stylesheet parameter "boost.root" to the top-level + Boost directory (i.e., BOOST_ROOT) + + + + + + + + + + + + + + +# Testing Jamfile autogenerated from XML source +subproject ; + +# bring in rules for testing +SEARCH on testing.jam = $(BOOST_BUILD_PATH) ; +include testing.jam ; + +# Make tests run by default. +DEPENDS all : test ; + +{ + # look in BOOST_ROOT for sources first, just in this Jamfile + local SEARCH_SOURCE = $(BOOST_ROOT) $(SEARCH_SOURCE) ; + + test-suite + : ; +} + + + + + + + [ + + + : + + : + + : + + + : + + + + ] + + + + <lib> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/testing/testsuite.xsl b/src/boost/tools/boostbook/xsl/testing/testsuite.xsl new file mode 100644 index 000000000..b12eef667 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/testing/testsuite.xsl @@ -0,0 +1,118 @@ + + + + +
+ + + + + + + + + + + + + + Testsuite + + +
+ + + + .acceptance + + + + Acceptance tests + + + + + + Test + Type + Description + If failing... + + + + + + + +
+
+ + +
+ + + + .negative + + + Negative tests + + + + + + Test + Type + Description + If failing... + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/boost/tools/boostbook/xsl/type.xsl b/src/boost/tools/boostbook/xsl/type.xsl new file mode 100644 index 000000000..affb6aaff --- /dev/null +++ b/src/boost/tools/boostbook/xsl/type.xsl @@ -0,0 +1,1693 @@ + + + + + + + + + 1 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + Class + + + Struct + + + Union + + + Type + + + +Unknown type element "" in type.display.name + + + + + template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + anchor + + + link + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + . + + + + . + + + + + + + + + + + + + + + + Warning: `type' attribute of `typedef' element is deprecated. Use 'type' element instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Type definition + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + private + + + public + + + + + + + + + + + + + + + + + + Warning: missing 'type' element inside 'inherit' + + + + + + + ... + + + + , + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + types + + + + + + types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + public-data-members + + + + + + public data members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Template Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + types + + + + + + + + + + + types + + + + + + + + + + + + + + + + + + public-data-members + + + + + + + + + + + public data members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Warning: Use of 'para' elements in 'class' element is deprecated. Wrap them in a 'description' element. + + + + + + + + + + + + + + + + + + + Specializations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Warning: Use of 'para' elements in 'enum' element is deprecated. Wrap them in a 'description' element. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/utility.xsl b/src/boost/tools/boostbook/xsl/utility.xsl new file mode 100644 index 000000000..75ae1cafd --- /dev/null +++ b/src/boost/tools/boostbook/xsl/utility.xsl @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public + + + + + diff --git a/src/boost/tools/boostbook/xsl/xhtml.xsl b/src/boost/tools/boostbook/xsl/xhtml.xsl new file mode 100644 index 000000000..484bb677d --- /dev/null +++ b/src/boost/tools/boostbook/xsl/xhtml.xsl @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostbook/xsl/xref.xsl b/src/boost/tools/boostbook/xsl/xref.xsl new file mode 100644 index 000000000..c6d85953d --- /dev/null +++ b/src/boost/tools/boostbook/xsl/xref.xsl @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/boostdep/CMakeLists.txt b/src/boost/tools/boostdep/CMakeLists.txt new file mode 100644 index 000000000..0bc583477 --- /dev/null +++ b/src/boost/tools/boostdep/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright 2018 Mike Dev +# Copyright 2018 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt + +cmake_minimum_required( VERSION 3.1 ) + +project( boostdep LANGUAGES CXX ) + +add_executable( boostdep src/boostdep.cpp ) + +find_package( Boost COMPONENTS filesystem REQUIRED ) +target_link_libraries( boostdep Boost::filesystem ) + +install( TARGETS boostdep RUNTIME DESTINATION bin ) diff --git a/src/boost/tools/boostdep/README.md b/src/boost/tools/boostdep/README.md new file mode 100644 index 000000000..ff87dfb85 --- /dev/null +++ b/src/boost/tools/boostdep/README.md @@ -0,0 +1,4 @@ +boostdep +======== + +A tool to create Boost module dependency reports diff --git a/src/boost/tools/boostdep/build/Jamfile b/src/boost/tools/boostdep/build/Jamfile new file mode 100644 index 000000000..2e0491bee --- /dev/null +++ b/src/boost/tools/boostdep/build/Jamfile @@ -0,0 +1,11 @@ +# Copyright 2014, 2015 Peter Dimov +# +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt + +project : default-build release ; + +exe boostdep : ../src/boostdep.cpp /boost//filesystem ; + +install dist-bin : boostdep : ../../../dist/bin ; diff --git a/src/boost/tools/boostdep/depinst/depinst.py b/src/boost/tools/boostdep/depinst/depinst.py new file mode 100644 index 000000000..6dfba36a7 --- /dev/null +++ b/src/boost/tools/boostdep/depinst/depinst.py @@ -0,0 +1,282 @@ +#!/usr/bin/env python + +# depinst.py - installs the dependencies needed to test +# a Boost library +# +# Copyright 2016-2020 Peter Dimov +# +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt + +from __future__ import print_function + +import re +import sys +import os +import argparse + +verbose = 0 + +def vprint( level, *args ): + + if verbose >= level: + print( *args ) + + +def is_module( m, gm ): + + return ( 'libs/' + m ) in gm + + +def module_for_header( h, x, gm ): + + if h in x: + + return x[ h ] + + else: + + # boost/function.hpp + m = re.match( 'boost/([^\\./]*)\\.h[a-z]*$', h ) + + if m and is_module( m.group( 1 ), gm ): + + return m.group( 1 ) + + # boost/numeric/conversion.hpp + m = re.match( 'boost/([^/]*/[^\\./]*)\\.h[a-z]*$', h ) + + if m and is_module( m.group( 1 ), gm ): + + return m.group( 1 ) + + # boost/numeric/conversion/header.hpp + m = re.match( 'boost/([^/]*/[^/]*)/', h ) + + if m and is_module( m.group( 1 ), gm ): + + return m.group( 1 ) + + # boost/function/header.hpp + m = re.match( 'boost/([^/]*)/', h ) + + if m and is_module( m.group( 1 ), gm ): + + return m.group( 1 ) + + vprint( 0, 'Cannot determine module for header', h ) + + return None + + +def scan_header_dependencies( f, x, gm, deps ): + + for line in f: + + m = re.match( '[ \t]*#[ \t]*include[ \t]*["<](boost/[^">]*)[">]', line ) + + if m: + + h = m.group( 1 ) + + mod = module_for_header( h, x, gm ) + + if mod: + + if not mod in deps: + + vprint( 1, 'Adding dependency', mod ) + deps[ mod ] = 0 + + +def scan_directory( d, x, gm, deps ): + + vprint( 1, 'Scanning directory', d ) + + if os.name == 'nt' and sys.version_info[0] < 3: + d = unicode( d ) + + for root, dirs, files in os.walk( d ): + + for file in files: + + fn = os.path.join( root, file ) + + vprint( 2, 'Scanning file', fn ) + + if sys.version_info[0] < 3: + + with open( fn, 'r' ) as f: + scan_header_dependencies( f, x, gm, deps ) + + else: + + with open( fn, 'r', encoding='latin-1' ) as f: + scan_header_dependencies( f, x, gm, deps ) + + +def scan_module_dependencies( m, x, gm, deps, dirs ): + + vprint( 1, 'Scanning module', m ) + + for dir in dirs: + scan_directory( os.path.join( 'libs', m, dir ), x, gm, deps ) + + +def read_exceptions(): + + # exceptions.txt is the output of "boostdep --list-exceptions" + + vprint( 1, 'Reading exceptions.txt' ) + + x = {} + + module = None + + with open( os.path.join( os.path.dirname( sys.argv[0] ), 'exceptions.txt' ), 'r' ) as f: + + for line in f: + + line = line.rstrip() + + m = re.match( '(.*):$', line ) + + if m: + + module = m.group( 1 ).replace( '~', '/' ) + + else: + + header = line.lstrip() + x[ header ] = module + + return x + + +def read_gitmodules(): + + vprint( 1, 'Reading .gitmodules' ) + + gm = [] + + with open( '.gitmodules', 'r' ) as f: + + for line in f: + + line = line.strip() + + m = re.match( 'path[ \t]*=[ \t]*(.*)$', line ) + + if m: + + gm.append( m.group( 1 ) ) + + return gm + +def install_modules( modules, git_args ): + + if len( modules ) == 0: + return + + vprint( 0, 'Installing:', ', '.join(modules) ) + + modules = [ 'libs/' + m for m in modules ] + + command = 'git submodule' + + if verbose <= 0: + command += ' -q' + + command += ' update --init ' + git_args + ' ' + ' '.join( modules ) + + vprint( 1, 'Executing:', command ) + r = os.system( command ); + + if r != 0: + raise Exception( "The command '%s' failed with exit code %d" % (command, r) ) + + +def install_module_dependencies( deps, x, gm, git_args ): + + modules = [] + + for m, i in deps.items(): + + if not i: + + modules += [ m ] + deps[ m ] = 1 # mark as installed + + if len( modules ) == 0: + return 0 + + install_modules( modules, git_args ) + + for m in modules: + scan_module_dependencies( m, x, gm, deps, [ 'include', 'src' ] ) + + return len( modules ) + + +if( __name__ == "__main__" ): + + parser = argparse.ArgumentParser( description='Installs the dependencies needed to test a Boost library.' ) + + parser.add_argument( '-v', '--verbose', help='enable verbose output', action='count', default=0 ) + parser.add_argument( '-q', '--quiet', help='quiet output (opposite of -v)', action='count', default=0 ) + parser.add_argument( '-X', '--exclude', help="exclude a default subdirectory ('include', 'src', or 'test') from scan; can be repeated", metavar='DIR', action='append', default=[] ) + parser.add_argument( '-N', '--ignore', help="exclude top-level dependency even when found in scan; can be repeated", metavar='LIB', action='append', default=[] ) + parser.add_argument( '-I', '--include', help="additional subdirectory to scan; can be repeated", metavar='DIR', action='append', default=[] ) + parser.add_argument( '-g', '--git_args', help="additional arguments to `git submodule update`", default='', action='store' ) + parser.add_argument( '-u', '--update', help='update before scanning', action='store_true' ) + parser.add_argument( 'library', help="name of library to scan ('libs/' will be prepended)" ) + + args = parser.parse_args() + + verbose = args.verbose - args.quiet + + vprint( 2, '-X:', args.exclude ) + vprint( 2, '-I:', args.include ) + vprint( 2, '-N:', args.ignore ) + + x = read_exceptions() + vprint( 2, 'Exceptions:', x ) + + gm = read_gitmodules() + vprint( 2, '.gitmodules:', gm ) + + essentials = [ 'config', 'headers', '../tools/boost_install', '../tools/build', '../tools/cmake' ] + + essentials = [ e for e in essentials if os.path.exists( 'libs/' + e ) ] + + if args.update: + essentials.append( args.library ) + + install_modules( essentials, args.git_args ) + + m = args.library + + deps = { m : 1 } + + dirs = [ 'include', 'src', 'test' ] + + for dir in args.exclude: + dirs.remove( dir ) + + for dir in args.include: + dirs.append( dir ) + + vprint( 1, 'Directories to scan:', *dirs ) + + scan_module_dependencies( m, x, gm, deps, dirs ) + + for dep in args.ignore: + if dep in deps: + vprint( 1, 'Ignoring dependency', dep ) + del deps[dep] + + vprint( 2, 'Dependencies:', deps ) + + while install_module_dependencies( deps, x, gm, args.git_args ): + pass diff --git a/src/boost/tools/boostdep/depinst/exceptions.txt b/src/boost/tools/boostdep/depinst/exceptions.txt new file mode 100644 index 000000000..151d5f08b --- /dev/null +++ b/src/boost/tools/boostdep/depinst/exceptions.txt @@ -0,0 +1,411 @@ +assert: + boost/current_function.hpp +atomic: + boost/memory_order.hpp +bind: + boost/is_placeholder.hpp + boost/mem_fn.hpp +circular_buffer: + boost/circular_buffer_fwd.hpp +concept_check: + boost/concept/assert.hpp + boost/concept/detail/backward_compatibility.hpp + boost/concept/detail/borland.hpp + boost/concept/detail/concept_def.hpp + boost/concept/detail/concept_undef.hpp + boost/concept/detail/general.hpp + boost/concept/detail/has_constraints.hpp + boost/concept/detail/msvc.hpp + boost/concept/requires.hpp + boost/concept/usage.hpp + boost/concept_archetype.hpp +config: + boost/cstdint.hpp + boost/cxx11_char_types.hpp + boost/detail/workaround.hpp + boost/limits.hpp + boost/version.hpp +container_hash: + boost/functional/hash.hpp + boost/functional/hash/extensions.hpp + boost/functional/hash/hash.hpp + boost/functional/hash/hash_fwd.hpp + boost/functional/hash_fwd.hpp +contract: + boost/contract_macro.hpp +conversion: + boost/implicit_cast.hpp + boost/polymorphic_cast.hpp + boost/polymorphic_pointer_cast.hpp +convert: + boost/make_default.hpp +core: + boost/checked_delete.hpp + boost/detail/iterator.hpp + boost/detail/lightweight_test.hpp + boost/detail/no_exceptions_support.hpp + boost/detail/scoped_enum_emulation.hpp + boost/detail/sp_typeinfo.hpp + boost/get_pointer.hpp + boost/iterator.hpp + boost/non_type.hpp + boost/noncopyable.hpp + boost/ref.hpp + boost/swap.hpp + boost/type.hpp + boost/utility/addressof.hpp + boost/utility/enable_if.hpp + boost/utility/explicit_operator_bool.hpp + boost/utility/swap.hpp + boost/visit_each.hpp +detail: + boost/blank.hpp + boost/blank_fwd.hpp + boost/cstdlib.hpp +dynamic_bitset: + boost/dynamic_bitset_fwd.hpp +exception: + boost/exception_ptr.hpp +foreach: + boost/foreach_fwd.hpp +function: + boost/function_equal.hpp +graph: + boost/detail/algorithm.hpp + boost/pending/bucket_sorter.hpp + boost/pending/container_traits.hpp + boost/pending/detail/disjoint_sets.hpp + boost/pending/detail/property.hpp + boost/pending/disjoint_sets.hpp + boost/pending/fenced_priority_queue.hpp + boost/pending/fibonacci_heap.hpp + boost/pending/indirect_cmp.hpp + boost/pending/is_heap.hpp + boost/pending/mutable_heap.hpp + boost/pending/mutable_queue.hpp + boost/pending/property.hpp + boost/pending/property_serialize.hpp + boost/pending/queue.hpp + boost/pending/relaxed_heap.hpp + boost/pending/stringtok.hpp +graph_parallel: + boost/graph/accounting.hpp + boost/graph/distributed/adjacency_list.hpp + boost/graph/distributed/adjlist/handlers.hpp + boost/graph/distributed/adjlist/initialize.hpp + boost/graph/distributed/adjlist/redistribute.hpp + boost/graph/distributed/adjlist/serialization.hpp + boost/graph/distributed/betweenness_centrality.hpp + boost/graph/distributed/boman_et_al_graph_coloring.hpp + boost/graph/distributed/breadth_first_search.hpp + boost/graph/distributed/compressed_sparse_row_graph.hpp + boost/graph/distributed/concepts.hpp + boost/graph/distributed/connected_components.hpp + boost/graph/distributed/connected_components_parallel_search.hpp + boost/graph/distributed/crauser_et_al_shortest_paths.hpp + boost/graph/distributed/dehne_gotz_min_spanning_tree.hpp + boost/graph/distributed/delta_stepping_shortest_paths.hpp + boost/graph/distributed/depth_first_search.hpp + boost/graph/distributed/detail/dijkstra_shortest_paths.hpp + boost/graph/distributed/detail/filtered_queue.hpp + boost/graph/distributed/detail/mpi_process_group.ipp + boost/graph/distributed/detail/queue.ipp + boost/graph/distributed/detail/remote_update_set.hpp + boost/graph/distributed/detail/tag_allocator.hpp + boost/graph/distributed/dijkstra_shortest_paths.hpp + boost/graph/distributed/distributed_graph_utility.hpp + boost/graph/distributed/eager_dijkstra_shortest_paths.hpp + boost/graph/distributed/filtered_graph.hpp + boost/graph/distributed/fruchterman_reingold.hpp + boost/graph/distributed/graphviz.hpp + boost/graph/distributed/hohberg_biconnected_components.hpp + boost/graph/distributed/local_subgraph.hpp + boost/graph/distributed/mpi_process_group.hpp + boost/graph/distributed/named_graph.hpp + boost/graph/distributed/one_bit_color_map.hpp + boost/graph/distributed/page_rank.hpp + boost/graph/distributed/queue.hpp + boost/graph/distributed/reverse_graph.hpp + boost/graph/distributed/rmat_graph_generator.hpp + boost/graph/distributed/selector.hpp + boost/graph/distributed/shuffled_distribution.hpp + boost/graph/distributed/st_connected.hpp + boost/graph/distributed/strong_components.hpp + boost/graph/distributed/two_bit_color_map.hpp + boost/graph/distributed/unsafe_serialize.hpp + boost/graph/distributed/vertex_list_adaptor.hpp + boost/graph/parallel/algorithm.hpp + boost/graph/parallel/basic_reduce.hpp + boost/graph/parallel/container_traits.hpp + boost/graph/parallel/detail/inplace_all_to_all.hpp + boost/graph/parallel/detail/property_holders.hpp + boost/graph/parallel/detail/untracked_pair.hpp + boost/graph/parallel/distribution.hpp + boost/graph/parallel/process_group.hpp + boost/graph/parallel/properties.hpp + boost/graph/parallel/simple_trigger.hpp +integer: + boost/integer_fwd.hpp + boost/integer_traits.hpp + boost/pending/integer_log2.hpp +io: + boost/io_fwd.hpp +iterator: + boost/function_output_iterator.hpp + boost/generator_iterator.hpp + boost/indirect_reference.hpp + boost/iterator_adaptors.hpp + boost/next_prior.hpp + boost/pending/detail/int_iterator.hpp + boost/pending/iterator_adaptors.hpp + boost/pending/iterator_tests.hpp + boost/pointee.hpp + boost/shared_container_iterator.hpp +lexical_cast: + boost/detail/basic_pointerbuf.hpp + boost/detail/lcast_precision.hpp +math: + boost/cstdfloat.hpp + boost/math_fwd.hpp +multi_index: + boost/multi_index_container.hpp + boost/multi_index_container_fwd.hpp +numeric/conversion: + boost/cast.hpp +optional: + boost/none.hpp + boost/none_t.hpp +parameter_python: + boost/parameter/aux_/python/invoker.hpp + boost/parameter/aux_/python/invoker_iterate.hpp + boost/parameter/python.hpp +predef: + boost/predef.h +property_map_parallel: + boost/property_map/parallel/basic_reduce.hpp + boost/property_map/parallel/caching_property_map.hpp + boost/property_map/parallel/detail/untracked_pair.hpp + boost/property_map/parallel/distributed_property_map.hpp + boost/property_map/parallel/global_index_map.hpp + boost/property_map/parallel/impl/distributed_property_map.ipp + boost/property_map/parallel/local_property_map.hpp + boost/property_map/parallel/parallel_property_maps.hpp + boost/property_map/parallel/process_group.hpp + boost/property_map/parallel/simple_trigger.hpp + boost/property_map/parallel/unsafe_serialize.hpp + boost/property_map/parallel/vector_property_map.hpp +qvm: + boost/qvm_lite.hpp +random: + boost/nondet_random.hpp +regex: + boost/cregex.hpp + boost/regex.h + boost/regex_fwd.hpp +serialization: + boost/archive/archive_exception.hpp + boost/archive/basic_archive.hpp + boost/archive/basic_binary_iarchive.hpp + boost/archive/basic_binary_iprimitive.hpp + boost/archive/basic_binary_oarchive.hpp + boost/archive/basic_binary_oprimitive.hpp + boost/archive/basic_streambuf_locale_saver.hpp + boost/archive/basic_text_iarchive.hpp + boost/archive/basic_text_iprimitive.hpp + boost/archive/basic_text_oarchive.hpp + boost/archive/basic_text_oprimitive.hpp + boost/archive/basic_xml_archive.hpp + boost/archive/basic_xml_iarchive.hpp + boost/archive/basic_xml_oarchive.hpp + boost/archive/binary_iarchive.hpp + boost/archive/binary_iarchive_impl.hpp + boost/archive/binary_oarchive.hpp + boost/archive/binary_oarchive_impl.hpp + boost/archive/binary_wiarchive.hpp + boost/archive/binary_woarchive.hpp + boost/archive/codecvt_null.hpp + boost/archive/detail/abi_prefix.hpp + boost/archive/detail/abi_suffix.hpp + boost/archive/detail/archive_serializer_map.hpp + boost/archive/detail/auto_link_archive.hpp + boost/archive/detail/auto_link_warchive.hpp + boost/archive/detail/basic_iarchive.hpp + boost/archive/detail/basic_iserializer.hpp + boost/archive/detail/basic_oarchive.hpp + boost/archive/detail/basic_oserializer.hpp + boost/archive/detail/basic_pointer_iserializer.hpp + boost/archive/detail/basic_pointer_oserializer.hpp + boost/archive/detail/basic_serializer.hpp + boost/archive/detail/basic_serializer_map.hpp + boost/archive/detail/check.hpp + boost/archive/detail/common_iarchive.hpp + boost/archive/detail/common_oarchive.hpp + boost/archive/detail/decl.hpp + boost/archive/detail/helper_collection.hpp + boost/archive/detail/interface_iarchive.hpp + boost/archive/detail/interface_oarchive.hpp + boost/archive/detail/iserializer.hpp + boost/archive/detail/oserializer.hpp + boost/archive/detail/polymorphic_iarchive_route.hpp + boost/archive/detail/polymorphic_oarchive_route.hpp + boost/archive/detail/register_archive.hpp + boost/archive/detail/utf8_codecvt_facet.hpp + boost/archive/dinkumware.hpp + boost/archive/impl/archive_serializer_map.ipp + boost/archive/impl/basic_binary_iarchive.ipp + boost/archive/impl/basic_binary_iprimitive.ipp + boost/archive/impl/basic_binary_oarchive.ipp + boost/archive/impl/basic_binary_oprimitive.ipp + boost/archive/impl/basic_text_iarchive.ipp + boost/archive/impl/basic_text_iprimitive.ipp + boost/archive/impl/basic_text_oarchive.ipp + boost/archive/impl/basic_text_oprimitive.ipp + boost/archive/impl/basic_xml_grammar.hpp + boost/archive/impl/basic_xml_iarchive.ipp + boost/archive/impl/basic_xml_oarchive.ipp + boost/archive/impl/text_iarchive_impl.ipp + boost/archive/impl/text_oarchive_impl.ipp + boost/archive/impl/text_wiarchive_impl.ipp + boost/archive/impl/text_woarchive_impl.ipp + boost/archive/impl/xml_iarchive_impl.ipp + boost/archive/impl/xml_oarchive_impl.ipp + boost/archive/impl/xml_wiarchive_impl.ipp + boost/archive/impl/xml_woarchive_impl.ipp + boost/archive/iterators/base64_exception.hpp + boost/archive/iterators/base64_from_binary.hpp + boost/archive/iterators/binary_from_base64.hpp + boost/archive/iterators/dataflow.hpp + boost/archive/iterators/dataflow_exception.hpp + boost/archive/iterators/escape.hpp + boost/archive/iterators/insert_linebreaks.hpp + boost/archive/iterators/istream_iterator.hpp + boost/archive/iterators/mb_from_wchar.hpp + boost/archive/iterators/ostream_iterator.hpp + boost/archive/iterators/remove_whitespace.hpp + boost/archive/iterators/transform_width.hpp + boost/archive/iterators/unescape.hpp + boost/archive/iterators/wchar_from_mb.hpp + boost/archive/iterators/xml_escape.hpp + boost/archive/iterators/xml_unescape.hpp + boost/archive/iterators/xml_unescape_exception.hpp + boost/archive/polymorphic_binary_iarchive.hpp + boost/archive/polymorphic_binary_oarchive.hpp + boost/archive/polymorphic_iarchive.hpp + boost/archive/polymorphic_oarchive.hpp + boost/archive/polymorphic_text_iarchive.hpp + boost/archive/polymorphic_text_oarchive.hpp + boost/archive/polymorphic_text_wiarchive.hpp + boost/archive/polymorphic_text_woarchive.hpp + boost/archive/polymorphic_xml_iarchive.hpp + boost/archive/polymorphic_xml_oarchive.hpp + boost/archive/polymorphic_xml_wiarchive.hpp + boost/archive/polymorphic_xml_woarchive.hpp + boost/archive/text_iarchive.hpp + boost/archive/text_oarchive.hpp + boost/archive/text_wiarchive.hpp + boost/archive/text_woarchive.hpp + boost/archive/tmpdir.hpp + boost/archive/wcslen.hpp + boost/archive/xml_archive_exception.hpp + boost/archive/xml_iarchive.hpp + boost/archive/xml_oarchive.hpp + boost/archive/xml_wiarchive.hpp + boost/archive/xml_woarchive.hpp +smart_ptr: + boost/detail/atomic_count.hpp + boost/detail/lightweight_mutex.hpp + boost/detail/lightweight_thread.hpp + boost/detail/quick_allocator.hpp + boost/enable_shared_from_this.hpp + boost/intrusive_ptr.hpp + boost/make_shared.hpp + boost/make_unique.hpp + boost/pointer_cast.hpp + boost/pointer_to_other.hpp + boost/scoped_array.hpp + boost/scoped_ptr.hpp + boost/shared_array.hpp + boost/shared_ptr.hpp + boost/weak_ptr.hpp +system: + boost/cerrno.hpp +throw_exception: + boost/exception/exception.hpp +timer: + boost/progress.hpp +tokenizer: + boost/token_functions.hpp + boost/token_iterator.hpp +type_traits: + boost/aligned_storage.hpp + boost/utility/declval.hpp +unordered: + boost/unordered_map.hpp + boost/unordered_set.hpp +utility: + boost/call_traits.hpp + boost/compressed_pair.hpp + boost/detail/call_traits.hpp + boost/detail/compressed_pair.hpp + boost/detail/ob_compressed_pair.hpp + boost/operators.hpp + boost/operators_v1.hpp +winapi: + boost/detail/interlocked.hpp + boost/detail/winapi/access_rights.hpp + boost/detail/winapi/apc.hpp + boost/detail/winapi/basic_types.hpp + boost/detail/winapi/bcrypt.hpp + boost/detail/winapi/character_code_conversion.hpp + boost/detail/winapi/condition_variable.hpp + boost/detail/winapi/config.hpp + boost/detail/winapi/critical_section.hpp + boost/detail/winapi/crypt.hpp + boost/detail/winapi/dbghelp.hpp + boost/detail/winapi/debugapi.hpp + boost/detail/winapi/detail/deprecated_namespace.hpp + boost/detail/winapi/directory_management.hpp + boost/detail/winapi/dll.hpp + boost/detail/winapi/environment.hpp + boost/detail/winapi/error_codes.hpp + boost/detail/winapi/error_handling.hpp + boost/detail/winapi/event.hpp + boost/detail/winapi/file_management.hpp + boost/detail/winapi/file_mapping.hpp + boost/detail/winapi/get_current_process.hpp + boost/detail/winapi/get_current_process_id.hpp + boost/detail/winapi/get_current_thread.hpp + boost/detail/winapi/get_current_thread_id.hpp + boost/detail/winapi/get_last_error.hpp + boost/detail/winapi/get_process_times.hpp + boost/detail/winapi/get_system_directory.hpp + boost/detail/winapi/get_thread_times.hpp + boost/detail/winapi/handle_info.hpp + boost/detail/winapi/handles.hpp + boost/detail/winapi/heap_memory.hpp + boost/detail/winapi/init_once.hpp + boost/detail/winapi/jobs.hpp + boost/detail/winapi/limits.hpp + boost/detail/winapi/local_memory.hpp + boost/detail/winapi/memory.hpp + boost/detail/winapi/mutex.hpp + boost/detail/winapi/overlapped.hpp + boost/detail/winapi/page_protection_flags.hpp + boost/detail/winapi/pipes.hpp + boost/detail/winapi/priority_class.hpp + boost/detail/winapi/process.hpp + boost/detail/winapi/security.hpp + boost/detail/winapi/semaphore.hpp + boost/detail/winapi/shell.hpp + boost/detail/winapi/show_window.hpp + boost/detail/winapi/srw_lock.hpp + boost/detail/winapi/stack_backtrace.hpp + boost/detail/winapi/synchronization.hpp + boost/detail/winapi/system.hpp + boost/detail/winapi/thread.hpp + boost/detail/winapi/thread_pool.hpp + boost/detail/winapi/time.hpp + boost/detail/winapi/timers.hpp + boost/detail/winapi/tls.hpp + boost/detail/winapi/wait.hpp + boost/detail/winapi/waitable_timer.hpp diff --git a/src/boost/tools/boostdep/examples/report.bat b/src/boost/tools/boostdep/examples/report.bat new file mode 100644 index 000000000..c244177ed --- /dev/null +++ b/src/boost/tools/boostdep/examples/report.bat @@ -0,0 +1,39 @@ +@REM This is an example cmd.exe batch script +@REM that uses boostdep.exe to generate a +@REM complete Boost dependency report. +@REM +@REM It needs to be run from the Boost root. +@REM +@REM Copyright 2014, 2015, 2017 Peter Dimov +@REM +@REM Distributed under the Boost Software License, Version 1.0. +@REM See accompanying file LICENSE_1_0.txt or copy at +@REM http://www.boost.org/LICENSE_1_0.txt + +SET BOOSTDEP=dist\bin\boostdep.exe + +FOR /f %%i IN ('git rev-parse HEAD') DO @SET REV=%%i + +FOR /f %%i IN ('git rev-parse --short HEAD') DO @SET SHREV=%%i + +FOR /f %%i IN ('git rev-parse --abbrev-ref HEAD') DO @SET BRANCH=%%i + +REM SET FOOTER="Generated on %DATE% %TIME% from revision %BRANCH%-%SHREV%" +SET PREFIX="
" +SET STYLESHEET=report.css + +SET OPTIONS=--html-stylesheet %STYLESHEET% --html-prefix %PREFIX% + +SET OUTDIR=..\report-%BRANCH%-%SHREV% + +mkdir %OUTDIR% + +COPY tools\boostdep\examples\%STYLESHEET% %OUTDIR% + +%BOOSTDEP% --list-modules > %OUTDIR%\list-modules.txt + +%BOOSTDEP% %OPTIONS% --html-title "Boost Module Overview" --html --module-overview > %OUTDIR%\module-overview.html +%BOOSTDEP% %OPTIONS% --html-title "Boost Module Levels" --html --module-levels > %OUTDIR%\module-levels.html +%BOOSTDEP% %OPTIONS% --html-title "Boost Module Weights" --html --module-weights > %OUTDIR%\module-weights.html + +FOR /f %%i IN (%OUTDIR%\list-modules.txt) DO %BOOSTDEP% --html-title "Boost Dependency Report for %%i" %OPTIONS% --html --primary %%i --secondary %%i --reverse %%i > %OUTDIR%\%%i.html diff --git a/src/boost/tools/boostdep/examples/report.css b/src/boost/tools/boostdep/examples/report.css new file mode 100644 index 000000000..b4066b574 --- /dev/null +++ b/src/boost/tools/boostdep/examples/report.css @@ -0,0 +1,24 @@ +/* Copyright 2017 Peter Dimov + Distributed under the Boost Software License, Version 1.0. */ + +A { color: #06C; text-decoration: none; } +A:hover { text-decoration: underline; } + +body { max-width: 60em; margin-left: auto; margin-right: auto; color: #4A6484; font-family: sans-serif; } + +.logo { font-family: sans-serif; font-style: italic; } +.logo .upper { font-size: 48pt; font-weight: 800; } +.logo .lower { font-size: 17pt; } +.logo .description { font-size: small; margin-top: 2em; } + +.primary-list { font-size: small; } +.secondary-list { font-size: small; } + +#module-overview .primary-list { margin-left: 1em; } + +#module-levels h3 { margin-left: 1em; } +#module-levels .primary-list { margin-left: 2em; } + +#module-weights h3 { margin-left: 1em; } +#module-weights .primary-list { margin-left: 2em; } +#module-weights .secondary-list { margin-left: 2em; padding-left: 1em; border-left: 1px dotted; } diff --git a/src/boost/tools/boostdep/index.html b/src/boost/tools/boostdep/index.html new file mode 100644 index 000000000..9d0a62e3c --- /dev/null +++ b/src/boost/tools/boostdep/index.html @@ -0,0 +1,15 @@ + + + + + +Automatic redirection failed, please go to +doc/html/index.html. + + + diff --git a/src/boost/tools/boostdep/src/boostdep.cpp b/src/boost/tools/boostdep/src/boostdep.cpp new file mode 100644 index 000000000..484758e46 --- /dev/null +++ b/src/boost/tools/boostdep/src/boostdep.cpp @@ -0,0 +1,3171 @@ + +// boostdep - a tool to generate Boost dependency reports +// +// Copyright 2014-2020 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#define _CRT_SECURE_NO_WARNINGS + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; + +// header -> module +static std::map< std::string, std::string > s_header_map; + +// module -> headers +static std::map< std::string, std::set > s_module_headers; + +static std::set< std::string > s_modules; + +static void scan_module_headers( fs::path const & path ) +{ + try + { + std::string module = path.generic_string().substr( 5 ); // strip "libs/" + + std::replace( module.begin(), module.end(), '/', '~' ); + + s_modules.insert( module ); + + fs::path dir = path / "include"; + size_t n = dir.generic_string().size(); + + fs::recursive_directory_iterator it( dir ), last; + + for( ; it != last; ++it ) + { + if( it->status().type() == fs::directory_file ) + { + continue; + } + + std::string p2 = it->path().generic_string(); + p2 = p2.substr( n+1 ); + + s_header_map[ p2 ] = module; + s_module_headers[ module ].insert( p2 ); + } + } + catch( fs::filesystem_error const & x ) + { + std::cout << x.what() << std::endl; + } +} + +static void scan_submodules( fs::path const & path ) +{ + fs::directory_iterator it( path ), last; + + for( ; it != last; ++it ) + { + fs::directory_entry const & e = *it; + + if( e.status().type() != fs::directory_file ) + { + continue; + } + + fs::path path = e.path(); + + if( fs::exists( path / "include" ) ) + { + scan_module_headers( path ); + } + + if( fs::exists( path / "sublibs" ) ) + { + scan_submodules( path ); + } + } +} + +static void build_header_map() +{ + scan_submodules( "libs" ); +} + +static void scan_header_dependencies( std::string const & header, std::istream & is, std::map< std::string, std::set< std::string > > & deps, std::map< std::string, std::set< std::string > > & from ) +{ + std::string line; + + while( std::getline( is, line ) ) + { + while( !line.empty() && ( line[0] == ' ' || line[0] == '\t' ) ) + { + line.erase( 0, 1 ); + } + + if( line.empty() || line[0] != '#' ) continue; + + line.erase( 0, 1 ); + + while( !line.empty() && ( line[0] == ' ' || line[0] == '\t' ) ) + { + line.erase( 0, 1 ); + } + + if( line.substr( 0, 7 ) != "include" ) continue; + + line.erase( 0, 7 ); + + while( !line.empty() && ( line[0] == ' ' || line[0] == '\t' ) ) + { + line.erase( 0, 1 ); + } + + if( line.size() < 2 ) continue; + + char ch = line[0]; + + if( ch != '<' && ch != '"' ) continue; + + if( ch == '<' ) + { + ch = '>'; + } + + line.erase( 0, 1 ); + + std::string::size_type k = line.find_first_of( ch ); + + if( k != std::string::npos ) + { + line.erase( k ); + } + + std::map< std::string, std::string >::const_iterator i = s_header_map.find( line ); + + if( i != s_header_map.end() ) + { + deps[ i->second ].insert( line ); + from[ line ].insert( header ); + } + else if( line.substr( 0, 6 ) == "boost/" ) + { + deps[ "(unknown)" ].insert( line ); + from[ line ].insert( header ); + } + } +} + +struct module_primary_actions +{ + virtual void heading( std::string const & module ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void header_start( std::string const & header ) = 0; + virtual void header_end( std::string const & header ) = 0; + + virtual void from_header( std::string const & header ) = 0; +}; + +static fs::path module_include_path( std::string module ) +{ + std::replace( module.begin(), module.end(), '~', '/' ); + return fs::path( "libs" ) / module / "include"; +} + +static fs::path module_source_path( std::string module ) +{ + std::replace( module.begin(), module.end(), '~', '/' ); + return fs::path( "libs" ) / module / "src"; +} + +static fs::path module_build_path( std::string module ) +{ + std::replace( module.begin(), module.end(), '~', '/' ); + return fs::path( "libs" ) / module / "build"; +} + +static fs::path module_test_path( std::string module ) +{ + std::replace( module.begin(), module.end(), '~', '/' ); + return fs::path( "libs" ) / module / "test"; +} + +static fs::path module_meta_path( std::string module ) +{ + std::replace( module.begin(), module.end(), '~', '/' ); + return fs::path( "libs" ) / module / "meta"; +} + +static void scan_module_path( fs::path const & dir, bool remove_prefix, std::map< std::string, std::set< std::string > > & deps, std::map< std::string, std::set< std::string > > & from ) +{ + size_t n = dir.generic_string().size(); + + if( fs::exists( dir ) ) + { + fs::recursive_directory_iterator it( dir ), last; + + for( ; it != last; ++it ) + { + if( it->status().type() == fs::directory_file ) + { + continue; + } + + std::string header = it->path().generic_string(); + + if( remove_prefix ) + { + header = header.substr( n+1 ); + } + + fs::ifstream is( it->path() ); + + scan_header_dependencies( header, is, deps, from ); + } + } +} + +static void scan_module_dependencies( std::string const & module, module_primary_actions & actions, bool track_sources, bool track_tests, bool include_self ) +{ + // module -> [ header, header... ] + std::map< std::string, std::set< std::string > > deps; + + // header -> included from [ header, header... ] + std::map< std::string, std::set< std::string > > from; + + scan_module_path( module_include_path( module ), true, deps, from ); + + if( track_sources ) + { + scan_module_path( module_source_path( module ), false, deps, from ); + } + + if( track_tests ) + { + scan_module_path( module_test_path( module ), false, deps, from ); + } + + actions.heading( module ); + + for( std::map< std::string, std::set< std::string > >::iterator i = deps.begin(); i != deps.end(); ++i ) + { + if( i->first == module && !include_self ) continue; + + actions.module_start( i->first ); + + for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + actions.header_start( *j ); + + std::set< std::string > const & f = from[ *j ]; + + for( std::set< std::string >::const_iterator k = f.begin(); k != f.end(); ++k ) + { + actions.from_header( *k ); + } + + actions.header_end( *j ); + } + + actions.module_end( i->first ); + } +} + +// module depends on [ module, module... ] +static std::map< std::string, std::set< std::string > > s_module_deps; + +// header is included by [header, header...] +static std::map< std::string, std::set< std::string > > s_header_deps; + +// [ module, module... ] depend on module +static std::map< std::string, std::set< std::string > > s_reverse_deps; + +// header includes [header, header...] +static std::map< std::string, std::set< std::string > > s_header_includes; + +struct build_mdmap_actions: public module_primary_actions +{ + std::string module_; + std::string module2_; + std::string header_; + + void heading( std::string const & module ) + { + module_ = module; + } + + void module_start( std::string const & module ) + { + if( module != module_ ) + { + s_module_deps[ module_ ].insert( module ); + s_reverse_deps[ module ].insert( module_ ); + } + + module2_ = module; + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & header ) + { + header_ = header; + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & header ) + { + if( module_ != module2_ ) + { + s_header_deps[ header_ ].insert( header ); + } + + s_header_includes[ header ].insert( header_ ); + } +}; + +static void build_module_dependency_map( bool track_sources, bool track_tests ) +{ + for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + build_mdmap_actions actions; + scan_module_dependencies( *i, actions, track_sources, track_tests, true ); + } +} + +static void output_module_primary_report( std::string const & module, module_primary_actions & actions, bool track_sources, bool track_tests ) +{ + try + { + scan_module_dependencies( module, actions, track_sources, track_tests, false ); + } + catch( fs::filesystem_error const & x ) + { + std::cout << x.what() << std::endl; + } +} + +struct module_secondary_actions +{ + virtual void heading( std::string const & module ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void module_adds( std::string const & module ) = 0; +}; + +static void exclude( std::set< std::string > & x, std::set< std::string > const & y ) +{ + for( std::set< std::string >::const_iterator i = y.begin(); i != y.end(); ++i ) + { + x.erase( *i ); + } +} + +static void output_module_secondary_report( std::string const & module, std::set< std::string> deps, module_secondary_actions & actions ) +{ + actions.heading( module ); + + deps.insert( module ); + + // build transitive closure + + for( ;; ) + { + std::set< std::string > deps2( deps ); + + for( std::set< std::string >::iterator i = deps.begin(); i != deps.end(); ++i ) + { + std::set< std::string > deps3 = s_module_deps[ *i ]; + + exclude( deps3, deps ); + + if( deps3.empty() ) + { + continue; + } + + actions.module_start( *i ); + + for( std::set< std::string >::iterator j = deps3.begin(); j != deps3.end(); ++j ) + { + actions.module_adds( *j ); + } + + actions.module_end( *i ); + + deps2.insert( deps3.begin(), deps3.end() ); + } + + if( deps == deps2 ) + { + break; + } + else + { + deps = deps2; + } + } +} + +static void output_module_secondary_report( std::string const & module, module_secondary_actions & actions ) +{ + output_module_secondary_report( module, s_module_deps[ module ], actions ); +} + +struct header_inclusion_actions +{ + virtual void heading( std::string const & header, std::string const & module ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void header( std::string const & header ) = 0; +}; + +static std::string module_for_header( std::string header ) +{ + { + std::map::const_iterator i = s_header_map.find( header ); + + if( i != s_header_map.end() ) + { + return i->second; + } + } + + if( header.substr( 0, 5 ) == "libs/" ) + { + header = header.substr( 5 ); + } + else if( header.substr( 0, 5 ) == "test/" ) + { + header = header.substr( 5 ); + } + else + { + return std::string(); + } + + for( std::set::const_iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + std::string module = *i; + std::replace( module.begin(), module.end(), '~', '/' ); + + if( header.substr( 0, module.size() + 1 ) == module + '/' ) + { + return *i; + } + } + + return std::string(); +} + +static void output_header_inclusion_report( std::string const & header, header_inclusion_actions & actions ) +{ + std::string module = s_header_map[ header ]; + + actions.heading( header, module ); + + std::set< std::string > from = s_header_deps[ header ]; + + // classify 'from' dependencies by module + + // module -> [header, header...] + std::map< std::string, std::set< std::string > > from2; + + for( std::set< std::string >::iterator i = from.begin(); i != from.end(); ++i ) + { + from2[ module_for_header( *i ) ].insert( *i ); + } + + for( std::map< std::string, std::set< std::string > >::iterator i = from2.begin(); i != from2.end(); ++i ) + { + actions.module_start( i->first ); + + for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + actions.header( *j ); + } + + actions.module_end( i->first ); + } +} + +// output_module_primary_report + +struct module_primary_txt_actions: public module_primary_actions +{ + void heading( std::string const & module ) + { + std::cout << "Primary dependencies for " << module << ":\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << module << ":\n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void header_start( std::string const & header ) + { + std::cout << " <" << header << ">\n"; + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & header ) + { + std::cout << " from <" << header << ">\n"; + } +}; + +struct module_primary_html_actions: public module_primary_actions +{ + void heading( std::string const & module ) + { + std::cout << "\n\n

Primary dependencies for " << module << "

\n"; + } + + void module_start( std::string const & module ) + { + std::cout << "

" << module << "

\n"; + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & header ) + { + std::cout << "

<" << header << ">

    \n"; + } + + void header_end( std::string const & /*header*/ ) + { + std::cout << "
\n"; + } + + void from_header( std::string const & header ) + { + std::cout << "
  • from <" << header << ">
  • \n"; + } +}; + +static void output_module_primary_report( std::string const & module, bool html, bool track_sources, bool track_tests ) +{ + if( html ) + { + module_primary_html_actions actions; + output_module_primary_report( module, actions, track_sources, track_tests ); + } + else + { + module_primary_txt_actions actions; + output_module_primary_report( module, actions, track_sources, track_tests ); + } +} + +// output_module_secondary_report + +struct module_secondary_txt_actions: public module_secondary_actions +{ + void heading( std::string const & module ) + { + std::cout << "Secondary dependencies for " << module << ":\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << module << ":\n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void module_adds( std::string const & module ) + { + std::cout << " adds " << module << "\n"; + } +}; + +struct module_secondary_html_actions: public module_secondary_actions +{ + std::string m2_; + + void heading( std::string const & module ) + { + std::cout << "\n\n

    Secondary dependencies for " << module << "

    \n"; + } + + void module_start( std::string const & module ) + { + std::cout << "

    " << module << "

      \n"; + m2_ = module; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "
    \n"; + } + + void module_adds( std::string const & module ) + { + std::cout << "
  • adds " << module << "
  • \n"; + } +}; + +static void output_module_secondary_report( std::string const & module, bool html ) +{ + if( html ) + { + module_secondary_html_actions actions; + output_module_secondary_report( module, actions ); + } + else + { + module_secondary_txt_actions actions; + output_module_secondary_report( module, actions ); + } +} + +// output_header_report + +struct header_inclusion_txt_actions: public header_inclusion_actions +{ + void heading( std::string const & header, std::string const & module ) + { + std::cout << "Inclusion report for <" << header << "> (in module " << module << "):\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << " from " << module << ":\n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void header( std::string const & header ) + { + std::cout << " <" << header << ">\n"; + } +}; + +struct header_inclusion_html_actions: public header_inclusion_actions +{ + void heading( std::string const & header, std::string const & module ) + { + std::cout << "

    Inclusion report for <" << header << "> (in module " << module << ")

    \n"; + } + + void module_start( std::string const & module ) + { + std::cout << "

    From " << module << "

      \n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "
    \n"; + } + + void header( std::string const & header ) + { + std::cout << "
  • <" << header << ">
  • \n"; + } +}; + +static void output_header_report( std::string const & header, bool html ) +{ + if( html ) + { + header_inclusion_html_actions actions; + output_header_inclusion_report( header, actions ); + } + else + { + header_inclusion_txt_actions actions; + output_header_inclusion_report( header, actions ); + } +} + +// output_module_reverse_report + +struct module_reverse_actions +{ + virtual void heading( std::string const & module ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void header_start( std::string const & header ) = 0; + virtual void header_end( std::string const & header ) = 0; + + virtual void from_header( std::string const & header ) = 0; +}; + +static void output_module_reverse_report( std::string const & module, module_reverse_actions & actions ) +{ + actions.heading( module ); + + std::set< std::string > const from = s_reverse_deps[ module ]; + + for( std::set< std::string >::const_iterator i = from.begin(); i != from.end(); ++i ) + { + actions.module_start( *i ); + + for( std::map< std::string, std::set< std::string > >::iterator j = s_header_deps.begin(); j != s_header_deps.end(); ++j ) + { + if( module_for_header( j->first ) == module ) + { + bool header_started = false; + + for( std::set< std::string >::iterator k = j->second.begin(); k != j->second.end(); ++k ) + { + if( module_for_header( *k ) == *i ) + { + if( !header_started ) + { + actions.header_start( j->first ); + + header_started = true; + } + + actions.from_header( *k ); + } + } + + if( header_started ) + { + actions.header_end( j->first ); + } + } + } + + actions.module_end( *i ); + } +} + +struct module_reverse_txt_actions: public module_reverse_actions +{ + void heading( std::string const & module ) + { + std::cout << "Reverse dependencies for " << module << ":\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << module << ":\n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void header_start( std::string const & header ) + { + std::cout << " <" << header << ">\n"; + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & header ) + { + std::cout << " from <" << header << ">\n"; + } +}; + +struct module_reverse_html_actions: public module_reverse_actions +{ + void heading( std::string const & module ) + { + std::cout << "\n\n

    Reverse dependencies for " << module << "

    \n"; + } + + void module_start( std::string const & module ) + { + std::cout << "

    " << module << "

    \n"; + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & header ) + { + std::cout << "

    <" << header << ">

      \n"; + } + + void header_end( std::string const & /*header*/ ) + { + std::cout << "
    \n"; + } + + void from_header( std::string const & header ) + { + std::cout << "
  • from <" << header << ">
  • \n"; + } +}; + +static void output_module_reverse_report( std::string const & module, bool html ) +{ + if( html ) + { + module_reverse_html_actions actions; + output_module_reverse_report( module, actions ); + } + else + { + module_reverse_txt_actions actions; + output_module_reverse_report( module, actions ); + } +} + +// module_level_report + +int const unknown_level = INT_MAX / 2; + +struct module_level_actions +{ + virtual void begin() = 0; + virtual void end() = 0; + + virtual void level_start( int level ) = 0; + virtual void level_end( int level ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void module2( std::string const & module, int level ) = 0; +}; + +static void output_module_level_report( module_level_actions & actions ) +{ + // build module level map + + std::map< std::string, int > level_map; + + for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + if( s_module_deps[ *i ].empty() ) + { + level_map[ *i ] = 0; + // std::cerr << *i << ": " << 0 << std::endl; + } + else + { + level_map[ *i ] = unknown_level; + } + } + + // build transitive closure to see through cycles + + std::map< std::string, std::set< std::string > > deps2 = s_module_deps; + + { + bool done; + + do + { + done = true; + + for( std::map< std::string, std::set< std::string > >::iterator i = deps2.begin(); i != deps2.end(); ++i ) + { + std::set< std::string > tmp = i->second; + + for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + std::set< std::string > tmp2 = deps2[ *j ]; + tmp.insert( tmp2.begin(), tmp2.end() ); + } + + if( tmp.size() != i->second.size() ) + { + i->second = tmp; + done = false; + } + } + } + while( !done ); + } + + // compute acyclic levels + + for( int k = 1, n = s_modules.size(); k < n; ++k ) + { + for( std::map< std::string, std::set< std::string > >::iterator i = s_module_deps.begin(); i != s_module_deps.end(); ++i ) + { + // i->first depends on i->second + + if( level_map[ i->first ] >= unknown_level ) + { + int level = 0; + + for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + level = std::max( level, level_map[ *j ] + 1 ); + } + + if( level == k ) + { + level_map[ i->first ] = level; + // std::cerr << i->first << ": " << level << std::endl; + } + } + } + } + + // min_level_map[ M ] == L means the level is unknown, but at least L + std::map< std::string, int > min_level_map; + + // initialize min_level_map for acyclic dependencies + + for( std::map< std::string, int >::iterator i = level_map.begin(); i != level_map.end(); ++i ) + { + if( i->second < unknown_level ) + { + min_level_map[ i->first ] = i->second; + } + } + + // compute levels for cyclic modules + + for( int k = 1, n = s_modules.size(); k < n; ++k ) + { + for( std::map< std::string, std::set< std::string > >::iterator i = s_module_deps.begin(); i != s_module_deps.end(); ++i ) + { + if( level_map[ i->first ] >= unknown_level ) + { + int level = 0; + + for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + int jl = level_map[ *j ]; + + if( jl < unknown_level ) + { + level = std::max( level, jl + 1 ); + } + else + { + int ml = min_level_map[ *j ]; + + if( deps2[ *j ].count( i->first ) == 0 ) + { + // *j does not depend on i->first, so + // the level of i->first is at least + // 1 + the minimum level of *j + + ++ml; + } + + level = std::max( level, ml ); + } + } + + min_level_map[ i->first ] = level; + } + } + } + + // reverse level map + + std::map< int, std::set< std::string > > reverse_level_map; + + for( std::map< std::string, int >::iterator i = level_map.begin(); i != level_map.end(); ++i ) + { + int level = i->second; + + if( level >= unknown_level ) + { + int min_level = min_level_map[ i->first ]; + + if( min_level != 0 ) + { + level = min_level; + } + } + + reverse_level_map[ level ].insert( i->first ); + } + + // output report + + actions.begin(); + + for( std::map< int, std::set< std::string > >::iterator i = reverse_level_map.begin(); i != reverse_level_map.end(); ++i ) + { + actions.level_start( i->first ); + + for( std::set< std::string >::iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + actions.module_start( *j ); + + std::set< std::string > mdeps = s_module_deps[ *j ]; + + for( std::set< std::string >::iterator k = mdeps.begin(); k != mdeps.end(); ++k ) + { + int level = level_map[ *k ]; + + if( level >= unknown_level ) + { + int min_level = min_level_map[ *k ]; + + if( min_level != 0 ) + { + level = min_level; + } + } + + actions.module2( *k, level ); + } + + actions.module_end( *j ); + } + + actions.level_end( i->first ); + } + + actions.end(); +} + +struct module_level_txt_actions: public module_level_actions +{ + int level_; + + void begin() + { + std::cout << "Module Levels:\n\n"; + } + + void end() + { + } + + void level_start( int level ) + { + if( level >= unknown_level ) + { + std::cout << "Level (undetermined):\n"; + } + else + { + std::cout << "Level " << level << ":\n"; + } + + level_ = level; + } + + void level_end( int /*level*/ ) + { + std::cout << "\n"; + } + + void module_start( std::string const & module ) + { + std::cout << " " << module; + + if( level_ > 0 ) + { + std::cout << " ->"; + } + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void module2( std::string const & module, int level ) + { + std::cout << " " << module << "("; + + if( level >= unknown_level ) + { + std::cout << "-"; + } + else + { + std::cout << level; + } + + std::cout << ")"; + } +}; + +struct module_level_html_actions: public module_level_actions +{ + int level_; + + void begin() + { + std::cout << "

    Module Levels

    \n"; + } + + void end() + { + std::cout << "
    \n"; + } + + void level_start( int level ) + { + if( level >= unknown_level ) + { + std::cout << "

    Level undetermined

    \n"; + } + else + { + std::cout << "

    Level " << level << "

    \n"; + } + + level_ = level; + } + + void level_end( int /*level*/ ) + { + } + + void module_start( std::string const & module ) + { + std::cout << "

    " << module << "

    "; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "

    \n"; + } + + void module2( std::string const & module, int level ) + { + std::cout << " "; + + bool important = level < unknown_level && level > 1 && level >= level_ - 1; + + if( important ) + { + std::cout << ""; + } + + std::cout << module; + + if( level < unknown_level ) + { + std::cout << "" << level << ""; + } + + if( important ) + { + std::cout << ""; + } + } +}; + +static void output_module_level_report( bool html ) +{ + if( html ) + { + module_level_html_actions actions; + output_module_level_report( actions ); + } + else + { + module_level_txt_actions actions; + output_module_level_report( actions ); + } +} + +// module_overview_report + +struct module_overview_actions +{ + virtual void begin() = 0; + virtual void end() = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void module2( std::string const & module ) = 0; +}; + +static void output_module_overview_report( module_overview_actions & actions ) +{ + actions.begin(); + + for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + actions.module_start( *i ); + + std::set< std::string > const mdeps = s_module_deps[ *i ]; + + for( std::set< std::string >::const_iterator j = mdeps.begin(); j != mdeps.end(); ++j ) + { + actions.module2( *j ); + } + + actions.module_end( *i ); + } + + actions.end(); +} + +struct module_overview_txt_actions: public module_overview_actions +{ + bool deps_; + + void begin() + { + std::cout << "Module Overview:\n\n"; + } + + void end() + { + } + + void module_start( std::string const & module ) + { + std::cout << module; + deps_ = false; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void module2( std::string const & module ) + { + if( !deps_ ) + { + std::cout << " ->"; + deps_ = true; + } + + std::cout << " " << module; + } +}; + +struct module_overview_html_actions: public module_overview_actions +{ + void begin() + { + std::cout << "

    Module Overview

    \n"; + } + + void end() + { + std::cout << "
    \n"; + } + + void module_start( std::string const & module ) + { + std::cout << "

    " << module << "

    "; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "

    \n"; + } + + void module2( std::string const & module ) + { + std::cout << " " << module; + } +}; + +static void output_module_overview_report( bool html ) +{ + if( html ) + { + module_overview_html_actions actions; + output_module_overview_report( actions ); + } + else + { + module_overview_txt_actions actions; + output_module_overview_report( actions ); + } +} + +// list_dependencies + +struct list_dependencies_actions: public module_overview_actions +{ + void begin() + { + } + + void end() + { + } + + void module_start( std::string const & module ) + { + std::cout << module << " ->"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void module2( std::string const & module ) + { + if( module != "(unknown)" ) + { + std::cout << " " << module; + } + } +}; + +static void list_dependencies() +{ + list_dependencies_actions actions; + output_module_overview_report( actions ); +} + +// + +static void output_html_header( std::string const & title, std::string const & stylesheet, std::string const & prefix ) +{ + std::cout << "\n"; + std::cout << "\n"; + std::cout << "" << title << "\n"; + + if( !stylesheet.empty() ) + { + std::cout << "\n"; + } + + std::cout << "\n"; + std::cout << "\n"; + + if( !prefix.empty() ) + { + std::cout << prefix << std::endl; + } +} + +static void output_html_footer( std::string const & footer ) +{ + std::cout << "
    \n"; + std::cout << "

    " << footer << "

    \n"; + std::cout << "\n"; + std::cout << "\n"; +} + +static void enable_secondary( bool & secondary, bool track_sources, bool track_tests ) +{ + if( !secondary ) + { + try + { + build_module_dependency_map( track_sources, track_tests ); + } + catch( fs::filesystem_error const & x ) + { + std::cout << x.what() << std::endl; + } + + secondary = true; + } +} + +static void list_modules() +{ + for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + std::cout << *i << "\n"; + } +} + +static void list_buildable() +{ + for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + if( fs::exists( module_build_path( *i ) ) && fs::exists( module_source_path( *i ) ) ) + { + std::cout << *i << "\n"; + } + } +} + +// module_weight_report + +struct module_weight_actions +{ + virtual void begin() = 0; + virtual void end() = 0; + + virtual void weight_start( int weight ) = 0; + virtual void weight_end( int weight ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void module_primary_start() = 0; + virtual void module_primary( std::string const & module, int weight ) = 0; + virtual void module_primary_end() = 0; + + virtual void module_secondary_start() = 0; + virtual void module_secondary( std::string const & module, int weight ) = 0; + virtual void module_secondary_end() = 0; +}; + +static void output_module_weight_report( module_weight_actions & actions ) +{ + // gather secondary dependencies + + struct build_secondary_deps: public module_secondary_actions + { + std::map< std::string, std::set< std::string > > * pm_; + + build_secondary_deps( std::map< std::string, std::set< std::string > > * pm ): pm_( pm ) + { + } + + std::string module_; + + void heading( std::string const & module ) + { + module_ = module; + } + + void module_start( std::string const & /*module*/ ) + { + } + + void module_end( std::string const & /*module*/ ) + { + } + + void module_adds( std::string const & module ) + { + (*pm_)[ module_ ].insert( module ); + } + }; + + std::map< std::string, std::set< std::string > > secondary_deps; + + build_secondary_deps bsd( &secondary_deps ); + + for( std::set< std::string >::const_iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + output_module_secondary_report( *i, bsd ); + } + + // build weight map + + std::map< int, std::set< std::string > > modules_by_weight; + + for( std::set< std::string >::const_iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + int w = s_module_deps[ *i ].size() + secondary_deps[ *i ].size(); + modules_by_weight[ w ].insert( *i ); + } + + // output report + + actions.begin(); + + for( std::map< int, std::set< std::string > >::const_iterator i = modules_by_weight.begin(); i != modules_by_weight.end(); ++i ) + { + actions.weight_start( i->first ); + + for( std::set< std::string >::const_iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + actions.module_start( *j ); + + if( !s_module_deps[ *j ].empty() ) + { + actions.module_primary_start(); + + for( std::set< std::string >::const_iterator k = s_module_deps[ *j ].begin(); k != s_module_deps[ *j ].end(); ++k ) + { + int w = s_module_deps[ *k ].size() + secondary_deps[ *k ].size(); + actions.module_primary( *k, w ); + } + + actions.module_primary_end(); + } + + if( !secondary_deps[ *j ].empty() ) + { + actions.module_secondary_start(); + + for( std::set< std::string >::const_iterator k = secondary_deps[ *j ].begin(); k != secondary_deps[ *j ].end(); ++k ) + { + int w = s_module_deps[ *k ].size() + secondary_deps[ *k ].size(); + actions.module_secondary( *k, w ); + } + + actions.module_secondary_end(); + } + + actions.module_end( *j ); + } + + actions.weight_end( i->first ); + } + + actions.end(); +} + +struct module_weight_txt_actions: public module_weight_actions +{ + void begin() + { + std::cout << "Module Weights:\n\n"; + } + + void end() + { + } + + void weight_start( int weight ) + { + std::cout << "Weight " << weight << ":\n"; + } + + void weight_end( int /*weight*/ ) + { + std::cout << "\n"; + } + + void module_start( std::string const & module ) + { + std::cout << " " << module; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void module_primary_start() + { + std::cout << " ->"; + } + + void module_primary( std::string const & module, int weight ) + { + std::cout << " " << module << "(" << weight << ")"; + } + + void module_primary_end() + { + } + + void module_secondary_start() + { + std::cout << " ->"; + } + + void module_secondary( std::string const & module, int /*weight*/ ) + { + std::cout << " " << module; + } + + void module_secondary_end() + { + } +}; + +struct module_weight_html_actions: public module_weight_actions +{ + int weight_; + + void begin() + { + std::cout << "
    \n

    Module Weights

    \n"; + } + + void end() + { + std::cout << "
    \n"; + } + + void weight_start( int weight ) + { + std::cout << "

    Weight " << weight << "

    \n"; + weight_ = weight; + } + + void weight_end( int /*weight*/ ) + { + } + + void module_start( std::string const & module ) + { + std::cout << "

    " << module << "

    "; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void module_primary_start() + { + std::cout << "

    "; + } + + void module_primary( std::string const & module, int weight ) + { + std::cout << " "; + + bool heavy = weight >= 0.8 * weight_; + + if( heavy ) + { + std::cout << ""; + } + + std::cout << module << "" << weight << ""; + + if( heavy ) + { + std::cout << ""; + } + } + + void module_primary_end() + { + std::cout << "

    "; + } + + void module_secondary_start() + { + std::cout << "

    "; + } + + void module_secondary( std::string const & module, int /*weight*/ ) + { + std::cout << " " << module; + } + + void module_secondary_end() + { + std::cout << "

    "; + } +}; + +static void output_module_weight_report( bool html ) +{ + if( html ) + { + module_weight_html_actions actions; + output_module_weight_report( actions ); + } + else + { + module_weight_txt_actions actions; + output_module_weight_report( actions ); + } +} + +// output_module_subset_report + +struct module_subset_actions +{ + virtual void heading( std::string const & module ) = 0; + + virtual void module_start( std::string const & module ) = 0; + virtual void module_end( std::string const & module ) = 0; + + virtual void from_path( std::vector const & path ) = 0; +}; + +static void add_module_headers( fs::path const & dir, std::set & headers ) +{ + if( fs::exists( dir ) ) + { + fs::recursive_directory_iterator it( dir ), last; + + for( ; it != last; ++it ) + { + if( it->status().type() == fs::directory_file ) + { + continue; + } + + headers.insert( it->path().generic_string() ); + } + } +} + +static void output_module_subset_report_( std::string const & module, std::set const & headers, module_subset_actions & actions ) +{ + // build header closure + + // header -> (header)* + std::map< std::string, std::set > inc2; + + // (header, header) -> path + std::map< std::pair, std::vector > paths; + + for( std::set::const_iterator i = headers.begin(); i != headers.end(); ++i ) + { + std::set & s = inc2[ *i ]; + + s = s_header_includes[ *i ]; + + for( std::set::const_iterator j = s.begin(); j != s.end(); ++j ) + { + std::vector & v = paths[ std::make_pair( *i, *j ) ]; + + v.resize( 0 ); + v.push_back( *i ); + v.push_back( *j ); + } + } + + for( ;; ) + { + bool r = false; + + for( std::map< std::string, std::set >::iterator i = inc2.begin(); i != inc2.end(); ++i ) + { + std::set & s2 = i->second; + + for( std::set::const_iterator j = s2.begin(); j != s2.end(); ++j ) + { + std::set const & s = s_header_includes[ *j ]; + + for( std::set::const_iterator k = s.begin(); k != s.end(); ++k ) + { + if( s2.count( *k ) == 0 ) + { + s2.insert( *k ); + + std::vector const & v1 = paths[ std::make_pair( i->first, *j ) ]; + std::vector & v2 = paths[ std::make_pair( i->first, *k ) ]; + + v2 = v1; + v2.push_back( *k ); + + r = true; + } + } + } + } + + if( !r ) break; + } + + // module -> header -> path [header -> header -> header] + std::map< std::string, std::map< std::string, std::vector > > subset; + + for( std::set::const_iterator i = headers.begin(); i != headers.end(); ++i ) + { + std::set const & s = inc2[ *i ]; + + for( std::set::const_iterator j = s.begin(); j != s.end(); ++j ) + { + std::string const & m = s_header_map[ *j ]; + + if( m.empty() ) continue; + + std::vector const & path = paths[ std::make_pair( *i, *j ) ]; + + if( subset.count( m ) == 0 || subset[ m ].count( *i ) == 0 || subset[ m ][ *i ].size() > path.size() ) + { + subset[ m ][ *i ] = path; + } + } + } + + actions.heading( module ); + + for( std::map< std::string, std::map< std::string, std::vector > >::const_iterator i = subset.begin(); i != subset.end(); ++i ) + { + if( i->first == module ) continue; + + actions.module_start( i->first ); + + int k = 0; + + for( std::map< std::string, std::vector >::const_iterator j = i->second.begin(); j != i->second.end() && k < 4; ++j, ++k ) + { + actions.from_path( j->second ); + } + + actions.module_end( i->first ); + } +} + +static void output_module_subset_report( std::string const & module, bool track_sources, bool track_tests, module_subset_actions & actions ) +{ + std::set headers = s_module_headers[ module ]; + + if( track_sources ) + { + add_module_headers( module_source_path( module ), headers ); + } + + if( track_tests ) + { + add_module_headers( module_test_path( module ), headers ); + } + + output_module_subset_report_( module, headers, actions ); +} + +struct module_subset_txt_actions: public module_subset_actions +{ + void heading( std::string const & module ) + { + std::cout << "Subset dependencies for " << module << ":\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << module << ":\n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "\n"; + } + + void from_path( std::vector const & path ) + { + for( std::vector::const_iterator i = path.begin(); i != path.end(); ++i ) + { + if( i == path.begin() ) + { + std::cout << " "; + } + else + { + std::cout << " -> "; + } + + std::cout << *i; + } + + std::cout << "\n"; + } +}; + +struct module_subset_html_actions: public module_subset_actions +{ + void heading( std::string const & module ) + { + std::cout << "\n\n

    Subset dependencies for " << module << "

    \n"; + } + + void module_start( std::string const & module ) + { + std::cout << "

    " << module << "

      \n"; + } + + void module_end( std::string const & /*module*/ ) + { + std::cout << "
    \n"; + } + + void from_path( std::vector const & path ) + { + std::cout << "
  • "; + + for( std::vector::const_iterator i = path.begin(); i != path.end(); ++i ) + { + if( i != path.begin() ) + { + std::cout << " ⇢ "; + } + + std::cout << "" << *i << ""; + } + + std::cout << "
  • \n"; + } +}; + +static void output_module_subset_report( std::string const & module, bool track_sources, bool track_tests, bool html ) +{ + if( html ) + { + module_subset_html_actions actions; + output_module_subset_report( module, track_sources, track_tests, actions ); + } + else + { + module_subset_txt_actions actions; + output_module_subset_report( module, track_sources, track_tests, actions ); + } +} + +// --list-exceptions + +static void list_exceptions() +{ + std::string lm; + + for( std::map< std::string, std::set >::const_iterator i = s_module_headers.begin(); i != s_module_headers.end(); ++i ) + { + std::string module = i->first; + + std::replace( module.begin(), module.end(), '~', '/' ); + + std::string const prefix = "boost/" + module; + size_t const n = prefix.size(); + + for( std::set< std::string >::const_iterator j = i->second.begin(); j != i->second.end(); ++j ) + { + std::string const & header = *j; + + if( header.substr( 0, n+1 ) != prefix + '/' && header != prefix + ".hpp" ) + { + if( lm != module ) + { + std::cout << module << ":\n"; + lm = module; + } + + std::cout << " " << header << '\n'; + } + } + } +} + +// --test + +struct module_test_primary_actions: public module_primary_actions +{ + std::set< std::string > & m_; + + module_test_primary_actions( std::set< std::string > & m ): m_( m ) + { + } + + void heading( std::string const & module ) + { + std::cout << "Test dependencies for " << module << ":\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << module << "\n"; + m_.insert( module ); + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & /*header*/ ) + { + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & /*header*/ ) + { + } +}; + +struct module_test_secondary_actions: public module_secondary_actions +{ + std::set< std::string > & m_; + std::string m2_; + + module_test_secondary_actions( std::set< std::string > & m ): m_( m ) + { + } + + void heading( std::string const & /*module*/ ) + { + } + + void module_start( std::string const & module ) + { + m2_ = module; + } + + void module_end( std::string const & /*module*/ ) + { + } + + void module_adds( std::string const & module ) + { + if( m_.count( module ) == 0 ) + { + std::cout << module << " (from " << m2_ << ")\n"; + m_.insert( module ); + } + } +}; + +static void output_module_test_report( std::string const & module ) +{ + std::set< std::string > m; + + module_test_primary_actions a1( m ); + output_module_primary_report( module, a1, true, true ); + + std::cout << "\n"; + + bool secondary = false; + enable_secondary( secondary, true, false ); + + std::set< std::string > m2( m ); + m2.insert( module ); + + module_test_secondary_actions a2( m2 ); + + output_module_secondary_report( module, m, a2 ); +} + +// --cmake + +struct collect_primary_dependencies: public module_primary_actions +{ + std::set< std::string > set_; + + void heading( std::string const & ) + { + } + + void module_start( std::string const & module ) + { + if( module == "(unknown)" ) return; + + set_.insert( module ); + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & /*header*/ ) + { + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & /*header*/ ) + { + } +}; + +static std::string module_cmake_name( std::string module ) +{ + std::replace( module.begin(), module.end(), '~', '_' ); + return module; +} + +static int parse_cxxstd_line( char const* p ) +{ + while( *p == ' ' || *p == '\t' ) ++p; + + if( std::strncmp( p, "\"cxxstd\"", 8 ) != 0 ) return 0; + p += 8; + + while( *p == ' ' || *p == '\t' ) ++p; + + if( *p != ':' ) return 0; + ++p; + + while( *p == ' ' || *p == '\t' ) ++p; + + if( p[0] != '"' ) return 0; + if( p[1] < '0' || p[1] > '9' ) return 0; + if( p[2] < '0' || p[2] > '9' ) return 0; + if( p[3] != '"' ) return 0; + + int r = ( p[1] - '0' ) * 10 + ( p[2] - '0' ); + + if( r < 90 ) r += 100; + + return r; +} + +static int module_cxxstd_requirement( std::string const& module ) +{ + fs::path lj = module_meta_path( module ) / "libraries.json"; + + int r = 0; + + fs::ifstream is( lj ); + + std::string line; + + while( std::getline( is, line ) ) + { + int r2 = parse_cxxstd_line( line.c_str() ); + if( r2 > r ) r = r2; + } + + return r; +} + +static void output_module_cmake_report( std::string module ) +{ + int cxxstd = module_cxxstd_requirement( module ); + + std::cout << + + "# Generated by `boostdep --cmake " << module << "`\n" + "# Copyright 2020, 2021 Peter Dimov\n" + "# Distributed under the Boost Software License, Version 1.0.\n" + "# https://www.boost.org/LICENSE_1_0.txt\n" + "\n" + "cmake_minimum_required(VERSION " << (cxxstd >= 111? "3.8": "3.5") << "...3.20)\n" + "\n" + ; + + std::replace( module.begin(), module.end(), '/', '~' ); + + std::vector sources; + bool has_c_sources = false; + + fs::path srcpath = module_source_path( module ); + + if( fs::exists( srcpath ) ) + { + fs::directory_iterator it( srcpath ), last; + + for( ; it != last; ++it ) + { + if( it->status().type() != fs::regular_file ) continue; + + fs::path p = it->path(); + std::string ext = p.extension().string(); + + if( ext != ".cpp" && ext != ".c" ) continue; + + std::string name = p.filename().string(); + + sources.push_back( name ); + + if( ext == ".c" ) has_c_sources = true; + } + } + + std::string lm( module ); + + std::replace( lm.begin(), lm.end(), '~', '_' ); + + std::cout << + + "project(boost_" << lm << " VERSION \"${BOOST_SUPERPROJECT_VERSION}\" LANGUAGES" << ( has_c_sources? " C": "" ) << " CXX)\n" + "\n" + ; + + collect_primary_dependencies a1; + output_module_primary_report( module, a1, false, false ); + + if( !fs::exists( srcpath ) ) + { + // header-only library + + std::cout << + + "add_library(boost_" << lm << " INTERFACE)\n" + "add_library(Boost::" << lm << " ALIAS boost_" << lm << ")\n" + "\n" + "target_include_directories(boost_" << lm << " INTERFACE include)\n" + "\n" + ; + + if( !a1.set_.empty() ) + { + std::cout << + + "target_link_libraries(boost_" << lm << "\n" + " INTERFACE\n" + ; + + for( std::set< std::string >::const_iterator i = a1.set_.begin(); i != a1.set_.end(); ++i ) + { + std::cout << " Boost::" << module_cmake_name( *i ) << "\n"; + } + + std::cout << + + ")\n" + "\n" + ; + } + + if( cxxstd >= 111 ) + { + std::cout << + + "target_compile_features(boost_" << lm << " INTERFACE cxx_std_" << cxxstd - 100 << ")\n" + "\n" + ; + } + } + else + { + // compiled library + + std::cout << + + "add_library(boost_" << lm << "\n"; + + for( std::vector::iterator i = sources.begin(); i != sources.end(); ++i ) + { + std::cout << " src/" << *i << "\n"; + } + + std::cout << + + ")\n" + "\n" + "add_library(Boost::" << lm << " ALIAS boost_" << lm << ")\n" + "\n" + "target_include_directories(boost_" << lm << " PUBLIC include)\n" + "\n" + ; + + collect_primary_dependencies a2; + output_module_primary_report( module, a2, true, false ); + + if( !a1.set_.empty() || !a2.set_.empty() ) + { + std::cout << + + "target_link_libraries(boost_" << lm << "\n" + ; + + if( !a1.set_.empty() ) + { + std::cout << + + " PUBLIC\n" + ; + + for( std::set< std::string >::const_iterator i = a1.set_.begin(); i != a1.set_.end(); ++i ) + { + a2.set_.erase( *i ); + std::cout << " Boost::" << module_cmake_name( *i ) << "\n"; + } + } + + if( !a2.set_.empty() ) + { + std::cout << + + " PRIVATE\n" + ; + + for( std::set< std::string >::const_iterator i = a2.set_.begin(); i != a2.set_.end(); ++i ) + { + std::cout << " Boost::" << module_cmake_name( *i ) << "\n"; + } + } + + std::cout << + + ")\n" + "\n" + ; + } + + if( cxxstd >= 111 ) + { + std::cout << + + "target_compile_features(boost_" << lm << " PUBLIC cxx_std_" << cxxstd - 100 << ")\n" + "\n" + ; + } + + std::string um( lm ); + + for( std::string::iterator i = um.begin(); i != um.end(); ++i ) + { + *i = std::toupper( static_cast( *i ) ); + } + + std::cout << + + "target_compile_definitions(boost_" << lm << "\n" + " PUBLIC BOOST_" << um << "_NO_LIB\n" + " PRIVATE BOOST_" << um << "_SOURCE\n" + ")\n" + "\n" + "if(BUILD_SHARED_LIBS)\n" + " target_compile_definitions(boost_" << lm << " PUBLIC BOOST_" << um << "_DYN_LINK)\n" + "else()\n" + " target_compile_definitions(boost_" << lm << " PUBLIC BOOST_" << um << "_STATIC_LINK)\n" + "endif()\n" + "\n" + ; + } + + std::cout << + + "if(BUILD_TESTING AND EXISTS \"${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt\")\n" + "\n" + " add_subdirectory(test)\n" + "\n" + "endif()\n" + ; +} + +// --brief + +struct module_brief_primary_actions: public module_primary_actions +{ + std::set< std::string > & m_; + + module_brief_primary_actions( std::set< std::string > & m ): m_( m ) + { + } + + void heading( std::string const & /*module*/ ) + { + std::cout << "# Primary dependencies\n\n"; + } + + void module_start( std::string const & module ) + { + std::cout << module << "\n"; + m_.insert( module ); + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & /*header*/ ) + { + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & /*header*/ ) + { + } +}; + +struct module_brief_secondary_actions: public module_secondary_actions +{ + std::set< std::string > & m_; + + module_brief_secondary_actions( std::set< std::string > & m ): m_( m ) + { + } + + void heading( std::string const & /*module*/ ) + { + std::cout << "# Secondary dependencies\n\n"; + } + + void module_start( std::string const & /*module*/ ) + { + } + + void module_end( std::string const & /*module*/ ) + { + } + + void module_adds( std::string const & module ) + { + if( m_.count( module ) == 0 ) + { + std::cout << module << "\n"; + m_.insert( module ); + } + } +}; + +static void output_module_brief_report( std::string const & module, bool track_sources, bool track_tests ) +{ + std::set< std::string > m; + + std::cout << "Brief dependency report for " << module << " (sources " << (track_sources? "on": "off") << ", tests " << (track_tests? "on": "off") << "):\n\n"; + + module_brief_primary_actions a1( m ); + output_module_primary_report( module, a1, track_sources, track_tests ); + + std::cout << "\n"; + + std::set< std::string > m2( m ); + m2.insert( module ); + + module_brief_secondary_actions a2( m2 ); + output_module_secondary_report( module, m, a2 ); +} + +// --list-missing-headers + +struct missing_header_actions: public module_primary_actions +{ + std::string module_, module2_; + + void heading( std::string const & module ) + { + module_ = module; + } + + void module_start( std::string const & module ) + { + module2_ = module; + } + + void module_end( std::string const & /*module*/ ) + { + } + + void header_start( std::string const & header ) + { + if( module2_ == "(unknown)" ) + { + if( !module_.empty() ) + { + std::cout << module_ << ":\n"; + module_.clear(); + } + + std::cout << " <" << header << ">\n"; + } + } + + void header_end( std::string const & /*header*/ ) + { + } + + void from_header( std::string const & header ) + { + if( module2_ == "(unknown)" ) + { + std::cout << " from <" << header << ">\n"; + } + } +}; + +static void list_missing_headers( std::string const & module ) +{ + missing_header_actions a; + output_module_primary_report( module, a, false, false ); +} + +static void list_missing_headers() +{ + for( std::set< std::string >::const_iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + list_missing_headers( *i ); + } +} + +// --pkgconfig + +struct primary_pkgconfig_actions: public module_primary_actions +{ + std::string version_; + std::string list_; + + void heading( std::string const & ) + { + } + + void module_start( std::string const & module ) + { + if( module == "(unknown)" ) return; + + std::string m2( module ); + std::replace( m2.begin(), m2.end(), '~', '_' ); + + if( !list_.empty() ) + { + list_ += ", "; + } + + list_ += "boost_" + m2 + " = " + version_; + } + + void module_end( std::string const & ) + { + } + + void header_start( std::string const & ) + { + } + + void header_end( std::string const & ) + { + } + + void from_header( std::string const & ) + { + } +}; + +static void output_requires( std::string const & section, std::string const & version, std::set< std::string > const & s ) +{ + bool first = true; + + for( std::set< std::string >::const_iterator i = s.begin(); i != s.end(); ++i ) + { + if( first ) + { + std::cout << section << ": "; + first = false; + } + else + { + std::cout << ", "; + } + + std::string m2( *i ); + std::replace( m2.begin(), m2.end(), '~', '_' ); + + std::cout << "boost_" << m2 << " = " << version; + } +} + +static void output_pkgconfig( std::string const & module, std::string const & version, int argc, char const* argv[] ) +{ + for( int i = 0; i < argc; ++i ) + { + std::cout << argv[ i ] << '\n'; + } + + std::cout << '\n'; + + std::string m2( module ); + std::replace( m2.begin(), m2.end(), '/', '_' ); + + std::string m3( module ); + std::replace( m3.begin(), m3.end(), '/', '~' ); + + std::cout << "Name: boost_" << module << '\n'; + std::cout << "Description: Boost C++ library '" << module << "'\n"; + std::cout << "Version: " << version << '\n'; + std::cout << "URL: http://www.boost.org/libs/" << module << '\n'; + std::cout << "Cflags: -I${includedir}\n"; + + if( fs::exists( module_build_path( module ) ) && fs::exists( module_source_path( module ) ) ) + { + std::cout << "Libs: -L${libdir} -lboost_" << m2 << "\n"; + } + + collect_primary_dependencies a1; + output_module_primary_report( m3, a1, false, false ); + + if( !a1.set_.empty() ) + { + output_requires( "Requires", version, a1.set_ ); + std::cout << std::endl; + } + + collect_primary_dependencies a2; + output_module_primary_report( m3, a2, true, false ); + + for( std::set< std::string >::const_iterator i = a1.set_.begin(); i != a1.set_.end(); ++i ) + { + a2.set_.erase( *i ); + } + + if( !a2.set_.empty() ) + { + output_requires( "Requires.private", version, a2.set_ ); + std::cout << std::endl; + } +} + +// --subset-for + +static void output_directory_subset_report( std::string const & module, std::set const & headers, bool html ) +{ + for( std::set::const_iterator i = headers.begin(); i != headers.end(); ++i ) + { + std::map< std::string, std::set< std::string > > deps; + std::map< std::string, std::set< std::string > > from; + + std::ifstream is( i->c_str() ); + scan_header_dependencies( *i, is, deps, from ); + + for( std::map< std::string, std::set< std::string > >::const_iterator j = from.begin(); j != from.end(); ++j ) + { + for( std::set::const_iterator k = j->second.begin(); k != j->second.end(); ++k ) + { + s_header_includes[ *k ].insert( j->first ); + } + } + } + + if( html ) + { + module_subset_html_actions actions; + output_module_subset_report_( module, headers, actions ); + } + else + { + module_subset_txt_actions actions; + output_module_subset_report_( module, headers, actions ); + } +} + +// list_buildable_dependencies + +struct list_buildable_dependencies_actions: public module_overview_actions +{ + std::set< std::string > buildable_; + + std::set< std::string > deps_; + bool headers_; + + list_buildable_dependencies_actions(): headers_() + { + } + + void begin() + { + std::cout << "# Generated by `boostdep --list-buildable-dependencies`\n\n"; + } + + void end() + { + } + + void module_start( std::string const & module ) + { + deps_.clear(); + headers_ = false; + + if( buildable_.count( module ) ) + { + std::cout << module << " ="; + } + } + + void module_end( std::string const & module ) + { + if( buildable_.count( module ) ) + { + if( headers_ ) + { + std::cout << " headers"; + } + + for( std::set< std::string >::iterator i = deps_.begin(); i != deps_.end(); ++i ) + { + std::cout << " " << *i; + } + + std::cout << " ;\n"; + } + } + + void module2( std::string const & module ) + { + if( module == "(unknown)" ) return; + + if( buildable_.count( module ) == 0 ) + { + headers_ = true; + } + else + { + deps_.insert( module ); + } + } +}; + +static void list_buildable_dependencies() +{ + list_buildable_dependencies_actions actions; + + for( std::set< std::string >::iterator i = s_modules.begin(); i != s_modules.end(); ++i ) + { + if( fs::exists( module_build_path( *i ) ) && fs::exists( module_source_path( *i ) ) ) + { + actions.buildable_.insert( *i ); + } + } + + output_module_overview_report( actions ); +} + +// + +static bool find_boost_root() +{ + for( int i = 0; i < 32; ++i ) + { + if( fs::exists( "Jamroot" ) ) + { + return true; + } + + fs::path p = fs::current_path(); + + if( p == p.root_path() ) + { + return false; + } + + fs::current_path( p.parent_path() ); + } + + return false; +} + +static bool is_boost_root( fs::path const & p ) +{ + return fs::exists( p / "Jamroot" ); +} + +// teebuf + +class teebuf: public std::streambuf +{ +private: + + std::streambuf * sb1_; + std::streambuf * sb2_; + +public: + + teebuf( std::streambuf * sb1, std::streambuf * sb2 ): sb1_( sb1 ), sb2_( sb2 ) + { + } + +private: + + virtual int overflow( int c ) + { + int r1 = sb1_->sputc( c ); + int r2 = sb2_->sputc( c ); + + return r1 == EOF || r2 == EOF? EOF : c; + } + + virtual int sync() + { + int r1 = sb1_->pubsync(); + int r2 = sb2_->pubsync(); + + return r1 == 0 && r2 == 0? 0 : -1; + } +}; + +// save_cout_rdbuf + +class save_cout_rdbuf +{ +private: + + std::streambuf * sb_; + +public: + + save_cout_rdbuf(): sb_( std::cout.rdbuf() ) + { + } + + ~save_cout_rdbuf() + { + std::cout.rdbuf( sb_ ); + } +}; + +// main + +int main( int argc, char const* argv[] ) +{ + if( argc < 2 ) + { + std::cout << + + "Usage:\n" + "\n" + " boostdep --list-modules\n" + " boostdep --list-buildable\n" + " boostdep [--track-sources] [--track-tests] --list-dependencies\n" + " boostdep --list-exceptions\n" + " boostdep --list-missing-headers\n" + " boostdep --list-buildable-dependencies\n" + "\n" + " boostdep [options] --module-overview\n" + " boostdep [options] --module-levels\n" + " boostdep [options] --module-weights\n" + "\n" + " boostdep [options] [--primary] \n" + " boostdep [options] --secondary \n" + " boostdep [options] --reverse \n" + " boostdep [options] --subset \n" + " boostdep [options] [--header]
    \n" + " boostdep --test \n" + " boostdep --cmake \n" + " boostdep --pkgconfig [=] [=]...\n" + " boostdep [options] --subset-for \n" + " boostdep --brief \n" + "\n" + " [options]: [--boost-root ]\n" + " [--[no-]track-sources] [--[no-]track-tests]\n" + " [--html-title ] [--html-footer <footer>]\n" + " [--html-stylesheet <stylesheet>] [--html-prefix <prefix>]\n" + " [--html]\n"; + + return -1; + } + + bool root_set = false; + + for( int i = 0; i < argc; ++i ) + { + std::string option = argv[ i ]; + + if( option == "--boost-root" ) + { + if( i + 1 < argc ) + { + fs::path p( argv[ ++i ] ); + + if( is_boost_root( p ) ) + { + fs::current_path( p ); + root_set = true; + } + else + { + std::cerr << "'" << p.string() << "': not a valid Boost root.\n"; + return -2; + } + } + else + { + std::cerr << "'" << option << "': missing argument.\n"; + return -2; + } + } + } + + if( !root_set && !find_boost_root() ) + { + char const * env_root = std::getenv( "BOOST_ROOT" ); + + if( env_root && is_boost_root( env_root ) ) + { + fs::current_path( env_root ); + } + else + { + std::cerr << "boostdep: Could not find Boost root.\n"; + return -2; + } + } + + try + { + build_header_map(); + } + catch( fs::filesystem_error const & x ) + { + std::cerr << x.what() << std::endl; + } + + bool html = false; + bool secondary = false; + bool track_sources = true; + bool track_tests = false; + + std::string html_title = "Boost Dependency Report"; + std::string html_footer; + std::string html_stylesheet; + std::string html_prefix; + + std::ostringstream captured_output; + teebuf tsb( std::cout.rdbuf(), captured_output.rdbuf() ); + + save_cout_rdbuf scrdb; + + for( int i = 1; i < argc; ++i ) + { + std::string option = argv[ i ]; + + if( option == "--boost-root" ) + { + ++i; + } + else if( option == "--list-modules" ) + { + list_modules(); + } + else if( option == "--list-buildable" ) + { + list_buildable(); + } + else if( option == "--title" || option == "--html-title" ) + { + if( i + 1 < argc ) + { + html_title = argv[ ++i ]; + } + } + else if( option == "--footer" || option == "--html-footer" ) + { + if( i + 1 < argc ) + { + html_footer = argv[ ++i ]; + } + } + else if( option == "--html-stylesheet" ) + { + if( i + 1 < argc ) + { + html_stylesheet = argv[ ++i ]; + } + } + else if( option == "--html-prefix" ) + { + if( i + 1 < argc ) + { + html_prefix = argv[ ++i ]; + } + } + else if( option == "--html" ) + { + if( !html ) + { + html = true; + output_html_header( html_title, html_stylesheet, html_prefix ); + } + } + else if( option == "--track-sources" ) + { + track_sources = true; + } + else if( option == "--no-track-sources" ) + { + track_sources = false; + } + else if( option == "--track-tests" ) + { + track_tests = true; + } + else if( option == "--no-track-tests" ) + { + track_tests = false; + } + else if( option == "--primary" ) + { + if( i + 1 < argc ) + { + output_module_primary_report( argv[ ++i ], html, track_sources, track_tests ); + } + } + else if( option == "--secondary" ) + { + if( i + 1 < argc ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_secondary_report( argv[ ++i ], html ); + } + } + else if( option == "--reverse" ) + { + if( i + 1 < argc ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_reverse_report( argv[ ++i ], html ); + } + } + else if( option == "--header" ) + { + if( i + 1 < argc ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_header_report( argv[ ++i ], html ); + } + } + else if( option == "--subset" ) + { + if( i + 1 < argc ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_subset_report( argv[ ++i ], track_sources, track_tests, html ); + } + } + else if( option == "--test" ) + { + if( i + 1 < argc ) + { + output_module_test_report( argv[ ++i ] ); + } + } + else if( option == "--cmake" ) + { + if( i + 1 < argc ) + { + output_module_cmake_report( argv[ ++i ] ); + } + } + else if( option == "--brief" ) + { + if( i + 1 < argc ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_brief_report( argv[ ++i ], track_sources, track_tests ); + } + } + else if( option == "--module-levels" ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_level_report( html ); + } + else if( option == "--module-overview" ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_overview_report( html ); + } + else if( option == "--module-weights" ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_module_weight_report( html ); + } + else if( option == "--list-dependencies" ) + { + enable_secondary( secondary, track_sources, track_tests ); + list_dependencies(); + } + else if( option == "--list-exceptions" ) + { + list_exceptions(); + } + else if( option == "--list-missing-headers" ) + { + list_missing_headers(); + } + else if( option == "--pkgconfig" ) + { + if( i + 2 < argc ) + { + std::string module = argv[ ++i ]; + std::string version = argv[ ++i ]; + + ++i; + + output_pkgconfig( module, version, argc - i, argv + i ); + } + else + { + std::cerr << "'" << option << "': missing module or version.\n"; + } + + break; + } + else if( option == "--subset-for" ) + { + if( i + 1 < argc ) + { + std::string module = argv[ ++i ]; + + enable_secondary( secondary, track_sources, track_tests ); + + std::set<std::string> headers; + add_module_headers( module, headers ); + + output_directory_subset_report( module, headers, html ); + } + else + { + std::cerr << "'" << option << "': missing argument.\n"; + } + + break; + } + else if( option == "--list-buildable-dependencies" ) + { + enable_secondary( secondary, true, false ); + list_buildable_dependencies(); + } + else if( option == "--capture-output" ) + { + std::cout.rdbuf( &tsb ); + } + else if( option == "--compare-output" ) + { + if( i + 1 < argc ) + { + std::string fn = argv[ ++i ]; + std::fstream is( fn.c_str() ); + + if( !is ) + { + std::cerr << option << " '" << fn << "': could not open file.\n"; + return 1; + } + + std::istreambuf_iterator<char> first( is ), last; + std::string fc( first, last ); + + if( fc != captured_output.str() ) + { + std::cerr << option << " '" << fn << "': output does not match; expected output:\n---\n" << fc << "---\n"; + return 1; + } + + std::cerr << option << " '" << fn << "': output matches.\n"; + captured_output.str( "" ); + } + else + { + std::cerr << "'" << option << "': missing argument.\n"; + return 1; + } + } + else if( s_modules.count( option ) ) + { + output_module_primary_report( option, html, track_sources, track_tests ); + } + else if( s_header_map.count( option ) ) + { + enable_secondary( secondary, track_sources, track_tests ); + output_header_report( option, html ); + } + else + { + std::cerr << "'" << option << "': not an option, module or header.\n"; + } + } + + if( html ) + { + output_html_footer( html_footer ); + } +} diff --git a/src/boost/tools/boostdep/test/Jamfile b/src/boost/tools/boostdep/test/Jamfile new file mode 100644 index 000000000..7695ca825 --- /dev/null +++ b/src/boost/tools/boostdep/test/Jamfile @@ -0,0 +1,12 @@ +# Copyright 2017 Peter Dimov +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +import testing ; + +path-constant ROOT : ../../.. ; +path-constant HERE : . ; + +run ../src/boostdep.cpp /boost//filesystem : --boost-root $(ROOT) --capture-output assert --compare-output $(HERE)/assert-primary.txt : : : assert-primary ; +run ../src/boostdep.cpp /boost//filesystem : --boost-root $(ROOT) --capture-output --secondary bind --compare-output $(HERE)/bind-secondary.txt : : : bind-secondary ; diff --git a/src/boost/tools/boostdep/test/assert-primary.txt b/src/boost/tools/boostdep/test/assert-primary.txt new file mode 100644 index 000000000..7ec4d066c --- /dev/null +++ b/src/boost/tools/boostdep/test/assert-primary.txt @@ -0,0 +1,11 @@ +Primary dependencies for assert: + +config: + <boost/config.hpp> + from <boost/assert.hpp> + from <boost/assert/source_location.hpp> + <boost/config/workaround.hpp> + from <boost/assert/source_location.hpp> + <boost/cstdint.hpp> + from <boost/assert/source_location.hpp> + diff --git a/src/boost/tools/boostdep/test/bind-secondary.txt b/src/boost/tools/boostdep/test/bind-secondary.txt new file mode 100644 index 000000000..d1b346fbe --- /dev/null +++ b/src/boost/tools/boostdep/test/bind-secondary.txt @@ -0,0 +1,7 @@ +Secondary dependencies for bind: + +core: + adds assert + adds static_assert + adds throw_exception + diff --git a/src/boost/tools/boostdep/test/utf8-test.zip b/src/boost/tools/boostdep/test/utf8-test.zip new file mode 100644 index 000000000..634b62530 Binary files /dev/null and b/src/boost/tools/boostdep/test/utf8-test.zip differ diff --git a/src/boost/tools/build/CONTRIBUTING.adoc b/src/boost/tools/build/CONTRIBUTING.adoc new file mode 100644 index 000000000..da590db5e --- /dev/null +++ b/src/boost/tools/build/CONTRIBUTING.adoc @@ -0,0 +1,174 @@ +// Copyright 2019-2020 Rene Rivera +// Copyright 2003, 2006 Vladimir Prus +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + += B2 contributor guidelines + +B2 is an open-source project. This means that we welcome and appreciate +all contributions -- be it ideas, bug reports, or patches. This document +contains guidelines which helps to assure that development goes on smoothly, and +changes are made quickly. + +The guidelines are not mandatory, and you can decide for yourself which one to +follow. But note, the 10 mins that you spare writing a comment, for example, +might lead to significantly longer delay for everyone. + +== Additional resources include + +=== The issue tracker + +https://github.com/bfgroup/b2/issues + +=== Discussion forums + +https://github.com/bfgroup/b2/discussions + +== BUGS and PATCHES + +Both bugs and patches can be submitted to the GitHub tracker. + +When reporting a bug, please try to provide the following information: + +* What you did. + * A minimal reproducible test case is very much appreciated. + * Shell script with some annotations is much better than verbose + description of the problem. + * A regression test is the best (see test/test_system.html). + +* What you got. + +* What you expected. + +* What version of B2 did you use. If possible, please try to test with the + main branch state. + +When submitting a patch, please: + +* Make a single patch for a single logical change +* Follow the policies and coding conventions below +* Send patches as pull requests to the main branch +* Provide a good PR message together with the patch + +The purpose of message serves to communicate what was changed, and *why*. +Without a good message, you might spend a lot of time later, wondering where +a strange piece of code came from and why it was necessary. + +The good message mentions each changed file and each rule/method, saying +what happened to it, and why. Consider, the following log message + +---- +Better direct request handling. + +* new/build-request.jam + (directly-requested-properties-adjuster): Redo. + +* new/targets.jam + (main-target.generate-really): Adjust properties here. + +* new/virtual-target.jam + (register-actual-name): New rule. + (virtual-target.actualize-no-scanner): Call the above, to detected bugs, + where two virtual target correspond to one Jam target name. +---- + +The messages for the last two files are good. They tell what was changed. +The change to the first file is clearly under-commented. + +It's okay to use terse messages for uninteresting changes, like ones induced +by interface changes elsewhere. + +== POLICIES + +=== Testing + +All serious changes must be tested. New rules must be tested by the module where +they are declared. The test system (link:test/test_system.html[test/test_system.html]) +should be used to verify user-observable behavior. + +=== Documentation + +It turns out that it's hard to have too much comments, but it's easy to have too +little. Please prepend each rule with a comment saying what the rule does and +what arguments mean. Stop for a minute and consider if the comment makes sense +for anybody else, and completely describes what the rules does. Generic phrases +like "adjusts properties" are really not enough. + +When applicable, make changes to the user documentation as well. + +== CODING CONVENTIONS + +1. All names of rules and variables are lowercase with "-" to separate + words. ++ +---- +rule call-me-ishmael ( ) ... +---- + +2. Names with dots in them are "intended globals". Ordinary globals use a + dot prefix: ++ +---- +.foobar +$(.foobar) +---- + +3. Pseudofunctions or associations are <parameter>.<property>: ++ +---- +$(argument).name = hello ; +$($(argument).name) +---- + +4. Class attribute names are prefixed with "self.": ++ +---- +self.x +$(self.x) +---- + +5. Builtin rules are called via their ALL_UPPERCASE_NAMES: ++ +---- +DEPENDS $(target) : $(sources) ; +---- + +6. Opening and closing braces go on separate lines: ++ +---- +if $(a) +{ + # +} +else +{ + # +} +---- + +== ENGINE + +Developing in the `b2` engine, the C++ part, requires two steps to be +effective: building the "stable" engine, and developing the +"in-progress" engine. + +What is the "stable" engine is up to you. It only refers to a build of the +engine you know is at a good working state. When you are at a point the +source is stable you can run `bootstrap.sh/bat` from the root. That will +create the `b2` executable at the root. You can then use this version to run +regular B2 builds as needed both within the B2 tree and in other projects. + +The "in-progress" engine is whatever build you happen to be testing at the +moment. There are two ways to build this be engine. You can either +(a) run `b2 b2` at the root, or (b) run `build.sh/bat` in `src/engine`. + +Using (a) will place, by default, a fully debuggable `b2` in the `.build` +directories. You can run that one from a debugger with full symbols and +stepping features. This should be the first choice in developing in the +engine. + +After using (a) to implement functionality you can use (b) to fully test +that functionality. The engine built from (b) is fully optimized and +is the one used, by default, by the test system when running in the `test` +directory. Before submitting patches it's required to build this way and +run the tests in at least one toolset version (but preferably at least two). diff --git a/src/boost/tools/build/Jamroot.jam b/src/boost/tools/build/Jamroot.jam new file mode 100644 index 000000000..cd6a49e86 --- /dev/null +++ b/src/boost/tools/build/Jamroot.jam @@ -0,0 +1,267 @@ +# Copyright 2019 Rene Rivera +# Copyright 2017 Steven Watanabe +# Copyright 2016 Vladimir Prus +# Copyright 2017 Edward Diener +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import "class" : new ; +import bison ; +import errors ; +import feature ; +import indirect ; +import os ; +# import package ; +import path ; +import set ; +import stage : add-install-dir ; +import toolset ; +import type ; +import virtual-target ; + +path-constant SELF : . ; + +project b2 + : build-dir .build + : requirements + <cxxstd>11 + <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1 + <toolset>msvc:<define>_CRT_NONSTDC_NO_DEPRECATE=1 + ; + +#| +Build the engine and its dependencies outside of the simple core build scripts. +This allows us to keep the core build scripts as simple as possible. And lets +us support more functionality for development of the engine core. +|# + +#| +Define custom yyacc tool. +|# + +feature.feature yyacc : : dependency free ; +toolset.flags yyacc TOOL <yyacc> ; + +exe yyacc + : src/engine/yyacc.cpp + : ; +explicit yyacc ; + +rule yyacc-gen ( project name : property-set : sources * ) +{ + local relevant = [ toolset.relevant $(__name__).yyacc ] ; + local a = [ new action $(sources[1]) : $(__name__).yyacc : [ $(property-set).add $(relevant) ] ] ; + local targets ; + for local n in $(name:S=).y $(name:S=)tab.h + { + targets += [ virtual-target.register + [ new file-target $(n) exact : [ type.type $(n) ] + : $(project) : $(a) + ] ] ; + } + return $(targets) ; +} + +actions yyacc bind TOOL +{ + "$(TOOL)" "$(<)" "$(>)" +} + +generate jamgram.y + : src/engine/jamgram.yy + : <generating-rule>@yyacc-gen + <location>src/engine + <yyacc>yyacc <dependency>yyacc + ; +explicit jamgram.y ; + +#| +Define grammar translation with Bison. +|# + +BISON = [ os.environ BISON ] ; +BISON ?= bison ; +local BISON_IN_PATH = [ path.glob [ os.executable-path ] : $(BISON[1]) $(BISON[1]).* ] ; + +rule grammar ( target : source : properties * ) +{ + # LOCATE on $(target) = $(source:D) ; + BISON on $(target) = $(BISON) ; +} + +actions grammar +{ + "$(BISON)" --yacc --defines -o "$(<[1])" "$(>)" +} + +if $(BISON_IN_PATH) +{ + make jamgram.cpp + : src/engine/jamgram.y + : @grammar + : <dependency>jamgram.y + <location>src/engine ; +} +else +{ + errors.warning "Bison generator program '$(BISON:J= )' not found. Skipping grammar build." ; + alias jamgram.cpp + : src/engine/jamgram.cpp ; +} +explicit jamgram.cpp ; + +#| +Define the b2 executable. Sources are based on platform. +TODO: Make platform specific source be no-ops when not needed. +|# + +local python-exe = [ MATCH --with-python=(.*) : [ modules.peek : ARGV ] ] ; +local python-include ; +local python-ldlib ; +if $(python-exe) +{ + python-include = [ SHELL + "$(python-exe) -c \"import sysconfig; print(sysconfig.get_path('include'));\"" + : strip-eol ] ; + python-libdir = [ SHELL + "$(python-exe) -c \"import sysconfig; import os.path; print(sysconfig.get_config_var('LIBDIR'));\"" + : strip-eol ] ; + python-ldlib = [ MATCH ".*(python.*)" : [ SHELL + "$(python-exe) -c \"import sysconfig; import os.path; print(sysconfig.get_config_var('LIBRARY'));\"" + : strip-eol ] ] ; + python-ldlib = $(python-ldlib:S=) ; + + lib python + : + : <name>$(python-ldlib) <search>$(python-libdir) + : + : <include>$(python-include) <define>HAVE_PYTHON ; +} +else +{ + alias python ; +} + +obj jamgram.obj + : jamgram.cpp + : <toolset>gcc:<cxxflags>-Wno-free-nonheap-object + ; +explicit jamgram.obj ; + +local b2_src = + [ glob src/engine/*.cpp src/engine/modules/*.cpp : + src/engine/*nt.cpp src/engine/*unix.cpp src/engine/*vms.cpp + src/engine/yyacc.cpp src/engine/mkjambase.cpp + src/engine/check_*.cpp + src/engine/jamgram.cpp + ] ; +local b2_src_nt = [ glob src/engine/*nt.cpp ] ; +local b2_src_unix = [ glob src/engine/*unix.cpp ] ; +local b2_src_vms = [ glob src/engine/*vms.cpp ] ; +local unix_os = [ set.difference [ feature.values <target-os> ] : windows vms ] ; + +exe b2 + : $(b2_src) + jamgram.obj + python + : <target-os>windows:<source>$(b2_src_nt) + <target-os>vms:<source>$(b2_src_vms) + <target-os>$(unix_os):<source>$(b2_src_unix) + <toolset>msvc:<find-static-library>kernel32 + <toolset>msvc:<find-static-library>advapi32 + <toolset>msvc:<find-static-library>user32 + ; +explicit b2 ; + +#| +Installation of the engine, build, and example files. +|# + +feature.feature b2-install-layout : standard portable : incidental propagated ; + +add-install-dir b2prefix-standard : : prefix ; +add-install-dir b2bindir-standard : : bindir ; +add-install-dir b2coredir-standard : boost-build/src : datarootdir ; +add-install-dir b2examplesdir-standard : boost-build/examples : datarootdir ; + +add-install-dir b2prefix-portable : : prefix ; +add-install-dir b2bindir-portable : : b2prefix-portable ; +add-install-dir b2coredir-portable : .b2 : b2prefix-portable ; +add-install-dir b2examplesdir-portable : .b2/examples : b2prefix-portable ; + +local ext = "" ; +if [ os.on-windows ] || [ os.on-vms ] +{ + ext = ".exe" ; +} + +install b2-engine + : $(SELF)/src/engine/b2$(ext) + : <b2-install-layout>standard:<location>(b2bindir-standard) + <b2-install-layout>portable:<location>(b2bindir-portable) + ; +explicit b2-engine ; + +local examples ; +for local e in [ glob-tree-ex $(SELF)/example : * : . .svn ] +{ + if [ CHECK_IF_FILE [ path.native $(e) ] ] + { + examples += $(e) ; + } +} +install b2-examples + : # What to install + $(examples) + : # What is the root of the directory + <install-source-root>example + # Which subdir of $prefix/share + <b2-install-layout>standard:<location>(b2examplesdir-standard) + <b2-install-layout>portable:<location>(b2examplesdir-portable) + ; +explicit b2-examples ; + +local .core-sources = + $(SELF)/src/build-system.jam + [ path.glob-tree $(SELF)/src/build : *.jam ] + [ path.glob-tree $(SELF)/src/contrib : *.jam ] + [ path.glob-tree $(SELF)/src/kernel : *.jam ] + [ path.glob-tree $(SELF)/src/options : *.jam ] + [ path.glob-tree $(SELF)/src/util : *.jam ] + [ path.glob-tree $(SELF)/src/tools : *.jam *.xml *.xsl *.doxyfile *.hpp doxproc.py ] + ; +if $(python-exe) +{ + .core-sources += + [ path.glob-tree $(SELF)/src/build : *.py ] + [ path.glob-tree $(SELF)/src/contrib : *.py ] + [ path.glob-tree $(SELF)/src/kernel : *.py ] + [ path.glob-tree $(SELF)/src/options : *.py ] + [ path.glob-tree $(SELF)/src/util : *.py ] + [ path.glob-tree $(SELF)/src/tools : *.py : doxproc.py ] + ; +} + +install b2-core + : # What to install + $(.core-sources) + : # What is the root of the directory + <install-source-root>src + # Which subdir of $prefix/share + <b2-install-layout>standard:<location>(b2coredir-standard) + <b2-install-layout>portable:<location>(b2coredir-portable) + ; +explicit b2-core ; + +#| +Only install example files when requested to avoid bloating install footprint. +|# +if --with-examples in [ modules.peek : ARGV ] +{ + alias install : b2-engine b2-core b2-examples ; +} +else +{ + alias install : b2-engine b2-core ; +} +explicit install ; diff --git a/src/boost/tools/build/LICENSE.txt b/src/boost/tools/build/LICENSE.txt new file mode 100644 index 000000000..36b7cd93c --- /dev/null +++ b/src/boost/tools/build/LICENSE.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/src/boost/tools/build/README.adoc b/src/boost/tools/build/README.adoc new file mode 100644 index 000000000..25bb454ad --- /dev/null +++ b/src/boost/tools/build/README.adoc @@ -0,0 +1,41 @@ += B2 + +B2 makes it easy to build C++ projects, everywhere. + +image:https://img.shields.io/badge/license-BSL%201.0-blue.svg["Boost Software License 1.0", link="LICENSE.txt"] +image:https://img.shields.io/github/languages/code-size/bfgroup/b2.svg["GitHub code size in bytes", link="https://github.com/bfgroup/b2"] + +== License + +Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +== Testing + +Continuously tested on: + +* FreeBSD Clang 7, 8, 9, 10, 11, 12 +* FreeBSD GCC 8, 9, 10, 11 +* Linux Clang 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 +* Linux GCC 5, 6, 7, 8, 9, 10, 11 +* macOS Xcode 11.2.1, 11.3, 11.3.1, 11.4.1, 11.5, 11.6, 11.7, 12.0.1, 12.1.1, 12.2, 12.3, 12.4, 12.5.1, 13.0, 13.1, 13.2.1 +* Windows MinGW 8.1.0 +* Windows VS 2013, 2015, 2017, 2019, 2022 +* Cygwin 3.1.7 x64 +* Ubuntu 20.04 GCC 9 (armhf, arm64, ppc64el) +* Debian 11 GCC 10 (armhf) + +image:https://img.shields.io/azure-devops/build/bfgroup/3a4e7a7e-c1b4-4e2f-9199-f52918ea06c6/3/main.svg?label=main&logo=azuredevops["Linux/Windows/macOS: main", link="https://dev.azure.com/bfgroup/B2"] +image:https://img.shields.io/appveyor/build/bfgroup/b2?logo=appveyor["Windows", link="https://ci.appveyor.com/project/bfgroup/b2"] +image:https://api.cirrus-ci.com/github/bfgroup/b2.svg?branch=release["FreeBSD: release", link="https://cirrus-ci.com/github/bfgroup/b2/release"] +image:https://api.cirrus-ci.com/github/bfgroup/b2.svg?branch=main["FreeBSD: main", link="https://cirrus-ci.com/github/bfgroup/b2/main"] + +NOTE: A C+\+11 capable compiler is needed to build the `b2` engine. But using +the `b2` engine and build system does not require C++11. + +== More + +See the link:https://www.bfgroup.xyz/b2/[website] for more information. + +See the link:CONTRIBUTING.adoc[guidelines for contributing] if you would like +to get involved in the development. diff --git a/src/boost/tools/build/azure-pipelines.yml b/src/boost/tools/build/azure-pipelines.yml new file mode 100644 index 000000000..66e888eff --- /dev/null +++ b/src/boost/tools/build/azure-pipelines.yml @@ -0,0 +1,427 @@ +# Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# Copyright Rene Ferdinand Rivera Morell 2015-2021. + +trigger: + branches: + include: + - main + - release + - feature/* + paths: + exclude: + - .circleci/* + - .cirrus.yml + - .drone.star + - .github/workflows/* + - .semaphore/* + - .travis.yml + - appveyor.yml +pr: + branches: + include: + - main + paths: + exclude: + - appveyor.yml + +variables: +- { name: linux_latest_vm, value: 'ubuntu-20.04' } +- { name: linux_latest_os, value: 'focal' } +- { name: windows_latest_vm, value: 'windows-2019' } +- { name: clang_latest, value: '13' } +- { name: gcc_latest, value: '11' } +- { name: vc_latest, value: 'vc142' } +- { name: vs_latest, value: '2019' } +- { name: xc_latest, value: '13.2.1' } +- { name: macos_latest_vm, value: 'macOS-11' } + + +stages: + +- stage: Core + jobs: + + - job: 'Linux_Default_Build' + strategy: + matrix: + Clang ${{variables.clang_latest}}: {TOOLSET: "clang-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}", LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: "${{variables.clang_latest}}", VM_IMAGE: "${{variables.linux_latest_vm}}"} + pool: + vmImage: $(VM_IMAGE) + steps: + - bash: | + set -e + uname -a + ./.ci/linux-cxx-install.sh + displayName: Install + - bash: | + set -e + ./src/engine/build.sh --verbose + displayName: Build + + - job: 'Linux_Clang_Only_Build' + strategy: + matrix: + Clang ${{variables.clang_latest}}: {TOOLSET: "clang-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}", LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: "${{variables.clang_latest}}", VM_IMAGE: "${{variables.linux_latest_vm}}"} + pool: + vmImage: $(VM_IMAGE) + steps: + - bash: | + set -e + uname -a + ./.ci/linux-cxx-install.sh + sudo apt remove gcc g++ + displayName: Install + - bash: | + set -e + ./src/engine/build.sh --verbose + displayName: Build + + - job: 'Linux_Latest' + strategy: + matrix: + GCC ${{variables.gcc_latest}}: {TOOLSET: "gcc-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}", VM_IMAGE: "${{variables.linux_latest_vm}}"} + Clang ${{variables.clang_latest}}: {TOOLSET: "clang-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}", LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: 13, VM_IMAGE: "${{variables.linux_latest_vm}}"} + pool: + vmImage: $(VM_IMAGE) + steps: + - template: .ci/azp-linux-test.yml + + - job: 'Windows_Latest' + strategy: + matrix: + VS ${{variables.vs_latest}}: {TOOLSET: "${{variables.vc_latest}}", TEST_TOOLSET: msvc, VM_IMAGE: "${{variables.windows_latest_vm}}"} + pool: + vmImage: $(VM_IMAGE) + steps: + - template: .ci/azp-windows-test.yml + + - job: 'macOS' + strategy: + matrix: + Xcode ${{variables.xc_latest}}: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app", VM_IMAGE: "${{variables.macos_latest_vm}}"} + pool: + vmImage: $(VM_IMAGE) + steps: + - template: .ci/azp-macos-test.yml + + - job: 'Linux_ASAN' + strategy: + matrix: + Clang ${{variables.clang_latest}}: {TOOLSET: "clang-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}", LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: 13, VM_IMAGE: "${{variables.linux_latest_vm}}"} + pool: + vmImage: $(VM_IMAGE) + continueOnError: 'true' + steps: + - template: .ci/azp-linux-asan-test.yml + +- stage: Compilers + dependsOn: [Core] + jobs: + + - job: 'Linux' + strategy: + matrix: + GCC 10: {TOOLSET: gcc-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-20.04'} + GCC 9: {TOOLSET: gcc-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-18.04'} + GCC 8: {TOOLSET: gcc-8, PACKAGES: g++-8, VM_IMAGE: 'ubuntu-18.04'} + GCC 7: {TOOLSET: gcc-7, PACKAGES: g++-7, VM_IMAGE: 'ubuntu-18.04'} + GCC 6: {TOOLSET: gcc-6, PACKAGES: g++-6, VM_IMAGE: 'ubuntu-18.04'} + GCC 5: {TOOLSET: gcc-5, PACKAGES: g++-5, VM_IMAGE: 'ubuntu-18.04'} + Clang 12: {TOOLSET: clang-12, PACKAGES: clang-12, LLVM_OS: focal, LLVM_VER: 12, VM_IMAGE: 'ubuntu-20.04'} + Clang 11: {TOOLSET: clang-11, PACKAGES: clang-11, LLVM_OS: focal, LLVM_VER: 11, VM_IMAGE: 'ubuntu-20.04'} + Clang 10: {TOOLSET: clang-10, PACKAGES: clang-10, LLVM_OS: bionic, LLVM_VER: 10, VM_IMAGE: 'ubuntu-18.04'} + Clang 9: {TOOLSET: clang-9, PACKAGES: clang-9, LLVM_OS: bionic, LLVM_VER: 9, VM_IMAGE: 'ubuntu-18.04'} + Clang 8: {TOOLSET: clang-8, PACKAGES: clang-8, LLVM_OS: bionic, LLVM_VER: 8, VM_IMAGE: 'ubuntu-18.04'} + Clang 7: {TOOLSET: clang-7, PACKAGES: clang-7, LLVM_OS: bionic, LLVM_VER: 7, VM_IMAGE: 'ubuntu-18.04'} + Clang 6: {TOOLSET: clang-6.0, PACKAGES: clang-6.0, LLVM_OS: bionic, LLVM_VER: 6.0, VM_IMAGE: 'ubuntu-18.04'} + Clang 5: {TOOLSET: clang-5.0, PACKAGES: clang-5.0, LLVM_OS: bionic, LLVM_VER: 5.0, VM_IMAGE: 'ubuntu-18.04'} + Clang 4: {TOOLSET: clang-4.0, PACKAGES: clang-4.0, LLVM_OS: xenial, LLVM_VER: 4.0, VM_IMAGE: 'ubuntu-18.04'} + pool: + vmImage: $(VM_IMAGE) + steps: + - template: .ci/azp-linux-test.yml + + - job: 'Windows' + strategy: + matrix: + VS 2022: {TOOLSET: vc143, TEST_TOOLSET: msvc, VM_IMAGE: 'windows-2022'} + MinGW 8.1.0: {TOOLSET: mingw, TEST_TOOLSET: gcc, VM_IMAGE: 'windows-2019'} + pool: + vmImage: $(VM_IMAGE) + steps: + - template: .ci/azp-windows-test.yml + + - job: 'macOS' + strategy: + matrix: + Xcode 13.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.1.app, VM_IMAGE: 'macOS-11'} + Xcode 13.0: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_13.0.app, VM_IMAGE: 'macOS-11'} + Xcode 12.4: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.4.app, VM_IMAGE: 'macOS-11'} + Xcode 12.3: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.3.app, VM_IMAGE: 'macOS-10.15'} + Xcode 12.2: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.2.app, VM_IMAGE: 'macOS-10.15'} + Xcode 12.1.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.1.1.app, VM_IMAGE: 'macOS-10.15'} + Xcode 12.0.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_12.0.1.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.7: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.7.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.6: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.6.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.5: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.5.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.4.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.4.1.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.3.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.3.1.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.3: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.3.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.2.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.2.1.app, VM_IMAGE: 'macOS-10.15'} + pool: + vmImage: $(VM_IMAGE) + steps: + - template: .ci/azp-macos-test.yml + +- stage: Boost_Dev + dependsOn: [Core] + jobs: + + - job: 'Dev_Linux' + displayName: 'Dev Linux' + pool: + vmImage: 'ubuntu-latest' + strategy: + matrix: + Master .. GCC ${{variables.gcc_latest}}: {BOOST_BRANCH: master, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + Master .. Clang ${{variables.clang_latest}}: {BOOST_BRANCH: master, TOOLSET: clang, CXX: "clang++-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}", LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: "${{variables.clang_latest}}"} + Develop .. GCC ${{variables.gcc_latest}}: {BOOST_BRANCH: develop, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + Develop .. Clang ${{variables.clang_latest}}: {BOOST_BRANCH: develop, TOOLSET: clang, CXX: "clang++-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}", LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: "${{variables.clang_latest}}"} + steps: + - bash: | + set -e + uname -a + ./.ci/linux-cxx-install.sh + displayName: Install + - bash: | + set -e + cd src/engine + ./build.sh ${TOOLSET} --cxx=${CXX} + ./b2 -v + displayName: Build + - bash: | + set -e + pushd ${HOME} + git clone --recursive https://github.com/boostorg/boost.git + cd boost + git checkout ${BOOST_BRANCH} + CXX_PATH=`which ${CXX}` + echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam + "${BUILD_SOURCESDIRECTORY}/src/engine/b2" "--boost-build=${BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=${TOOLSET} install + popd + displayName: Test + + - job: 'Dev_macOS' + displayName: 'Dev macOS' + pool: + vmImage: "${{variables.macos_latest_vm}}" + strategy: + matrix: + Master .. Xcode ${{variables.xc_latest}}: {BOOST_BRANCH: master, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + Develop .. Xcode ${{variables.xc_latest}}: {BOOST_BRANCH: develop, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + steps: + - bash: | + set -e + uname -a + sudo xcode-select -switch ${XCODE_APP} + which clang++ + displayName: Install + - bash: | + set -e + cd src/engine + ./build.sh ${TOOLSET} --cxx=${CXX} + ./b2 -v + displayName: Build + - bash: | + set -e + pushd ${HOME} + git clone --recursive https://github.com/boostorg/boost.git + cd boost + git checkout ${BOOST_BRANCH} + CXX_PATH=`which ${CXX}` + echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam + "${BUILD_SOURCESDIRECTORY}/src/engine/b2" "--boost-build=${BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=${TOOLSET} install + popd + displayName: Test + + - job: 'Dev_Windows' + displayName: 'Dev Windows' + pool: + vmImage: "${{variables.windows_latest_vm}}" + strategy: + matrix: + Master .. VS ${{variables.vs_latest}}: {BOOST_BRANCH: master, TOOLSET: "${{variables.vc_latest}}"} + Develop .. VS ${{variables.vs_latest}}: {BOOST_BRANCH: develop, TOOLSET: "${{variables.vc_latest}}"} + steps: + - powershell: | + cd src/engine + $env:path += ';' + ${env:CXX_PATH} + cmd /c build.bat ${env:TOOLSET} + ./b2.exe -v + cd ../.. + displayName: Build + - powershell: | + $env:HOME = "$env:HOMEDRIVE" + "$env:HOMEPATH" + cd "${env:HOME}" + git clone --recursive https://github.com/boostorg/boost.git + cd boost + $OriginalErrorActionPreference = $ErrorActionPreference + $ErrorActionPreference= 'silentlycontinue' + git checkout "${env:BOOST_BRANCH}" + $ErrorActionPreference = $OriginalErrorActionPreference + echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" + & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + displayName: Test + +- stage: Boost_Release + dependsOn: [Boost_Dev] + jobs: + + - job: 'Release_Linux' + displayName: 'Release Linux' + pool: + vmImage: 'ubuntu-latest' + strategy: + matrix: + 1.78.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.78.0, BOOST_VERSION_U: 1_78_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.77.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.77.0, BOOST_VERSION_U: 1_77_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.76.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.76.0, BOOST_VERSION_U: 1_76_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.75.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.75.0, BOOST_VERSION_U: 1_75_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.74.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.74.0, BOOST_VERSION_U: 1_74_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.73.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.73.0, BOOST_VERSION_U: 1_73_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.72.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.72.0, BOOST_VERSION_U: 1_72_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.71.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.71.0, BOOST_VERSION_U: 1_71_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.70.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.70.0, BOOST_VERSION_U: 1_70_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.69.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.69.0, BOOST_VERSION_U: 1_69_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.68.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.68.0, BOOST_VERSION_U: 1_68_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.67.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.67.0, BOOST_VERSION_U: 1_67_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + 1.66.0 .. GCC ${{variables.gcc_latest}}: {BOOST_VERSION: 1.66.0, BOOST_VERSION_U: 1_66_0, TOOLSET: gcc, CXX: "g++-${{variables.gcc_latest}}", PACKAGES: "g++-${{variables.gcc_latest}}"} + steps: + - bash: | + set -e + uname -a + ./.ci/linux-cxx-install.sh + displayName: Install + - bash: | + set -e + cd src/engine + ./build.sh ${TOOLSET} --cxx=${CXX} + ./b2 -v + displayName: Build + - bash: | + set -e + pushd ${HOME} + git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} + cd boost_${BOOST_VERSION_U} + CXX_PATH=`which ${CXX}` + echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam + "${BUILD_SOURCESDIRECTORY}/src/engine/b2" "--boost-build=${BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=${TOOLSET} install + popd + displayName: Test + + - job: 'Release_macOS' + displayName: 'Release macOS' + pool: + vmImage: "${{variables.macos_latest_vm}}" + strategy: + matrix: + 1.77.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.77.0, BOOST_VERSION_U: 1_77_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.76.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.76.0, BOOST_VERSION_U: 1_76_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.75.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.75.0, BOOST_VERSION_U: 1_75_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.74.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.74.0, BOOST_VERSION_U: 1_74_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.73.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.73.0, BOOST_VERSION_U: 1_73_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.72.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.72.0, BOOST_VERSION_U: 1_72_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.71.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.71.0, BOOST_VERSION_U: 1_71_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.70.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.70.0, BOOST_VERSION_U: 1_70_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.69.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.69.0, BOOST_VERSION_U: 1_69_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.68.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.68.0, BOOST_VERSION_U: 1_68_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.67.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.67.0, BOOST_VERSION_U: 1_67_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + 1.66.0 .. Xcode ${{variables.xc_latest}}: {BOOST_VERSION: 1.66.0, BOOST_VERSION_U: 1_66_0, TOOLSET: clang, CXX: clang++, XCODE_APP: "/Applications/Xcode_${{variables.xc_latest}}.app"} + steps: + - bash: | + set -e + uname -a + sudo xcode-select -switch ${XCODE_APP} + which clang++ + displayName: Install + - bash: | + set -e + cd src/engine + ./build.sh ${TOOLSET} --cxx=${CXX} + ./b2 -v + displayName: Build + - bash: | + set -e + pushd ${HOME} + git clone -b boost-${BOOST_VERSION} --single-branch --recurse-submodules https://github.com/boostorg/boost.git boost_${BOOST_VERSION_U} + cd boost_${BOOST_VERSION_U} + CXX_PATH=`which ${CXX}` + echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam + "${BUILD_SOURCESDIRECTORY}/src/engine/b2" "--boost-build=${BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=${TOOLSET} install + popd + displayName: Test + + - job: 'Release_Windows' + displayName: 'Release Windows' + pool: + vmImage: "${{variables.windows_latest_vm}}" + strategy: + matrix: + 1.77.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.77.0, BOOST_VERSION_U: 1_77_0, TOOLSET: "${{variables.vc_latest}}"} + 1.76.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.76.0, BOOST_VERSION_U: 1_76_0, TOOLSET: "${{variables.vc_latest}}"} + 1.75.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.75.0, BOOST_VERSION_U: 1_75_0, TOOLSET: "${{variables.vc_latest}}"} + 1.74.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.74.0, BOOST_VERSION_U: 1_74_0, TOOLSET: "${{variables.vc_latest}}"} + 1.73.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.73.0, BOOST_VERSION_U: 1_73_0, TOOLSET: "${{variables.vc_latest}}"} + 1.72.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.72.0, BOOST_VERSION_U: 1_72_0, TOOLSET: "${{variables.vc_latest}}"} + 1.71.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.71.0, BOOST_VERSION_U: 1_71_0, TOOLSET: "${{variables.vc_latest}}"} + 1.70.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.70.0, BOOST_VERSION_U: 1_70_0, TOOLSET: "${{variables.vc_latest}}"} + 1.69.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.69.0, BOOST_VERSION_U: 1_69_0, TOOLSET: "${{variables.vc_latest}}"} + 1.68.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.68.0, BOOST_VERSION_U: 1_68_0, TOOLSET: "${{variables.vc_latest}}"} + 1.67.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.67.0, BOOST_VERSION_U: 1_67_0, TOOLSET: "${{variables.vc_latest}}"} + 1.66.0 .. VS ${{variables.vs_latest}}: {BOOST_VERSION: 1.66.0, BOOST_VERSION_U: 1_66_0, TOOLSET: "${{variables.vc_latest}}"} + steps: + - powershell: | + cd src/engine + $env:path += ';' + ${env:CXX_PATH} + cmd /c build.bat ${env:TOOLSET} + ./b2.exe -v + cd ../.. + displayName: Build + - powershell: | + $env:HOME = "$env:HOMEDRIVE" + "$env:HOMEPATH" + cd "${env:HOME}" + git clone -b boost-${env:BOOST_VERSION} --single-branch --recurse-submodules https://github.com/boostorg/boost.git boost_${env:BOOST_VERSION_U} + cd "boost_${env:BOOST_VERSION_U}" + echo "using" "msvc" ";" > "${env:HOME}/user-config.jam" + & "${env:BUILD_SOURCESDIRECTORY}\src\engine\b2.exe" "--boost-build=${env:BUILD_SOURCESDIRECTORY}/src" --debug-configuration --build-type=complete --layout=versioned -n -d1 toolset=msvc install + displayName: Test + +- stage: Website_Update + dependsOn: [Core] + displayName: 'Website Update' + condition: in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/release') + jobs: + + - job: Documentation + pool: + vmImage: 'ubuntu-latest' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.x' + - task: UseRubyVersion@0 + - bash: | + pip install --user Pygments + pip install --user "https://github.com/bfgroup/jam_pygments/archive/master.zip" + gem install asciidoctor + gem install pygments.rb + echo "using asciidoctor ;" >> project-config.jam + ./bootstrap.sh + pushd doc + ../b2 --website-doc-dir=manual/$(Build.SourceBranchName) website + displayName: 'Build & Publish' + env: + GH_TOKEN: $(GitHubToken) diff --git a/src/boost/tools/build/boost-build.jam b/src/boost/tools/build/boost-build.jam new file mode 100644 index 000000000..d62860b6c --- /dev/null +++ b/src/boost/tools/build/boost-build.jam @@ -0,0 +1,8 @@ +# Copyright 2001, 2002 Dave Abrahams +# Copyright 2002 Rene Rivera +# Copyright 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +boost-build src/kernel ; diff --git a/src/boost/tools/build/bootstrap.bat b/src/boost/tools/build/bootstrap.bat new file mode 100644 index 000000000..2d51bdcd4 --- /dev/null +++ b/src/boost/tools/build/bootstrap.bat @@ -0,0 +1,39 @@ +@ECHO OFF + +REM Copyright (C) 2009 Vladimir Prus +REM Copyright 2019-2020 Rene Rivera +REM +REM Distributed under the Boost Software License, Version 1.0. +REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +:b2_build +ECHO Building the B2 engine.. +pushd src\engine +call .\build.bat %* +@ECHO OFF +popd +if exist ".\src\engine\b2.exe" ( + copy .\src\engine\b2.exe . > nul + goto :b2_built) +goto :b2_failure + + +:b2_built +ECHO. +ECHO Building is done. To install, run: +ECHO. +ECHO .\b2 --prefix=DIR install +ECHO. +goto :end + + +:b2_failure +ECHO. +ECHO Failed to build the B2 engine. +ECHO. +goto :end + + +:end +exit /b %ERRORLEVEL% diff --git a/src/boost/tools/build/bootstrap.sh b/src/boost/tools/build/bootstrap.sh new file mode 100755 index 000000000..fbf577e62 --- /dev/null +++ b/src/boost/tools/build/bootstrap.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright (C) 2005, 2006 Douglas Gregor. +# Copyright (C) 2006 The Trustees of Indiana University +# Copyright (C) 2010 Bryce Lelbach +# Copyright 2018-2020 Rene Rivera +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +# Build b2 +echo "Building the B2 engine.." +pwd=`pwd` +"${pwd}/src/engine/build.sh" "$@" +if [ $? -ne 0 ]; then + echo + echo "Failed to build the B2 engine." 1>&2 + exit 1 +fi +cd "$pwd" +cp "./src/engine/b2" . + +cat << EOF + +Building is done. To install, run: + + ./b2 install --prefix=<DIR> + +EOF diff --git a/src/boost/tools/build/bootstrap_vms.com b/src/boost/tools/build/bootstrap_vms.com new file mode 100644 index 000000000..3d8afaab9 --- /dev/null +++ b/src/boost/tools/build/bootstrap_vms.com @@ -0,0 +1,48 @@ +$! Copyright 2015 Artur Shepilko. +$! +$! Distributed under the Boost Software License, Version 1.0. +$! (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +$! +$ THIS_FACILITY = "BOOSTBUILD" +$ +$ verify = f$trnlnm("VERIFY_''THIS_FACILITY'") +$ save_verify = f$verify(verify) +$ save_default = f$env("DEFAULT") +$ +$ SAY := WRITE SYS$OUTPUT +$ +$ ON WARNING THEN CONTINUE +$ ON ERROR THEN GOTO ERROR +$ +$ SAY "I|Bootstrapping the build engine..." +$ +$ set def [.src.engine] +$ @build_vms /out=[--]bootstrap.log +$ +$ set def 'save_default' +$ +$ if f$search("[.src.engine.bin_vms]b2.exe") .eqs. "" then goto ERROR +$ copy [.src.engine.bin_vms]b2.exe [] +$ copy [.src.engine.bin_vms]bjam.exe [] +$ +$ SAY "I|Bootstrapping is done, B2.EXE created." +$ type sys$input +$DECK + + To build and install under ROOT: directory, run: + MC []B2 --prefix="/root" install + + Set B2 command: + B2 :== $ROOT:[BIN]B2.EXE + +$EOD +$ sts = 1 +$ +$EXIT: +$ set def 'save_default' +$ exit 'sts' + (0 * f$verify(save_verify)) + +$ERROR: +$ SAY "E|Failed to bootstrap build engine, see BOOTSTRAP.LOG for details." +$ sts = 4 +$ goto EXIT diff --git a/src/boost/tools/build/example/asciidoctor/example.adoc b/src/boost/tools/build/example/asciidoctor/example.adoc new file mode 100644 index 000000000..1a7675c12 --- /dev/null +++ b/src/boost/tools/build/example/asciidoctor/example.adoc @@ -0,0 +1,3 @@ += The Dangerous and Thrilling Documentation Chronicles + +This journey begins on a bleary Monday morning. diff --git a/src/boost/tools/build/example/asciidoctor/example_manpage.adoc b/src/boost/tools/build/example/asciidoctor/example_manpage.adoc new file mode 100644 index 000000000..88c535831 --- /dev/null +++ b/src/boost/tools/build/example/asciidoctor/example_manpage.adoc @@ -0,0 +1,38 @@ += b2(1) +Rene Rivera +v0.0.0 +:doctype: manpage +:manmanual: B2 +:mansource: B2 +:man-linkstyle: pass:[blue R < >] + +== NAME + +b2 - Boost Build + +== SYNOPSIS + +*b2* ['OPTION']... 'TARGET'... + +== OPTIONS + +*-n*:: + Print out what would get built. + +== EXIT STATUS + +*0*:: + Success. + +*1*:: + Failure. + +== RESOURCES + +*Project web site:* http://boost.org + +== COPYING + +Copyright \(C) 2017 {author}. + +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) \ No newline at end of file diff --git a/src/boost/tools/build/example/asciidoctor/jamroot.jam b/src/boost/tools/build/example/asciidoctor/jamroot.jam new file mode 100644 index 000000000..6b521acc5 --- /dev/null +++ b/src/boost/tools/build/example/asciidoctor/jamroot.jam @@ -0,0 +1,11 @@ +#| +Copyright 2017 Rene Rivera +Distributed under the Boost Software License, Version 1.0. (See +accompanying file LICENSE.txt or copy at +https://www.bfgroup.xyz/b2/LICENSE.txt) +|# + +html example_html : example.adoc ; +manpage example_1 : example_manpage.adoc ; +pdf example_pdf : example.adoc ; +docbook example_docbook : example.adoc ; diff --git a/src/boost/tools/build/example/boost-build.jam b/src/boost/tools/build/example/boost-build.jam new file mode 100644 index 000000000..21fe9782b --- /dev/null +++ b/src/boost/tools/build/example/boost-build.jam @@ -0,0 +1,6 @@ +# Copyright 2002, 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +boost-build ../src/kernel ; diff --git a/src/boost/tools/build/example/built_tool/Jamroot.jam b/src/boost/tools/build/example/built_tool/Jamroot.jam new file mode 100644 index 000000000..c458650e8 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/Jamroot.jam @@ -0,0 +1,8 @@ + +import feature ; + +feature.feature tblgen : : dependency free ; + +project built_tool ; + +build-project core ; \ No newline at end of file diff --git a/src/boost/tools/build/example/built_tool/core/Jamfile.jam b/src/boost/tools/build/example/built_tool/core/Jamfile.jam new file mode 100644 index 000000000..d4ec62382 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/core/Jamfile.jam @@ -0,0 +1,39 @@ + +import toolset ; +import os ; + +project : requirements <tblgen>../tblgen//tblgen ; + + +# Create a.c using a custom action defined below. +make a.c : a.td : @tblgen ; + +# Use a.c in executable. +exe core : core.cpp a.c ; + +# The action has to invoke the tool built in other +# parts of the project. The <tblgen> feature is used +# to specify the location of the tool, and the flags +# statement below make the full path to the tool +# available inside the action. +toolset.flags tblgen COMMAND <tblgen> ; + +# We generally want a.c to be rebuilt when the tool changes. +rule tblgen ( targets * : sources * : properties * ) +{ + DEPENDS $(targets) : [ on $(targets) return $(COMMAND) ] ; +} + +# The action that invokes the tool +actions tblgen bind COMMAND +{ + $(COMMAND:E=tblgen) > $(<) +} + +if [ os.name ] = VMS +{ + actions tblgen bind COMMAND + { + PIPE MCR $(COMMAND:WE=tblgen) > $(<:W) + } +} diff --git a/src/boost/tools/build/example/built_tool/core/a.td b/src/boost/tools/build/example/built_tool/core/a.td new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/example/built_tool/core/core.cpp b/src/boost/tools/build/example/built_tool/core/core.cpp new file mode 100644 index 000000000..31a133726 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/core/core.cpp @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} diff --git a/src/boost/tools/build/example/built_tool/readme.txt b/src/boost/tools/build/example/built_tool/readme.txt new file mode 100644 index 000000000..bbb9f9b3a --- /dev/null +++ b/src/boost/tools/build/example/built_tool/readme.txt @@ -0,0 +1,5 @@ + +This example shows how to build an executable and then use it +for generating other targets. The 'tblgen' subdirectory builds +a tool, while the 'core' subdirectory uses that tool. Refer +to core/Jamfile.jam for detailed comments. \ No newline at end of file diff --git a/src/boost/tools/build/example/built_tool/tblgen/Jamfile.jam b/src/boost/tools/build/example/built_tool/tblgen/Jamfile.jam new file mode 100644 index 000000000..af4906278 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/tblgen/Jamfile.jam @@ -0,0 +1,4 @@ + +project : requirements -<tblgen>tblgen//tblgen ; + +exe tblgen : tblgen.cpp ; \ No newline at end of file diff --git a/src/boost/tools/build/example/built_tool/tblgen/tblgen.cpp b/src/boost/tools/build/example/built_tool/tblgen/tblgen.cpp new file mode 100644 index 000000000..fbd058133 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/tblgen/tblgen.cpp @@ -0,0 +1,9 @@ + +#include <iostream> + +int main() +{ + std::cout << "int foo;\n"; + return 0; +} + diff --git a/src/boost/tools/build/example/complex-testing/compile-fail.cpp b/src/boost/tools/build/example/complex-testing/compile-fail.cpp new file mode 100644 index 000000000..aa07d4e67 --- /dev/null +++ b/src/boost/tools/build/example/complex-testing/compile-fail.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> +#include <cstdlib> + +int main() +{ + std::cout << "Bye!\n"; + return EXIT_FAILURE +} diff --git a/src/boost/tools/build/example/complex-testing/fail.cpp b/src/boost/tools/build/example/complex-testing/fail.cpp new file mode 100644 index 000000000..ce8e2a189 --- /dev/null +++ b/src/boost/tools/build/example/complex-testing/fail.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> +#include <cstdlib> + +int main() +{ + std::cout << "Bye!\n"; + return EXIT_FAILURE; +} diff --git a/src/boost/tools/build/example/complex-testing/jamroot.jam b/src/boost/tools/build/example/complex-testing/jamroot.jam new file mode 100644 index 000000000..c180a2f6c --- /dev/null +++ b/src/boost/tools/build/example/complex-testing/jamroot.jam @@ -0,0 +1,15 @@ +# Copyright 2016 Rene Rivera +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +using testing ; +import property-set ; +import path ; + +exe success : success.cpp ; + +run success : arg1 arg2 : : : success-a ; +run success : arg3 arg4 : : : success-b ; + +run post.cpp : : success-a : : post-a ; +run post.cpp : : success-b : : post-b ; diff --git a/src/boost/tools/build/example/complex-testing/post.cpp b/src/boost/tools/build/example/complex-testing/post.cpp new file mode 100644 index 000000000..d4af2afb4 --- /dev/null +++ b/src/boost/tools/build/example/complex-testing/post.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> +#include <cstdlib> + +int main(int argc, char *argv[]) +{ + std::cout << argv[1] << "\n"; + return EXIT_SUCCESS; +} diff --git a/src/boost/tools/build/example/complex-testing/success.cpp b/src/boost/tools/build/example/complex-testing/success.cpp new file mode 100644 index 000000000..30df302c4 --- /dev/null +++ b/src/boost/tools/build/example/complex-testing/success.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> +#include <cstdlib> + +int main(int argc, char *argv[]) +{ + std::cout << "Hi!\n"; + return EXIT_SUCCESS; +} diff --git a/src/boost/tools/build/example/customization/class.verbatim b/src/boost/tools/build/example/customization/class.verbatim new file mode 100644 index 000000000..5c0d7b803 --- /dev/null +++ b/src/boost/tools/build/example/customization/class.verbatim @@ -0,0 +1,7 @@ +class_template + +class %class_name% { +public: + %class_name%() {} + ~%class_name%() {} +}; \ No newline at end of file diff --git a/src/boost/tools/build/example/customization/codegen.cpp b/src/boost/tools/build/example/customization/codegen.cpp new file mode 100644 index 000000000..2c632e2d1 --- /dev/null +++ b/src/boost/tools/build/example/customization/codegen.cpp @@ -0,0 +1,36 @@ +// (C) Copyright Vladimir Prus, 2003 +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +// Please see 'usage.verbatim' file for usage notes. + +#include <iostream> +#include <string> +#include <cstring> +using std::cout; +using std::string; +using std::strlen; + +extern const char class_template[]; +extern const char usage[]; + +int main(int ac, char* av[]) +{ + if (av[1]) { + + string class_name = av[1]; + string s = class_template; + + string::size_type n; + while((n = s.find("%class_name%")) != string::npos) { + s.replace(n, strlen("%class_name%"), class_name); + } + std::cout << "Output is:\n"; + std::cout << s << "\n"; + return 0; + } else { + std::cout << usage << "\n"; + return 1; + } +} diff --git a/src/boost/tools/build/example/customization/inline_file.py b/src/boost/tools/build/example/customization/inline_file.py new file mode 100644 index 000000000..77cd8cb29 --- /dev/null +++ b/src/boost/tools/build/example/customization/inline_file.py @@ -0,0 +1,44 @@ +#!/usr/bin/python + +# Copyright 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import sys +from string import strip + +def quote_line(line): + + result = "" + + for i in line: + if (i == '\\'): + result = result + '\\\\' + elif (i == '\"'): + result = result + '\\\"' + elif (i != '\r' and i != '\n'): + result = result + i; + + return '\"' + result + '\\n\"' + +def quote_file(file): + result = "" + + for i in file.readlines(): + result = result + quote_line(i) + "\n" + + return result + +if len(sys.argv) < 3: + print "Usage: inline_file.py output_c_file file_to_include" +else: + output_c_file = sys.argv[1] + out_file = open(output_c_file, "w"); + + file_to_include = sys.argv[2] + + in_file = open(file_to_include, "r"); + variable_name = strip(in_file.readline()) + out_file.write("extern const char %s[] = {\n%s};\n\n" % (variable_name, quote_file(in_file))) + in_file.close() + out_file.close() diff --git a/src/boost/tools/build/example/customization/jamroot.jam b/src/boost/tools/build/example/customization/jamroot.jam new file mode 100644 index 000000000..3568213c7 --- /dev/null +++ b/src/boost/tools/build/example/customization/jamroot.jam @@ -0,0 +1,9 @@ +# Copyright 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import verbatim ; + +exe codegen : codegen.cpp class.verbatim usage.verbatim + t1.verbatim ; + diff --git a/src/boost/tools/build/example/customization/readme.txt b/src/boost/tools/build/example/customization/readme.txt new file mode 100644 index 000000000..6a799277a --- /dev/null +++ b/src/boost/tools/build/example/customization/readme.txt @@ -0,0 +1,11 @@ +Copyright 2003 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +This example show how to add a new target type and a new tool support to +B2. Please refer to extender manual for a complete description of this +example. + +Note that this example requires Python. If cygwin Python on Windows is to be +used, please go to "verbatim.jam" and follow instructions there. diff --git a/src/boost/tools/build/example/customization/t1.verbatim b/src/boost/tools/build/example/customization/t1.verbatim new file mode 100644 index 000000000..144540f29 --- /dev/null +++ b/src/boost/tools/build/example/customization/t1.verbatim @@ -0,0 +1,2 @@ +t1 +//###include "t2.verbatim" \ No newline at end of file diff --git a/src/boost/tools/build/example/customization/t2.verbatim b/src/boost/tools/build/example/customization/t2.verbatim new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/example/customization/usage.verbatim b/src/boost/tools/build/example/customization/usage.verbatim new file mode 100644 index 000000000..0fc4b4a37 --- /dev/null +++ b/src/boost/tools/build/example/customization/usage.verbatim @@ -0,0 +1,5 @@ +usage +Usage: codegen class_name + +This program takes a template of C++ code and replaces of all occurrences of +%class_name% with the passed 'class_name' parameter. \ No newline at end of file diff --git a/src/boost/tools/build/example/customization/verbatim.jam b/src/boost/tools/build/example/customization/verbatim.jam new file mode 100644 index 000000000..c529845df --- /dev/null +++ b/src/boost/tools/build/example/customization/verbatim.jam @@ -0,0 +1,61 @@ +# Copyright 2003, 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This file shows some of the primary customization mechanisms in B2 V2 +# and should serve as a basic for your own customization. +# Each part has a comment describing its purpose, and you can pick the parts +# which are relevant to your case, remove everything else, and then change names +# and actions to taste. + +import os ; + +# Declare a new target type. This allows B2 to do something sensible +# when targets with the .verbatim extension are found in sources. +import type ; +type.register VERBATIM : verbatim ; + +# Declare a dependency scanner for the new target type. The +# 'inline-file.py' script does not handle includes, so this is +# only for illustraction. +import scanner ; +# First, define a new class, derived from 'common-scanner', +# that class has all the interesting logic, and we only need +# to override the 'pattern' method which return regular +# expression to use when scanning. +class verbatim-scanner : common-scanner +{ + rule pattern ( ) + { + return "//###include[ ]*\"([^\"]*)\"" ; + } +} + +# Register the scanner class. The 'include' is +# the property which specifies the search path +# for includes. +scanner.register verbatim-scanner : include ; +# Assign the scanner class to the target type. +# Now, all .verbatim sources will be scanned. +# To test this, build the project, touch the +# t2.verbatim file and build again. +type.set-scanner VERBATIM : verbatim-scanner ; + +import generators ; +generators.register-standard verbatim.inline-file : VERBATIM : CPP ; + +# Note: To use Cygwin Python on Windows change the following line +# to "python inline_file.py $(<) $(>)" +# Also, make sure that "python" in in PATH. +actions inline-file +{ + "./inline_file.py" $(<) $(>) +} + +if [ os.name ] = VMS +{ + actions inline-file + { + python inline_file.py $(<:W) $(>:W) + } +} diff --git a/src/boost/tools/build/example/customization/verbatim.py b/src/boost/tools/build/example/customization/verbatim.py new file mode 100644 index 000000000..996577054 --- /dev/null +++ b/src/boost/tools/build/example/customization/verbatim.py @@ -0,0 +1,47 @@ +# Copyright 2010 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This file is only used with Python port of Boost.Build + +# This file shows some of the primary customization mechanisms in Boost.Build V2 +# and should serve as a basic for your own customization. +# Each part has a comment describing its purpose, and you can pick the parts +# which are relevant to your case, remove everything else, and then change names +# and actions to taste. + +# Declare a new target type. This allows Boost.Build to do something sensible +# when targets with the .verbatim extension are found in sources. +import b2.build.type as type +type.register("VERBATIM", ["verbatim"]) + +# Declare a dependency scanner for the new target type. The +# 'inline-file.py' script does not handle includes, so this is +# only for illustraction. +import b2.build.scanner as scanner; +# First, define a new class, derived from 'common-scanner', +# that class has all the interesting logic, and we only need +# to override the 'pattern' method which return regular +# expression to use when scanning. +class VerbatimScanner(scanner.CommonScanner): + + def pattern(self): + return "//###include[ ]*\"([^\"]*)\"" + +scanner.register(VerbatimScanner, ["include"]) +type.set_scanner("VERBATIM", VerbatimScanner) + +import b2.build.generators as generators + +generators.register_standard("verbatim.inline-file", + ["VERBATIM"], ["CPP"]) + +from b2.manager import get_manager + +get_manager().engine().register_action("verbatim.inline-file", +""" +./inline_file.py $(<) $(>) +""") + + + diff --git a/src/boost/tools/build/example/generate/README.txt b/src/boost/tools/build/example/generate/README.txt new file mode 100644 index 000000000..018cbb564 --- /dev/null +++ b/src/boost/tools/build/example/generate/README.txt @@ -0,0 +1,11 @@ +# Copyright 2007 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +This example shows the 'generate' rule, that allows you to construct target +using any arbitrary set of transformation and commands. + +The rule is similar to 'make' and 'notfile', but unlike those, you can operate +in terms of B2 'virtual targets', which is more flexible. + +Please consult the docs for more explanations. diff --git a/src/boost/tools/build/example/generate/a.cpp b/src/boost/tools/build/example/generate/a.cpp new file mode 100644 index 000000000..90dc5cc9b --- /dev/null +++ b/src/boost/tools/build/example/generate/a.cpp @@ -0,0 +1,10 @@ + +int main() +{ +} + +/* +Copyright 2007 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ diff --git a/src/boost/tools/build/example/generate/gen.jam b/src/boost/tools/build/example/generate/gen.jam new file mode 100644 index 000000000..73232aab5 --- /dev/null +++ b/src/boost/tools/build/example/generate/gen.jam @@ -0,0 +1,26 @@ + +import "class" : new ; +import common ; + +rule generate-example ( project name : property-set : sources * ) +{ + local result ; + for local s in $(sources) + { + #local source-name = [ $(s).name ] ; + #local source-action = [ $(s).action ] ; + #local source-properties = [ $(source-action).properties ] ; + + # Create a new action, that takes the source target and runs the + # 'common.copy' command on it. + local a = [ new non-scanning-action $(s) : common.copy : $(property-set) + ] ; + + # Create a target to represent the action result. Uses the target name + # passed here via the 'name' parameter and the same type and project as + # the source. + result += [ new file-target $(name) : [ $(s).type ] : $(project) : $(a) + ] ; + } + return $(result) ; +} \ No newline at end of file diff --git a/src/boost/tools/build/example/generate/gen.py b/src/boost/tools/build/example/generate/gen.py new file mode 100644 index 000000000..09ee15b43 --- /dev/null +++ b/src/boost/tools/build/example/generate/gen.py @@ -0,0 +1,16 @@ + +from b2.build.virtual_target import NonScanningAction, FileTarget + +def generate_example(project, name, ps, sources): + + result = [] + for s in sources: + + a = NonScanningAction([s], "common.copy", ps) + + # Create a target to represent the action result. Uses the target name + # passed here via the 'name' parameter and the same type and project as + # the source. + result.append(FileTarget(name, s.type(), project, a)) + + return result diff --git a/src/boost/tools/build/example/generate/jamroot.jam b/src/boost/tools/build/example/generate/jamroot.jam new file mode 100644 index 000000000..b190b322a --- /dev/null +++ b/src/boost/tools/build/example/generate/jamroot.jam @@ -0,0 +1,9 @@ +# Copyright 2007 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import generate ; + +import gen ; + +generate a2 : a.cpp : <generating-rule>@gen.generate-example ; diff --git a/src/boost/tools/build/example/generator/README.txt b/src/boost/tools/build/example/generator/README.txt new file mode 100644 index 000000000..f26a856a5 --- /dev/null +++ b/src/boost/tools/build/example/generator/README.txt @@ -0,0 +1,6 @@ +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +This example shows how to declare a new generator class. It is necessary when +generator's logic is more complex that just running a single tool. diff --git a/src/boost/tools/build/example/generator/foo.gci b/src/boost/tools/build/example/generator/foo.gci new file mode 100644 index 000000000..2ccc45c6c --- /dev/null +++ b/src/boost/tools/build/example/generator/foo.gci @@ -0,0 +1,10 @@ + +int main() +{ + return 0; +} +/* +Copyright 2006 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + */ diff --git a/src/boost/tools/build/example/generator/jamroot.jam b/src/boost/tools/build/example/generator/jamroot.jam new file mode 100644 index 000000000..b77c63ddb --- /dev/null +++ b/src/boost/tools/build/example/generator/jamroot.jam @@ -0,0 +1,6 @@ +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import soap ; +exe foo : foo.gci : <server>on ; diff --git a/src/boost/tools/build/example/generator/soap.jam b/src/boost/tools/build/example/generator/soap.jam new file mode 100644 index 000000000..d53f3a54d --- /dev/null +++ b/src/boost/tools/build/example/generator/soap.jam @@ -0,0 +1,86 @@ +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This is example of a fictional code generator tool. +# It accepts a single input of type '.gci' and produces +# either one or two outputs of type .cpp, depending +# on the value of the feature <server-mode> +# +# This example is loosely based on gSOAP code generator. + +import type ; +import generators ; +import feature ; +import common ; +import "class" : new ; +import os ; + +type.register GCI : gci ; + +feature.feature server : off on : incidental ; + +class soap-generator : generator +{ + import "class" : new ; + + rule __init__ ( * : * ) + { + generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; + } + + rule run ( project name ? : property-set : sources * ) + { + if ! $(sources[2]) + { + # Accept only single source. + local t = [ $(sources[1]).type ] ; + if $(t) = GCI + { + # The type is correct. + + # If no output name is specified, guess it from sources. + if ! $(name) + { + name = [ generator.determine-output-name $(sources) ] ; + } + + # Produce one output, using just copy. + local a = [ new action $(sources[1]) + : common.copy : $(property-set) ] ; + local t = [ new file-target $(name) : CPP : $(project) + : $(a) ] ; + + # If in server mode, create another output -- an + # empty file. If this were a real SOAP generator, we + # might have created a single action, and two targets + # both using that action. + local t2 ; + if [ $(property-set).get <server> ] = "on" + { + local a = [ new action : soap.touch : $(property-set) ] ; + t2 = [ new file-target $(name)_server : CPP : $(project) + : $(a) ] ; + } + return [ virtual-target.register $(t) ] + [ virtual-target.register $(t2) ] ; + } + } + } +} + +generators.register [ new soap-generator soap.soap : GCI : CPP ] ; + +TOUCH = [ common.file-touch-command ] ; +actions touch +{ + $(TOUCH) $(<) +} + +if [ os.name ] = VMS +{ + actions touch + { + $(TOUCH) $(<:W) + } +} diff --git a/src/boost/tools/build/example/gettext/jamfile.jam b/src/boost/tools/build/example/gettext/jamfile.jam new file mode 100644 index 000000000..c2a5e9bef --- /dev/null +++ b/src/boost/tools/build/example/gettext/jamfile.jam @@ -0,0 +1,26 @@ +# Copyright 2003, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +# Declare a main target. +exe main : main.cpp ; + +# Declare an action for updating translations +# After changing main.cpp, invocation of +# +# bjam update-russian +# +# will update translations in russian.po +gettext.update update-russian : russian.po main ; + +# Compiled message catalog. +gettext.catalog russian : russian.po ; + +# A stage rule which installs message catalog to the +# location gettext expects. +stage messages-russian : russian + : <location>messages/ru_RU.KOI8-R/LC_MESSAGES + <name>main.mo + ; + diff --git a/src/boost/tools/build/example/gettext/jamroot.jam b/src/boost/tools/build/example/gettext/jamroot.jam new file mode 100644 index 000000000..14f87bb78 --- /dev/null +++ b/src/boost/tools/build/example/gettext/jamroot.jam @@ -0,0 +1,6 @@ +# Copyright 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +using gettext ; diff --git a/src/boost/tools/build/example/gettext/main.cpp b/src/boost/tools/build/example/gettext/main.cpp new file mode 100644 index 000000000..c44d02a81 --- /dev/null +++ b/src/boost/tools/build/example/gettext/main.cpp @@ -0,0 +1,28 @@ +// Copyright Vladimir Prus 2003. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#include <locale.h> +#include <libintl.h> +#define i18n(s) gettext(s) + +#include <iostream> +using namespace std; + +int main() +{ + // Specify that translations are stored in directory + // "messages". + bindtextdomain("main", "messages"); + textdomain("main"); + + // Switch to russian locale. + setlocale(LC_MESSAGES, "ru_RU.KOI8-R"); + + // Output localized message. + std::cout << i18n("hello") << "\n"; + + return 0; +} diff --git a/src/boost/tools/build/example/gettext/readme.txt b/src/boost/tools/build/example/gettext/readme.txt new file mode 100644 index 000000000..097e49b69 --- /dev/null +++ b/src/boost/tools/build/example/gettext/readme.txt @@ -0,0 +1,24 @@ +Copyright 2003 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +This example shows how it is possible to use GNU gettext utilities with +B2. + +A simple translation file is compiled and installed as message catalog for +russian. The main application explicitly switches to russian locale and outputs +the translation of "hello". + +To test: + + bjam + bin/gcc/debug/main + +To test even more: + + - add more localized strings to "main.cpp" + - run "bjam update-russian" + - edit "russian.po" + - run bjam + - run "main" diff --git a/src/boost/tools/build/example/gettext/russian.po b/src/boost/tools/build/example/gettext/russian.po new file mode 100644 index 000000000..daa7121c3 --- /dev/null +++ b/src/boost/tools/build/example/gettext/russian.po @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-07-01 15:45+0400\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=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: main.cpp:16 +msgid "hello" +msgstr "international hello" diff --git a/src/boost/tools/build/example/hello/hello.cpp b/src/boost/tools/build/example/hello/hello.cpp new file mode 100644 index 000000000..888e78b1c --- /dev/null +++ b/src/boost/tools/build/example/hello/hello.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2003 Vladimir Prus +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +// tag::source[] +#include <iostream> + +int main() +{ + std::cout << "Hello!\n"; +} +// end::source[] diff --git a/src/boost/tools/build/example/hello/jamroot.jam b/src/boost/tools/build/example/hello/jamroot.jam new file mode 100644 index 000000000..672ec02e9 --- /dev/null +++ b/src/boost/tools/build/example/hello/jamroot.jam @@ -0,0 +1 @@ +exe hello : hello.cpp ; diff --git a/src/boost/tools/build/example/hello/readme.adoc b/src/boost/tools/build/example/hello/readme.adoc new file mode 100644 index 000000000..d69f074e6 --- /dev/null +++ b/src/boost/tools/build/example/hello/readme.adoc @@ -0,0 +1,46 @@ +//// +Copyright 2008 Jurko Gospodnetic +Copyright 2017 Rene Rivera +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +//// + += Hello + +This example shows a very basic Boost Build project set up so it compiles a +single executable from a single source file: + +.`hello.cpp` +[source,cpp] +---- +include::../../example/hello/hello.cpp[tag=source] +---- + +Our `jamroot.jam` is minimal and only specifies one `exe` target for the +program: + +.`jamroot.jam` +[source,jam] +---- +include::jamroot.jam[] +---- + +Building the example yields: + +[source,bash] +---- +> cd /example/hello +> b2 +...found 8 targets... +...updating 4 targets... +common.mkdir bin/clang-darwin-4.2.1 +common.mkdir bin/clang-darwin-4.2.1/debug +clang-darwin.compile.c++ bin/clang-darwin-4.2.1/debug/hello.o +clang-darwin.link bin/clang-darwin-4.2.1/debug/hello +...updated 4 targets... +> bin/clang-darwin-4.2.1/debug/hello +Hello! +---- + +NOTE: The actual paths in the `bin` sub-directory will depend on your +toolset. diff --git a/src/boost/tools/build/example/libraries/app/app.cpp b/src/boost/tools/build/example/libraries/app/app.cpp new file mode 100644 index 000000000..5e5d49fc0 --- /dev/null +++ b/src/boost/tools/build/example/libraries/app/app.cpp @@ -0,0 +1,12 @@ +// Copyright (c) 2003 Vladimir Prus +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <lib1.h> + +int main() +{ + foo(); +} diff --git a/src/boost/tools/build/example/libraries/app/jamfile.jam b/src/boost/tools/build/example/libraries/app/jamfile.jam new file mode 100644 index 000000000..f91cd05d0 --- /dev/null +++ b/src/boost/tools/build/example/libraries/app/jamfile.jam @@ -0,0 +1,9 @@ +# Copyright 2002, 2003, 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +# Declare a executable file, which uses a library. Note that +# includes that for library will be automatically used +# when compiling 'app.cpp' +exe app : app.cpp /library-example/foo//bar ; diff --git a/src/boost/tools/build/example/libraries/jamroot.jam b/src/boost/tools/build/example/libraries/jamroot.jam new file mode 100644 index 000000000..5e0dc4814 --- /dev/null +++ b/src/boost/tools/build/example/libraries/jamroot.jam @@ -0,0 +1,4 @@ + +use-project /library-example/foo : util/foo ; + +build-project app ; diff --git a/src/boost/tools/build/example/libraries/util/foo/bar.cpp b/src/boost/tools/build/example/libraries/util/foo/bar.cpp new file mode 100644 index 000000000..2d6eb730f --- /dev/null +++ b/src/boost/tools/build/example/libraries/util/foo/bar.cpp @@ -0,0 +1,10 @@ +// Copyright (c) 2003 Vladimir Prus +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void foo() {} diff --git a/src/boost/tools/build/example/libraries/util/foo/include/lib1.h b/src/boost/tools/build/example/libraries/util/foo/include/lib1.h new file mode 100644 index 000000000..9b0f98a5f --- /dev/null +++ b/src/boost/tools/build/example/libraries/util/foo/include/lib1.h @@ -0,0 +1,7 @@ +// Copyright (c) 2003 Vladimir Prus +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +void foo(); diff --git a/src/boost/tools/build/example/libraries/util/foo/jamfile.jam b/src/boost/tools/build/example/libraries/util/foo/jamfile.jam new file mode 100644 index 000000000..6741b1ca3 --- /dev/null +++ b/src/boost/tools/build/example/libraries/util/foo/jamfile.jam @@ -0,0 +1,9 @@ +# Copyright 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +project + : usage-requirements <include>include ; + +lib bar : bar.cpp ; diff --git a/src/boost/tools/build/example/make/foo.py b/src/boost/tools/build/example/make/foo.py new file mode 100644 index 000000000..e4c0b824a --- /dev/null +++ b/src/boost/tools/build/example/make/foo.py @@ -0,0 +1,2 @@ +import sys +open(sys.argv[2], "w").write(open(sys.argv[1]).read()) diff --git a/src/boost/tools/build/example/make/jamroot.jam b/src/boost/tools/build/example/make/jamroot.jam new file mode 100644 index 000000000..3f5ec5b56 --- /dev/null +++ b/src/boost/tools/build/example/make/jamroot.jam @@ -0,0 +1,22 @@ +import feature ; +import toolset ; +import os ; + +path-constant HERE : . ; +make main.cpp : main_cpp.pro : @do-something ; + +feature.feature example.python.interpreter : : free ; + +toolset.flags do-something PYTHON : <example.python.interpreter> ; +actions do-something +{ + "$(PYTHON:E=python)" "$(HERE)/foo.py" "$(>)" "$(<)" +} + +if [ os.name ] = VMS +{ + actions do-something + { + $(PYTHON:E=python) $(HERE:W)foo.py $(>:W) $(<:W) + } +} diff --git a/src/boost/tools/build/example/make/main_cpp.pro b/src/boost/tools/build/example/make/main_cpp.pro new file mode 100644 index 000000000..237c8ce18 --- /dev/null +++ b/src/boost/tools/build/example/make/main_cpp.pro @@ -0,0 +1 @@ +int main() {} diff --git a/src/boost/tools/build/example/make/readme.txt b/src/boost/tools/build/example/make/readme.txt new file mode 100644 index 000000000..333c55a71 --- /dev/null +++ b/src/boost/tools/build/example/make/readme.txt @@ -0,0 +1,7 @@ +Copyright 2002, 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +Example of using custom command to create one file from another, using the +built-in 'make' rule. diff --git a/src/boost/tools/build/example/named-install-dirs/a b/src/boost/tools/build/example/named-install-dirs/a new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/example/named-install-dirs/build.jam b/src/boost/tools/build/example/named-install-dirs/build.jam new file mode 100644 index 000000000..00fe90128 --- /dev/null +++ b/src/boost/tools/build/example/named-install-dirs/build.jam @@ -0,0 +1,54 @@ +# showcasing several default install directories +install a1 : a : <location>(bindir) ; +install a2 : a : <location>(libdir)/a2 ; +install (sbindir)/a3 : a ; + +# using a custom prefix; the file will be installed into foo/bar/bin/a4 +install (bindir)/a4 : a : <install-prefix>foo/bar ; + +# this one deduces installed package name to be the basename of the project +# directory, so e.g. on Linux the file will be installed installed into +# /usr/local/share/doc/<name of project's directory>/a5 +install (docdir)/a5 : a : <install-prefix>bar/baz ; + +# use a custom named directory; its default on Linux is /usr/local/share/xyz/ +import stage ; +stage.add-install-dir foodir : xyz : datadir ; +install (foodir)/a6 : a ; + + +# another custom named directory, this one appends package name like docdir; +# so, e.g. on Linux it defaults to /usr/local/lib/named-install-dirs +stage.add-install-dir privatedir : "" : libdir : package-suffix ; +install (privatedir)/a7 : a ; + +# using stage.get-package-name +make a8 : a : @write-dirs : <staging-prefix>p/q/r <install-bindir>/bin ; + +rule write-dirs ( target : sources * : properties * ) +{ + import property-set ; + import print ; + local ps = [ property-set.create $(properties) ] ; + local pn = [ stage.get-package-name $(ps) ] ; + print.output $(target) ; + print.text + [ stage.get-dir docdir : $(ps) : $(pn) ] + [ stage.get-dir docdir : $(ps) : $(pn) : staged ] + [ stage.get-dir docdir : $(ps) : $(pn) : relative ] + [ stage.get-dir docdir : $(ps) : $(pn) : relative staged ] + [ stage.get-dir bindir : $(ps) : $(pn) : relative ] + : overwrite + ; +} + +# using staging prefix; on Linux installs into q/r/s/share/a9 +install (datarootdir)/a9 : a : <staging-prefix>q/r/s ; + + +build-project x ; + +# Copyright 2020 Dmitry Arkhipov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) diff --git a/src/boost/tools/build/example/named-install-dirs/x/build.jam b/src/boost/tools/build/example/named-install-dirs/x/build.jam new file mode 100644 index 000000000..ceb409242 --- /dev/null +++ b/src/boost/tools/build/example/named-install-dirs/x/build.jam @@ -0,0 +1,5 @@ +# this subproject showcases installed package name deduction + +project subx ; +build-project y ; +build-project z ; diff --git a/src/boost/tools/build/example/named-install-dirs/x/y/build.jam b/src/boost/tools/build/example/named-install-dirs/x/y/build.jam new file mode 100644 index 000000000..69e52d1dc --- /dev/null +++ b/src/boost/tools/build/example/named-install-dirs/x/y/build.jam @@ -0,0 +1,9 @@ +# this subproject doesn't have a name, so its default package name is deduced +# from its parent + +install (docdir)/y1 : ../../a ; + +# Copyright 2020 Dmitry Arkhipov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) diff --git a/src/boost/tools/build/example/named-install-dirs/x/z/build.jam b/src/boost/tools/build/example/named-install-dirs/x/z/build.jam new file mode 100644 index 000000000..5eaf76a5a --- /dev/null +++ b/src/boost/tools/build/example/named-install-dirs/x/z/build.jam @@ -0,0 +1,11 @@ +# this subproject does have a name, so its name is used as its default package +# name + +project subz ; + +install (docdir)/z1 : ../../a ; + +# Copyright 2020 Dmitry Arkhipov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) diff --git a/src/boost/tools/build/example/pch-multi/include/extra/meta.hpp b/src/boost/tools/build/example/pch-multi/include/extra/meta.hpp new file mode 100644 index 000000000..6a85b0886 --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/include/extra/meta.hpp @@ -0,0 +1,17 @@ +/* + Copyright Rene Rivera 2019 + + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef B2_EXAMPLE_PCH_MULTI_EXTRA_META_HPP +#define B2_EXAMPLE_PCH_MULTI_EXTRA_META_HPP + +#include <type_traits> +#include <functional> +#include <typeindex> +#include <tuple> + +#endif diff --git a/src/boost/tools/build/example/pch-multi/include/pch.hpp b/src/boost/tools/build/example/pch-multi/include/pch.hpp new file mode 100644 index 000000000..8f05cc43d --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/include/pch.hpp @@ -0,0 +1,19 @@ +/* Copyright 2006 Vladimir Prus + + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifdef BOOST_BUILD_PCH_ENABLED + +#ifdef FOO2 +int bar(); +#endif + +class TestClass { +public: + TestClass(int, int) {} +}; + +#endif diff --git a/src/boost/tools/build/example/pch-multi/include/std.hpp b/src/boost/tools/build/example/pch-multi/include/std.hpp new file mode 100644 index 000000000..89e76bf6a --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/include/std.hpp @@ -0,0 +1,16 @@ +/* + Copyright Rene Rivera 2019 + + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef B2_EXAMPLE_PCH_MULTI_STD_HPP +#define B2_EXAMPLE_PCH_MULTI_STD_HPP + +#include <iostream> +#include <vector> +#include <algorithm> + +#endif diff --git a/src/boost/tools/build/example/pch-multi/jamroot.jam b/src/boost/tools/build/example/pch-multi/jamroot.jam new file mode 100644 index 000000000..6af21ff12 --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/jamroot.jam @@ -0,0 +1,30 @@ +# Copyright 2006 Ilya Sokolov +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# pch ########################################################################## + +import pch ; + +local pchs ; +for local hpp in [ glob-tree *.hpp ] +{ + cpp-pch $(hpp:B) : $(hpp) : <include>include ; + explicit $(hpp:B) ; + pchs += $(hpp:B) ; +} +alias headers : $(pchs) ; + +# exe ########################################################################## + +exe hello_world + : # sources + headers + source/hello_world.cpp + : # requirements + <include>include + : # default build + : # usage requirements + ; diff --git a/src/boost/tools/build/example/pch-multi/source/hello_world.cpp b/src/boost/tools/build/example/pch-multi/source/hello_world.cpp new file mode 100644 index 000000000..885208c1a --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/source/hello_world.cpp @@ -0,0 +1,17 @@ +/* Copyright 2006 Ilya Sokolov + Copyright 2006 Vladimir Prus + + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE.txt or copy at + https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#include <pch.hpp> +#include <std.hpp> +#include <extra/meta.hpp> + +int main() +{ + TestClass c(1, 2); + return 0; +} diff --git a/src/boost/tools/build/example/pch/include/pch.hpp b/src/boost/tools/build/example/pch/include/pch.hpp new file mode 100644 index 000000000..8f05cc43d --- /dev/null +++ b/src/boost/tools/build/example/pch/include/pch.hpp @@ -0,0 +1,19 @@ +/* Copyright 2006 Vladimir Prus + + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifdef BOOST_BUILD_PCH_ENABLED + +#ifdef FOO2 +int bar(); +#endif + +class TestClass { +public: + TestClass(int, int) {} +}; + +#endif diff --git a/src/boost/tools/build/example/pch/jamroot.jam b/src/boost/tools/build/example/pch/jamroot.jam new file mode 100644 index 000000000..ad6595567 --- /dev/null +++ b/src/boost/tools/build/example/pch/jamroot.jam @@ -0,0 +1,29 @@ +# Copyright 2006 Ilya Sokolov +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# pch ########################################################################## + +import pch ; + +cpp-pch pch + : # sources + include/pch.hpp + : # requirements + <include>include + ; +explicit pch ; + +# exe ########################################################################## + +exe hello_world + : # sources + pch + source/hello_world.cpp + : # requirements + <include>include + : # default build + : # usage requirements + ; diff --git a/src/boost/tools/build/example/pch/source/hello_world.cpp b/src/boost/tools/build/example/pch/source/hello_world.cpp new file mode 100644 index 000000000..db8b91f2d --- /dev/null +++ b/src/boost/tools/build/example/pch/source/hello_world.cpp @@ -0,0 +1,15 @@ +/* Copyright 2006 Ilya Sokolov + Copyright 2006 Vladimir Prus + + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE.txt or copy at + https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#include <pch.hpp> + +int main() +{ + TestClass c(1, 2); + return 0; +} diff --git a/src/boost/tools/build/example/pkg-config/debug-packages/debugged.pc b/src/boost/tools/build/example/pkg-config/debug-packages/debugged.pc new file mode 100644 index 000000000..8b2d744ef --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/debug-packages/debugged.pc @@ -0,0 +1,4 @@ +Name: debugged +Version: 0.1 +Description: A package with separate debug version (debug version) +Cflags: -DVARIANT=\"DEBUG\" diff --git a/src/boost/tools/build/example/pkg-config/jamroot.jam b/src/boost/tools/build/example/pkg-config/jamroot.jam new file mode 100644 index 000000000..ca945f9e3 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/jamroot.jam @@ -0,0 +1,104 @@ +#| +Copyright 2019 Dmitry Arkhipov +Distributed under the Boost Software License, Version 1.0. (See +accompanying file LICENSE.txt or copy at +https://www.bfgroup.xyz/b2/LICENSE.txt) +|# + + +using pkg-config : : : <libdir>packages ; +using pkg-config : debug : : <libdir>packages <path>debug-packages ; + +import common ; +import pkg-config ; +import property-set ; +import testing ; +import version ; + + +project : requirements <variant>debug:<pkg-config>debug ; + + +pkg-config.import debugged ; +pkg-config.import foobar : requirements <version>>=0.3 ; +pkg-config.import mangled : requirements <conditional>@mangle-name ; + +versioned = + [ pkg-config.import versioned + : usage-requirements <conditional>@versioned-api + ] ; + +with-var = + [ pkg-config.import with-var + : usage-requirements <conditional>@var-to-define + ] ; + + +# test if a package is found at all +run test1.cpp foobar ; + +# test if conditional requirement is applied +run test2.cpp mangled + : target-name test2-1 + : requirements <threading>single + : args SINGLE + ; + +run test2.cpp mangled + : target-name test2-2 + : requirements <threading>multi + : args MULTI + ; + +# test if pkg-config configuration is properly inferred from property set +run test3.cpp debugged + : target-name test3-1 + : requirements <variant>release + : args RELEASE + ; + +run test3.cpp debugged + : target-name test3-2 + : requirements <variant>debug + : args DEBUG + ; + +# test use of version method of pkg-config targets +run test4.cpp versioned ; + +# test use of variable method of pkg-config targets +run test5.cpp with-var ; + + +rule mangle-name ( props * ) { + import feature ; + local name = + [ common.format-name + <base> <threading> + : mangled + : "" + : [ property-set.create $(props) ] + ] ; + return <name>$(name) ; +} + + +rule versioned-api ( props * ) { + local ps = [ property-set.create $(props) ] ; + local version = [ $(versioned).version $(ps) ] ; + if [ version.version-less $(version) : 2 ] + { + return <define>VERSIONED_API=1 ; + } + else + { + return <define>VERSIONED_API=2 ; + } +} + + +rule var-to-define ( props * ) { + local ps = [ property-set.create $(props) ] ; + local qwerty = [ $(with-var).variable qwerty : $(ps) ] ; + return <define>QWERTY=\\\"$(qwerty)\\\" ; +} diff --git a/src/boost/tools/build/example/pkg-config/packages/debugged.pc b/src/boost/tools/build/example/pkg-config/packages/debugged.pc new file mode 100644 index 000000000..b22e10d8b --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/packages/debugged.pc @@ -0,0 +1,4 @@ +Name: debugged +Version: 0.1 +Description: A package with separate debug version (release version) +Cflags: -DVARIANT=\"RELEASE\" diff --git a/src/boost/tools/build/example/pkg-config/packages/foobar.pc b/src/boost/tools/build/example/pkg-config/packages/foobar.pc new file mode 100644 index 000000000..f62cfc820 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/packages/foobar.pc @@ -0,0 +1,4 @@ +Name: foobar +Version: 0.3 +Description: The bar for your foo +Cflags: -DQWERTY=\"uiop\" diff --git a/src/boost/tools/build/example/pkg-config/packages/mangled-mt.pc b/src/boost/tools/build/example/pkg-config/packages/mangled-mt.pc new file mode 100644 index 000000000..107b4d3d3 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/packages/mangled-mt.pc @@ -0,0 +1,4 @@ +Name: mangled +Version: 0.1 +Description: A package with mangled name (multi-threaded version) +Cflags: -DTHREADING=\"MULTI\" diff --git a/src/boost/tools/build/example/pkg-config/packages/mangled.pc b/src/boost/tools/build/example/pkg-config/packages/mangled.pc new file mode 100644 index 000000000..76976ecc1 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/packages/mangled.pc @@ -0,0 +1,4 @@ +Name: mangled +Version: 0.1 +Description: A package with mangled name (single-threaded version) +Cflags: -DTHREADING=\"SINGLE\" diff --git a/src/boost/tools/build/example/pkg-config/packages/versioned.pc b/src/boost/tools/build/example/pkg-config/packages/versioned.pc new file mode 100644 index 000000000..701f35146 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/packages/versioned.pc @@ -0,0 +1,3 @@ +Name: versioned +Version: 4.2 +Description: A package with versioned API diff --git a/src/boost/tools/build/example/pkg-config/packages/with-var.pc b/src/boost/tools/build/example/pkg-config/packages/with-var.pc new file mode 100644 index 000000000..4b3e2e558 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/packages/with-var.pc @@ -0,0 +1,4 @@ +qwerty=UIOP +Name: with-var +Version: 0.1 +Description: A package that defines a custom variable diff --git a/src/boost/tools/build/example/pkg-config/test1.cpp b/src/boost/tools/build/example/pkg-config/test1.cpp new file mode 100644 index 000000000..c554928c0 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/test1.cpp @@ -0,0 +1,11 @@ +// Copyright 2019 Dmitry Arkhipov +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#include <string> + +int main() { + return QWERTY == std::string("uiop") ? EXIT_SUCCESS : EXIT_FAILURE ; +} diff --git a/src/boost/tools/build/example/pkg-config/test2.cpp b/src/boost/tools/build/example/pkg-config/test2.cpp new file mode 100644 index 000000000..d8a987f0d --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/test2.cpp @@ -0,0 +1,12 @@ +// Copyright 2019 Dmitry Arkhipov +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#include <string> +#include <iostream> + +int main(int, char const** argv) { + return THREADING == std::string(argv[1]) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/src/boost/tools/build/example/pkg-config/test3.cpp b/src/boost/tools/build/example/pkg-config/test3.cpp new file mode 100644 index 000000000..e161cd00f --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/test3.cpp @@ -0,0 +1,12 @@ +// Copyright 2019 Dmitry Arkhipov +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#include <string> +#include <iostream> + +int main(int, char const** argv) { + return VARIANT == std::string(argv[1]) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/src/boost/tools/build/example/pkg-config/test4.cpp b/src/boost/tools/build/example/pkg-config/test4.cpp new file mode 100644 index 000000000..c8828b7f6 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/test4.cpp @@ -0,0 +1,11 @@ +// Copyright 2019 Dmitry Arkhipov +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#if VERSIONED_API < 2 +# error "API is too old" +#endif + +int main() {} diff --git a/src/boost/tools/build/example/pkg-config/test5.cpp b/src/boost/tools/build/example/pkg-config/test5.cpp new file mode 100644 index 000000000..7b7f974d2 --- /dev/null +++ b/src/boost/tools/build/example/pkg-config/test5.cpp @@ -0,0 +1,12 @@ +// Copyright 2019 Dmitry Arkhipov +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#include <string> +#include <iostream> + +int main(int, char const** argv) { + return QWERTY == std::string("UIOP") ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/src/boost/tools/build/example/python_modules/jamroot.jam b/src/boost/tools/build/example/python_modules/jamroot.jam new file mode 100644 index 000000000..29972a480 --- /dev/null +++ b/src/boost/tools/build/example/python_modules/jamroot.jam @@ -0,0 +1,8 @@ +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import python_helpers ; + +ECHO "test1:" [ python_helpers.test1 ] ; +ECHO "test2:" [ python_helpers.test2 1234 : 5678 ] ; diff --git a/src/boost/tools/build/example/python_modules/python_helpers.jam b/src/boost/tools/build/example/python_modules/python_helpers.jam new file mode 100644 index 000000000..5519515f2 --- /dev/null +++ b/src/boost/tools/build/example/python_modules/python_helpers.jam @@ -0,0 +1,15 @@ +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import modules ; +local here = [ modules.binding $(__name__) ] ; +here = $(here:D) ; +modules.poke : EXTRA_PYTHONPATH : $(here) ; + +# Import the Python rules to B2 +PYTHON_IMPORT_RULE python_helpers : test1 : python_helpers : test1 ; +PYTHON_IMPORT_RULE python_helpers : test2 : python_helpers : test2 ; + +# Make the new rules accessible to everybody who imports us. +EXPORT python_helpers : test1 test2 ; diff --git a/src/boost/tools/build/example/python_modules/python_helpers.py b/src/boost/tools/build/example/python_modules/python_helpers.py new file mode 100644 index 000000000..6fccd7e8c --- /dev/null +++ b/src/boost/tools/build/example/python_modules/python_helpers.py @@ -0,0 +1,18 @@ +# Copyright 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Declare a couple of functions called from B2 +# +# Each function will receive as many arguments as there ":"-separated +# arguments in bjam call. Each argument is a list of strings. +# As a special exception (aka bug), if no arguments are passed in bjam, +# Python function will be passed a single empty list. +# +# All Python functions must return a list of strings, which may be empty. + +def test1(l): + return ["foo", "bar"] + +def test2(l, l2): + return [l[0], l2[0]] \ No newline at end of file diff --git a/src/boost/tools/build/example/python_modules/readme.txt b/src/boost/tools/build/example/python_modules/readme.txt new file mode 100644 index 000000000..76b219117 --- /dev/null +++ b/src/boost/tools/build/example/python_modules/readme.txt @@ -0,0 +1,16 @@ +Copyright 2006 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +This example shows how you can use Python modules from B2. + +In order to do this, you need to build bjam with Python support, by running: + + ./build.sh --with-python=/usr + +in the jam/src directory (replace /usr with the root of your Python +installation). + +The integration between Python and bjam is very basic now, but enough to be +useful. diff --git a/src/boost/tools/build/example/qt/README.txt b/src/boost/tools/build/example/qt/README.txt new file mode 100644 index 000000000..d6977b584 --- /dev/null +++ b/src/boost/tools/build/example/qt/README.txt @@ -0,0 +1,20 @@ +Copyright 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +This directory contains B2 examples for the Qt library +(http://www.trolltech.com/products/qt/index.html). + +The current examples are: + 1. Basic setup -- application with several sources and moccable header. + 2. Using of .ui source file. + 3. Running .cpp files via the moc tool. + +For convenience, there are examples both for 3.* and 4.* version of Qt, they are +mostly identical and differ only in source code. + +All examples assumes that you just installed B2 and that QTDIR +environment variables is set (typical values can be /usr/share/qt3 and +/usr/share/qt4). After adding "using qt ..." to your user-config.jam, you would +have to remove "using qt ; " statements from example Jamroot files. diff --git a/src/boost/tools/build/example/qt/qt3/hello/canvas.cpp b/src/boost/tools/build/example/qt/qt3/hello/canvas.cpp new file mode 100644 index 000000000..823e827a4 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/hello/canvas.cpp @@ -0,0 +1,73 @@ +// Copyright Vladimir Prus 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include "canvas.h" + +#include <qlabel.h> +#include <qcanvas.h> +#include <qlayout.h> + +Canvas::Canvas(QWidget* parent) +: QWidget(parent) +{ + m_pen = QPen(QColor(255, 128, 128)); + m_brushes = new QBrush[2]; + m_brushes[0] = QBrush(QColor(255, 0, 0)); + m_brushes[1] = QBrush(QColor(0, 255, 0)); + m_current_brush = 0; + + m_canvas = new QCanvas(this); + m_canvas->resize(4*1600, 600); + + redraw(); + + QVBoxLayout* l = new QVBoxLayout(this); + + m_canvas_view = new QCanvasView(m_canvas, this); + l->addWidget(m_canvas_view); + m_canvas_view->resize(rect().size()); + m_canvas_view->show(); +} + +Canvas::~Canvas() +{ + delete m_brushes; +} + +void Canvas::redraw() +{ + QCanvasItemList l = m_canvas->allItems(); + for(QCanvasItemList::iterator i = l.begin(), + e = l.end(); i != e; ++i) + { + delete *i; + } + + unsigned count = 0; + for (unsigned x = 10; x < 4*1600; x += 20) + for (unsigned y = 10; y < 600; y += 20) { + QCanvasRectangle* r = new QCanvasRectangle(x, y, 10, 10, m_canvas); + r->setPen(m_pen); + r->setBrush(m_brushes[m_current_brush]); + r->show(); + ++count; + QCanvasText* t = new QCanvasText("D", m_canvas); + t->move(x, y); + t->show(); + ++count; + } + + (new QCanvasText(QString::number(count), m_canvas))->show(); + m_canvas->setAllChanged(); + +} + +void Canvas::change_color() +{ + m_current_brush = (m_current_brush + 1)%2; + redraw(); + m_canvas->update(); +} + diff --git a/src/boost/tools/build/example/qt/qt3/hello/canvas.h b/src/boost/tools/build/example/qt/qt3/hello/canvas.h new file mode 100644 index 000000000..865fc6549 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/hello/canvas.h @@ -0,0 +1,35 @@ +// Copyright Vladimir Prus 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#ifndef CANVAS_VP_2004_08_31 +#define CANVAS_VP_2004_08_31 + +#include <qmainwindow.h> +#include <qpen.h> +#include <qbrush.h> + +class Canvas : public QWidget +{ + Q_OBJECT +public: + Canvas(QWidget* parent); + + virtual ~Canvas(); + +public slots: + void change_color(); + +private: + void redraw(); + class QCanvas* m_canvas; + class QCanvasView* m_canvas_view; + class QPen m_pen; + class QBrush* m_brushes; + int m_current_brush; +}; + +#endif + diff --git a/src/boost/tools/build/example/qt/qt3/hello/jamroot.jam b/src/boost/tools/build/example/qt/qt3/hello/jamroot.jam new file mode 100644 index 000000000..09b3fef0c --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/hello/jamroot.jam @@ -0,0 +1,13 @@ +# Copyright Vladimir Prus 2004. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt +# or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +using qt ; + +project + # built MT version, unless asked otherwise. + : default-build <threading>multi + ; + +exe canvas : main.cpp canvas.cpp canvas.h : <library>/qt//qt ; \ No newline at end of file diff --git a/src/boost/tools/build/example/qt/qt3/hello/main.cpp b/src/boost/tools/build/example/qt/qt3/hello/main.cpp new file mode 100644 index 000000000..0f1c8c3f9 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/hello/main.cpp @@ -0,0 +1,36 @@ +// Copyright Vladimir Prus 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include "canvas.h" +#include <qapplication.h> +#include <qvbox.h> +#include <qpushbutton.h> + +class Window : public QMainWindow +{ +public: + Window() + { + setCaption("QCanvas test"); + QVBox* vb = new QVBox(this); + setCentralWidget(vb); + + Canvas* c = new Canvas(vb); + QPushButton* b = new QPushButton("Change color", vb); + connect(b, SIGNAL(clicked()), c, SLOT(change_color())); + } +}; + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + Window *w = new Window(); + + app.setMainWidget(w); + w->show(); + + return app.exec(); +} + diff --git a/src/boost/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam b/src/boost/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam new file mode 100644 index 000000000..85778da20 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/moccable-cpp/jamroot.jam @@ -0,0 +1,11 @@ + +using qt ; +import cast ; + +project + : default-build <threading>multi + ; + +exe main : main.cpp [ cast _ moccable-cpp : main.cpp ] + /qt//qt + ; diff --git a/src/boost/tools/build/example/qt/qt3/moccable-cpp/main.cpp b/src/boost/tools/build/example/qt/qt3/moccable-cpp/main.cpp new file mode 100644 index 000000000..63533ba58 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/moccable-cpp/main.cpp @@ -0,0 +1,41 @@ +// Copyright Vladimir Prus 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + + +#include <qwidget.h> +#include <qpushbutton.h> +#include <qapplication.h> + +#include <iostream> + +class My_widget : public QWidget +{ + Q_OBJECT +public: + My_widget() : QWidget() + { + QPushButton* b = new QPushButton("Push me", this); + + connect(b, SIGNAL(clicked()), this, SLOT(theSlot())); + } + +private slots: + void theSlot() + { + std::cout << "Clicked\n"; + } + +}; + +int main(int ac, char* av[]) +{ + QApplication app(ac, av); + My_widget mw; + mw.show(); + app.setMainWidget(&mw); + app.exec(); +} + +#include "main.moc" diff --git a/src/boost/tools/build/example/qt/qt3/uic/hello_world_widget.ui b/src/boost/tools/build/example/qt/qt3/uic/hello_world_widget.ui new file mode 100644 index 000000000..26cc73487 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/uic/hello_world_widget.ui @@ -0,0 +1,58 @@ +<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> +<class>HelloWorldWidget</class> +<comment> +<!-- + Copyright Felix E. Klee, 2003 + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt + or copy at http://www.boost.org/LICENSE_1_0.txt) +--> +</comment> +<widget class="QWidget"> + <property name="name"> + <cstring>HelloWorldWidget</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>124</width> + <height>63</height> + </rect> + </property> + <property name="caption"> + <string>Hello World!</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel2</cstring> + </property> + <property name="text"> + <string>Hello World!</string> + </property> + <property name="alignment"> + <set>AlignCenter</set> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>OkButton</cstring> + </property> + <property name="text"> + <string>OK</string> + </property> + </widget> + </vbox> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/src/boost/tools/build/example/qt/qt3/uic/jamroot.jam b/src/boost/tools/build/example/qt/qt3/uic/jamroot.jam new file mode 100644 index 000000000..d53df7a58 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/uic/jamroot.jam @@ -0,0 +1,15 @@ +# Copyright Felix E. Klee, 2003 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt +# or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Tell that QT should be used. QTDIR will give installation +# prefix. +using qt ; + +project + : default-build <threading>multi + ; + +exe hello : main.cpp hello_world_widget.ui : <library>/qt//qt ; + diff --git a/src/boost/tools/build/example/qt/qt3/uic/main.cpp b/src/boost/tools/build/example/qt/qt3/uic/main.cpp new file mode 100644 index 000000000..c48605574 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt3/uic/main.cpp @@ -0,0 +1,18 @@ +// Copyright Felix E. Klee, 2003 +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include "hello_world_widget.h" +#include <qapplication.h> + +#include <qpushbutton.h> + +int main(int argc, char **argv) { + QApplication a(argc, argv); + HelloWorldWidget w; + QObject::connect(static_cast<QObject*>(w.OkButton), SIGNAL(clicked()), &w, SLOT(close())); + a.setMainWidget(&w); + w.show(); + return a.exec(); +} diff --git a/src/boost/tools/build/example/qt/qt4/hello/arrow.cpp b/src/boost/tools/build/example/qt/qt4/hello/arrow.cpp new file mode 100644 index 000000000..5f36ed5a8 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/hello/arrow.cpp @@ -0,0 +1,158 @@ +// Copyright Vladimir Prus 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include "arrow.h" + +#include <QtGui/qapplication.h> + +#include <QtGui/qwidget.h> +#include <QtGui/qpainter.h> +#include <QtGui/qpainterpath.h> + +#include <stdlib.h> +#include <math.h> + +Arrow_widget::Arrow_widget(QWidget* parent) : QWidget(parent), color_(0) +{ + QPalette pal = palette(); + pal.setBrush(backgroundRole(), QBrush(Qt::white)); + setPalette(pal); +} + +void Arrow_widget::slotChangeColor() +{ + color_ = (color_ + 1) % 3; + update(); +} + +void +Arrow_widget::draw_arrow(int x1, int y1, int x2, int y2, QPainter& painter) +{ + // The length of the from the tip of the arrow to the point + // where line starts. + const int arrowhead_length = 16; + + QPainterPath arrow; + arrow.moveTo(x1, y1); + + // Determine the angle of the straight line. + double a1 = (x2-x1); + double a2 = (y2-y1); + double b1 = 1; + double b2 = 0; + + double straight_length = sqrt(a1*a1 + a2*a2); + + double dot_product = a1*b1 + a2*b2; + double cosine = dot_product/ + (sqrt(pow(a1, 2) + pow(a2, 2))*sqrt(b1 + b2)); + double angle = acos(cosine); + if (y1 < y2) + { + angle = -angle; + } + double straight_angle = angle*180/M_PI; + + double limit = 10; + + double angle_to_vertical; + if (fabs(straight_angle) < 90) + angle_to_vertical = fabs(straight_angle); + else if (straight_angle > 0) + angle_to_vertical = 180-straight_angle; + else + angle_to_vertical = 180-(-straight_angle); + + double angle_delta = 0; + if (angle_to_vertical > limit) + angle_delta = 30 * (angle_to_vertical - limit)/90; + double start_angle = straight_angle > 0 + ? straight_angle - angle_delta : + straight_angle + angle_delta; + + + QMatrix m1; + m1.translate(x1, y1); + m1.rotate(-start_angle); + + double end_angle = straight_angle > 0 + ? (straight_angle + 180 + angle_delta) : + (straight_angle + 180 - angle_delta); + + QMatrix m2; + m2.reset(); + m2.translate(x2, y2); + m2.rotate(-end_angle); + + arrow.cubicTo(m1.map(QPointF(straight_length/2, 0)), + m2.map(QPointF(straight_length/2, 0)), + m2.map(QPointF(arrowhead_length, 0))); + + painter.save(); + painter.setBrush(Qt::NoBrush); + painter.drawPath(arrow); + painter.restore(); + + painter.save(); + painter.translate(x2, y2); + + painter.rotate(-90); + painter.rotate(-end_angle); + painter.rotate(180); + + QPolygon arrowhead(4); + arrowhead.setPoint(0, 0, 0); + arrowhead.setPoint(1, arrowhead_length/3, -arrowhead_length*5/4); + arrowhead.setPoint(2, 0, -arrowhead_length); + arrowhead.setPoint(3, -arrowhead_length/3, -arrowhead_length*5/4); + + painter.drawPolygon(arrowhead); + + painter.restore(); + +} + + +void Arrow_widget::paintEvent(QPaintEvent*) +{ + QPainter p(this); + + p.setRenderHint(QPainter::Antialiasing); + + int base_x = 550; + int base_y = 200; + + if (color_ == 0) + p.setBrush(Qt::black); + else if (color_ == 1) + p.setBrush(Qt::green); + else if (color_ == 2) + p.setBrush(Qt::yellow); + else + p.setBrush(Qt::black); + + for (int x_step = 0; x_step < 6; ++x_step) + { + for (int y_step = 1; y_step <= 3; ++y_step) + { + draw_arrow(base_x, base_y, base_x+x_step*100, + base_y - y_step*50, p); + + draw_arrow(base_x, base_y, base_x+x_step*100, + base_y + y_step*50, p); + + draw_arrow(base_x, base_y, base_x-x_step*100, + base_y + y_step*50, p); + + draw_arrow(base_x, base_y, base_x-x_step*100, + base_y - y_step*50, p); + } + } + + draw_arrow(50, 400, 1000, 450, p); + draw_arrow(1000, 400, 50, 450, p); + +} + diff --git a/src/boost/tools/build/example/qt/qt4/hello/arrow.h b/src/boost/tools/build/example/qt/qt4/hello/arrow.h new file mode 100644 index 000000000..8375d13c9 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/hello/arrow.h @@ -0,0 +1,30 @@ +// Copyright Vladimir Prus 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <QtGui/qapplication.h> + +#include <QtGui/qwidget.h> +#include <QtGui/qpainter.h> +#include <QtGui/qpainterpath.h> + +#include <stdlib.h> +#include <math.h> + +class Arrow_widget : public QWidget +{ + Q_OBJECT +public: + Arrow_widget(QWidget* parent = 0); + +public slots: + void slotChangeColor(); + +private: + void draw_arrow(int x1, int y1, int x2, int y2, QPainter& painter); + void paintEvent(QPaintEvent*); + +private: + int color_; +}; diff --git a/src/boost/tools/build/example/qt/qt4/hello/jamroot.jam b/src/boost/tools/build/example/qt/qt4/hello/jamroot.jam new file mode 100644 index 000000000..83952f17b --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/hello/jamroot.jam @@ -0,0 +1,14 @@ + +import qt4 ; + +if ! [ qt4.initialized ] +{ + ECHO "Warning: Qt4 not initialized in user-config.jam" ; + ECHO "Assuming /space/p2/ghost/build/Qt4 as location." ; + ECHO "This is very likely won't work for you. " ; + using qt4 : /space/p2/ghost/build/Qt4 ; +} + +project : requirements <threading>multi ; + +exe arrow : main.cpp arrow.cpp arrow.h /qt//QtGui ; \ No newline at end of file diff --git a/src/boost/tools/build/example/qt/qt4/hello/main.cpp b/src/boost/tools/build/example/qt/qt4/hello/main.cpp new file mode 100644 index 000000000..bf4913666 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/hello/main.cpp @@ -0,0 +1,27 @@ +// Copyright Vladimir Prus 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include "arrow.h" + +#include <QApplication> +#include <QTimer> + +int main(int ac, char* av[]) +{ + QApplication app(ac, av); + Arrow_widget* w = new Arrow_widget; + w->resize(1100, 480); + + QTimer timer; + QObject::connect(&timer, SIGNAL(timeout()), + w, SLOT(slotChangeColor())); + + timer.start(2000); + + w->show(); + app.exec(); + return 0; +} + diff --git a/src/boost/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam b/src/boost/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam new file mode 100644 index 000000000..d07b9c7d3 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/moccable-cpp/jamroot.jam @@ -0,0 +1,18 @@ + +import qt4 ; +if ! [ qt4.initialized ] +{ + ECHO "Warning: Qt4 not initialized in user-config.jam" ; + ECHO "Assuming /space/p2/ghost/build/Qt4 as location." ; + ECHO "This is very likely won't work for you. " ; + using qt4 : /space/p2/ghost/build/Qt4 ; +} + +import cast ; +exe main : main.cpp + [ cast _ moccable-cpp : main.cpp ] + /qt//QtGui + : <threading>multi + ; + + diff --git a/src/boost/tools/build/example/qt/qt4/moccable-cpp/main.cpp b/src/boost/tools/build/example/qt/qt4/moccable-cpp/main.cpp new file mode 100644 index 000000000..f8d4a43e2 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/moccable-cpp/main.cpp @@ -0,0 +1,39 @@ +// Copyright Vladimir Prus 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <qwidget.h> +#include <qpushbutton.h> +#include <qapplication.h> + +#include <iostream> + +class My_widget : public QWidget +{ + Q_OBJECT +public: + My_widget() : QWidget() + { + QPushButton* b = new QPushButton("Push me", this); + + connect(b, SIGNAL(clicked()), this, SLOT(theSlot())); + } + +private slots: + void theSlot() + { + std::cout << "Clicked\n"; + } + +}; + +int main(int ac, char* av[]) +{ + QApplication app(ac, av); + My_widget mw; + mw.show(); + app.exec(); +} + +#include "main.moc" diff --git a/src/boost/tools/build/example/qt/qt4/uic/hello_world_widget.ui b/src/boost/tools/build/example/qt/qt4/uic/hello_world_widget.ui new file mode 100644 index 000000000..67060b336 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/uic/hello_world_widget.ui @@ -0,0 +1,55 @@ +<ui version="4.0" > + <author></author> + <comment> +<!-- + Copyright Felix E. Klee, 2003 + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt + or copy at http://www.boost.org/LICENSE_1_0.txt) +--> + </comment> + <exportmacro></exportmacro> + <class>HelloWorldWidget</class> + <widget class="QWidget" name="HelloWorldWidget" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>124</width> + <height>63</height> + </rect> + </property> + <property name="windowTitle" > + <string>Hello World!</string> + </property> + <layout class="QVBoxLayout" > + <property name="margin" > + <number>11</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="TextLabel2" > + <property name="text" > + <string>Hello World!</string> + </property> + <property name="alignment" > + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="OkButton" > + <property name="text" > + <string>OK</string> + </property> + </widget> + </item> + </layout> + </widget> + <layoutdefault spacing="6" margin="11" /> + <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> + <resources/> + <connections/> +</ui> diff --git a/src/boost/tools/build/example/qt/qt4/uic/jamroot.jam b/src/boost/tools/build/example/qt/qt4/uic/jamroot.jam new file mode 100644 index 000000000..5af938c95 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/uic/jamroot.jam @@ -0,0 +1,18 @@ +# Copyright Felix E. Klee, 2003 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt +# or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +import qt4 ; +if ! [ qt4.initialized ] +{ + ECHO "Warning: Qt4 not initialized in user-config.jam" ; + ECHO "Assuming /space/p2/ghost/build/Qt4 as location." ; + ECHO "This is very likely won't work for you. " ; + using qt4 : /space/p2/ghost/build/Qt4 ; +} + +project : requirements <threading>multi + ; + +exe hello : main.cpp hello_world_widget.ui : <library>/qt//QtGui ; diff --git a/src/boost/tools/build/example/qt/qt4/uic/main.cpp b/src/boost/tools/build/example/qt/qt4/uic/main.cpp new file mode 100644 index 000000000..6b217ec19 --- /dev/null +++ b/src/boost/tools/build/example/qt/qt4/uic/main.cpp @@ -0,0 +1,23 @@ +// Copyright Felix E. Klee, 2003 +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include "ui_hello_world_widget.h" +#include <qapplication.h> +#include <qwidget.h> + +#include <qpushbutton.h> + +int main(int argc, char **argv) { + QApplication a(argc, argv); + + QWidget w; + Ui::HelloWorldWidget wm; + wm.setupUi(&w); + + QObject::connect(wm.OkButton, SIGNAL(clicked()), &w, SLOT(close())); + + w.show(); + return a.exec(); +} diff --git a/src/boost/tools/build/example/sanitizers/jamroot.jam b/src/boost/tools/build/example/sanitizers/jamroot.jam new file mode 100644 index 000000000..4b3bda916 --- /dev/null +++ b/src/boost/tools/build/example/sanitizers/jamroot.jam @@ -0,0 +1 @@ +exe main : main.cpp ; diff --git a/src/boost/tools/build/example/sanitizers/main.cpp b/src/boost/tools/build/example/sanitizers/main.cpp new file mode 100644 index 000000000..62e6f3b60 --- /dev/null +++ b/src/boost/tools/build/example/sanitizers/main.cpp @@ -0,0 +1,9 @@ +#include <iostream> + +// tag::source[] +int main() +{ + char* c = nullptr; + std::cout << "Hello sanitizers\n " << *c; +} +// end::source[] diff --git a/src/boost/tools/build/example/sanitizers/readme.adoc b/src/boost/tools/build/example/sanitizers/readme.adoc new file mode 100644 index 000000000..efcc8c3a9 --- /dev/null +++ b/src/boost/tools/build/example/sanitizers/readme.adoc @@ -0,0 +1,64 @@ +//// +Copyright 2019 Damian Jarek +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +//// + += Sanitizers + +This example shows how to enable sanitizers when using a clang or gcc toolset + +.`main.cpp` +[source,cpp] +---- +include::../../example/sanitizers/main.cpp[tag=source] +---- + +Our `jamroot.jam` is minimal and only specifies one `exe` target for the +program: + +.`jamroot.jam` +[source,jam] +---- +include::jamroot.jam[] +---- + +Sanitizers can be enabled by passing `on` or `norecover` to the appropriate sanitizer feature +(e.g. `thread-sanitizer=on`). The `norecover` option causes the program to terminate after +the first sanitizer issue is detected. The following example shows how to enable `address` and `undefined` +sanitizers in a simple program: + +[source,bash] +---- +> cd /example/sanitizers +> b2 toolset=gcc address-sanitizer=norecover undefined-sanitizer=on +...found 10 targets... +...updating 7 targets... +gcc.compile.c++ bin/gcc-7.3.0/debug/address-sanitizer-norecover/undefined-sanitizer-on/main.o +gcc.link bin/gcc-7.3.0/debug/address-sanitizer-norecover/undefined-sanitizer-on/main +...updated 7 targets... +---- + +Running the produced program may produce an output simillar to the following: + +[source,bash] +---- +> ./bin/gcc-7.3.0/debug/address-sanitizer-norecover/undefined-sanitizer-on/main +Hello sanitizers +main.cpp:6:43: runtime error: load of null pointer of type 'char' +ASAN:DEADLYSIGNAL +================================================================= +==29767==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55ba7988af1b bp 0x7ffdf3d76560 sp 0x7ffdf3d76530 T0) +==29767==The signal is caused by a READ memory access. +==29767==Hint: address points to the zero page. + #0 0x55ba7988af1a in main /home/damian/projects/boost/tools/build/example/sanitizers/main.cpp:6 + #1 0x7f42f2ba1b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) + #2 0x55ba7988adb9 in _start (/home/damian/projects/boost/tools/build/example/sanitizers/bin/gcc-7.3.0/debug/address-sanitizer-norecover/undefined-sanitizer-on/main+0xdb9) + +AddressSanitizer can not provide additional info. +SUMMARY: AddressSanitizer: SEGV /home/damian/projects/boost/tools/build/example/sanitizers/main.cpp:6 in main +==29767==ABORTING +---- + +NOTE: The actual paths in the `bin` sub-directory will depend on your +toolset and configuration. The presented output may vary depending on your compiler version. diff --git a/src/boost/tools/build/example/sass/importing.scss b/src/boost/tools/build/example/sass/importing.scss new file mode 100644 index 000000000..0c3586afc --- /dev/null +++ b/src/boost/tools/build/example/sass/importing.scss @@ -0,0 +1,3 @@ +@import "foobar"; + +body { color: red; } diff --git a/src/boost/tools/build/example/sass/include/foobar.scss b/src/boost/tools/build/example/sass/include/foobar.scss new file mode 100644 index 000000000..2c77cef1f --- /dev/null +++ b/src/boost/tools/build/example/sass/include/foobar.scss @@ -0,0 +1,3 @@ +body { + border: { color: red; } +} diff --git a/src/boost/tools/build/example/sass/jamroot.jam b/src/boost/tools/build/example/sass/jamroot.jam new file mode 100644 index 000000000..837477225 --- /dev/null +++ b/src/boost/tools/build/example/sass/jamroot.jam @@ -0,0 +1,15 @@ +#| +Copyright 2017 Dmitry Arkhipov +Distributed under the Boost Software License, Version 1.0. (See +accompanying file LICENSE.txt or copy at +https://www.bfgroup.xyz/b2/LICENSE.txt) +|# + +css stylesheet1 : singleton.scss : <flags>"--precision 1" ; +css stylesheet2 : singleton.sass ; +css stylesheet3 : importing.scss : <include>include ; +css stylesheet4 + : singleton.scss + : <sass-style>expanded + <sass-line-numbers>off + ; diff --git a/src/boost/tools/build/example/sass/singleton.sass b/src/boost/tools/build/example/sass/singleton.sass new file mode 100644 index 000000000..455fefdd1 --- /dev/null +++ b/src/boost/tools/build/example/sass/singleton.sass @@ -0,0 +1,12 @@ +body + p + line-height: 1.5em + + span + font-weight: 700 + a + text-decoration: none + + &:hover + text-decoration: underline + font-size: (10px/3) diff --git a/src/boost/tools/build/example/sass/singleton.scss b/src/boost/tools/build/example/sass/singleton.scss new file mode 100644 index 000000000..afe15e9c4 --- /dev/null +++ b/src/boost/tools/build/example/sass/singleton.scss @@ -0,0 +1,11 @@ +body { + p { line-height: 1.5em; } + span { font-weight: 700; } + a { + text-decoration: none; + &:hover { + text-decoration: underline; + font-size: (10px/3); + } + } +} diff --git a/src/boost/tools/build/example/site-config.jam b/src/boost/tools/build/example/site-config.jam new file mode 100644 index 000000000..2bf5e5700 --- /dev/null +++ b/src/boost/tools/build/example/site-config.jam @@ -0,0 +1,4 @@ +# Copyright 2002, 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + diff --git a/src/boost/tools/build/example/testing/compile-fail.cpp b/src/boost/tools/build/example/testing/compile-fail.cpp new file mode 100644 index 000000000..aa07d4e67 --- /dev/null +++ b/src/boost/tools/build/example/testing/compile-fail.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> +#include <cstdlib> + +int main() +{ + std::cout << "Bye!\n"; + return EXIT_FAILURE +} diff --git a/src/boost/tools/build/example/testing/fail.cpp b/src/boost/tools/build/example/testing/fail.cpp new file mode 100644 index 000000000..ce8e2a189 --- /dev/null +++ b/src/boost/tools/build/example/testing/fail.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> +#include <cstdlib> + +int main() +{ + std::cout << "Bye!\n"; + return EXIT_FAILURE; +} diff --git a/src/boost/tools/build/example/testing/jamroot.jam b/src/boost/tools/build/example/testing/jamroot.jam new file mode 100644 index 000000000..7bbb2e619 --- /dev/null +++ b/src/boost/tools/build/example/testing/jamroot.jam @@ -0,0 +1,10 @@ +# Copyright 2014 Rene Rivera +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +using testing ; + +run success.cpp : : ; +run-fail fail.cpp : : ; +compile success.cpp : : success-compile ; +compile-fail compile-fail.cpp ; diff --git a/src/boost/tools/build/example/testing/success.cpp b/src/boost/tools/build/example/testing/success.cpp new file mode 100644 index 000000000..0b75980ab --- /dev/null +++ b/src/boost/tools/build/example/testing/success.cpp @@ -0,0 +1,15 @@ +// Copyright (c) 2014 Rene Rivera +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) +// + +#include <iostream> +#include <cstdlib> + +int main() +{ + std::cout << "Hi!\n"; + return EXIT_SUCCESS; +} diff --git a/src/boost/tools/build/example/time/hello.cpp b/src/boost/tools/build/example/time/hello.cpp new file mode 100644 index 000000000..b3392a3b3 --- /dev/null +++ b/src/boost/tools/build/example/time/hello.cpp @@ -0,0 +1,12 @@ +// Copyright (c) 2003 Vladimir Prus +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE.txt or copy at +// https://www.bfgroup.xyz/b2/LICENSE.txt) + +#include <iostream> + +int main() +{ + std::cout << "Hello!\n"; +} diff --git a/src/boost/tools/build/example/time/jamroot.jam b/src/boost/tools/build/example/time/jamroot.jam new file mode 100644 index 000000000..52fc1b980 --- /dev/null +++ b/src/boost/tools/build/example/time/jamroot.jam @@ -0,0 +1,16 @@ +#| +Distributed under the Boost Software License, Version 1.0. (See +accompanying file LICENSE.txt or copy at +https://www.bfgroup.xyz/b2/LICENSE.txt) +|# + +#[jamroot +#<< Import the time rule from the testing module. +import testing ; + +#<< The target we are timing just builds a hello program. +exe hello : hello.cpp ; + +#<< This target records the time to build the `hello` target. +time hello.time : hello ; +#] diff --git a/src/boost/tools/build/example/time/readme.qbk b/src/boost/tools/build/example/time/readme.qbk new file mode 100644 index 000000000..808a2ceec --- /dev/null +++ b/src/boost/tools/build/example/time/readme.qbk @@ -0,0 +1,47 @@ +[/ +Copyright 2017 Rene Rivera +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +] + +[section Time Action] + +This example shows how to use the `testing.time` utility to show time +information for building a target. + +Files: + +* [@../../example/time/jamroot.jam jamroot.jam] +* [@../../example/time/hello.cpp hello.cpp] + +Our `jamroot.jam` specifies the target we build and the `time` +declaration to time the target we build: + +[import jamroot.jam] + +[jamroot] + +Building the example yields: + +[teletype] +``` +> cd /example/time +> b2 +...found 9 targets... +...updating 6 targets... +common.mkdir bin +common.mkdir bin/clang-darwin-4.2.1 +common.mkdir bin/clang-darwin-4.2.1/debug +clang-darwin.compile.c++ bin/clang-darwin-4.2.1/debug/hello.o +clang-darwin.link bin/clang-darwin-4.2.1/debug/hello +testing.time bin/clang-darwin-4.2.1/debug/hello.time +user: [hello] 0.013509 +system: [hello] 0.045641 +clock: [hello] 0.000000 +...updated 6 targets... +``` + +[note The actual paths in the `bin` sub-directory will depend on your +toolset.] + +[endsect] diff --git a/src/boost/tools/build/example/try_compile/Jamroot.jam b/src/boost/tools/build/example/try_compile/Jamroot.jam new file mode 100644 index 000000000..3131e722e --- /dev/null +++ b/src/boost/tools/build/example/try_compile/Jamroot.jam @@ -0,0 +1,29 @@ + +# This example shows performing configure checks in B2, +# e.g. to check for some system function or compiler quirk. + +# First, declare a metatarget that we'll try to build. +obj foo : foo.cpp ; +# Make it explicit so that it's only built if used by a configure check +explicit foo ; + +# Declare a target that depends on configure check result. +exe main + : main.cpp + # The check-target-builds invocation in requirements section will + # - build the specified metatarget + # - if it builds OK, add the properties in the second parameter + # - otherwise, add the properties in the third parameter + : [ check-target-builds foo : <define>FOO=1 : <define>FOO=0 ] + ; + +# To test this: +# +# 1. Build with "b2". You should see a "foo builds: yes" message, and running +# the produced executable will show that FOO is set to 1. +# 2. Modify foo.cpp to contain a compile error, rebuild with +# "b2 -a --reconfigure". You should see a "foo builds: no" message, and running +# the produced executable should show that FOO is now set to 0. +# +# The output from the check is not shown on the console, instead it is +# redirected to the bin/config.log file diff --git a/src/boost/tools/build/example/try_compile/foo.cpp b/src/boost/tools/build/example/try_compile/foo.cpp new file mode 100644 index 000000000..c9107f937 --- /dev/null +++ b/src/boost/tools/build/example/try_compile/foo.cpp @@ -0,0 +1,6 @@ + + +int foo() +{ + return 0; +} \ No newline at end of file diff --git a/src/boost/tools/build/example/try_compile/main.cpp b/src/boost/tools/build/example/try_compile/main.cpp new file mode 100644 index 000000000..12f64995b --- /dev/null +++ b/src/boost/tools/build/example/try_compile/main.cpp @@ -0,0 +1,8 @@ + +#include <iostream> +using namespace std; + +int main() +{ + std::cout << "Foo: " << FOO << "\n"; +} \ No newline at end of file diff --git a/src/boost/tools/build/example/user-config.jam b/src/boost/tools/build/example/user-config.jam new file mode 100644 index 000000000..05d823da0 --- /dev/null +++ b/src/boost/tools/build/example/user-config.jam @@ -0,0 +1,92 @@ +# Copyright 2003, 2005 Douglas Gregor +# Copyright 2004 John Maddock +# Copyright 2002, 2003, 2004, 2007 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This file is used to configure your B2 installation. You can modify +# this file in place, or you can place it in a permanent location so that it +# does not get overwritten should you get a new version of B2. See: +# +# https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration +# +# for documentation about possible permanent locations. + +# This file specifies which toolsets (C++ compilers), libraries, and other +# tools are available. Often, you should be able to just uncomment existing +# example lines and adjust them to taste. The complete list of supported tools, +# and configuration instructions can be found at: +# +# https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.reference.tools +# + +# This file uses Jam language syntax to describe available tools. Mostly, +# there are 'using' lines, that contain the name of the used tools, and +# parameters to pass to those tools -- where parameters are separated by +# semicolons. Important syntax notes: +# +# - Both ':' and ';' must be separated from other tokens by whitespace +# - The '\' symbol is a quote character, so when specifying Windows paths you +# should use '/' or '\\' instead. +# +# More details about the syntax can be found at: +# +# https://www.bfgroup.xyz/b2/manual/release/index.html#jam.language +# + +# ------------------ +# GCC configuration. +# ------------------ + +# Configure gcc (default version). +# using gcc ; + +# Configure specific gcc version, giving alternative name to use. +# using gcc : 3.2 : g++-3.2 ; + + +# ------------------- +# MSVC configuration. +# ------------------- + +# Configure msvc (default version, searched for in standard locations and PATH). +# using msvc ; + +# Configure specific msvc version (searched for in standard locations and PATH). +# using msvc : 8.0 ; + + +# ---------------------- +# Borland configuration. +# ---------------------- +# using borland ; + + +# ---------------------- +# STLPort configuration. +# ---------------------- + +# Configure specifying location of STLPort headers. Libraries must be either +# not needed or available to the compiler by default. +# using stlport : : /usr/include/stlport ; + +# Configure specifying location of both headers and libraries explicitly. +# using stlport : : /usr/include/stlport /usr/lib ; + + +# ----------------- +# QT configuration. +# ----------------- + +# Configure assuming QTDIR gives the installation prefix. +# using qt ; + +# Configure with an explicit installation prefix. +# using qt : /usr/opt/qt ; + +# --------------------- +# Python configuration. +# --------------------- + +# Configure specific Python version. +# using python : 3.1 : /usr/bin/python3 : /usr/include/python3.1 : /usr/lib ; diff --git a/src/boost/tools/build/example/variant/a.cpp b/src/boost/tools/build/example/variant/a.cpp new file mode 100644 index 000000000..e6abcf9c0 --- /dev/null +++ b/src/boost/tools/build/example/variant/a.cpp @@ -0,0 +1,7 @@ +// Copyright Vladimir Prus 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +void l(); +int main() { l(); return 0; } diff --git a/src/boost/tools/build/example/variant/jamfile.jam b/src/boost/tools/build/example/variant/jamfile.jam new file mode 100644 index 000000000..6fd72adbd --- /dev/null +++ b/src/boost/tools/build/example/variant/jamfile.jam @@ -0,0 +1,11 @@ +# Copyright 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +#[jamfile +#<< By default, build the project with the two variants we have defined in jamroot.jam. +project : default-build crazy super_release ; + +#<< We build an `a` exe target that links a built library. The library builds with the propagated properties of the exe. +exe a : a.cpp libs//l ; +#] \ No newline at end of file diff --git a/src/boost/tools/build/example/variant/jamroot.jam b/src/boost/tools/build/example/variant/jamroot.jam new file mode 100644 index 000000000..d20669789 --- /dev/null +++ b/src/boost/tools/build/example/variant/jamroot.jam @@ -0,0 +1,12 @@ +# Copyright 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +#[jamroot +#<< Define a build variant which is just combination of four properties. +variant crazy : <optimization>speed <inlining>off + <debug-symbols>on <profiling>on ; + +#<< Define a built variant inherited from 'release'. It defines one new property and gets all properties from the parent `release` variant. +variant super_release : release : <define>USE_ASM ; +#] diff --git a/src/boost/tools/build/example/variant/libs/jamfile.jam b/src/boost/tools/build/example/variant/libs/jamfile.jam new file mode 100644 index 000000000..5d6d42dbd --- /dev/null +++ b/src/boost/tools/build/example/variant/libs/jamfile.jam @@ -0,0 +1,8 @@ +# Copyright 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +#[libs_jamfile +#<< The library `l` just needs the sources. By default it will be a shared library. +lib l : l.cpp ; +#] \ No newline at end of file diff --git a/src/boost/tools/build/example/variant/libs/l.cpp b/src/boost/tools/build/example/variant/libs/l.cpp new file mode 100644 index 000000000..be3254ca8 --- /dev/null +++ b/src/boost/tools/build/example/variant/libs/l.cpp @@ -0,0 +1,9 @@ +// Copyright Vladimir Prus 2002-2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt +// or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void l() {} diff --git a/src/boost/tools/build/example/variant/readme.qbk b/src/boost/tools/build/example/variant/readme.qbk new file mode 100644 index 000000000..663219e34 --- /dev/null +++ b/src/boost/tools/build/example/variant/readme.qbk @@ -0,0 +1,94 @@ +[/ +Copyright 2004 Vladimir Prus +Copyright 2017 Rene Rivera +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +/] + +[section Build Variants] + +This example shows how user can create his own build variants. Two variants are +defined: "crazy", which is just a random combination of properties, and +"super-release", which is inherited from "release", and differs by a single +define. + +Files: + +* [@../../example/variant/a.cpp a.cpp] +* [@../../example/variant/jamroot.jam jamroot.jam] +* [@../../example/variant/jamfile.jam jamfile.jam] +* [@../../example/variant/libs/jamfile.jam libs/jamfile.jam] +* [@../../example/variant/libs/l.cpp libs/l.cpp] + +[import jamroot.jam] +[import jamfile.jam] +[import libs/jamfile.jam] + +In this project the `jamroot.jam` specifies the custom build variants and the +targets are specified in the two `jamfile.jam` files. + +[jamroot] + +The top-level `jamfile.jam`: + +[jamfile] + +And the library `jamfile.jam` that the top-level `jamfile.jam` refers to: + +[libs_jamfile] + +Building the example yields: + +[teletype] +``` +> cd /example/variant +> b2 +...found 20 targets... +...updating 16 targets... +common.mkdir bin +common.mkdir bin/clang-darwin-4.2.1 +common.mkdir bin/clang-darwin-4.2.1/crazy +clang-darwin.compile.c++ bin/clang-darwin-4.2.1/crazy/a.o +common.mkdir libs/bin +common.mkdir libs/bin/clang-darwin-4.2.1 +common.mkdir libs/bin/clang-darwin-4.2.1/crazy +clang-darwin.compile.c++ libs/bin/clang-darwin-4.2.1/crazy/l.o +clang-darwin.link.dll libs/bin/clang-darwin-4.2.1/crazy/libl.dylib +clang-darwin.link bin/clang-darwin-4.2.1/crazy/a +common.mkdir bin/clang-darwin-4.2.1/super_release +clang-darwin.compile.c++ bin/clang-darwin-4.2.1/super_release/a.o +common.mkdir libs/bin/clang-darwin-4.2.1/super_release +clang-darwin.compile.c++ libs/bin/clang-darwin-4.2.1/super_release/l.o +clang-darwin.link.dll libs/bin/clang-darwin-4.2.1/super_release/libl.dylib +clang-darwin.link bin/clang-darwin-4.2.1/super_release/a +...updated 16 targets... +``` + +As specified in the top-level `jamfile.jam` both custom variants where built +by default. Once can override that by specifying the variant one wants to +build directly on the command line with a `variant=super_release`. Or just +with a `super_release` as variants can be referred to by their name only. +For example using that argument yields: + +``` +> cd /example/variant +> b2 super_release +...found 14 targets... +...updating 10 targets... +common.mkdir bin +common.mkdir bin/clang-darwin-4.2.1 +common.mkdir bin/clang-darwin-4.2.1/super_release +clang-darwin.compile.c++ bin/clang-darwin-4.2.1/super_release/a.o +common.mkdir libs/bin +common.mkdir libs/bin/clang-darwin-4.2.1 +common.mkdir libs/bin/clang-darwin-4.2.1/super_release +clang-darwin.compile.c++ libs/bin/clang-darwin-4.2.1/super_release/l.o +clang-darwin.link.dll libs/bin/clang-darwin-4.2.1/super_release/libl.dylib +clang-darwin.link bin/clang-darwin-4.2.1/super_release/a +...updated 10 targets... +``` + +[note The actual paths in the `bin` sub-directory will depend on your +toolset.] + +[endsect] diff --git a/src/boost/tools/build/index.html b/src/boost/tools/build/index.html new file mode 100644 index 000000000..afe4356ae --- /dev/null +++ b/src/boost/tools/build/index.html @@ -0,0 +1,5 @@ + +<html><head><meta http-equiv="refresh" content="0; URL=doc/html/index.html"></head><body> +Automatic redirection failed, please go to <a href="doc/html/index.html">doc/html/index.html</a>. +<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) --> +</body></html> diff --git a/src/boost/tools/build/notes/README.txt b/src/boost/tools/build/notes/README.txt new file mode 100644 index 000000000..96ef0c3aa --- /dev/null +++ b/src/boost/tools/build/notes/README.txt @@ -0,0 +1,8 @@ +Copyright 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +This directory contains various development notes. Some of them +may eventually find the way into documentation, so are purely +implementation comments. diff --git a/src/boost/tools/build/notes/build_dir_option.txt b/src/boost/tools/build/notes/build_dir_option.txt new file mode 100644 index 000000000..0ebd3bef7 --- /dev/null +++ b/src/boost/tools/build/notes/build_dir_option.txt @@ -0,0 +1,77 @@ +Copyright 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +Summary +------- + +We need a --build-dir option that users building from read-only +medium can use to force building to some other location. Pretty much +every project need this functionality, so it's desirable to have it +out-of-the box, without explicit setup. + +Design +------ + +We can achieve the desired effect manually by adding something like this +to Jamroot: + + project .... : build-dir [ my-rule-to-compute-build-dir ] ; + +Where 'my-rule-to-compute-build-dir' would look at the --build-dir option. + +We need to automate this, but essentially, --build-dir will only affect +the 'build-dir' attribute of Jamroots. + +If Jamroot contains: + + project foo ; + +and --build-dir options' value if /tmp/build, then we'll act as if Jamroot +contained: + + project foo : build-dir /tmp/build/foo ; + +If the 'project' rule has explicit 'build-dir': + + project foo : build-dir bin.v2 ; + +then with the same value of --build-dir we'd act as if Jamroot contained: + + project foo : build-dir /tmp/build/foo/bin.v2 ; + +We can't drop "bin.v2" because it's quite possible that the name of build dir +have specific meaning. For example, it can be used to separate B2 V1 +and V2 build results. + +The --build-dir option has no effect if Jamroot does not define any project id. +Doing otherwise can lead to nasty problems if we're building two distinct +projects (that is with two different Jamroot). They'll get the same build +directory. Most likely, user will see the "duplicate target" error, which is +generally confusing. + +It is expected that any non-trivial project will have top-level "project" +invocation with non empty id, so the above limitation is not so drastic. +We'll emit a warning if Jamroot does not define project id, and --build-dir +is specified. + +Here's the exact behavior of the --build-dir option. If we're loading a +Jamfile (either root or non-root), that declare some project id and some +build-dir attribute, the following table gives the value of build-dir +that will actually be used. + +------------------------------------------------------------------------------- +Root? Id Build-dir attribute Resulting build dir +------------------------------------------------------------------------------- +yes none * --build-dir is ignored, with warning +yes 'foo' none /tmp/build/foo +yes 'foo' 'bin.v2' /tmp/build/foo/bin.v2 +yes 'foo' '/tmp/bar' Error [1] +no * none --build-dir has no effect, inherited + build dir is used +no * non-empty Error [2] +------------------------------------------------------------------------------- +[1] -- not clear what to do +[2] -- can be made to work, but non-empty build-dir +attribute in non-root Jamfile does not make much sense even without --build-dir diff --git a/src/boost/tools/build/notes/changes.txt b/src/boost/tools/build/notes/changes.txt new file mode 100644 index 000000000..bb98661f1 --- /dev/null +++ b/src/boost/tools/build/notes/changes.txt @@ -0,0 +1,317 @@ +Copyright 2004-2007 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +Milestone 13 (in development) + +Changes in this release: + +The following bugs were fixed: + + - gcc support did not work on HP-UX systems + +Milestone 12 (Oct 1, 2007) + +Changes in this release: + + - The Pathscale, PGI and mipspro compilers are now supported. + - Support for autoconfiguration of toolset based on command-line + toolset=xxxx request, and for default toolset + configuration as a fallback. + - Support for precompiled headers for gcc toolset, + and improvements for msvc. + - Mechanism for removing inherited requirements. + - The 'make' rule support specifying usage-requirements. + - New 'project.extension' rule for declaring standalone + projects. + - New 'conditional' convenience rule. + - New 'glob-tree' rule. + - The 'glob' rule accepts patterns to exclude. + - Inline targets are now marked explicit automatically. + - Toolsets can now implicitly add requirements to + all targets. + - New 'generate' rule. + - The executables produced by the 'run' rule are automatically + removed after run. + - The gcc toolset uses the version obtained by running + the compiler, if no explicit one is provided. + - The sun toolset now supports the 'address-model' feature, + and uses -KPIC for shared libraries. + - Free features on command line affect all targets, not + just 'directly requested' ones. + + +Documentation changes: + + - Installation instructions for Linux distributors. + - Configuration options for all supported C++ compilers + are now documented. + +The following bugs were fixed: + + - The 'cflags' and 'linkflags' now work on Darwin.o + - The intel toolset now works on Windows. + - Fix library search options for CodeWarriour toolset. + - The <install-source-root> could cause duplicate + mkdir commands. + - Numerious fixes in Boost autolink support + - Numerious fixes in Boost.Python support. + - Indirect properties not evaluated in usage requirements. + - Generator that returns a property set but not target is + considered successful. + - On Darwin, when several compiler versions + are configured, -fcoalesce-templates is applied only to + versions that need it. + + +Milestone 11 (Jule 20, 2006) + +Changes in this release: + + - New C++ compilers: IBM xlf, HP aCC, HP CXX, Intel fortran compiler. + - New tools: Qt4 support, MS message compiler and IDL compiler. + - New main targets: 'notfile' and 'cast'. + + - Core changes: + + - Only one file required at top level of a project, named Jamroot. + - Jamfiles can now contain project-specific help messages. + - "Indirect conditional requirements" introduced + (http://tinyurl.com/mn3jp) + - Strip suffix in main target names when computing names of generated + files (URL) + - The 'source-location' project attribute can contain + several directories. + - Usage requirements are propagated not only direct dependents, + but to indirect dependents. + + - Command line option changes (see http://tinyurl.com/zbycz) + - New option --build-dir + - The --clean option cleans only target below the current directory, + not globally. + - New --clean-all option was added. + - New option --debug-building + - Running "bjam some_directory" works even if there's no Jamfile + in the current directory. + + - Toolset improvements: + - Assembling support with gcc, borland and msvc. + - Support amd64/ia64 cross-compiling with msvc. + - Improved, registry-based autodetection for msvc. + - Serialize execution of gcc.link actions + - Precompiled headers supported on MSVC + (Need documentation) + + - New features <warnings> and <warnings-as-errors> + - The 'glob' rule accepts wildcards in directory names. + - The 'stage' rule was renamed to 'install' + (the old name still available for compatibility) + - The <tag> feature can accept user-defined function as value + (URL) + - The 'install' rule can install a directory hierarchy preserving relative + paths. + - The 'install' rule no longer allows to change library + name during install. + - The Jamfile referred via 'use-project' may declare project id different + from the one in 'use-project'. + - The 'using' rule now searches the directory of containing Jamfile. + + +The following bugs were fixed: + + - The <library> feature was ignored for static linking + - Fix #include scanning for C files. + - Child projects were sometimes loaded before parent projects. + - Fix project references with absolute paths on Windows. + - The <dependency> feature was ignored for 'install' targets. + - A generator having the same type in sources and targets was causing hang. + - Use 'icpc' command for Intel, fixing errors with 8.1 and higher. + - Generation of PS files with the FOP tool really produces .PS files. + - No dependency scanning was done for C files. + - The 'constant' and 'path-constant' rules did not accept multi-element + value. + - Don't pass -fcoalesce-templates to gcc on OSX 10.4 + - Fix static lib suffix on OSX. + - Fix rpath setting on Intel/Linux. + - The 'install' rule don't unnecessary scans #includes in installed + headers. + + +Developer visible changes: + + - Ability to customize type's prefix depending on build properties. + - Generator's 'run' method can return usage-requirements. + - Main target rule is automatically declared for each new target type. + - 'Link incompatible' feature attribute was removed + - Generators no longer bypass unhandled sources, they just ignore them. + - If there are several applicable generators, immediately report ambiguity. + Provide a way to explicitly resolve conflicts between generators. + - The 'flags' rule can match absence of feature. + - Great improvement in response files handling + - The 'toolset.flags' rules allows value-less feature to signify + absence of this feature (fix hack-hack). + - Automatically declare main target rule for each declared target type. + - When inheriting types, inherit generators for the base type, as opposed + to using various hacks to invoke base generators when needed. + - Improve diagnostic for "duplicate actual target" and generator ambiguity. + + +Milestone 10 (October 29, 2004) + +Changes in this release: + + Many toolsets were added: Intel, Metrowerks, Comeau, aCC, vacpp. + Documentation was converted to BoostBook and improved. + Performance was improved. + + - Toolsets initialization syntax is much more uniform. Compiler and linker + flags can now be specified. + - The algorithm for computing build properties was improved. Conditional + requirements can be chained, and a number of bugs were fixed. + - Specific order of properties can be specified. + - The main target rules can be called from everywhere, not necessary from + Jamfile. + - Check for "unused sources" removed. + - The <library> feature affects only linking now. + - The <file> feature now works only for libraries. + - Simpler syntax for "searched" libraries was added. + - New <dependency> feature. + + + Unix: + The right order of static libraries on Unix is automatically + computed. + The <hardcode-dll-paths> feature is the default. + gcc: + The -fPIC option is passed when creating shared libraries. + Problems with distcc were solved. + Sun: + It's now possible to use the sun linker (as opposed to gnu), and + to compile C files. + Darwin: + Shared libraries are now supported. + MSVC: Before resource files compilation, the setup script is invoked. + Options deprecated in 8.0 are not longer used. + + +The following bugs were fixed: + + - The <unit-test> rule did not handle the <library> property (!!!!!!) + - Don't add "bin" to the build directory explicitly specified by the user. + - Allow <include-type> to select staged targets, + even with <traverse-dependencies>off. + - Includes for the form '# include <whatever>" did not work. + - (Qt) Add paths to all dependent libs to uic command + line, which helps if the UI files uses plugins. + - Using <toolset-msvc:version>xxx in requirements was broken. + - Error message printed when target can be found is much more clear. + - Inline targets in sources of 'stage' did not work. + - Don't produce 'independent target' warnings on Windows + - (gcc) The <link-runtime>static did not work. + - (gcc) Suppress warnings from the 'ar' tool on some systems. + - (gcc) Don't try to set soname on NT. + +Developer visible changes: + + - Generator priorities are gone, explicit overrides are used. + - 'Active' features were removed + - Support for VMS paths was added. + +Thanks to Christopher Currie, Pedro Ferreira, Philipp Frauenfelder, +Andre Hentz, Jurgen Hunold, Toon Knapen, Johan Nilsson, Alexey Pakhunov, +Brock Peabody, Michael Stevens and Zbynek Winkler who contributed +code to this release. + + +Milestone 9.1 (Nov 6, 2003) + +The following bugs were fixed: + + - The 'unit-test' rule used to ignore <library> properties. + - The gcc toolset used to ignore <threading> property. + +Milestone 9 (Nov 6, 2003) + +Changes in this release + + - Putting library in sources of other library now works even for static + linking, which makes expressing library->library dependency much + simpler. + - Performance was considerably improved. + - Regression testing framework now works on windows. + - The "alias" rule can have usage requirements and passes on usage + requirements of sources. + - The "stage" rule can traverse dependencies. + - Support for "def files" was implemented. + - Targets paths are now shorter. + - Darwin toolset was improved. + +The following bugs were fixed: + + - It was not possible to specify empty suffix for a target type derived + from other type. + - The stage rules used to generate incorrect suffix in some cases. + - It was possible to load Jamfile twice. + - The 'use-project' rule was broken when referring to a child project. + - Use of composite properties in requirements did not work. + +Developer visible changes: + + - New CALC builtin, which considerable improves performance. + - Source layout was reorganized. + - Handling of response file was simplified. + +Thanks to Pedro Ferreira, Kirill Lapshin, Andre Hentz, Paul Lin, +Jurgen Hunold, Christopher Currie, and Brock Peabody, who contributed to +this release. + +Milestone 8 (Oct 15, 2003) + +Changes in this release: + + - A regression testing framework was implemented. + - New <implicit-dependency> feature was added for better handling + of dependencies to generated headers. + - The link-compatibility checks not longer cause projects to be skipped, + and issue warning, not error, for main targets. + - Algorithm for selecting main target alternative was improved. + - The <dependency> feature was renamed to <use>. + - Project root constants were made available in project root itself. + +The following bugs were fixed: + + - failure to recognize shared libraries with version as such + - the 'path-constant' rule was mishandling absolute paths on Windows. + + +Milestone 7 (Sep 11, 2003) + +Changes in this release: + + - Performance was improved. + - Support for Sun and Darwin toolsets was added. + - <tag> feature, which changes the name of target depending of build + variant, was implemented. + - Old-style targets-ids are no longer supported. + - New 'glob' rule allows to easily perform wildcard matching in Jamfile. + - Improve bison/flex support to understand C++. + +The following bugs were fixed: + + - bogus error on use of project default-build attribute with several + main target alternatives. + - broken toolset inheritance + - hard error after skipping a target due to incompatible requirements + - incorrect behaviour of a generator when producing several targets of + the same type + - errors on use of the 'project-root' rule in Jamfile context + - inability to require specific compiler version for a main target. + - incorrect behaviour of "bjam msvc" when msvc is configured with explicit + version. + +Thanks to Christopher Currie, Pedro Ferreira and Michael Stevens, who +contributed to this release. + + + + diff --git a/src/boost/tools/build/notes/relative_source_paths.txt b/src/boost/tools/build/notes/relative_source_paths.txt new file mode 100644 index 000000000..2f0557893 --- /dev/null +++ b/src/boost/tools/build/notes/relative_source_paths.txt @@ -0,0 +1,76 @@ +Copyright 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +Hi, +recently, we had a couple of problems caused by using relative file paths, and +I'd like to discuss what to do. + +Let's use the case from Cdric. Simplified version is: + + exe a : a.cpp dir1/qt_file.h ; + exe b : a.cpp dir2/qt_file.h ; + +Both exes have the same source cpp file but different *.h files -- which are +processed by Qt tools. V2 currently strips directory name from all targets, +so it tries to + + - create "bin/mvsc/debug/moc_qt_file.cpp" from dir1/qt_file.h + - create "bin/msvc/debug/moc_qt_file.cpp" from dir2/qt_file.h + +There are two solutions that I see: + + 1. Rewrite the code like: + + lib aux : a.cpp + exe a : aux dir1/qt_file.h : <location-prefix>a ; + exe b : aux dir2/qt_file.h : <location-prefix>b ; + + This way, two version of moc_qt_file.cpp will be generated to different + places. + + 2. Rewrite the code like: + + obj a_moc : dir1/qt_file.h : <library>/qt//qt ; + exe a : a.cpp a_moc ; + obj b_moc : dir2/qt_file.h : <library>/qt//qt ; + exe b : a.cpp b_moc ; + + Explicitly changing name for the problematic files. + + 3. Generally change V2 so that directory part of source is preserved. This + will generate targets: + "bin/msvc/debug/dir1/moc_qt_file.cpp" and + "bin/msvc/debug/dir2/moc_qt_file.cpp". No problems. + + However, there are some additional questions: + + - What if source has absolute file name? + - What if source is "../../include/qt_file.h"? + + We can ignore directory names in those cases (i.e. use the current + behaviour) but that would be a bit inconsistent. + +Any opinions? + +Pedro Ferreira: + +I think this is a corner case and BB should not try to solve everything +automatically - otherwise it will become really complex. +I don't see a problem in requiring the user to help the build system by +using solutions 1 or 2. +Of course, the better the error reporting, the easier it will be to +find the cause and the cure of the problem. + +TEMPLIE Cedric: + +I agree with Pedro. Solution 1 or 2 is the best way to deal with this +problem. Of course I have a preference for the solution 1, but the +solution 2 has the advantage to work without any modification... + +Toon Knapen: + +I agree. + + diff --git a/src/boost/tools/build/notes/release_procedure.txt b/src/boost/tools/build/notes/release_procedure.txt new file mode 100644 index 000000000..9ed95f1e6 --- /dev/null +++ b/src/boost/tools/build/notes/release_procedure.txt @@ -0,0 +1,83 @@ +Copyright 2003, 2005, 2006 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + + B2 V2 release procedure. + +[ Must be done from a Unix shell ] + +0. Look for all issues for current milestone in the tracker. Close the fixed one, + if not already closed. Move to a later milestone, or fix all the unfixed + ones. + + Make sure that "bjam --version" output is correct. Update version string if + needed. Update bjam version and the version check is necessary. + Check the download locations in "index.html". Check that "last modified" + string in index.html is correct. + +1. Make sure you don't have any local modification, and create SVN directory + + https://svn.boost.org/svn/boost/branches/build/Milestone_X + + Then, copy: + + https://svn.boost.org/svn/boost/trunk/tools/build + https://svn.boost.org/svn/boost/trunk/tools/jam + + to that directory. + +2. Run + + svn co https://svn.boost.org/svn/boost/branches/build/Milestone_X boost-build + +3. Go to "boost-build/build/v2" directory. + +4. Run "./roll.sh". This will create "boost-build.zip" and + "boost-build.tar.bz2" in parent directory, and also upload + new docs to sourceforge. + +5. Unpack "boost-build.tar.bz2", and build jam. + +6. Go to "test" and copy "test-config-example.jam" to "test-config.jam". + If you're not ghost, edit test-config.jam to specify all the right paths. + Run gcc tests: + + python test_all.py gcc --extras + +7. Build all projects in examples-v2, using the bjam binary created at step 4. + Note: "threading=multi" might be needed to build QT examples. + +8. Make SF release: + + - Go to + https://sourceforge.net/project/admin/editpackages.php?group_id=7586 + + - Create new B2 release. Name it 2.0-mXX + + - Upload the changelog. Be sure to turn the "Preserve my pre-formatted + text" checkbox. + + - Rename previously built packages to boost-build-2.0-mXX.tar.bz2 + and boost-build-2.0-mXX.zip. Upload them to the + /incoming directory on ftp://upload.sourceforge.net + + - Add those file to release, edit file properties. + + - In a separate browser, verify changelog is not damaged. + + - In a separate browser, Download the files and verify checksums. + + - In SF file release interface, send email notice. + +9. Announce the release, etc. + +10. Login to SF and update the current-release redirects in + /home/groups/b/bo/boost/htdocs/boost-build2/.htaccess. + +11. If any issues were found during release in this document or in + test-config-example.jam, commit those changes. The release need + not be redone, but changes must be committed. + +12. Set release date in changes.txt and commit. + diff --git a/src/boost/tools/build/src/__init__.py b/src/boost/tools/build/src/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/src/bootstrap.jam b/src/boost/tools/build/src/bootstrap.jam new file mode 100644 index 000000000..98f04896d --- /dev/null +++ b/src/boost/tools/build/src/bootstrap.jam @@ -0,0 +1,18 @@ +# Copyright (c) 2003 Vladimir Prus. +# +# Use, modification and distribution is subject to the Boost Software +# License Version 1.0. (See accompanying file LICENSE.txt or +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This file handles initial phase of B2 loading. +# Boost.Jam has already figured out where B2 is +# and loads this file, which is responsible for initialization +# of basic facilities such a module system and loading the +# main B2 module, build-system.jam. +# +# Exact operation of this module is not interesting, it makes +# sense to look at build-system.jam right away. + +# Load the kernel/bootstrap.jam, which does all the work. +.bootstrap-file = $(.bootstrap-file:D)/kernel/bootstrap.jam ; +include $(.bootstrap-file) ; \ No newline at end of file diff --git a/src/boost/tools/build/src/build-system.jam b/src/boost/tools/build/src/build-system.jam new file mode 100644 index 000000000..8f45391bd --- /dev/null +++ b/src/boost/tools/build/src/build-system.jam @@ -0,0 +1,1087 @@ +# Copyright 2003, 2005, 2007 Dave Abrahams +# Copyright 2006, 2007 Rene Rivera +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This file is part of Boost Build version 2. You can think of it as forming the +# main() routine. It is invoked by the bootstrapping code in bootstrap.jam. + +import build-request ; +import builtin ; +import "class" : new ; +import configure ; +import config-cache ; +import feature ; +import generators ; +import indirect ; +import make ; +import modules ; +import os ; +import path ; +import project ; +import property ; +import property-set ; +import regex ; +import sequence ; +import targets ; +import toolset ; +import utility ; +import version ; +import virtual-target ; + + +################################################################################ +# +# Module global data. +# +################################################################################ + +# Shortcut used in this module for accessing used command-line parameters. +.argv = [ modules.peek : ARGV ] ; + +# Flag indicating we should display additional debugging information related to +# locating and loading Boost Build configuration files. +.debug-config = [ MATCH ^(--debug-configuration)$ : $(.argv) ] ; + +# Virtual targets obtained when building main targets references on the command +# line. When running 'bjam --clean main_target' we want to clean only files +# belonging to that main target so we need to record which targets are produced +# for it. +.results-of-main-targets = ; + +# Was an XML dump requested? +.out-xml = [ MATCH ^--out-xml=(.*)$ : $(.argv) ] ; + +# Default toolset & version to be used in case no other toolset has been used +# explicitly by either the loaded configuration files, the loaded project build +# scripts or an explicit toolset request on the command line. If not specified, +# an arbitrary default will be used based on the current host OS. This value, +# while not strictly necessary, has been added to allow testing Boost-Build's +# default toolset usage functionality. +.default-toolset = ; +.default-toolset-version = ; + + +################################################################################ +# +# Public rules. +# +################################################################################ + +# Returns the property set with the free features from the currently processed +# build request. +# +rule command-line-free-features ( ) +{ + return $(.command-line-free-features) ; +} + + +# Returns the location of the build system. The primary use case is building +# Boost where it is sometimes needed to get the location of other components +# (e.g. BoostBook files) and it is convenient to use locations relative to the +# Boost Build path. +# +rule location ( ) +{ + local r = [ modules.binding build-system ] ; + return $(r:P) ; +} + + +# Sets the default toolset & version to be used in case no other toolset has +# been used explicitly by either the loaded configuration files, the loaded +# project build scripts or an explicit toolset request on the command line. For +# more detailed information see the comment related to used global variables. +# +rule set-default-toolset ( toolset : version ? ) +{ + .default-toolset = $(toolset) ; + .default-toolset-version = $(version) ; +} + +rule add-pre-build-hook ( function ) +{ + .pre-build-hook += [ indirect.make $(function) : [ CALLER_MODULE ] ] ; +} + +rule add-post-build-hook ( function ) +{ + .post-build-hook += [ indirect.make $(function) : [ CALLER_MODULE ] ] ; +} + +# Old names for backwards compatibility +IMPORT build-system : add-pre-build-hook : build-system : set-pre-build-hook ; +IMPORT build-system : add-post-build-hook : build-system : set-post-build-hook ; +EXPORT build-system : set-pre-build-hook set-post-build-hook ; + +################################################################################ +# +# Local rules. +# +################################################################################ + +# Returns actual Jam targets to be used for executing a clean request. +# +local rule actual-clean-targets ( ) +{ + # The cleaning is tricky. Say, if user says 'bjam --clean foo' where 'foo' + # is a directory, then we want to clean targets which are in 'foo' as well + # as those in any children Jamfiles under foo but not in any unrelated + # Jamfiles. To achieve this we first mark all projects explicitly detected + # as targets for this build system run as needing to be cleaned. + for local t in $(targets) + { + if [ class.is-a $(t) : project-target ] + { + local project = [ $(t).project-module ] ; + .should-clean-project.$(project) = true ; + } + } + + # Construct a list of targets explicitly detected on this build system run + # as a result of building main targets. + local targets-to-clean ; + for local t in $(.results-of-main-targets) + { + # Do not include roots or sources. + targets-to-clean += [ virtual-target.traverse $(t) ] ; + } + targets-to-clean = [ sequence.unique $(targets-to-clean) ] ; + + local to-clean ; + for local t in [ virtual-target.all-targets ] + { + # Remove only derived targets and only those asked to be cleaned, + # whether directly or by belonging to one of the removed projects. + local p = [ $(t).project ] ; + if [ $(t).action ] && ( $(t) in $(targets-to-clean) || + [ should-clean-project [ $(p).project-module ] ] ) + { + to-clean += $(t) ; + } + } + + local to-clean-actual ; + for local t in $(to-clean) + { + to-clean-actual += [ $(t).actualize ] ; + } + return $(to-clean-actual) ; +} + + +# Given a target id, try to find and return the corresponding target. This is +# only invoked when there is no Jamfile in ".". This code somewhat duplicates +# code in project-target.find but we can not reuse that code without a +# project-targets instance. +# +local rule find-target ( target-id ) +{ + local split = [ MATCH (.*)//(.*) : $(target-id) ] ; + + local pm ; + if $(split) + { + pm = [ project.find $(split[1]) : "." ] ; + } + else + { + pm = [ project.find $(target-id) : "." ] ; + } + + local result ; + if $(pm) + { + result = [ project.target $(pm) ] ; + } + + if $(split) + { + result = [ $(result).find $(split[2]) ] ; + } + + return $(result) ; +} + + +# Initializes a new configuration module. +# +local rule initialize-config-module ( module-name : location ? ) +{ + project.initialize $(module-name) : $(location) ; + if USER_MODULE in [ RULENAMES ] + { + USER_MODULE $(module-name) ; + } +} + + +# Helper rule used to load configuration files. Loads the first configuration +# file with the given 'filename' at 'path' into module with name 'module-name'. +# Not finding the requested file may or may not be treated as an error depending +# on the must-find parameter. Returns a normalized path to the loaded +# configuration file or nothing if no file was loaded. +# +local rule load-config ( module-name : filename : path + : must-find ? ) +{ + if $(.debug-config) + { + local path-string = $(path) ; + if $(path-string) = "" { path-string = . ; } + ECHO "notice:" Searching '$(path-string)' for $(module-name) + configuration file '$(filename)'. ; + } + local where = [ GLOB $(path) : $(filename) ] ; + if $(where) + { + where = [ NORMALIZE_PATH $(where[1]) ] ; + if $(.debug-config) + { + local where-string = $(where:D) ; + if $(where-string) = "" { where-string = . ; } + where-string = '$(where-string)' ; + ECHO "notice:" Loading $(module-name) configuration file '$(filename)' + from $(where-string:J=" "). ; + } + + # Set source location so that path-constant in config files with + # relative paths work. This is of most importance for + # project-config.jam, but may be used in other config files as well. + local attributes = [ project.attributes $(module-name) ] ; + $(attributes).set source-location : $(where:D) : exact ; + modules.load $(module-name) : $(filename) : $(path) ; + project.load-used-projects $(module-name) ; + } + else if $(must-find) || $(.debug-config) + { + local path-string = $(path) ; + if $(path-string) = "" { path-string = . ; } + path-string = '$(path-string)' ; + path-string = $(path-string:J=" ") ; + if $(must-find) + { + import errors ; + errors.user-error Configuration file '$(filename)' not found "in" + $(path-string). ; + } + ECHO "notice:" Configuration file '$(filename)' not found "in" + $(path-string). ; + } + return $(where) ; +} + +# Parses options of the form --xxx-config=path/to/config.jam +# and environmental variables of the form BOOST_BUILD_XXX_CONFIG. +# If not found, returns an empty list. The option may be +# explicitly set to the empty string, in which case, handle-config-option +# will return "". +# +local rule handle-config-option ( name : env ? ) +{ + local result = [ MATCH ^--$(name)=(.*)$ : $(.argv) ] ; + if ! $(result)-is-defined && $(env) + { + result = [ os.environ $(env) ] ; + } + # Special handling for the case when the OS does not strip the quotes + # around the file name, as is the case when using Cygwin bash. + result = [ utility.unquote $(result[-1]) ] ; + if ! $(result) + { + return $(result) ; + } + # Treat explicitly entered user paths as native OS path + # references and, if non-absolute, root them at the current + # working directory. + result = [ path.make $(result) ] ; + result = [ path.root $(result) [ path.pwd ] ] ; + result = [ path.native $(result) ] ; + return $(result) ; +} + + +# Loads all the configuration files used by Boost Build in the following order: +# +# -- test-config -- +# Loaded only if specified on the command-line using the --test-config +# command-line parameter. It is ok for this file not to exist even if specified. +# If this configuration file is loaded, regular site and user configuration +# files will not be. If a relative path is specified, file is searched for in +# the current folder. +# +# -- all-config -- +# Loaded only if specified on the command-line using the --config command +# line option. If a file name is specified, it must exist and replaces all +# other configuration files. If an empty file name is passed, no configuration +# files will be loaded. +# +# -- site-config -- +# Named site-config.jam by default or may be named explicitly using the +# --site-config command-line option. If named explicitly, the file is found +# relative to the current working directory and must exist. If the default one +# is used then it is searched for in the system root path (Windows), +# /etc (non-Windows), user's home folder or the Boost Build path, in that +# order. Not loaded in case the test-config configuration file is loaded, +# the file is explicitly set to the empty string or the --ignore-site-config +# command-line option is specified. +# +# -- user-config -- +# Named user-config.jam by default or may be named explicitly using the +# --user-config command-line option or the BOOST_BUILD_USER_CONFIG environment +# variable. If named explicitly the file is looked for from the current working +# directory and if the default one is used then it is searched for in the +# user's home directory and the Boost Build path, in that order. Not loaded in +# case either the test-config configuration file is loaded or an empty file name +# is explicitly specified. If the file name has been given explicitly then the +# file must exist. +# +# -- project-config -- +# Named project-config.jam. Looked up in the current working folder and +# then upwards through its parents up to the root folder. It may also be +# named explicitly using the --project-config command-line option. If a file +# is specified explicitly, it is found relative to the current working +# directory and must exist. If an empty file name is passed, project-config +# will not be loaded. +# +# Test configurations have been added primarily for use by Boost Build's +# internal unit testing system but may be used freely in other places as well. +# +local rule load-configuration-files +{ + # Flag indicating that site configuration should not be loaded. + local ignore-site-config = + [ MATCH ^(--ignore-site-config)$ : $(.argv) ] ; + local ignore-user-config ; + local ignore-project-config ; + + initialize-config-module test-config ; + local test-config = [ handle-config-option test-config ] ; + if $(test-config) + { + local where = [ load-config test-config : $(test-config:BS) : + $(test-config:D) ] ; + if $(where) + { + if $(.debug-config) + { + ECHO "notice: Regular site and user configuration files will" ; + ECHO "notice: be ignored due to the test configuration being" + "loaded." ; + } + ignore-site-config = true ; + ignore-user-config = true ; + } + } + + initialize-config-module all-config ; + local all-config = [ handle-config-option config ] ; + if $(all-config) + { + load-config all-config : $(all-config:D=) : $(all-config:D) : required ; + if $(.debug-config) + { + ECHO "notice: Regular configuration files will be ignored due" ; + ECHO "notice: to the global configuration being loaded." ; + } + } + if $(all-config)-is-defined + { + if $(.debug-config) && ! $(all-config) + { + ECHO "notice: Configuration file loading explicitly disabled." ; + } + ignore-site-config = true ; + ignore-user-config = true ; + ignore-project-config = true ; + } + + local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ; + local site-path = /etc $(user-path) ; + if [ os.name ] in NT CYGWIN + { + site-path = [ modules.peek : SystemRoot ] $(user-path) ; + } + + if $(.debug-config) && $(ignore-site-config) = --ignore-site-config + { + ECHO "notice: Site configuration files will be ignored due to the" ; + ECHO "notice: --ignore-site-config command-line option." ; + } + + initialize-config-module site-config ; + if ! $(ignore-site-config) + { + local site-config = [ handle-config-option site-config ] ; + if $(site-config) + { + load-config site-config : $(site-config:D=) : $(site-config:D) + : must-exist ; + } + else if ! $(site-config)-is-defined + { + load-config site-config : site-config.jam : $(site-path) ; + } + else if $(.debug-config) + { + ECHO "notice:" Site configuration file loading explicitly disabled. ; + } + } + + initialize-config-module user-config ; + if ! $(ignore-user-config) + { + local user-config = + [ handle-config-option user-config : BOOST_BUILD_USER_CONFIG ] ; + + if $(user-config) + { + if $(.debug-config) + { + ECHO "notice:" Loading explicitly specified user configuration + "file:" ; + ECHO " $(user-config)" ; + } + + load-config user-config : $(user-config:D=) : $(user-config:D) + : must-exist ; + } + else if ! $(user-config)-is-defined + { + load-config user-config : user-config.jam : $(user-path) ; + } + else if $(.debug-config) + { + ECHO "notice:" User configuration file loading explicitly disabled. ; + } + } + + # We look for project-config.jam from "." upward. I am not sure this is 100% + # right decision, we might as well check for it only alongside the Jamroot + # file. However: + # - We need to load project-config.jam before Jamroot + # - We probably need to load project-config.jam even if there is no Jamroot + # - e.g. to implement automake-style out-of-tree builds. + if ! $(ignore-project-config) + { + local project-config = [ handle-config-option project-config ] ; + if $(project-config) + { + initialize-config-module project-config : $(project-config:D=) ; + load-config project-config : $(project-config:D=) + : $(project-config:D) : must-exist ; + } + else if ! $(project-config)-is-defined + { + local file = [ path.glob "." : project-config.jam ] ; + if ! $(file) + { + file = [ path.glob-in-parents "." : project-config.jam ] ; + } + if $(file) + { + initialize-config-module project-config : $(file:D) ; + load-config project-config : project-config.jam : $(file:D) ; + } + } + else if $(.debug-config) + { + ECHO "notice:" Project configuration file loading explicitly + disabled. ; + } + } + + project.end-load ; +} + + +# Autoconfigure toolsets based on any instances of --toolset=xx,yy,...zz or +# toolset=xx,yy,...zz in the command line. May return additional properties to +# be processed as if they had been specified by the user. +# +local rule process-explicit-toolset-requests +{ + local extra-properties ; + + local option-toolsets = [ regex.split-list [ MATCH ^--toolset=(.*)$ : $(.argv) ] : "," ] ; + local feature-toolsets = [ regex.split-list [ MATCH ^toolset=(.*)$ : $(.argv) ] : "," ] ; + + for local t in $(option-toolsets) $(feature-toolsets) + { + # Parse toolset-version/properties. + local toolset = [ MATCH "([^/]+)/?.*" : $(t) ] ; + local properties = [ feature.expand-subfeatures <toolset>$(toolset) : true ] ; + local toolset-property = [ property.select <toolset> : $(properties) ] ; + local known ; + if $(toolset-property:G=) in [ feature.values <toolset> ] + { + known = true ; + } + + # If the toolset is not known, configure it now. + + # TODO: we should do 'using $(toolset)' in case no version has been + # specified and there are no versions defined for the given toolset to + # allow the toolset to configure its default version. For this we need + # to know how to detect whether a given toolset has any versions + # defined. An alternative would be to do this whenever version is not + # specified but that would require that toolsets correctly handle the + # case when their default version is configured multiple times which + # should be checked for all existing toolsets first. + + if ! $(known) + { + if $(.debug-config) + { + ECHO "notice: [cmdline-cfg] toolset $(toolset) not" + "previously configured; attempting to auto-configure now" ; + } + local t,v = [ MATCH "([^-]+)-?(.+)?" : $(toolset) ] ; + project.push-current ; + toolset.using $(t,v[1]) : $(t,v[2]) ; + project.pop-current ; + } + + # Make sure we get an appropriate property into the build request in + # case toolset has been specified using the "--toolset=..." command-line + # option form. + if ! $(t) in $(.argv) $(feature-toolsets) + { + if $(.debug-config) + { + ECHO "notice:" "[cmdline-cfg]" adding toolset=$(t) to the build + request. ; + } + extra-properties += toolset=$(t) ; + } + } + + return $(extra-properties) ; +} + + +# Returns whether the given project (identifed by its project module) should be +# cleaned because it or any of its parent projects have already been marked as +# needing to be cleaned in this build. As an optimization, will explicitly mark +# all encountered project needing to be cleaned in case thay have not already +# been marked so. +# +local rule should-clean-project ( project ) +{ + if ! $(.should-clean-project.$(project))-is-defined + { + local r = "" ; + if ! [ project.is-jamroot-module $(project) ] + { + local parent = [ project.attribute $(project) parent-module ] ; + if $(parent) + { + r = [ should-clean-project $(parent) ] ; + } + } + .should-clean-project.$(project) = $(r) ; + } + + return $(.should-clean-project.$(project)) ; +} + + +################################################################################ +# +# main() +# ------ +# +################################################################################ + +{ + if --version in $(.argv) + { + version.print ; + EXIT ; + } + + version.verify-engine-version ; + + load-configuration-files ; + + # Load explicitly specified toolset modules. + local extra-properties = [ process-explicit-toolset-requests ] ; + + # Load the actual project build script modules. We always load the project + # in the current folder so 'use-project' directives have any chance of being + # seen. Otherwise, we would not be able to refer to subprojects using target + # ids. + local current-project ; + { + local current-module = [ project.find "." : "." ] ; + if $(current-module) + { + current-project = [ project.target $(current-module) ] ; + } + } + + # Load the default toolset module if no other has already been specified. + if ! [ feature.values <toolset> ] + { + local default-toolset = $(.default-toolset) ; + local default-toolset-version = ; + if $(default-toolset) + { + default-toolset-version = $(.default-toolset-version) ; + } + else + { + default-toolset = gcc ; + if [ os.name ] = NT + { + default-toolset = msvc ; + } + else if [ os.name ] = VMS + { + default-toolset = vmsdecc ; + } + else if [ os.name ] = MACOSX + { + default-toolset = clang ; + } + } + + ECHO "warning: No toolsets are configured." ; + ECHO "warning: Configuring default toolset" \"$(default-toolset)\". ; + ECHO "warning: If the default is wrong, your build may not work correctly." ; + ECHO "warning: Use the \"toolset=xxxxx\" option to override our guess." ; + ECHO "warning: For more configuration options, please consult" ; + ECHO "warning: https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration" ; + + toolset.using $(default-toolset) : $(default-toolset-version) ; + } + + + # Parse command line for targets and properties. Note that this requires + # that all project files already be loaded. + # FIXME: This is not entirely true. Additional project files may be loaded + # only later via the project.find() rule when dereferencing encountered + # target ids containing explicit project references. See what to do about + # those as such 'lazy loading' may cause problems that are then extremely + # difficult to debug. + local build-request = [ build-request.from-command-line $(.argv) + $(extra-properties) ] ; + local target-ids = [ $(build-request).get-at 1 ] ; + local properties = [ $(build-request).get-at 2 ] ; + + + # Check that we actually found something to build. + if ! $(current-project) && ! $(target-ids) + { + import errors ; + errors.user-error no Jamfile "in" current directory found, and no target + references specified. ; + } + + + # Flags indicating that this build system run has been started in order to + # clean existing instead of create new targets. Note that these are not the + # final flag values as they may get changed later on due to some special + # targets being specified on the command line. + local clean ; if "--clean" in $(.argv) { clean = true ; } + local cleanall ; if "--clean-all" in $(.argv) { cleanall = true ; } + + + # List of explicitly requested files to build. Any target references read + # from the command line parameter not recognized as one of the targets + # defined in the loaded Jamfiles will be interpreted as an explicitly + # requested file to build. If any such files are explicitly requested then + # only those files and the targets they depend on will be built and they + # will be searched for among targets that would have been built had there + # been no explicitly requested files. + local explicitly-requested-files + + + # List of Boost Build meta-targets, virtual-targets and actual Jam targets + # constructed in this build system run. + local targets ; + local virtual-targets ; + local actual-targets ; + + + # Process each target specified on the command-line and convert it into + # internal Boost Build target objects. Detect special clean target. If no + # main Boost Build targets were explicitly requested use the current project + # as the target. + for local id in $(target-ids) + { + if $(id) = clean + { + clean = true ; + } + else + { + local t ; + if $(current-project) + { + t = [ $(current-project).find $(id) : no-error ] ; + } + else + { + t = [ find-target $(id) ] ; + } + + if ! $(t) + { + ECHO "notice: could not find main target" $(id) ; + ECHO "notice: assuming it is a name of file to create." ; + explicitly-requested-files += $(id) ; + } + else + { + targets += $(t) ; + } + } + } + if ! $(targets) + { + targets += [ project.target [ project.module-name "." ] ] ; + } + + if [ option.get dump-generators : : true ] + { + generators.dump ; + } + + # We wish to put config.log in the build directory corresponding to Jamroot, + # so that the location does not differ depending on the directory we run the + # build from. The amount of indirection necessary here is scary. + local first-project = [ $(targets[0]).project ] ; + local first-project-root-location = [ $(first-project).get project-root ] ; + local first-project-root-module = [ project.load + $(first-project-root-location) ] ; + local first-project-root = [ project.target $(first-project-root-module) ] ; + local first-build-build-dir = [ $(first-project-root).build-dir ] ; + configure.set-log-file $(first-build-build-dir)/config.log ; + config-cache.load $(first-build-build-dir)/project-cache.jam ; + + # Expand properties specified on the command line into multiple property + # sets consisting of all legal property combinations. Each expanded property + # set will be used for a single build run. E.g. if multiple toolsets are + # specified then requested targets will be built with each of them. + # The expansion is being performed as late as possible so that the feature + # validation is performed after all necessary modules (including project targets + # on the command line) have been loaded. + if $(properties) + { + local cli_properties = [ build-request.convert-command-line-elements $(properties) ] ; + if $(cli_properties) + { + expanded += $(cli_properties) ; + expanded = [ build-request.expand-no-defaults $(expanded) ] ; + local xexpanded ; + for local e in $(expanded) + { + xexpanded += [ property-set.create [ feature.split $(e) ] ] ; + } + expanded = $(xexpanded) ; + } + else + { + expanded = [ property-set.empty ] ; + } + } + else + { + expanded = [ property-set.empty ] ; + } + + # Now that we have a set of targets to build and a set of property sets to + # build the targets with, we can start the main build process by using each + # property set to generate virtual targets from all of our listed targets + # and any of their dependants. + for local p in $(expanded) + { + .command-line-free-features = [ property-set.create [ $(p).free ] ] ; + for local t in $(targets) + { + local g = [ $(t).generate $(p) ] ; + if ! [ class.is-a $(t) : project-target ] + { + .results-of-main-targets += $(g[2-]) ; + } + virtual-targets += $(g[2-]) ; + } + } + + + # Convert collected virtual targets into actual raw Jam targets. + for t in $(virtual-targets) + { + actual-targets += [ $(t).actualize ] ; + } + + config-cache.save ; + + + # If XML data output has been requested prepare additional rules and targets + # so we can hook into Jam to collect build data while its building and have + # it trigger the final XML report generation after all the planned targets + # have been built. + if $(.out-xml) + { + # Get a qualified virtual target name. + rule full-target-name ( target ) + { + local name = [ $(target).name ] ; + local project = [ $(target).project ] ; + local project-path = [ $(project).get location ] ; + return $(project-path)//$(name) ; + } + + # Generate an XML file containing build statistics for each constituent. + # + rule out-xml ( xml-file : constituents * ) + { + # Prepare valid XML header and footer with some basic info. + local nl = " +" ; + local os = [ modules.peek : OS OSPLAT JAMUNAME ] "" ; + local timestamp = [ modules.peek : JAMDATE ] ; + local cwd = [ PWD ] ; + local command = $(.argv) ; + local bb-version = [ version.boost-build ] ; + .header on $(xml-file) = + "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "$(nl)<build format=\"1.0\" version=\"$(bb-version)\">" + "$(nl) <os name=\"$(os[1])\" platform=\"$(os[2])\"><![CDATA[$(os[3-]:J= )]]></os>" + "$(nl) <timestamp><![CDATA[$(timestamp)]]></timestamp>" + "$(nl) <directory><![CDATA[$(cwd)]]></directory>" + "$(nl) <command><![CDATA[\"$(command:J=\" \")\"]]></command>" + ; + .footer on $(xml-file) = + "$(nl)</build>" ; + + # Generate the target dependency graph. + .contents on $(xml-file) += + "$(nl) <targets>" ; + for local t in [ virtual-target.all-targets ] + { + local action = [ $(t).action ] ; + if $(action) + # If a target has no action, it has no dependencies. + { + local name = [ full-target-name $(t) ] ; + local sources = [ $(action).sources ] ; + local dependencies ; + for local s in $(sources) + { + dependencies += [ full-target-name $(s) ] ; + } + + local path = [ $(t).path ] ; + local jam-target = [ $(t).actual-name ] ; + + .contents on $(xml-file) += + "$(nl) <target>" + "$(nl) <name><![CDATA[$(name)]]></name>" + "$(nl) <dependencies>" + "$(nl) <dependency><![CDATA[$(dependencies)]]></dependency>" + "$(nl) </dependencies>" + "$(nl) <path><![CDATA[$(path)]]></path>" + "$(nl) <jam-target><![CDATA[$(jam-target)]]></jam-target>" + "$(nl) </target>" + ; + } + } + .contents on $(xml-file) += + "$(nl) </targets>" ; + + # Build $(xml-file) after $(constituents). Do so even if a + # constituent action fails and regenerate the xml on every bjam run. + INCLUDES $(xml-file) : $(constituents) ; + ALWAYS $(xml-file) ; + __ACTION_RULE__ on $(xml-file) = + build-system.out-xml.generate-action ; + out-xml.generate $(xml-file) ; + } + + # The actual build actions are here; if we did this work in the actions + # clause we would have to form a valid command line containing the + # result of @(...) below (the name of the XML file). + # + rule out-xml.generate-action ( args * : xml-file + : command status start end user system : output ? ) + { + local contents = + [ on $(xml-file) return $(.header) $(.contents) $(.footer) ] ; + local f = @($(xml-file):E=$(contents)) ; + } + + # Nothing to do here; the *real* actions happen in + # out-xml.generate-action. + actions quietly out-xml.generate { } + + # Define the out-xml file target, which depends on all the targets so + # that it runs the collection after the targets have run. + out-xml $(.out-xml) : $(actual-targets) ; + + # Set up a global __ACTION_RULE__ that records all the available + # statistics about each actual target in a variable "on" the --out-xml + # target. + # + rule out-xml.collect ( xml-file : target : command status start end user + system : output ? ) + { + local nl = " +" ; + # Open the action with some basic info. + .contents on $(xml-file) += + "$(nl) <action status=\"$(status)\" start=\"$(start)\" end=\"$(end)\" user=\"$(user)\" system=\"$(system)\">" ; + + # If we have an action object we can print out more detailed info. + local action = [ on $(target) return $(.action) ] ; + if $(action) + { + local action-name = [ $(action).action-name ] ; + local action-sources = [ $(action).sources ] ; + local action-props = [ $(action).properties ] ; + + # The qualified name of the action which we created the target. + .contents on $(xml-file) += + "$(nl) <name><![CDATA[$(action-name)]]></name>" ; + + # The sources that made up the target. + .contents on $(xml-file) += + "$(nl) <sources>" ; + for local source in $(action-sources) + { + local source-actual = [ $(source).actual-name ] ; + .contents on $(xml-file) += + "$(nl) <source><![CDATA[$(source-actual)]]></source>" ; + } + .contents on $(xml-file) += + "$(nl) </sources>" ; + + # The properties that define the conditions under which the + # target was built. + .contents on $(xml-file) += + "$(nl) <properties>" ; + for local prop in [ $(action-props).raw ] + { + local prop-name = [ MATCH ^<(.*)>$ : $(prop:G) ] ; + .contents on $(xml-file) += + "$(nl) <property name=\"$(prop-name)\"><![CDATA[$(prop:G=)]]></property>" ; + } + .contents on $(xml-file) += + "$(nl) </properties>" ; + } + + local locate = [ on $(target) return $(LOCATE) ] ; + locate ?= "" ; + .contents on $(xml-file) += + "$(nl) <jam-target><![CDATA[$(target)]]></jam-target>" + "$(nl) <path><![CDATA[$(target:G=:R=$(locate))]]></path>" + "$(nl) <command><![CDATA[$(command)]]></command>" + "$(nl) <output><![CDATA[$(output)]]></output>" ; + .contents on $(xml-file) += + "$(nl) </action>" ; + } + + # When no __ACTION_RULE__ is set "on" a target, the search falls back to + # the global module. + module + { + __ACTION_RULE__ = build-system.out-xml.collect + [ modules.peek build-system : .out-xml ] ; + } + + IMPORT + build-system : + out-xml.collect + out-xml.generate-action + : : + build-system.out-xml.collect + build-system.out-xml.generate-action + ; + } + + local j = [ option.get jobs ] ; + if $(j) + { + modules.poke : PARALLELISM : $(j) ; + } + + local k = [ option.get keep-going : true : true ] ; + if $(k) in "on" "yes" "true" + { + modules.poke : KEEP_GOING : 1 ; + } + else if $(k) in "off" "no" "false" + { + modules.poke : KEEP_GOING : 0 ; + } + else + { + EXIT "error: Invalid value for the --keep-going option" ; + } + + # The 'all' pseudo target is not strictly needed expect in the case when we + # use it below but people often assume they always have this target + # available and do not declare it themselves before use which may cause + # build failures with an error message about not being able to build the + # 'all' target. + NOTFILE all ; + + # And now that all the actual raw Jam targets and all the dependencies + # between them have been prepared all that is left is to tell Jam to update + # those targets. + if $(explicitly-requested-files) + { + # Note that this case can not be joined with the regular one when only + # exact Boost Build targets are requested as here we do not build those + # requested targets but only use them to construct the dependency tree + # needed to build the explicitly requested files. + UPDATE $(explicitly-requested-files:G=e) $(.out-xml) ; + } + else if $(cleanall) + { + UPDATE clean-all ; + } + else if $(clean) + { + common.Clean clean : [ actual-clean-targets ] ; + UPDATE clean ; + } + else + { + configure.print-configure-checks-summary ; + + for local function in $(.pre-build-hook) + { + indirect.call $(function) ; + } + + DEPENDS all : $(actual-targets) ; + if UPDATE_NOW in [ RULENAMES ] + { + local ok = [ UPDATE_NOW all ] ; + # Force sequence updating of regular targets, then the xml + # log output target. To ensure the output records all built + # as otherwise if could execute out-of-sequence when + # doing parallel builds. + if $(.out-xml) + { + UPDATE_NOW $(.out-xml) : : ignore-minus-n ; + } + for local function in $(.post-build-hook) + { + indirect.call $(function) $(ok) ; + } + # Prevent automatic update of the 'all' target, now that we have + # explicitly updated what we wanted. + UPDATE ; + } + else + { + UPDATE all $(.out-xml) ; + } + } +} diff --git a/src/boost/tools/build/src/build/__init__.py b/src/boost/tools/build/src/build/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/src/build/ac.jam b/src/boost/tools/build/src/build/ac.jam new file mode 100644 index 000000000..02ae62bdb --- /dev/null +++ b/src/boost/tools/build/src/build/ac.jam @@ -0,0 +1,326 @@ +# Copyright (c) 2010 Vladimir Prus. +# Copyright (c) 2013 Steven Watanabe +# Copyright (c) 2021 Rene Ferdinand Rivera Morell +# +# Use, modification and distribution is subject to the Boost Software +# License Version 1.0. (See accompanying file LICENSE.txt or +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +import property-set ; +import path ; +import modules ; +import "class" ; +import errors ; +import configure ; +import feature ; +import project ; +import virtual-target ; +import generators ; +import property ; +import print ; +import regex ; + +project.initialize $(__name__) ; +.project = [ project.current ] ; +project ac ; + +feature.feature ac.print-text : : free ; + +rule generate-include ( target : sources * : properties * ) +{ + print.output $(target) ; + local text = [ property.select <ac.print-text> : $(properties) ] ; + if $(text) + { + print.text $(text:G=) : true ; + } + else + { + local header = [ property.select <include> : $(properties) ] ; + print.text "#include <$(header:G=)>\n" : true ; + } +} + +rule generate-main ( target : sources * : properties * ) +{ + print.output $(target) ; + print.text "int main() {}" : true ; +} + +rule find-include-path ( properties : header : provided-path ? : test-source ? ) +{ + if $(provided-path) && [ path.exists [ path.root $(header) $(provided-path) ] ] + { + return $(provided-path) ; + } + else + { + local a = [ class.new action : ac.generate-include : [ property-set.create <include>$(header) <ac.print-text>$(test-source) ] ] ; + # Create a new CPP target named after the header. + # Replace dots (".") in target basename for portability. + local basename = [ regex.replace $(header:D=) "[.]" "_" ] ; + local header-target = $(header:S=:B=$(basename)) ; + local cpp = [ class.new file-target $(header-target:S=.cpp) exact : CPP : $(.project) : $(a) ] ; + cpp = [ virtual-target.register $(cpp) ] ; + $(cpp).root true ; + local result = [ generators.construct $(.project) $(header-target) : OBJ : $(properties) : $(cpp) : true ] ; + configure.maybe-force-rebuild $(result[2-]) ; + local jam-targets ; + for local t in $(result[2-]) + { + jam-targets += [ $(t).actualize ] ; + } + if [ UPDATE_NOW $(jam-targets) : [ modules.peek configure : .log-fd ] + : ignore-minus-n ] + { + return %default ; + } + } +} + +rule construct-library ( name : property-set : provided-path ? ) +{ + local lib-props = [ $(property-set).add-raw <name>$(name) <search>$(provided-path) ] ; + return [ generators.construct $(.project) lib-$(name) + : SEARCHED_LIB : $(lib-props) : : true ] ; +} + + +rule find-library ( properties : names + : provided-path ? ) +{ + local result ; + if [ $(properties).get <link> ] = shared + { + link-opts = <link>shared <link>static ; + } + else + { + link-opts = <link>static <link>shared ; + } + while $(link-opts) + { + local names-iter = $(names) ; + properties = [ $(properties).refine [ property-set.create $(link-opts[1]) ] ] ; + while $(names-iter) + { + local name = $(names-iter[1]) ; + local lib = [ construct-library $(name) : $(properties) : $(provided-path) ] ; + local a = [ class.new action : ac.generate-main : + [ property-set.empty ] ] ; + local main.cpp = [ virtual-target.register + [ class.new file-target main-$(name).cpp exact : CPP : $(.project) : $(a) ] ] ; + $(main.cpp).root true ; + local test = [ generators.construct $(.project) $(name) : EXE + : [ $(properties).add $(lib[1]) ] : $(main.cpp) $(lib[2-]) + : true ] ; + configure.maybe-force-rebuild $(test[2-]) ; + local jam-targets ; + for t in $(test[2-]) + { + jam-targets += [ $(t).actualize ] ; + } + if [ UPDATE_NOW $(jam-targets) : [ modules.peek configure : .log-fd ] + : ignore-minus-n ] + { + result = $(name) $(link-opts[1]) ; + names-iter = ; link-opts = ; # break + } + names-iter = $(names-iter[2-]) ; + } + link-opts = $(link-opts[2-]) ; + } + return $(result) ; +} + +class ac-library : basic-target +{ + import errors ; + import indirect ; + import virtual-target ; + import ac ; + import configure ; + import config-cache ; + import os ; + + rule __init__ ( name : project : requirements * : include-path ? : library-path ? : library-name ? ) + { + basic-target.__init__ $(name) : $(project) : : $(requirements) ; + + reconfigure $(include-path) : $(library-path) : $(library-name) ; + } + + rule set-header ( header ) + { + self.header = $(header) ; + } + + rule set-default-names ( names + ) + { + self.default-names = $(names) ; + } + + rule set-header-test ( source ) + { + self.header-test = $(source) ; + } + + rule reconfigure ( include-path ? : library-path ? : library-name ? ) + { + if $(include-path) || $(library-path) || $(library-name) + { + check-not-configured ; + + self.include-path = $(include-path) ; + self.library-path = $(library-path) ; + self.library-name = $(library-name) ; + } + } + + rule set-target ( target ) + { + check-not-configured ; + self.target = $(target) ; + } + + rule check-not-configured ( ) + { + if $(self.include-path) || $(self.library-path) || $(self.library-name) || $(self.target) + { + errors.user-error [ name ] "is already configured" ; + } + } + + rule construct ( name : sources * : property-set ) + { + if $(self.target) + { + return [ $(self.target).generate $(property-set) ] ; + } + else + { + local use-environment ; + if ! $(self.library-name) && ! $(self.include-path) && ! $(self.library-path) + { + use-environment = true ; + } + local libnames = $(self.library-name) ; + if ! $(libnames) && $(use-environment) + { + libnames = [ os.environ $(name:U)_NAME ] ; + # Backward compatibility only. + libnames ?= [ os.environ $(name:U)_BINARY ] ; + } + libnames ?= $(self.default-names) ; + + local include-path = $(self.include-path) ; + if ! $(include-path) && $(use-environment) + { + include-path = [ os.environ $(name:U)_INCLUDE ] ; + } + + local library-path = $(self.library-path) ; + if ! $(library-path) && $(use-environment) + { + library-path = [ os.environ $(name:U)_LIBRARY_PATH ] ; + # Backwards compatibility only + library-path ?= [ os.environ $(name:U)_LIBPATH ] ; + } + + local relevant = [ property.select [ configure.get-relevant-features ] <link> : + [ $(property-set).raw ] ] ; + local min = [ property.as-path [ SORT [ feature.minimize $(relevant) ] ] ] ; + + local key = ac-library-$(name)-$(relevant:J=-) ; + local lookup = [ config-cache.get $(key) ] ; + + if $(lookup) + { + if $(lookup) = missing + { + configure.log-library-search-result $(name) : "no (cached)" $(min) ; + return [ property-set.empty ] ; + } + else + { + local includes = $(lookup[1]) ; + if $(includes) = %default + { + includes = ; + } + local library = [ ac.construct-library $(lookup[2]) : + [ $(property-set).refine [ property-set.create $(lookup[3]) ] ] : $(library-path) ] ; + configure.log-library-search-result $(name) : "yes (cached)" $(min) ; + return [ $(library[1]).add-raw <include>$(includes) ] $(library[2-]) ; + } + } + else + { + local includes = [ ac.find-include-path $(property-set) : $(self.header) : $(include-path) : $(self.header-test) ] ; + local library = [ ac.find-library $(property-set) : $(libnames) : $(library-path) ] ; + if $(includes) && $(library) + { + config-cache.set $(key) : $(includes) $(library) ; + if $(includes) = %default + { + includes = ; + } + library = [ ac.construct-library $(library[1]) : + [ $(property-set).refine [ property-set.create $(library[2]) ] ] : $(library-path) ] ; + configure.log-library-search-result $(name) : "yes" $(min) ; + return [ $(library[1]).add-raw <include>$(includes) ] $(library[2-]) ; + } + else + { + config-cache.set $(key) : missing ; + configure.log-library-search-result $(name) : "no" $(min) ; + return [ property-set.empty ] ; + } + } + } + } +} + +class check-library-worker +{ + import property-set ; + import targets ; + import property ; + + rule __init__ ( target : true-properties * : false-properties * ) + { + self.target = $(target) ; + self.true-properties = $(true-properties) ; + self.false-properties = $(false-properties) ; + } + + rule check ( properties * ) + { + local choosen ; + local t = [ targets.current ] ; + local p = [ $(t).project ] ; + local ps = [ property-set.create $(properties) ] ; + ps = [ $(ps).propagated ] ; + local generated = + [ targets.generate-from-reference $(self.target) : $(p) : $(ps) ] ; + if $(generated[2]) + { + choosen = $(self.true-properties) ; + } + else + { + choosen = $(self.false-properties) ; + } + return [ property.evaluate-conditionals-in-context $(choosen) : + $(properties) ] ; + } +} + +rule check-library ( target : true-properties * : false-properties * ) +{ + local instance = [ class.new check-library-worker $(target) : + $(true-properties) : $(false-properties) ] ; + return <conditional>@$(instance).check + [ property.evaluate-conditional-relevance + $(true-properties) $(false-properties) + : [ configure.get-relevant-features ] <link> ] ; +} diff --git a/src/boost/tools/build/src/build/alias.jam b/src/boost/tools/build/src/build/alias.jam new file mode 100644 index 000000000..6562ccccf --- /dev/null +++ b/src/boost/tools/build/src/build/alias.jam @@ -0,0 +1,82 @@ +# Copyright 2003, 2004, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This module defines the 'alias' rule and the associated target class. +# +# Alias is just a main target which returns its source targets without any +# processing. For example: +# +# alias bin : hello test_hello ; +# alias lib : helpers xml_parser ; +# +# Another important use of 'alias' is to conveniently group source files: +# +# alias platform-src : win.cpp : <os>NT ; +# alias platform-src : linux.cpp : <os>LINUX ; +# exe main : main.cpp platform-src ; +# +# Lastly, it is possible to create a local alias for some target, with different +# properties: +# +# alias big_lib : : @/external_project/big_lib/<link>static ; +# + +import "class" : new ; +import param ; +import project ; +import property-set ; +import targets ; + + +class alias-target-class : basic-target +{ + rule __init__ ( name : project : sources * : requirements * + : default-build * : usage-requirements * ) + { + basic-target.__init__ $(name) : $(project) : $(sources) : + $(requirements) : $(default-build) : $(usage-requirements) ; + } + + rule construct ( name : source-targets * : property-set ) + { + return [ property-set.empty ] $(source-targets) ; + } + + rule compute-usage-requirements ( subvariant ) + { + local base = [ basic-target.compute-usage-requirements $(subvariant) ] ; + return [ $(base).add [ $(subvariant).sources-usage-requirements ] ] ; + } + + rule skip-from-usage-requirements ( ) + { + } +} + + +# Declares the 'alias' target. It will process its sources virtual-targets by +# returning them unaltered as its own constructed virtual-targets. +# +rule alias ( name : sources * : requirements * : default-build * : + usage-requirements * ) +{ + param.handle-named-params + sources requirements default-build usage-requirements ; + + local project = [ project.current ] ; + + targets.main-target-alternative + [ new alias-target-class $(name) : $(project) + : [ targets.main-target-sources $(sources) : $(name) : no-renaming ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) + ] + : [ targets.main-target-usage-requirements $(usage-requirements) : + $(project) ] + ] ; +} + + +IMPORT $(__name__) : alias : : alias ; diff --git a/src/boost/tools/build/src/build/alias.py b/src/boost/tools/build/src/build/alias.py new file mode 100755 index 000000000..ec9914f20 --- /dev/null +++ b/src/boost/tools/build/src/build/alias.py @@ -0,0 +1,75 @@ +# Copyright 2003, 2004, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Status: ported (danielw) +# Base revision: 56043 + +# This module defines the 'alias' rule and associated class. +# +# Alias is just a main target which returns its source targets without any +# processing. For example:: +# +# alias bin : hello test_hello ; +# alias lib : helpers xml_parser ; +# +# Another important use of 'alias' is to conveniently group source files:: +# +# alias platform-src : win.cpp : <os>NT ; +# alias platform-src : linux.cpp : <os>LINUX ; +# exe main : main.cpp platform-src ; +# +# Lastly, it's possible to create local alias for some target, with different +# properties:: +# +# alias big_lib : : @/external_project/big_lib/<link>static ; +# + +import targets +import property_set +from b2.manager import get_manager + +from b2.util import metatarget, is_iterable_typed + +class AliasTarget(targets.BasicTarget): + + def __init__(self, *args): + targets.BasicTarget.__init__(self, *args) + + def construct(self, name, source_targets, properties): + if __debug__: + from .virtual_target import VirtualTarget + assert isinstance(name, basestring) + assert is_iterable_typed(source_targets, VirtualTarget) + assert isinstance(properties, property_set.PropertySet) + return [property_set.empty(), source_targets] + + def compute_usage_requirements(self, subvariant): + if __debug__: + from .virtual_target import Subvariant + assert isinstance(subvariant, Subvariant) + base = targets.BasicTarget.compute_usage_requirements(self, subvariant) + # Add source's usage requirement. If we don't do this, "alias" does not + # look like 100% alias. + return base.add(subvariant.sources_usage_requirements()) + +@metatarget +def alias(name, sources=[], requirements=[], default_build=[], usage_requirements=[]): + assert isinstance(name, basestring) + assert is_iterable_typed(sources, basestring) + assert is_iterable_typed(requirements, basestring) + assert is_iterable_typed(default_build, basestring) + assert is_iterable_typed(usage_requirements, basestring) + project = get_manager().projects().current() + targets = get_manager().targets() + + targets.main_target_alternative(AliasTarget( + name, project, + targets.main_target_sources(sources, name, no_renaming=True), + targets.main_target_requirements(requirements or [], project), + targets.main_target_default_build(default_build, project), + targets.main_target_usage_requirements(usage_requirements or [], project))) + +# Declares the 'alias' target. It will build sources, and return them unaltered. +get_manager().projects().add_rule("alias", alias) + diff --git a/src/boost/tools/build/src/build/build-request.jam b/src/boost/tools/build/src/build/build-request.jam new file mode 100644 index 000000000..6535e118a --- /dev/null +++ b/src/boost/tools/build/src/build/build-request.jam @@ -0,0 +1,418 @@ +# Copyright 2002 Dave Abrahams +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import "class" : new ; +import sequence ; +import set ; +import regex ; +import feature ; +import property ; +import container ; +import string ; + + +# Transform property-set by applying f to each component property. +# +local rule apply-to-property-set ( f property-set ) +{ + local properties = [ feature.split $(property-set) ] ; + return [ string.join [ $(f) $(properties) ] : / ] ; +} + + +# Expand the given build request by combining all property-sets which do not +# specify conflicting non-free features. Expects all the project files to +# already be loaded. +# +rule expand-no-defaults ( property-sets * ) +{ + # First make all features and subfeatures explicit. + local expanded-property-sets = [ sequence.transform apply-to-property-set + feature.expand-subfeatures : $(property-sets) ] ; + + # Now combine all of the expanded property-sets + local product = [ x-product $(expanded-property-sets) : $(feature-space) ] ; + + return $(product) ; +} + + +# Update the list of expected conflicts based on the new +# features. +# +local rule remove-conflicts ( conflicts * : features * ) +{ + local result ; + for local c in $(conflicts) + { + if ! [ set.intersection [ regex.split $(c) "/" ] : $(features) ] + { + result += $(c) ; + } + } + return $(result) ; +} + + +# Implementation of x-product, below. Expects all the project files to already +# be loaded. +# +local rule x-product-aux ( property-sets + ) +{ + local result ; + local p = [ feature.split $(property-sets[1]) ] ; + local f = [ set.difference $(p:G) : [ feature.free-features ] ] ; + local seen ; + local extra-conflicts ; + + # No conflict with things used at a higher level? + if ! [ set.intersection $(f) : $(x-product-used) ] + { + local x-product-seen ; + local x-product-conflicts = + [ remove-conflicts $(x-product-conflicts) : $(f) ] ; + { + # Do not mix in any conflicting features. + local x-product-used = $(x-product-used) $(f) ; + + if $(property-sets[2]) + { + local rest = [ x-product-aux $(property-sets[2-]) ] ; + result = $(property-sets[1])/$(rest) ; + } + if ! $(x-product-conflicts) + { + result ?= $(property-sets[1]) ; + } + } + + # If we did not encounter a conflicting feature lower down, do not + # recurse again. + if ! [ set.intersection $(f) : $(x-product-seen) ] + || [ remove-conflicts $(x-product-conflicts) : $(x-product-seen) ] + { + property-sets = ; + } + else + { + # A property is only allowed to be absent if it conflicts + # with either a higher or lower layer. We don't need to + # bother setting this if we already know that we don't need + # to recurse again. + extra-conflicts = $(f:J=/) ; + } + + seen = $(x-product-seen) ; + } + + if $(property-sets[2]) + { + # Lower layers expansion must conflict with this + local x-product-conflicts = $(x-product-conflicts) $(extra-conflicts) ; + + result += [ x-product-aux $(property-sets[2-]) ] ; + } + + # Note that we have seen these features so that higher levels will recurse + # again without them set. + x-product-seen += $(f) $(seen) ; + return $(result) ; +} + + +# Return the cross-product of all elements of property-sets, less any that would +# contain conflicting values for single-valued features. Expects all the project +# files to already be loaded. +# +# Formal definition: +# Returns all maximum non-conflicting subsets of property-sets. +# The result is a list of all property-sets p such that +# 1. p is composed by joining a subset of property-sets without removing +# duplicates +# 2. p contains at most one instance of every single-valued feature +# 3. Adding any additional element of property-sets to p be would +# violate (2) +local rule x-product ( property-sets * ) +{ + if $(property-sets).non-empty + { + # Prepare some "scoped globals" that can be used by the implementation + # function, x-product-aux. + local x-product-seen x-product-used x-product-conflicts ; + return [ x-product-aux $(property-sets) : $(feature-space) ] ; + } + # Otherwise return empty. +} + + +# Returns true if either 'v' or the part of 'v' before the first '-' symbol is +# an implicit value. Expects all the project files to already be loaded. +# +local rule looks-like-implicit-value ( v ) +{ + if [ feature.is-implicit-value $(v) ] + { + return true ; + } + else + { + local split = [ regex.split $(v) - ] ; + if [ feature.is-implicit-value $(split[1]) ] + { + return true ; + } + } +} + + +# Takes the command line tokens (such as taken from the ARGV rule) and +# constructs a build request from them. Returns a vector of two vectors (where +# "vector" means container.jam's "vector"). First is the set of targets +# specified in the command line, and second is the set of requested build +# properties. Expects all the project files to already be loaded. +# +rule from-command-line ( command-line * ) +{ + local targets ; + local properties ; + + command-line = $(command-line[2-]) ; + local skip-next = ; + for local e in $(command-line) + { + if $(skip-next) + { + skip-next = ; + } + else if ! [ MATCH ^(-) : $(e) ] + { + # Build request spec either has "=" in it or completely consists of + # implicit feature values. + local fs = feature-space ; + if [ MATCH "(.*=.*)" : $(e) ] + || [ looks-like-implicit-value $(e:D=) : $(feature-space) ] + { + properties += $(e) ; + } + else if $(e) + { + targets += $(e) ; + } + } + else if [ MATCH "^(-[-ldjfsto])$" : $(e) ] + { + skip-next = true ; + } + } + return [ new vector + [ new vector $(targets) ] + [ new vector $(properties) ] ] ; +} + + +# Converts a list of elements of command line build request specification into internal +# form. Expects all the project files to already be loaded. +# +rule convert-command-line-elements ( elements * ) +{ + local result ; + for local e in $(elements) + { + result += [ convert-command-line-element $(e) ] ; + } + return $(result) ; +} + + +# Converts one element of command line build request specification into internal +# form. +local rule convert-command-line-element ( e ) +{ + local result ; + local parts = [ regex.split $(e) "/" ] ; + while $(parts) + { + local p = $(parts[1]) ; + local m = [ MATCH "([^=]*)=(.*)" : $(p) ] ; + local lresult ; + local feature ; + local values ; + if $(m) + { + feature = $(m[1]) ; + values = [ regex.split $(m[2]) "," ] ; + lresult = <$(feature)>$(values) ; + } + else + { + lresult = [ regex.split $(p) "," ] ; + } + + if $(feature) && free in [ feature.attributes <$(feature)> ] + { + # If we have free feature, then the value is everything + # until the end of the command line token. Slashes in + # the following string are not taked to mean separation + # of properties. Commas are also not interpreted specially. + values = $(values:J=,) ; + values = $(values) $(parts[2-]) ; + values = $(values:J=/) ; + lresult = ; + # Optional free features will ignore empty value arguments. + if optional in [ feature.attributes <$(feature)> ] + { + for local v in $(values) + { + if $(v) + { + lresult += <$(feature)>$(v) ; + } + } + } + else + { + lresult = <$(feature)>$(values) ; + } + parts = ; + } + + if ! [ MATCH (.*-.*) : $(p) ] + { + # property.validate cannot handle subfeatures, so we avoid the check + # here. + for local p in $(lresult) + { + property.validate $(p) : $(feature-space) ; + } + } + + if $(lresult) + { + if ! $(result) + { + result = $(lresult) ; + } + else + { + result = $(result)/$(lresult) ; + } + } + + parts = $(parts[2-]) ; + } + + return $(result) ; +} + + +rule __test__ ( ) +{ + import assert ; + import feature ; + + feature.prepare-test build-request-test-temp ; + + import build-request ; + import build-request : expand-no-defaults : build-request.expand-no-defaults ; + import errors : try catch ; + import feature : feature subfeature ; + + feature toolset : gcc msvc borland : implicit ; + subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 + 3.0 3.0.1 3.0.2 : optional ; + + feature variant : debug release : implicit composite ; + feature inlining : on off ; + feature "include" : : free ; + + feature stdlib : native stlport : implicit ; + + feature runtime-link : dynamic static : symmetric ; + + # Empty build requests should expand to empty. + assert.result + : build-request.expand-no-defaults ; + + assert.result + <toolset>gcc/<toolset-gcc:version>3.0.1/<stdlib>stlport/<variant>debug + <toolset>msvc/<stdlib>stlport/<variant>debug + <toolset>msvc/<variant>debug + : build-request.expand-no-defaults gcc-3.0.1/stlport msvc/stlport msvc debug ; + + assert.result + <toolset>gcc/<toolset-gcc:version>3.0.1/<stdlib>stlport/<variant>debug + <toolset>msvc/<variant>debug + <variant>debug/<toolset>msvc/<stdlib>stlport + : build-request.expand-no-defaults gcc-3.0.1/stlport msvc debug msvc/stlport ; + + assert.result + <toolset>gcc/<toolset-gcc:version>3.0.1/<stdlib>stlport/<variant>debug/<inlining>off + <toolset>gcc/<toolset-gcc:version>3.0.1/<stdlib>stlport/<variant>release/<inlining>off + : build-request.expand-no-defaults gcc-3.0.1/stlport debug release <inlining>off ; + + assert.result + <include>a/b/c/<toolset>gcc/<toolset-gcc:version>3.0.1/<stdlib>stlport/<variant>debug/<include>x/y/z + <include>a/b/c/<toolset>msvc/<stdlib>stlport/<variant>debug/<include>x/y/z + <include>a/b/c/<toolset>msvc/<variant>debug/<include>x/y/z + : build-request.expand-no-defaults <include>a/b/c gcc-3.0.1/stlport msvc/stlport msvc debug <include>x/y/z ; + + local r ; + + try ; + { + r = [ build-request.from-command-line bjam gcc/debug runtime-link=dynamic/static ] ; + build-request.convert-command-line-elements [ $(r).get-at 2 ] ; + } + catch \"static\" is not an implicit feature value ; + + r = [ build-request.from-command-line bjam debug runtime-link=dynamic ] ; + assert.equal [ $(r).get-at 1 ] : ; + assert.equal [ $(r).get-at 2 ] : debug runtime-link=dynamic ; + + assert.equal + [ build-request.convert-command-line-elements debug runtime-link=dynamic ] + : debug <runtime-link>dynamic ; + + r = [ build-request.from-command-line bjam -d2 --debug debug target runtime-link=dynamic ] ; + assert.equal [ $(r).get-at 1 ] : target ; + assert.equal [ $(r).get-at 2 ] : debug runtime-link=dynamic ; + + assert.equal + [ build-request.convert-command-line-elements debug runtime-link=dynamic ] + : debug <runtime-link>dynamic ; + + r = [ build-request.from-command-line bjam debug runtime-link=dynamic,static ] ; + assert.equal [ $(r).get-at 1 ] : ; + assert.equal [ $(r).get-at 2 ] : debug runtime-link=dynamic,static ; + + assert.equal + [ build-request.convert-command-line-elements debug runtime-link=dynamic,static ] + : debug <runtime-link>dynamic <runtime-link>static ; + + r = [ build-request.from-command-line bjam debug gcc/runtime-link=dynamic,static ] ; + assert.equal [ $(r).get-at 1 ] : ; + assert.equal [ $(r).get-at 2 ] : debug gcc/runtime-link=dynamic,static ; + + assert.equal + [ build-request.convert-command-line-elements debug gcc/runtime-link=dynamic,static ] + : debug gcc/<runtime-link>dynamic gcc/<runtime-link>static ; + + r = [ build-request.from-command-line bjam msvc gcc,borland/runtime-link=static ] ; + assert.equal [ $(r).get-at 1 ] : ; + assert.equal [ $(r).get-at 2 ] : msvc gcc,borland/runtime-link=static ; + + assert.equal + [ build-request.convert-command-line-elements msvc gcc,borland/runtime-link=static ] + : msvc gcc/<runtime-link>static borland/<runtime-link>static ; + + r = [ build-request.from-command-line bjam gcc-3.0 ] ; + assert.equal [ $(r).get-at 1 ] : ; + assert.equal [ $(r).get-at 2 ] : gcc-3.0 ; + + assert.equal + [ build-request.convert-command-line-elements gcc-3.0 ] + : gcc-3.0 ; + + feature.finish-test build-request-test-temp ; +} diff --git a/src/boost/tools/build/src/build/build_request.py b/src/boost/tools/build/src/build/build_request.py new file mode 100644 index 000000000..4fa54072f --- /dev/null +++ b/src/boost/tools/build/src/build/build_request.py @@ -0,0 +1,222 @@ +# Status: being ported by Vladimir Prus +# TODO: need to re-compare with mainline of .jam +# Base revision: 40480 +# +# (C) Copyright David Abrahams 2002. Permission to copy, use, modify, sell and +# distribute this software is granted provided this copyright notice appears in +# all copies. This software is provided "as is" without express or implied +# warranty, and with no claim as to its suitability for any purpose. + +import b2.build.feature +feature = b2.build.feature + +from b2.util.utility import * +from b2.util import is_iterable_typed +import b2.build.property_set as property_set + +def expand_no_defaults (property_sets): + """ Expand the given build request by combining all property_sets which don't + specify conflicting non-free features. + """ + assert is_iterable_typed(property_sets, property_set.PropertySet) + # First make all features and subfeatures explicit + expanded_property_sets = [ps.expand_subfeatures() for ps in property_sets] + + # Now combine all of the expanded property_sets + product = __x_product (expanded_property_sets) + + return [property_set.create(p) for p in product] + + +def __x_product (property_sets): + """ Return the cross-product of all elements of property_sets, less any + that would contain conflicting values for single-valued features. + """ + assert is_iterable_typed(property_sets, property_set.PropertySet) + x_product_seen = set() + return __x_product_aux (property_sets, x_product_seen)[0] + +def __x_product_aux (property_sets, seen_features): + """Returns non-conflicting combinations of property sets. + + property_sets is a list of PropertySet instances. seen_features is a set of Property + instances. + + Returns a tuple of: + - list of lists of Property instances, such that within each list, no two Property instance + have the same feature, and no Property is for feature in seen_features. + - set of features we saw in property_sets + """ + assert is_iterable_typed(property_sets, property_set.PropertySet) + assert isinstance(seen_features, set) + if not property_sets: + return ([], set()) + + properties = property_sets[0].all() + + these_features = set() + for p in property_sets[0].non_free(): + these_features.add(p.feature) + + # Note: the algorithm as implemented here, as in original Jam code, appears to + # detect conflicts based on features, not properties. For example, if command + # line build request say: + # + # <a>1/<b>1 c<1>/<b>1 + # + # It will decide that those two property sets conflict, because they both specify + # a value for 'b' and will not try building "<a>1 <c1> <b1>", but rather two + # different property sets. This is a topic for future fixing, maybe. + if these_features & seen_features: + + (inner_result, inner_seen) = __x_product_aux(property_sets[1:], seen_features) + return (inner_result, inner_seen | these_features) + + else: + + result = [] + (inner_result, inner_seen) = __x_product_aux(property_sets[1:], seen_features | these_features) + if inner_result: + for inner in inner_result: + result.append(properties + inner) + else: + result.append(properties) + + if inner_seen & these_features: + # Some of elements in property_sets[1:] conflict with elements of property_sets[0], + # Try again, this time omitting elements of property_sets[0] + (inner_result2, inner_seen2) = __x_product_aux(property_sets[1:], seen_features) + result.extend(inner_result2) + + return (result, inner_seen | these_features) + + + +def looks_like_implicit_value(v): + """Returns true if 'v' is either implicit value, or + the part before the first '-' symbol is implicit value.""" + assert isinstance(v, basestring) + if feature.is_implicit_value(v): + return 1 + else: + split = v.split("-") + if feature.is_implicit_value(split[0]): + return 1 + + return 0 + +def from_command_line(command_line): + """Takes the command line tokens (such as taken from ARGV rule) + and constructs build request from it. Returns a list of two + lists. First is the set of targets specified in the command line, + and second is the set of requested build properties.""" + assert is_iterable_typed(command_line, basestring) + targets = [] + properties = [] + + for e in command_line: + if e[:1] != "-": + # Build request spec either has "=" in it, or completely + # consists of implicit feature values. + if e.find("=") != -1 or looks_like_implicit_value(e.split("/")[0]): + properties.append(e) + elif e: + targets.append(e) + + return [targets, properties] + +# Converts one element of command line build request specification into +# internal form. +def convert_command_line_element(e): + assert isinstance(e, basestring) + result = None + parts = e.split("/") + for p in parts: + m = p.split("=") + if len(m) > 1: + feature = m[0] + values = m[1].split(",") + lresult = [("<%s>%s" % (feature, v)) for v in values] + else: + lresult = p.split(",") + + if p.find('-') == -1: + # FIXME: first port property.validate + # property.validate cannot handle subfeatures, + # so we avoid the check here. + #for p in lresult: + # property.validate(p) + pass + + if not result: + result = lresult + else: + result = [e1 + "/" + e2 for e1 in result for e2 in lresult] + + return [property_set.create(b2.build.feature.split(r)) for r in result] + +### +### rule __test__ ( ) +### { +### import assert feature ; +### +### feature.prepare-test build-request-test-temp ; +### +### import build-request ; +### import build-request : expand_no_defaults : build-request.expand_no_defaults ; +### import errors : try catch ; +### import feature : feature subfeature ; +### +### feature toolset : gcc msvc borland : implicit ; +### subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 +### 3.0 3.0.1 3.0.2 : optional ; +### +### feature variant : debug release : implicit composite ; +### feature inlining : on off ; +### feature "include" : : free ; +### +### feature stdlib : native stlport : implicit ; +### +### feature runtime-link : dynamic static : symmetric ; +### +### +### local r ; +### +### r = [ build-request.from-command-line bjam debug runtime-link=dynamic ] ; +### assert.equal [ $(r).get-at 1 ] : ; +### assert.equal [ $(r).get-at 2 ] : debug <runtime-link>dynamic ; +### +### try ; +### { +### +### build-request.from-command-line bjam gcc/debug runtime-link=dynamic/static ; +### } +### catch \"static\" is not a value of an implicit feature ; +### +### +### r = [ build-request.from-command-line bjam -d2 --debug debug target runtime-link=dynamic ] ; +### assert.equal [ $(r).get-at 1 ] : target ; +### assert.equal [ $(r).get-at 2 ] : debug <runtime-link>dynamic ; +### +### r = [ build-request.from-command-line bjam debug runtime-link=dynamic,static ] ; +### assert.equal [ $(r).get-at 1 ] : ; +### assert.equal [ $(r).get-at 2 ] : debug <runtime-link>dynamic <runtime-link>static ; +### +### r = [ build-request.from-command-line bjam debug gcc/runtime-link=dynamic,static ] ; +### assert.equal [ $(r).get-at 1 ] : ; +### assert.equal [ $(r).get-at 2 ] : debug gcc/<runtime-link>dynamic +### gcc/<runtime-link>static ; +### +### r = [ build-request.from-command-line bjam msvc gcc,borland/runtime-link=static ] ; +### assert.equal [ $(r).get-at 1 ] : ; +### assert.equal [ $(r).get-at 2 ] : msvc gcc/<runtime-link>static +### borland/<runtime-link>static ; +### +### r = [ build-request.from-command-line bjam gcc-3.0 ] ; +### assert.equal [ $(r).get-at 1 ] : ; +### assert.equal [ $(r).get-at 2 ] : gcc-3.0 ; +### +### feature.finish-test build-request-test-temp ; +### } +### +### diff --git a/src/boost/tools/build/src/build/config-cache.jam b/src/boost/tools/build/src/build/config-cache.jam new file mode 100644 index 000000000..05a6fcd3f --- /dev/null +++ b/src/boost/tools/build/src/build/config-cache.jam @@ -0,0 +1,78 @@ +# Copyright 2012 Steven Watanabe +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import modules ; +import errors ; +import regex ; +import path ; +import project ; +import os ; + +rule get ( name ) +{ + return $(.vars.$(name)) ; +} + +rule set ( name : value * ) +{ + .all-vars += $(name) ; + .vars.$(name) = $(value) ; +} + +rule save ( ) +{ + if $(.cache-file) + { + local cache-file-native = [ path.native $(.cache-file) ] ; + local target = <new-cache-file>$(cache-file-native) ; + local contents = "# Automatically generated by B2.\n# Do not edit.\n\nmodule config-cache {\n" ; + for local var in $(.all-vars) + { + local transformed ; + for local value in $(.vars.$(var)) + { + transformed += [ regex.escape $(value) : \"\\ : \\ ] ; + } + local quoted = \"$(transformed)\" ; + contents += " set \"$(var)\" : $(quoted:J= ) ;\n" ; + } + contents += "}\n" ; + FILE_CONTENTS on $(target) = $(contents) ; + ALWAYS $(target) ; + config-cache.write $(target) ; + UPDATE_NOW $(target) : [ modules.peek configure : .log-fd ] : ignore-minus-n ; + import common ; + common.Clean clean-all : $(target) ; + } +} + +actions write +{ + @($(STDOUT):E=$(FILE_CONTENTS:J=)) > "$(<)" +} + +if [ os.name ] = VMS +{ + actions write + { + @($(STDOUT):E=$(FILE_CONTENTS:J=)) | TYPE SYS$INPUT /OUT=$(<:W) + } +} + +rule load ( cache-file ) +{ + if $(.cache-file) + { + errors.error duplicate load of cache file ; + } + cache-file = [ path.native $(cache-file) ] ; + if [ path.exists $(cache-file) ] && ! ( --reconfigure in [ modules.peek : ARGV ] ) + { + FILE_CONTENTS on <old-cache-file>$(cache-file) = "" ; + config-cache.write <old-cache-file>$(cache-file) ; + UPDATE_NOW <old-cache-file>$(cache-file) : [ modules.peek configure : .log-fd ] ; + include <old-cache-file>$(cache-file) ; + } + .cache-file = $(cache-file) ; +} diff --git a/src/boost/tools/build/src/build/configure.jam b/src/boost/tools/build/src/build/configure.jam new file mode 100644 index 000000000..8c89b1e1f --- /dev/null +++ b/src/boost/tools/build/src/build/configure.jam @@ -0,0 +1,629 @@ +# Copyright (c) 2010 Vladimir Prus. +# Copyright 2017-2021 Rene Ferdinand Rivera Morell +# +# Use, modification and distribution is subject to the Boost Software +# License Version 1.0. (See accompanying file LICENSE.txt or +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This module defines function to help with two main tasks: +# +# - Discovering build-time configuration for the purposes of adjusting the build +# process. +# - Reporting what is built, and how it is configured. + +import "class" : new ; +import common ; +import indirect ; +import path ; +import project ; +import property ; +import property-set ; +import targets ; +import config-cache ; +import feature ; +import modules ; +import sequence ; +import utility ; +import virtual-target ; + + +rule log-summary ( ) +{ +} + + +.width = 30 ; + +rule set-width ( width ) +{ + .width = $(width) ; +} + + +# Declare that the components specified by the parameter exist. +# +rule register-components ( components * ) +{ + .components += $(components) ; +} + + +# Declare that the components specified by the parameters will be built. +# +rule components-building ( components * ) +{ + .built-components += $(components) ; +} + + +# Report something about component configuration that the user should better +# know. +# +rule log-component-configuration ( component : message ) +{ + # FIXME: Implement per-property-set logs. + .component-logs.$(component) += $(message) ; +} + + +.variant_index = 0 ; +.nl = "\n" ; + +.check_notes = ; + +rule log-check-result ( result variant ? ) +{ + if ! $(.announced-checks) + { + ECHO "Performing configuration checks\n" ; + .announced-checks = 1 ; + } + + if $(variant) + { + if $(.variant_index.$(variant)) + { + result = "$(result) [$(.variant_index.$(variant))]" ; + } + else + { + .variant_index = [ CALC $(.variant_index) + 1 ] ; + .variant_index.$(variant) = $(.variant_index) ; + result = "$(result) [$(.variant_index.$(variant))]" ; + .check_notes += "[$(.variant_index.$(variant))] $(variant)" ; + } + } + # else + # { + # result = "$(result) [?]" ; + # } + + ECHO $(result) ; + # FIXME: Unfinished code. Nothing seems to set .check-results at the moment. + #.check-results += $(result) ; +} + + +rule log-library-search-result ( library : result variant ? ) +{ + local x = [ PAD " - $(library)" : $(.width) ] ; + log-check-result "$(x) : $(result)" $(variant) ; +} + + +rule print-component-configuration ( ) +{ + # FIXME: See what was intended with this initial assignment. + # local c = [ sequence.unique $(.components) ] ; + + ECHO "\nComponent configuration:\n" ; + local c ; + for c in $(.components) + { + local s ; + if $(c) in $(.built-components) + { + s = "building" ; + } + else + { + s = "not building" ; + } + ECHO [ PAD " - $(c)" : $(.width) ] ": $(s)" ; + for local m in $(.component-logs.$(c)) + { + ECHO " -" $(m) ; + } + } + ECHO ; +} + + +rule print-configure-checks-summary ( ) +{ + if $(.check_notes) + { + ECHO ; + for local l in $(.check_notes) { ECHO $(l) ; } + } + + # FIXME: The problem with this approach is that the user sees the checks + # summary when all checks are done, and has no progress reporting while the + # checks are being executed. + if $(.check-results) + { + ECHO "Configuration checks summary\n" ; + for local r in $(.check-results) + { + ECHO $(r) ; + } + ECHO ; + } +} + +if --reconfigure in [ modules.peek : ARGV ] +{ + .reconfigure = true ; +} + +# Handle the --reconfigure option +rule maybe-force-rebuild ( targets * ) +{ + if $(.reconfigure) + { + local all-targets ; + for local t in $(targets) + { + all-targets += [ virtual-target.traverse $(t) ] ; + } + for local t in [ sequence.unique $(all-targets) ] + { + $(t).always ; + } + } +} + +# Attempts to build a set of virtual targets +rule try-build ( targets * : ps : what : retry ? ) +{ + local cache-props = [ $(ps).raw ] ; + local cache-name = $(what) $(cache-props) ; + cache-name = $(cache-name:J=-) ; + local value = [ config-cache.get $(cache-name) ] ; + local cache-min = [ property.as-path [ SORT [ feature.minimize $(cache-props) ] ] ] ; + + local result ; + local jam-targets ; + + maybe-force-rebuild $(targets) ; + + for local t in $(targets) + { + jam-targets += [ $(t).actualize ] ; + } + + local x ; + if $(value) + { + x = [ PAD " - $(what)" : $(.width) ] ; + if $(value) = true + { + .$(what)-supported.$(ps) = yes ; + result = true ; + x = "$(x) : yes (cached)" ; + } + else + { + x = "$(x) : no (cached)" ; + } + } + else if ! UPDATE_NOW in [ RULENAMES ] + { + # Cannot determine. Assume existence. + } + else + { + x = [ PAD " - $(what)" : $(.width) ] ; + if [ UPDATE_NOW $(jam-targets) : + $(.log-fd) : ignore-minus-n : ignore-minus-q ] + { + .$(what)-supported.$(ps) = yes ; + result = true ; + x = "$(x) : yes" ; + } + else + { + x = "$(x) : no" ; + } + } + if $(x) + { + log-check-result "$(x)" "$(cache-min:J= )" ; + } + if ! $(value) + { + if $(result) + { + config-cache.set $(cache-name) : true ; + } + else + { + config-cache.set $(cache-name) : false ; + } + } + return $(result) ; +} + +# Attempts to build several sets of virtual targets. Returns the +# the index of the first set that builds. +rule try-find-build ( ps : what : * ) +{ + local args = 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; + # The outer layer only needs to check $(what), but we + # also need to check the individual elements, in case + # the set of targets has changed since the last build. + local cache-props = [ $(ps).raw ] ; + local cache-name = $(what) $($(args)[1]) $(cache-props) ; + cache-name = $(cache-name:J=-) ; + local value = [ config-cache.get $(cache-name) ] ; + local cache-min = [ property.as-path [ SORT [ feature.minimize $(cache-props) ] ] ] ; + + local result ; + local jam-targets ; + + maybe-force-rebuild $($(args)[2-]) ; + + # Make sure that the targets are always actualized, + # even if the result is cached. This is needed to + # allow clean-all to find them and also to avoid + # unintentional behavior changes. + for local t in $($(args)[2-]) + { + $(t).actualize ; + } + + if $(value) + { + local none = none ; # What to show when the argument + local name = $(value) ; + if $(name) != none + { + name = [ CALC $(name) + 2 ] ; + } + local x = [ PAD " - $(what)" : $(.width) ] ; + local y = [ PAD $($(name)[1]) : 3 ] ; + result = $(value) ; + log-check-result "$(x) : $(y) (cached)" "$(cache-min:J= )" ; + } + else + { + local x = [ PAD " - $(what)" : $(.width) ] ; + for local i in $(args) + { + if ! $($(i)[1]) + { + break ; + } + local jam-targets ; + for local t in $($(i)[2-]) + { + jam-targets += [ $(t).actualize ] ; + } + if [ UPDATE_NOW $(jam-targets) : + $(.log-fd) : ignore-minus-n : ignore-minus-q ] + { + result = [ CALC $(i) - 2 ] ; + log-check-result "$(x) : $($(i)[1])" "$(cache-min:J= )" ; + break ; + } + } + if ! $(result) + { + log-check-result "$(x) : none" "$(cache-min:J= )" ; + result = none ; + } + } + if ! $(value) + { + if $(result) + { + config-cache.set $(cache-name) : $(result) ; + } + else + { + config-cache.set $(cache-name) : $(result) ; + } + } + if $(result) != none + { + return $(result) ; + } +} + +# Attempt to build a metatarget named by 'metatarget-reference' +# in context of 'project' with properties 'ps'. +# Returns non-empty value if build is OK. +rule builds-raw ( metatarget-reference : project : ps : what : retry ? ) +{ + local result ; + + if ! $(retry) && ! $(.$(what)-tested.$(ps)) + { + .$(what)-tested.$(ps) = true ; + + local targets = [ targets.generate-from-reference + $(metatarget-reference) : $(project) : $(ps) ] ; + + result = [ try-build $(targets[2-]) : $(ps) : $(what) : $(retry) ] ; + .$(what)-supported.$(ps) = $(result) ; + + return $(result) ; + + } + else + { + return $(.$(what)-supported.$(ps)) ; + } +} + +# Attempt to build a metatarget named by 'metatarget-reference' +# in context of 'project' with properties 'ps'. +# Returns the 1-based index of the first target +# that builds. +rule find-builds-raw ( project : ps : what : * ) +{ + local result ; + local args = 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; + + if ! $(.$(what)-tested.$(ps)) + { + .$(what)-tested.$(ps) = true ; + local targets.$(i) what.$(i) ; + for local i in $(args) + { + if ! $($(i)) + { + break ; + } + targets.$(i) = [ targets.generate-from-reference + $($(i)[1]) : $(project) : $(ps) ] ; + # ignore usage requirements + targets.$(i) = $(targets.$(i)[2-]) ; + if $($(i)[2]) + { + what.$(i) = $($(i)[2]) ; + } + else + { + local t = [ targets.resolve-reference + $($(i)[1]) : $(project) ] ; + what.$(i) = [ $(t[1]).name ] ; + } + } + + result = [ try-find-build $(ps) : $(what) + : $(what.4) $(targets.4) + : $(what.5) $(targets.5) + : $(what.6) $(targets.6) + : $(what.7) $(targets.7) + : $(what.8) $(targets.8) + : $(what.9) $(targets.9) + : $(what.10) $(targets.10) + : $(what.11) $(targets.11) + : $(what.12) $(targets.12) + : $(what.13) $(targets.13) + : $(what.14) $(targets.14) + : $(what.15) $(targets.15) + : $(what.16) $(targets.16) + : $(what.17) $(targets.17) + : $(what.18) $(targets.18) + : $(what.19) $(targets.19) ] ; + .$(what)-result.$(ps) = $(result) ; + + return $(result) ; + } + else + { + return $(.$(what)-result.$(ps)) ; + } +} + +rule get-relevant-features ( properties * ) +{ + local ps-full = [ property-set.create $(properties) ] ; + local ps-base = [ property-set.create [ $(ps-full).base ] ] ; + local ps-min = [ feature.expand-subfeatures [ feature.minimize + [ $(ps-base).raw ] ] ] ; + local ps-relevant = [ property-set.create $(ps-min) ] ; + + return [ $(ps-relevant).raw ] ; +} + +rule builds ( metatarget-reference : properties * : what ? : retry ? ) +{ + local relevant = [ get-relevant-features $(properties) ] ; + local ps = [ property-set.create $(relevant) ] ; + local t = [ targets.current ] ; + local p = [ $(t).project ] ; + + if ! $(what) + { + local resolved = [ targets.resolve-reference $(metatarget-reference) : $(p) ] ; + local name = [ $(resolved[1]).name ] ; + what = "$(name) builds" ; + } + + return [ builds-raw $(metatarget-reference) : $(p) : $(ps) : $(what) : + $(retry) ] ; +} + +rule find-builds ( what : properties * : * ) +{ + local relevant = [ get-relevant-features $(properties) ] ; + local ps = [ property-set.create $(relevant) ] ; + local t = [ targets.current ] ; + local p = [ $(t).project ] ; + + return [ find-builds-raw $(p) : $(ps) : $(what) : + $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : + $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : + $(16) : $(17) : $(18) ] ; +} + + +# Called by B2 startup code to specify the file to receive the +# configuration check results. Should never be called by user code. +# +rule set-log-file ( log-file ) +{ + path.makedirs [ path.parent $(log-file) ] ; + .log-fd = [ FILE_OPEN [ path.native $(log-file) ] : "w" ] ; + if ! $(.log-fd) + { + ECHO "warning:" failed to open log file $(log-file) for writing ; + } +} + + +# Frontend rules + +class check-target-builds-worker +{ + import configure ; + import property-set ; + import targets ; + import project ; + import property ; + + rule __init__ ( target message ? : true-properties * : false-properties * ) + { + local project = [ project.current ] ; + self.target = $(target) ; + self.message = $(message) ; + self.true-properties = + [ configure.translate-properties $(true-properties) : $(project) ] ; + self.false-properties = + [ configure.translate-properties $(false-properties) : $(project) ] ; + } + + rule check ( properties * ) + { + local choosen ; + if [ configure.builds $(self.target) : $(properties) : $(self.message) ] + { + choosen = $(self.true-properties) ; + } + else + { + choosen = $(self.false-properties) ; + } + return [ property.evaluate-conditionals-in-context $(choosen) : + $(properties) ] ; + } +} + +class configure-choose-worker +{ + import configure ; + import property ; + import project ; + rule __init__ ( message : * ) + { + local project = [ project.current ] ; + self.message = $(message) ; + for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 + { + local name = [ CALC $(i) - 1 ] ; + self.targets.$(name) = $($(i)[1]) ; + if ! $($(i)[2]:G) # Check whether the second argument is a property + { + self.what.$(name) = $($(i)[2]) ; + self.props.$(name) = $($(i)[3-]) ; + } + else + { + self.props.$(name) = $($(i)[2-]) ; + } + self.props.$(name) = [ configure.translate-properties + $(self.props.$(name)) : $(project) ] ; + } + } + rule all-properties ( ) + { + local i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; + return $(self.props.$(i)) ; + } + rule check ( properties * ) + { + local i = [ configure.find-builds $(self.message) : $(properties) + : $(self.targets.1) $(self.what.1) + : $(self.targets.2) $(self.what.2) + : $(self.targets.3) $(self.what.3) + : $(self.targets.4) $(self.what.4) + : $(self.targets.5) $(self.what.5) + : $(self.targets.6) $(self.what.6) + : $(self.targets.7) $(self.what.7) + : $(self.targets.8) $(self.what.8) + : $(self.targets.9) $(self.what.9) + : $(self.targets.10) $(self.what.10) + : $(self.targets.11) $(self.what.11) + : $(self.targets.12) $(self.what.12) + : $(self.targets.13) $(self.what.13) + : $(self.targets.14) $(self.what.14) + : $(self.targets.15) $(self.what.15) + : $(self.targets.16) $(self.what.16) + : $(self.targets.17) $(self.what.17) ] ; + if $(self.props.$(i)) + { + return [ property.evaluate-conditionals-in-context $(self.props.$(i)) : $(properties) ] ; + } + } +} + +rule translate-properties ( properties * : project ? ) +{ + if $(project) && [ $(project).location ] + { + local location = [ $(project).location ] ; + local m = [ $(project).project-module ] ; + local project-id = [ project.attribute $(m) id ] ; + project-id ?= [ path.root $(location) [ path.pwd ] ] ; + return [ property.translate $(properties) + : $(project-id) : $(location) : $(m) ] ; + } + else + { + return $(properties) ; + } +} + +rule check-target-builds ( target message ? : true-properties * : + false-properties * ) +{ + local instance = [ new check-target-builds-worker $(target) $(message) : + $(true-properties) : $(false-properties) ] ; + local rulename = [ indirect.make check : $(instance) ] ; + return <conditional>@$(rulename) + [ property.evaluate-conditional-relevance + $(true-properties) $(false-properties) ] ; +} + +# Usage: +# [ configure.choose "architecture" +# : /config//x86 x86 <architecture>x86 +# : /config//mips mips <architecture>mips +# ] +rule choose ( message : * ) +{ + local instance = [ new configure-choose-worker $(message) + : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) + : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) + : $(17) : $(18) : $(19) ] ; + local rulename = [ indirect.make check : $(instance) ] ; + return <conditional>@$(rulename) + [ property.evaluate-conditional-relevance + [ $(instance).all-properties ] ] ; +} + + +IMPORT $(__name__) : check-target-builds : : check-target-builds ; diff --git a/src/boost/tools/build/src/build/configure.py b/src/boost/tools/build/src/build/configure.py new file mode 100644 index 000000000..cf2121a2a --- /dev/null +++ b/src/boost/tools/build/src/build/configure.py @@ -0,0 +1,176 @@ +# Status: ported. +# Base revision: 64488 +# +# Copyright (c) 2010 Vladimir Prus. +# +# Use, modification and distribution is subject to the Boost Software +# License Version 1.0. (See accompanying file LICENSE.txt or +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This module defines function to help with two main tasks: +# +# - Discovering build-time configuration for the purposes of adjusting +# build process. +# - Reporting what is built, and how it is configured. + +import b2.build.property as property +import b2.build.property_set as property_set + +from b2.build import targets as targets_ + +from b2.manager import get_manager +from b2.util.sequence import unique +from b2.util import bjam_signature, value_to_jam, is_iterable + +import bjam +import os + +__width = 30 + +def set_width(width): + global __width + __width = 30 + +__components = [] +__built_components = [] +__component_logs = {} +__announced_checks = False + +__log_file = None +__log_fd = -1 + +def register_components(components): + """Declare that the components specified by the parameter exist.""" + assert is_iterable(components) + __components.extend(components) + +def components_building(components): + """Declare that the components specified by the parameters will be build.""" + assert is_iterable(components) + __built_components.extend(components) + +def log_component_configuration(component, message): + """Report something about component configuration that the user should better know.""" + assert isinstance(component, basestring) + assert isinstance(message, basestring) + __component_logs.setdefault(component, []).append(message) + +def log_check_result(result): + assert isinstance(result, basestring) + global __announced_checks + if not __announced_checks: + print "Performing configuration checks" + __announced_checks = True + + print result + +def log_library_search_result(library, result): + assert isinstance(library, basestring) + assert isinstance(result, basestring) + log_check_result((" - %(library)s : %(result)s" % locals()).rjust(__width)) + + +def print_component_configuration(): + + print "\nComponent configuration:" + for c in __components: + if c in __built_components: + s = "building" + else: + s = "not building" + message = " - %s)" % c + message = message.rjust(__width) + message += " : " + s + for m in __component_logs.get(c, []): + print " -" + m + print "" + +__builds_cache = {} + +def builds(metatarget_reference, project, ps, what): + # Attempt to build a metatarget named by 'metatarget-reference' + # in context of 'project' with properties 'ps'. + # Returns non-empty value if build is OK. + assert isinstance(metatarget_reference, basestring) + assert isinstance(project, targets_.ProjectTarget) + assert isinstance(ps, property_set.PropertySet) + assert isinstance(what, basestring) + + result = [] + + existing = __builds_cache.get((what, ps), None) + if existing is None: + + result = False + __builds_cache[(what, ps)] = False + + targets = targets_.generate_from_reference( + metatarget_reference, project, ps).targets() + jam_targets = [] + for t in targets: + jam_targets.append(t.actualize()) + + x = (" - %s" % what).rjust(__width) + if bjam.call("UPDATE_NOW", jam_targets, str(__log_fd), "ignore-minus-n"): + __builds_cache[(what, ps)] = True + result = True + log_check_result("%s: yes" % x) + else: + log_check_result("%s: no" % x) + + return result + else: + return existing + +def set_log_file(log_file_name): + assert isinstance(log_file_name, basestring) + # Called by Boost.Build startup code to specify name of a file + # that will receive results of configure checks. This + # should never be called by users. + global __log_file, __log_fd + dirname = os.path.dirname(log_file_name) + if not os.path.exists(dirname): + os.makedirs(dirname) + # Make sure to keep the file around, so that it's not + # garbage-collected and closed + __log_file = open(log_file_name, "w") + __log_fd = __log_file.fileno() + +# Frontend rules + +class CheckTargetBuildsWorker: + + def __init__(self, target, true_properties, false_properties): + self.target = target + self.true_properties = property.create_from_strings(true_properties, True) + self.false_properties = property.create_from_strings(false_properties, True) + + def check(self, ps): + assert isinstance(ps, property_set.PropertySet) + # FIXME: this should not be hardcoded. Other checks might + # want to consider different set of features as relevant. + toolset = ps.get('toolset')[0] + toolset_version_property = "<toolset-" + toolset + ":version>" ; + relevant = ps.get_properties('target-os') + \ + ps.get_properties("toolset") + \ + ps.get_properties(toolset_version_property) + \ + ps.get_properties("address-model") + \ + ps.get_properties("architecture") + rps = property_set.create(relevant) + t = get_manager().targets().current() + p = t.project() + if builds(self.target, p, rps, "%s builds" % self.target): + choosen = self.true_properties + else: + choosen = self.false_properties + return property.evaluate_conditionals_in_context(choosen, ps) + +@bjam_signature((["target"], ["true_properties", "*"], ["false_properties", "*"])) +def check_target_builds(target, true_properties, false_properties): + worker = CheckTargetBuildsWorker(target, true_properties, false_properties) + value = value_to_jam(worker.check) + return "<conditional>" + value + +get_manager().projects().add_rule("check-target-builds", check_target_builds) + + diff --git a/src/boost/tools/build/src/build/engine.py b/src/boost/tools/build/src/build/engine.py new file mode 100644 index 000000000..d88d5aa23 --- /dev/null +++ b/src/boost/tools/build/src/build/engine.py @@ -0,0 +1,246 @@ +# Copyright Pedro Ferreira 2005. +# Copyright Vladimir Prus 2007. +# Distributed under the Boost +# Software License, Version 1.0. (See accompanying +# file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +bjam_interface = __import__('bjam') + +import operator +import re + +import b2.build.property_set as property_set + +from b2.util import set_jam_action, is_iterable + +class BjamAction(object): + """Class representing bjam action defined from Python.""" + + def __init__(self, action_name, function, has_command=False): + assert isinstance(action_name, basestring) + assert callable(function) or function is None + self.action_name = action_name + self.function = function + self.has_command = has_command + + def __call__(self, targets, sources, property_set_): + assert is_iterable(targets) + assert is_iterable(sources) + assert isinstance(property_set_, property_set.PropertySet) + if self.has_command: + # Bjam actions defined from Python have only the command + # to execute, and no associated jam procedural code. So + # passing 'property_set' to it is not necessary. + bjam_interface.call("set-update-action", self.action_name, + targets, sources, []) + if self.function: + self.function(targets, sources, property_set_) + +class BjamNativeAction(BjamAction): + """Class representing bjam action defined by Jam code. + + We still allow to associate a Python callable that will + be called when this action is installed on any target. + """ + + def __call__(self, targets, sources, property_set_): + assert is_iterable(targets) + assert is_iterable(sources) + assert isinstance(property_set_, property_set.PropertySet) + if self.function: + self.function(targets, sources, property_set_) + + p = [] + if property_set: + p = property_set_.raw() + + set_jam_action(self.action_name, targets, sources, p) + +action_modifiers = {"updated": 0x01, + "together": 0x02, + "ignore": 0x04, + "quietly": 0x08, + "piecemeal": 0x10, + "existing": 0x20} + +class Engine: + """ The abstract interface to a build engine. + + For now, the naming of targets, and special handling of some + target variables like SEARCH and LOCATE make this class coupled + to bjam engine. + """ + def __init__ (self): + self.actions = {} + + def add_dependency (self, targets, sources): + """Adds a dependency from 'targets' to 'sources' + + Both 'targets' and 'sources' can be either list + of target names, or a single target name. + """ + if isinstance (targets, str): + targets = [targets] + if isinstance (sources, str): + sources = [sources] + assert is_iterable(targets) + assert is_iterable(sources) + + for target in targets: + for source in sources: + self.do_add_dependency (target, source) + + def get_target_variable(self, targets, variable): + """Gets the value of `variable` on set on the first target in `targets`. + + Args: + targets (str or list): one or more targets to get the variable from. + variable (str): the name of the variable + + Returns: + the value of `variable` set on `targets` (list) + + Example: + + >>> ENGINE = get_manager().engine() + >>> ENGINE.set_target_variable(targets, 'MY-VAR', 'Hello World') + >>> ENGINE.get_target_variable(targets, 'MY-VAR') + ['Hello World'] + + Equivalent Jam code: + + MY-VAR on $(targets) = "Hello World" ; + echo [ on $(targets) return $(MY-VAR) ] ; + "Hello World" + """ + if isinstance(targets, str): + targets = [targets] + assert is_iterable(targets) + assert isinstance(variable, basestring) + + return bjam_interface.call('get-target-variable', targets, variable) + + def set_target_variable (self, targets, variable, value, append=0): + """ Sets a target variable. + + The 'variable' will be available to bjam when it decides + where to generate targets, and will also be available to + updating rule for that 'taret'. + """ + if isinstance (targets, str): + targets = [targets] + if isinstance(value, str): + value = [value] + + assert is_iterable(targets) + assert isinstance(variable, basestring) + assert is_iterable(value) + + if targets: + if append: + bjam_interface.call("set-target-variable", targets, variable, value, "true") + else: + bjam_interface.call("set-target-variable", targets, variable, value) + + def set_update_action (self, action_name, targets, sources, properties=None): + """ Binds a target to the corresponding update action. + If target needs to be updated, the action registered + with action_name will be used. + The 'action_name' must be previously registered by + either 'register_action' or 'register_bjam_action' + method. + """ + if isinstance(targets, str): + targets = [targets] + if isinstance(sources, str): + sources = [sources] + if properties is None: + properties = property_set.empty() + assert isinstance(action_name, basestring) + assert is_iterable(targets) + assert is_iterable(sources) + assert(isinstance(properties, property_set.PropertySet)) + + self.do_set_update_action (action_name, targets, sources, properties) + + def register_action (self, action_name, command='', bound_list = [], flags = [], + function = None): + """Creates a new build engine action. + + Creates on bjam side an action named 'action_name', with + 'command' as the command to be executed, 'bound_variables' + naming the list of variables bound when the command is executed + and specified flag. + If 'function' is not None, it should be a callable taking three + parameters: + - targets + - sources + - instance of the property_set class + This function will be called by set_update_action, and can + set additional target variables. + """ + assert isinstance(action_name, basestring) + assert isinstance(command, basestring) + assert is_iterable(bound_list) + assert is_iterable(flags) + assert function is None or callable(function) + + bjam_flags = reduce(operator.or_, + (action_modifiers[flag] for flag in flags), 0) + + # We allow command to be empty so that we can define 'action' as pure + # python function that would do some conditional logic and then relay + # to other actions. + assert command or function + if command: + bjam_interface.define_action(action_name, command, bound_list, bjam_flags) + + self.actions[action_name] = BjamAction( + action_name, function, has_command=bool(command)) + + def register_bjam_action (self, action_name, function=None): + """Informs self that 'action_name' is declared in bjam. + + From this point, 'action_name' is a valid argument to the + set_update_action method. The action_name should be callable + in the global module of bjam. + """ + + # We allow duplicate calls to this rule for the same + # action name. This way, jamfile rules that take action names + # can just register them without specially checking if + # action is already registered. + assert isinstance(action_name, basestring) + assert function is None or callable(function) + if action_name not in self.actions: + self.actions[action_name] = BjamNativeAction(action_name, function) + + # Overridables + + + def do_set_update_action (self, action_name, targets, sources, property_set_): + assert isinstance(action_name, basestring) + assert is_iterable(targets) + assert is_iterable(sources) + assert isinstance(property_set_, property_set.PropertySet) + action = self.actions.get(action_name) + if not action: + raise Exception("No action %s was registered" % action_name) + action(targets, sources, property_set_) + + def do_set_target_variable (self, target, variable, value, append): + assert isinstance(target, basestring) + assert isinstance(variable, basestring) + assert is_iterable(value) + assert isinstance(append, int) # matches bools + if append: + bjam_interface.call("set-target-variable", target, variable, value, "true") + else: + bjam_interface.call("set-target-variable", target, variable, value) + + def do_add_dependency (self, target, source): + assert isinstance(target, basestring) + assert isinstance(source, basestring) + bjam_interface.call("DEPENDS", target, source) + + diff --git a/src/boost/tools/build/src/build/errors.py b/src/boost/tools/build/src/build/errors.py new file mode 100644 index 000000000..c65fa4105 --- /dev/null +++ b/src/boost/tools/build/src/build/errors.py @@ -0,0 +1,135 @@ +# Status: being written afresh by Vladimir Prus + +# Copyright 2007 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This file is supposed to implement error reporting for Boost.Build. +# Experience with jam version has shown that printing full backtrace +# on each error is buffling. Further, for errors printed after parsing -- +# during target building, the stacktrace does not even mention what +# target is being built. + +# This module implements explicit contexts -- where other code can +# communicate which projects/targets are being built, and error +# messages will show those contexts. For programming errors, +# Python assertions are to be used. + +import bjam +import traceback +import sys + +def format(message, prefix=""): + parts = str(message).split("\n") + return "\n".join(prefix+p for p in parts) + + +class Context: + + def __init__(self, message, nested=None): + self.message_ = message + self.nested_ = nested + + def report(self, indent=""): + print indent + " -", self.message_ + if self.nested_: + print indent + " declared at:" + for n in self.nested_: + n.report(indent + " ") + +class JamfileContext: + + def __init__(self): + raw = bjam.backtrace() + self.raw_ = raw + + def report(self, indent=""): + for r in self.raw_: + print indent + " - %s:%s" % (r[0], r[1]) + +class ExceptionWithUserContext(Exception): + + def __init__(self, message, context, + original_exception=None, original_tb=None, stack=None): + Exception.__init__(self, message) + self.context_ = context + self.original_exception_ = original_exception + self.original_tb_ = original_tb + self.stack_ = stack + + def report(self): + print "error:", self.args[0] + if self.original_exception_: + print format(str(self.original_exception_), " ") + print + print " error context (most recent first):" + for c in self.context_[::-1]: + c.report() + print + if "--stacktrace" in bjam.variable("ARGV"): + if self.original_tb_: + traceback.print_tb(self.original_tb_) + elif self.stack_: + for l in traceback.format_list(self.stack_): + print l, + else: + print " use the '--stacktrace' option to get Python stacktrace" + print + +def user_error_checkpoint(callable): + def wrapper(self, *args): + errors = self.manager().errors() + try: + return callable(self, *args) + except ExceptionWithUserContext, e: + raise + except Exception, e: + errors.handle_stray_exception(e) + finally: + errors.pop_user_context() + + return wrapper + +class Errors: + + def __init__(self): + self.contexts_ = [] + self._count = 0 + + def count(self): + return self._count + + def push_user_context(self, message, nested=None): + self.contexts_.append(Context(message, nested)) + + def pop_user_context(self): + del self.contexts_[-1] + + def push_jamfile_context(self): + self.contexts_.append(JamfileContext()) + + def pop_jamfile_context(self): + del self.contexts_[-1] + + def capture_user_context(self): + return self.contexts_[:] + + def handle_stray_exception(self, e): + raise ExceptionWithUserContext("unexpected exception", self.contexts_[:], + e, sys.exc_info()[2]) + def __call__(self, message): + self._count = self._count + 1 + raise ExceptionWithUserContext(message, self.contexts_[:], + stack=traceback.extract_stack()) + + +def nearest_user_location(): + """ + Returns: + tuple: the filename and line number of the nearest user location + """ + bt = bjam.backtrace() + if not bt: + return None + last = bt[-1] + return last[0], last[1] diff --git a/src/boost/tools/build/src/build/feature.jam b/src/boost/tools/build/src/build/feature.jam new file mode 100644 index 000000000..4c7bb9a10 --- /dev/null +++ b/src/boost/tools/build/src/build/feature.jam @@ -0,0 +1,1442 @@ +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2002, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +import assert : * ; +import "class" : * ; +import indirect ; +import modules ; +import regex ; +import sequence ; +import set ; +import utility ; + + +local rule setup ( ) +{ + .all-attributes = + implicit + composite + optional + symmetric + free + incidental + path + dependency + propagated + link-incompatible + subfeature + order-sensitive + hidden + ; + + .all-features = ; + .all-subfeatures = ; + .all-top-features = ; # non-subfeatures + .all-implicit-values = ; +} +setup ; + + +# Prepare a fresh space to test in by moving all global variable settings into +# the given temporary module and erasing them here. +# +rule prepare-test ( temp-module ) +{ + DELETE_MODULE $(temp-module) ; + + # Transfer globals to temp-module. + for local v in [ VARNAMES feature ] + { + if [ MATCH (\\.) : $(v) ] + { + modules.poke $(temp-module) : $(v) : $($(v)) ; + $(v) = ; + } + } + setup ; +} + + +# Clear out all global variables and recover all variables from the given +# temporary module. +# +rule finish-test ( temp-module ) +{ + # Clear globals. + for local v in [ VARNAMES feature ] + { + if [ MATCH (\\.) : $(v) ] + { + $(v) = ; + } + } + + for local v in [ VARNAMES $(temp-module) ] + { + $(v) = [ modules.peek $(temp-module) : $(v) ] ; + } + DELETE_MODULE $(temp-module) ; +} + + +# Transform features by bracketing any elements which are not already bracketed +# by "<>". +# +local rule grist ( features * ) +{ + local empty = "" ; + return $(empty:G=$(features)) ; +} + + +# Declare a new feature with the given name, values, and attributes. +# +rule feature ( + name # Feature name. + : values * # Allowable values - may be extended later using feature.extend. + : attributes * # Feature attributes (e.g. implicit, free, propagated...). +) +{ + name = [ grist $(name) ] ; + + local error ; + + # Check for any unknown attributes. + if ! ( $(attributes) in $(.all-attributes) ) + { + error = unknown "attributes:" + [ set.difference $(attributes) : $(.all-attributes) ] ; + } + else if $(name) in $(.all-features) + { + error = feature already "defined:" ; + } + else if implicit in $(attributes) && free in $(attributes) + { + error = free features cannot also be implicit ; + } + else if free in $(attributes) && propagated in $(attributes) + { + error = free features cannot be propagated ; + } + else + { + local m = [ MATCH (.*=.*) : $(values) ] ; + if $(m[1]) + { + error = "feature value may not contain '='" ; + } + } + + if $(error) + { + import errors ; + errors.error $(error) + : "in" feature "declaration:" + : feature [ errors.lol->list $(1) : $(2) : $(3) ] ; + } + + $(name).values ?= ; + $(name).attributes = $(attributes) ; + $(name).subfeatures ?= ; + $(attributes).features += $(name) ; + + .all-features += $(name) ; + if subfeature in $(attributes) + { + .all-subfeatures += $(name) ; + } + else + { + .all-top-features += $(name) ; + } + extend $(name) : $(values) ; +} + + +# Sets the default value of the given feature, overriding any previous default. +# +rule set-default ( feature : value ) +{ + local f = [ grist $(feature) ] ; + local a = $($(f).attributes) ; + local bad-attribute = ; + if free in $(a) + { + bad-attribute = free ; + } + else if optional in $(a) + { + bad-attribute = optional ; + } + if $(bad-attribute) + { + import errors ; + errors.error $(bad-attribute) property $(f) cannot have a default. ; + } + if ! $(value) in $($(f).values) + { + import errors ; + errors.error The specified default value, '$(value)' is invalid : + allowed values "are:" $($(f).values) ; + } + $(f).default = $(value) ; +} + + +# Returns the default property values for the given features. +# +rule defaults ( features * ) +{ + local result ; + for local f in $(features) + { + local gf = $(:E=:G=$(f)) ; + local a = $($(gf).attributes) ; + if ( free in $(a) ) || ( optional in $(a) ) + { + } + else + { + result += $(gf)$($(gf).default) ; + } + } + return $(result) ; +} + + +# Returns true iff all 'names' elements are valid features. +# +rule valid ( names + ) +{ + if $(names) in $(.all-features) + { + return true ; + } +} + + +# Returns the attributes of the given feature. +# +rule attributes ( feature ) +{ + return $($(feature).attributes) ; +} + + +# Returns the values of the given feature. +# +rule values ( feature ) +{ + return $($(:E=:G=$(feature)).values) ; +} + + +# Returns true iff 'value-string' is a value-string of an implicit feature. +# +rule is-implicit-value ( value-string ) +{ + local v = [ regex.split $(value-string) - ] ; + local failed ; + if ! $(v[1]) in $(.all-implicit-values) + { + failed = true ; + } + else + { + local feature = $($(v[1]).implicit-feature) ; + for local subvalue in $(v[2-]) + { + if ! [ find-implied-subfeature $(feature) $(subvalue) : $(v[1]) ] + { + failed = true ; + } + } + } + + if ! $(failed) + { + return true ; + } +} + + +# Returns the implicit feature associated with the given implicit value. +# +rule implied-feature ( implicit-value ) +{ + local components = [ regex.split $(implicit-value) "-" ] ; + local feature = $($(components[1]).implicit-feature) ; + if ! $(feature) + { + import errors ; + errors.error \"$(implicit-value)\" is not an implicit feature value ; + feature = "" ; # Keep testing happy; it expects a result. + } + return $(feature) ; +} + + +local rule find-implied-subfeature ( feature subvalue : value-string ? ) +{ + # Feature should be of the form <feature-name>. + if $(feature) != $(feature:G) + { + import errors ; + errors.error invalid feature $(feature) ; + } + value-string += "" ; + return $($(feature)$(value-string)<>$(subvalue).subfeature) ; +} + + +# Given a feature and a value of one of its subfeatures, find the name of the +# subfeature. If value-string is supplied, looks for implied subfeatures that +# are specific to that value of feature +# +rule implied-subfeature ( + feature # The main feature name. + subvalue # The value of one of its subfeatures. + : value-string ? # The value of the main feature. +) +{ + local subfeature = [ find-implied-subfeature $(feature) $(subvalue) + : $(value-string) ] ; + if ! $(subfeature) + { + value-string ?= "" ; + import errors ; + errors.error \"$(subvalue)\" is not a known subfeature value of + $(feature)$(value-string) ; + } + return $(subfeature) ; +} + + +# Generate an error if the feature is unknown. +# +local rule validate-feature ( feature ) +{ + if ! $(feature) in $(.all-features) + { + import errors ; + errors.error unknown feature \"$(feature)\" ; + } +} + + +# Given a feature and its value or just a value corresponding to an implicit +# feature, returns a property set consisting of all component subfeatures and +# their values. For example all the following calls: +# +# expand-subfeatures-aux <toolset>gcc-2.95.2-linux-x86 +# expand-subfeatures-aux gcc-2.95.2-linux-x86 +# +# return: +# +# <toolset>gcc <toolset-version>2.95.2 <toolset-os>linux <toolset-cpu>x86 +# +local rule expand-subfeatures-aux ( + feature ? # Feature name or empty if value corresponds to an + # implicit property. + : value # Feature value. + : dont-validate ? # If set, no value string validation will be done. +) +{ + if $(feature) + { + feature = $(feature) ; + } + + if ! $(feature) + { + feature = [ implied-feature $(value) ] ; + } + else + { + validate-feature $(feature) ; + } + if ! $(dont-validate) + { + validate-value-string $(feature) $(value) ; + } + + local components = [ regex.split $(value) "-" ] ; + + # Get the top-level feature's value. + local value = $(components[1]:G=) ; + + local result = $(components[1]:G=$(feature)) ; + + for local subvalue in $(components[2-]) + { + local subfeature = [ find-implied-subfeature $(feature) $(subvalue) : + $(value) ] ; + + # If no subfeature was found reconstitute the value string and use that. + if ! $(subfeature) + { + result = $(components:J=-) ; + result = $(result:G=$(feature)) ; + break ; + } + else + { + local f = [ MATCH ^<(.*)>$ : $(feature) ] ; + result += $(subvalue:G=$(f)-$(subfeature)) ; + } + } + + return $(result) ; +} + + +# Make all elements of properties corresponding to implicit features explicit, +# and express all subfeature values as separate properties in their own right. +# For example, all of the following properties +# +# gcc-2.95.2-linux-x86 +# <toolset>gcc-2.95.2-linux-x86 +# +# might expand to +# +# <toolset>gcc <toolset-version>2.95.2 <toolset-os>linux <toolset-cpu>x86 +# +rule expand-subfeatures ( + properties * # Property set with elements of the form + # <feature>value-string or just value-string in the case + # of implicit features. + : dont-validate ? +) +{ + local result ; + for local p in $(properties) + { + # Don't expand subfeatures in subfeatures + if ! [ MATCH "(:)" : $(p:G) ] + { + result += [ expand-subfeatures-aux $(p:G) : $(p:G=) : $(dont-validate) ] ; + } + else + { + result += $(p) ; + } + } + return $(result) ; +} + + +# Helper for extend, below. Handles the feature case. +# +local rule extend-feature ( feature : values * ) +{ + feature = [ grist $(feature) ] ; + validate-feature $(feature) ; + if implicit in $($(feature).attributes) + { + for local v in $(values) + { + if $($(v).implicit-feature) + { + import errors ; + errors.error $(v) is already associated with the + \"$($(v).implicit-feature)\" feature ; + } + $(v).implicit-feature = $(feature) ; + } + + .all-implicit-values += $(values) ; + } + if ! $($(feature).values) + { + # This is the first value specified for this feature so make it be the + # default. + $(feature).default = $(values[1]) ; + } + $(feature).values += $(values) ; +} + + +# Checks that value-string is a valid value-string for the given feature. +# +rule validate-value-string ( feature value-string ) +{ + if ! ( + free in $($(feature).attributes) + || ( $(value-string) in $(feature).values ) + ) + { + local values = $(value-string) ; + + if $($(feature).subfeatures) + { + if ! $(value-string) in $($(feature).values) + $($(feature).subfeatures) + { + values = [ regex.split $(value-string) - ] ; + } + } + + if ! ( $(values[1]) in $($(feature).values) ) && + + # An empty value is allowed for optional features. + ( $(values[1]) || ! ( optional in $($(feature).attributes) ) ) + { + import errors ; + errors.error \"$(values[1])\" is not a known value of feature + $(feature) : legal "values:" \"$($(feature).values)\" ; + } + + for local v in $(values[2-]) + { + # This will validate any subfeature values in value-string. + implied-subfeature $(feature) $(v) : $(values[1]) ; + } + } +} + + +# A helper that computes: +# * name(s) of module-local variable(s) used to record the correspondence +# between subvalue(s) and a subfeature +# * value of that variable when such a subfeature/subvalue has been defined and +# returns a list consisting of the latter followed by the former. +# +local rule subvalue-var ( + feature # Main feature name. + value-string ? # If supplied, specifies a specific value of the main + # feature for which the subfeature values are valid. + : subfeature # Subfeature name. + : subvalues * # Subfeature values. +) +{ + feature = [ grist $(feature) ] ; + validate-feature $(feature) ; + if $(value-string) + { + validate-value-string $(feature) $(value-string) ; + } + + local subfeature-name = [ get-subfeature-name $(subfeature) $(value-string) ] ; + + return $(subfeature-name) + $(feature)$(value-string:E="")<>$(subvalues).subfeature ; +} + + +# Extends the given subfeature with the subvalues. If the optional value-string +# is provided, the subvalues are only valid for the given value of the feature. +# Thus, you could say that <target-platform>mingw is specific to +# <toolset>gcc-2.95.2 as follows: +# +# extend-subfeature toolset gcc-2.95.2 : target-platform : mingw ; +# +rule extend-subfeature ( + feature # The feature whose subfeature is being extended. + + value-string ? # If supplied, specifies a specific value of the main + # feature for which the new subfeature values are valid. + + : subfeature # Subfeature name. + : subvalues * # Additional subfeature values. +) +{ + local subfeature-vars = [ subvalue-var $(feature) $(value-string) + : $(subfeature) : $(subvalues) ] ; + + local f = [ utility.ungrist [ grist $(feature) ] ] ; + extend $(f)-$(subfeature-vars[1]) : $(subvalues) ; + + # Provide a way to get from the given feature or property and subfeature + # value to the subfeature name. + $(subfeature-vars[2-]) = $(subfeature-vars[1]) ; +} + + +# Returns true iff the subvalues are valid for the feature. When the optional +# value-string is provided, returns true iff the subvalues are valid for the +# given value of the feature. +# +rule is-subvalue ( feature : value-string ? : subfeature : subvalue ) +{ + local subfeature-vars = [ subvalue-var $(feature) $(value-string) + : $(subfeature) : $(subvalue) ] ; + + if $($(subfeature-vars[2])) = $(subfeature-vars[1]) + { + return true ; + } +} + + +# Can be called three ways: +# +# 1. extend feature : values * +# 2. extend <feature> subfeature : values * +# 3. extend <feature>value-string subfeature : values * +# +# * Form 1 adds the given values to the given feature. +# * Forms 2 and 3 add subfeature values to the given feature. +# * Form 3 adds the subfeature values as specific to the given property +# value-string. +# +rule extend ( feature-or-property subfeature ? : values * ) +{ + local feature ; # If a property was specified this is its feature. + local value-string ; # E.g., the gcc-2.95-2 part of <toolset>gcc-2.95.2. + + # If a property was specified. + if $(feature-or-property:G) && $(feature-or-property:G=) + { + # Extract the feature and value-string, if any. + feature = $(feature-or-property:G) ; + value-string = $(feature-or-property:G=) ; + } + else + { + feature = [ grist $(feature-or-property) ] ; + } + + # Dispatch to the appropriate handler. + if $(subfeature) + { + extend-subfeature $(feature) $(value-string) : $(subfeature) + : $(values) ; + } + else + { + # If no subfeature was specified, we do not expect to see a + # value-string. + if $(value-string) + { + import errors ; + errors.error can only specify a property as the first argument when + extending a subfeature + : "usage:" + : " extend" feature ":" values... + : " | extend" <feature>value-string subfeature ":" values... ; + } + + extend-feature $(feature) : $(values) ; + } +} + + +local rule get-subfeature-name ( subfeature value-string ? ) +{ + local prefix = "$(value-string):" ; + return $(prefix:E="")$(subfeature) ; +} + + +# Declares a subfeature. +# +rule subfeature ( + feature # Root feature that is not a subfeature. + value-string ? # A value-string specifying which feature or subfeature + # values this subfeature is specific to, if any. + : subfeature # The name of the subfeature being declared. + : subvalues * # The allowed values of this subfeature. + : attributes * # The attributes of the subfeature. +) +{ + feature = [ grist $(feature) ] ; + validate-feature $(feature) ; + + # Add grist to the subfeature name if a value-string was supplied. + local subfeature-name = [ get-subfeature-name $(subfeature) $(value-string) ] ; + + if $(subfeature-name) in $($(feature).subfeatures) + { + import errors ; + errors.error \"$(subfeature)\" already declared as a subfeature of + \"$(feature)\" "specific to "$(value-string) ; + } + $(feature).subfeatures += $(subfeature-name) ; + + # First declare the subfeature as a feature in its own right. + local f = [ utility.ungrist $(feature) ] ; + feature $(f)-$(subfeature-name) : $(subvalues) : $(attributes) subfeature ; + + # Features and subfeatures are always relevant as a group + .feature-dependencies.$(f) += $(f)-$(subfeature-name) ; + .feature-dependencies.$(f)-$(subfeature-name) += $(f) ; + + # Now make sure the subfeature values are known. + extend-subfeature $(feature) $(value-string) : $(subfeature) : $(subvalues) ; +} + + +# Set components of the given composite property. +# +rule compose ( composite-property : component-properties * ) +{ + local feature = $(composite-property:G) ; + if ! ( composite in [ attributes $(feature) ] ) + { + import errors ; + errors.error "$(feature)" is not a composite feature ; + } + + $(composite-property).components ?= ; + if $($(composite-property).components) + { + import errors ; + errors.error components of "$(composite-property)" already "set:" + $($(composite-property).components) ; + } + + if $(composite-property) in $(component-properties) + { + import errors ; + errors.error composite property "$(composite-property)" cannot have itself as a component ; + } + $(composite-property).components = $(component-properties) ; + + # A composite feature is relevant if any composed feature is relevant + local component-features = [ sequence.transform utility.ungrist : $(component-properties:G) ] ; + .feature-dependencies.$(component-features) += [ utility.ungrist $(feature) ] ; +} + + +local rule expand-composite ( property ) +{ + return $(property) + [ sequence.transform expand-composite : $($(property).components) ] ; +} + + +# Return all values of the given feature specified by the given property set. +# +rule get-values ( feature : properties * ) +{ + local result ; + + feature = $(:E=:G=$(feature)) ; # Add <> if necessary. + for local p in $(properties) + { + if $(p:G) = $(feature) + { + # Use MATCH instead of :G= to get the value, in order to preserve + # the value intact instead of having bjam treat it as a decomposable + # path. + result += [ MATCH ">(.*)" : $(p) ] ; + } + } + return $(result) ; +} + + +rule free-features ( ) +{ + return $(free.features) ; +} + + +# Expand all composite properties in the set so that all components are +# explicitly expressed. +# +rule expand-composites ( properties * ) +{ + local explicit-features = $(properties:G) ; + local result ; + + # Now expand composite features. + for local p in $(properties) + { + local expanded = [ expand-composite $(p) ] ; + + for local x in $(expanded) + { + if ! $(x) in $(result) + { + local f = $(x:G) ; + + if $(f) in $(free.features) + { + result += $(x) ; + } + else if ! $(x) in $(properties) # x is the result of expansion + { + if ! $(f) in $(explicit-features) # not explicitly-specified + { + if $(f) in $(result:G) + { + import errors ; + errors.error expansions of composite features result + in conflicting values for $(f) + : "values:" [ get-values $(f) : $(result) ] $(x:G=) + : one contributing composite property was $(p) ; + } + else + { + result += $(x) ; + } + } + } + else if $(f) in $(result:G) + { + import errors ; + errors.error explicitly-specified values of non-free feature + $(f) conflict : + "existing values:" [ get-values $(f) : $(properties) ] : + "value from expanding " $(p) ":" $(x:G=) ; + } + else + { + result += $(x) ; + } + } + } + } + return $(result) ; +} + + +# Return true iff f is an ordinary subfeature of the parent-property's feature, +# or if f is a subfeature of the parent-property's feature specific to the +# parent-property's value. +# +local rule is-subfeature-of ( parent-property f ) +{ + if subfeature in $($(f).attributes) + { + local specific-subfeature = [ MATCH <(.*):(.*)> : $(f) ] ; + if $(specific-subfeature) + { + # The feature has the form <topfeature-topvalue:subfeature>, e.g. + # <toolset-msvc:version>. + local feature-value = [ split-top-feature $(specific-subfeature[1]) + ] ; + if <$(feature-value[1])>$(feature-value[2]) = $(parent-property) + { + return true ; + } + } + else + { + # The feature has the form <topfeature-subfeature>, e.g. + # <toolset-version> + local top-sub = [ split-top-feature [ utility.ungrist $(f) ] ] ; + if $(top-sub[2]) && <$(top-sub[1])> = $(parent-property:G) + { + return true ; + } + } + } +} + + +# As for is-subfeature-of but for subproperties. +# +local rule is-subproperty-of ( parent-property p ) +{ + return [ is-subfeature-of $(parent-property) $(p:G) ] ; +} + + +# Given a property, return the subset of features consisting of all ordinary +# subfeatures of the property's feature, and all specific subfeatures of the +# property's feature which are conditional on the property's value. +# +local rule select-subfeatures ( parent-property : features * ) +{ + return [ sequence.filter is-subfeature-of $(parent-property) : $(features) ] ; +} + + +# As for select-subfeatures but for subproperties. +# +local rule select-subproperties ( parent-property : properties * ) +{ + return [ sequence.filter is-subproperty-of $(parent-property) : $(properties) ] ; +} + + +# Given a property set which may consist of composite and implicit properties +# and combined subfeature values, returns an expanded, normalized property set +# with all implicit features expressed explicitly, all subfeature values +# individually expressed, and all components of composite properties expanded. +# Non-free features directly expressed in the input properties cause any values +# of those features due to composite feature expansion to be dropped. If two +# values of a given non-free feature are directly expressed in the input, an +# error is issued. +# +rule expand ( properties * ) +{ + local expanded = [ expand-subfeatures $(properties) ] ; + return [ expand-composites $(expanded) ] ; +} + + +# Helper rule for minimize. Returns true iff property's feature is present in +# the contents of the variable named by feature-set-var. +# +local rule in-features ( feature-set-var property ) +{ + if $(property:G) in $($(feature-set-var)) + { + return true ; + } +} + + +# Helper rule for minimize. Returns the list with the same properties, but with +# all subfeatures moved to the end of the list. +# +local rule move-subfeatures-to-the-end ( properties * ) +{ + local x1 ; + local x2 ; + for local p in $(properties) + { + if subfeature in $($(p:G).attributes) + { + x2 += $(p) ; + } + else + { + x1 += $(p) ; + } + } + return $(x1) $(x2) ; +} + + +# Given an expanded property set, eliminate all redundancy: properties that are +# elements of other (composite) properties in the set will be eliminated. +# Non-symmetric properties equal to default values will be eliminated unless +# they override a value from some composite property. Implicit properties will +# be expressed without feature grist, and sub-property values will be expressed +# as elements joined to the corresponding main property. +# +rule minimize ( properties * ) +{ + # Precondition checking + local implicits = [ set.intersection $(p:G=) : $(p:G) ] ; + if $(implicits) + { + import errors ; + errors.error minimize requires an expanded property set, but + \"$(implicits[1])\" appears to be the value of an un-expanded + implicit feature ; + } + + # Remove properties implied by composite features. + local components = $($(properties).components) ; + local x = [ set.difference $(properties) : $(components) ] ; + + # Handle subfeatures and implicit features. + x = [ move-subfeatures-to-the-end $(x) ] ; + local result ; + while $(x) + { + local p fullp = $(x[1]) ; + local f = $(p:G) ; + local v = $(p:G=) ; + + # Eliminate features in implicit properties. + if implicit in [ attributes $(f) ] + { + p = $(v) ; + } + + # Locate all subproperties of $(x[1]) in the property set. + local subproperties = [ select-subproperties $(fullp) : $(x) ] ; + if $(subproperties) + { + # Reconstitute the joined property name. + local sorted = [ sequence.insertion-sort $(subproperties) ] ; + result += $(p)-$(sorted:G="":J=-) ; + + x = [ set.difference $(x[2-]) : $(subproperties) ] ; + } + else + { + # Eliminate properties whose value is equal to feature's default, + # which are not symmetric and which do not contradict values implied + # by composite properties. + + # Since all component properties of composites in the set have been + # eliminated, any remaining property whose feature is the same as a + # component of a composite in the set must have a non-redundant + # value. + if $(fullp) != [ defaults $(f) ] + || symmetric in [ attributes $(f) ] + || $(fullp:G) in $(components:G) + { + result += $(p) ; + } + + x = $(x[2-]) ; + } + } + return $(result) ; +} + + +# Combine all subproperties into their parent properties +# +# Requires: for every subproperty, there is a parent property. All features are +# explicitly expressed. +# +# This rule probably should not be needed, but build-request.expand-no-defaults +# is being abused for unintended purposes and it needs help. +# +rule compress-subproperties ( properties * ) +{ + local all-subs ; + local matched-subs ; + local result ; + + for local p in $(properties) + { + if ! $(p:G) + { + # Expecting fully-gristed properties. + assert.variable-not-empty "p:G" ; + } + + if ! subfeature in $($(p:G).attributes) + { + local subs = [ sequence.insertion-sort + [ sequence.filter is-subproperty-of $(p) : $(properties) ] ] ; + + matched-subs += $(subs) ; + + local subvalues = -$(subs:G=:J=-) ; + subvalues ?= "" ; + result += $(p)$(subvalues) ; + } + else + { + all-subs += $(p) ; + } + } + assert.result true : set.equal $(all-subs) : $(matched-subs) ; + return $(result) ; +} + + +# Given an ungristed string, finds the longest prefix which is a top-level +# feature name followed by a dash, and return a pair consisting of the parts +# before and after that dash. More interesting than a simple split because +# feature names may contain dashes. +# +local rule split-top-feature ( feature-plus ) +{ + local e = [ regex.split $(feature-plus) - ] ; + local f = $(e[1]) ; + local v ; + while $(e) + { + if <$(f)> in $(.all-top-features) + { + v = $(f) $(e[2-]:J=-) ; + } + e = $(e[2-]) ; + f = $(f)-$(e[1]) ; + } + return $(v) ; +} + + +# Given a set of properties, add default values for features not represented in +# the set. +# +# properties must be fully expanded and must not contain conditionals. +# +# Note: if there's an ordinary feature F1 and a composite feature F2 which +# includes some value for F1 and both feature have default values then the +# default value of F1 will be added (as opposed to the value in F2). This might +# not be the right idea, e.g. consider: +# +# feature variant : debug ... ; +# <variant>debug : .... <runtime-debugging>on +# feature <runtime-debugging> : off on ; +# +# Here, when adding default for an empty property set, we'll get +# +# <variant>debug <runtime_debugging>off +# +# and that's kind of strange. +# +rule add-defaults ( properties * ) +{ + for local v in $(properties:G=) + { + if $(v) in $(properties) + { + import errors ; + errors.error add-defaults requires explicitly specified features, + but \"$(v)\" appears to be the value of an un-expanded implicit + feature ; + } + } + local missing-top = [ set.difference $(.all-top-features) : $(properties:G) ] ; + local more = [ defaults $(missing-top) ] ; + + # This is similar to property.refine, except that it + # does not remove subfeatures, because we might be adding + # the default value of a subfeature. + local to-remove ; + for local f in $(properties:G) + { + if ! free in [ attributes $(f) ] + { + to-remove += $(f) ; + } + } + + local worklist = $(properties) $(more) ; + local expanded-from-composite ; + local to-expand = $(more) ; + while $(worklist) + { + # Add defaults for subfeatures of features which are present. + for local p in $(worklist) + { + local s = $($(p:G).subfeatures) ; + local f = [ utility.ungrist $(p:G) ] ; + local missing-subs = [ set.difference <$(f)-$(s)> : $(properties:G) ] ; + local sd = [ defaults [ select-subfeatures $(p) : $(missing-subs) ] ] ; + to-expand += $(sd) ; + } + worklist = ; + + # Expand subfeatures of newly added properties + for local m in [ sequence.transform expand-composite : $(to-expand) ] + { + if ! $(m:G) in $(to-remove) + { + local att = [ attributes $(m:G) ] ; + if $(m:G) in $(expanded-from-composite) && + ! free in $(att) && + ! $(m) in $(more) + { + import errors ; + errors.error "default values for $(p:G) conflict" ; + } + if ! $(m) in $(to-expand) + { + expanded-from-composite += $(m:G) ; + } + more += $(m) ; + if ! subfeature in $(att) && ! free in $(att) + { + worklist += $(m) ; + } + } + } + to-expand = ; + } + + return [ sequence.unique $(properties) $(more) ] ; +} + + +# Given a property-set of the form +# v1/v2/...vN-1/<fN>vN/<fN+1>vN+1/...<fM>vM +# +# Returns +# v1 v2 ... vN-1 <fN>vN <fN+1>vN+1 ... <fM>vM +# +# Note that vN...vM may contain slashes. This needs to be resilient to the +# substitution of backslashes for slashes, since Jam, unbidden, sometimes swaps +# slash direction on NT. +# +rule split ( property-set ) +{ + local pieces = [ regex.split $(property-set) "[\\/]" ] ; + local result ; + + for local x in $(pieces) + { + if ( ! $(x:G) ) && $(result[-1]:G) + { + result = $(result[1--2]) $(result[-1])/$(x) ; + } + else + { + result += $(x) ; + } + } + + return $(result) ; +} + +# Returns all the features that also must be relevant when these features are relevant +rule expand-relevant ( features * ) +{ + local conditional ; + local result ; + for f in $(features) + { + # This looks like a conditional, even though it isn't really. + # (Free features can never be used in conditionals) + local split = [ MATCH "^(.*):<relevant>(.*)$" : $(f) ] ; + if $(split) + { + local-dependencies.$(split[1]) += $(split[2]) ; + conditional += local-dependencies.$(split[1]) ; + } + else + { + result += $(f) ; + } + } + local queue = $(result) ; + while $(queue) + { + local added = [ set.difference + $(.feature-dependencies.$(queue)) + $(local-dependencies.$(queue)) + : $(result) ] ; + result += $(added) ; + queue = $(added) ; + } + # Clean up local map + $(conditional) = ; + return $(result) ; +} + + +# Tests of module feature. +# +rule __test__ ( ) +{ + # Use a fresh copy of the feature module. + prepare-test feature-test-temp ; + + import assert ; + import errors : try catch ; + + # These are local rules and so must be explicitly reimported into the + # testing module. + import feature : extend-feature validate-feature select-subfeatures ; + + feature toolset : gcc : implicit ; + feature define : : free ; + feature runtime-link : dynamic static : symmetric ; + feature optimization : on off ; + feature variant : debug release profile : implicit composite symmetric ; + feature stdlib : native stlport ; + feature magic : : free ; + + compose <variant>debug : <define>_DEBUG <optimization>off ; + compose <variant>release : <define>NDEBUG <optimization>on ; + + assert.result dynamic static : values <runtime-link> ; + assert.result dynamic static : values runtime-link ; + + try ; + { + compose <variant>profile : <variant>profile ; + } + catch composite property <variant>profile cannot have itself as a component ; + + extend-feature toolset : msvc metrowerks ; + subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 3.0 3.0.1 3.0.2 ; + + assert.true is-subvalue toolset : gcc : version : 2.95.3 ; + assert.false is-subvalue toolset : gcc : version : 1.1 ; + + assert.false is-subvalue toolset : msvc : version : 2.95.3 ; + assert.false is-subvalue toolset : : version : yabba ; + + feature yabba ; + subfeature yabba : version : dabba ; + assert.true is-subvalue yabba : : version : dabba ; + + subfeature toolset gcc : platform : linux cygwin : optional ; + + assert.result <toolset-gcc:version> + : select-subfeatures <toolset>gcc + : <toolset-gcc:version> + <toolset-msvc:version> + <toolset-version> + <stdlib> ; + + subfeature stdlib : version : 3 4 : optional ; + + assert.result <stdlib-version> + : select-subfeatures <stdlib>native + : <toolset-gcc:version> + <toolset-msvc:version> + <toolset-version> + <stdlib-version> ; + + assert.result <toolset>gcc <toolset-gcc:version>3.0.1 + : expand-subfeatures <toolset>gcc-3.0.1 ; + + assert.result <toolset>gcc <toolset-gcc:version>3.0.1 <toolset-gcc:platform>linux + : expand-subfeatures <toolset>gcc-3.0.1-linux ; + + assert.result <toolset>gcc <toolset-gcc:version>3.0.1 + : expand <toolset>gcc <toolset-gcc:version>3.0.1 ; + + assert.result <define>foo=x-y + : expand-subfeatures <define>foo=x-y ; + + assert.result <define>minus=- + : expand-subfeatures <define>minus=- ; + + assert.result <toolset>gcc <toolset-gcc:version>3.0.1 + : expand-subfeatures gcc-3.0.1 ; + + assert.result a c e + : get-values <x> : <x>a <y>b <x>c <y>d <x>e ; + + assert.result <toolset>gcc <toolset-gcc:version>3.0.1 + <variant>debug <define>_DEBUG <optimization>on + : expand gcc-3.0.1 debug <optimization>on ; + + assert.result <variant>debug <define>_DEBUG <optimization>on + : expand debug <optimization>on ; + + assert.result <optimization>on <variant>debug <define>_DEBUG + : expand <optimization>on debug ; + + assert.result <runtime-link>dynamic <optimization>on + : defaults <runtime-link> <define> <optimization> ; + + # Make sure defaults is resilient to missing grist. + assert.result <runtime-link>dynamic <optimization>on + : defaults runtime-link define optimization ; + + feature dummy : dummy1 dummy2 ; + subfeature dummy : subdummy : x y z : optional ; + + feature fu : fu1 fu2 : optional ; + subfeature fu : subfu : x y z : optional ; + subfeature fu : subfu2 : q r s ; + + assert.result optional : attributes <fu> ; + + assert.result [ SORT <define>_DEBUG <runtime-link>static + <define>foobar <optimization>on + <toolset>gcc <variant>debug <stdlib>native + <dummy>dummy1 <toolset-gcc:version>2.95.2 ] + : add-defaults <runtime-link>static <define>foobar <optimization>on ; + + assert.result [ SORT <define>_DEBUG <runtime-link>static + <define>foobar <optimization>on + <fu>fu1 <toolset>gcc <variant>debug + <stdlib>native <dummy>dummy1 <fu-subfu2>q <toolset-gcc:version>2.95.2 ] + : add-defaults <runtime-link>static <define>foobar <optimization>on + <fu>fu1 ; + + feature f0 : f0-0 f0-1 ; + feature f1 : f1-0 f1-1 ; + + assert.true valid <f0> ; + assert.true valid <f1> ; + assert.true valid <f0> <f1> ; + + set-default <runtime-link> : static ; + assert.result <runtime-link>static : defaults <runtime-link> ; + + assert.result gcc-3.0.1 debug <optimization>on + : minimize [ expand gcc-3.0.1 debug <optimization>on <stdlib>native ] ; + + assert.result gcc-3.0.1 debug <runtime-link>dynamic + : minimize + [ expand gcc-3.0.1 debug <optimization>off <runtime-link>dynamic ] ; + + assert.result gcc-3.0.1 debug + : minimize [ expand gcc-3.0.1 debug <optimization>off ] ; + + assert.result debug <optimization>on + : minimize [ expand debug <optimization>on ] ; + + assert.result gcc-3.0 + : minimize <toolset>gcc <toolset-gcc:version>3.0 ; + + assert.result gcc-3.0 + : minimize <toolset-gcc:version>3.0 <toolset>gcc ; + + assert.result <x>y/z <a>b/c <d>e/f + : split <x>y/z/<a>b/c/<d>e/f ; + + assert.result <x>y/z <a>b/c <d>e/f + : split <x>y\\z\\<a>b\\c\\<d>e\\f ; + + assert.result a b c <d>e/f/g <h>i/j/k + : split a/b/c/<d>e/f/g/<h>i/j/k ; + + assert.result a b c <d>e/f/g <h>i/j/k + : split a\\b\\c\\<d>e\\f\\g\\<h>i\\j\\k ; + + # Test error checking. + + try ; + { + expand release <optimization>off <optimization>on ; + } + catch explicitly-specified values of non-free feature <optimization> conflict ; + + try ; + { + validate-feature <foobar> ; + } + catch unknown feature ; + + validate-value-string <toolset> gcc ; + validate-value-string <toolset> gcc-3.0.1 ; + + try ; + { + validate-value-string <toolset> digital_mars ; + } + catch \"digital_mars\" is not a known value of <toolset> ; + + try ; + { + feature foobar : : baz ; + } + catch unknown "attributes:" baz ; + + feature feature1 ; + try ; + { + feature feature1 ; + } + catch feature already "defined:" ; + + try ; + { + feature feature2 : : free implicit ; + } + catch free features cannot also be implicit ; + + try ; + { + feature feature3 : : free propagated ; + } + catch free features cannot be propagated ; + + try ; + { + implied-feature lackluster ; + } + catch \"lackluster\" is not an implicit feature value ; + + try ; + { + implied-subfeature <toolset> 3.0.1 ; + } + catch \"3.0.1\" is not a known subfeature value of <toolset> ; + + try ; + { + implied-subfeature <toolset> not-a-version : gcc ; + } + catch \"not-a-version\" is not a known subfeature value of <toolset>gcc ; + + # Leave a clean copy of the features module behind. + finish-test feature-test-temp ; +} diff --git a/src/boost/tools/build/src/build/feature.py b/src/boost/tools/build/src/build/feature.py new file mode 100644 index 000000000..db825f06f --- /dev/null +++ b/src/boost/tools/build/src/build/feature.py @@ -0,0 +1,914 @@ +# Status: ported, except for unit tests. +# Base revision: 64488 +# +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2002, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import re + +from b2.manager import get_manager +from b2.util import utility, bjam_signature, is_iterable_typed +import b2.util.set +from b2.util.utility import add_grist, get_grist, ungrist, replace_grist, to_seq +from b2.exceptions import * + +__re_split_subfeatures = re.compile ('<(.*):(.*)>') +__re_no_hyphen = re.compile ('^([^:]+)$') +__re_slash_or_backslash = re.compile (r'[\\/]') + +VALID_ATTRIBUTES = { + 'implicit', + 'composite', + 'optional', + 'symmetric', + 'free', + 'incidental', + 'path', + 'dependency', + 'propagated', + 'link-incompatible', + 'subfeature', + 'order-sensitive' +} + + +class Feature(object): + def __init__(self, name, values, attributes): + assert isinstance(name, basestring) + assert is_iterable_typed(values, basestring) + assert is_iterable_typed(attributes, basestring) + self.name = name + self.values = values + self.default = None + self.subfeatures = [] + self.parent = None + self.attributes_string_list = [] + self._hash = hash(self.name) + + for attr in attributes: + self.attributes_string_list.append(attr) + attr = attr.replace("-", "_") + setattr(self, attr, True) + + def add_values(self, values): + assert is_iterable_typed(values, basestring) + self.values.extend(values) + + def set_default(self, value): + assert isinstance(value, basestring) + for attr in ('free', 'optional'): + if getattr(self, attr): + get_manager().errors()('"{}" feature "<{}>" cannot have a default value.' + .format(attr, self.name)) + + self.default = value + + def add_subfeature(self, name): + assert isinstance(name, Feature) + self.subfeatures.append(name) + + def set_parent(self, feature, value): + assert isinstance(feature, Feature) + assert isinstance(value, basestring) + self.parent = (feature, value) + + def __hash__(self): + return self._hash + + def __str__(self): + return self.name + + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + """ + global __all_attributes, __all_features, __implicit_features, __composite_properties + global __subfeature_from_value, __all_top_features, __free_features + global __all_subfeatures + + # sets the default value of False for each valid attribute + for attr in VALID_ATTRIBUTES: + setattr(Feature, attr.replace("-", "_"), False) + + # A map containing all features. The key is the feature name. + # The value is an instance of Feature class. + __all_features = {} + + # All non-subfeatures. + __all_top_features = [] + + # Maps valus to the corresponding implicit feature + __implicit_features = {} + + # A map containing all composite properties. The key is a Property instance, + # and the value is a list of Property instances + __composite_properties = {} + + # Maps a value to the corresponding subfeature name. + __subfeature_from_value = {} + + # All free features + __free_features = [] + + __all_subfeatures = [] + +reset () + +def enumerate (): + """ Returns an iterator to the features map. + """ + return __all_features.iteritems () + +def get(name): + """Return the Feature instance for the specified name. + + Throws if no feature by such name exists + """ + assert isinstance(name, basestring) + return __all_features[name] + +# FIXME: prepare-test/finish-test? + +@bjam_signature((["name"], ["values", "*"], ["attributes", "*"])) +def feature (name, values, attributes = []): + """ Declares a new feature with the given name, values, and attributes. + name: the feature name + values: a sequence of the allowable values - may be extended later with feature.extend + attributes: a sequence of the feature's attributes (e.g. implicit, free, propagated, ...) + """ + __validate_feature_attributes (name, attributes) + + feature = Feature(name, [], attributes) + __all_features[name] = feature + # Temporary measure while we have not fully moved from 'gristed strings' + __all_features["<" + name + ">"] = feature + + name = add_grist(name) + + if 'subfeature' in attributes: + __all_subfeatures.append(name) + else: + __all_top_features.append(feature) + + extend (name, values) + + # FIXME: why his is needed. + if 'free' in attributes: + __free_features.append (name) + + return feature + +@bjam_signature((["feature"], ["value"])) +def set_default (feature, value): + """ Sets the default value of the given feature, overriding any previous default. + feature: the name of the feature + value: the default value to assign + """ + f = __all_features[feature] + bad_attribute = None + + if f.free: + bad_attribute = "free" + elif f.optional: + bad_attribute = "optional" + + if bad_attribute: + raise InvalidValue ("%s property %s cannot have a default" % (bad_attribute, f.name)) + + if value not in f.values: + raise InvalidValue ("The specified default value, '%s' is invalid.\n" % value + "allowed values are: %s" % f.values) + + f.set_default(value) + +def defaults(features): + """ Returns the default property values for the given features. + """ + assert is_iterable_typed(features, Feature) + # FIXME: should merge feature and property modules. + from . import property + + result = [] + for f in features: + if not f.free and not f.optional and f.default: + result.append(property.Property(f, f.default)) + + return result + +def valid (names): + """ Returns true iff all elements of names are valid features. + """ + if isinstance(names, str): + names = [names] + assert is_iterable_typed(names, basestring) + + return all(name in __all_features for name in names) + +def attributes (feature): + """ Returns the attributes of the given feature. + """ + assert isinstance(feature, basestring) + return __all_features[feature].attributes_string_list + +def values (feature): + """ Return the values of the given feature. + """ + assert isinstance(feature, basestring) + validate_feature (feature) + return __all_features[feature].values + +def is_implicit_value (value_string): + """ Returns true iff 'value_string' is a value_string + of an implicit feature. + """ + assert isinstance(value_string, basestring) + if value_string in __implicit_features: + return __implicit_features[value_string] + + v = value_string.split('-') + + if v[0] not in __implicit_features: + return False + + feature = __implicit_features[v[0]] + + for subvalue in (v[1:]): + if not __find_implied_subfeature(feature, subvalue, v[0]): + return False + + return True + +def implied_feature (implicit_value): + """ Returns the implicit feature associated with the given implicit value. + """ + assert isinstance(implicit_value, basestring) + components = implicit_value.split('-') + + if components[0] not in __implicit_features: + raise InvalidValue ("'%s' is not a value of an implicit feature" % implicit_value) + + return __implicit_features[components[0]] + +def __find_implied_subfeature (feature, subvalue, value_string): + assert isinstance(feature, Feature) + assert isinstance(subvalue, basestring) + assert isinstance(value_string, basestring) + + try: + return __subfeature_from_value[feature][value_string][subvalue] + except KeyError: + return None + +# Given a feature and a value of one of its subfeatures, find the name +# of the subfeature. If value-string is supplied, looks for implied +# subfeatures that are specific to that value of feature +# feature # The main feature name +# subvalue # The value of one of its subfeatures +# value-string # The value of the main feature + +def implied_subfeature (feature, subvalue, value_string): + assert isinstance(feature, Feature) + assert isinstance(subvalue, basestring) + assert isinstance(value_string, basestring) + result = __find_implied_subfeature (feature, subvalue, value_string) + if not result: + raise InvalidValue ("'%s' is not a known subfeature value of '%s%s'" % (subvalue, feature, value_string)) + + return result + +def validate_feature (name): + """ Checks if all name is a valid feature. Otherwise, raises an exception. + """ + assert isinstance(name, basestring) + if name not in __all_features: + raise InvalidFeature ("'%s' is not a valid feature name" % name) + else: + return __all_features[name] + + +# Uses Property +def __expand_subfeatures_aux (property_, dont_validate = False): + """ Helper for expand_subfeatures. + Given a feature and value, or just a value corresponding to an + implicit feature, returns a property set consisting of all component + subfeatures and their values. For example: + + expand_subfeatures <toolset>gcc-2.95.2-linux-x86 + -> <toolset>gcc <toolset-version>2.95.2 <toolset-os>linux <toolset-cpu>x86 + equivalent to: + expand_subfeatures gcc-2.95.2-linux-x86 + + feature: The name of the feature, or empty if value corresponds to an implicit property + value: The value of the feature. + dont_validate: If True, no validation of value string will be done. + """ + from . import property # no __debug__ since Property is used elsewhere + assert isinstance(property_, property.Property) + assert isinstance(dont_validate, int) # matches bools + + f = property_.feature + v = property_.value + if not dont_validate: + validate_value_string(f, v) + + components = v.split ("-") + + v = components[0] + + result = [property.Property(f, components[0])] + + subvalues = components[1:] + + while len(subvalues) > 0: + subvalue = subvalues [0] # pop the head off of subvalues + subvalues = subvalues [1:] + + subfeature = __find_implied_subfeature (f, subvalue, v) + + # If no subfeature was found, reconstitute the value string and use that + if not subfeature: + return [property.Property(f, '-'.join(components))] + + result.append(property.Property(subfeature, subvalue)) + + return result + +def expand_subfeatures(properties, dont_validate = False): + """ + Make all elements of properties corresponding to implicit features + explicit, and express all subfeature values as separate properties + in their own right. For example, the property + + gcc-2.95.2-linux-x86 + + might expand to + + <toolset>gcc <toolset-version>2.95.2 <toolset-os>linux <toolset-cpu>x86 + + properties: A sequence with elements of the form + <feature>value-string or just value-string in the + case of implicit features. + : dont_validate: If True, no validation of value string will be done. + """ + if __debug__: + from .property import Property + assert is_iterable_typed(properties, Property) + assert isinstance(dont_validate, int) # matches bools + result = [] + for p in properties: + # Don't expand subfeatures in subfeatures + if p.feature.subfeature: + result.append (p) + else: + result.extend(__expand_subfeatures_aux (p, dont_validate)) + + return result + + + +# rule extend was defined as below: + # Can be called three ways: + # + # 1. extend feature : values * + # 2. extend <feature> subfeature : values * + # 3. extend <feature>value-string subfeature : values * + # + # * Form 1 adds the given values to the given feature + # * Forms 2 and 3 add subfeature values to the given feature + # * Form 3 adds the subfeature values as specific to the given + # property value-string. + # + #rule extend ( feature-or-property subfeature ? : values * ) +# +# Now, the specific rule must be called, depending on the desired operation: +# extend_feature +# extend_subfeature +@bjam_signature([['name'], ['values', '*']]) +def extend (name, values): + """ Adds the given values to the given feature. + """ + assert isinstance(name, basestring) + assert is_iterable_typed(values, basestring) + name = add_grist (name) + __validate_feature (name) + feature = __all_features [name] + + if feature.implicit: + for v in values: + if v in __implicit_features: + raise BaseException ("'%s' is already associated with the feature '%s'" % (v, __implicit_features [v])) + + __implicit_features[v] = feature + + if values and not feature.values and not(feature.free or feature.optional): + # This is the first value specified for this feature, + # take it as default value + feature.set_default(values[0]) + + feature.add_values(values) + +def validate_value_string (f, value_string): + """ Checks that value-string is a valid value-string for the given feature. + """ + assert isinstance(f, Feature) + assert isinstance(value_string, basestring) + if f.free or value_string in f.values: + return + + values = [value_string] + + if f.subfeatures: + if not value_string in f.values and \ + not value_string in f.subfeatures: + values = value_string.split('-') + + # An empty value is allowed for optional features + if not values[0] in f.values and \ + (values[0] or not f.optional): + raise InvalidValue ("'%s' is not a known value of feature '%s'\nlegal values: '%s'" % (values [0], f.name, f.values)) + + for v in values [1:]: + # this will validate any subfeature values in value-string + implied_subfeature(f, v, values[0]) + + +""" Extends the given subfeature with the subvalues. If the optional + value-string is provided, the subvalues are only valid for the given + value of the feature. Thus, you could say that + <target-platform>mingw is specific to <toolset>gcc-2.95.2 as follows: + + extend-subfeature toolset gcc-2.95.2 : target-platform : mingw ; + + feature: The feature whose subfeature is being extended. + + value-string: If supplied, specifies a specific value of the + main feature for which the new subfeature values + are valid. + + subfeature: The name of the subfeature. + + subvalues: The additional values of the subfeature being defined. +""" +def extend_subfeature (feature_name, value_string, subfeature_name, subvalues): + assert isinstance(feature_name, basestring) + assert isinstance(value_string, basestring) + assert isinstance(subfeature_name, basestring) + assert is_iterable_typed(subvalues, basestring) + feature = validate_feature(feature_name) + + if value_string: + validate_value_string(feature, value_string) + + subfeature_name = feature_name + '-' + __get_subfeature_name (subfeature_name, value_string) + + extend(subfeature_name, subvalues) ; + subfeature = __all_features[subfeature_name] + + if value_string == None: value_string = '' + + if feature not in __subfeature_from_value: + __subfeature_from_value[feature] = {} + + if value_string not in __subfeature_from_value[feature]: + __subfeature_from_value[feature][value_string] = {} + + for subvalue in subvalues: + __subfeature_from_value [feature][value_string][subvalue] = subfeature + +@bjam_signature((["feature_name", "value_string", "?"], ["subfeature"], + ["subvalues", "*"], ["attributes", "*"])) +def subfeature (feature_name, value_string, subfeature, subvalues, attributes = []): + """ Declares a subfeature. + feature_name: Root feature that is not a subfeature. + value_string: An optional value-string specifying which feature or + subfeature values this subfeature is specific to, + if any. + subfeature: The name of the subfeature being declared. + subvalues: The allowed values of this subfeature. + attributes: The attributes of the subfeature. + """ + parent_feature = validate_feature (feature_name) + + # Add grist to the subfeature name if a value-string was supplied + subfeature_name = __get_subfeature_name (subfeature, value_string) + + if subfeature_name in __all_features[feature_name].subfeatures: + message = "'%s' already declared as a subfeature of '%s'" % (subfeature, feature_name) + message += " specific to '%s'" % value_string + raise BaseException (message) + + # First declare the subfeature as a feature in its own right + f = feature (feature_name + '-' + subfeature_name, subvalues, attributes + ['subfeature']) + f.set_parent(parent_feature, value_string) + + parent_feature.add_subfeature(f) + + # Now make sure the subfeature values are known. + extend_subfeature (feature_name, value_string, subfeature, subvalues) + + +@bjam_signature((["composite_property_s"], ["component_properties_s", "*"])) +def compose (composite_property_s, component_properties_s): + """ Sets the components of the given composite property. + + All parameters are <feature>value strings + """ + from . import property + + component_properties_s = to_seq (component_properties_s) + composite_property = property.create_from_string(composite_property_s) + f = composite_property.feature + + if len(component_properties_s) > 0 and isinstance(component_properties_s[0], property.Property): + component_properties = component_properties_s + else: + component_properties = [property.create_from_string(p) for p in component_properties_s] + + if not f.composite: + raise BaseException ("'%s' is not a composite feature" % f) + + if property in __composite_properties: + raise BaseException ('components of "%s" already set: %s' % (composite_property, str (__composite_properties[composite_property]))) + + if composite_property in component_properties: + raise BaseException ('composite property "%s" cannot have itself as a component' % composite_property) + + __composite_properties[composite_property] = component_properties + + +def expand_composite(property_): + if __debug__: + from .property import Property + assert isinstance(property_, Property) + result = [ property_ ] + if property_ in __composite_properties: + for p in __composite_properties[property_]: + result.extend(expand_composite(p)) + return result + +@bjam_signature((['feature'], ['properties', '*'])) +def get_values (feature, properties): + """ Returns all values of the given feature specified by the given property set. + """ + if feature[0] != '<': + feature = '<' + feature + '>' + result = [] + for p in properties: + if get_grist (p) == feature: + result.append (replace_grist (p, '')) + + return result + +def free_features (): + """ Returns all free features. + """ + return __free_features + +def expand_composites (properties): + """ Expand all composite properties in the set so that all components + are explicitly expressed. + """ + if __debug__: + from .property import Property + assert is_iterable_typed(properties, Property) + explicit_features = set(p.feature for p in properties) + + result = [] + + # now expand composite features + for p in properties: + expanded = expand_composite(p) + + for x in expanded: + if not x in result: + f = x.feature + + if f.free: + result.append (x) + elif not x in properties: # x is the result of expansion + if not f in explicit_features: # not explicitly-specified + if any(r.feature == f for r in result): + raise FeatureConflict( + "expansions of composite features result in " + "conflicting values for '%s'\nvalues: '%s'\none contributing composite property was '%s'" % + (f.name, [r.value for r in result if r.feature == f] + [x.value], p)) + else: + result.append (x) + elif any(r.feature == f for r in result): + raise FeatureConflict ("explicitly-specified values of non-free feature '%s' conflict\n" + "existing values: '%s'\nvalue from expanding '%s': '%s'" % (f, + [r.value for r in result if r.feature == f], p, x.value)) + else: + result.append (x) + + return result + +# Uses Property +def is_subfeature_of (parent_property, f): + """ Return true iff f is an ordinary subfeature of the parent_property's + feature, or if f is a subfeature of the parent_property's feature + specific to the parent_property's value. + """ + if __debug__: + from .property import Property + assert isinstance(parent_property, Property) + assert isinstance(f, Feature) + + if not f.subfeature: + return False + + p = f.parent + if not p: + return False + + parent_feature = p[0] + parent_value = p[1] + + if parent_feature != parent_property.feature: + return False + + if parent_value and parent_value != parent_property.value: + return False + + return True + +def __is_subproperty_of (parent_property, p): + """ As is_subfeature_of, for subproperties. + """ + if __debug__: + from .property import Property + assert isinstance(parent_property, Property) + assert isinstance(p, Property) + return is_subfeature_of (parent_property, p.feature) + + +# Returns true iff the subvalue is valid for the feature. When the +# optional value-string is provided, returns true iff the subvalues +# are valid for the given value of the feature. +def is_subvalue(feature, value_string, subfeature, subvalue): + assert isinstance(feature, basestring) + assert isinstance(value_string, basestring) + assert isinstance(subfeature, basestring) + assert isinstance(subvalue, basestring) + if not value_string: + value_string = '' + try: + return __subfeature_from_value[feature][value_string][subvalue] == subfeature + except KeyError: + return False + + +# Uses Property +def expand (properties): + """ Given a property set which may consist of composite and implicit + properties and combined subfeature values, returns an expanded, + normalized property set with all implicit features expressed + explicitly, all subfeature values individually expressed, and all + components of composite properties expanded. Non-free features + directly expressed in the input properties cause any values of + those features due to composite feature expansion to be dropped. If + two values of a given non-free feature are directly expressed in the + input, an error is issued. + """ + if __debug__: + from .property import Property + assert is_iterable_typed(properties, Property) + expanded = expand_subfeatures(properties) + return expand_composites (expanded) + +# Accepts list of Property objects +def add_defaults (properties): + """ Given a set of properties, add default values for features not + represented in the set. + Note: if there's there's ordinary feature F1 and composite feature + F2, which includes some value for F1, and both feature have default values, + then the default value of F1 will be added, not the value in F2. This might + not be right idea: consider + + feature variant : debug ... ; + <variant>debug : .... <runtime-debugging>on + feature <runtime-debugging> : off on ; + + Here, when adding default for an empty property set, we'll get + + <variant>debug <runtime_debugging>off + + and that's kind of strange. + """ + if __debug__: + from .property import Property + assert is_iterable_typed(properties, Property) + # create a copy since properties will be modified + result = list(properties) + + # We don't add default for conditional properties. We don't want + # <variant>debug:<define>DEBUG to be takes as specified value for <variant> + handled_features = set(p.feature for p in properties if not p.condition) + + missing_top = [f for f in __all_top_features if not f in handled_features] + more = defaults(missing_top) + result.extend(more) + handled_features.update(p.feature for p in more) + + # Add defaults for subfeatures of features which are present + for p in result[:]: + subfeatures = [s for s in p.feature.subfeatures if not s in handled_features] + more = defaults(__select_subfeatures(p, subfeatures)) + handled_features.update(h.feature for h in more) + result.extend(more) + + return result + +def minimize (properties): + """ Given an expanded property set, eliminate all redundancy: properties + which are elements of other (composite) properties in the set will + be eliminated. Non-symmetric properties equal to default values will be + eliminated, unless the override a value from some composite property. + Implicit properties will be expressed without feature + grist, and sub-property values will be expressed as elements joined + to the corresponding main property. + """ + if __debug__: + from .property import Property + assert is_iterable_typed(properties, Property) + # remove properties implied by composite features + components = [] + component_features = set() + for property in properties: + if property in __composite_properties: + cs = __composite_properties[property] + components.extend(cs) + component_features.update(c.feature for c in cs) + + properties = b2.util.set.difference (properties, components) + + # handle subfeatures and implicit features + + # move subfeatures to the end of the list + properties = [p for p in properties if not p.feature.subfeature] +\ + [p for p in properties if p.feature.subfeature] + + result = [] + while properties: + p = properties[0] + f = p.feature + + # locate all subproperties of $(x[1]) in the property set + subproperties = [x for x in properties if is_subfeature_of(p, x.feature)] + + if subproperties: + # reconstitute the joined property name + subproperties.sort () + joined = b2.build.property.Property(p.feature, p.value + '-' + '-'.join ([sp.value for sp in subproperties])) + result.append(joined) + + properties = b2.util.set.difference(properties[1:], subproperties) + + else: + # eliminate properties whose value is equal to feature's + # default and which are not symmetric and which do not + # contradict values implied by composite properties. + + # since all component properties of composites in the set + # have been eliminated, any remaining property whose + # feature is the same as a component of a composite in the + # set must have a non-redundant value. + if p.value != f.default or f.symmetric or f in component_features: + result.append (p) + + properties = properties[1:] + + return result + + +def split (properties): + """ Given a property-set of the form + v1/v2/...vN-1/<fN>vN/<fN+1>vN+1/...<fM>vM + + Returns + v1 v2 ... vN-1 <fN>vN <fN+1>vN+1 ... <fM>vM + + Note that vN...vM may contain slashes. This is resilient to the + substitution of backslashes for slashes, since Jam, unbidden, + sometimes swaps slash direction on NT. + """ + assert isinstance(properties, basestring) + def split_one (properties): + pieces = re.split (__re_slash_or_backslash, properties) + result = [] + + for x in pieces: + if not get_grist (x) and len (result) > 0 and get_grist (result [-1]): + result = result [0:-1] + [ result [-1] + '/' + x ] + else: + result.append (x) + + return result + + if isinstance (properties, str): + return split_one (properties) + + result = [] + for p in properties: + result += split_one (p) + return result + + +def compress_subproperties (properties): + """ Combine all subproperties into their parent properties + + Requires: for every subproperty, there is a parent property. All + features are explicitly expressed. + + This rule probably shouldn't be needed, but + build-request.expand-no-defaults is being abused for unintended + purposes and it needs help + """ + from .property import Property + assert is_iterable_typed(properties, Property) + result = [] + matched_subs = set() + all_subs = set() + for p in properties: + f = p.feature + + if not f.subfeature: + subs = [x for x in properties if is_subfeature_of(p, x.feature)] + if subs: + + matched_subs.update(subs) + + subvalues = '-'.join (sub.value for sub in subs) + result.append(Property( + p.feature, p.value + '-' + subvalues, + p.condition)) + else: + result.append(p) + + else: + all_subs.add(p) + + # TODO: this variables are used just for debugging. What's the overhead? + assert all_subs == matched_subs + + return result + +###################################################################################### +# Private methods + +def __select_subproperties (parent_property, properties): + if __debug__: + from .property import Property + assert is_iterable_typed(properties, Property) + assert isinstance(parent_property, Property) + return [ x for x in properties if __is_subproperty_of (parent_property, x) ] + +def __get_subfeature_name (subfeature, value_string): + assert isinstance(subfeature, basestring) + assert isinstance(value_string, basestring) or value_string is None + if value_string == None: + prefix = '' + else: + prefix = value_string + ':' + + return prefix + subfeature + + +def __validate_feature_attributes (name, attributes): + assert isinstance(name, basestring) + assert is_iterable_typed(attributes, basestring) + for attribute in attributes: + if attribute not in VALID_ATTRIBUTES: + raise InvalidAttribute ("unknown attributes: '%s' in feature declaration: '%s'" % (str (b2.util.set.difference (attributes, __all_attributes)), name)) + + if name in __all_features: + raise AlreadyDefined ("feature '%s' already defined" % name) + elif 'implicit' in attributes and 'free' in attributes: + raise InvalidAttribute ("free features cannot also be implicit (in declaration of feature '%s')" % name) + elif 'free' in attributes and 'propagated' in attributes: + raise InvalidAttribute ("free features cannot also be propagated (in declaration of feature '%s')" % name) + + +def __validate_feature (feature): + """ Generates an error if the feature is unknown. + """ + assert isinstance(feature, basestring) + if feature not in __all_features: + raise BaseException ('unknown feature "%s"' % feature) + + +def __select_subfeatures (parent_property, features): + """ Given a property, return the subset of features consisting of all + ordinary subfeatures of the property's feature, and all specific + subfeatures of the property's feature which are conditional on the + property's value. + """ + if __debug__: + from .property import Property + assert isinstance(parent_property, Property) + assert is_iterable_typed(features, Feature) + return [f for f in features if is_subfeature_of (parent_property, f)] + +# FIXME: copy over tests. diff --git a/src/boost/tools/build/src/build/generators.jam b/src/boost/tools/build/src/build/generators.jam new file mode 100644 index 000000000..80cf55879 --- /dev/null +++ b/src/boost/tools/build/src/build/generators.jam @@ -0,0 +1,1453 @@ +# Copyright 2002. Vladimir Prus +# Copyright 2006. Rene Rivera +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Manages 'generators' --- objects which can do transformation between different +# target types and contain algorithm for finding transformation from sources to +# targets. +# +# The main entry point to this module is generators.construct rule. It is given +# a list of source targets, desired target type and a set of properties. It +# starts by selecting 'viable generators', which have any chances of producing +# the desired target type with the required properties. Generators are ranked +# and a set of the most specific ones is selected. +# +# The most specific generators have their 'run' methods called, with the +# properties and list of sources. Each one selects a target which can be +# directly consumed, and tries to convert the remaining ones to the types it can +# consume. This is done by recursively calling 'construct' with all consumable +# types. +# +# If the generator has collected all the targets it needs, it creates targets +# corresponding to result, and returns it. When all generators have been run, +# results of one of them are selected and returned as a result. +# +# It is quite possible for 'construct' to return more targets that it was asked +# for. For example, if it were asked to generate a target of type EXE, but the +# only found generator produces both EXE and TDS (file with debug) information. +# The extra target will be returned. +# +# Likewise, when generator tries to convert sources to consumable types, it can +# get more targets that it was asked for. The question is what to do with extra +# targets. B2 attempts to convert them to requested types, and attempts +# that as early as possible. Specifically, this is done after invoking each +# generator. TODO: An example is needed to document the rationale for trying +# extra target conversion at that point. +# +# In order for the system to be able to use a specific generator instance 'when +# needed', the instance needs to be registered with the system using +# generators.register() or one of its related rules. Unregistered generators may +# only be run explicitly and will not be considered by B2 when when +# converting between given target types. + +import "class" : new ; +import property-set ; +import sequence ; +import set ; +import type ; +import utility ; +import virtual-target ; + + +if "--debug-generators" in [ modules.peek : ARGV ] +{ + .debug = true ; +} + + +# Updated cached viable source target type information as needed after a new +# target type gets defined. This is needed because if a target type is a viable +# source target type for some generator then all of the target type's derived +# target types should automatically be considered as viable source target types +# for the same generator as well. Does nothing if a non-derived target type is +# passed to it. +# +rule update-cached-information-with-a-new-type ( type ) +{ + local base-type = [ type.base $(type) ] ; + if $(base-type) + { + for local g in $(.vstg-cached-generators) + { + if $(base-type) in $(.vstg.$(g)) + { + .vstg.$(g) += $(type) ; + } + } + + for local t in $(.vst-cached-types) + { + if $(base-type) in $(.vst.$(t)) + { + .vst.$(t) += $(type) ; + } + } + } +} + + +# Clears cached viable source target type information except for target types +# and generators with all source types listed as viable. Should be called when +# something invalidates those cached values by possibly causing some new source +# types to become viable. +# +local rule invalidate-extendable-viable-source-target-type-cache ( ) +{ + local generators-with-cached-source-types = $(.vstg-cached-generators) ; + .vstg-cached-generators = ; + for local g in $(generators-with-cached-source-types) + { + if $(.vstg.$(g)) = * + { + .vstg-cached-generators += $(g) ; + } + else + { + .vstg.$(g) = ; + } + } + + local types-with-cached-source-types = $(.vst-cached-types) ; + .vst-cached-types = ; + for local t in $(types-with-cached-source-types) + { + if $(.vst.$(t)) = * + { + .vst-cached-types += $(t) ; + } + else + { + .vst.$(t) = ; + } + } +} + + +# Outputs a debug message if generators debugging is on. Each element of +# 'message' is checked to see if it is a class instance. If so, instead of the +# value, the result of 'str' call is output. +# +local rule generators.dout ( message * ) +{ + if $(.debug) + { + ECHO [ sequence.transform utility.str : $(message) ] ; + } +} + + +local rule indent ( ) +{ + return $(.indent:J="") ; +} + + +local rule increase-indent ( ) +{ + .indent += " " ; +} + + +local rule decrease-indent ( ) +{ + .indent = $(.indent[2-]) ; +} + + +# Models a generator. +# +class generator +{ + import "class" : new ; + import feature ; + import generators : indent increase-indent decrease-indent generators.dout ; + import utility ; + import path ; + import property ; + import property-set ; + import sequence ; + import set ; + import toolset ; + import type ; + import virtual-target ; + + EXPORT class@generator : indent increase-indent decrease-indent + generators.dout ; + + rule __init__ ( + id # Identifies the generator - should be name + # of the rule which sets up the build + # actions. + + composing ? # Whether generator processes each source + # target in turn, converting it to required + # types. Ordinary generators pass all + # sources together to the recursive + # generators.construct-types call. + + : source-types * # Types that this generator can handle. If + # empty, the generator can consume anything. + + : target-types-and-names + # Types the generator will create and, + # optionally, names for created targets. + # Each element should have the form + # type["(" name-pattern ")"], for example, + # obj(%_x). Generated target name will be + # found by replacing % with the name of + # source, provided an explicit name was not + # specified. + + : requirements * + ) + { + self.id = $(id) ; + self.rule-name = $(id) ; + self.composing = $(composing) ; + self.source-types = $(source-types) ; + self.target-types-and-names = $(target-types-and-names) ; + self.requirements = $(requirements) ; + + for local e in $(target-types-and-names) + { + # Create three parallel lists: one with the list of target types, + # and two other with prefixes and postfixes to be added to target + # name. We use parallel lists for prefix and postfix (as opposed to + # mapping), because given target type might occur several times, for + # example "H H(%_symbols)". + local m = [ MATCH "([^\\(]*)(\\((.*)%(.*)\\))?" : $(e) ] ; + self.target-types += $(m[1]) ; + self.name-prefix += $(m[3]:E="") ; + self.name-postfix += $(m[4]:E="") ; + } + + for local r in [ requirements ] + { + if $(r:G=) + { + self.property-requirements += $(r) ; + } + else + { + self.feature-requirements += $(r) ; + } + } + + # Note that 'transform' here, is the same as 'for_each'. + sequence.transform type.validate : $(self.source-types) ; + sequence.transform type.validate : $(self.target-types) ; + + local relevant-for-generator = + [ sequence.transform utility.ungrist : $(requirements:G) ] ; + self.relevant-features = [ property-set.create <relevant>$(relevant-for-generator) ] ; + } + + ################# End of constructor ################# + + rule id ( ) + { + return $(self.id) ; + } + + # Returns the list of target type the generator accepts. + # + rule source-types ( ) + { + return $(self.source-types) ; + } + + # Returns the list of target types that this generator produces. It is + # assumed to be always the same -- i.e. it can not change depending on some + # provided list of sources. + # + rule target-types ( ) + { + return $(self.target-types) ; + } + + # Returns the required properties for this generator. Properties in returned + # set must be present in build properties if this generator is to be used. + # If result has grist-only element, that build properties must include some + # value of that feature. + # + # XXX: remove this method? + # + rule requirements ( ) + { + return $(self.requirements) ; + } + + rule set-rule-name ( rule-name ) + { + self.rule-name = $(rule-name) ; + } + + rule rule-name ( ) + { + return $(self.rule-name) ; + } + + # Returns a true value if the generator can be run with the specified + # properties. + # + rule match-rank ( property-set-to-match ) + { + # See if generator requirements are satisfied by 'properties'. Treat a + # feature name in requirements (i.e. grist-only element), as matching + # any value of the feature. + + if [ $(property-set-to-match).contains-raw $(self.property-requirements) ] && + [ $(property-set-to-match).contains-features $(self.feature-requirements) ] + { + return true ; + } + else + { + return ; + } + } + + # Returns another generator which differs from $(self) in + # - id + # - value to <toolset> feature in properties + # + rule clone ( new-id : new-toolset-properties + ) + { + local g = [ new $(__class__) $(new-id) $(self.composing) : + $(self.source-types) : $(self.target-types-and-names) : + # Note: this does not remove any subfeatures of <toolset> which + # might cause problems. + [ property.change $(self.requirements) : <toolset> ] + $(new-toolset-properties) ] ; + return $(g) ; + } + + # Creates another generator that is the same as $(self), except that if + # 'base' is in target types of $(self), 'type' will in target types of the + # new generator. + # + rule clone-and-change-target-type ( base : type ) + { + local target-types ; + for local t in $(self.target-types-and-names) + { + local m = [ MATCH "([^\\(]*)(\\(.*\\))?" : $(t) ] ; + if $(m) = $(base) + { + target-types += $(type)$(m[2]:E="") ; + } + else + { + target-types += $(t) ; + } + } + + local g = [ new $(__class__) $(self.id) $(self.composing) : + $(self.source-types) : $(target-types) : $(self.requirements) ] ; + if $(self.rule-name) + { + $(g).set-rule-name $(self.rule-name) ; + } + return $(g) ; + } + + # Tries to invoke this generator on the given sources. Returns a list of + # generated targets (instances of 'virtual-target') and optionally a set of + # properties to be added to the usage-requirements for all the generated + # targets. Returning nothing from run indicates that the generator was + # unable to create the target. + # + rule run + ( + project # Project for which the targets are generated. + name ? # Used when determining the 'name' attribute for all + # generated targets. See the 'generated-targets' method. + : property-set # Desired properties for generated targets. + : sources + # Source targets. + ) + { + generators.dout [ indent ] " ** generator" $(self.id) ; + generators.dout [ indent ] " composing:" $(self.composing) ; + + if ! $(self.composing) && $(sources[2]) && $(self.source-types[2]) + { + import errors : error : errors.error ; + errors.error "Unsupported source/source-type combination" ; + } + + # We do not run composing generators if no name is specified. The reason + # is that composing generator combines several targets, which can have + # different names, and it cannot decide which name to give for produced + # target. Therefore, the name must be passed. + # + # This in effect, means that composing generators are runnable only at + # the top-level of a transformation graph, or if their name is passed + # explicitly. Thus, we dissallow composing generators in the middle. For + # example, the transformation CPP -> OBJ -> STATIC_LIB -> RSP -> EXE + # will not be allowed as the OBJ -> STATIC_LIB generator is composing. + if ! $(self.composing) || $(name) + { + run-really $(project) $(name) : $(property-set) : $(sources) ; + } + } + + rule run-really ( project name ? : property-set : sources + ) + { + # Targets that this generator will consume directly. + local consumed = ; + # Targets that can not be consumed and will be returned as-is. + local bypassed = ; + + if $(self.composing) + { + consumed = [ convert-multiple-sources-to-consumable-types $(project) + : $(property-set) : $(sources) ] ; + } + else + { + consumed = [ convert-to-consumable-types $(project) $(name) + : $(property-set) : $(sources) ] ; + } + + local result ; + if $(consumed[2]) + { + result = [ construct-result $(consumed[2-]) : $(project) $(name) : + [ $(property-set).add $(consumed[1]) ] ] ; + } + + if $(result) + { + generators.dout [ indent ] " SUCCESS: " $(result) ; + } + else + { + generators.dout [ indent ] " FAILURE" ; + } + generators.dout ; + if $(result) + { + # Make sure that we propagate usage-requirements up the stack. + return [ $(result[1]).add $(consumed[1]) ] $(result[2-]) ; + } + } + + # Constructs the dependency graph to be returned by this generator. + # + rule construct-result + ( + consumed + # Already prepared list of consumable targets. + # Composing generators may receive multiple sources + # all of which will have types matching those in + # $(self.source-types). Non-composing generators with + # multiple $(self.source-types) will receive exactly + # len $(self.source-types) sources with types matching + # those in $(self.source-types). And non-composing + # generators with only a single source type may + # receive multiple sources with all of them of the + # type listed in $(self.source-types). + : project name ? + : property-set # Properties to be used for all actions created here. + ) + { + local result ; + + local relevant = [ toolset.relevant $(self.rule-name) ] ; + relevant = [ $(relevant).add $(self.relevant-features) ] ; + property-set = [ $(property-set).add $(relevant) ] ; + + # If this is a 1->1 transformation, apply it to all consumed targets in + # order. + if ! $(self.source-types[2]) && ! $(self.composing) + { + for local r in $(consumed) + { + result += [ generated-targets $(r) : $(property-set) : + $(project) $(name) ] ; + } + } + else if $(consumed) + { + result += [ generated-targets $(consumed) : $(property-set) : + $(project) $(name) ] ; + } + if $(result) + { + if [ class.is-a $(result[1]) : property-set ] + { + return [ $(result[1]).add $(relevant) ] $(result[2-]) ; + } + else { + return $(relevant) $(result) ; + } + } + } + + # Determine target name from fullname (maybe including path components) + # Place optional prefix and postfix around basename + # + rule determine-target-name ( fullname : prefix ? : postfix ? ) + { + # See if we need to add directory to the target name. + local dir = $(fullname:D) ; + local name = $(fullname:B) ; + + name = $(prefix:E=)$(name) ; + name = $(name)$(postfix:E=) ; + + if $(dir) + # Never append '..' to target path. + && ! [ MATCH .*(\\.\\.).* : $(dir) ] + && ! [ path.is-rooted $(dir) ] + { + # Relative path is always relative to the source directory. Retain + # it, so that users can have files with the same name in two + # different subdirectories. + name = $(dir)/$(name) ; + } + return $(name) ; + } + + # Determine the name of the produced target from the names of the sources. + # + rule determine-output-name ( sources + ) + { + # The simple case if when a name of source has single dot. Then, we take + # the part before dot. Several dots can be caused by: + # - using source file like a.host.cpp, or + # - a type whose suffix has a dot. Say, we can type 'host_cpp' with + # extension 'host.cpp'. + # In the first case, we want to take the part up to the last dot. In the + # second case -- not sure, but for now take the part up to the last dot + # too. + name = [ utility.basename [ $(sources[1]).name ] ] ; + for local s in $(sources[2-]) + { + if [ utility.basename [ $(s).name ] ] != $(name) + { + import errors : error : errors.error ; + errors.error "$(self.id): source targets have different names: cannot determine target name" ; + } + } + return [ determine-target-name [ $(sources[1]).name ] ] ; + } + + # Constructs targets that are created after consuming 'sources'. The result + # will be the list of virtual-target, which has the same length as the + # 'target-types' attribute and with corresponding types. + # + # When 'name' is empty, all source targets must have the same 'name' + # attribute value, which will be used instead of the 'name' argument. + # + # The 'name' attribute value for each generated target will be equal to the + # 'name' parameter if there is no name pattern for this type. Otherwise, the + # '%' symbol in the name pattern will be replaced with the 'name' parameter + # to obtain the 'name' attribute. + # + # For example, if targets types are T1 and T2 (with name pattern "%_x"), + # suffixes for T1 and T2 are .t1 and .t2, and source is foo.z, then created + # files would be "foo.t1" and "foo_x.t2". The 'name' attribute actually + # determines the basename of a file. + # + # Note that this pattern mechanism has nothing to do with implicit patterns + # in make. It is a way to produce a target whose name is different than the + # name of its source. + # + rule generated-targets ( sources + : property-set : project name ? ) + { + if ! $(name) + { + name = [ determine-output-name $(sources) ] ; + } + + # Assign an action for each target. + local action = [ action-class ] ; + local a = [ class.new $(action) $(sources) : $(self.rule-name) : + $(property-set) ] ; + + # Create generated target for each target type. + local targets ; + local pre = $(self.name-prefix) ; + local post = $(self.name-postfix) ; + for local t in $(self.target-types) + { + local generated-name = $(pre[1])$(name:BS)$(post[1]) ; + generated-name = $(generated-name:R=$(name:D)) ; + pre = $(pre[2-]) ; + post = $(post[2-]) ; + + targets += [ class.new file-target $(generated-name) : $(t) : + $(project) : $(a) ] ; + } + + return [ sequence.transform virtual-target.register : $(targets) ] ; + } + + # Attempts to convert 'sources' to targets of types that this generator can + # handle. The intention is to produce the set of targets that can be used + # when the generator is run. + # + rule convert-to-consumable-types + ( + project name ? + : property-set + : sources + + : only-one ? # Convert 'source' to only one of the source types. If + # there is more that one possibility, report an error. + ) + { + local _consumed ; + local missing-types ; + local usage-requirements ; + + if $(sources[2]) + { + # Do not know how to handle several sources yet. Just try to pass + # the request to other generator. + missing-types = $(self.source-types) ; + } + else + { + local temp = [ consume-directly $(sources) ] ; + if $(temp[1]) + { + usage-requirements = [ property-set.empty ] ; + _consumed = $(temp[1]) ; + } + missing-types = $(temp[2-]) ; + } + + # No need to search for transformation if some source type has consumed + # source and no more source types are needed. + if $(only-one) && $(_consumed) + { + missing-types = ; + } + + # TODO: we should check that only one source type is created if + # 'only-one' is true. + + if $(missing-types) + { + local transformed = [ generators.construct-types $(project) $(name) + : $(missing-types) : $(property-set) : $(sources) ] ; + + # Add targets of right type to 'consumed'. Add others to 'bypassed'. + # The 'generators.construct' rule has done its best to convert + # everything to the required type. There is no need to rerun it on + # targets of different types. + + usage-requirements = $(transformed[1]) ; + for local t in $(transformed[2-]) + { + if [ $(t).type ] in $(missing-types) + { + _consumed += $(t) ; + } + } + } + + return $(usage-requirements) [ sequence.unique $(_consumed) ] ; + } + + # Converts several files to consumable types. Called for composing + # generators only. + # + rule convert-multiple-sources-to-consumable-types ( project : property-set : + sources * ) + { + local result ; + # We process each source one-by-one, trying to convert it to a usable + # type. + if ! $(self.source-types) + { + # Anything is acceptable + return [ property-set.empty ] $(sources) ; + } + else + { + local usage-requirements = [ property-set.empty ] ; + local acceptible-types = [ sequence.unique + [ sequence.transform type.all-derived : $(self.source-types) ] ] ; + for local source in $(sources) + { + if ! [ $(source).type ] in $(acceptible-types) + { + local transformed = [ generators.construct-types $(project) + : $(self.source-types) : $(property-set) : $(source) ] ; + for local t in $(transformed[2-]) + { + if [ $(t).type ] in $(self.source-types) + { + result += $(t) ; + } + } + if ! $(transformed) + { + generators.dout [ indent ] " failed to convert " $(source) ; + } + else + { + usage-requirements = [ $(usage-requirements).add $(transformed[1]) ] ; + } + } + else + { + result += $(source) ; + } + } + return $(usage-requirements) [ sequence.unique $(result) : stable ] ; + } + } + + rule consume-directly ( source ) + { + local real-source-type = [ $(source).type ] ; + + # If there are no source types, we can consume anything. + local source-types = $(self.source-types) ; + source-types ?= $(real-source-type) ; + + local result = "" ; + local missing-types ; + + for local st in $(source-types) + { + # The 'source' if of the right type already. + if $(real-source-type) = $(st) || [ type.is-derived + $(real-source-type) $(st) ] + { + result = $(source) ; + } + else + { + missing-types += $(st) ; + } + } + return $(result) $(missing-types) ; + } + + # Returns the class to be used to actions. Default implementation returns + # "action". + # + rule action-class ( ) + { + return "action" ; + } +} + + +# Registers a new generator instance 'g'. +# +rule register ( g ) +{ + .all-generators += $(g) ; + + # A generator can produce several targets of the same type. We want unique + # occurrence of that generator in .generators.$(t) in that case, otherwise, + # it will be tried twice and we will get a false ambiguity. + for local t in [ sequence.unique [ $(g).target-types ] ] + { + .generators.$(t) += $(g) ; + } + + # Update the set of generators for toolset. + + # TODO: should we check that generator with this id is not already + # registered. For example, the fop.jam module intentionally declared two + # generators with the same id, so such check will break it. + local id = [ $(g).id ] ; + + # Some generators have multiple periods in their name, so a simple $(id:S=) + # will not generate the right toolset name. E.g. if id = gcc.compile.c++, + # then .generators-for-toolset.$(id:S=) will append to + # .generators-for-toolset.gcc.compile, which is a separate value from + # .generators-for-toolset.gcc. Correcting this makes generator inheritance + # work properly. See also inherit-generators in the toolset module. + local base = $(id) ; + while $(base:S) + { + base = $(base:B) ; + } + .generators-for-toolset.$(base) += $(g) ; + + + # After adding a new generator that can construct new target types, we need + # to clear the related cached viable source target type information for + # constructing a specific target type or using a specific generator. Cached + # viable source target type lists affected by this are those containing any + # of the target types constructed by the new generator or any of their base + # target types. + # + # A more advanced alternative to clearing that cached viable source target + # type information would be to expand it with additional source types or + # even better - mark it as needing to be expanded on next use. + # + # Also see the http://thread.gmane.org/gmane.comp.lib.boost.build/19077 + # mailing list thread for an even more advanced idea of how we could convert + # Boost Build's Jamfile processing, target selection and generator selection + # into separate steps which would prevent these caches from ever being + # invalidated. + # + # For now we just clear all the cached viable source target type information + # that does not simply state 'all types' and may implement a more detailed + # algorithm later on if it becomes needed. + + invalidate-extendable-viable-source-target-type-cache ; +} + + +# Creates a new non-composing 'generator' class instance and registers it. +# Returns the created instance. Rationale: the instance is returned so that it +# is possible to first register a generator and then call its 'run' method, +# bypassing the whole generator selection process. +# +rule register-standard ( id : source-types * : target-types + : requirements * ) +{ + local g = [ new generator $(id) : $(source-types) : $(target-types) : + $(requirements) ] ; + register $(g) ; + return $(g) ; +} + + +# Creates a new composing 'generator' class instance and registers it. +# +rule register-composing ( id : source-types * : target-types + : requirements * + ) +{ + local g = [ new generator $(id) true : $(source-types) : $(target-types) : + $(requirements) ] ; + register $(g) ; + return $(g) ; +} + + +# Returns all generators belonging to the given 'toolset', i.e. whose ids are +# '$(toolset).<something>'. +# +rule generators-for-toolset ( toolset ) +{ + return $(.generators-for-toolset.$(toolset)) ; +} + + +# Make generator 'overrider-id' be preferred to 'overridee-id'. If, when +# searching for generators that could produce a target of a certain type, both +# those generators are among viable generators, the overridden generator is +# immediately discarded. +# +# The overridden generators are discarded immediately after computing the list +# of viable generators but before running any of them. +# +rule override ( overrider-id : overridee-id ) +{ + .override.$(overrider-id) += $(overridee-id) ; +} + + +# Returns a list of source type which can possibly be converted to 'target-type' +# by some chain of generator invocation. +# +# More formally, takes all generators for 'target-type' and returns a union of +# source types for those generators and result of calling itself recursively on +# source types. +# +# Returns '*' in case any type should be considered a viable source type for the +# given type. +# +local rule viable-source-types-real ( target-type ) +{ + local result ; + + # 't0' is the initial list of target types we need to process to get a list + # of their viable source target types. New target types will not be added to + # this list. + local t0 = [ type.all-bases $(target-type) ] ; + + # 't' is the list of target types which have not yet been processed to get a + # list of their viable source target types. This list will get expanded as + # we locate more target types to process. + local t = $(t0) ; + + while $(t) + { + # Find all generators for the current type. Unlike + # 'find-viable-generators' we do not care about the property-set. + local generators = $(.generators.$(t[1])) ; + t = $(t[2-]) ; + + while $(generators) + { + local g = $(generators[1]) ; + generators = $(generators[2-]) ; + + if ! [ $(g).source-types ] + { + # Empty source types -- everything can be accepted. + result = * ; + # This will terminate this loop. + generators = ; + # This will terminate the outer loop. + t = ; + } + + for local source-type in [ $(g).source-types ] + { + if ! $(source-type) in $(result) + { + # If a generator accepts a 'source-type' it will also + # happily accept any type derived from it. + for local n in [ type.all-derived $(source-type) ] + { + if ! $(n) in $(result) + { + # Here there is no point in adding target types to + # the list of types to process in case they are or + # have already been on that list. We optimize this + # check by realizing that we only need to avoid the + # original target type's base types. Other target + # types that are or have been on the list of target + # types to process have been added to the 'result' + # list as well and have thus already been eliminated + # by the previous if. + if ! $(n) in $(t0) + { + t += $(n) ; + } + result += $(n) ; + } + } + } + } + } + } + + return $(result) ; +} + + +# Helper rule, caches the result of 'viable-source-types-real'. +# +rule viable-source-types ( target-type ) +{ + local key = .vst.$(target-type) ; + if ! $($(key)) + { + .vst-cached-types += $(target-type) ; + local v = [ viable-source-types-real $(target-type) ] ; + if ! $(v) + { + v = none ; + } + $(key) = $(v) ; + } + + if $($(key)) != none + { + return $($(key)) ; + } +} + + +# Returns the list of source types, which, when passed to 'run' method of +# 'generator', has some change of being eventually used (probably after +# conversion by other generators). +# +# Returns '*' in case any type should be considered a viable source type for the +# given generator. +# +rule viable-source-types-for-generator-real ( generator ) +{ + local source-types = [ $(generator).source-types ] ; + if ! $(source-types) + { + # If generator does not specify any source types, it might be a special + # generator like builtin.lib-generator which just relays to other + # generators. Return '*' to indicate that any source type is possibly + # OK, since we do not know for sure. + return * ; + } + else + { + local result ; + while $(source-types) + { + local s = $(source-types[1]) ; + source-types = $(source-types[2-]) ; + local viable-sources = [ generators.viable-source-types $(s) ] ; + if $(viable-sources) = * + { + result = * ; + source-types = ; # Terminate the loop. + } + else + { + result += [ type.all-derived $(s) ] $(viable-sources) ; + } + } + return [ sequence.unique $(result) ] ; + } +} + + +# Helper rule, caches the result of 'viable-source-types-for-generator'. +# +local rule viable-source-types-for-generator ( generator ) +{ + local key = .vstg.$(generator) ; + if ! $($(key)) + { + .vstg-cached-generators += $(generator) ; + local v = [ viable-source-types-for-generator-real $(generator) ] ; + if ! $(v) + { + v = none ; + } + $(key) = $(v) ; + } + + if $($(key)) != none + { + return $($(key)) ; + } +} + + +# Returns usage requirements + list of created targets. +# +local rule try-one-generator-really ( project name ? : generator : target-type + : property-set : sources * ) +{ + local targets = + [ $(generator).run $(project) $(name) : $(property-set) : $(sources) ] ; + + local usage-requirements ; + local success ; + + generators.dout [ indent ] returned $(targets) ; + + if $(targets) + { + success = true ; + + if [ class.is-a $(targets[1]) : property-set ] + { + usage-requirements = $(targets[1]) ; + targets = $(targets[2-]) ; + } + else + { + usage-requirements = [ property-set.empty ] ; + } + } + + generators.dout [ indent ] " generator" [ $(generator).id ] " spawned " ; + generators.dout [ indent ] " " $(targets) ; + if $(usage-requirements) + { + generators.dout [ indent ] " with usage requirements:" $(usage-requirements) ; + } + + if $(success) + { + return $(usage-requirements) $(targets) ; + } +} + + +# Checks if generator invocation can be pruned, because it is guaranteed to +# fail. If so, quickly returns an empty list. Otherwise, calls +# try-one-generator-really. +# +local rule try-one-generator ( project name ? : generator : target-type + : property-set : sources * ) +{ + local source-types ; + for local s in $(sources) + { + source-types += [ $(s).type ] ; + } + local viable-source-types = [ viable-source-types-for-generator $(generator) + ] ; + + if $(source-types) && $(viable-source-types) != * && + ! [ set.intersection $(source-types) : $(viable-source-types) ] + { + local id = [ $(generator).id ] ; + generators.dout [ indent ] " ** generator '$(id)' pruned" ; + #generators.dout [ indent ] "source-types" '$(source-types)' ; + #generators.dout [ indent ] "viable-source-types" '$(viable-source-types)' ; + } + else + { + return [ try-one-generator-really $(project) $(name) : $(generator) : + $(target-type) : $(property-set) : $(sources) ] ; + } +} + + +rule construct-types ( project name ? : target-types + : property-set + : sources + ) +{ + local result ; + local usage-requirements = [ property-set.empty ] ; + for local t in $(target-types) + { + local r = [ construct $(project) $(name) : $(t) : $(property-set) : + $(sources) ] ; + if $(r) + { + usage-requirements = [ $(usage-requirements).add $(r[1]) ] ; + result += $(r[2-]) ; + } + } + # TODO: have to introduce parameter controlling if several types can be + # matched and add appropriate checks. + + # TODO: need to review the documentation for 'construct' to see if it should + # return $(source) even if nothing can be done with it. Currents docs seem + # to imply that, contrary to the behaviour. + if $(result) + { + return $(usage-requirements) $(result) ; + } + else + { + return $(usage-requirements) $(sources) ; + } +} + + +# Ensures all 'targets' have their type. If this is not so, exists with error. +# +local rule ensure-type ( targets * ) +{ + for local t in $(targets) + { + if ! [ $(t).type ] + { + import errors ; + errors.error "target" [ $(t).str ] "has no type" ; + } + } +} + + +# Returns generators which can be used to construct target of specified type +# with specified properties. Uses the following algorithm: +# - iterates over requested target-type and all its bases (in the order returned +# by type.all-bases). +# - for each type find all generators that generate that type and whose +# requirements are satisfied by properties. +# - if the set of generators is not empty, returns that set. +# +# Note: this algorithm explicitly ignores generators for base classes if there +# is at least one generator for the requested target-type. +# +local rule find-viable-generators-aux ( target-type : property-set ) +{ + # Select generators that can create the required target type. + local viable-generators = ; + + import type ; + local t = $(target-type) ; + + if $(.debug) + { + generators.dout [ indent ] find-viable-generators target-type= $(target-type) + property-set= [ $(property-set).as-path ] ; + generators.dout [ indent ] "trying type" $(target-type) ; + } + + local generators = $(.generators.$(target-type)) ; + if $(generators) + { + if $(.debug) + { + generators.dout [ indent ] "there are generators for this type" ; + } + } + else + { + local t = [ type.base $(target-type) ] ; + + # Get the list of generators for the requested type. If no generator is + # registered, try base type, and so on. + while $(t) + { + if $(.debug) + { + generators.dout [ indent ] "trying type" $(t) ; + } + if $(.generators.$(t)) + { + generators.dout [ indent ] "there are generators for this type" ; + generators = $(.generators.$(t)) ; + + # We are here because there were no generators found for + # target-type but there are some generators for its base type. + # We will try to use them, but they will produce targets of + # base type, not of 'target-type'. So, we clone the generators + # and modify the list of target types. + local generators2 ; + for local g in $(generators) + { + # generators.register adds a generator to the list of + # generators for toolsets, which is a bit strange, but + # should work. That list is only used when inheriting a + # toolset, which should have been done before running + # generators. + generators2 += [ $(g).clone-and-change-target-type $(t) : + $(target-type) ] ; + generators.register $(generators2[-1]) ; + } + generators = $(generators2) ; + t = ; + } + else + { + t = [ type.base $(t) ] ; + } + } + } + + for local g in $(generators) + { + if $(.debug) + { + generators.dout [ indent ] "trying generator" [ $(g).id ] "(" [ $(g).source-types ] -> [ $(g).target-types ] ")" ; + } + + if [ $(g).match-rank $(property-set) ] + { + if $(.debug) + { + generators.dout [ indent ] " is viable" ; + } + viable-generators += $(g) ; + } + } + + return $(viable-generators) ; +} + + +rule find-viable-generators ( target-type : property-set ) +{ + local key = $(target-type).$(property-set) ; + local l = $(.fv.$(key)) ; + if ! $(l) + { + l = [ find-viable-generators-aux $(target-type) : $(property-set) ] ; + if ! $(l) + { + l = none ; + } + .fv.$(key) = $(l) ; + } + + if $(l) = none + { + l = ; + } + + local viable-generators ; + for local g in $(l) + { + # Avoid trying the same generator twice on different levels. + if ! $(g) in $(.active-generators) + { + viable-generators += $(g) ; + } + else + { + generators.dout [ indent ] " generator " [ $(g).id ] "is active, discaring" ; + } + } + + # Generators which override 'all'. + local all-overrides ; + # Generators which are overridden. + local overriden-ids ; + for local g in $(viable-generators) + { + local id = [ $(g).id ] ; + local this-overrides = $(.override.$(id)) ; + overriden-ids += $(this-overrides) ; + if all in $(this-overrides) + { + all-overrides += $(g) ; + } + } + if $(all-overrides) + { + viable-generators = $(all-overrides) ; + } + local result ; + for local g in $(viable-generators) + { + if ! [ $(g).id ] in $(overriden-ids) + { + result += $(g) ; + } + } + + return $(result) ; +} + + +.construct-stack = ; + + +# Attempts to construct a target by finding viable generators, running them and +# selecting the dependency graph. +# +local rule construct-really ( project name ? : target-type : property-set : + sources * ) +{ + viable-generators = [ find-viable-generators $(target-type) : + $(property-set) ] ; + + generators.dout [ indent ] "*** " [ sequence.length $(viable-generators) ] + " viable generators" ; + + local result ; + local generators-that-succeeded ; + for local g in $(viable-generators) + { + # This variable will be restored on exit from this scope. + local .active-generators = $(g) $(.active-generators) ; + + local r = [ try-one-generator $(project) $(name) : $(g) : $(target-type) + : $(property-set) : $(sources) ] ; + + if $(r) + { + generators-that-succeeded += $(g) ; + if $(result) + { + ECHO "Error: ambiguity found when searching for best transformation" ; + ECHO "Trying to produce type '$(target-type)' from: " ; + for local s in $(sources) + { + ECHO " - " [ $(s).str ] ; + } + ECHO "Generators that succeeded:" ; + for local g in $(generators-that-succeeded) + { + ECHO " - " [ $(g).id ] ; + } + ECHO "First generator produced: " ; + for local t in $(result[2-]) + { + ECHO " - " [ $(t).str ] ; + } + ECHO "Second generator produced: " ; + for local t in $(r[2-]) + { + ECHO " - " [ $(t).str ] ; + } + EXIT ; + } + else + { + result = $(r) ; + } + } + } + + return $(result) ; +} + + +# Attempts to create a target of 'target-type' with 'properties' from 'sources'. +# The 'sources' are treated as a collection of *possible* ingridients, i.e. +# there is no obligation to consume them all. +# +# Returns a list of targets. When this invocation is first instance of +# 'construct' in stack, returns only targets of requested 'target-type', +# otherwise, returns also unused sources and additionally generated targets. +# +# If 'top-level' is set, does not suppress generators that are already +# used in the stack. This may be useful in cases where a generator +# has to build a metatargets -- for example a target corresponding to +# built tool. +# +rule construct ( project name ? : target-type : property-set * : sources * : top-level ? ) +{ + local saved-active ; + if $(top-level) + { + saved-active = $(.active-generators) ; + .active-generators = ; + } + + # FIXME This is probably not intended be be run unconditionally, + # but changing it causes no_type to fail. + if "(.construct-stack)" + { + ensure-type $(sources) ; + } + + .construct-stack += 1 ; + + increase-indent ; + + if $(.debug) + { + generators.dout [ indent ] "*** construct" $(target-type) ; + + for local s in $(sources) + { + generators.dout [ indent ] " from" $(s) ; + } + generators.dout [ indent ] " properties:" [ $(property-set).raw ] ; + } + + local result = [ construct-really $(project) $(name) : $(target-type) : + $(property-set) : $(sources) ] ; + + decrease-indent ; + + .construct-stack = $(.construct-stack[2-]) ; + + if $(top-level) + { + .active-generators = $(saved-active) ; + } + + return $(result) ; +} + +# Given 'result', obtained from some generator or generators.construct, adds +# 'raw-properties' as usage requirements to it. If result already contains usage +# requirements -- that is the first element of result of an instance of the +# property-set class, the existing usage requirements and 'raw-properties' are +# combined. +# +rule add-usage-requirements ( result * : raw-properties * ) +{ + if $(result) + { + if [ class.is-a $(result[1]) : property-set ] + { + return [ $(result[1]).add-raw $(raw-properties) ] $(result[2-]) ; + } + else + { + return [ property-set.create $(raw-properties) ] $(result) ; + } + } +} + +rule dump ( ) +{ + for local g in $(.all-generators) + { + ECHO [ $(g).id ] ":" [ $(g).source-types ] -> [ $(g).target-types ] ; + } +} + diff --git a/src/boost/tools/build/src/build/generators.py b/src/boost/tools/build/src/build/generators.py new file mode 100644 index 000000000..23d1ea944 --- /dev/null +++ b/src/boost/tools/build/src/build/generators.py @@ -0,0 +1,1209 @@ +# Status: being ported by Vladimir Prus +# Base revision: 48649 +# TODO: replace the logging with dout + +# Copyright Vladimir Prus 2002. +# Copyright Rene Rivera 2006. +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Manages 'generators' --- objects which can do transformation between different +# target types and contain algorithm for finding transformation from sources +# to targets. +# +# The main entry point to this module is generators.construct rule. It is given +# a list of source targets, desired target type and a set of properties. +# It starts by selecting 'viable generators', which have any chances of producing +# the desired target type with the required properties. Generators are ranked and +# a set of most specific ones is selected. +# +# The most specific generators have their 'run' methods called, with the properties +# and list of sources. Each one selects target which can be directly consumed, and +# tries to convert the remaining ones to the types it can consume. This is done +# by recursively calling 'construct' with all consumable types. +# +# If the generator has collected all the targets it needs, it creates targets +# corresponding to result, and returns it. When all generators have been run, +# results of one of them are selected and returned as result. +# +# It's quite possible that 'construct' returns more targets that it was asked for. +# For example, it was asked to target type EXE, but the only found generators produces +# both EXE and TDS (file with debug) information. The extra target will be returned. +# +# Likewise, when generator tries to convert sources to consumable types, it can get +# more targets that it was asked for. The question is what to do with extra targets. +# Boost.Build attempts to convert them to requested types, and attempts as early as +# possible. Specifically, this is done after invoking each generator. (Later I'll +# document the rationale for trying extra target conversion at that point). +# +# That early conversion is not always desirable. Suppose a generator got a source of +# type Y and must consume one target of type X_1 and one target of type X_2. +# When converting Y to X_1 extra target of type Y_2 is created. We should not try to +# convert it to type X_1, because if we do so, the generator will get two targets +# of type X_1, and will be at loss as to which one to use. Because of that, the +# 'construct' rule has a parameter, telling if multiple targets can be returned. If +# the parameter is false, conversion of extra targets is not performed. + + +import re +import cStringIO +import os.path + +from virtual_target import Subvariant +from . import virtual_target, type, property_set, property +from b2.exceptions import BaseBoostBuildException +from b2.util.logger import * +from b2.util.utility import * +from b2.util import set as set_, is_iterable_typed, is_iterable, bjam_signature +from b2.util.sequence import unique +import b2.util.sequence as sequence +from b2.manager import get_manager +import b2.build.type + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + """ + global __generators, __type_to_generators, __generators_for_toolset, __construct_stack + global __overrides, __active_generators + global __viable_generators_cache, __viable_source_types_cache + global __vstg_cached_generators, __vst_cached_types + + __generators = {} + __type_to_generators = {} + __generators_for_toolset = {} + __overrides = {} + + # TODO: can these be global? + __construct_stack = [] + __viable_generators_cache = {} + __viable_source_types_cache = {} + __active_generators = [] + + __vstg_cached_generators = [] + __vst_cached_types = [] + +reset () + +_re_separate_types_prefix_and_postfix = re.compile ('([^\\(]*)(\\((.*)%(.*)\\))?') +_re_match_type = re.compile('([^\\(]*)(\\(.*\\))?') + + +__debug = None +__indent = "" + +def debug(): + global __debug + if __debug is None: + __debug = "--debug-generators" in bjam.variable("ARGV") + return __debug + +def increase_indent(): + global __indent + __indent += " " + +def decrease_indent(): + global __indent + __indent = __indent[0:-4] + + +# Updated cached viable source target type information as needed after a new +# derived target type gets added. This is needed because if a target type is a +# viable source target type for some generator then all of the target type's +# derived target types are automatically viable as source target types for the +# same generator. Does nothing if a non-derived target type is passed to it. +# +def update_cached_information_with_a_new_type(type): + assert isinstance(type, basestring) + base_type = b2.build.type.base(type) + + if base_type: + for g in __vstg_cached_generators: + if base_type in __viable_source_types_cache.get(g, []): + __viable_source_types_cache[g].append(type) + + for t in __vst_cached_types: + if base_type in __viable_source_types_cache.get(t, []): + __viable_source_types_cache[t].append(type) + +# Clears cached viable source target type information except for target types +# and generators with all source types listed as viable. Should be called when +# something invalidates those cached values by possibly causing some new source +# types to become viable. +# +def invalidate_extendable_viable_source_target_type_cache(): + + global __vstg_cached_generators + generators_with_cached_source_types = __vstg_cached_generators + __vstg_cached_generators = [] + + for g in generators_with_cached_source_types: + if g in __viable_source_types_cache: + if __viable_source_types_cache[g] == ["*"]: + __vstg_cached_generators.append(g) + else: + del __viable_source_types_cache[g] + + global __vst_cached_types + types_with_cached_sources_types = __vst_cached_types + __vst_cached_types = [] + for t in types_with_cached_sources_types: + if t in __viable_source_types_cache: + if __viable_source_types_cache[t] == ["*"]: + __vst_cached_types.append(t) + else: + del __viable_source_types_cache[t] + +def dout(message): + if debug(): + print __indent + message + + +class InvalidTargetSource(BaseBoostBuildException): + """ + Should be raised when a target contains a source that is invalid. + """ + + +class Generator: + """ Creates a generator. + manager: the build manager. + id: identifies the generator + + rule: the rule which sets up build actions. + + composing: whether generator processes each source target in + turn, converting it to required types. + Ordinary generators pass all sources together to + recusrive generators.construct_types call. + + source_types (optional): types that this generator can handle + + target_types_and_names: types the generator will create and, optionally, names for + created targets. Each element should have the form + type["(" name-pattern ")"] + for example, obj(%_x). Name of generated target will be found + by replacing % with the name of source, provided explicit name + was not specified. + + requirements (optional) + + NOTE: all subclasses must have a similar signature for clone to work! + """ + def __init__ (self, id, composing, source_types, target_types_and_names, requirements = []): + assert isinstance(id, basestring) + assert isinstance(composing, bool) + assert is_iterable_typed(source_types, basestring) + assert is_iterable_typed(target_types_and_names, basestring) + assert is_iterable_typed(requirements, basestring) + self.id_ = id + self.composing_ = composing + self.source_types_ = source_types + self.target_types_and_names_ = target_types_and_names + self.requirements_ = requirements + + self.target_types_ = [] + self.name_prefix_ = [] + self.name_postfix_ = [] + + for e in target_types_and_names: + # Create three parallel lists: one with the list of target types, + # and two other with prefixes and postfixes to be added to target + # name. We use parallel lists for prefix and postfix (as opposed + # to mapping), because given target type might occur several times, + # for example "H H(%_symbols)". + m = _re_separate_types_prefix_and_postfix.match (e) + + if not m: + raise BaseException ("Invalid type and name '%s' in declaration of type '%s'" % (e, id)) + + target_type = m.group (1) + if not target_type: target_type = '' + prefix = m.group (3) + if not prefix: prefix = '' + postfix = m.group (4) + if not postfix: postfix = '' + + self.target_types_.append (target_type) + self.name_prefix_.append (prefix) + self.name_postfix_.append (postfix) + + for x in self.source_types_: + type.validate (x) + + for x in self.target_types_: + type.validate (x) + + def clone (self, new_id, new_toolset_properties): + """ Returns another generator which differers from $(self) in + - id + - value to <toolset> feature in properties + """ + assert isinstance(new_id, basestring) + assert is_iterable_typed(new_toolset_properties, basestring) + return self.__class__ (new_id, + self.composing_, + self.source_types_, + self.target_types_and_names_, + # Note: this does not remove any subfeatures of <toolset> + # which might cause problems + property.change (self.requirements_, '<toolset>') + new_toolset_properties) + + def clone_and_change_target_type(self, base, type): + """Creates another generator that is the same as $(self), except that + if 'base' is in target types of $(self), 'type' will in target types + of the new generator.""" + assert isinstance(base, basestring) + assert isinstance(type, basestring) + target_types = [] + for t in self.target_types_and_names_: + m = _re_match_type.match(t) + assert m + + if m.group(1) == base: + if m.group(2): + target_types.append(type + m.group(2)) + else: + target_types.append(type) + else: + target_types.append(t) + + return self.__class__(self.id_, self.composing_, + self.source_types_, + target_types, + self.requirements_) + + + def id(self): + return self.id_ + + def source_types (self): + """ Returns the list of target type the generator accepts. + """ + return self.source_types_ + + def target_types (self): + """ Returns the list of target types that this generator produces. + It is assumed to be always the same -- i.e. it cannot change depending + list of sources. + """ + return self.target_types_ + + def requirements (self): + """ Returns the required properties for this generator. Properties + in returned set must be present in build properties if this + generator is to be used. If result has grist-only element, + that build properties must include some value of that feature. + """ + return self.requirements_ + + def match_rank (self, ps): + """ Returns true if the generator can be run with the specified + properties. + """ + # See if generator's requirements are satisfied by + # 'properties'. Treat a feature name in requirements + # (i.e. grist-only element), as matching any value of the + # feature. + assert isinstance(ps, property_set.PropertySet) + all_requirements = self.requirements () + + property_requirements = [] + feature_requirements = [] + # This uses strings because genenator requirements allow + # the '<feature>' syntax without value and regular validation + # is not happy about that. + for r in all_requirements: + if get_value (r): + property_requirements.append (r) + + else: + feature_requirements.append (r) + + return all(ps.get(get_grist(s)) == [get_value(s)] for s in property_requirements) \ + and all(ps.get(get_grist(s)) for s in feature_requirements) + + def run (self, project, name, prop_set, sources): + """ Tries to invoke this generator on the given sources. Returns a + list of generated targets (instances of 'virtual-target'). + + project: Project for which the targets are generated. + + name: Determines the name of 'name' attribute for + all generated targets. See 'generated_targets' method. + + prop_set: Desired properties for generated targets. + + sources: Source targets. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + # intermediary targets don't have names, so None is possible + assert isinstance(name, basestring) or name is None + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + if project.manager ().logger ().on (): + project.manager ().logger ().log (__name__, " generator '%s'" % self.id_) + project.manager ().logger ().log (__name__, " composing: '%s'" % self.composing_) + + if not sources: + s = 'An empty source list was passed in to the "{}" generator'.format(self.id_) + if name: + s += ' for target "{}"'.format(name) + raise InvalidTargetSource(s) + + if not self.composing_ and len (sources) > 1 and len (self.source_types_) > 1: + raise BaseException ("Unsupported source/source_type combination") + + # We don't run composing generators if no name is specified. The reason + # is that composing generator combines several targets, which can have + # different names, and it cannot decide which name to give for produced + # target. Therefore, the name must be passed. + # + # This in effect, means that composing generators are runnable only + # at top-level of transofrmation graph, or if name is passed explicitly. + # Thus, we dissallow composing generators in the middle. For example, the + # transofrmation CPP -> OBJ -> STATIC_LIB -> RSP -> EXE won't be allowed + # (the OBJ -> STATIC_LIB generator is composing) + if not self.composing_ or name: + return self.run_really (project, name, prop_set, sources) + else: + return [] + + def run_really (self, project, name, prop_set, sources): + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + # intermediary targets don't have names, so None is possible + assert isinstance(name, basestring) or name is None + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + # consumed: Targets that this generator will consume directly. + + if self.composing_: + consumed = self.convert_multiple_sources_to_consumable_types (project, prop_set, sources) + else: + consumed = self.convert_to_consumable_types (project, name, prop_set, sources) + + result = [] + if consumed: + result = self.construct_result (consumed, project, name, prop_set) + + if result: + if project.manager ().logger ().on (): + project.manager ().logger ().log (__name__, " SUCCESS: ", result) + + else: + project.manager ().logger ().log (__name__, " FAILURE") + + return result + + def construct_result (self, consumed, project, name, prop_set): + """ Constructs the dependency graph that will be returned by this + generator. + consumed: Already prepared list of consumable targets + If generator requires several source files will contain + exactly len $(self.source_types_) targets with matching types + Otherwise, might contain several targets with the type of + self.source_types_ [0] + project: + name: + prop_set: Properties to be used for all actions create here + """ + if __debug__: + from .targets import ProjectTarget + assert is_iterable_typed(consumed, virtual_target.VirtualTarget) + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + assert isinstance(prop_set, property_set.PropertySet) + result = [] + # If this is 1->1 transformation, apply it to all consumed targets in order. + if len (self.source_types_) < 2 and not self.composing_: + + for r in consumed: + result.extend(self.generated_targets([r], prop_set, project, name)) + elif consumed: + result.extend(self.generated_targets(consumed, prop_set, project, name)) + + return result + + def determine_target_name(self, fullname): + assert isinstance(fullname, basestring) + # Determine target name from fullname (maybe including path components) + # Place optional prefix and postfix around basename + + dir = os.path.dirname(fullname) + name = os.path.basename(fullname) + idx = name.find(".") + if idx != -1: + name = name[:idx] + + if dir and not ".." in dir and not os.path.isabs(dir): + # Relative path is always relative to the source + # directory. Retain it, so that users can have files + # with the same in two different subdirectories. + name = dir + "/" + name + + return name + + def determine_output_name(self, sources): + """Determine the name of the produced target from the + names of the sources.""" + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + + # The simple case if when a name + # of source has single dot. Then, we take the part before + # dot. Several dots can be caused by: + # - Using source file like a.host.cpp + # - A type which suffix has a dot. Say, we can + # type 'host_cpp' with extension 'host.cpp'. + # In the first case, we want to take the part till the last + # dot. In the second case -- no sure, but for now take + # the part till the last dot too. + name = os.path.splitext(sources[0].name())[0] + + for s in sources[1:]: + n2 = os.path.splitext(s.name()) + if n2 != name: + get_manager().errors()( + "%s: source targets have different names: cannot determine target name" + % (self.id_)) + + # Names of sources might include directory. We should strip it. + return self.determine_target_name(sources[0].name()) + + + def generated_targets (self, sources, prop_set, project, name): + """ Constructs targets that are created after consuming 'sources'. + The result will be the list of virtual-target, which the same length + as 'target_types' attribute and with corresponding types. + + When 'name' is empty, all source targets must have the same value of + the 'name' attribute, which will be used instead of the 'name' argument. + + The value of 'name' attribute for each generated target will be equal to + the 'name' parameter if there's no name pattern for this type. Otherwise, + the '%' symbol in the name pattern will be replaced with the 'name' parameter + to obtain the 'name' attribute. + + For example, if targets types are T1 and T2(with name pattern "%_x"), suffixes + for T1 and T2 are .t1 and t2, and source if foo.z, then created files would + be "foo.t1" and "foo_x.t2". The 'name' attribute actually determined the + basename of a file. + + Note that this pattern mechanism has nothing to do with implicit patterns + in make. It's a way to produce target which name is different for name of + source. + """ + if __debug__: + from .targets import ProjectTarget + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + assert isinstance(prop_set, property_set.PropertySet) + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + if not name: + name = self.determine_output_name(sources) + + # Assign an action for each target + action = self.action_class() + a = action(project.manager(), sources, self.id_, prop_set) + + # Create generated target for each target type. + targets = [] + pre = self.name_prefix_ + post = self.name_postfix_ + for t in self.target_types_: + basename = os.path.basename(name) + generated_name = pre[0] + basename + post[0] + generated_name = os.path.join(os.path.dirname(name), generated_name) + pre = pre[1:] + post = post[1:] + + targets.append(virtual_target.FileTarget(generated_name, t, project, a)) + + return [ project.manager().virtual_targets().register(t) for t in targets ] + + def convert_to_consumable_types (self, project, name, prop_set, sources, only_one=False): + """ Attempts to convert 'source' to the types that this generator can + handle. The intention is to produce the set of targets can should be + used when generator is run. + only_one: convert 'source' to only one of source types + if there's more that one possibility, report an + error. + + Returns a pair: + consumed: all targets that can be consumed. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(name, basestring) or name is None + assert isinstance(project, ProjectTarget) + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + assert isinstance(only_one, bool) + consumed = [] + missing_types = [] + + if len (sources) > 1: + # Don't know how to handle several sources yet. Just try + # to pass the request to other generator + missing_types = self.source_types_ + + else: + (c, m) = self.consume_directly (sources [0]) + consumed += c + missing_types += m + + # No need to search for transformation if + # some source type has consumed source and + # no more source types are needed. + if only_one and consumed: + missing_types = [] + + #TODO: we should check that only one source type + #if create of 'only_one' is true. + # TODO: consider if consuned/bypassed separation should + # be done by 'construct_types'. + + if missing_types: + transformed = construct_types (project, name, missing_types, prop_set, sources) + + # Add targets of right type to 'consumed'. Add others to + # 'bypassed'. The 'generators.construct' rule has done + # its best to convert everything to the required type. + # There's no need to rerun it on targets of different types. + + # NOTE: ignoring usage requirements + for t in transformed[1]: + if t.type() in missing_types: + consumed.append(t) + + consumed = unique(consumed) + + return consumed + + + def convert_multiple_sources_to_consumable_types (self, project, prop_set, sources): + """ Converts several files to consumable types. + """ + if __debug__: + from .targets import ProjectTarget + + assert isinstance(project, ProjectTarget) + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + if not self.source_types_: + return list(sources) + + acceptable_types = set() + for t in self.source_types_: + acceptable_types.update(type.all_derived(t)) + + result = [] + for source in sources: + if source.type() not in acceptable_types: + transformed = construct_types( + project, None,self.source_types_, prop_set, [source]) + # construct_types returns [prop_set, [targets]] + for t in transformed[1]: + if t.type() in self.source_types_: + result.append(t) + if not transformed: + project.manager().logger().log(__name__, " failed to convert ", source) + else: + result.append(source) + + result = sequence.unique(result, stable=True) + return result + + + + def consume_directly (self, source): + assert isinstance(source, virtual_target.VirtualTarget) + real_source_type = source.type () + + # If there are no source types, we can consume anything + source_types = self.source_types() + if not source_types: + source_types = [real_source_type] + + consumed = [] + missing_types = [] + for st in source_types: + # The 'source' if of right type already) + if real_source_type == st or type.is_derived (real_source_type, st): + consumed = [source] + + else: + missing_types.append (st) + + return (consumed, missing_types) + + def action_class (self): + """ Returns the class to be used to actions. Default implementation + returns "action". + """ + return virtual_target.Action + + +def find (id): + """ Finds the generator with id. Returns None if not found. + """ + assert isinstance(id, basestring) + return __generators.get (id, None) + +def register (g): + """ Registers new generator instance 'g'. + """ + assert isinstance(g, Generator) + id = g.id() + + __generators [id] = g + + # A generator can produce several targets of the + # same type. We want unique occurrence of that generator + # in .generators.$(t) in that case, otherwise, it will + # be tried twice and we'll get false ambiguity. + for t in sequence.unique(g.target_types()): + __type_to_generators.setdefault(t, []).append(g) + + # Update the set of generators for toolset + + # TODO: should we check that generator with this id + # is not already registered. For example, the fop.jam + # module intentionally declared two generators with the + # same id, so such check will break it. + + # Some generators have multiple periods in their name, so the + # normal $(id:S=) won't generate the right toolset name. + # e.g. if id = gcc.compile.c++, then + # .generators-for-toolset.$(id:S=) will append to + # .generators-for-toolset.gcc.compile, which is a separate + # value from .generators-for-toolset.gcc. Correcting this + # makes generator inheritance work properly. + # See also inherit-generators in module toolset + base = id.split ('.', 100) [0] + + __generators_for_toolset.setdefault(base, []).append(g) + + # After adding a new generator that can construct new target types, we need + # to clear the related cached viable source target type information for + # constructing a specific target type or using a specific generator. Cached + # viable source target type lists affected by this are those containing any + # of the target types constructed by the new generator or any of their base + # target types. + # + # A more advanced alternative to clearing that cached viable source target + # type information would be to expand it with additional source types or + # even better - mark it as needing to be expanded on next use. + # + # For now we just clear all the cached viable source target type information + # that does not simply state 'all types' and may implement a more detailed + # algorithm later on if it becomes needed. + + invalidate_extendable_viable_source_target_type_cache() + + +def check_register_types(fn): + def wrapper(id, source_types, target_types, requirements=[]): + assert isinstance(id, basestring) + assert is_iterable_typed(source_types, basestring) + assert is_iterable_typed(target_types, basestring) + assert is_iterable_typed(requirements, basestring) + return fn(id, source_types, target_types, requirements=requirements) + wrapper.__name__ = fn.__name__ + wrapper.__doc__ = fn.__doc__ + return wrapper + + +@bjam_signature([['id'], ['source_types', '*'], ['target_types', '*'], ['requirements', '*']]) +@check_register_types +def register_standard (id, source_types, target_types, requirements = []): + """ Creates new instance of the 'generator' class and registers it. + Returns the creates instance. + Rationale: the instance is returned so that it's possible to first register + a generator and then call 'run' method on that generator, bypassing all + generator selection. + """ + g = Generator (id, False, source_types, target_types, requirements) + register (g) + return g + + +@check_register_types +def register_composing (id, source_types, target_types, requirements = []): + g = Generator (id, True, source_types, target_types, requirements) + register (g) + return g + +def generators_for_toolset (toolset): + """ Returns all generators which belong to 'toolset'. + """ + assert isinstance(toolset, basestring) + return __generators_for_toolset.get(toolset, []) + +def override (overrider_id, overridee_id): + """Make generator 'overrider-id' be preferred to + 'overridee-id'. If, when searching for generators + that could produce a target of certain type, + both those generators are among viable generators, + the overridden generator is immediately discarded. + + The overridden generators are discarded immediately + after computing the list of viable generators, before + running any of them.""" + assert isinstance(overrider_id, basestring) + assert isinstance(overridee_id, basestring) + + __overrides.setdefault(overrider_id, []).append(overridee_id) + +def __viable_source_types_real (target_type): + """ Returns a list of source type which can possibly be converted + to 'target_type' by some chain of generator invocation. + + More formally, takes all generators for 'target_type' and + returns union of source types for those generators and result + of calling itself recusrively on source types. + """ + assert isinstance(target_type, basestring) + generators = [] + + # 't0' is the initial list of target types we need to process to get a list + # of their viable source target types. New target types will not be added to + # this list. + t0 = type.all_bases (target_type) + + + # 't' is the list of target types which have not yet been processed to get a + # list of their viable source target types. This list will get expanded as + # we locate more target types to process. + t = t0 + + result = [] + while t: + # Find all generators for current type. + # Unlike 'find_viable_generators' we don't care about prop_set. + generators = __type_to_generators.get (t [0], []) + t = t[1:] + + for g in generators: + if not g.source_types(): + # Empty source types -- everything can be accepted + result = "*" + # This will terminate outer loop. + t = None + break + + for source_type in g.source_types (): + if not source_type in result: + # If generator accepts 'source_type' it + # will happily accept any type derived from it + all = type.all_derived (source_type) + for n in all: + if not n in result: + + # Here there is no point in adding target types to + # the list of types to process in case they are or + # have already been on that list. We optimize this + # check by realizing that we only need to avoid the + # original target type's base types. Other target + # types that are or have been on the list of target + # types to process have been added to the 'result' + # list as well and have thus already been eliminated + # by the previous if. + if not n in t0: + t.append (n) + result.append (n) + + return result + + +def viable_source_types (target_type): + """ Helper rule, caches the result of '__viable_source_types_real'. + """ + assert isinstance(target_type, basestring) + if target_type not in __viable_source_types_cache: + __vst_cached_types.append(target_type) + __viable_source_types_cache [target_type] = __viable_source_types_real (target_type) + return __viable_source_types_cache [target_type] + +def viable_source_types_for_generator_real (generator): + """ Returns the list of source types, which, when passed to 'run' + method of 'generator', has some change of being eventually used + (probably after conversion by other generators) + """ + assert isinstance(generator, Generator) + source_types = generator.source_types () + + if not source_types: + # If generator does not specify any source types, + # it might be special generator like builtin.lib-generator + # which just relays to other generators. Return '*' to + # indicate that any source type is possibly OK, since we don't + # know for sure. + return ['*'] + + else: + result = [] + for s in source_types: + viable_sources = viable_source_types(s) + if viable_sources == "*": + result = ["*"] + break + else: + result.extend(type.all_derived(s) + viable_sources) + return unique(result) + +def viable_source_types_for_generator (generator): + """ Caches the result of 'viable_source_types_for_generator'. + """ + assert isinstance(generator, Generator) + if generator not in __viable_source_types_cache: + __vstg_cached_generators.append(generator) + __viable_source_types_cache[generator] = viable_source_types_for_generator_real (generator) + + return __viable_source_types_cache[generator] + +def try_one_generator_really (project, name, generator, target_type, properties, sources): + """ Returns usage requirements + list of created targets. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + assert isinstance(generator, Generator) + assert isinstance(target_type, basestring) + assert isinstance(properties, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + targets = generator.run (project, name, properties, sources) + + usage_requirements = [] + success = False + + dout("returned " + str(targets)) + + if targets: + success = True; + + if isinstance (targets[0], property_set.PropertySet): + usage_requirements = targets [0] + targets = targets [1] + + else: + usage_requirements = property_set.empty () + + dout( " generator" + generator.id() + " spawned ") + # generators.dout [ indent ] " " $(targets) ; +# if $(usage-requirements) +# { +# generators.dout [ indent ] " with usage requirements:" $(x) ; +# } + + if success: + return (usage_requirements, targets) + else: + return None + +def try_one_generator (project, name, generator, target_type, properties, sources): + """ Checks if generator invocation can be pruned, because it's guaranteed + to fail. If so, quickly returns empty list. Otherwise, calls + try_one_generator_really. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + assert isinstance(generator, Generator) + assert isinstance(target_type, basestring) + assert isinstance(properties, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + source_types = [] + + for s in sources: + source_types.append (s.type ()) + + viable_source_types = viable_source_types_for_generator (generator) + + if source_types and viable_source_types != ['*'] and\ + not set_.intersection (source_types, viable_source_types): + if project.manager ().logger ().on (): + id = generator.id () + project.manager ().logger ().log (__name__, "generator '%s' pruned" % id) + project.manager ().logger ().log (__name__, "source_types" '%s' % source_types) + project.manager ().logger ().log (__name__, "viable_source_types '%s'" % viable_source_types) + + return [] + + else: + return try_one_generator_really (project, name, generator, target_type, properties, sources) + + +def construct_types (project, name, target_types, prop_set, sources): + + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + assert is_iterable_typed(target_types, basestring) + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + + result = [] + usage_requirements = property_set.empty() + + for t in target_types: + r = construct (project, name, t, prop_set, sources) + + if r: + (ur, targets) = r + usage_requirements = usage_requirements.add(ur) + result.extend(targets) + + # TODO: have to introduce parameter controlling if + # several types can be matched and add appropriate + # checks + + # TODO: need to review the documentation for + # 'construct' to see if it should return $(source) even + # if nothing can be done with it. Currents docs seem to + # imply that, contrary to the behaviour. + if result: + return (usage_requirements, result) + + else: + return (usage_requirements, sources) + +def __ensure_type (targets): + """ Ensures all 'targets' have types. If this is not so, exists with + error. + """ + assert is_iterable_typed(targets, virtual_target.VirtualTarget) + for t in targets: + if not t.type (): + get_manager().errors()("target '%s' has no type" % str (t)) + +def find_viable_generators_aux (target_type, prop_set): + """ Returns generators which can be used to construct target of specified type + with specified properties. Uses the following algorithm: + - iterates over requested target_type and all it's bases (in the order returned bt + type.all-bases. + - for each type find all generators that generate that type and which requirements + are satisfied by properties. + - if the set of generators is not empty, returns that set. + + Note: this algorithm explicitly ignores generators for base classes if there's + at least one generator for requested target_type. + """ + assert isinstance(target_type, basestring) + assert isinstance(prop_set, property_set.PropertySet) + # Select generators that can create the required target type. + viable_generators = [] + initial_generators = [] + + from . import type + + # Try all-type generators first. Assume they have + # quite specific requirements. + all_bases = type.all_bases(target_type) + + for t in all_bases: + + initial_generators = __type_to_generators.get(t, []) + + if initial_generators: + dout("there are generators for this type") + if t != target_type: + # We're here, when no generators for target-type are found, + # but there are some generators for a base type. + # We'll try to use them, but they will produce targets of + # base type, not of 'target-type'. So, we clone the generators + # and modify the list of target types. + generators2 = [] + for g in initial_generators[:]: + # generators.register adds generator to the list of generators + # for toolsets, which is a bit strange, but should work. + # That list is only used when inheriting toolset, which + # should have being done before generators are run. + ng = g.clone_and_change_target_type(t, target_type) + generators2.append(ng) + register(ng) + + initial_generators = generators2 + break + + for g in initial_generators: + dout("trying generator " + g.id() + + "(" + str(g.source_types()) + "->" + str(g.target_types()) + ")") + + m = g.match_rank(prop_set) + if m: + dout(" is viable") + viable_generators.append(g) + + return viable_generators + +def find_viable_generators (target_type, prop_set): + assert isinstance(target_type, basestring) + assert isinstance(prop_set, property_set.PropertySet) + key = target_type + '.' + str (prop_set) + + l = __viable_generators_cache.get (key, None) + if not l: + l = [] + + if not l: + l = find_viable_generators_aux (target_type, prop_set) + + __viable_generators_cache [key] = l + + viable_generators = [] + for g in l: + # Avoid trying the same generator twice on different levels. + # TODO: is this really used? + if not g in __active_generators: + viable_generators.append (g) + else: + dout(" generator %s is active, discarding" % g.id()) + + # Generators which override 'all'. + all_overrides = [] + + # Generators which are overridden + overriden_ids = [] + + for g in viable_generators: + id = g.id () + + this_overrides = __overrides.get (id, []) + + if this_overrides: + overriden_ids.extend (this_overrides) + if 'all' in this_overrides: + all_overrides.append (g) + + if all_overrides: + viable_generators = all_overrides + + return [g for g in viable_generators if not g.id() in overriden_ids] + +def __construct_really (project, name, target_type, prop_set, sources): + """ Attempts to construct target by finding viable generators, running them + and selecting the dependency graph. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + assert isinstance(target_type, basestring) + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + viable_generators = find_viable_generators (target_type, prop_set) + + result = [] + + dout(" *** %d viable generators" % len (viable_generators)) + + generators_that_succeeded = [] + + for g in viable_generators: + __active_generators.append(g) + r = try_one_generator (project, name, g, target_type, prop_set, sources) + del __active_generators[-1] + + if r: + generators_that_succeeded.append(g) + if result: + output = cStringIO.StringIO() + print >>output, "ambiguity found when searching for best transformation" + print >>output, "Trying to produce type '%s' from: " % (target_type) + for s in sources: + print >>output, " - " + s.str() + print >>output, "Generators that succeeded:" + for g in generators_that_succeeded: + print >>output, " - " + g.id() + print >>output, "First generator produced: " + for t in result[1:]: + print >>output, " - " + str(t) + print >>output, "Second generator produced:" + for t in r[1:]: + print >>output, " - " + str(t) + get_manager().errors()(output.getvalue()) + else: + result = r; + + return result; + + +def construct (project, name, target_type, prop_set, sources, top_level=False): + """ Attempts to create target of 'target-type' with 'properties' + from 'sources'. The 'sources' are treated as a collection of + *possible* ingridients -- i.e. it is not required to consume + them all. If 'multiple' is true, the rule is allowed to return + several targets of 'target-type'. + + Returns a list of target. When this invocation is first instance of + 'construct' in stack, returns only targets of requested 'target-type', + otherwise, returns also unused sources and additionally generated + targets. + + If 'top-level' is set, does not suppress generators that are already + used in the stack. This may be useful in cases where a generator + has to build a metatarget -- for example a target corresponding to + built tool. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + assert isinstance(name, basestring) or name is None + assert isinstance(target_type, basestring) + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + assert isinstance(top_level, bool) + global __active_generators + if top_level: + saved_active = __active_generators + __active_generators = [] + + global __construct_stack + if not __construct_stack: + __ensure_type (sources) + + __construct_stack.append (1) + + increase_indent () + + if project.manager().logger().on(): + dout( "*** construct " + target_type) + + for s in sources: + dout(" from " + str(s)) + + project.manager().logger().log (__name__, " properties: ", prop_set.raw ()) + + result = __construct_really(project, name, target_type, prop_set, sources) + + decrease_indent() + + __construct_stack = __construct_stack [1:] + + if top_level: + __active_generators = saved_active + + return result + +def add_usage_requirements (result, raw_properties): + if result: + if isinstance (result[0], property_set.PropertySet): + return (result[0].add_raw(raw_properties), result[1]) + else: + return (property_set.create(raw_properties), result) + #if [ class.is-a $(result[1]) : property-set ] + #{ + # return [ $(result[1]).add-raw $(raw-properties) ] $(result[2-]) ; + #} + #else + #{ + # return [ property-set.create $(raw-properties) ] $(result) ; + #} diff --git a/src/boost/tools/build/src/build/project.jam b/src/boost/tools/build/src/build/project.jam new file mode 100644 index 000000000..a4cef30c8 --- /dev/null +++ b/src/boost/tools/build/src/build/project.jam @@ -0,0 +1,1357 @@ +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2005, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Implements project representation and loading. Each project is represented by: +# - a module where all the Jamfile content lives. +# - an instance of 'project-attributes' class. +# (given a module name, can be obtained using the 'attributes' rule) +# - an instance of 'project-target' class (from targets.jam) +# (given a module name, can be obtained using the 'target' rule) +# +# Typically, projects are created as result of loading a Jamfile, which is done +# by rules 'load' and 'initialize', below. First, a module is prepared and a new +# project-attributes instance is created. Some rules necessary for all projects +# are added to the module (see the 'project-rules' module). Default project +# attributes are set (inheriting parent project attributes, if it exists). After +# that the Jamfile is read. It can declare its own attributes using the +# 'project' rule which will be combined with any already set. +# +# The 'project' rule can also declare a project id which will be associated with +# the project module. +# +# Besides Jamfile projects, we also support 'standalone' projects created by +# calling 'initialize' in an arbitrary module and not specifying the project's +# location. After the call, the module can call the 'project' rule, declare main +# targets and behave as a regular project except that, since it is not +# associated with any location, it should only declare prebuilt targets. +# +# The list of all loaded Jamfiles is stored in the .project-locations variable. +# It is possible to obtain a module name for a location using the 'module-name' +# rule. Standalone projects are not recorded and can only be referenced using +# their project id. + +import "class" : new ; +import modules ; +import path ; +import print ; +import property-set ; +import sequence ; + + +.debug-loading = [ MATCH ^(--debug-loading)$ : [ modules.peek : ARGV ] ] ; + + +# Loads the Jamfile at the given location. After loading, project global file +# and Jamfiles needed by the requested one will be loaded recursively. If the +# Jamfile at that location is loaded already, does nothing. Returns the project +# module for the Jamfile. +# +rule load ( jamfile-location : synthesize ? ) +{ + local module-name = [ module-name $(jamfile-location) ] ; + # If Jamfile is already loaded, do not try again. + if ! $(module-name) in $(.jamfile-modules) + { + if $(.debug-loading) + { + ECHO Loading Jamfile at '$(jamfile-location)' ; + } + + load-jamfile $(jamfile-location) : $(module-name) : $(synthesize) ; + + # We want to make sure that child project are loaded only after parent + # projects. In particular, because parent projects define attributes + # which are then inherited by children, and we do not want children to + # be loaded before parent has defined everything. + # + # While "build-project" and "use-project" can potentially refer to child + # projects from parent projects, we do not immediately load child + # projects when seeing those attributes. Instead, we record the minimal + # information to be used only later. + load-used-projects $(module-name) ; + } + return $(module-name) ; +} + + +rule load-used-projects ( module-name ) +{ + local used = [ modules.peek $(module-name) : .used-projects ] ; + local location = [ attribute $(module-name) location ] ; + while $(used) + { + local id = $(used[1]) ; + local where = [ path.make $(used[2]) ] ; + register-id $(id) : [ load [ path.root $(where) $(location) ] ] ; + used = $(used[3-]) ; + } +} + + +# Note the use of character groups, as opposed to listing 'Jamroot' and +# 'jamroot'. With the latter, we would get duplicate matches on Windows and +# would have to eliminate duplicates. +JAMROOT ?= [ modules.peek : JAMROOT ] ; +JAMROOT ?= project-root.jam "[Jj]amroot" "[Jj]amroot." "[Jj]amroot.jam" ; + + +# Loads parent of Jamfile at 'location'. Issues an error if nothing is found. +# +rule load-parent ( location ) +{ + local found = [ path.glob-in-parents $(location) : $(JAMROOT) $(JAMFILE) ] ; + if $(found) + { + return [ load $(found[1]:D) ] ; + } +} + + +# Returns the project module corresponding to the given project-id or plain +# directory name. Returns nothing if such a project can not be found. +# +rule find ( name : current-location ) +{ + local project-module ; + + # Try interpreting name as project id. + if [ path.is-rooted $(name) ] + { + project-module = $($(name).jamfile-module) ; + } + + if ! $(project-module) + { + local location = [ path.root [ path.make $(name) ] $(current-location) ] + ; + + # If no project is registered for the given location, try to load it. + # First see if we have a Jamfile. If not, then see if we might have a + # project root willing to act as a Jamfile. In that case, project root + # must be placed in the directory referred to by id. + + project-module = [ module-name $(location) ] ; + if ! $(project-module) in $(.jamfile-modules) + { + if [ path.glob $(location) : $(JAMROOT) $(JAMFILE) ] + { + project-module = [ load $(location) ] ; + } + else + { + project-module = ; + } + } + } + + return $(project-module) ; +} + + +# Returns the name of the module corresponding to 'jamfile-location'. If no +# module corresponds to that location yet, associates the default module name +# with that location. +# +rule module-name ( jamfile-location ) +{ + if ! $(.module.$(jamfile-location)) + { + # Root the path, so that locations are always unambiguous. Without this, + # we can not decide if '../../exe/program1' and '.' are the same paths. + local normalized = [ path.root $(jamfile-location) [ path.pwd ] ] ; + + # Quick & dirty fix to get the same module name when we supply two + # equivalent location paths, e.g. 'd:\Foo' & 'D:\fOo\bar\..' on Windows. + # Note that our current implementation will not work correctly if the + # given location references an empty folder, but in that case any later + # attempt to load a Jamfile from this location will fail anyway. + # FIXME: Implement this cleanly. Support for this type of path + # normalization already exists internally in Boost Jam and the current + # fix relies on the GLOB builtin rule using that support. Most likely we + # just need to add a new builtin rule to do this explicitly. + normalized = [ NORMALIZE_PATH $(normalized) ] ; + local glob-result = [ GLOB [ path.native $(normalized) ] : * ] ; + if $(glob-result) + { + normalized = $(glob-result[1]:D) ; + } + .module.$(jamfile-location) = Jamfile<$(normalized)> ; + } + return $(.module.$(jamfile-location)) ; +} + + +# Default patterns to search for the Jamfiles to use for build declarations. +# +JAMFILE = [ modules.peek : JAMFILE ] ; +JAMFILE ?= "[Bb]uild.jam" "[Jj]amfile.v2" "[Jj]amfile" "[Jj]amfile." "[Jj]amfile.jam" ; + + +# Find the Jamfile at the given location. This returns the exact names of all +# the Jamfiles in the given directory. The optional parent-root argument causes +# this to search not the given directory but the ones above it up to the +# parent-root directory. +# +rule find-jamfile ( + dir # The directory(s) to look for a Jamfile. + parent-root ? # Optional flag indicating to search for the parent Jamfile. + : no-errors ? + ) +{ + # Glob for all the possible Jamfiles according to the match pattern. + # + local jamfile-glob = ; + if $(parent-root) + { + if ! $(.parent-jamfile.$(dir)) + { + .parent-jamfile.$(dir) = [ path.glob-in-parents $(dir) : $(JAMFILE) + ] ; + } + jamfile-glob = $(.parent-jamfile.$(dir)) ; + } + else + { + if ! $(.jamfile.$(dir)) + { + .jamfile.$(dir) = [ path.glob $(dir) : $(JAMFILE) ] ; + } + jamfile-glob = $(.jamfile.$(dir)) ; + + } + + local jamfile-to-load = $(jamfile-glob) ; + # Multiple Jamfiles found in the same place. Warn about this and ensure we + # use only one of them. As a temporary convenience measure, if there is + # Jamfile.v2 among found files, suppress the warning and use it. + # + if $(jamfile-to-load[2-]) + { + local v2-jamfiles = [ MATCH "^(.*[Jj]amfile\\.v2)|(.*[Bb]uild\\.jam)$" : + $(jamfile-to-load) ] ; + + if $(v2-jamfiles) && ! $(v2-jamfiles[2]) + { + jamfile-to-load = $(v2-jamfiles) ; + } + else + { + local jamfile = [ path.basename $(jamfile-to-load[1]) ] ; + ECHO "warning: Found multiple Jamfiles at '"$(dir)"'!" + "Loading the first one: '$(jamfile)'." ; + } + + jamfile-to-load = $(jamfile-to-load[1]) ; + } + + # Could not find it, error. + # + if ! $(no-errors) && ! $(jamfile-to-load) + { + import errors ; + errors.error Unable to load Jamfile. + : Could not find a Jamfile in directory '$(dir)'. + : Attempted to find it with pattern '$(JAMFILE:J=" ")'. + : Please consult the documentation at "'https://www.bfgroup.xyz/b2/'." ; + } + + return $(jamfile-to-load) ; +} + + +# Default patterns to search for auto-include of package manager build declarations. +# +PACKAGE_MANAGER_BUILD_INFO(CONAN) = "conanbuildinfo.jam" ; + +# Default to using the package manager build info in this priority order: +# 1. Configuration, user, project, etc. +# 2. Command line argument "--use-package-manager=<name>". +# 3. Environment variable "PACKAGE_MANAGER_BUILD_INFO". +# 4. Conan, others. +# +local .use-package-manager = [ MATCH "^--use-package-manager=(.*)$" : [ modules.peek : ARGV ] ] ; +PACKAGE_MANAGER_BUILD_INFO ?= $(PACKAGE_MANAGER_BUILD_INFO($(.use-package-manager:U))) ; +PACKAGE_MANAGER_BUILD_INFO ?= [ modules.peek : PACKAGE_MANAGER_BUILD_INFO ] ; +PACKAGE_MANAGER_BUILD_INFO ?= $(PACKAGE_MANAGER_BUILD_INFO(CONAN)) ; + + +# Load the configured package manager build information file. +# +rule load-package-manager-build-info ( ) +{ + # This first variable is the one from the configuration (user, project, etc). + local package-manager-build-info = [ modules.peek [ CALLER_MODULE ] : PACKAGE_MANAGER_BUILD_INFO ] ; + # And this is the rest as it takes it from the settings in the "project" module. + # I.e. the variable assignments above. + package-manager-build-info ?= $(PACKAGE_MANAGER_BUILD_INFO) ; + if $(package-manager-build-info) + { + local pm = [ path.glob $(dir) : $(package-manager-build-info) ] ; + pm = $(pm[1]) ; + local cm = [ CALLER_MODULE ] ; + local pm-tag = "$(cm)<$(pm:B)>" ; + if $(pm) && ! ( $(pm-tag) in $(.package-manager-build-info) ) + { + .package-manager-build-info += $(pm-tag) ; + # We found a matching builf info to load, but we have to be careful + # as the loading can affect the current project since it can define + # sub-projects. Hence we save and restore the current project. + local saved-project = $(.current-project) ; + modules.load $(cm) : $(pm) ; + .current-project = $(saved-project) ; + } + } +} + + +# Load a Jamfile at the given directory. Returns nothing. Will attempt to load +# the file as indicated by the JAMFILE patterns. Effect of calling this rule +# twice with the same 'dir' is undefined. +# +local rule load-jamfile ( dir : jamfile-module : synthesize ? ) +{ + # See if the Jamfile is where it should be. + # + local jamfile-to-load = [ path.glob $(dir) : $(JAMROOT) ] ; + if ! $(jamfile-to-load) + { + jamfile-to-load = [ find-jamfile $(dir) : $(synthesize) ] ; + } + + if $(jamfile-to-load[2]) + { + import errors ; + errors.error "Multiple Jamfiles found at '$(dir)'" : + "Filenames are: " $(jamfile-to-load:D=) ; + } + + if ! $(jamfile-to-load) && $(synthesize) + { + jamfile-to-load = $(dir)/@ ; + } + + # Now load the Jamfile in its own context. + # The call to 'initialize' may load the parent Jamfile, which might contain + # a 'use-project' or a 'project.load' call, causing a second attempt to load + # the same project we are loading now. Checking inside .jamfile-modules + # prevents that second attempt from messing things up. + if ! $(jamfile-module) in $(.jamfile-modules) + { + local previous-project = $(.current-project) ; + + # Initialize the Jamfile module before loading. + initialize $(jamfile-module) : [ path.parent $(jamfile-to-load) ] : + $(jamfile-to-load:BS) ; + + # Auto-load package manager(s) build information. + IMPORT project : load-package-manager-build-info + : $(jamfile-module) : project.load-package-manager-build-info ; + modules.call-in $(jamfile-module) : project.load-package-manager-build-info ; + + if ! $(jamfile-module) in $(.jamfile-modules) + { + .jamfile-modules += $(jamfile-module) ; + + local saved-project = $(.current-project) ; + + mark-as-user $(jamfile-module) ; + if $(jamfile-to-load:B) = "@" + { + # Not a real jamfile to load. Synthsize the load. + modules.poke $(jamfile-module) : __name__ : $(jamfile-module) ; + modules.poke $(jamfile-module) : __file__ : [ path.native $(jamfile-to-load) ] ; + modules.poke $(jamfile-module) : __binding__ : [ path.native $(jamfile-to-load) ] ; + } + else + { + modules.load $(jamfile-module) : [ path.native $(jamfile-to-load) ] + : . ; + if [ MATCH ^($(JAMROOT))$ : $(jamfile-to-load:BS) ] + { + jamfile = [ find-jamfile $(dir) : no-errors ] ; + if $(jamfile) + { + load-aux $(jamfile-module) : [ path.native $(jamfile) ] ; + } + } + } + + # Now do some checks. + if $(.current-project) != $(saved-project) + { + import errors ; + errors.error + The value of the .current-project variable has magically + : changed after loading a Jamfile. This means some of the + : targets might be defined in the wrong project. + : after loading $(jamfile-module) + : expected value $(saved-project) + : actual value $(.current-project) ; + } + + end-load $(previous-project) ; + + if $(.global-build-dir) + { + if [ attribute $(jamfile-module) location ] && ! [ attribute + $(jamfile-module) id ] + { + local project-root = [ attribute $(jamfile-module) + project-root ] ; + if $(project-root) = $(dir) + { + ECHO "warning: the --build-dir option was specified" ; + ECHO "warning: but Jamroot at '$(dir)'" ; + ECHO "warning: specified no project id" ; + ECHO "warning: the --build-dir option will be ignored" ; + } + } + } + } + } +} + + +# Called when done loading a project module. Restores the current project to its +# previous value and does some additional checking to make sure our 'currently +# loaded project' identifier does not get left with an invalid value. +# +rule end-load ( previous-project ? ) +{ + if ! $(.current-project) + { + import errors ; + errors.error Ending project loading requested when there was no project + currently being loaded. ; + } + + if ! $(previous-project) && $(.saved-current-project) + { + import errors ; + errors.error Ending project loading requested with no 'previous project' + when there were other projects still marked as being loaded + recursively. ; + } + + .current-project = $(previous-project) ; +} + + +rule mark-as-user ( module-name ) +{ + if USER_MODULE in [ RULENAMES ] + { + USER_MODULE $(module-name) ; + } +} + + +rule load-aux ( module-name : file ) +{ + mark-as-user $(module-name) ; + + module $(module-name) + { + include $(2) ; + local rules = [ RULENAMES $(1) ] ; + IMPORT $(1) : $(rules) : $(1) : $(1).$(rules) ; + } +} + + +.global-build-dir = [ MATCH ^--build-dir=(.*)$ : [ modules.peek : ARGV ] ] ; +if $(.global-build-dir) +{ + # If the option is specified several times, take the last value. + .global-build-dir = [ path.make $(.global-build-dir[-1]) ] ; +} + + +# Initialize the module for a project. +# +rule initialize ( + module-name # The name of the project module. + : location ? # The location (directory) of the project to initialize. If + # not specified, a standalone project will be initialized. + : basename ? + ) +{ + if $(.debug-loading) + { + ECHO "Initializing project '$(module-name)'" ; + } + + local jamroot ; + + local parent-module ; + if $(module-name) in test-config all-config + { + # No parent. + } + else if $(module-name) = site-config + { + parent-module = test-config ; + } + else if $(module-name) = user-config + { + parent-module = site-config ; + } + else if $(module-name) = project-config + { + parent-module = user-config ; + } + else if $(location) + { + if ! [ MATCH ^($(JAMROOT))$ : $(basename) ] + { + # We search for parent/jamroot only if this is a jamfile project, i.e. + # if is not a standalone or a jamroot project. + parent-module = [ load-parent $(location) ] ; + } + if ! $(parent-module) + { + # We have a jamroot project, or a jamfile project + # without a parent that becomes a jamroot. Inherit from + # user-config (or project-config + # if it exists). + if $(project-config.attributes) + { + parent-module = project-config ; + } + else + { + parent-module = user-config ; + } + jamroot = true ; + } + } + + # TODO: need to consider if standalone projects can do anything but define + # prebuilt targets. If so, we need to give them a more sensible "location", + # so that source paths are correct. + location ?= "" ; + # Create the module for the Jamfile first. + module $(module-name) + { + } + + # load-parent can end up loading this module again. Make sure this is not + # duplicated. + if ! $($(module-name).attributes) + { + $(module-name).attributes = [ new project-attributes $(location) + $(module-name) ] ; + local attributes = $($(module-name).attributes) ; + + if $(location) + { + $(attributes).set source-location : [ path.make $(location) ] : + exact ; + } + else + { + local cfgs = project site test user all ; + if ! $(module-name) in $(cfgs)-config + { + # This is a standalone project with known location. Set its + # source location so it can declare targets. This is needed so + # you can put a .jam file with your sources and use it via + # 'using'. Standard modules (in the 'tools' subdir) may not + # assume source dir is set. + local s = [ modules.binding $(module-name) ] ; + if ! $(s) + { + import errors ; + errors.error Could not determine project location + $(module-name) ; + } + $(attributes).set source-location : $(s:D) : exact ; + } + } + + $(attributes).set requirements : [ property-set.empty ] : exact ; + $(attributes).set usage-requirements : [ property-set.empty ] : exact ; + + # Import rules common to all project modules from project-rules module, + # defined at the end of this file. + local rules = [ RULENAMES project-rules ] ; + IMPORT project-rules : $(rules) : $(module-name) : $(rules) ; + + if $(parent-module) + { + inherit-attributes $(module-name) : $(parent-module) ; + $(attributes).set parent-module : $(parent-module) : exact ; + } + + if $(jamroot) + { + $(attributes).set project-root : $(location) : exact ; + if ! $(.first-project-root) + { + .first-project-root = $(module-name) ; + } + } + + local parent ; + if $(parent-module) + { + parent = [ target $(parent-module) ] ; + } + + if ! $(.target.$(module-name)) + { + local requirements = [ attribute $(module-name) requirements ] ; + .target.$(module-name) = [ new project-target $(module-name) : + $(module-name) $(parent) : $(requirements) ] ; + + if $(.debug-loading) + { + ECHO Assigned project target $(.target.$(module-name)) to + '$(module-name)' ; + } + } + } + + .current-project = [ target $(module-name) ] ; +} + + +# Make 'project-module' inherit attributes of project root and parent module. +# +rule inherit-attributes ( project-module : parent-module ) +{ + local attributes = $($(project-module).attributes) ; + local pattributes = [ attributes $(parent-module) ] ; + # Parent module might be locationless configuration module. + if [ modules.binding $(parent-module) ] + { + $(attributes).set parent : + [ path.parent [ path.make [ modules.binding $(parent-module) ] ] ] ; + } + $(attributes).set project-root : + [ $(pattributes).get project-root ] : exact ; + $(attributes).set default-build : + [ $(pattributes).get default-build ] ; + $(attributes).set requirements : + [ $(pattributes).get requirements ] : exact ; + $(attributes).set usage-requirements : + [ $(pattributes).get usage-requirements ] : exact ; + + local parent-build-dir = [ $(pattributes).get build-dir ] ; + if $(parent-build-dir) + { + # Have to compute relative path from parent dir to our dir. Convert both + # paths to absolute, since we cannot find relative path from ".." to + # ".". + + local location = [ attribute $(project-module) location ] ; + local parent-location = [ attribute $(parent-module) location ] ; + + local pwd = [ path.pwd ] ; + local parent-dir = [ path.root $(parent-location) $(pwd) ] ; + local our-dir = [ path.root $(location) $(pwd) ] ; + $(attributes).set build-dir : [ path.join $(parent-build-dir) + [ path.relative $(our-dir) $(parent-dir) ] ] : exact ; + } +} + + +# Returns whether the given string is a valid registered project id. +# +rule is-registered-id ( id ) +{ + return $($(id).jamfile-module) ; +} + + +# Associate the given id with the given project module. Returns the possibly +# corrected project id. +# +rule register-id ( id : module ) +{ + id = [ path.root $(id) / ] ; + + if [ MATCH (//) : $(id) ] + { + import errors ; + errors.user-error Project id may not contain two consecutive slash + characters (project "id:" '$(id)'). ; + } + + local orig-module = $($(id).jamfile-module) ; + if $(orig-module) && $(orig-module) != $(module) + { + local new-file = [ modules.peek $(module) : __file__ ] ; + local new-location = [ project.attribute $(module) location ] ; + + local orig-file = [ modules.peek $(orig-module) : __file__ ] ; + local orig-main-id = [ project.attribute $(orig-module) id ] ; + local orig-location = [ project.attribute $(orig-module) location ] ; + local orig-project = [ target $(orig-module) ] ; + local orig-name = [ $(orig-project).name ] ; + + import errors ; + errors.user-error Attempt to redeclare already registered project id + '$(id)'. + : Original "project:" + : " " "Name:" $(orig-name:E=---) + : " " "Module:" $(orig-module) + : " " "Main id: "$(orig-main-id:E=---) + : " " "File:" $(orig-file:E=---) + : " " "Location:" $(orig-location:E=---) + : New "project:" + : " " "Module:" $(module) + : " " "File:" $(new-file:E=---) + : " " "Location:" $(new-location:E=---) ; + } + + $(id).jamfile-module = $(module) ; + return $(id) ; +} + + +# Class keeping all the attributes of a project. +# +# The standard attributes are "id", "location", "project-root", "parent" +# "requirements", "default-build", "source-location" and "projects-to-build". +# +class project-attributes +{ + import path ; + import print ; + import project ; + import property ; + import property-set ; + import sequence ; + + rule __init__ ( location project-module ) + { + self.location = $(location) ; + self.project-module = $(project-module) ; + } + + # Set the named attribute from the specification given by the user. The + # value actually set may be different. + # + rule set ( attribute : specification * + : exact ? # Sets value from 'specification' without any processing. + ) + { + if $(exact) + { + self.$(attribute) = $(specification) ; + } + else if $(attribute) = "requirements" + { + local result = [ property-set.refine-from-user-input + $(self.requirements) : $(specification) + : $(self.project-module) : $(self.location) ] ; + + if $(result[1]) = "@error" + { + import errors : error : errors.error ; + errors.error Requirements for project at '$(self.location)' + conflict with parent's. : "Explanation:" $(result[2-]) ; + } + + self.requirements = $(result) ; + } + else if $(attribute) = "usage-requirements" + { + local unconditional ; + for local p in $(specification) + { + local split = [ property.split-conditional $(p) ] ; + split ?= nothing $(p) ; + unconditional += $(split[2]) ; + } + + local non-free = [ property.remove free : $(unconditional) ] ; + if $(non-free) + { + import errors : error : errors.error ; + errors.error usage-requirements $(specification) have non-free + properties $(non-free) ; + } + local t = [ property.translate-paths $(specification) : + $(self.location) ] ; + if $(self.usage-requirements) + { + self.usage-requirements = [ property-set.create + [ $(self.usage-requirements).raw ] $(t) ] ; + } + else + { + self.usage-requirements = [ property-set.create $(t) ] ; + } + } + else if $(attribute) = "default-build" + { + self.default-build = [ property.make $(specification) ] ; + } + else if $(attribute) = "source-location" + { + self.source-location = ; + for local src-path in $(specification) + { + self.source-location += [ path.root [ path.make $(src-path) ] + $(self.location) ] ; + } + } + else if $(attribute) = "build-dir" + { + self.build-dir = [ path.root [ path.make $(specification) ] + $(self.location) ] ; + } + else if $(attribute) = "id" + { + self.id = [ project.register-id $(specification) : + $(self.project-module) ] ; + } + else if ! $(attribute) in "default-build" "location" "parent" + "projects-to-build" "project-root" "source-location" + { + import errors : error : errors.error ; + errors.error Invalid project attribute '$(attribute)' specified for + project at '$(self.location)' ; + } + else + { + self.$(attribute) = $(specification) ; + } + } + + # Returns the value of the given attribute. + # + rule get ( attribute ) + { + return $(self.$(attribute)) ; + } + + # Returns whether these attributes belong to a Jamroot project module. + # + rule is-jamroot ( ) + { + if $(self.location) && $(self.project-root) = $(self.location) + { + return true ; + } + } + + # Prints the project attributes. + # + rule print ( ) + { + local id = '$(self.id)' ; + print.section $(id:E=(none)) ; + print.list-start ; + print.list-item "Parent project:" $(self.parent:E=(none)) ; + print.list-item "Requirements:" [ $(self.requirements).raw ] ; + print.list-item "Default build:" $(self.default-build) ; + print.list-item "Source location:" $(self.source-location) ; + print.list-item "Projects to build:" [ sequence.insertion-sort + $(self.projects-to-build) ] ; + print.list-end ; + } +} + + +# Returns the build directory for standalone projects +# +rule standalone-build-dir ( ) +{ + project = [ target $(.first-project-root) ] ; + return [ path.join [ $(project).build-dir ] standalone ] ; +} + +# Returns the project which is currently being loaded. +# +rule current ( ) +{ + if ! $(.current-project) + { + import errors ; + errors.error Reference to the project currently being loaded requested + when there was no project module being loaded. ; + } + return $(.current-project) ; +} + + +# Temporarily changes the current project to 'project'. Should be followed by +# 'pop-current'. +# +rule push-current ( project ? ) +{ + .saved-current-project += $(.current-project) ; + .current-project = $(project) ; +} + + +rule pop-current ( ) +{ + .current-project = $(.saved-current-project[-1]) ; + .saved-current-project = $(.saved-current-project[1--2]) ; +} + + +# Returns the project-attribute instance for the specified Jamfile module. +# +rule attributes ( project ) +{ + return $($(project).attributes) ; +} + + +# Returns the value of the specified attribute in the specified Jamfile module. +# +rule attribute ( project attribute ) +{ + return [ $($(project).attributes).get $(attribute) ] ; +} + + +# Returns whether a project module is one of Boost Build's configuration +# modules. +# +rule is-config-module ( project ) +{ + local cfgs = project site test user ; + if $(project) in $(cfgs)-config + { + return true ; + } +} + + +# Returns whether a project module is a Jamroot project module. +# +rule is-jamroot-module ( project ) +{ + return [ $($(project).attributes).is-jamroot ] ; +} + + +# Returns a project's parent jamroot module. Returns nothing if there is no such +# module, i.e. if this is a standalone project or one of the internal Boost +# Build configuration projects. +# +rule get-jamroot-module ( project ) +{ + local jamroot-location = [ attribute $(project) project-root ] ; + if $(jamroot-location) + { + return [ module-name $(jamroot-location) ] ; + } +} + + +# Returns the project target corresponding to the 'project-module'. +# +rule target ( project-module : allow-missing ? ) +{ + if ! $(.target.$(project-module)) && ! $(allow-missing) + { + import errors ; + errors.user-error Project target requested but not yet assigned for + module '$(project-module)'. ; + } + return $(.target.$(project-module)) ; +} + + +# Defines a B2 extension project. Such extensions usually contain +# library targets and features that can be used by many people. Even though +# extensions are really projects, they can be initialized as a module would be +# with the "using" (project.project-rules.using) mechanism. +# +rule extension ( id space ? : options * : * ) +{ + # The caller is a standalone module for the extension. + local mod = [ CALLER_MODULE ] ; + + # We need to do the rest within the extension module. + module $(mod) + { + import path ; + + # Find the root project. + local root-project = [ project.current ] ; + root-project = [ $(root-project).project-module ] ; + while + [ project.attribute $(root-project) parent-module ] && + [ project.attribute $(root-project) parent-module ] != user-config + { + root-project = [ project.attribute $(root-project) parent-module ] ; + } + + # Default to creating extensions in /ext/.. project space. + local id = $(1[1]) ; + local space = $(1[2]) ; + space ?= ext ; + + # Create the project data, and bring in the project rules into the + # module. + project.initialize $(__name__) : [ path.join [ project.attribute + $(root-project) location ] $(space:L) $(id:L) ] ; + + # Create the project itself, i.e. the attributes. + project /$(space:L)/$(id:L) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : + $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) + : $(18) : $(19) ; + local attributes = [ project.attributes $(__name__) ] ; + + # Inherit from the root project of whomever is defining us. + project.inherit-attributes $(__name__) : $(root-project) ; + $(attributes).set parent-module : $(root-project) : exact ; + } +} + + +rule glob-internal ( project : wildcards + : excludes * : rule-name ) +{ + local location = [ $(project).get source-location ] ; + + local result ; + local paths = [ path.$(rule-name) $(location) : + [ sequence.transform path.make : $(wildcards) ] : + [ sequence.transform path.make : $(excludes) ] ] ; + if $(wildcards:D) || $(rule-name) != glob + { + # The paths we have found are relative to the current directory, but the + # names specified in the sources list are assumed to be relative to the + # source directory of the corresponding project. So, just make the names + # absolute. + for local p in $(paths) + { + # If the path is below source location, use relative path. + # Otherwise, use full path just to avoid any ambiguities. + local rel = [ path.relative $(p) $(location) : no-error ] ; + if $(rel) = not-a-child + { + result += [ path.root $(p) [ path.pwd ] ] ; + } + else + { + result += $(rel) ; + } + } + } + else + { + # There were no wildcards in the directory path, so the files are all in + # the source directory of the project. Just drop the directory, instead + # of making paths absolute. + result = $(paths:D="") ; + } + + return $(result) ; +} + + +rule glob-path-root ( root path ) +{ + return [ path.root $(path) $(root) ] ; +} + +rule glob-internal-ex ( project : paths + : wildcards + : excludes * : rule-name ) +{ + # Make the paths we search in absolute, if they aren't already absolute. + # If the given paths are relative, they will be relative to the source + # directory. So that's what we root against. + local source-location + = [ path.root [ $(project).get source-location ] [ path.pwd ] ] ; + local search-paths + = [ sequence.transform project.glob-path-root $(source-location) : $(paths) ] ; + paths + = [ path.$(rule-name) $(search-paths) : $(wildcards) : $(excludes) ] ; + # The paths we have found are absolute, but the names specified in the + # sources list are assumed to be relative to the source directory of the + # corresponding project. Make the results relative to the source again. + local result + = [ sequence.transform path.relative-to $(source-location) : $(paths) ] ; + + return $(result) ; +} + + +# This module defines rules common to all projects. +# +module project-rules +{ + import modules ; + + rule using ( toolset-module : * ) + { + import toolset ; + + local saved-project = [ modules.peek project : .current-project ] ; + + # Temporarily change the search path so the module referred to by + # 'using' can be placed in the same directory as Jamfile. User will + # expect the module to be found even though the directory is not in + # BOOST_BUILD_PATH. + local x = [ modules.peek : BOOST_BUILD_PATH ] ; + local caller = [ CALLER_MODULE ] ; + local caller-location = [ modules.binding $(caller) ] ; + modules.poke : BOOST_BUILD_PATH : $(caller-location:D) $(x) ; + toolset.using $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : + $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) + : $(18) : $(19) ; + modules.poke : BOOST_BUILD_PATH : $(x) ; + + # The above might have clobbered .current-project in case it caused a + # new project instance to be created (which would then automatically + # get set as the 'current' project). Restore the correct value so any + # main targets declared after this do not get mapped to the loaded + # module's project. + modules.poke project : .current-project : $(saved-project) ; + } + + rule import ( * : * : * ) + { + local caller = [ CALLER_MODULE ] ; + local saved-project = [ modules.peek project : .current-project ] ; + module $(caller) + { + modules.import $(1) : $(2) : $(3) ; + } + + # The above might have clobbered .current-project in case it caused a + # new project instance to be created (which would then automatically + # get set as the 'current' project). Restore the correct value so any + # main targets declared after this do not get mapped to the loaded + # module's project. + modules.poke project : .current-project : $(saved-project) ; + } + + rule project ( id ? : options * : * ) + { + import path ; + import project ; + + local caller = [ CALLER_MODULE ] ; + local attributes = [ project.attributes $(caller) ] ; + if $(id) + { + $(attributes).set id : $(id) ; + } + + local explicit-build-dir ; + + for n in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + { + local option = $($(n)) ; + if $(option) + { + $(attributes).set $(option[1]) : $(option[2-]) ; + } + if $(option[1]) = "build-dir" + { + explicit-build-dir = [ path.make $(option[2-]) ] ; + } + } + + # If '--build-dir' is specified, change the build dir for the project. + local global-build-dir = [ modules.peek project : .global-build-dir ] ; + + if $(global-build-dir) + { + local location = [ $(attributes).get location ] ; + # Project with an empty location is a 'standalone' project such as + # user-config or qt. It has no build dir. If we try to set build dir + # for user-config, we shall then try to inherit it, with either + # weird or wrong consequences. + if $(location) && $(location) = [ $(attributes).get project-root ] + { + # Re-read the project id, since it might have been modified a + # bit when setting the project's id attribute, e.g. might have + # been prefixed by a slash if it was not already. + id = [ $(attributes).get id ] ; + # This is Jamroot. + if $(id) + { + if $(explicit-build-dir) && + [ path.is-rooted $(explicit-build-dir) ] + { + import errors ; + errors.user-error Absolute directory specified via + 'build-dir' project attribute : Do not know how to + combine that with the --build-dir option. ; + } + # Strip the leading slash from id. + local rid = [ MATCH ^/(.*) : $(id) ] ; + local p = [ path.join $(global-build-dir) $(rid) + $(explicit-build-dir) ] ; + + $(attributes).set build-dir : $(p) : exact ; + } + } + else + { + # Not Jamroot. + if $(explicit-build-dir) + { + import errors ; + errors.user-error When --build-dir is specified, the + 'build-dir' project : attribute is allowed only for + top-level 'project' invocations ; + } + } + } + } + + # Declare and set a project global constant. Project global constants are + # normal variables but should not be changed. They are applied to every + # child Jamfile. + # + rule constant ( name : value + ) + { + import project ; + local caller = [ CALLER_MODULE ] ; + local p = [ project.target $(caller) ] ; + $(p).add-constant $(name) : $(value) ; + } + + # Declare and set a project global constant, whose value is a path. The path + # is adjusted to be relative to the invocation directory. The given value + # path is taken to be either absolute, or relative to this project root. + # + rule path-constant ( name : value + ) + { + import project ; + local caller = [ CALLER_MODULE ] ; + local p = [ project.target $(caller) ] ; + $(p).add-constant $(name) : $(value) : path ; + } + + rule use-project ( id : where ) + { + # See comment in 'load' for explanation. + local caller = [ CALLER_MODULE ] ; + modules.poke $(caller) : .used-projects : [ modules.peek $(caller) : + .used-projects ] $(id) $(where) ; + } + + rule build-project ( dir ) + { + import project ; + local caller = [ CALLER_MODULE ] ; + local attributes = [ project.attributes $(caller) ] ; + local now = [ $(attributes).get projects-to-build ] ; + $(attributes).set projects-to-build : $(now) $(dir) ; + } + + rule explicit ( target-names * ) + { + import project ; + # If 'explicit' is used in a helper rule defined in Jamroot and + # inherited by children, then most of the time we want 'explicit' to + # operate on the Jamfile where the helper rule is invoked. + local t = [ project.current ] ; + for local n in $(target-names) + { + $(t).mark-target-as-explicit $(n) ; + } + } + + rule always ( target-names * ) + { + import project ; + local t = [ project.current ] ; + for local n in $(target-names) + { + $(t).mark-target-as-always $(n) ; + } + } + + rule glob ( wildcards + : excludes * ) + { + import project ; + return [ project.glob-internal [ project.current ] : $(wildcards) : + $(excludes) : glob ] ; + } + + rule glob-tree ( wildcards + : excludes * ) + { + import project ; + if $(wildcards:D) || $(excludes:D) + { + import errors ; + errors.user-error The patterns to 'glob-tree' may not include + directory ; + } + return [ project.glob-internal [ project.current ] : $(wildcards) : + $(excludes) : glob-tree ] ; + } + + rule glob-ex ( paths + : wildcards + : excludes * ) + { + import project ; + return [ project.glob-internal-ex [ project.current ] + : $(paths) : $(wildcards) : $(excludes) : glob ] ; + } + + rule glob-tree-ex ( paths + : wildcards + : excludes * ) + { + import project ; + return [ project.glob-internal-ex [ project.current ] + : $(paths) : $(wildcards) : $(excludes) : glob-tree ] ; + } + + # Calculates conditional requirements for multiple requirements at once. + # This is a shorthand to reduce duplication and to keep an inline + # declarative syntax. For example: + # + # lib x : x.cpp : [ conditional <toolset>gcc <variant>debug : + # <define>DEBUG_EXCEPTION <define>DEBUG_TRACE ] ; + # + rule conditional ( condition + : requirements * ) + { + local condition = $(condition:J=,) ; + if [ MATCH "(:)" : $(condition) ] + { + return $(condition)$(requirements) ; + } + else + { + return "$(condition):$(requirements)" ; + } + } + + rule option ( name : value ) + { + local m = [ CALLER_MODULE ] ; + local cfgs = project site test user ; + if ! $(m) in $(cfgs)-config + { + import errors ; + errors.error The 'option' rule may only be used "in" Boost Build + configuration files. ; + } + import option ; + option.set $(name) : $(value) ; + } + + # This allows one to manually import a package manager build information file. + # The argument can be either a symbolic name of a supported package manager or + # the a glob pattern to load a b2 jam file. + # + rule use-packages ( name-or-glob-pattern ? ) + { + local m = [ CALLER_MODULE ] ; + local glob-pattern = $(name-or-glob-pattern) ; + local glob-for-name = [ modules.peek project : PACKAGE_MANAGER_BUILD_INFO($(name-or-glob-pattern:U)) ] ; + if $(glob-for-name) + { + glob-pattern = $(glob-for-name) ; + } + modules.call-in $(m) : constant PACKAGE_MANAGER_BUILD_INFO : $(glob-pattern) ; + IMPORT project : load-package-manager-build-info : $(m) : project.load-package-manager-build-info ; + modules.call-in $(m) : project.load-package-manager-build-info ; + } +} diff --git a/src/boost/tools/build/src/build/project.py b/src/boost/tools/build/src/build/project.py new file mode 100644 index 000000000..0a80c93b9 --- /dev/null +++ b/src/boost/tools/build/src/build/project.py @@ -0,0 +1,1285 @@ +# Status: ported. +# Base revision: 64488 + +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2005, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Implements project representation and loading. Each project is represented +# by: +# - a module where all the Jamfile content live. +# - an instance of 'project-attributes' class. +# (given a module name, can be obtained using the 'attributes' rule) +# - an instance of 'project-target' class (from targets.jam) +# (given a module name, can be obtained using the 'target' rule) +# +# Typically, projects are created as result of loading a Jamfile, which is done +# by rules 'load' and 'initialize', below. First, module for Jamfile is loaded +# and new project-attributes instance is created. Some rules necessary for +# project are added to the module (see 'project-rules' module) at the bottom of +# this file. Default project attributes are set (inheriting attributes of +# parent project, if it exists). After that the Jamfile is read. It can declare +# its own attributes using the 'project' rule which will be combined with any +# already set attributes. +# +# The 'project' rule can also declare a project id which will be associated +# with the project module. +# +# There can also be 'standalone' projects. They are created by calling +# 'initialize' on an arbitrary module and not specifying their location. After +# the call, the module can call the 'project' rule, declare main targets and +# behave as a regular project except that, since it is not associated with any +# location, it should only declare prebuilt targets. +# +# The list of all loaded Jamfiles is stored in the .project-locations variable. +# It is possible to obtain a module name for a location using the 'module-name' +# rule. Standalone projects are not recorded and can only be references using +# their project id. + +import b2.util.path +import b2.build.targets +from b2.build import property_set, property +from b2.build.errors import ExceptionWithUserContext +from b2.manager import get_manager + +import bjam +import b2 + +import re +import sys +import pkgutil +import os +import string +import imp +import traceback +import b2.util.option as option + +from b2.util import ( + record_jam_to_value_mapping, qualify_jam_action, is_iterable_typed, bjam_signature, + is_iterable) + + +class ProjectRegistry: + + def __init__(self, manager, global_build_dir): + self.manager = manager + self.global_build_dir = global_build_dir + self.project_rules_ = ProjectRules(self) + + # The target corresponding to the project being loaded now + self.current_project = None + + # The set of names of loaded project modules + self.jamfile_modules = {} + + # Mapping from location to module name + self.location2module = {} + + # Mapping from project id to project module + self.id2module = {} + + # Map from Jamfile directory to parent Jamfile/Jamroot + # location. + self.dir2parent_jamfile = {} + + # Map from directory to the name of Jamfile in + # that directory (or None). + self.dir2jamfile = {} + + # Map from project module to attributes object. + self.module2attributes = {} + + # Map from project module to target for the project + self.module2target = {} + + # Map from names to Python modules, for modules loaded + # via 'using' and 'import' rules in Jamfiles. + self.loaded_tool_modules_ = {} + + self.loaded_tool_module_path_ = {} + + # Map from project target to the list of + # (id,location) pairs corresponding to all 'use-project' + # invocations. + # TODO: should not have a global map, keep this + # in ProjectTarget. + self.used_projects = {} + + self.saved_current_project = [] + + self.JAMROOT = self.manager.getenv("JAMROOT"); + + # Note the use of character groups, as opposed to listing + # 'Jamroot' and 'jamroot'. With the latter, we'd get duplicate + # matches on windows and would have to eliminate duplicates. + if not self.JAMROOT: + self.JAMROOT = ["project-root.jam", "[Jj]amroot", "[Jj]amroot.jam"] + + # Default patterns to search for the Jamfiles to use for build + # declarations. + self.JAMFILE = self.manager.getenv("JAMFILE") + + if not self.JAMFILE: + self.JAMFILE = ["[Bb]uild.jam", "[Jj]amfile.v2", "[Jj]amfile", + "[Jj]amfile.jam"] + + self.__python_module_cache = {} + + + def load (self, jamfile_location): + """Loads jamfile at the given location. After loading, project global + file and jamfile needed by the loaded one will be loaded recursively. + If the jamfile at that location is loaded already, does nothing. + Returns the project module for the Jamfile.""" + assert isinstance(jamfile_location, basestring) + + absolute = os.path.join(os.getcwd(), jamfile_location) + absolute = os.path.normpath(absolute) + jamfile_location = b2.util.path.relpath(os.getcwd(), absolute) + + mname = self.module_name(jamfile_location) + # If Jamfile is already loaded, do not try again. + if not mname in self.jamfile_modules: + + if "--debug-loading" in self.manager.argv(): + print "Loading Jamfile at '%s'" % jamfile_location + + self.load_jamfile(jamfile_location, mname) + + # We want to make sure that child project are loaded only + # after parent projects. In particular, because parent projects + # define attributes which are inherited by children, and we do not + # want children to be loaded before parents has defined everything. + # + # While "build-project" and "use-project" can potentially refer + # to child projects from parent projects, we do not immediately + # load child projects when seeing those attributes. Instead, + # we record the minimal information that will be used only later. + + self.load_used_projects(mname) + + return mname + + def load_used_projects(self, module_name): + assert isinstance(module_name, basestring) + # local used = [ modules.peek $(module-name) : .used-projects ] ; + used = self.used_projects[module_name] + + location = self.attribute(module_name, "location") + for u in used: + id = u[0] + where = u[1] + + self.use(id, os.path.join(location, where)) + + def load_parent(self, location): + """Loads parent of Jamfile at 'location'. + Issues an error if nothing is found.""" + assert isinstance(location, basestring) + found = b2.util.path.glob_in_parents( + location, self.JAMROOT + self.JAMFILE) + + if not found: + print "error: Could not find parent for project at '%s'" % location + print "error: Did not find Jamfile.jam or Jamroot.jam in any parent directory." + sys.exit(1) + + return self.load(os.path.dirname(found[0])) + + def find(self, name, current_location): + """Given 'name' which can be project-id or plain directory name, + return project module corresponding to that id or directory. + Returns nothing of project is not found.""" + assert isinstance(name, basestring) + assert isinstance(current_location, basestring) + + project_module = None + + # Try interpreting name as project id. + if name[0] == '/': + project_module = self.id2module.get(name) + + if not project_module: + location = os.path.join(current_location, name) + # If no project is registered for the given location, try to + # load it. First see if we have Jamfile. If not we might have project + # root, willing to act as Jamfile. In that case, project-root + # must be placed in the directory referred by id. + + project_module = self.module_name(location) + if not project_module in self.jamfile_modules: + if b2.util.path.glob([location], self.JAMROOT + self.JAMFILE): + project_module = self.load(location) + else: + project_module = None + + return project_module + + def module_name(self, jamfile_location): + """Returns the name of module corresponding to 'jamfile-location'. + If no module corresponds to location yet, associates default + module name with that location.""" + assert isinstance(jamfile_location, basestring) + module = self.location2module.get(jamfile_location) + if not module: + # Root the path, so that locations are always umbiguious. + # Without this, we can't decide if '../../exe/program1' and '.' + # are the same paths, or not. + jamfile_location = os.path.realpath( + os.path.join(os.getcwd(), jamfile_location)) + module = "Jamfile<%s>" % jamfile_location + self.location2module[jamfile_location] = module + return module + + def find_jamfile (self, dir, parent_root=0, no_errors=0): + """Find the Jamfile at the given location. This returns the + exact names of all the Jamfiles in the given directory. The optional + parent-root argument causes this to search not the given directory + but the ones above it up to the directory given in it.""" + assert isinstance(dir, basestring) + assert isinstance(parent_root, (int, bool)) + assert isinstance(no_errors, (int, bool)) + + # Glob for all the possible Jamfiles according to the match pattern. + # + jamfile_glob = None + if parent_root: + parent = self.dir2parent_jamfile.get(dir) + if not parent: + parent = b2.util.path.glob_in_parents(dir, + self.JAMFILE) + self.dir2parent_jamfile[dir] = parent + jamfile_glob = parent + else: + jamfile = self.dir2jamfile.get(dir) + if not jamfile: + jamfile = b2.util.path.glob([dir], self.JAMFILE) + self.dir2jamfile[dir] = jamfile + jamfile_glob = jamfile + + if len(jamfile_glob) > 1: + # Multiple Jamfiles found in the same place. Warn about this. + # And ensure we use only one of them. + # As a temporary convenience measure, if there's Jamfile.v2 amount + # found files, suppress the warning and use it. + # + pattern = "(.*[Jj]amfile\\.v2)|(.*[Bb]uild\\.jam)" + v2_jamfiles = [x for x in jamfile_glob if re.match(pattern, x)] + if len(v2_jamfiles) == 1: + jamfile_glob = v2_jamfiles + else: + print """warning: Found multiple Jamfiles at '%s'!""" % (dir) + for j in jamfile_glob: + print " -", j + print "Loading the first one" + + # Could not find it, error. + if not no_errors and not jamfile_glob: + self.manager.errors()( + """Unable to load Jamfile. +Could not find a Jamfile in directory '%s' +Attempted to find it with pattern '%s'. +Please consult the documentation at 'https://www.bfgroup.xyz/b2/'.""" + % (dir, string.join(self.JAMFILE))) + + if jamfile_glob: + return jamfile_glob[0] + + def load_jamfile(self, dir, jamfile_module): + """Load a Jamfile at the given directory. Returns nothing. + Will attempt to load the file as indicated by the JAMFILE patterns. + Effect of calling this rule twice with the same 'dir' is underfined.""" + assert isinstance(dir, basestring) + assert isinstance(jamfile_module, basestring) + + # See if the Jamfile is where it should be. + is_jamroot = False + jamfile_to_load = b2.util.path.glob([dir], self.JAMROOT) + if jamfile_to_load: + if len(jamfile_to_load) > 1: + get_manager().errors()( + "Multiple Jamfiles found at '{}'\n" + "Filenames are: {}" + .format(dir, ' '.join(os.path.basename(j) for j in jamfile_to_load)) + ) + is_jamroot = True + jamfile_to_load = jamfile_to_load[0] + else: + jamfile_to_load = self.find_jamfile(dir) + + dir = os.path.dirname(jamfile_to_load) + if not dir: + dir = "." + + self.used_projects[jamfile_module] = [] + + # Now load the Jamfile in it's own context. + # The call to 'initialize' may load parent Jamfile, which might have + # 'use-project' statement that causes a second attempt to load the + # same project we're loading now. Checking inside .jamfile-modules + # prevents that second attempt from messing up. + if not jamfile_module in self.jamfile_modules: + previous_project = self.current_project + # Initialize the jamfile module before loading. + self.initialize(jamfile_module, dir, os.path.basename(jamfile_to_load)) + + if not jamfile_module in self.jamfile_modules: + saved_project = self.current_project + self.jamfile_modules[jamfile_module] = True + + bjam.call("load", jamfile_module, jamfile_to_load) + + if is_jamroot: + jamfile = self.find_jamfile(dir, no_errors=True) + if jamfile: + bjam.call("load", jamfile_module, jamfile) + + # Now do some checks + if self.current_project != saved_project: + from textwrap import dedent + self.manager.errors()(dedent( + """ + The value of the .current-project variable has magically changed + after loading a Jamfile. This means some of the targets might be + defined a the wrong project. + after loading %s + expected value %s + actual value %s + """ + % (jamfile_module, saved_project, self.current_project) + )) + + self.end_load(previous_project) + + if self.global_build_dir: + id = self.attributeDefault(jamfile_module, "id", None) + project_root = self.attribute(jamfile_module, "project-root") + location = self.attribute(jamfile_module, "location") + + if location and project_root == dir: + # This is Jamroot + if not id: + # FIXME: go via errors module, so that contexts are + # shown? + print "warning: the --build-dir option was specified" + print "warning: but Jamroot at '%s'" % dir + print "warning: specified no project id" + print "warning: the --build-dir option will be ignored" + + def end_load(self, previous_project=None): + if not self.current_project: + self.manager.errors()( + 'Ending project loading requested when there was no project currently ' + 'being loaded.' + ) + + if not previous_project and self.saved_current_project: + self.manager.errors()( + 'Ending project loading requested with no "previous project" when there ' + 'other projects still being loaded recursively.' + ) + + self.current_project = previous_project + + def load_standalone(self, jamfile_module, file): + """Loads 'file' as standalone project that has no location + associated with it. This is mostly useful for user-config.jam, + which should be able to define targets, but although it has + some location in filesystem, we do not want any build to + happen in user's HOME, for example. + + The caller is required to never call this method twice on + the same file. + """ + assert isinstance(jamfile_module, basestring) + assert isinstance(file, basestring) + + self.used_projects[jamfile_module] = [] + bjam.call("load", jamfile_module, file) + self.load_used_projects(jamfile_module) + + def is_jamroot(self, basename): + assert isinstance(basename, basestring) + match = [ pat for pat in self.JAMROOT if re.match(pat, basename)] + if match: + return 1 + else: + return 0 + + def initialize(self, module_name, location=None, basename=None, standalone_path=''): + """Initialize the module for a project. + + module-name is the name of the project module. + location is the location (directory) of the project to initialize. + If not specified, standalone project will be initialized + standalone_path is the path to the source-location. + this should only be called from the python side. + """ + assert isinstance(module_name, basestring) + assert isinstance(location, basestring) or location is None + assert isinstance(basename, basestring) or basename is None + jamroot = False + parent_module = None + if module_name == "test-config": + # No parent + pass + elif module_name == "site-config": + parent_module = "test-config" + elif module_name == "user-config": + parent_module = "site-config" + elif module_name == "project-config": + parent_module = "user-config" + elif location and not self.is_jamroot(basename): + # We search for parent/project-root only if jamfile was specified + # --- i.e + # if the project is not standalone. + parent_module = self.load_parent(location) + elif location: + # It's either jamroot, or standalone project. + # If it's jamroot, inherit from user-config. + # If project-config module exist, inherit from it. + parent_module = 'user-config' + if 'project-config' in self.module2attributes: + parent_module = 'project-config' + jamroot = True + + # TODO: need to consider if standalone projects can do anything but defining + # prebuilt targets. If so, we need to give more sensible "location", so that + # source paths are correct. + if not location: + location = "" + + # the call to load_parent() above can end up loading this module again + # make sure we don't reinitialize the module's attributes + if module_name not in self.module2attributes: + if "--debug-loading" in self.manager.argv(): + print "Initializing project '%s'" % module_name + attributes = ProjectAttributes(self.manager, location, module_name) + self.module2attributes[module_name] = attributes + + python_standalone = False + if location: + attributes.set("source-location", [location], exact=1) + elif not module_name in ["test-config", "site-config", "user-config", "project-config"]: + # This is a standalone project with known location. Set source location + # so that it can declare targets. This is intended so that you can put + # a .jam file in your sources and use it via 'using'. Standard modules + # (in 'tools' subdir) may not assume source dir is set. + source_location = standalone_path + if not source_location: + source_location = self.loaded_tool_module_path_.get(module_name) + if not source_location: + self.manager.errors()('Standalone module path not found for "{}"' + .format(module_name)) + attributes.set("source-location", [source_location], exact=1) + python_standalone = True + + attributes.set("requirements", property_set.empty(), exact=True) + attributes.set("usage-requirements", property_set.empty(), exact=True) + attributes.set("default-build", property_set.empty(), exact=True) + attributes.set("projects-to-build", [], exact=True) + attributes.set("project-root", None, exact=True) + attributes.set("build-dir", None, exact=True) + + self.project_rules_.init_project(module_name, python_standalone) + + if parent_module: + self.inherit_attributes(module_name, parent_module) + attributes.set("parent-module", parent_module, exact=1) + + if jamroot: + attributes.set("project-root", location, exact=1) + + parent = None + if parent_module: + parent = self.target(parent_module) + + if module_name not in self.module2target: + target = b2.build.targets.ProjectTarget(self.manager, + module_name, module_name, parent, + self.attribute(module_name, "requirements"), + # FIXME: why we need to pass this? It's not + # passed in jam code. + self.attribute(module_name, "default-build")) + self.module2target[module_name] = target + + self.current_project = self.target(module_name) + + def inherit_attributes(self, project_module, parent_module): + """Make 'project-module' inherit attributes of project + root and parent module.""" + assert isinstance(project_module, basestring) + assert isinstance(parent_module, basestring) + + attributes = self.module2attributes[project_module] + pattributes = self.module2attributes[parent_module] + + # Parent module might be locationless user-config. + # FIXME: + #if [ modules.binding $(parent-module) ] + #{ + # $(attributes).set parent : [ path.parent + # [ path.make [ modules.binding $(parent-module) ] ] ] ; + # } + + attributes.set("project-root", pattributes.get("project-root"), exact=True) + attributes.set("default-build", pattributes.get("default-build"), exact=True) + attributes.set("requirements", pattributes.get("requirements"), exact=True) + attributes.set("usage-requirements", + pattributes.get("usage-requirements"), exact=1) + + parent_build_dir = pattributes.get("build-dir") + + if parent_build_dir: + # Have to compute relative path from parent dir to our dir + # Convert both paths to absolute, since we cannot + # find relative path from ".." to "." + + location = attributes.get("location") + parent_location = pattributes.get("location") + + our_dir = os.path.join(os.getcwd(), location) + parent_dir = os.path.join(os.getcwd(), parent_location) + + build_dir = os.path.join(parent_build_dir, + os.path.relpath(our_dir, parent_dir)) + attributes.set("build-dir", build_dir, exact=True) + + def register_id(self, id, module): + """Associate the given id with the given project module.""" + assert isinstance(id, basestring) + assert isinstance(module, basestring) + self.id2module[id] = module + + def current(self): + """Returns the project which is currently being loaded.""" + if not self.current_project: + get_manager().errors()( + 'Reference to the project currently being loaded requested ' + 'when there was no project module being loaded.' + ) + return self.current_project + + def set_current(self, c): + if __debug__: + from .targets import ProjectTarget + assert isinstance(c, ProjectTarget) + self.current_project = c + + def push_current(self, project): + """Temporary changes the current project to 'project'. Should + be followed by 'pop-current'.""" + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + self.saved_current_project.append(self.current_project) + self.current_project = project + + def pop_current(self): + if self.saved_current_project: + self.current_project = self.saved_current_project.pop() + else: + self.current_project = None + + def attributes(self, project): + """Returns the project-attribute instance for the + specified jamfile module.""" + assert isinstance(project, basestring) + return self.module2attributes[project] + + def attribute(self, project, attribute): + """Returns the value of the specified attribute in the + specified jamfile module.""" + assert isinstance(project, basestring) + assert isinstance(attribute, basestring) + try: + return self.module2attributes[project].get(attribute) + except: + raise BaseException("No attribute '%s' for project %s" % (attribute, project)) + + def attributeDefault(self, project, attribute, default): + """Returns the value of the specified attribute in the + specified jamfile module.""" + assert isinstance(project, basestring) + assert isinstance(attribute, basestring) + assert isinstance(default, basestring) or default is None + return self.module2attributes[project].getDefault(attribute, default) + + def target(self, project_module): + """Returns the project target corresponding to the 'project-module'.""" + assert isinstance(project_module, basestring) + if project_module not in self.module2target: + self.module2target[project_module] = \ + b2.build.targets.ProjectTarget(project_module, project_module, + self.attribute(project_module, "requirements")) + + return self.module2target[project_module] + + def use(self, id, location): + # Use/load a project. + assert isinstance(id, basestring) + assert isinstance(location, basestring) + saved_project = self.current_project + project_module = self.load(location) + declared_id = self.attributeDefault(project_module, "id", "") + + if not declared_id or declared_id != id: + # The project at 'location' either have no id or + # that id is not equal to the 'id' parameter. + if id in self.id2module and self.id2module[id] != project_module: + self.manager.errors()( +"""Attempt to redeclare already existing project id '%s' at location '%s'""" % (id, location)) + self.id2module[id] = project_module + + self.current_project = saved_project + + def add_rule(self, name, callable_): + """Makes rule 'name' available to all subsequently loaded Jamfiles. + + Calling that rule will relay to 'callable'.""" + assert isinstance(name, basestring) + assert callable(callable_) + self.project_rules_.add_rule(name, callable_) + + def project_rules(self): + return self.project_rules_ + + def glob_internal(self, project, wildcards, excludes, rule_name): + if __debug__: + from .targets import ProjectTarget + assert isinstance(project, ProjectTarget) + assert is_iterable_typed(wildcards, basestring) + assert is_iterable_typed(excludes, basestring) or excludes is None + assert isinstance(rule_name, basestring) + location = project.get("source-location")[0] + + result = [] + callable = b2.util.path.__dict__[rule_name] + + paths = callable([location], wildcards, excludes) + has_dir = 0 + for w in wildcards: + if os.path.dirname(w): + has_dir = 1 + break + + if has_dir or rule_name != "glob": + result = [] + # The paths we've found are relative to current directory, + # but the names specified in sources list are assumed to + # be relative to source directory of the corresponding + # prject. Either translate them or make absolute. + + for p in paths: + rel = os.path.relpath(p, location) + # If the path is below source location, use relative path. + if not ".." in rel: + result.append(rel) + else: + # Otherwise, use full path just to avoid any ambiguities. + result.append(os.path.abspath(p)) + + else: + # There were not directory in wildcard, so the files are all + # in the source directory of the project. Just drop the + # directory, instead of making paths absolute. + result = [os.path.basename(p) for p in paths] + + return result + + def __build_python_module_cache(self): + """Recursively walks through the b2/src subdirectories and + creates an index of base module name to package name. The + index is stored within self.__python_module_cache and allows + for an O(1) module lookup. + + For example, given the base module name `toolset`, + self.__python_module_cache['toolset'] will return + 'b2.build.toolset' + + pkgutil.walk_packages() will find any python package + provided a directory contains an __init__.py. This has the + added benefit of allowing libraries to be installed and + automatically available within the contrib directory. + + *Note*: pkgutil.walk_packages() will import any subpackage + in order to access its __path__variable. Meaning: + any initialization code will be run if the package hasn't + already been imported. + """ + cache = {} + for importer, mname, ispkg in pkgutil.walk_packages(b2.__path__, prefix='b2.'): + basename = mname.split('.')[-1] + # since the jam code is only going to have "import toolset ;" + # it doesn't matter if there are separately named "b2.build.toolset" and + # "b2.contrib.toolset" as it is impossible to know which the user is + # referring to. + if basename in cache: + self.manager.errors()('duplicate module name "{0}" ' + 'found in boost-build path'.format(basename)) + cache[basename] = mname + self.__python_module_cache = cache + + def load_module(self, name, extra_path=None): + """Load a Python module that should be usable from Jamfiles. + + There are generally two types of modules Jamfiles might want to + use: + - Core Boost.Build. Those are imported using plain names, e.g. + 'toolset', so this function checks if we have module named + b2.package.module already. + - Python modules in the same directory as Jamfile. We don't + want to even temporary add Jamfile's directory to sys.path, + since then we might get naming conflicts between standard + Python modules and those. + """ + assert isinstance(name, basestring) + assert is_iterable_typed(extra_path, basestring) or extra_path is None + # See if we loaded module of this name already + existing = self.loaded_tool_modules_.get(name) + if existing: + return existing + + # check the extra path as well as any paths outside + # of the b2 package and import the module if it exists + b2_path = os.path.normpath(b2.__path__[0]) + # normalize the pathing in the BOOST_BUILD_PATH. + # this allows for using startswith() to determine + # if a path is a subdirectory of the b2 root_path + paths = [os.path.normpath(p) for p in self.manager.boost_build_path()] + # remove all paths that start with b2's root_path + paths = [p for p in paths if not p.startswith(b2_path)] + # add any extra paths + paths.extend(extra_path) + + try: + # find_module is used so that the pyc's can be used. + # an ImportError is raised if not found + f, location, description = imp.find_module(name, paths) + except ImportError: + # if the module is not found in the b2 package, + # this error will be handled later + pass + else: + # we've found the module, now let's try loading it. + # it's possible that the module itself contains an ImportError + # which is why we're loading it in this else clause so that the + # proper error message is shown to the end user. + # TODO: does this module name really need to be mangled like this? + mname = name + "__for_jamfile" + self.loaded_tool_module_path_[mname] = location + module = imp.load_module(mname, f, location, description) + self.loaded_tool_modules_[name] = module + return module + + # the cache is created here due to possibly importing packages + # that end up calling get_manager() which might fail + if not self.__python_module_cache: + self.__build_python_module_cache() + + underscore_name = name.replace('-', '_') + # check to see if the module is within the b2 package + # and already loaded + mname = self.__python_module_cache.get(underscore_name) + if mname in sys.modules: + return sys.modules[mname] + # otherwise, if the module name is within the cache, + # the module exists within the BOOST_BUILD_PATH, + # load it. + elif mname: + # in some cases, self.loaded_tool_module_path_ needs to + # have the path to the file during the import + # (project.initialize() for example), + # so the path needs to be set *before* importing the module. + path = os.path.join(b2.__path__[0], *mname.split('.')[1:]) + self.loaded_tool_module_path_[mname] = path + # mname is guaranteed to be importable since it was + # found within the cache + __import__(mname) + module = sys.modules[mname] + self.loaded_tool_modules_[name] = module + return module + + self.manager.errors()("Cannot find module '%s'" % name) + + + +# FIXME: +# Defines a Boost.Build extension project. Such extensions usually +# contain library targets and features that can be used by many people. +# Even though extensions are really projects, they can be initialize as +# a module would be with the "using" (project.project-rules.using) +# mechanism. +#rule extension ( id : options * : * ) +#{ +# # The caller is a standalone module for the extension. +# local mod = [ CALLER_MODULE ] ; +# +# # We need to do the rest within the extension module. +# module $(mod) +# { +# import path ; +# +# # Find the root project. +# local root-project = [ project.current ] ; +# root-project = [ $(root-project).project-module ] ; +# while +# [ project.attribute $(root-project) parent-module ] && +# [ project.attribute $(root-project) parent-module ] != user-config +# { +# root-project = [ project.attribute $(root-project) parent-module ] ; +# } +# +# # Create the project data, and bring in the project rules +# # into the module. +# project.initialize $(__name__) : +# [ path.join [ project.attribute $(root-project) location ] ext $(1:L) ] ; +# +# # Create the project itself, i.e. the attributes. +# # All extensions are created in the "/ext" project space. +# project /ext/$(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; +# local attributes = [ project.attributes $(__name__) ] ; +# +# # Inherit from the root project of whomever is defining us. +# project.inherit-attributes $(__name__) : $(root-project) ; +# $(attributes).set parent-module : $(root-project) : exact ; +# } +#} + + +class ProjectAttributes: + """Class keeping all the attributes of a project. + + The standard attributes are 'id', "location", "project-root", "parent" + "requirements", "default-build", "source-location" and "projects-to-build". + """ + + def __init__(self, manager, location, project_module): + self.manager = manager + self.location = location + self.project_module = project_module + self.attributes = {} + self.usage_requirements = None + + def set(self, attribute, specification, exact=False): + """Set the named attribute from the specification given by the user. + The value actually set may be different.""" + assert isinstance(attribute, basestring) + assert isinstance(exact, (int, bool)) + if __debug__ and not exact: + if attribute == 'requirements': + assert (isinstance(specification, property_set.PropertySet) + or all(isinstance(s, basestring) for s in specification)) + elif attribute in ( + 'usage-requirements', 'default-build', 'source-location', 'build-dir', 'id'): + assert is_iterable_typed(specification, basestring) + elif __debug__: + assert ( + isinstance(specification, (property_set.PropertySet, type(None), basestring)) + or all(isinstance(s, basestring) for s in specification) + ) + if exact: + self.__dict__[attribute] = specification + + elif attribute == "requirements": + self.requirements = property_set.refine_from_user_input( + self.requirements, specification, + self.project_module, self.location) + + elif attribute == "usage-requirements": + unconditional = [] + for p in specification: + split = property.split_conditional(p) + if split: + unconditional.append(split[1]) + else: + unconditional.append(p) + + non_free = property.remove("free", unconditional) + if non_free: + get_manager().errors()("usage-requirements %s have non-free properties %s" \ + % (specification, non_free)) + + t = property.translate_paths( + property.create_from_strings(specification, allow_condition=True), + self.location) + + existing = self.__dict__.get("usage-requirements") + if existing: + new = property_set.create(existing.all() + t) + else: + new = property_set.create(t) + self.__dict__["usage-requirements"] = new + + + elif attribute == "default-build": + self.__dict__["default-build"] = property_set.create(specification) + + elif attribute == "source-location": + source_location = [] + for path in specification: + source_location.append(os.path.join(self.location, path)) + self.__dict__["source-location"] = source_location + + elif attribute == "build-dir": + self.__dict__["build-dir"] = os.path.join(self.location, specification[0]) + + elif attribute == "id": + id = specification[0] + if id[0] != '/': + id = "/" + id + self.manager.projects().register_id(id, self.project_module) + self.__dict__["id"] = id + + elif not attribute in ["default-build", "location", + "source-location", "parent", + "projects-to-build", "project-root"]: + self.manager.errors()( +"""Invalid project attribute '%s' specified +for project at '%s'""" % (attribute, self.location)) + else: + self.__dict__[attribute] = specification + + def get(self, attribute): + assert isinstance(attribute, basestring) + return self.__dict__[attribute] + + def getDefault(self, attribute, default): + assert isinstance(attribute, basestring) + return self.__dict__.get(attribute, default) + + def dump(self): + """Prints the project attributes.""" + id = self.get("id") + if not id: + id = "(none)" + else: + id = id[0] + + parent = self.get("parent") + if not parent: + parent = "(none)" + else: + parent = parent[0] + + print "'%s'" % id + print "Parent project:%s", parent + print "Requirements:%s", self.get("requirements") + print "Default build:%s", string.join(self.get("debuild-build")) + print "Source location:%s", string.join(self.get("source-location")) + print "Projects to build:%s", string.join(self.get("projects-to-build").sort()); + +class ProjectRules: + """Class keeping all rules that are made available to Jamfile.""" + + def __init__(self, registry): + self.registry = registry + self.manager_ = registry.manager + self.rules = {} + self.local_names = [x for x in self.__class__.__dict__ + if x not in ["__init__", "init_project", "add_rule", + "error_reporting_wrapper", "add_rule_for_type", "reverse"]] + self.all_names_ = [x for x in self.local_names] + + def _import_rule(self, bjam_module, name, callable_): + assert isinstance(bjam_module, basestring) + assert isinstance(name, basestring) + assert callable(callable_) + if hasattr(callable_, "bjam_signature"): + bjam.import_rule(bjam_module, name, self.make_wrapper(callable_), callable_.bjam_signature) + else: + bjam.import_rule(bjam_module, name, self.make_wrapper(callable_)) + + + def add_rule_for_type(self, type): + assert isinstance(type, basestring) + rule_name = type.lower().replace("_", "-") + + @bjam_signature([['name'], ['sources', '*'], ['requirements', '*'], + ['default_build', '*'], ['usage_requirements', '*']]) + def xpto (name, sources=[], requirements=[], default_build=[], usage_requirements=[]): + + return self.manager_.targets().create_typed_target( + type, self.registry.current(), name, sources, + requirements, default_build, usage_requirements) + + self.add_rule(rule_name, xpto) + + def add_rule(self, name, callable_): + assert isinstance(name, basestring) + assert callable(callable_) + self.rules[name] = callable_ + self.all_names_.append(name) + + # Add new rule at global bjam scope. This might not be ideal, + # added because if a jamroot does 'import foo' where foo calls + # add_rule, we need to import new rule to jamroot scope, and + # I'm lazy to do this now. + self._import_rule("", name, callable_) + + def all_names(self): + return self.all_names_ + + def call_and_report_errors(self, callable_, *args, **kw): + assert callable(callable_) + result = None + try: + self.manager_.errors().push_jamfile_context() + result = callable_(*args, **kw) + except ExceptionWithUserContext, e: + e.report() + except Exception, e: + try: + self.manager_.errors().handle_stray_exception (e) + except ExceptionWithUserContext, e: + e.report() + finally: + self.manager_.errors().pop_jamfile_context() + + return result + + def make_wrapper(self, callable_): + """Given a free-standing function 'callable', return a new + callable that will call 'callable' and report all exceptins, + using 'call_and_report_errors'.""" + assert callable(callable_) + def wrapper(*args, **kw): + return self.call_and_report_errors(callable_, *args, **kw) + return wrapper + + def init_project(self, project_module, python_standalone=False): + assert isinstance(project_module, basestring) + assert isinstance(python_standalone, bool) + if python_standalone: + m = sys.modules[project_module] + + for n in self.local_names: + if n != "import_": + setattr(m, n, getattr(self, n)) + + for n in self.rules: + setattr(m, n, self.rules[n]) + + return + + for n in self.local_names: + # Using 'getattr' here gives us a bound method, + # while using self.__dict__[r] would give unbound one. + v = getattr(self, n) + if callable(v): + if n == "import_": + n = "import" + else: + n = string.replace(n, "_", "-") + + self._import_rule(project_module, n, v) + + for n in self.rules: + self._import_rule(project_module, n, self.rules[n]) + + def project(self, *args): + assert is_iterable(args) and all(is_iterable(arg) for arg in args) + jamfile_module = self.registry.current().project_module() + attributes = self.registry.attributes(jamfile_module) + + id = None + if args and args[0]: + id = args[0][0] + args = args[1:] + + if id: + attributes.set('id', [id]) + + explicit_build_dir = None + for a in args: + if a: + attributes.set(a[0], a[1:], exact=0) + if a[0] == "build-dir": + explicit_build_dir = a[1] + + # If '--build-dir' is specified, change the build dir for the project. + if self.registry.global_build_dir: + + location = attributes.get("location") + # Project with empty location is 'standalone' project, like + # user-config, or qt. It has no build dir. + # If we try to set build dir for user-config, we'll then + # try to inherit it, with either weird, or wrong consequences. + if location and location == attributes.get("project-root"): + # Re-read the project id, since it might have been changed in + # the project's attributes. + id = attributes.get('id') + + # This is Jamroot. + if id: + if explicit_build_dir and os.path.isabs(explicit_build_dir): + self.registry.manager.errors()( +"""Absolute directory specified via 'build-dir' project attribute +Don't know how to combine that with the --build-dir option.""") + + rid = id + if rid[0] == '/': + rid = rid[1:] + + p = os.path.join(self.registry.global_build_dir, rid) + if explicit_build_dir: + p = os.path.join(p, explicit_build_dir) + attributes.set("build-dir", p, exact=1) + elif explicit_build_dir: + self.registry.manager.errors()( +"""When --build-dir is specified, the 'build-dir' +attribute is allowed only for top-level 'project' invocations""") + + def constant(self, name, value): + """Declare and set a project global constant. + Project global constants are normal variables but should + not be changed. They are applied to every child Jamfile.""" + assert is_iterable_typed(name, basestring) + assert is_iterable_typed(value, basestring) + self.registry.current().add_constant(name[0], value) + + def path_constant(self, name, value): + """Declare and set a project global constant, whose value is a path. The + path is adjusted to be relative to the invocation directory. The given + value path is taken to be either absolute, or relative to this project + root.""" + assert is_iterable_typed(name, basestring) + assert is_iterable_typed(value, basestring) + if len(value) > 1: + self.registry.manager.errors()("path constant should have one element") + self.registry.current().add_constant(name[0], value, path=1) + + def use_project(self, id, where): + # See comment in 'load' for explanation why we record the + # parameters as opposed to loading the project now. + assert is_iterable_typed(id, basestring) + assert is_iterable_typed(where, basestring) + m = self.registry.current().project_module() + self.registry.used_projects[m].append((id[0], where[0])) + + def build_project(self, dir): + assert is_iterable_typed(dir, basestring) + jamfile_module = self.registry.current().project_module() + attributes = self.registry.attributes(jamfile_module) + now = attributes.get("projects-to-build") + attributes.set("projects-to-build", now + dir, exact=True) + + def explicit(self, target_names): + assert is_iterable_typed(target_names, basestring) + self.registry.current().mark_targets_as_explicit(target_names) + + def always(self, target_names): + assert is_iterable_typed(target_names, basestring) + self.registry.current().mark_targets_as_always(target_names) + + def glob(self, wildcards, excludes=None): + assert is_iterable_typed(wildcards, basestring) + assert is_iterable_typed(excludes, basestring)or excludes is None + return self.registry.glob_internal(self.registry.current(), + wildcards, excludes, "glob") + + def glob_tree(self, wildcards, excludes=None): + assert is_iterable_typed(wildcards, basestring) + assert is_iterable_typed(excludes, basestring) or excludes is None + bad = 0 + for p in wildcards: + if os.path.dirname(p): + bad = 1 + + if excludes: + for p in excludes: + if os.path.dirname(p): + bad = 1 + + if bad: + self.registry.manager.errors()( +"The patterns to 'glob-tree' may not include directory") + return self.registry.glob_internal(self.registry.current(), + wildcards, excludes, "glob_tree") + + + def using(self, toolset, *args): + # The module referred by 'using' can be placed in + # the same directory as Jamfile, and the user + # will expect the module to be found even though + # the directory is not in BOOST_BUILD_PATH. + # So temporary change the search path. + assert is_iterable_typed(toolset, basestring) + current = self.registry.current() + location = current.get('location') + + m = self.registry.load_module(toolset[0], [location]) + if "init" not in m.__dict__: + self.registry.manager.errors()( + "Tool module '%s' does not define the 'init' method" % toolset[0]) + m.init(*args) + + # The above might have clobbered .current-project. Restore the correct + # value. + self.registry.set_current(current) + + def import_(self, name, names_to_import=None, local_names=None): + assert is_iterable_typed(name, basestring) + assert is_iterable_typed(names_to_import, basestring) or names_to_import is None + assert is_iterable_typed(local_names, basestring)or local_names is None + name = name[0] + py_name = name + if py_name == "os": + py_name = "os_j" + jamfile_module = self.registry.current().project_module() + attributes = self.registry.attributes(jamfile_module) + location = attributes.get("location") + + saved = self.registry.current() + + m = self.registry.load_module(py_name, [location]) + + for f in m.__dict__: + v = m.__dict__[f] + f = f.replace("_", "-") + if callable(v): + qn = name + "." + f + self._import_rule(jamfile_module, qn, v) + record_jam_to_value_mapping(qualify_jam_action(qn, jamfile_module), v) + + + if names_to_import: + if not local_names: + local_names = names_to_import + + if len(names_to_import) != len(local_names): + self.registry.manager.errors()( +"""The number of names to import and local names do not match.""") + + for n, l in zip(names_to_import, local_names): + self._import_rule(jamfile_module, l, m.__dict__[n]) + + self.registry.set_current(saved) + + def conditional(self, condition, requirements): + """Calculates conditional requirements for multiple requirements + at once. This is a shorthand to be reduce duplication and to + keep an inline declarative syntax. For example: + + lib x : x.cpp : [ conditional <toolset>gcc <variant>debug : + <define>DEBUG_EXCEPTION <define>DEBUG_TRACE ] ; + """ + assert is_iterable_typed(condition, basestring) + assert is_iterable_typed(requirements, basestring) + c = string.join(condition, ",") + if c.find(":") != -1: + return [c + r for r in requirements] + else: + return [c + ":" + r for r in requirements] + + def option(self, name, value): + assert is_iterable(name) and isinstance(name[0], basestring) + assert is_iterable(value) and isinstance(value[0], basestring) + name = name[0] + if not name in ["site-config", "user-config", "project-config"]: + get_manager().errors()("The 'option' rule may be used only in site-config or user-config") + + option.set(name, value[0]) diff --git a/src/boost/tools/build/src/build/property-set.jam b/src/boost/tools/build/src/build/property-set.jam new file mode 100644 index 000000000..5045611a2 --- /dev/null +++ b/src/boost/tools/build/src/build/property-set.jam @@ -0,0 +1,604 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +import "class" : new ; +import feature ; +import indirect ; +import path ; +import project ; +import property ; +import sequence ; +import set ; +import option ; + +# Class for storing a set of properties. +# +# There is 1<->1 correspondence between identity and value. No two instances +# of the class are equal. To maintain this property, the 'property-set.create' +# rule should be used to create new instances. Instances are immutable. +# +# Each property is classified with regard to its effect on build results. +# Incidental properties have no effect on build results, from B2's +# point of view. Others are either free, or non-free and we refer to non-free +# ones as 'base'. Each property belongs to exactly one of those categories. +# +# It is possible to get a list of properties belonging to each category as +# well as a list of properties with a specific attribute. +# +# Several operations, like and refine and as-path are provided. They all use +# caching whenever possible. +# +class property-set +{ + import errors ; + import feature ; + import modules ; + import path ; + import property ; + import property-set ; + import set ; + + rule __init__ ( raw-properties * ) + { + self.raw = $(raw-properties) ; + + for local p in $(raw-properties) + { + if ! $(p:G) + { + errors.error "Invalid property: '$(p)'" ; + } + } + } + + # Returns Jam list of stored properties. + # + rule raw ( ) + { + return $(self.raw) ; + } + + rule str ( ) + { + return "[" $(self.raw) "]" ; + } + + # Returns properties that are neither incidental nor free. + # + rule base ( ) + { + if ! $(self.base-initialized) + { + init-base ; + } + return $(self.base) ; + } + + # Returns free properties which are not incidental. + # + rule free ( ) + { + if ! $(self.base-initialized) + { + init-base ; + } + return $(self.free) ; + } + + # Returns relevant base properties. This is used for computing + # target paths, so it must return the expanded set of relevant + # properties. + # + rule base-relevant ( ) + { + if ! $(self.relevant-initialized) + { + init-relevant ; + } + return $(self.base-relevant) ; + } + + # Returns all properties marked as relevant by features-ps + # Does not attempt to expand features-ps in any way, as + # this matches what virtual-target.register needs. + # + rule relevant ( features-ps ) + { + if ! $(self.relevant.$(features-ps)) + { + local result ; + local features = [ $(features-ps).get <relevant> ] ; + features = <$(features)> ; + local ignore-relevance = [ modules.peek + property-set : .ignore-relevance ] ; + for local p in $(self.raw) + { + if $(ignore-relevance) || $(p:G) in $(features) + { + local att = [ feature.attributes $(p:G) ] ; + if ! ( incidental in $(att) ) + { + result += $(p) ; + } + } + } + self.relevant.$(features-ps) = [ property-set.create $(result) ] ; + } + return $(self.relevant.$(features-ps)) ; + } + + # Returns dependency properties. + # + rule dependency ( ) + { + if ! $(self.dependency-initialized) + { + init-dependency ; + } + return $(self.dependency) ; + } + + rule non-dependency ( ) + { + if ! $(self.dependency-initialized) + { + init-dependency ; + } + return $(self.non-dependency) ; + } + + rule conditional ( ) + { + if ! $(self.conditional-initialized) + { + init-conditional ; + } + return $(self.conditional) ; + } + + rule non-conditional ( ) + { + if ! $(self.conditional-initialized) + { + init-conditional ; + } + return $(self.non-conditional) ; + } + + # Returns incidental properties. + # + rule incidental ( ) + { + if ! $(self.base-initialized) + { + init-base ; + } + return $(self.incidental) ; + } + + rule refine ( ps ) + { + if ! $(self.refined.$(ps)) + { + local r = [ property.refine $(self.raw) : [ $(ps).raw ] ] ; + if $(r[1]) != "@error" + { + self.refined.$(ps) = [ property-set.create $(r) ] ; + } + else + { + self.refined.$(ps) = $(r) ; + } + } + return $(self.refined.$(ps)) ; + } + + rule expand ( ) + { + if ! $(self.expanded) + { + self.expanded = [ property-set.create [ feature.expand $(self.raw) ] + ] ; + } + return $(self.expanded) ; + } + + rule expand-composites ( ) + { + if ! $(self.composites) + { + self.composites = [ property-set.create + [ feature.expand-composites $(self.raw) ] ] ; + } + return $(self.composites) ; + } + + rule evaluate-conditionals ( context ? ) + { + context ?= $(__name__) ; + if ! $(self.evaluated.$(context)) + { + self.evaluated.$(context) = [ property-set.create + [ property.evaluate-conditionals-in-context $(self.raw) : [ + $(context).raw ] ] ] ; + } + return $(self.evaluated.$(context)) ; + } + + rule propagated ( ) + { + if ! $(self.propagated-ps) + { + local result ; + for local p in $(self.raw) + { + if propagated in [ feature.attributes $(p:G) ] + { + result += $(p) ; + } + } + self.propagated-ps = [ property-set.create $(result) ] ; + } + return $(self.propagated-ps) ; + } + + rule add-defaults ( ) + { + if ! $(self.defaults) + { + self.defaults = [ property-set.create + [ feature.add-defaults $(self.raw) ] ] ; + } + return $(self.defaults) ; + } + + rule as-path ( ) + { + if ! $(self.as-path) + { + self.as-path = [ property.as-path [ base-relevant ] ] ; + } + return $(self.as-path) ; + } + + # Computes the path to be used for a target with the given properties. + # Returns a list of + # - the computed path + # - if the path is relative to the build directory, a value of 'true'. + # + rule target-path ( ) + { + if ! $(self.target-path) + { + # The <location> feature can be used to explicitly change the + # location of generated targets. + local l = [ get <location> ] ; + if $(l) + { + self.target-path = $(l) ; + } + else + { + local p = [ property-set.hash-maybe [ as-path ] ] ; + + # A real ugly hack. Boost regression test system requires + # specific target paths, and it seems that changing it to handle + # other directory layout is really hard. For that reason, we + # teach V2 to do the things regression system requires. The + # value of '<location-prefix>' is prepended to the path. + local prefix = [ get <location-prefix> ] ; + if $(prefix) + { + self.target-path = [ path.join $(prefix) $(p) ] ; + } + else + { + self.target-path = $(p) ; + } + if ! $(self.target-path) + { + self.target-path = . ; + } + # The path is relative to build dir. + self.target-path += true ; + } + } + return $(self.target-path) ; + } + + rule add ( ps ) + { + if ! $(self.added.$(ps)) + { + self.added.$(ps) = [ property-set.create $(self.raw) [ $(ps).raw ] ] + ; + } + return $(self.added.$(ps)) ; + } + + rule add-raw ( properties * ) + { + return [ add [ property-set.create $(properties) ] ] ; + } + + # Returns all values of 'feature'. + # + rule get ( feature ) + { + if ! $(self.map-built) + { + # For each feature, create a member var and assign all values to it. + # Since all regular member vars start with 'self', there will be no + # conflicts between names. + self.map-built = true ; + for local v in $(self.raw) + { + $(v:G) += $(v:G=) ; + } + } + return $($(feature)) ; + } + + # Returns true if the property-set contains all the + # specified properties. + # + rule contains-raw ( properties * ) + { + if $(properties) in $(self.raw) + { + return true ; + } + } + + # Returns true if the property-set has values for + # all the specified features + # + rule contains-features ( features * ) + { + if $(features) in $(self.raw:G) + { + return true ; + } + } + + # private + + rule init-base ( ) + { + for local p in $(self.raw) + { + local att = [ feature.attributes $(p:G) ] ; + # A feature can be both incidental and free, in which case we add it + # to incidental. + if incidental in $(att) + { + self.incidental += $(p) ; + } + else if free in $(att) + { + self.free += $(p) ; + } + else + { + self.base += $(p) ; + } + } + self.base-initialized = true ; + } + + rule init-relevant ( ) + { + local relevant-features = [ get <relevant> ] ; + relevant-features = [ feature.expand-relevant $(relevant-features) ] ; + relevant-features = <$(relevant-features)> ; + ignore-relevance = [ modules.peek property-set : .ignore-relevance ] ; + for local p in $(self.raw) + { + if $(ignore-relevance) || $(p:G) in $(relevant-features) + { + local att = [ feature.attributes $(p:G) ] ; + if ! ( incidental in $(att) ) + { + self.relevant += $(p) ; + if ! ( free in $(att) ) + { + self.base-relevant += $(p) ; + } + } + } + } + self.relevant-initialized = true ; + } + + rule init-dependency ( ) + { + for local p in $(self.raw) + { + if dependency in [ feature.attributes $(p:G) ] + { + self.dependency += $(p) ; + } + else + { + self.non-dependency += $(p) ; + } + } + self.dependency-initialized = true ; + } + + rule init-conditional ( ) + { + for local p in $(self.raw) + { + # TODO: Note that non-conditional properties may contain colon (':') + # characters as well, e.g. free or indirect properties. Indirect + # properties for example contain a full Jamfile path in their value + # which on Windows file systems contains ':' as the drive separator. + if ( [ MATCH "(:)" : $(p:G=) ] && ! ( free in [ feature.attributes $(p:G) ] ) ) || $(p:G) = <conditional> + { + self.conditional += $(p) ; + } + else + { + self.non-conditional += $(p) ; + } + } + self.conditional-initialized = true ; + } +} + +# This is a temporary measure to help users work around +# any problems. Remove it once we've verified that +# everything works. +if --ignore-relevance in [ modules.peek : ARGV ] +{ + .ignore-relevance = true ; +} + +# Creates a new 'property-set' instance for the given raw properties or returns +# an already existing ones. +# +rule create ( raw-properties * ) +{ + raw-properties = [ sequence.unique + [ sequence.insertion-sort $(raw-properties) ] ] ; + + local key = $(raw-properties:J=-:E=) ; + + if ! $(.ps.$(key)) + { + .ps.$(key) = [ new property-set $(raw-properties) ] ; + } + return $(.ps.$(key)) ; +} +NATIVE_RULE property-set : create ; + +if [ HAS_NATIVE_RULE class@property-set : get : 1 ] +{ + NATIVE_RULE class@property-set : get ; +} + +if [ HAS_NATIVE_RULE class@property-set : contains-features : 1 ] +{ + NATIVE_RULE class@property-set : contains-features ; +} + +# Creates a new 'property-set' instance after checking that all properties are +# valid and converting implicit properties into gristed form. +# +rule create-with-validation ( raw-properties * ) +{ + property.validate $(raw-properties) ; + return [ create [ property.make $(raw-properties) ] ] ; +} + + +# Creates a property-set from the input given by the user, in the context of +# 'jamfile-module' at 'location'. +# +rule create-from-user-input ( raw-properties * : jamfile-module location ) +{ + local project-id = [ project.attribute $(jamfile-module) id ] ; + project-id ?= [ path.root $(location) [ path.pwd ] ] ; + return [ property-set.create [ property.translate $(raw-properties) + : $(project-id) : $(location) : $(jamfile-module) ] ] ; +} + + +# Refines requirements with requirements provided by the user. Specially handles +# "-<property>value" syntax in specification to remove given requirements. +# - parent-requirements -- property-set object with requirements to refine. +# - specification -- string list of requirements provided by the user. +# - project-module -- module to which context indirect features will be +# bound. +# - location -- path to which path features are relative. +# +rule refine-from-user-input ( parent-requirements : specification * : + project-module : location ) +{ + if ! $(specification) + { + return $(parent-requirements) ; + } + else + { + local add-requirements ; + local remove-requirements ; + + for local r in $(specification) + { + local m = [ MATCH "^-(.*)" : $(r) ] ; + if $(m) + { + remove-requirements += $(m) ; + } + else + { + add-requirements += $(r) ; + } + } + + if $(remove-requirements) + { + # Need to create a property set, so that path features and indirect + # features are translated just like they are in project + # requirements. + local ps = [ property-set.create-from-user-input + $(remove-requirements) : $(project-module) $(location) ] ; + + parent-requirements = [ property-set.create + [ set.difference + [ indirect.difference + [ $(parent-requirements).raw ] : [ $(ps).raw ] ] + : [ $(ps).raw ] + ] ] ; + specification = $(add-requirements) ; + } + + local requirements = [ property-set.create-from-user-input + $(specification) : $(project-module) $(location) ] ; + + return [ $(parent-requirements).refine $(requirements) ] ; + } +} + + +# Returns a property-set with an empty set of properties. +# +rule empty ( ) +{ + if ! $(.empty) + { + .empty = [ create ] ; + } + return $(.empty) ; +} + + +if [ option.get hash : : yes ] = yes +{ + rule hash-maybe ( path ? ) + { + path ?= "" ; + return [ MD5 $(path) ] ; + } +} +else +{ + rule hash-maybe ( path ? ) + { + return $(path) ; + } +} + +rule __test__ ( ) +{ + import errors : try catch ; + + try ; + create invalid-property ; + catch "Invalid property: 'invalid-property'" ; +} diff --git a/src/boost/tools/build/src/build/property.jam b/src/boost/tools/build/src/build/property.jam new file mode 100644 index 000000000..a7a2e71dd --- /dev/null +++ b/src/boost/tools/build/src/build/property.jam @@ -0,0 +1,1005 @@ +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Copyright 2020 Nikita Kniazev +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +import feature ; +import indirect ; +import path ; +import regex ; +import string ; +import sequence ; +import set ; +import utility ; + + +# Refines 'properties' by overriding any non-free and non-conditional properties +# for which a different value is specified in 'requirements'. Returns the +# resulting list of properties. +# +rule refine ( properties * : requirements * ) +{ + local result ; + local unset ; + + # Collect all non-free features in requirements + for local r in $(requirements) + { + # Do not consider conditional requirements. + if ! [ MATCH "(:<)" : $(r:G=) ] && ! free in [ feature.attributes $(r:G) ] + { + if ! $(r) in $(properties) + { + # Kill subfeatures of properties that we're changing + local sub = [ modules.peek feature : $(r:G).subfeatures ] ; + if $(sub) + { + # non-specific subfeatures are still valid + sub = [ MATCH "(.*:.*)" : $(sub) ] ; + local name = [ utility.ungrist $(r:G) ] ; + unset += <$(name)-$(sub)> ; + } + } + unset += $(r:G) ; + } + } + + # Remove properties that are overridden by requirements + for local p in $(properties) + { + if [ MATCH "(:<)" : $(p:G=) ] || ! $(p:G) in $(unset) + { + result += $(p) ; + } + } + + return [ sequence.unique $(result) $(requirements) ] ; +} + + +# Removes all conditional properties whose conditions are not met. For those +# with met conditions, removes the condition. Properties in conditions are +# looked up in 'context'. +# +rule evaluate-conditionals-in-context ( properties * : context * ) +{ + # Import here to avoid cyclic dependency + import project ; + + local result ; + while $(properties) + { + local conditionals ; + local indirect ; + for local p in $(properties) + { + if [ MATCH "(:<)" : $(p) ] && ! free in [ feature.attributes $(p:G) ] + { + conditionals += $(p) ; + } + else if $(p:G) = <conditional> + { + indirect += $(p) ; + } + else + { + result += $(p) ; + } + } + + properties = ; + for local p in $(conditionals) + { + # Separate condition and property. + local s = [ MATCH "^(.*):(<.*)" : $(p) ] ; + # Split condition into individual properties. + local condition = [ regex.split $(s[1]) "," ] ; + # Evaluate condition. + if ! [ MATCH ^(!).* : $(condition:G=) ] + { + # Only positive checks + if $(condition) in $(context) + { + properties += $(s[2]) ; + } + } + else + { + # Have negative checks + local fail ; + for local c in $(condition) + { + local c = [ MATCH ^(!)?(.*) : $(c) ] ; + # It is XOR: $(c[1]) = "!" ^ $(c[2]) in $(context) + if $(c[1]) = "!" && $(c[2]) in $(context) || $(c[1]) != "!" && ! ( $(c[2]) in $(context) ) + { + fail = true ; + break ; + } + } + if ! $(fail) + { + properties += $(s[2]) ; + } + } + } + for local i in [ MATCH "^@(.*)" : $(indirect:G=) ] + { + # If the rule was set in a project module, translate paths + # relative to that project's location. + local m = [ indirect.get-module $(i) ] ; + local p = [ project.target $(m) : allow-missing ] ; + local new = [ indirect.call $(i) $(context) ] ; + if $(p) && [ $(p).location ] + { + local location = [ $(p).location ] ; + local project-id = [ project.attribute $(m) id ] ; + project-id ?= [ path.root $(location) [ path.pwd ] ] ; + properties += + [ translate $(new) : $(project-id) : $(location) : $(m) ] ; + } + else + { + properties += $(new) ; + } + } + } + return $(result) ; +} + + +# Returns <relevant> properties indicating how the conditionals in +# properties affect feature relevance. If the optional argument cond +# is passed, it is treated as extra conditions for all properties. +# +rule evaluate-conditional-relevance ( properties * : cond * ) +{ + cond = [ sequence.transform utility.ungrist : $(cond:G) ] ; + local result ; + for local p in $(properties) + { + # Separate condition and property. + local s = [ MATCH "^(.*):(<.*)" : $(p) ] ; + if ! $(s) || free in [ feature.attributes $(p:G) ] + { + local value = [ utility.ungrist $(p:G) ] ; + result += <relevant>$(value):<relevant>$(cond) ; + } + else + { + local condition = [ regex.split $(s[1]) "," ] ; + condition = [ MATCH "^!?(.*)" : $(condition) ] ; + condition = [ sequence.transform utility.ungrist : $(condition:G) ] $(cond) ; + local value = [ utility.ungrist $(s[2]:G) ] ; + result += <relevant>$(value):<relevant>$(condition) ; + } + } + return [ sequence.unique $(result) ] ; +} + + +rule expand-subfeatures-in-conditions ( properties * ) +{ + local result ; + for local p in $(properties) + { + local s = [ MATCH "^(.*):(<.*)" : $(p) ] ; + if ! $(s) + { + result += $(p) ; + } + else + { + local condition = $(s[1]) ; + local value = $(s[2]) ; + # Condition might include several elements. + condition = [ regex.split $(condition) "," ] ; + local e ; + for local c in $(condition) + { + # It is common for a condition to include a toolset or + # subfeatures that have not been defined. In that case we want + # the condition to simply 'never be satisfied' and validation + # would only produce a spurious error so we prevent it by + # passing 'true' as the second parameter. + e += [ feature.expand-subfeatures $(c) : true ] ; + } + if $(e) = $(condition) + { + # (todo) + # This is just an optimization and possibly a premature one at + # that. + # (todo) (12.07.2008.) (Jurko) + result += $(p) ; + } + else + { + result += "$(e:J=,):$(value)" ; + } + } + } + return $(result) ; +} + + +# Helper for as-path, below. Orders properties with the implicit ones first, and +# within the two sections in alphabetical order of feature name. +# +local rule path-order ( x y ) +{ + if $(y:G) && ! $(x:G) + { + return true ; + } + else if $(x:G) && ! $(y:G) + { + return ; + } + else + { + if ! $(x:G) + { + x = [ feature.expand-subfeatures $(x) ] ; + y = [ feature.expand-subfeatures $(y) ] ; + } + + if $(x[1]) < $(y[1]) + { + return true ; + } + } +} + + +local rule abbreviate-dashed ( string ) +{ + local r ; + for local part in [ regex.split $(string) - ] + { + r += [ string.abbreviate $(part) ] ; + } + return $(r:J=-) ; +} + + +local rule identity ( string ) +{ + return $(string) ; +} + + +if --abbreviate-paths in [ modules.peek : ARGV ] +{ + .abbrev = abbreviate-dashed ; +} +else +{ + .abbrev = identity ; +} + + +# Returns a path representing the given expanded property set. +# +rule as-path ( properties * ) +{ + local entry = .result.$(properties:J=-) ; + + if ! $($(entry)) + { + # Trim redundancy. + properties = [ feature.minimize $(properties) ] ; + + # Sort according to path-order. + properties = [ sequence.insertion-sort $(properties) : path-order ] ; + + local components ; + for local p in $(properties) + { + if ! hidden in [ feature.attributes $(p:G) ] + { + if $(p:G) + { + local f = [ utility.ungrist $(p:G) ] ; + p = $(f)-$(p:G=) ; + } + components += [ $(.abbrev) $(p) ] ; + } + } + + $(entry) = $(components:J=/) ; + } + + return $($(entry)) ; +} + + +# Exit with error if property is not valid. +# +local rule validate1 ( property ) +{ + local msg ; + if $(property:G) + { + local feature = $(property:G) ; + local value = $(property:G=) ; + + if ! [ feature.valid $(feature) ] + { + # Ungrist for better error messages. + feature = [ utility.ungrist $(property:G) ] ; + msg = "unknown feature '$(feature)'" ; + } + else if $(value) && ! free in [ feature.attributes $(feature) ] + { + feature.validate-value-string $(feature) $(value) ; + } + else if ! ( $(value) || ( optional in [ feature.attributes $(feature) ] ) ) + { + # Ungrist for better error messages. + feature = [ utility.ungrist $(property:G) ] ; + msg = "No value specified for feature '$(feature)'" ; + } + } + else + { + local feature = [ feature.implied-feature $(property) ] ; + feature.validate-value-string $(feature) $(property) ; + } + if $(msg) + { + import errors ; + errors.error "Invalid property "'$(property:J=" ")'": "$(msg:J=" "). ; + } +} + + +rule validate ( properties * ) +{ + for local p in $(properties) + { + validate1 $(p) ; + } +} + + +rule validate-property-sets ( property-sets * ) +{ + for local s in $(property-sets) + { + validate [ feature.split $(s) ] ; + } +} + + +# Expands any implicit property values in the given property 'specification' so +# they explicitly state their feature. +# +rule make ( specification * ) +{ + local result ; + for local e in $(specification) + { + if $(e:G) + { + result += $(e) ; + } + else if [ feature.is-implicit-value $(e) ] + { + local feature = [ feature.implied-feature $(e) ] ; + result += $(feature)$(e) ; + } + else + { + import errors ; + errors.error "'$(e)' is not a valid property specification" ; + } + } + return $(result) ; +} + + +# Returns a property set containing all the elements in 'properties' that do not +# have their attributes listed in 'attributes'. +# +rule remove ( attributes + : properties * ) +{ + local result ; + for local e in $(properties) + { + if ! [ set.intersection $(attributes) : [ feature.attributes $(e:G) ] ] + { + result += $(e) ; + } + } + return $(result) ; +} + + +# Returns a property set containing all the elements in 'properties' that have +# their attributes listed in 'attributes'. +# +rule take ( attributes + : properties * ) +{ + local result ; + for local e in $(properties) + { + if [ set.intersection $(attributes) : [ feature.attributes $(e:G) ] ] + { + result += $(e) ; + } + } + return $(result) ; +} + + +# Selects properties corresponding to any of the given features. +# +rule select ( features * : properties * ) +{ + local result ; + + # Add any missing angle brackets. + local empty = "" ; + features = $(empty:G=$(features)) ; + + for local p in $(properties) + { + if $(p:G) in $(features) + { + result += $(p) ; + } + } + return $(result) ; +} + + +# Returns a modified version of properties with all values of the given feature +# replaced by the given value. If 'value' is empty the feature will be removed. +# +rule change ( properties * : feature value ? ) +{ + local result ; + for local p in $(properties) + { + if $(p:G) = $(feature) + { + result += $(value:G=$(feature)) ; + } + else + { + result += $(p) ; + } + } + return $(result) ; +} + + +# If 'property' is a conditional property, returns the condition and the +# property. E.g. <variant>debug,<toolset>gcc:<inlining>full will become +# <variant>debug,<toolset>gcc <inlining>full. Otherwise, returns an empty +# string. +# +rule split-conditional ( property ) +{ + return [ MATCH "^(.+):(<.+)" : $(property) ] ; +} + + +rule translate-path-value ( value : path ) +{ + local t ; + for local v in [ regex.split $(value) "&&" ] + { + t += [ path.root [ path.make $(v) ] $(path) ] ; + } + return $(t:TJ="&&") ; +} + +rule translate-dependency-value ( value : project-id : project-location ) +{ + local split-target = [ regex.match ^(.*)//(.*) : $(value) ] ; + if $(split-target) + { + local rooted = [ path.root [ path.make $(split-target[1]) ] + [ path.root $(project-location) [ path.pwd ] ] ] ; + return $(rooted)//$(split-target[2]) ; + } + else if [ path.is-rooted $(value) ] + { + return $(value) ; + } + else + { + return $(project-id)//$(value) ; + } +} + +rule translate-indirect-value ( rulename : context-module ) +{ + if [ MATCH "^([^%]*)%([^%]+)$" : $(rulename) ] + { + # Rule is already in the 'indirect-rule' format. + return @$(rulename) ; + } + else + { + local v ; + if ! [ MATCH "([.])" : $(rulename) ] + { + # This is an unqualified rule name. The user might want to + # set flags on this rule name and toolset.flag + # auto-qualifies it. Need to do the same here so flag + # setting works. We can arrange for toolset.flag to *not* + # auto-qualify the argument but then two rules defined in + # two Jamfiles would conflict. + rulename = $(context-module).$(rulename) ; + } + v = [ indirect.make $(rulename) : $(context-module) ] ; + return @$(v) ; + } + +} + +# Equivalent to a calling all of: +# translate-path +# translate-indirect +# translate-dependency +# expand-subfeatures-in-conditions +# make +# +rule translate ( properties * : project-id : project-location : context-module ) +{ + local translate-path-rule = [ MATCH "^<translate-path>[@](.*)$" : "$(properties)" ] ; + local result ; + for local p in $(properties) + { + local split = [ split-conditional $(p) ] ; + local condition property ; + + if $(split) + { + condition = $(split[1]) ; + property = $(split[2]) ; + + local e ; + for local c in [ regex.split $(condition) "," ] + { + # strip negation for expansion and readd after + c = [ MATCH "^(!)?(.*)" : $(c) ] ; + local expanded = [ feature.expand-subfeatures $(c[2]) : true ] ; + e += $(c[1])$(expanded) ; + } + + condition = "$(e:J=,):" ; + } + else + { + property = $(p) ; + } + + local feature = $(property:G) ; + if ! $(feature) + { + if [ feature.is-implicit-value $(property) ] + { + feature = [ feature.implied-feature $(property) ] ; + result += $(condition:E=)$(feature)$(property) ; + } + else + { + import errors ; + errors.error "'$(property)' is not a valid property specification" ; + } + } else { + local attributes = [ feature.attributes $(feature) ] ; + local value ; + # Only free features should be translated + if free in $(attributes) + { + if path in $(attributes) + { + if $(translate-path-rule) + { + value = [ $(translate-path-rule) $(feature) $(property:G=) : $(properties) : $(project-id) : $(project-location) ] ; + } + if ! $(value) + { + value = [ translate-path-value $(property:G=) : $(project-location) ] ; + } + result += $(condition:E=)$(feature)$(value) ; + } + else if dependency in $(attributes) + { + value = [ translate-dependency-value $(property:G=) : $(project-id) : $(project-location) ] ; + result += $(condition:E=)$(feature)$(value) ; + } + else + { + local m = [ MATCH ^@(.+) : $(property:G=) ] ; + if $(m) + { + value = [ translate-indirect-value $(m) : $(context-module) ] ; + result += $(condition:E=)$(feature)$(value) ; + } + else + { + result += $(condition:E=)$(property) ; + } + } + } + else + { + result += $(condition:E=)$(property) ; + } + } + } + return $(result) ; +} + +# Interpret all path properties in 'properties' as relative to 'path'. The +# property values are assumed to be in system-specific form, and will be +# translated into normalized form. +# +rule translate-paths ( properties * : path ) +{ + local result ; + for local p in $(properties) + { + local split = [ split-conditional $(p) ] ; + local condition = "" ; + if $(split) + { + condition = "$(split[1]):" ; + p = $(split[2]) ; + } + + if path in [ feature.attributes $(p:G) ] + { + local values = [ regex.split $(p:TG=) "&&" ] ; + local t ; + for local v in $(values) + { + t += [ path.root [ path.make $(v) ] $(path) ] ; + } + t = $(t:J="&&") ; + result += $(condition)$(t:TG=$(p:G)) ; + } + else + { + result += $(condition)$(p) ; + } + } + return $(result) ; +} + + +# Assumes that all feature values that start with '@' are names of rules, used +# in 'context-module'. Such rules can be either local to the module or global. +# Converts such values into 'indirect-rule' format (see indirect.jam), so they +# can be called from other modules. Does nothing for such values that are +# already in the 'indirect-rule' format. +# +rule translate-indirect ( specification * : context-module ) +{ + local result ; + for local p in $(specification) + { + local m = [ MATCH ^@(.+) : $(p:G=) ] ; + if $(m) + { + local v ; + if [ MATCH "^([^%]*)%([^%]+)$" : $(m) ] + { + # Rule is already in the 'indirect-rule' format. + v = $(m) ; + } + else + { + if ! [ MATCH "([.])" : $(m) ] + { + # This is an unqualified rule name. The user might want to + # set flags on this rule name and toolset.flag + # auto-qualifies it. Need to do the same here so flag + # setting works. We can arrange for toolset.flag to *not* + # auto-qualify the argument but then two rules defined in + # two Jamfiles would conflict. + m = $(context-module).$(m) ; + } + v = [ indirect.make $(m) : $(context-module) ] ; + } + + v = @$(v) ; + result += $(v:G=$(p:G)) ; + } + else + { + result += $(p) ; + } + } + return $(result) ; +} + + +# Binds all dependency properties in a list relative to the given project. +# Targets with absolute paths will be left unchanged and targets which have a +# project specified will have the path to the project interpreted relative to +# the specified location. +# +rule translate-dependencies ( specification * : project-id : location ) +{ + local result ; + for local p in $(specification) + { + local split = [ split-conditional $(p) ] ; + local condition = "" ; + if $(split) + { + condition = "$(split[1]):" ; + p = $(split[2]) ; + } + if dependency in [ feature.attributes $(p:G) ] + { + local split-target = [ regex.match ^(.*)//(.*) : $(p:G=) ] ; + if $(split-target) + { + local rooted = [ path.root [ path.make $(split-target[1]) ] + [ path.root $(location) [ path.pwd ] ] ] ; + result += $(condition)$(p:G)$(rooted)//$(split-target[2]) ; + } + else if [ path.is-rooted $(p:G=) ] + { + result += $(condition)$(p) ; + } + else + { + result += $(condition)$(p:G)$(project-id)//$(p:G=) ; + } + } + else + { + result += $(condition)$(p) ; + } + } + return $(result) ; +} + + +# Class maintaining a property set -> string mapping. +# +class property-map +{ + import numbers ; + import sequence ; + + rule __init__ ( ) + { + self.next-flag = 1 ; + } + + # Associate 'value' with 'properties'. + # + rule insert ( properties * : value ) + { + self.all-flags += self.$(self.next-flag) ; + self.$(self.next-flag) = $(value) $(properties) ; + + self.next-flag = [ numbers.increment $(self.next-flag) ] ; + } + + # Returns the value associated with 'properties' or any subset of it. If + # more than one subset has a value assigned to it, returns the value for the + # longest subset, if it is unique. + # + rule find ( property-set ) + { + # First find all matches. + local matches ; + local match-ranks ; + for local i in $(self.all-flags) + { + local list = $($(i)) ; + if [ $(property-set).contains-raw $(list[2-]) ] + { + matches += $(list[1]) ; + match-ranks += [ sequence.length $(list) ] ; + } + } + local best = [ sequence.select-highest-ranked $(matches) + : $(match-ranks) ] ; + if $(best[2]) + { + import errors : error : errors.error ; + properties = [ $(property-set).raw ] ; + errors.error "Ambiguous key $(properties:J= :E=)" ; + } + return $(best) ; + } + + # Returns the value associated with 'properties'. If 'value' parameter is + # given, replaces the found value. + # + rule find-replace ( properties * : value ? ) + { + # First find all matches. + local matches ; + local match-ranks ; + for local i in $(self.all-flags) + { + if $($(i)[2-]) in $(properties) + { + matches += $(i) ; + match-ranks += [ sequence.length $($(i)) ] ; + } + } + local best = [ sequence.select-highest-ranked $(matches) + : $(match-ranks) ] ; + if $(best[2]) + { + import errors : error : errors.error ; + errors.error "Ambiguous key $(properties:J= :E=)" ; + } + local original = $($(best)[1]) ; + if $(value)-is-set + { + $(best) = $(value) $($(best)[2-]) ; + } + return $(original) ; + } +} + + +rule __test__ ( ) +{ + import assert ; + import "class" : new ; + import errors : try catch ; + import feature ; + + # Local rules must be explicitly re-imported. + import property : path-order abbreviate-dashed ; + + feature.prepare-test property-test-temp ; + + feature.feature toolset : gcc : implicit symmetric ; + feature.subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 3.0 3.0.1 + 3.0.2 : optional ; + feature.feature define : : free ; + feature.feature runtime-link : dynamic static : symmetric link-incompatible ; + feature.feature optimization : on off ; + feature.feature variant : debug release : implicit composite symmetric ; + feature.feature rtti : on off : link-incompatible ; + + feature.compose <variant>debug : <define>_DEBUG <optimization>off ; + feature.compose <variant>release : <define>NDEBUG <optimization>on ; + + validate <toolset>gcc <toolset>gcc-3.0.1 : $(test-space) ; + + assert.true path-order $(test-space) debug <define>foo ; + assert.false path-order $(test-space) <define>foo debug ; + assert.true path-order $(test-space) gcc debug ; + assert.false path-order $(test-space) debug gcc ; + assert.true path-order $(test-space) <optimization>on <rtti>on ; + assert.false path-order $(test-space) <rtti>on <optimization>on ; + + assert.result-set-equal <toolset>gcc <rtti>off <define>FOO + : refine <toolset>gcc <rtti>off + : <define>FOO + : $(test-space) ; + + assert.result-set-equal <toolset>gcc <optimization>on + : refine <toolset>gcc <optimization>off + : <optimization>on + : $(test-space) ; + + assert.result-set-equal <toolset>gcc <rtti>off + : refine <toolset>gcc : <rtti>off : $(test-space) ; + + assert.result-set-equal <toolset>gcc <rtti>off <rtti>off:<define>FOO + : refine <toolset>gcc : <rtti>off <rtti>off:<define>FOO + : $(test-space) ; + + assert.result-set-equal <toolset>gcc:<define>foo <toolset>gcc:<define>bar + : refine <toolset>gcc:<define>foo : <toolset>gcc:<define>bar + : $(test-space) ; + + assert.result + : evaluate-conditionals-in-context + <variant>release,<rtti>off:<define>MY_RELEASE + : <toolset>gcc <variant>release <rtti>on ; + + assert.result <define>MY_RELEASE + : evaluate-conditionals-in-context + <variant>release,<rtti>off:<define>MY_RELEASE + : <toolset>gcc <variant>release <rtti>off ; + + assert.result <define>MY_RELEASE + : evaluate-conditionals-in-context + <variant>release,!<rtti>off:<define>MY_RELEASE + : <toolset>gcc <variant>release <rtti>on ; + + assert.result + : evaluate-conditionals-in-context + <variant>release,!<rtti>off:<define>MY_RELEASE + : <toolset>gcc <variant>release <rtti>off ; + + assert.result debug + : as-path <optimization>off <variant>debug + : $(test-space) ; + + assert.result gcc/debug/rtti-off + : as-path <toolset>gcc <optimization>off <rtti>off <variant>debug + : $(test-space) ; + + assert.result optmz-off : abbreviate-dashed optimization-off ; + assert.result rntm-lnk-sttc : abbreviate-dashed runtime-link-static ; + + try ; + validate <feature>value : $(test-space) ; + catch "Invalid property '<feature>value': unknown feature 'feature'." ; + + try ; + validate <rtti>default : $(test-space) ; + catch \"default\" is not a known value of feature <rtti> ; + + validate <define>WHATEVER : $(test-space) ; + + try ; + validate <rtti> : $(test-space) ; + catch "Invalid property '<rtti>': No value specified for feature 'rtti'." ; + + try ; + validate value : $(test-space) ; + catch \"value\" is not an implicit feature value ; + + assert.result-set-equal <rtti>on + : remove free implicit : <toolset>gcc <define>foo <rtti>on : $(test-space) ; + + assert.result-set-equal <include>a + : select include : <include>a <toolset>gcc ; + + assert.result-set-equal <include>a + : select include bar : <include>a <toolset>gcc ; + + assert.result-set-equal <include>a <toolset>gcc + : select include <bar> <toolset> : <include>a <toolset>gcc ; + + assert.result-set-equal <toolset>kylix <include>a + : change <toolset>gcc <include>a : <toolset> kylix ; + + pm = [ new property-map ] ; + $(pm).insert <toolset>gcc : o ; + $(pm).insert <toolset>gcc <os>NT : obj ; + $(pm).insert <toolset>gcc <os>CYGWIN : obj ; + + try ; + $(pm).find [ new property-set <toolset>gcc <os>NT <os>CYGWIN ] ; + catch "Ambiguous key <toolset>gcc <os>NT <os>CYGWIN" ; + + assert.equal o : [ $(pm).find-replace <toolset>gcc ] ; + + assert.equal obj : [ $(pm).find-replace <toolset>gcc <os>NT ] ; + + try ; + $(pm).find-replace <toolset>gcc <os>NT <os>CYGWIN ; + catch "Ambiguous key <toolset>gcc <os>NT <os>CYGWIN" ; + + # Test ordinary properties. + assert.result : split-conditional <toolset>gcc ; + + # Test properties with ":". + assert.result : split-conditional <define>"FOO=A::B" ; + + # Test conditional feature. + assert.result-set-equal <toolset>gcc,<toolset-gcc:version>3.0 <define>FOO + : split-conditional <toolset>gcc,<toolset-gcc:version>3.0:<define>FOO ; + + # Test translate does not choke on negations in conditional + assert.result <toolset>gcc,!<rtti>off:<define>HELLO + : translate <toolset>gcc,!<rtti>off:<define>HELLO + : project-id : project-location : context-module ; + + feature.finish-test property-test-temp ; +} diff --git a/src/boost/tools/build/src/build/property.py b/src/boost/tools/build/src/build/property.py new file mode 100644 index 000000000..f3e8dfe4e --- /dev/null +++ b/src/boost/tools/build/src/build/property.py @@ -0,0 +1,750 @@ +# Status: ported, except for tests. +# Base revision: 64070 +# +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import re +import sys +from functools import total_ordering + +from b2.util.utility import * +from b2.build import feature +from b2.util import sequence, qualify_jam_action, is_iterable_typed +import b2.util.set +from b2.manager import get_manager + + +__re_two_ampersands = re.compile ('&&') +__re_comma = re.compile (',') +__re_split_condition = re.compile ('(.*):(<.*)') +__re_split_conditional = re.compile (r'(.+):<(.+)') +__re_colon = re.compile (':') +__re_has_condition = re.compile (r':<') +__re_separate_condition_and_property = re.compile (r'(.*):(<.*)') + +_not_applicable_feature='not-applicable-in-this-context' +feature.feature(_not_applicable_feature, [], ['free']) + +__abbreviated_paths = False + + +class PropertyMeta(type): + """ + This class exists to implement the isinstance() and issubclass() + hooks for the Property class. Since we've introduce the concept of + a LazyProperty, isinstance(p, Property) will fail when p is a LazyProperty. + Implementing both __instancecheck__ and __subclasscheck__ will allow + LazyProperty instances to pass the isinstance() and issubclass check for + the Property class. + + Additionally, the __call__ method intercepts the call to the Property + constructor to ensure that calling Property with the same arguments + will always return the same Property instance. + """ + _registry = {} + current_id = 1 + + def __call__(mcs, f, value, condition=None): + """ + This intercepts the call to the Property() constructor. + + This exists so that the same arguments will always return the same Property + instance. This allows us to give each instance a unique ID. + """ + from b2.build.feature import Feature + if not isinstance(f, Feature): + f = feature.get(f) + if condition is None: + condition = [] + key = (f, value) + tuple(sorted(condition)) + if key not in mcs._registry: + instance = super(PropertyMeta, mcs).__call__(f, value, condition) + mcs._registry[key] = instance + return mcs._registry[key] + + @staticmethod + def check(obj): + return (hasattr(obj, 'feature') and + hasattr(obj, 'value') and + hasattr(obj, 'condition')) + + def __instancecheck__(self, instance): + return self.check(instance) + + def __subclasscheck__(self, subclass): + return self.check(subclass) + + +@total_ordering +class Property(object): + + __slots__ = ('feature', 'value', 'condition', '_to_raw', '_hash', 'id') + __metaclass__ = PropertyMeta + + def __init__(self, f, value, condition=None): + assert(f.free or ':' not in value) + if condition is None: + condition = [] + + self.feature = f + self.value = value + self.condition = condition + self._hash = hash((self.feature, self.value) + tuple(sorted(self.condition))) + self.id = PropertyMeta.current_id + # increment the id counter. + # this allows us to take a list of Property + # instances and use their unique integer ID + # to create a key for PropertySet caching. This is + # much faster than string comparison. + PropertyMeta.current_id += 1 + + condition_str = '' + if condition: + condition_str = ",".join(str(p) for p in self.condition) + ':' + + self._to_raw = '{}<{}>{}'.format(condition_str, f.name, value) + + def to_raw(self): + return self._to_raw + + def __str__(self): + + return self._to_raw + + def __hash__(self): + return self._hash + + def __eq__(self, other): + return self._hash == other._hash + + def __lt__(self, other): + return (self.feature.name, self.value) < (other.feature.name, other.value) + + +@total_ordering +class LazyProperty(object): + def __init__(self, feature_name, value, condition=None): + if condition is None: + condition = [] + + self.__property = Property( + feature.get(_not_applicable_feature), feature_name + value, condition=condition) + self.__name = feature_name + self.__value = value + self.__condition = condition + self.__feature = None + + def __getattr__(self, item): + if self.__feature is None: + try: + self.__feature = feature.get(self.__name) + self.__property = Property(self.__feature, self.__value, self.__condition) + except KeyError: + pass + return getattr(self.__property, item) + + def __hash__(self): + return hash(self.__property) + + def __str__(self): + return self.__property._to_raw + + def __eq__(self, other): + return self.__property == other + + def __lt__(self, other): + return (self.feature.name, self.value) < (other.feature.name, other.value) + + +def create_from_string(s, allow_condition=False,allow_missing_value=False): + assert isinstance(s, basestring) + assert isinstance(allow_condition, bool) + assert isinstance(allow_missing_value, bool) + condition = [] + import types + if not isinstance(s, types.StringType): + print type(s) + if __re_has_condition.search(s): + + if not allow_condition: + raise BaseException("Conditional property is not allowed in this context") + + m = __re_separate_condition_and_property.match(s) + condition = m.group(1) + s = m.group(2) + + # FIXME: break dependency cycle + from b2.manager import get_manager + + if condition: + condition = [create_from_string(x) for x in condition.split(',')] + + feature_name = get_grist(s) + if not feature_name: + if feature.is_implicit_value(s): + f = feature.implied_feature(s) + value = s + p = Property(f, value, condition=condition) + else: + raise get_manager().errors()("Invalid property '%s' -- unknown feature" % s) + else: + value = get_value(s) + if not value and not allow_missing_value: + get_manager().errors()("Invalid property '%s' -- no value specified" % s) + + if feature.valid(feature_name): + p = Property(feature.get(feature_name), value, condition=condition) + else: + # In case feature name is not known, it is wrong to do a hard error. + # Feature sets change depending on the toolset. So e.g. + # <toolset-X:version> is an unknown feature when using toolset Y. + # + # Ideally we would like to ignore this value, but most of + # Boost.Build code expects that we return a valid Property. For this + # reason we use a sentinel <not-applicable-in-this-context> feature. + # + # The underlying cause for this problem is that python port Property + # is more strict than its Jam counterpart and must always reference + # a valid feature. + p = LazyProperty(feature_name, value, condition=condition) + + return p + +def create_from_strings(string_list, allow_condition=False): + assert is_iterable_typed(string_list, basestring) + return [create_from_string(s, allow_condition) for s in string_list] + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + """ + global __results + + # A cache of results from as_path + __results = {} + +reset () + + +def set_abbreviated_paths(on=True): + global __abbreviated_paths + if on == 'off': + on = False + on = bool(on) + __abbreviated_paths = on + + +def get_abbreviated_paths(): + return __abbreviated_paths or '--abbreviated-paths' in sys.argv + + +def path_order (x, y): + """ Helper for as_path, below. Orders properties with the implicit ones + first, and within the two sections in alphabetical order of feature + name. + """ + if x == y: + return 0 + + xg = get_grist (x) + yg = get_grist (y) + + if yg and not xg: + return -1 + + elif xg and not yg: + return 1 + + else: + if not xg: + x = feature.expand_subfeatures([x]) + y = feature.expand_subfeatures([y]) + + if x < y: + return -1 + elif x > y: + return 1 + else: + return 0 + +def identify(string): + return string + +# Uses Property +def refine (properties, requirements): + """ Refines 'properties' by overriding any non-free properties + for which a different value is specified in 'requirements'. + Conditional requirements are just added without modification. + Returns the resulting list of properties. + """ + assert is_iterable_typed(properties, Property) + assert is_iterable_typed(requirements, Property) + # The result has no duplicates, so we store it in a set + result = set() + + # Records all requirements. + required = {} + + # All the elements of requirements should be present in the result + # Record them so that we can handle 'properties'. + for r in requirements: + # Don't consider conditional requirements. + if not r.condition: + required[r.feature] = r + + for p in properties: + # Skip conditional properties + if p.condition: + result.add(p) + # No processing for free properties + elif p.feature.free: + result.add(p) + else: + if p.feature in required: + result.add(required[p.feature]) + else: + result.add(p) + + return sequence.unique(list(result) + requirements) + +def translate_paths (properties, path): + """ Interpret all path properties in 'properties' as relative to 'path' + The property values are assumed to be in system-specific form, and + will be translated into normalized form. + """ + assert is_iterable_typed(properties, Property) + result = [] + + for p in properties: + + if p.feature.path: + values = __re_two_ampersands.split(p.value) + + new_value = "&&".join(os.path.normpath(os.path.join(path, v)) for v in values) + + if new_value != p.value: + result.append(Property(p.feature, new_value, p.condition)) + else: + result.append(p) + + else: + result.append (p) + + return result + +def translate_indirect(properties, context_module): + """Assumes that all feature values that start with '@' are + names of rules, used in 'context-module'. Such rules can be + either local to the module or global. Qualified local rules + with the name of the module.""" + assert is_iterable_typed(properties, Property) + assert isinstance(context_module, basestring) + result = [] + for p in properties: + if p.value[0] == '@': + q = qualify_jam_action(p.value[1:], context_module) + get_manager().engine().register_bjam_action(q) + result.append(Property(p.feature, '@' + q, p.condition)) + else: + result.append(p) + + return result + +def validate (properties): + """ Exit with error if any of the properties is not valid. + properties may be a single property or a sequence of properties. + """ + if isinstance(properties, Property): + properties = [properties] + assert is_iterable_typed(properties, Property) + for p in properties: + __validate1(p) + +def expand_subfeatures_in_conditions (properties): + assert is_iterable_typed(properties, Property) + result = [] + for p in properties: + + if not p.condition: + result.append(p) + else: + expanded = [] + for c in p.condition: + # It common that condition includes a toolset which + # was never defined, or mentiones subfeatures which + # were never defined. In that case, validation will + # only produce an spirious error, so don't validate. + expanded.extend(feature.expand_subfeatures ([c], True)) + + # we need to keep LazyProperties lazy + if isinstance(p, LazyProperty): + value = p.value + feature_name = get_grist(value) + value = value.replace(feature_name, '') + result.append(LazyProperty(feature_name, value, condition=expanded)) + else: + result.append(Property(p.feature, p.value, expanded)) + + return result + +# FIXME: this should go +def split_conditional (property): + """ If 'property' is conditional property, returns + condition and the property, e.g + <variant>debug,<toolset>gcc:<inlining>full will become + <variant>debug,<toolset>gcc <inlining>full. + Otherwise, returns empty string. + """ + assert isinstance(property, basestring) + m = __re_split_conditional.match (property) + + if m: + return (m.group (1), '<' + m.group (2)) + + return None + + +def select (features, properties): + """ Selects properties which correspond to any of the given features. + """ + assert is_iterable_typed(properties, basestring) + result = [] + + # add any missing angle brackets + features = add_grist (features) + + return [p for p in properties if get_grist(p) in features] + +def validate_property_sets (sets): + if __debug__: + from .property_set import PropertySet + assert is_iterable_typed(sets, PropertySet) + for s in sets: + validate(s.all()) + +def evaluate_conditionals_in_context (properties, context): + """ Removes all conditional properties which conditions are not met + For those with met conditions, removes the condition. Properties + in conditions are looked up in 'context' + """ + if __debug__: + from .property_set import PropertySet + assert is_iterable_typed(properties, Property) + assert isinstance(context, PropertySet) + base = [] + conditional = [] + + for p in properties: + if p.condition: + conditional.append (p) + else: + base.append (p) + + result = base[:] + for p in conditional: + + # Evaluate condition + # FIXME: probably inefficient + if all(x in context for x in p.condition): + result.append(Property(p.feature, p.value)) + + return result + + +def change (properties, feature, value = None): + """ Returns a modified version of properties with all values of the + given feature replaced by the given value. + If 'value' is None the feature will be removed. + """ + assert is_iterable_typed(properties, basestring) + assert isinstance(feature, basestring) + assert isinstance(value, (basestring, type(None))) + result = [] + + feature = add_grist (feature) + + for p in properties: + if get_grist (p) == feature: + if value: + result.append (replace_grist (value, feature)) + + else: + result.append (p) + + return result + + +################################################################ +# Private functions + +def __validate1 (property): + """ Exit with error if property is not valid. + """ + assert isinstance(property, Property) + msg = None + + if not property.feature.free: + feature.validate_value_string (property.feature, property.value) + + +################################################################### +# Still to port. +# Original lines are prefixed with "# " +# +# +# import utility : ungrist ; +# import sequence : unique ; +# import errors : error ; +# import feature ; +# import regex ; +# import sequence ; +# import set ; +# import path ; +# import assert ; +# +# + + +# rule validate-property-sets ( property-sets * ) +# { +# for local s in $(property-sets) +# { +# validate [ feature.split $(s) ] ; +# } +# } +# + +def remove(attributes, properties): + """Returns a property sets which include all the elements + in 'properties' that do not have attributes listed in 'attributes'.""" + if isinstance(attributes, basestring): + attributes = [attributes] + assert is_iterable_typed(attributes, basestring) + assert is_iterable_typed(properties, basestring) + result = [] + for e in properties: + attributes_new = feature.attributes(get_grist(e)) + has_common_features = 0 + for a in attributes_new: + if a in attributes: + has_common_features = 1 + break + + if not has_common_features: + result += e + + return result + + +def take(attributes, properties): + """Returns a property set which include all + properties in 'properties' that have any of 'attributes'.""" + assert is_iterable_typed(attributes, basestring) + assert is_iterable_typed(properties, basestring) + result = [] + for e in properties: + if b2.util.set.intersection(attributes, feature.attributes(get_grist(e))): + result.append(e) + return result + +def translate_dependencies(properties, project_id, location): + assert is_iterable_typed(properties, Property) + assert isinstance(project_id, basestring) + assert isinstance(location, basestring) + result = [] + for p in properties: + + if not p.feature.dependency: + result.append(p) + else: + v = p.value + m = re.match("(.*)//(.*)", v) + if m: + rooted = m.group(1) + if rooted[0] == '/': + # Either project id or absolute Linux path, do nothing. + pass + else: + rooted = os.path.join(os.getcwd(), location, rooted) + + result.append(Property(p.feature, rooted + "//" + m.group(2), p.condition)) + + elif os.path.isabs(v): + result.append(p) + else: + result.append(Property(p.feature, project_id + "//" + v, p.condition)) + + return result + + +class PropertyMap: + """ Class which maintains a property set -> string mapping. + """ + def __init__ (self): + self.__properties = [] + self.__values = [] + + def insert (self, properties, value): + """ Associate value with properties. + """ + assert is_iterable_typed(properties, basestring) + assert isinstance(value, basestring) + self.__properties.append(properties) + self.__values.append(value) + + def find (self, properties): + """ Return the value associated with properties + or any subset of it. If more than one + subset has value assigned to it, return the + value for the longest subset, if it's unique. + """ + assert is_iterable_typed(properties, basestring) + return self.find_replace (properties) + + def find_replace(self, properties, value=None): + assert is_iterable_typed(properties, basestring) + assert isinstance(value, (basestring, type(None))) + matches = [] + match_ranks = [] + + for i in range(0, len(self.__properties)): + p = self.__properties[i] + + if b2.util.set.contains (p, properties): + matches.append (i) + match_ranks.append(len(p)) + + best = sequence.select_highest_ranked (matches, match_ranks) + + if not best: + return None + + if len (best) > 1: + raise NoBestMatchingAlternative () + + best = best [0] + + original = self.__values[best] + + if value: + self.__values[best] = value + + return original + +# local rule __test__ ( ) +# { +# import errors : try catch ; +# import feature ; +# import feature : feature subfeature compose ; +# +# # local rules must be explicitly re-imported +# import property : path-order ; +# +# feature.prepare-test property-test-temp ; +# +# feature toolset : gcc : implicit symmetric ; +# subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 +# 3.0 3.0.1 3.0.2 : optional ; +# feature define : : free ; +# feature runtime-link : dynamic static : symmetric link-incompatible ; +# feature optimization : on off ; +# feature variant : debug release : implicit composite symmetric ; +# feature rtti : on off : link-incompatible ; +# +# compose <variant>debug : <define>_DEBUG <optimization>off ; +# compose <variant>release : <define>NDEBUG <optimization>on ; +# +# import assert ; +# import "class" : new ; +# +# validate <toolset>gcc <toolset>gcc-3.0.1 : $(test-space) ; +# +# assert.result <toolset>gcc <rtti>off <define>FOO +# : refine <toolset>gcc <rtti>off +# : <define>FOO +# : $(test-space) +# ; +# +# assert.result <toolset>gcc <optimization>on +# : refine <toolset>gcc <optimization>off +# : <optimization>on +# : $(test-space) +# ; +# +# assert.result <toolset>gcc <rtti>off +# : refine <toolset>gcc : <rtti>off : $(test-space) +# ; +# +# assert.result <toolset>gcc <rtti>off <rtti>off:<define>FOO +# : refine <toolset>gcc : <rtti>off <rtti>off:<define>FOO +# : $(test-space) +# ; +# +# assert.result <toolset>gcc:<define>foo <toolset>gcc:<define>bar +# : refine <toolset>gcc:<define>foo : <toolset>gcc:<define>bar +# : $(test-space) +# ; +# +# assert.result <define>MY_RELEASE +# : evaluate-conditionals-in-context +# <variant>release,<rtti>off:<define>MY_RELEASE +# : <toolset>gcc <variant>release <rtti>off +# +# ; +# +# try ; +# validate <feature>value : $(test-space) ; +# catch "Invalid property '<feature>value': unknown feature 'feature'." ; +# +# try ; +# validate <rtti>default : $(test-space) ; +# catch \"default\" is not a known value of feature <rtti> ; +# +# validate <define>WHATEVER : $(test-space) ; +# +# try ; +# validate <rtti> : $(test-space) ; +# catch "Invalid property '<rtti>': No value specified for feature 'rtti'." ; +# +# try ; +# validate value : $(test-space) ; +# catch "value" is not a value of an implicit feature ; +# +# +# assert.result <rtti>on +# : remove free implicit : <toolset>gcc <define>foo <rtti>on : $(test-space) ; +# +# assert.result <include>a +# : select include : <include>a <toolset>gcc ; +# +# assert.result <include>a +# : select include bar : <include>a <toolset>gcc ; +# +# assert.result <include>a <toolset>gcc +# : select include <bar> <toolset> : <include>a <toolset>gcc ; +# +# assert.result <toolset>kylix <include>a +# : change <toolset>gcc <include>a : <toolset> kylix ; +# +# # Test ordinary properties +# assert.result +# : split-conditional <toolset>gcc +# ; +# +# # Test properties with ":" +# assert.result +# : split-conditional <define>FOO=A::B +# ; +# +# # Test conditional feature +# assert.result <toolset>gcc,<toolset-gcc:version>3.0 <define>FOO +# : split-conditional <toolset>gcc,<toolset-gcc:version>3.0:<define>FOO +# ; +# +# feature.finish-test property-test-temp ; +# } +# + diff --git a/src/boost/tools/build/src/build/property_set.py b/src/boost/tools/build/src/build/property_set.py new file mode 100644 index 000000000..3fc86de27 --- /dev/null +++ b/src/boost/tools/build/src/build/property_set.py @@ -0,0 +1,498 @@ +# Status: ported. +# Base revision: 40480 + +# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and +# distribute this software is granted provided this copyright notice appears in +# all copies. This software is provided "as is" without express or implied +# warranty, and with no claim as to its suitability for any purpose. + +import hashlib + +import bjam +from b2.util.utility import * +import property, feature +import b2.build.feature +from b2.exceptions import * +from b2.build.property import get_abbreviated_paths +from b2.util.sequence import unique +from b2.util.set import difference +from b2.util import cached, abbreviate_dashed, is_iterable_typed + +from b2.manager import get_manager + + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + """ + global __cache + + # A cache of property sets + # TODO: use a map of weak refs? + __cache = {} + +reset () + + +def create (raw_properties = []): + """ Creates a new 'PropertySet' instance for the given raw properties, + or returns an already existing one. + """ + assert (is_iterable_typed(raw_properties, property.Property) + or is_iterable_typed(raw_properties, basestring)) + # FIXME: propagate to callers. + if len(raw_properties) > 0 and isinstance(raw_properties[0], property.Property): + x = raw_properties + else: + x = [property.create_from_string(ps) for ps in raw_properties] + + # These two lines of code are optimized to the current state + # of the Property class. Since this function acts as the caching + # frontend to the PropertySet class modifying these two lines + # could have a severe performance penalty. Be careful. + # It would be faster to sort by p.id, but some projects may rely + # on the fact that the properties are ordered alphabetically. So, + # we maintain alphabetical sorting so as to maintain backward compatibility. + x = sorted(set(x), key=lambda p: (p.feature.name, p.value, p.condition)) + key = tuple(p.id for p in x) + + if key not in __cache: + __cache [key] = PropertySet(x) + + return __cache [key] + +def create_with_validation (raw_properties): + """ Creates new 'PropertySet' instances after checking + that all properties are valid and converting implicit + properties into gristed form. + """ + assert is_iterable_typed(raw_properties, basestring) + properties = [property.create_from_string(s) for s in raw_properties] + property.validate(properties) + + return create(properties) + +def empty (): + """ Returns PropertySet with empty set of properties. + """ + return create () + +def create_from_user_input(raw_properties, jamfile_module, location): + """Creates a property-set from the input given by the user, in the + context of 'jamfile-module' at 'location'""" + assert is_iterable_typed(raw_properties, basestring) + assert isinstance(jamfile_module, basestring) + assert isinstance(location, basestring) + properties = property.create_from_strings(raw_properties, True) + properties = property.translate_paths(properties, location) + properties = property.translate_indirect(properties, jamfile_module) + + project_id = get_manager().projects().attributeDefault(jamfile_module, 'id', None) + if not project_id: + project_id = os.path.abspath(location) + properties = property.translate_dependencies(properties, project_id, location) + properties = property.expand_subfeatures_in_conditions(properties) + return create(properties) + + +def refine_from_user_input(parent_requirements, specification, jamfile_module, + location): + """Refines requirements with requirements provided by the user. + Specially handles "-<property>value" syntax in specification + to remove given requirements. + - parent-requirements -- property-set object with requirements + to refine + - specification -- string list of requirements provided by the use + - project-module -- the module to which context indirect features + will be bound. + - location -- the path to which path features are relative.""" + assert isinstance(parent_requirements, PropertySet) + assert is_iterable_typed(specification, basestring) + assert isinstance(jamfile_module, basestring) + assert isinstance(location, basestring) + + if not specification: + return parent_requirements + + + add_requirements = [] + remove_requirements = [] + + for r in specification: + if r[0] == '-': + remove_requirements.append(r[1:]) + else: + add_requirements.append(r) + + if remove_requirements: + # Need to create property set, so that path features + # and indirect features are translated just like they + # are in project requirements. + ps = create_from_user_input(remove_requirements, + jamfile_module, location) + + parent_requirements = create(difference(parent_requirements.all(), + ps.all())) + specification = add_requirements + + requirements = create_from_user_input(specification, + jamfile_module, location) + + return parent_requirements.refine(requirements) + +class PropertySet: + """ Class for storing a set of properties. + - there's 1<->1 correspondence between identity and value. No + two instances of the class are equal. To maintain this property, + the 'PropertySet.create' rule should be used to create new instances. + Instances are immutable. + + - each property is classified with regard to it's effect on build + results. Incidental properties have no effect on build results, from + Boost.Build point of view. Others are either free, or non-free, which we + call 'base'. Each property belong to exactly one of those categories and + it's possible to get list of properties in each category. + + In addition, it's possible to get list of properties with specific + attribute. + + - several operations, like and refine and as_path are provided. They all use + caching whenever possible. + """ + def __init__ (self, properties=None): + if properties is None: + properties = [] + assert is_iterable_typed(properties, property.Property) + + self.all_ = properties + self._all_set = {p.id for p in properties} + + self.incidental_ = [] + self.free_ = [] + self.base_ = [] + self.dependency_ = [] + self.non_dependency_ = [] + self.conditional_ = [] + self.non_conditional_ = [] + self.propagated_ = [] + self.link_incompatible = [] + + # A cache of refined properties. + self.refined_ = {} + + # A cache of property sets created by adding properties to this one. + self.added_ = {} + + # Cache for the default properties. + self.defaults_ = None + + # Cache for the expanded properties. + self.expanded_ = None + + # Cache for the expanded composite properties + self.composites_ = None + + # Cache for property set with expanded subfeatures + self.subfeatures_ = None + + # Cache for the property set containing propagated properties. + self.propagated_ps_ = None + + # A map of features to its values. + self.feature_map_ = None + + # A tuple (target path, is relative to build directory) + self.target_path_ = None + + self.as_path_ = None + + # A cache for already evaluated sets. + self.evaluated_ = {} + + # stores the list of LazyProperty instances. + # these are being kept separate from the normal + # Property instances so that when this PropertySet + # tries to return one of its attributes, it + # will then try to evaluate the LazyProperty instances + # first before returning. + self.lazy_properties = [] + + for p in properties: + f = p.feature + if isinstance(p, property.LazyProperty): + self.lazy_properties.append(p) + # A feature can be both incidental and free, + # in which case we add it to incidental. + elif f.incidental: + self.incidental_.append(p) + elif f.free: + self.free_.append(p) + else: + self.base_.append(p) + + if p.condition: + self.conditional_.append(p) + else: + self.non_conditional_.append(p) + + if f.dependency: + self.dependency_.append (p) + elif not isinstance(p, property.LazyProperty): + self.non_dependency_.append (p) + + if f.propagated: + self.propagated_.append(p) + if f.link_incompatible: + self.link_incompatible.append(p) + + + def all(self): + return self.all_ + + def raw (self): + """ Returns the list of stored properties. + """ + # create a new list due to the LazyProperties. + # this gives them a chance to evaluate to their + # true Property(). This approach is being + # taken since calculations should not be using + # PropertySet.raw() + return [p._to_raw for p in self.all_] + + def __str__(self): + return ' '.join(p._to_raw for p in self.all_) + + def base (self): + """ Returns properties that are neither incidental nor free. + """ + result = [p for p in self.lazy_properties + if not(p.feature.incidental or p.feature.free)] + result.extend(self.base_) + return result + + def free (self): + """ Returns free properties which are not dependency properties. + """ + result = [p for p in self.lazy_properties + if not p.feature.incidental and p.feature.free] + result.extend(self.free_) + return result + + def non_free(self): + return self.base() + self.incidental() + + def dependency (self): + """ Returns dependency properties. + """ + result = [p for p in self.lazy_properties if p.feature.dependency] + result.extend(self.dependency_) + return self.dependency_ + + def non_dependency (self): + """ Returns properties that are not dependencies. + """ + result = [p for p in self.lazy_properties if not p.feature.dependency] + result.extend(self.non_dependency_) + return result + + def conditional (self): + """ Returns conditional properties. + """ + return self.conditional_ + + def non_conditional (self): + """ Returns properties that are not conditional. + """ + return self.non_conditional_ + + def incidental (self): + """ Returns incidental properties. + """ + result = [p for p in self.lazy_properties if p.feature.incidental] + result.extend(self.incidental_) + return result + + def refine (self, requirements): + """ Refines this set's properties using the requirements passed as an argument. + """ + assert isinstance(requirements, PropertySet) + if requirements not in self.refined_: + r = property.refine(self.all_, requirements.all_) + + self.refined_[requirements] = create(r) + + return self.refined_[requirements] + + def expand (self): + if not self.expanded_: + expanded = feature.expand(self.all_) + self.expanded_ = create(expanded) + return self.expanded_ + + def expand_subfeatures(self): + if not self.subfeatures_: + self.subfeatures_ = create(feature.expand_subfeatures(self.all_)) + return self.subfeatures_ + + def evaluate_conditionals(self, context=None): + assert isinstance(context, (PropertySet, type(None))) + if not context: + context = self + + if context not in self.evaluated_: + # FIXME: figure why the call messes up first parameter + self.evaluated_[context] = create( + property.evaluate_conditionals_in_context(self.all(), context)) + + return self.evaluated_[context] + + def propagated (self): + if not self.propagated_ps_: + self.propagated_ps_ = create (self.propagated_) + return self.propagated_ps_ + + def add_defaults (self): + # FIXME: this caching is invalidated when new features + # are declare inside non-root Jamfiles. + if not self.defaults_: + expanded = feature.add_defaults(self.all_) + self.defaults_ = create(expanded) + return self.defaults_ + + def as_path (self): + if not self.as_path_: + + def path_order (p1, p2): + + i1 = p1.feature.implicit + i2 = p2.feature.implicit + + if i1 != i2: + return i2 - i1 + else: + return cmp(p1.feature.name, p2.feature.name) + + # trim redundancy + properties = feature.minimize(self.base_) + + # sort according to path_order + properties.sort (path_order) + + components = [] + for p in properties: + f = p.feature + if f.implicit: + components.append(p.value) + else: + value = f.name.replace(':', '-') + "-" + p.value + if property.get_abbreviated_paths(): + value = abbreviate_dashed(value) + components.append(value) + + self.as_path_ = '/'.join(components) + + return self.as_path_ + + def target_path (self): + """ Computes the target path that should be used for + target with these properties. + Returns a tuple of + - the computed path + - if the path is relative to build directory, a value of + 'true'. + """ + if not self.target_path_: + # The <location> feature can be used to explicitly + # change the location of generated targets + l = self.get ('<location>') + if l: + computed = l[0] + is_relative = False + + else: + p = self.as_path() + if hash_maybe: + p = hash_maybe(p) + + # Really, an ugly hack. Boost regression test system requires + # specific target paths, and it seems that changing it to handle + # other directory layout is really hard. For that reason, + # we teach V2 to do the things regression system requires. + # The value o '<location-prefix>' is predended to the path. + prefix = self.get ('<location-prefix>') + + if prefix: + if len (prefix) > 1: + raise AlreadyDefined ("Two <location-prefix> properties specified: '%s'" % prefix) + + computed = os.path.join(prefix[0], p) + + else: + computed = p + + if not computed: + computed = "." + + is_relative = True + + self.target_path_ = (computed, is_relative) + + return self.target_path_ + + def add (self, ps): + """ Creates a new property set containing the properties in this one, + plus the ones of the property set passed as argument. + """ + assert isinstance(ps, PropertySet) + if ps not in self.added_: + self.added_[ps] = create(self.all_ + ps.all()) + return self.added_[ps] + + def add_raw (self, properties): + """ Creates a new property set containing the properties in this one, + plus the ones passed as argument. + """ + return self.add (create (properties)) + + + def get (self, feature): + """ Returns all values of 'feature'. + """ + if type(feature) == type([]): + feature = feature[0] + if not isinstance(feature, b2.build.feature.Feature): + feature = b2.build.feature.get(feature) + assert isinstance(feature, b2.build.feature.Feature) + + if self.feature_map_ is None: + self.feature_map_ = {} + + for v in self.all_: + if v.feature not in self.feature_map_: + self.feature_map_[v.feature] = [] + self.feature_map_[v.feature].append(v.value) + + return self.feature_map_.get(feature, []) + + @cached + def get_properties(self, feature): + """Returns all contained properties associated with 'feature'""" + if not isinstance(feature, b2.build.feature.Feature): + feature = b2.build.feature.get(feature) + assert isinstance(feature, b2.build.feature.Feature) + + result = [] + for p in self.all_: + if p.feature == feature: + result.append(p) + return result + + def __contains__(self, item): + return item.id in self._all_set + +def hash(p): + m = hashlib.md5() + m.update(p) + return m.hexdigest() + +hash_maybe = hash if "--hash" in bjam.variable("ARGV") else None + diff --git a/src/boost/tools/build/src/build/readme.txt b/src/boost/tools/build/src/build/readme.txt new file mode 100644 index 000000000..b15055b8e --- /dev/null +++ b/src/boost/tools/build/src/build/readme.txt @@ -0,0 +1,11 @@ +Copyright 2001, 2002 Dave Abrahams +Copyright 2002 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +Development code for new build system. To run unit tests for jam code, execute: + + bjam --debug --build-system=test + +Comprehensive tests require Python. See ../test/readme.txt diff --git a/src/boost/tools/build/src/build/scanner.jam b/src/boost/tools/build/src/build/scanner.jam new file mode 100644 index 000000000..a7f9254df --- /dev/null +++ b/src/boost/tools/build/src/build/scanner.jam @@ -0,0 +1,163 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Implements scanners: objects computing implicit dependencies for files, such +# as includes in C++. +# +# A scanner has a regular expression used to find the dependencies, some data +# needed to interpret those dependencies (e.g., include paths), and code which +# establishing needed relationships between actual jam targets. +# +# Scanner objects are created by actions when they try to actualize virtual +# targets, passed to the virtual-target.actualize() method and are then +# associated with actual targets. It is possible to use several scanners for a +# single virtual-target. For example, a single source file might be compiled +# twice - each time using a different include path. In this case, two separate +# actual targets will be created, each having a scanner of its own. +# +# Typically, scanners are created from target type and the action's properties, +# using the rule 'get' in this module. Directly creating scanners is not +# recommended, as it might create multiple equvivalent but different instances, +# and lead to unnecessary actual target duplication. However, actions can also +# create scanners in a special way, instead of relying on just the target type. + +import "class" : new ; +import property ; +import property-set ; +import virtual-target ; + +# Base scanner class. +# +class scanner +{ + rule __init__ ( ) + { + } + + # Returns a pattern to use for scanning. + # + rule pattern ( ) + { + import errors : error : errors.error ; + errors.error "method must be overridden" ; + } + + # Establish necessary relationship between targets, given an actual target + # being scanned and a list of pattern matches in that file. + # + rule process ( target : matches * ) + { + import errors : error : errors.error ; + errors.error "method must be overridden" ; + } +} + + +# Registers a new generator class, specifying a set of properties relevant to +# this scanner. Constructor for that class should have one parameter: a list of +# properties. +# +rule register ( scanner-class : relevant-properties * ) +{ + .registered += $(scanner-class) ; + .relevant-properties.$(scanner-class) = $(relevant-properties) ; +} + + +# Common scanner class, usable when there is only one kind of includes (unlike +# C, where "" and <> includes have different search paths). +# +class common-scanner : scanner +{ + import scanner ; + + rule __init__ ( includes * ) + { + scanner.__init__ ; + self.includes = $(includes) ; + } + + rule process ( target : matches * : binding ) + { + local target_path = [ NORMALIZE_PATH $(binding:D) ] ; + + NOCARE $(matches) ; + INCLUDES $(target) : $(matches) ; + SEARCH on $(matches) = $(target_path) $(self.includes:G=) ; + ISFILE $(matches) ; + + scanner.propagate $(__name__) : $(matches) : $(target) ; + } +} + + +# Returns an instance of a previously registered scanner, with the specified +# properties. +# +rule get ( scanner-class : property-set ) +{ + if ! $(scanner-class) in $(.registered) + { + import errors ; + errors.error "attempt to get an unregistered scanner" ; + } + + local r = $(.rv-cache.$(property-set)) ; + if ! $(r) + { + r = [ property-set.create + [ property.select $(.relevant-properties.$(scanner-class)) : + [ $(property-set).raw ] ] ] ; + .rv-cache.$(property-set) = $(r) ; + } + + if ! $(scanner.$(scanner-class).$(r:J=-)) + { + local s = [ new $(scanner-class) [ $(r).raw ] ] ; + scanner.$(scanner-class).$(r:J=-) = $(s) ; + } + return $(scanner.$(scanner-class).$(r:J=-)) ; +} + + +# Installs the specified scanner on the actual target 'target'. +# +rule install ( scanner : target ) +{ + HDRSCAN on $(target) = [ $(scanner).pattern ] ; + SCANNER on $(target) = $(scanner) ; + HDRRULE on $(target) = scanner.hdrrule ; + + # Scanner reflects differences in properties affecting binding of 'target', + # which will be known when processing includes for it, and give information + # on how to interpret different include types (e.g. quoted vs. those in + # angle brackets in C files). + HDRGRIST on $(target) = $(scanner) ; +} + + +# Propagate scanner settings from 'including-target' to 'targets'. +# +rule propagate ( scanner : targets * : including-target ) +{ + HDRSCAN on $(targets) = [ on $(including-target) return $(HDRSCAN) ] ; + SCANNER on $(targets) = $(scanner) ; + HDRRULE on $(targets) = scanner.hdrrule ; + HDRGRIST on $(targets) = [ on $(including-target) return $(HDRGRIST) ] ; +} + + +rule hdrrule ( target : matches * : binding ) +{ + local scanner = [ on $(target) return $(SCANNER) ] ; + $(scanner).process $(target) : $(matches) : $(binding) ; +} + + +# hdrrule must be available at global scope so it can be invoked by header +# scanning. +# +IMPORT scanner : hdrrule : : scanner.hdrrule ; diff --git a/src/boost/tools/build/src/build/scanner.py b/src/boost/tools/build/src/build/scanner.py new file mode 100644 index 000000000..2d6e4abca --- /dev/null +++ b/src/boost/tools/build/src/build/scanner.py @@ -0,0 +1,167 @@ +# Status: ported. +# Base revision: 45462 +# +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Implements scanners: objects that compute implicit dependencies for +# files, such as includes in C++. +# +# Scanner has a regular expression used to find dependencies, some +# data needed to interpret those dependencies (for example, include +# paths), and a code which actually established needed relationship +# between actual jam targets. +# +# Scanner objects are created by actions, when they try to actualize +# virtual targets, passed to 'virtual-target.actualize' method and are +# then associated with actual targets. It is possible to use +# several scanners for a virtual-target. For example, a single source +# might be used by to compile actions, with different include paths. +# In this case, two different actual targets will be created, each +# having scanner of its own. +# +# Typically, scanners are created from target type and action's +# properties, using the rule 'get' in this module. Directly creating +# scanners is not recommended, because it might create many equvivalent +# but different instances, and lead in unneeded duplication of +# actual targets. However, actions can also create scanners in a special +# way, instead of relying on just target type. +import property +import bjam +import os +from b2.manager import get_manager +from b2.util import is_iterable_typed + + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + """ + global __scanners, __rv_cache, __scanner_cache + + # Maps registered scanner classes to relevant properties + __scanners = {} + + # A cache of scanners. + # The key is: class_name.properties_tag, where properties_tag is the concatenation + # of all relevant properties, separated by '-' + __scanner_cache = {} + +reset () + + +def register(scanner_class, relevant_properties): + """ Registers a new generator class, specifying a set of + properties relevant to this scanner. Ctor for that class + should have one parameter: list of properties. + """ + assert issubclass(scanner_class, Scanner) + assert isinstance(relevant_properties, basestring) + __scanners[str(scanner_class)] = relevant_properties + +def registered(scanner_class): + """ Returns true iff a scanner of that class is registered + """ + return str(scanner_class) in __scanners + +def get(scanner_class, properties): + """ Returns an instance of previously registered scanner + with the specified properties. + """ + assert issubclass(scanner_class, Scanner) + assert is_iterable_typed(properties, basestring) + scanner_name = str(scanner_class) + + if not registered(scanner_name): + raise BaseException ("attempt to get unregistered scanner: %s" % scanner_name) + + relevant_properties = __scanners[scanner_name] + r = property.select(relevant_properties, properties) + + scanner_id = scanner_name + '.' + '-'.join(r) + + if scanner_id not in __scanner_cache: + __scanner_cache[scanner_id] = scanner_class(r) + + return __scanner_cache[scanner_id] + +class Scanner: + """ Base scanner class. + """ + def __init__ (self): + pass + + def pattern (self): + """ Returns a pattern to use for scanning. + """ + raise BaseException ("method must be overridden") + + def process (self, target, matches, binding): + """ Establish necessary relationship between targets, + given actual target being scanned, and a list of + pattern matches in that file. + """ + raise BaseException ("method must be overridden") + + +# Common scanner class, which can be used when there's only one +# kind of includes (unlike C, where "" and <> includes have different +# search paths). +class CommonScanner(Scanner): + + def __init__ (self, includes): + Scanner.__init__(self) + self.includes = includes + + def process(self, target, matches, binding): + + target_path = os.path.normpath(os.path.dirname(binding[0])) + bjam.call("mark-included", target, matches) + + get_manager().engine().set_target_variable(matches, "SEARCH", + [target_path] + self.includes) + get_manager().scanners().propagate(self, matches) + +class ScannerRegistry: + + def __init__ (self, manager): + self.manager_ = manager + self.count_ = 0 + self.exported_scanners_ = {} + + def install (self, scanner, target, vtarget): + """ Installs the specified scanner on actual target 'target'. + vtarget: virtual target from which 'target' was actualized. + """ + assert isinstance(scanner, Scanner) + assert isinstance(target, basestring) + assert isinstance(vtarget, basestring) + engine = self.manager_.engine() + engine.set_target_variable(target, "HDRSCAN", scanner.pattern()) + if scanner not in self.exported_scanners_: + exported_name = "scanner_" + str(self.count_) + self.count_ = self.count_ + 1 + self.exported_scanners_[scanner] = exported_name + bjam.import_rule("", exported_name, scanner.process) + else: + exported_name = self.exported_scanners_[scanner] + + engine.set_target_variable(target, "HDRRULE", exported_name) + + # scanner reflects difference in properties affecting + # binding of 'target', which will be known when processing + # includes for it, will give information on how to + # interpret quoted includes. + engine.set_target_variable(target, "HDRGRIST", str(id(scanner))) + pass + + def propagate(self, scanner, targets): + assert isinstance(scanner, Scanner) + assert is_iterable_typed(targets, basestring) or isinstance(targets, basestring) + engine = self.manager_.engine() + engine.set_target_variable(targets, "HDRSCAN", scanner.pattern()) + engine.set_target_variable(targets, "HDRRULE", + self.exported_scanners_[scanner]) + engine.set_target_variable(targets, "HDRGRIST", str(id(scanner))) + diff --git a/src/boost/tools/build/src/build/targets.jam b/src/boost/tools/build/src/build/targets.jam new file mode 100644 index 000000000..dfbd7a1d4 --- /dev/null +++ b/src/boost/tools/build/src/build/targets.jam @@ -0,0 +1,1820 @@ +# Copyright Vladimir Prus 2002. +# Copyright Rene Rivera 2006. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Supports 'abstract' targets, which are targets explicitly defined in a +# Jamfile. +# +# Abstract targets are represented by classes derived from 'abstract-target' +# class. The first abstract target is 'project-target', which is created for +# each Jamfile, and can be obtained by the 'target' rule in the Jamfile's module +# (see project.jam). +# +# Project targets keep a list of 'main-target' instances. A main target is what +# the user explicitly defines in a Jamfile. It is possible to have several +# definitions for a main target, for example to have different lists of sources +# for different platforms. So, main targets keep a list of alternatives. +# +# Each alternative is an instance of 'abstract-target'. When a main target +# subvariant is defined by some rule, that rule will decide what class to use, +# create an instance of that class and add it to the list of alternatives for +# the main target. +# +# Rules supplied by the build system will use only targets derived from the +# 'basic-target' class, which will provide some default behaviour. There will be +# different classes derived from it such as 'make-target', created by the 'make' +# rule, and 'typed-target', created by rules such as 'exe' and 'lib'. +# +# +--------------------------+ +# | abstract-target | +# +==========================+ +# | name | +# | project | +# | | +# | generate(properties) = 0 | +# +-------------+------------+ +# | +# ^ +# / \ +# +-+-+ +# | +# | +# +------------------+-----+-------------------------------+ +# | | | +# | | | +# +-----------+----------+ +------+------+ +-------+------+ +# | project-target | | main-target | | basic-target | +# +======================+ 1 * +=============+ alternatives +==============+ +# | generate(properties) |o-----+ generate |<>------------->| generate | +# | main-target | +-------------+ | construct = 0| +# +----------------------+ +-------+------+ +# | +# ^ +# / \ +# +-+-+ +# | +# | +# ...--+-----------------+-----------------+------------------+ +# | | | | +# | | | | +# ... ---+-----+ +-------+------+ +------+------+ +-------+------+ +# | | typed-target | | make-target | | stage-target | +# . +==============+ +=============+ +==============+ +# . | construct | | construct | | construct | +# +--------------+ +-------------+ +--------------+ + +import assert ; +import build-request ; +import "class" : new ; +import feature ; +import indirect ; +import path ; +import property ; +import property-set ; +import sequence ; +import set ; +import toolset ; + + +# Base class for all abstract targets. +# +class abstract-target +{ + import assert ; + import "class" ; + import errors ; + import project ; + + rule __init__ ( name # Name of the target in Jamfile. + : project-target # The project target to which this one belongs. + ) + { + # Note: it might seem that we don't need either name or project at all. + # However, there are places where we really need it. One example is + # error messages which should name problematic targets. Another is + # setting correct paths for sources and generated files. + + self.name = $(name) ; + self.project = $(project-target) ; + self.location = [ errors.nearest-user-location ] ; + } + + # Returns the name of this target. + rule name ( ) + { + return $(self.name) ; + } + + # Returns the project for this target. + rule project ( ) + { + return $(self.project) ; + } + + # Return the location where the target was declared. + rule location ( ) + { + return $(self.location) ; + } + + # Returns a user-readable name for this target. + rule full-name ( ) + { + local location = [ $(self.project).get location ] ; + return $(location)/$(self.name) ; + } + + # Generates virtual targets for this abstract target using the specified + # properties, unless a different value of some feature is required by the + # target. + # On success, returns: + # - a property-set with the usage requirements to be applied to dependants + # - a list of produced virtual targets, which may be empty. + # If 'property-set' is empty, performs the default build of this target, in + # a way specific to the derived class. + # + rule generate ( property-set ) + { + errors.error "method should be defined in derived classes" ; + } + + rule rename ( new-name ) + { + self.name = $(new-name) ; + } +} + + +if --debug-building in [ modules.peek : ARGV ] +{ + modules.poke : .debug-building : true ; +} + + +rule indent ( ) +{ + return $(.indent:J="") ; +} + + +rule increase-indent ( ) +{ + .indent += " " ; +} + + +rule decrease-indent ( ) +{ + .indent = $(.indent[2-]) ; +} + + +# Project target class (derived from 'abstract-target'). +# +# This class has the following responsibilities: +# - Maintaining a list of main targets in this project and building them. +# +# Main targets are constructed in two stages: +# - When Jamfile is read, a number of calls to 'add-alternative' is made. At +# that time, alternatives can also be renamed to account for inline targets. +# - The first time 'main-target' or 'has-main-target' rule is called, all +# alternatives are enumerated and main targets are created. +# +class project-target : abstract-target +{ + import project ; + import targets ; + import path ; + import print ; + import property-set ; + import set ; + import sequence ; + import toolset ; + import "class" : new ; + + rule __init__ ( name : project-module parent-project ? + : requirements * : default-build * ) + { + abstract-target.__init__ $(name) : $(__name__) ; + + self.project-module = $(project-module) ; + self.location = [ project.attribute $(project-module) location ] ; + self.requirements = $(requirements) ; + self.default-build = $(default-build) ; + + if $(parent-project) + { + inherit $(parent-project) ; + } + } + + # This is needed only by the 'make' rule. Need to find a way to make 'make' + # work without this method. + # + rule project-module ( ) + { + return $(self.project-module) ; + } + + rule get ( attribute ) + { + return [ project.attribute $(self.project-module) $(attribute) ] ; + } + + rule build-dir ( ) + { + if ! $(self.build-dir) + { + self.build-dir = [ get build-dir ] ; + if ! $(self.build-dir) + { + local location = [ $(self.project).get location ] ; + if $(location) + { + self.build-dir = [ path.join $(location) bin ] ; + } + else + { + local id = [ get id ] ; + if $(id) + { + local rid = [ MATCH ^/(.*) : $(id) ] ; + self.build-dir = [ path.join [ project.standalone-build-dir ] $(rid) ] ; + } + else + { + errors.error "Could not create build-dir for standalone project $(self.project-module:E=)." + : "Missing project id" ; + } + } + } + } + return $(self.build-dir) ; + } + + # Generates all possible targets contained in this project. + # + rule generate ( property-set * ) + { + if [ modules.peek : .debug-building ] + { + ECHO [ targets.indent ] "building project" [ name ] + " ('$(__name__)') with" [ $(property-set).raw ] ; + targets.increase-indent ; + } + + local usage-requirements = [ property-set.empty ] ; + local targets ; + + for local t in [ targets-to-build ] + { + local g = [ $(t).generate $(property-set) ] ; + usage-requirements = [ $(usage-requirements).add $(g[1]) ] ; + targets += $(g[2-]) ; + } + targets.decrease-indent ; + return $(usage-requirements) [ sequence.unique $(targets) ] ; + } + + # Computes and returns a list of abstract-target instances which must be + # built when this project is built. + # + rule targets-to-build ( ) + { + local result ; + + if ! $(self.built-main-targets) + { + build-main-targets ; + } + + # Collect all main targets here, except for "explicit" ones. + for local t in $(self.main-targets) + { + if ! [ $(t).name ] in $(self.explicit-targets) + { + result += $(t) ; + } + } + + # Collect all projects referenced via "projects-to-build" attribute. + local self-location = [ get location ] ; + for local pn in [ get projects-to-build ] + { + result += [ find $(pn)/ ] ; + } + + return $(result) ; + } + + # Add 'target' to the list of targets in this project that should be build + # only by explicit request + # + rule mark-target-as-explicit ( target-name * ) + { + # Record the name of the target, not instance, since this rule is called + # before main target instances are created. + self.explicit-targets += $(target-name) ; + } + + rule mark-target-as-always ( target-name * ) + { + # Record the name of the target, not instance, since this rule is called + # before main target instances are created. + self.always-targets += $(target-name) ; + } + + # Add new target alternative + # + rule add-alternative ( target-instance ) + { + if $(self.built-main-targets) + { + import errors : error : errors.error ; + errors.error add-alternative called when main targets are already + created. : in project [ full-name ] ; + } + self.alternatives += $(target-instance) ; + if ! ( [ $(target-instance).name ] in $(self.alternative-names) ) + { + self.alternative-names += [ $(target-instance).name ] ; + } + } + + # Checks if an alternative was declared for the target. + # Unlike checking for a main target this does not require + # building the main targets. And hence can be used in/directly + # while loading a project. + # + rule has-alternative-for-target ( target-name ) + { + if $(target-name) in $(self.alternative-names) + { + return 1 ; + } + } + + # Returns a 'main-target' class instance corresponding to 'name'. + # + rule main-target ( name ) + { + if ! $(self.built-main-targets) + { + build-main-targets ; + } + return $(self.main-target.$(name)) ; + } + + # Returns whether a main target with the specified name exists. + # + rule has-main-target ( name ) + { + if ! $(self.built-main-targets) + { + build-main-targets ; + } + + if $(self.main-target.$(name)) + { + return true ; + } + } + + # Worker function for the find rule not implementing any caching and simply + # returning nothing in case the target can not be found. + # + rule find-really ( id ) + { + local result ; + local current-location = [ get location ] ; + + local split = [ MATCH ^(.*)//(.*)$ : $(id) ] ; + local project-part = $(split[1]) ; + local target-part = $(split[2]) ; + + local extra-error-message ; + if $(project-part) + { + # There is an explicitly specified project part in id. Looks up the + # project and passes the request to it. + local pm = [ project.find $(project-part) : $(current-location) ] ; + if $(pm) + { + project-target = [ project.target $(pm) ] ; + result = [ $(project-target).find $(target-part) : no-error ] ; + } + else + { + extra-error-message = could not resolve project reference + '$(project-part)' ; + if ! [ path.is-rooted $(project-part) ] + { + local rooted = [ path.root $(project-part) / ] ; + if $(rooted) && [ project.is-registered-id $(rooted) ] + { + extra-error-message += - possibly missing a leading + slash ('/') character. ; + } + } + } + } + else + { + # Interpret target-name as name of main target. Need to do this + # before checking for file. Consider the following scenario with a + # toolset not modifying its executable's names, e.g. gcc on + # Unix-like platforms: + # + # exe test : test.cpp ; + # install s : test : <location>. ; + # + # After the first build we would have a target named 'test' in the + # Jamfile and a file named 'test' on the disk. We need the target to + # override the file. + result = [ main-target $(id) ] ; + + # Interpret id as an existing file reference. + if ! $(result) + { + result = [ new file-reference [ path.make $(id) ] : + $(self.project) ] ; + if ! [ $(result).exists ] + { + result = ; + } + } + + # Interpret id as project-id. + if ! $(result) + { + local project-module = [ project.find $(id) : + $(current-location) ] ; + if $(project-module) + { + result = [ project.target $(project-module) ] ; + } + } + } + + return $(result:E="") $(extra-error-message) ; + } + + # Find and return the target with the specified id, treated relative to + # self. Id may specify either a target or a file name with the target taking + # priority. May report an error or return nothing if the target is not found + # depending on the 'no-error' parameter. + # + rule find ( id : no-error ? ) + { + local v = $(.id.$(id)) ; + local extra-error-message ; + if ! $(v) + { + local r = [ find-really $(id) ] ; + v = $(r[1]) ; + extra-error-message = $(r[2-]) ; + if ! $(v) + { + v = none ; + } + .id.$(id) = $(v) ; + } + + if $(v) != none + { + return $(v) ; + } + else if ! $(no-error) + { + local current-location = [ get location ] ; + import errors : user-error : errors.user-error ; + errors.user-error Unable to find file or target named + : " " '$(id)' + : referred to from project at + : " " '$(current-location)' + : $(extra-error-message) ; + } + } + + rule build-main-targets ( ) + { + self.built-main-targets = true ; + for local a in $(self.alternatives) + { + local name = [ $(a).name ] ; + local target = $(self.main-target.$(name)) ; + if ! $(target) + { + local t = [ new main-target $(name) : $(self.project) ] ; + self.main-target.$(name) = $(t) ; + self.main-targets += $(t) ; + target = $(self.main-target.$(name)) ; + } + + if $(name) in $(self.always-targets) + { + $(a).always ; + } + + $(target).add-alternative $(a) ; + } + } + + # Accessor, add a constant. + # + rule add-constant ( + name # Variable name of the constant. + : value + # Value of the constant. + : type ? # Optional type of value. + ) + { + switch $(type) + { + case path : + local r ; + for local v in $(value) + { + local l = $(self.location) ; + if ! $(l) + { + # Project corresponding to config files do not have + # 'location' attribute, but do have source location. It + # might be more reasonable to make every project have a + # location and use some other approach to prevent buildable + # targets in config files, but that has been left for later. + l = [ get source-location ] ; + } + v = [ path.root [ path.make $(v) ] $(l) ] ; + # Now make the value absolute path. + v = [ path.root $(v) [ path.pwd ] ] ; + # Constants should be in platform-native form. + v = [ path.native $(v) ] ; + r += $(v) ; + } + value = $(r) ; + } + if ! $(name) in $(self.constants) + { + self.constants += $(name) ; + } + self.constant.$(name) = $(value) ; + # Inject the constant in the scope of the Jamroot module. + modules.poke $(self.project-module) : $(name) : $(value) ; + } + + rule inherit ( parent ) + { + for local c in [ modules.peek $(parent) : self.constants ] + { + # No need to pass the type. Path constants were converted to + # absolute paths already by parent. + add-constant $(c) : [ modules.peek $(parent) : self.constant.$(c) ] + ; + } + + # Import rules from parent. + local this-module = [ project-module ] ; + local parent-module = [ $(parent).project-module ] ; + # Do not import rules coming from 'project-rules' as they must be + # imported localized. + local user-rules = [ set.difference + [ RULENAMES $(parent-module) ] : + [ RULENAMES project-rules ] ] ; + IMPORT $(parent-module) : $(user-rules) : $(this-module) : $(user-rules) + ; + EXPORT $(this-module) : $(user-rules) ; + + toolset.inherit-flags $(this-module) : $(parent-module) ; + } +} + + +# Helper rules to detect cycles in main target references. +# +local rule start-building ( main-target-instance ) +{ + if $(main-target-instance) in $(.targets-being-built) + { + local names ; + for local t in $(.targets-being-built) $(main-target-instance) + { + local name = [ $(t).full-name ] ; + if $(t) = $(main-target-instance) + { + names += ***$(name)*** ; + } + else + { + names += $(name) ; + } + } + + import errors ; + errors.error "Recursion in main target references" + : "the following target are being built currently:" + : $(names:J=" -> ") ; + } + .targets-being-built += $(main-target-instance) ; +} + + +local rule end-building ( main-target-instance ) +{ + .targets-being-built = $(.targets-being-built[1--2]) ; +} + + +# A named top-level target in Jamfile. +# +class main-target : abstract-target +{ + import assert ; + import feature ; + import property-set ; + import sequence ; + import set ; + import targets : start-building end-building ; + import utility ; + + rule __init__ ( name : project ) + { + abstract-target.__init__ $(name) : $(project) ; + } + + # Add a new alternative for this target + rule add-alternative ( target ) + { + local d = [ $(target).default-build ] ; + if $(self.alternatives) && ( $(self.default-build) != $(d) ) + { + import errors : error : errors.error ; + errors.error "default build must be identical in all alternatives" + : "main target is" [ full-name ] + : "with" [ $(d).raw ] + : "differing from previous default build" + [ $(self.default-build).raw ] ; + } + else + { + self.default-build = $(d) ; + } + self.alternatives += $(target) ; + } + + # Returns the best viable alternative for this property-set. See the + # documentation for selection rules. + # + rule select-alternatives ( property-set debug ? ) + { + # When selecting alternatives we have to consider defaults, for example: + # lib l : l.cpp : <variant>debug ; + # lib l : l_opt.cpp : <variant>release ; + # will not work unless we add default value <variant>debug. + property-set = [ $(property-set).add-defaults ] ; + + # The algorithm: we keep the current best viable alternative. When we + # encounter a new best viable alternative, we compare it with the + # current one. + + local best ; + local best-properties ; + + if $(self.alternatives[2-]) + { + local bad ; + local worklist = $(self.alternatives) ; + while $(worklist) && ! $(bad) + { + local v = $(worklist[1]) ; + local properties = [ $(v).match $(property-set) $(debug) ] ; + + if $(properties) != no-match + { + if ! $(best) + { + best = $(v) ; + best-properties = $(properties) ; + } + else + { + if $(properties) = $(best-properties) + { + bad = true ; + } + else if $(properties) in $(best-properties) + { + # Do nothing, this alternative is worse + } + else if $(best-properties) in $(properties) + { + best = $(v) ; + best-properties = $(properties) ; + } + else + { + bad = true ; + } + } + } + worklist = $(worklist[2-]) ; + } + if ! $(bad) + { + return $(best) ; + } + } + else + { + return $(self.alternatives) ; + } + } + + # Features are relevant here if they could affect alternative + # selection. That is, base, non-conditional properties that + # are not identical in all target alternatives. + rule relevant-features ( ) + { + if $(self.alternatives[2-]) + { + if $(self.relevant-features) + { + return $(self.relevant-features) ; + } + local all-properties ; + for t in $(self.alternatives) + { + local ps = [ $(t).requirements ] ; + ps = [ property-set.create [ $(ps).non-conditional ] ] ; + all-properties += [ $(ps).base ] ; + } + all-properties = [ sequence.unique $(all-properties) ] ; + local result ; + for t in $(self.alternatives) + { + local ps = [ $(t).requirements ] ; + ps = [ property-set.create [ $(ps).non-conditional ] ] ; + local properties = [ set.difference $(all-properties) : [ $(ps).base ] ] ; + result += $(properties:G) ; + } + result = [ sequence.transform utility.ungrist : [ sequence.unique $(result) ] ] ; + self.relevant-features = [ property-set.create <relevant>$(result) ] ; + return $(self.relevant-features) ; + } + else + { + return [ property-set.empty ] ; + } + } + + rule apply-default-build ( property-set ) + { + return [ targets.apply-default-build $(property-set) : + $(self.default-build) ] ; + } + + # Select an alternative for this main target, by finding all alternatives + # whose requirements are satisfied by 'properties' and picking the one with + # the longest requirements set. Returns the result of calling 'generate' on + # that alternative. + # + rule generate ( property-set ) + { + start-building $(__name__) ; + + local all-property-sets = [ apply-default-build $(property-set) ] ; + local relevant = [ relevant-features ] ; + local usage-requirements = [ property-set.empty ] ; + local result ; + for local p in $(all-property-sets) + { + local r = [ generate-really [ $(p).add $(relevant) ] ] ; + if $(r) + { + usage-requirements = [ $(usage-requirements).add $(r[1]) ] ; + result += $(r[2-]) ; + } + } + end-building $(__name__) ; + return $(usage-requirements) [ sequence.unique $(result) ] ; + } + + # Generates the main target with the given property set and returns a list + # which first element is property-set object containing usage-requirements + # of generated target and with generated virtual target in other elements. + # It is possible that no targets are generated. + # + local rule generate-really ( property-set ) + { + local best-alternatives = [ select-alternatives $(property-set) ] ; + if ! $(best-alternatives) + { + ECHO "error: No best alternative for" [ full-name ] ; + select-alternatives $(property-set) debug ; + return [ property-set.empty ] ; + } + else + { + # Now return virtual targets for the only alternative. + return [ $(best-alternatives).generate $(property-set) ] ; + } + } + + rule rename ( new-name ) + { + abstract-target.rename $(new-name) ; + for local a in $(self.alternatives) + { + $(a).rename $(new-name) ; + } + } +} + + +# Abstract target referring to a source file. This is an artificial entity +# allowing sources to a target to be represented using a list of abstract target +# instances. +# +class file-reference : abstract-target +{ + import virtual-target ; + import property-set ; + import path ; + + rule __init__ ( file : project ) + { + abstract-target.__init__ $(file) : $(project) ; + } + + rule generate ( properties ) + { + return [ property-set.empty ] [ virtual-target.from-file $(self.name) : + [ location ] : $(self.project) ] ; + } + + # Returns true if the referred file really exists. + rule exists ( ) + { + location ; + return $(self.file-path) ; + } + + # Returns the location of target. Needed by 'testing.jam'. + rule location ( ) + { + if ! $(self.file-location) + { + local source-location = [ $(self.project).get source-location ] ; + for local src-dir in $(source-location) + { + if ! $(self.file-location) + { + local location = [ path.root $(self.name) $(src-dir) ] ; + if [ CHECK_IF_FILE [ path.native $(location) ] ] + { + self.file-location = $(src-dir) ; + self.file-path = $(location) ; + } + } + } + } + return $(self.file-location) ; + } +} + + +# Given a target-reference, made in context of 'project', returns the +# abstract-target instance that is referred to, as well as properties explicitly +# specified for this reference. +# +rule resolve-reference ( target-reference : project ) +{ + # Separate target name from properties override. + local split = [ MATCH "^([^<]*)(/(<.*))?$" : $(target-reference) ] ; + local id = $(split[1]) ; + if ! $(split) || ! $(id) + { + import errors ; + errors.error "Malformed target reference $(target-reference)" ; + } + local sproperties = ; + if $(split[3]) + { + sproperties = [ property.make [ feature.split $(split[3]) ] ] ; + sproperties = [ feature.expand $(sproperties) ] ; + } + + # Find the target. + local target = [ $(project).find $(id) ] ; + + return $(target) [ property-set.create $(sproperties) ] ; +} + + +# Attempts to generate the target given by target reference, which can refer +# both to a main target or to a file. Returns a list consisting of +# - usage requirements +# - generated virtual targets, if any +# +rule generate-from-reference ( + target-reference # Target reference. + : project # Project where the reference is made. + : property-set # Properties of the main target that makes the reference. +) +{ + local r = [ resolve-reference $(target-reference) : $(project) ] ; + local target = $(r[1]) ; + local sproperties = $(r[2]) ; + + # Take properties which should be propagated and refine them with + # source-specific requirements. + local propagated = [ $(property-set).propagated ] ; + local rproperties = [ $(propagated).refine $(sproperties) ] ; + if $(rproperties[1]) = "@error" + { + import errors ; + errors.error + "When building" [ full-name ] " with properties " $(properties) : + "Invalid properties specified for " $(source) ":" + $(rproperties[2-]) ; + } + return [ $(target).generate $(rproperties) ] ; +} + + +rule apply-default-build ( property-set : default-build ) +{ + # 1. First, see what properties from default-build are already present in + # property-set. + + local expanded = [ $(property-set).expand ] ; + local raw = [ $(property-set).raw ] ; + local specified-features = [ $(expanded).raw ] ; + specified-features = $(specified-features:G) ; + + local defaults-to-apply ; + for local d in [ $(default-build).raw ] + { + if ! $(d:G) in $(specified-features) + { + defaults-to-apply += $(d) ; + } + } + + # 2. If there are any defaults to be applied, form a new build request. Pass + # it through to 'expand-no-defaults' since default-build might contain + # "release debug" resulting in two property-sets. + local result ; + if $(defaults-to-apply) + { + # We have to compress subproperties here to prevent property lists like: + # <toolset>msvc <toolset-msvc:version>7.1 <threading>multi + # + # from being expanded into: + # <toolset-msvc:version>7.1/<threading>multi + # <toolset>msvc/<toolset-msvc:version>7.1/<threading>multi + # + # due to a cross-product property combination. That may be an indication + # that build-request.expand-no-defaults is the wrong rule to use here. + properties = [ build-request.expand-no-defaults + [ feature.compress-subproperties $(raw) ] $(defaults-to-apply) ] ; + + if $(properties) + { + for local p in $(properties) + { + result += [ property-set.create + [ feature.split $(p) ] ] ; + } + } + else + { + result = [ property-set.empty ] ; + } + } + else + { + result = $(property-set) ; + } + return $(result) ; +} + + +# Given a build request and requirements, return properties common to dependency +# build request and target requirements. +# +# TODO: Document exactly what 'common properties' are, whether they should +# include default property values, whether they should contain any conditional +# properties or should those be already processed, etc. See whether there are +# any differences between use cases with empty and non-empty build-request as +# well as with requirements containing and those not containing any non-free +# features. +# +rule common-properties ( build-request requirements ) +{ + # For optimization, we add free requirements directly, without using a + # complex algorithm. This gives the complex algorithm a better chance of + # caching results. + local free = [ $(requirements).free ] ; + local non-free = [ property-set.create [ $(requirements).base ] + [ $(requirements).incidental ] ] ; + + local key = .rp.$(build-request)-$(non-free) ; + if ! $($(key)) + { + $(key) = [ common-properties2 $(build-request) $(non-free) ] ; + } + return [ $($(key)).add-raw $(free) ] ; +} + + +# Given a 'context' -- a set of already present properties, and 'requirements', +# decide which extra properties should be applied to 'context'. For conditional +# requirements, this means evaluating the condition. For indirect conditional +# requirements, this means calling a rule. Ordinary requirements are always +# applied. +# +# Handles the situation where evaluating one conditional requirement affects +# conditions of another conditional requirements, such as: +# <toolset>gcc:<variant>release <variant>release:<define>RELEASE +# +# If 'what' is 'refined' returns context refined with new requirements. If +# 'what' is 'added' returns just the requirements to be applied. +# +rule evaluate-requirements ( requirements : context ) +{ + # Apply non-conditional requirements. It is possible that further + # conditional requirement change a value set by non-conditional + # requirements. For example: + # + # exe a : a.cpp : <threading>single <toolset>foo:<threading>multi ; + # + # I am not sure if this should be an error, or not, especially given that + # + # <threading>single + # + # might come from project's requirements. + + local unconditional = [ feature.expand [ $(requirements).non-conditional ] ] + ; + + local raw = [ $(context).raw ] ; + raw = [ property.refine $(raw) : $(unconditional) ] ; + + # We have collected properties that surely must be present in common + # properties. We now try to figure out what other properties should be added + # in order to satisfy rules (4)-(6) from the docs. + + local defaults = [ toolset.defaults ] ; + defaults = [ $(defaults).raw ] ; + + local conditionals = [ $(requirements).conditional ] ; + # The 'count' variable has one element for each conditional feature and for + # each occurrence of '<conditional>' feature. It is used as a loop + # counter: for each iteration of the loop before we remove one element and + # the property set should stabilize before we are done. It is assumed that + # #conditionals iterations should be enough for properties to propagate + # along conditions in any direction. + local count = $(conditionals) $(defaults) + and-once-more ; + + local added-requirements ; + local added-defaults ; + + local current = $(raw) ; + + local ok ; + while $(count) + { + # We need to expand composites here so that the requirements can + # safely override composite features. + current = [ feature.expand-composites $(current) ] ; + current = [ feature.add-defaults $(current) ] ; + # Evaluate conditionals in context of current properties. + local e = [ property.evaluate-conditionals-in-context $(conditionals) : + $(current) ] ; + local d = [ property.evaluate-conditionals-in-context $(defaults) : + $(current) ] ; + + if $(e) = $(added-requirements) && $(d) = $(added-defaults) + { + # If we got the same result, we have found the final properties. + count = ; + ok = true ; + } + else + { + # Oops, conditional evaluation results have changed. Also 'current' + # contains leftovers from a previous evaluation. Recompute 'current' + # using initial properties and conditional requirements. + added-requirements = $(e) ; + current = [ property.refine $(raw) : [ feature.expand $(e) ] ] ; + added-defaults = $(d) ; + current = [ property.refine $(d) : $(current) ] ; + } + count = $(count[2-]) ; + } + if ! $(ok) + { + import errors ; + errors.error Can not evaluate conditional properties $(conditionals) ; + } + + return [ property-set.create $(current) ] ; +} + + +rule common-properties2 ( build-request requirements ) +{ + return [ evaluate-requirements $(requirements) : $(build-request) ] ; +} + + +rule push-target ( target ) +{ + .targets = $(target) $(.targets) ; +} + +rule pop-target ( ) +{ + .targets = $(.targets[2-]) ; +} + +# Return the metatarget that is currently being generated. +rule current ( ) +{ + return $(.targets[1]) ; +} + + +# Implements the most standard way of constructing main target alternative from +# sources. Allows sources to be either file or other main target and handles +# generation of those dependency targets. +# +class basic-target : abstract-target +{ + import build-request ; + import build-system ; + import "class" : new ; + import feature ; + import property ; + import property-set ; + import sequence ; + import set ; + import targets ; + import virtual-target ; + + rule __init__ ( name : project : sources * : requirements * : + default-build * : usage-requirements * ) + { + abstract-target.__init__ $(name) : $(project) ; + + self.sources = $(sources) ; + if ! $(requirements) + { + requirements = [ property-set.empty ] ; + } + self.requirements = $(requirements) ; + if ! $(default-build) + { + default-build = [ property-set.empty ] ; + } + self.default-build = $(default-build) ; + if ! $(usage-requirements) + { + usage-requirements = [ property-set.empty ] ; + } + self.usage-requirements = $(usage-requirements) ; + + if $(sources:G) + { + import errors : user-error : errors.user-error ; + errors.user-error properties found "in" the 'sources' parameter + "for" [ full-name ] ; + } + } + + rule always ( ) + { + self.always = 1 ; + } + + # Returns the list of abstract-targets which are used as sources. The extra + # properties specified for sources are not represented. The only user for + # this rule at the moment is the "--dump-tests" feature of the test system. + # + rule sources ( ) + { + if ! $(self.source-targets) + { + for local s in $(self.sources) + { + self.source-targets += [ targets.resolve-reference $(s) : + $(self.project) ] ; + } + } + return $(self.source-targets) ; + } + + rule requirements ( ) + { + return $(self.requirements) ; + } + + rule default-build ( ) + { + return $(self.default-build) ; + } + + # Returns the alternative condition for this alternative, if the condition + # is satisfied by 'property-set'. + # + rule match ( property-set debug ? ) + { + # The condition is composed of all base non-conditional properties. We + # only expand subfeatures in the condition. We do not expand + # composites. We want to be able to put + # <toolset>msvc-6.0 + # in requirements. On the other hand, if we have <variant>release as a + # condition it does not make sense to require <optimization>full to be + # in the build request just to select this variant. + local bcondition = [ $(self.requirements).base ] ; + local ccondition = [ $(self.requirements).conditional ] ; + local condition = [ set.difference $(bcondition) : $(ccondition) ] ; + condition = [ feature.expand-subfeatures $(condition) : unchecked ] ; + if $(debug) + { + ECHO " next alternative: required properties:" + $(condition:E=(empty)) ; + } + + if $(condition) in [ $(property-set).raw ] + { + if $(debug) + { + ECHO " matched" ; + } + return $(condition) ; + } + else + { + if $(debug) + { + ECHO " not matched" ; + } + return no-match ; + } + } + + # Takes a target reference, which might be either target id or a dependency + # property, and generates that target using 'property-set' as a build + # request. + # + # The results are added to the variable called 'result-var'. Usage + # requirements are added to the variable called 'usage-requirements-var'. + # + rule generate-dependencies ( dependencies * : property-set : result-var + usage-requirements-var ) + { + for local dependency in $(dependencies) + { + local grist = $(dependency:G) ; + local id = $(dependency:G=) ; + local result = [ targets.generate-from-reference $(id) : + $(self.project) : $(property-set) ] ; + + $(result-var) += $(result[2-]:G=$(grist)) ; + $(usage-requirements-var) += [ $(result[1]).raw ] ; + } + } + + # Determines final build properties, generates sources, and calls + # 'construct'. This method should not be overridden. + # + rule generate ( property-set ) + { + if [ modules.peek : .debug-building ] + { + ECHO ; + local fn = [ full-name ] ; + ECHO [ targets.indent ] "Building target '$(fn)'" ; + targets.increase-indent ; + ECHO [ targets.indent ] Build "request:" $(property-set) + [ $(property-set).raw ] ; + local cf = [ build-system.command-line-free-features ] ; + ECHO [ targets.indent ] Command line free "features:" [ $(cf).raw ] ; + ECHO [ targets.indent ] Target "requirements:" + [ $(self.requirements).raw ] ; + } + targets.push-target $(__name__) ; + + # Apply free features from the command line. If user said + # define=FOO + # he most likely wants this define to be set for all compiles. + # Make it before check for already built. + property-set = [ $(property-set).add + [ build-system.command-line-free-features ] ] ; + + if ! $(self.generated.$(property-set)) + { + local rproperties = [ targets.common-properties $(property-set) + $(self.requirements) ] ; + + if [ modules.peek : .debug-building ] + { + ECHO ; + ECHO [ targets.indent ] "Common properties: " + [ $(rproperties).raw ] ; + } + + local skip ; + local skip-downstream ; + if $(rproperties[1]) = "@error" + { + ECHO [ targets.indent ] "Skipping build of:" [ full-name ] + "cannot compute common properties" ; + skip = true ; + skip-downstream = true ; + } + else if [ $(rproperties).get <build> ] = no + { + # If we just see <build>no, we cannot produce any reasonable + # diagnostics. The code that adds this property is expected + # to explain why a target is not built, for example using + # the configure.log-component-configuration function. + skip = true ; + skip-downstream = true ; + } + else + { + local source-targets ; + local properties = [ $(rproperties).non-dependency ] ; + local usage-requirements ; + + generate-dependencies [ $(rproperties).dependency ] : + $(rproperties) : properties usage-requirements ; + + generate-dependencies $(self.sources) : $(rproperties) : + source-targets usage-requirements ; + + if [ modules.peek : .debug-building ] + { + ECHO ; + ECHO [ targets.indent ] "Usage requirements for" + $(self.name)": " $(usage-requirements) ; + } + + # Skipping this target if a dependency is skipped. + # Subclasses can override this behavior. E.g. + # alias-target-class overrides this to not be skipped if a + # dependency is skipped. + if <build>no in $(usage-requirements) + { + skip = [ skip-from-usage-requirements ] ; + skip-downstream = true ; + } + + if ! $(skip) + { + rproperties = [ property-set.create $(properties) + $(usage-requirements) ] ; + usage-requirements = [ property-set.create $(usage-requirements) + ] ; + + if [ modules.peek : .debug-building ] + { + ECHO [ targets.indent ] "Build properties: " + [ $(rproperties).raw ] ; + } + + local extra = [ $(rproperties).get <source> ] ; + source-targets += $(extra:G=) ; + # We might get duplicate sources, for example if we link to two + # libraries having the same <library> usage requirement. Use + # stable sort, since for some targets the order is important, + # e.g. RUN_PY targets need a python source to come first. + source-targets = [ sequence.unique $(source-targets) : stable ] + ; + + local result = [ construct $(self.name) : $(source-targets) : + $(rproperties) ] ; + + if $(result) + { + local gur = $(result[1]) ; + result = $(result[2-]) ; + + # Relevant is automatically applied to usage requirements + # and only applies for propagated features + local relevant = [ propagated-relevant + [ $(gur).get <relevant> ] + [ $(rproperties).get <relevant> ] ] ; + gur = [ property-set.create + [ property.change [ $(gur).raw ] : <relevant> ] + <relevant>$(relevant) ] ; + + local s = [ create-subvariant $(result) + : [ virtual-target.recent-targets ] + : $(property-set) : $(source-targets) + : $(rproperties) : $(usage-requirements) ] ; + virtual-target.clear-recent-targets ; + + if $(self.always) + { + for local t in [ $(s).created-targets ] + { + $(t).always ; + } + } + + local ur = [ compute-usage-requirements $(s) ] ; + if $(skip-downstream) + { + ur = [ $(ur).add [ property-set.create <build>no ] + ] ; + } + ur = [ $(ur).add $(gur) ] ; + $(s).set-usage-requirements $(ur) ; + if [ modules.peek : .debug-building ] + { + ECHO [ targets.indent ] "Usage requirements from" + $(self.name)": " [ $(ur).raw ] ; + } + + self.generated.$(property-set) = $(ur) $(result) ; + } + } + } + + if $(skip) + { + # We are here either because there has been an error computing + # properties or there is <build>no in properties or usage + # requirements. In the latter case we do not want any + # diagnostic. In the former case, we need diagnostics. FIXME + + # If this target fails to build, add <build>no to properties to + # cause any parent target to fail to build. + self.generated.$(property-set) = [ property-set.create <build>no + ] ; + } + } + else + { + if [ modules.peek : .debug-building ] + { + ECHO [ targets.indent ] "Already built" ; + local ur = $(self.generated.$(property-set)) ; + ur = $(ur[0]) ; + targets.increase-indent ; + ECHO [ targets.indent ] "Usage requirements from" + $(self.name)": " [ $(ur).raw ] ; + targets.decrease-indent ; + } + } + + targets.pop-target ; + targets.decrease-indent ; + return $(self.generated.$(property-set)) ; + } + + # Given the set of generated targets, and refined build properties, + # determines and sets appropriate usage requirements on those targets. + # + rule compute-usage-requirements ( subvariant ) + { + local rproperties = [ $(subvariant).build-properties ] ; + xusage-requirements = + [ $(self.usage-requirements).evaluate-conditionals + $(rproperties) ] ; + + # Filter out non-propagated <relevant> properties + local relevant ; + for local r in [ $(xusage-requirements).get <relevant> ] + { + local check = [ MATCH "(.*):<relevant>(.*)" : $(r) ] ; + if $(check) { check = $(check[2]) ; } + else { check = $(r) ; } + if propagated in [ feature.attributes <$(check)> ] + { + relevant += $(r) ; + } + } + local raw = [ $(xusage-requirements).raw ] ; + local free = [ property.take free : $(raw) ] ; + if $(free) != $(raw) + { + if ! $(self.warned-usage-requirements) + { + self.warned-usage-requirements = true ; + ECHO "warning:" non-free usage requirements + [ set.difference $(raw) : $(free) ] ignored ; + ECHO "warning:" in main-target [ name ] at [ location ] ; + } + } + xusage-requirements = [ property-set.create + [ property.change $(free) : <relevant> ] + <relevant>$(relevant) ] ; + + # We generate all dependency properties and add them, as well as their + # usage requirements, to the result. + local extra ; + generate-dependencies [ $(xusage-requirements).dependency ] : + $(rproperties) : extra extra ; + + local result = [ property-set.create + [ $(xusage-requirements).non-dependency ] $(extra) ] ; + + # Propagate usage requirements we got from sources, except for the + # <pch-header> and <pch-file> features. + # + # That feature specifies which pch file to use, and should apply only to + # direct dependents. Consider: + # + # pch pch1 : ... + # lib lib1 : ..... pch1 ; + # pch pch2 : + # lib lib2 : pch2 lib1 ; + # + # Here, lib2 should not get <pch-header> property from pch1. + # + # Essentially, when those two features are in usage requirements, they + # are propagated only to direct dependents. We might need a more general + # mechanism, but for now, only those two features are special. + # + # TODO - Actually there are more possible candidates like for instance + # when listing static library X as a source for another static library. + # Then static library X will be added as a <source> property to the + # second library's usage requirements but those requirements should last + # only up to the first executable or shared library that actually links + # to it. + local raw = [ $(subvariant).sources-usage-requirements ] ; + raw = [ $(raw).raw ] ; + raw = [ property.change $(raw) : <pch-header> ] ; + raw = [ property.change $(raw) : <pch-file> ] ; + return [ $(result).add [ property-set.create $(raw) ] ] ; + } + + local rule propagated-relevant ( values * ) + { + local result ; + for local v in [ feature.expand-relevant $(values) ] + { + if propagated in [ feature.attributes <$(v)> ] + { + result += $(v) ; + } + } + return $(result) ; + } + + # Creates new subvariant instances for 'targets'. + # 'root-targets' - virtual targets to be returned to dependants + # 'all-targets' - virtual targets created while building this main target + # 'build-request' - property-set instance with requested build properties + # + local rule create-subvariant ( root-targets * : all-targets * : + build-request : sources * : rproperties : usage-requirements ) + { + for local e in $(root-targets) + { + $(e).root true ; + } + + # Process all virtual targets that will be created if this main target + # is created. + local s = [ new subvariant $(__name__) : $(build-request) : $(sources) : + $(rproperties) : $(usage-requirements) : $(all-targets) ] ; + for local v in $(all-targets) + { + if ! [ $(v).creating-subvariant ] + { + $(v).creating-subvariant $(s) ; + } + } + return $(s) ; + } + + # Constructs virtual targets for this abstract target and the dependency + # graph. Returns a usage-requirements property-set and a list of virtual + # targets. Should be overridden in derived classes. + # + rule construct ( name : source-targets * : properties * ) + { + import errors : error : errors.error ; + errors.error "method should be defined in derived classes" ; + } + + # Determines if build of this target should be skipped when there is + # <build>no in usage requirements. This should usually be true, unless + # the target is some kind of grouping, e.g. alias targets. + rule skip-from-usage-requirements ( ) + { + return true ; + } +} + + +class typed-target : basic-target +{ + import generators ; + + rule __init__ ( name : project : type : sources * : requirements * : + default-build * : usage-requirements * ) + { + basic-target.__init__ $(name) : $(project) : $(sources) : + $(requirements) : $(default-build) : $(usage-requirements) ; + + self.type = $(type) ; + } + + rule type ( ) + { + return $(self.type) ; + } + + rule construct ( name : source-targets * : property-set ) + { + local r = [ generators.construct $(self.project) $(name:S=) + : $(self.type) + : [ property-set.create [ $(property-set).raw ] + <main-target-type>$(self.type) ] + : $(source-targets) : true ] ; + if ! $(r) + { + local viable-generators = [ generators.find-viable-generators + $(self.type) : $(property-set) ] ; + ECHO "WARNING: Unable to construct" [ full-name ] + "of type" $(self.type) + "with these properties:" [ $(property-set).raw ] ; + ECHO "WARNING: Considered these as possible generators:" ; + for local gen in $(viable-generators) + { + ECHO "WARNING:" [ $(gen).id ] + "with source types {" [ $(gen).source-types ] "}" + "and requirements {" [ $(gen).requirements ] "}" ; + } + + # Are there any top-level generators for this type/property set. + if ! [ generators.find-viable-generators $(self.type) : + $(property-set) ] + { + ECHO "error: no generators were found for type '$(self.type)'" ; + ECHO "error: and the requested properties" ; + ECHO "error: make sure you've configured the needed tools" ; + ECHO "See https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration" ; + EXIT "To debug this problem, try the --debug-generators option." + ; + } + } + return $(r) ; + } +} + + +# Return the list of sources to use, if main target rule is invoked with +# 'sources'. If there are any objects in 'sources', they are treated as main +# target instances, and the name of such targets are adjusted to be +# '<name_of_this_target>__<name_of_source_target>'. Such renaming is disabled if +# a non-empty value is passed as the 'no-renaming' parameter. +# +rule main-target-sources ( sources * : main-target-name : no-renaming ? ) +{ + local result ; + for local t in $(sources) + { + if [ class.is-instance $(t) ] + { + local name = [ $(t).name ] ; + if ! $(no-renaming) + { + name = $(main-target-name)__$(name) ; + $(t).rename $(name) ; + } + # Inline targets are not built by default. + local p = [ $(t).project ] ; + $(p).mark-target-as-explicit $(name) ; + result += $(name) ; + } + else + { + result += $(t) ; + } + } + return $(result) ; +} + + +# Returns the requirements to use when declaring a main target, obtained by +# translating all specified property paths and refining project requirements +# with the ones specified for the target. +# +rule main-target-requirements ( + specification * # Properties explicitly specified for the main target. + : project # Project where the main target is to be declared. +) +{ + local requirements = [ property-set.refine-from-user-input + [ $(project).get requirements ] : $(specification) : + [ $(project).project-module ] : [ $(project).get location ] ] ; + if $(requirements[1]) = "@error" + { + import errors ; + errors.error "Conflicting requirements for target:" $(requirements) ; + } + local result = [ $(requirements).add [ toolset.requirements ] ] ; + return [ $(result).add-raw [ property.evaluate-conditional-relevance [ $(result).raw ] ] ] ; +} + + +# Returns the usage requirements to use when declaring a main target, which are +# obtained by translating all specified property paths and adding project's +# usage requirements. +# +rule main-target-usage-requirements ( + specification * # Use-properties explicitly specified for a main target. + : project # Project where the main target is to be declared. +) +{ + local project-usage-requirements = [ $(project).get usage-requirements ] ; + + # We do not use 'refine-from-user-input' because: + # - I am not sure if removing parent's usage requirements makes sense + # - refining usage requirements is not needed, since usage requirements are + # always free. + local usage-requirements = [ property-set.create-from-user-input + $(specification) + : [ $(project).project-module ] [ $(project).get location ] ] ; + + local result = [ $(project-usage-requirements).add $(usage-requirements) ] ; + local relevant = + [ property.evaluate-conditional-relevance [ $(result).raw ] ] ; + return [ $(result).add-raw $(relevant) ] ; +} + + +# Return the default build value to use when declaring a main target, which is +# obtained by using the specified value if not empty and parent's default build +# attribute otherwise. +# +rule main-target-default-build ( + specification * # Default build explicitly specified for a main target. + : project # Project where the main target is to be declared. +) +{ + local result ; + if $(specification) + { + result = $(specification) ; + } + else + { + result = [ $(project).get default-build ] ; + } + return [ property-set.create-with-validation $(result) ] ; +} + + +# Registers the specified target as a main target alternative and returns it. +# +rule main-target-alternative ( target ) +{ + local ptarget = [ $(target).project ] ; + $(ptarget).add-alternative $(target) ; + return $(target) ; +} + + +# Creates a metatarget with the specified properties, using 'klass' as the +# class. The 'name', 'sources', 'requirements', 'default-build' and +# 'usage-requirements' are assumed to be in the form specified by the user in +# the Jamfile corresponding to 'project'. +# +rule create-metatarget ( klass : project : name : sources * : requirements * : + default-build * : usage-requirements * ) +{ + return [ targets.main-target-alternative [ new $(klass) $(name) : $(project) + : [ targets.main-target-sources $(sources) : $(name) ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + : [ targets.main-target-usage-requirements $(usage-requirements) : + $(project) ] ] ] ; +} + + +# Creates a typed-target with the specified properties. The 'name', 'sources', +# 'requirements', 'default-build' and 'usage-requirements' are assumed to be in +# the form specified by the user in the Jamfile corresponding to 'project'. +# +rule create-typed-target ( type : project : name : sources * : requirements * : + default-build * : usage-requirements * ) +{ + return [ targets.main-target-alternative [ new typed-target $(name) : + $(project) : $(type) + : [ targets.main-target-sources $(sources) : $(name) ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + : [ targets.main-target-usage-requirements $(usage-requirements) : + $(project) ] ] ] ; +} diff --git a/src/boost/tools/build/src/build/targets.py b/src/boost/tools/build/src/build/targets.py new file mode 100644 index 000000000..20e97bc6b --- /dev/null +++ b/src/boost/tools/build/src/build/targets.py @@ -0,0 +1,1523 @@ +# Status: ported. +# Base revision: 64488 + +# Copyright Vladimir Prus 2002-2007. +# Copyright Rene Rivera 2006. +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Supports 'abstract' targets, which are targets explicitly defined in Jamfile. +# +# Abstract targets are represented by classes derived from 'AbstractTarget' class. +# The first abstract target is 'project_target', which is created for each +# Jamfile, and can be obtained by the 'target' rule in the Jamfile's module. +# (see project.jam). +# +# Project targets keep a list of 'MainTarget' instances. +# A main target is what the user explicitly defines in a Jamfile. It is +# possible to have several definitions for a main target, for example to have +# different lists of sources for different platforms. So, main targets +# keep a list of alternatives. +# +# Each alternative is an instance of 'AbstractTarget'. When a main target +# subvariant is defined by some rule, that rule will decide what class to +# use, create an instance of that class and add it to the list of alternatives +# for the main target. +# +# Rules supplied by the build system will use only targets derived +# from 'BasicTarget' class, which will provide some default behaviour. +# There will be two classes derived from it, 'make-target', created by the +# 'make' rule, and 'TypedTarget', created by rules such as 'exe' and 'dll'. + +# +# +------------------------+ +# |AbstractTarget | +# +========================+ +# |name | +# |project | +# | | +# |generate(properties) = 0| +# +-----------+------------+ +# | +# ^ +# / \ +# +-+-+ +# | +# | +# +------------------------+------+------------------------------+ +# | | | +# | | | +# +----------+-----------+ +------+------+ +------+-------+ +# | project_target | | MainTarget | | BasicTarget | +# +======================+ 1 * +=============+ alternatives +==============+ +# | generate(properties) |o-----------+ generate |<>------------->| generate | +# | main-target | +-------------+ | construct = 0| +# +----------------------+ +--------------+ +# | +# ^ +# / \ +# +-+-+ +# | +# | +# ...--+----------------+------------------+----------------+---+ +# | | | | +# | | | | +# ... ---+-----+ +------+-------+ +------+------+ +--------+-----+ +# | | TypedTarget | | make-target | | stage-target | +# . +==============+ +=============+ +==============+ +# . | construct | | construct | | construct | +# +--------------+ +-------------+ +--------------+ + +import re +import os.path +import sys + +from b2.manager import get_manager + +from b2.util.utility import * +import property, project, virtual_target, property_set, feature, generators, toolset +from virtual_target import Subvariant +from b2.exceptions import * +from b2.util.sequence import unique +from b2.util import path, bjam_signature, safe_isinstance, is_iterable_typed +from b2.build import errors +from b2.build.errors import user_error_checkpoint + +import b2.build.build_request as build_request + +import b2.util.set +_re_separate_target_from_properties = re.compile (r'^([^<]*)(/(<.*))?$') + +class TargetRegistry: + + def __init__ (self): + # All targets that are currently being built. + # Only the key is id (target), the value is the actual object. + self.targets_being_built_ = {} + + # Current indent for debugging messages + self.indent_ = "" + + self.debug_building_ = "--debug-building" in bjam.variable("ARGV") + + self.targets_ = [] + + def main_target_alternative (self, target): + """ Registers the specified target as a main target alternatives. + Returns 'target'. + """ + assert isinstance(target, AbstractTarget) + target.project ().add_alternative (target) + return target + + def main_target_sources (self, sources, main_target_name, no_renaming=0): + """Return the list of sources to use, if main target rule is invoked + with 'sources'. If there are any objects in 'sources', they are treated + as main target instances, and the name of such targets are adjusted to + be '<name_of_this_target>__<name_of_source_target>'. Such renaming + is disabled is non-empty value is passed for 'no-renaming' parameter.""" + assert is_iterable_typed(sources, basestring) + assert isinstance(main_target_name, basestring) + assert isinstance(no_renaming, (int, bool)) + result = [] + + for t in sources: + + t = b2.util.jam_to_value_maybe(t) + + if isinstance (t, AbstractTarget): + name = t.name () + + if not no_renaming: + name = main_target_name + '__' + name + t.rename (name) + + # Inline targets are not built by default. + p = t.project() + p.mark_targets_as_explicit([name]) + result.append(name) + + else: + result.append (t) + + return result + + + def main_target_requirements(self, specification, project): + """Returns the requirement to use when declaring a main target, + which are obtained by + - translating all specified property paths, and + - refining project requirements with the one specified for the target + + 'specification' are the properties xplicitly specified for a + main target + 'project' is the project where the main taret is to be declared.""" + assert is_iterable_typed(specification, basestring) + assert isinstance(project, ProjectTarget) + # create a copy since the list is being modified + specification = list(specification) + specification.extend(toolset.requirements()) + + requirements = property_set.refine_from_user_input( + project.get("requirements"), specification, + project.project_module(), project.get("location")) + + return requirements + + def main_target_usage_requirements (self, specification, project): + """ Returns the use requirement to use when declaraing a main target, + which are obtained by + - translating all specified property paths, and + - adding project's usage requirements + specification: Use-properties explicitly specified for a main target + project: Project where the main target is to be declared + """ + assert is_iterable_typed(specification, basestring) + assert isinstance(project, ProjectTarget) + project_usage_requirements = project.get ('usage-requirements') + + # We don't use 'refine-from-user-input' because I'm not sure if: + # - removing of parent's usage requirements makes sense + # - refining of usage requirements is not needed, since usage requirements + # are always free. + usage_requirements = property_set.create_from_user_input( + specification, project.project_module(), project.get("location")) + + return project_usage_requirements.add (usage_requirements) + + def main_target_default_build (self, specification, project): + """ Return the default build value to use when declaring a main target, + which is obtained by using specified value if not empty and parent's + default build attribute otherwise. + specification: Default build explicitly specified for a main target + project: Project where the main target is to be declared + """ + assert is_iterable_typed(specification, basestring) + assert isinstance(project, ProjectTarget) + if specification: + return property_set.create_with_validation(specification) + else: + return project.get ('default-build') + + def start_building (self, main_target_instance): + """ Helper rules to detect cycles in main target references. + """ + assert isinstance(main_target_instance, MainTarget) + if id(main_target_instance) in self.targets_being_built_: + names = [] + for t in self.targets_being_built_.values() + [main_target_instance]: + names.append (t.full_name()) + + get_manager().errors()("Recursion in main target references\n") + + self.targets_being_built_[id(main_target_instance)] = main_target_instance + + def end_building (self, main_target_instance): + assert isinstance(main_target_instance, MainTarget) + assert (id(main_target_instance) in self.targets_being_built_) + del self.targets_being_built_ [id (main_target_instance)] + + def create_typed_target (self, type, project, name, sources, requirements, default_build, usage_requirements): + """ Creates a TypedTarget with the specified properties. + The 'name', 'sources', 'requirements', 'default_build' and + 'usage_requirements' are assumed to be in the form specified + by the user in Jamfile corresponding to 'project'. + """ + assert isinstance(type, basestring) + assert isinstance(project, ProjectTarget) + assert is_iterable_typed(sources, basestring) + assert is_iterable_typed(requirements, basestring) + assert is_iterable_typed(default_build, basestring) + return self.main_target_alternative (TypedTarget (name, project, type, + self.main_target_sources (sources, name), + self.main_target_requirements (requirements, project), + self.main_target_default_build (default_build, project), + self.main_target_usage_requirements (usage_requirements, project))) + + def increase_indent(self): + self.indent_ += " " + + def decrease_indent(self): + self.indent_ = self.indent_[0:-4] + + def logging(self): + return self.debug_building_ + + def log(self, message): + if self.debug_building_: + print self.indent_ + message + + def push_target(self, target): + assert isinstance(target, AbstractTarget) + self.targets_.append(target) + + def pop_target(self): + self.targets_ = self.targets_[:-1] + + def current(self): + return self.targets_[0] + + +class GenerateResult: + + def __init__ (self, ur=None, targets=None): + if not targets: + targets = [] + assert isinstance(ur, property_set.PropertySet) or ur is None + assert is_iterable_typed(targets, virtual_target.VirtualTarget) + + self.__usage_requirements = ur + self.__targets = targets + + if not self.__usage_requirements: + self.__usage_requirements = property_set.empty () + + def usage_requirements (self): + return self.__usage_requirements + + def targets (self): + return self.__targets + + def extend (self, other): + assert (isinstance (other, GenerateResult)) + + self.__usage_requirements = self.__usage_requirements.add (other.usage_requirements ()) + self.__targets.extend (other.targets ()) + +class AbstractTarget: + """ Base class for all abstract targets. + """ + def __init__ (self, name, project, manager = None): + """ manager: the Manager object + name: name of the target + project: the project target to which this one belongs + manager:the manager object. If none, uses project.manager () + """ + assert isinstance(name, basestring) + assert (isinstance (project, ProjectTarget)) + # Note: it might seem that we don't need either name or project at all. + # However, there are places where we really need it. One example is error + # messages which should name problematic targets. Another is setting correct + # paths for sources and generated files. + + # Why allow manager to be specified? Because otherwise project target could not derive + # from this class. + if manager: + self.manager_ = manager + else: + self.manager_ = project.manager () + + self.name_ = name + self.project_ = project + self.location_ = errors.nearest_user_location() + + def manager (self): + return self.manager_ + + def name (self): + """ Returns the name of this target. + """ + return self.name_ + + def project (self): + """ Returns the project for this target. + """ + return self.project_ + + def location (self): + """ Return the location where the target was declared. + """ + return self.location_ + + def full_name (self): + """ Returns a user-readable name for this target. + """ + location = self.project ().get ('location') + return location + '/' + self.name_ + + def generate (self, property_set): + """ Takes a property set. Generates virtual targets for this abstract + target, using the specified properties, unless a different value of some + feature is required by the target. + On success, returns a GenerateResult instance with: + - a property_set with the usage requirements to be + applied to dependents + - a list of produced virtual targets, which may be + empty. + If 'property_set' is empty, performs default build of this + target, in a way specific to derived class. + """ + raise BaseException ("method should be defined in derived classes") + + def rename (self, new_name): + assert isinstance(new_name, basestring) + self.name_ = new_name + +class ProjectTarget (AbstractTarget): + """ Project target class (derived from 'AbstractTarget') + + This class these responsibilities: + - maintaining a list of main target in this project and + building it + + Main targets are constructed in two stages: + - When Jamfile is read, a number of calls to 'add_alternative' is made. + At that time, alternatives can also be renamed to account for inline + targets. + - The first time 'main-target' or 'has-main-target' rule is called, + all alternatives are enumerated an main targets are created. + """ + def __init__ (self, manager, name, project_module, parent_project, requirements, default_build): + assert isinstance(project_module, basestring) + assert isinstance(parent_project, (ProjectTarget, type(None))) + assert isinstance(requirements, (type(None), property_set.PropertySet)) + assert isinstance(default_build, (type(None), property_set.PropertySet)) + AbstractTarget.__init__ (self, name, self, manager) + + self.project_module_ = project_module + self.location_ = manager.projects().attribute (project_module, 'location') + self.requirements_ = requirements + self.default_build_ = default_build + + self.build_dir_ = None + + # A cache of IDs + self.ids_cache_ = {} + + # True is main targets have already been built. + self.built_main_targets_ = False + + # A list of the registered alternatives for this project. + self.alternatives_ = [] + + # A map from main target name to the target corresponding + # to it. + self.main_target_ = {} + + # Targets marked as explicit. + self.explicit_targets_ = set() + + # Targets marked as always + self.always_targets_ = set() + + # The constants defined for this project. + self.constants_ = {} + + # Whether targets for all main target are already created. + self.built_main_targets_ = 0 + + if parent_project: + self.inherit (parent_project) + + + # TODO: This is needed only by the 'make' rule. Need to find the + # way to make 'make' work without this method. + def project_module (self): + return self.project_module_ + + def get (self, attribute): + assert isinstance(attribute, basestring) + return self.manager().projects().attribute( + self.project_module_, attribute) + + def build_dir (self): + if not self.build_dir_: + self.build_dir_ = self.get ('build-dir') + if not self.build_dir_: + self.build_dir_ = os.path.join(self.project_.get ('location'), 'bin') + + return self.build_dir_ + + def generate (self, ps): + """ Generates all possible targets contained in this project. + """ + assert isinstance(ps, property_set.PropertySet) + self.manager_.targets().log( + "Building project '%s' with '%s'" % (self.name (), str(ps))) + self.manager_.targets().increase_indent () + + result = GenerateResult () + + for t in self.targets_to_build (): + g = t.generate (ps) + result.extend (g) + + self.manager_.targets().decrease_indent () + return result + + def targets_to_build (self): + """ Computes and returns a list of AbstractTarget instances which + must be built when this project is built. + """ + result = [] + + if not self.built_main_targets_: + self.build_main_targets () + + # Collect all main targets here, except for "explicit" ones. + for n, t in self.main_target_.iteritems (): + if not t.name () in self.explicit_targets_: + result.append (t) + + # Collect all projects referenced via "projects-to-build" attribute. + self_location = self.get ('location') + for pn in self.get ('projects-to-build'): + result.append (self.find(pn + "/")) + + return result + + def mark_targets_as_explicit (self, target_names): + """Add 'target' to the list of targets in this project + that should be build only by explicit request.""" + + # Record the name of the target, not instance, since this + # rule is called before main target instances are created. + assert is_iterable_typed(target_names, basestring) + self.explicit_targets_.update(target_names) + + def mark_targets_as_always(self, target_names): + assert is_iterable_typed(target_names, basestring) + self.always_targets_.update(target_names) + + def add_alternative (self, target_instance): + """ Add new target alternative. + """ + assert isinstance(target_instance, AbstractTarget) + if self.built_main_targets_: + raise IllegalOperation ("add-alternative called when main targets are already created for project '%s'" % self.full_name ()) + + self.alternatives_.append (target_instance) + + def main_target (self, name): + assert isinstance(name, basestring) + if not self.built_main_targets_: + self.build_main_targets() + + return self.main_target_[name] + + def has_main_target (self, name): + """Tells if a main target with the specified name exists.""" + assert isinstance(name, basestring) + if not self.built_main_targets_: + self.build_main_targets() + + return name in self.main_target_ + + def create_main_target (self, name): + """ Returns a 'MainTarget' class instance corresponding to the 'name'. + """ + assert isinstance(name, basestring) + if not self.built_main_targets_: + self.build_main_targets () + + return self.main_targets_.get (name, None) + + + def find_really(self, id): + """ Find and return the target with the specified id, treated + relative to self. + """ + assert isinstance(id, basestring) + + result = None + current_location = self.get ('location') + + __re_split_project_target = re.compile (r'(.*)//(.*)') + split = __re_split_project_target.match (id) + + project_part = None + target_part = None + + if split: + project_part = split.group(1) + target_part = split.group(2) + if not target_part: + get_manager().errors()( + 'Project ID, "{}", is not a valid target reference. There should ' + 'be either a target name after the "//" or the "//" should be removed ' + 'from the target reference.' + .format(id) + ) + + + project_registry = self.project_.manager ().projects () + + extra_error_message = '' + if project_part: + # There's explicit project part in id. Looks up the + # project and pass the request to it. + pm = project_registry.find (project_part, current_location) + + if pm: + project_target = project_registry.target (pm) + result = project_target.find (target_part, no_error=1) + + else: + extra_error_message = "error: could not find project '$(project_part)'" + + else: + # Interpret target-name as name of main target + # Need to do this before checking for file. Consider this: + # + # exe test : test.cpp ; + # install s : test : <location>. ; + # + # After first build we'll have target 'test' in Jamfile and file + # 'test' on the disk. We need target to override the file. + + result = None + if self.has_main_target(id): + result = self.main_target(id) + + if not result: + result = FileReference (self.manager_, id, self.project_) + if not result.exists (): + # File actually does not exist. + # Reset 'target' so that an error is issued. + result = None + + + if not result: + # Interpret id as project-id + project_module = project_registry.find (id, current_location) + if project_module: + result = project_registry.target (project_module) + + return result + + def find (self, id, no_error = False): + assert isinstance(id, basestring) + assert isinstance(no_error, int) # also matches bools + v = self.ids_cache_.get (id, None) + + if not v: + v = self.find_really (id) + self.ids_cache_ [id] = v + + if v or no_error: + return v + + raise BaseException ("Unable to find file or target named '%s'\nreferred from project at '%s'" % (id, self.get ('location'))) + + + def build_main_targets (self): + self.built_main_targets_ = True + + for a in self.alternatives_: + name = a.name () + if name not in self.main_target_: + t = MainTarget (name, self.project_) + self.main_target_ [name] = t + + if name in self.always_targets_: + a.always() + + self.main_target_ [name].add_alternative (a) + + def add_constant(self, name, value, path=0): + """Adds a new constant for this project. + + The constant will be available for use in Jamfile + module for this project. If 'path' is true, + the constant will be interpreted relatively + to the location of project. + """ + assert isinstance(name, basestring) + assert is_iterable_typed(value, basestring) + assert isinstance(path, int) # will also match bools + if path: + l = self.location_ + if not l: + # Project corresponding to config files do not have + # 'location' attribute, but do have source location. + # It might be more reasonable to make every project have + # a location and use some other approach to prevent buildable + # targets in config files, but that's for later. + l = self.get('source-location') + + value = os.path.join(l, value[0]) + # Now make the value absolute path. Constants should be in + # platform-native form. + value = [os.path.normpath(os.path.join(os.getcwd(), value))] + + self.constants_[name] = value + bjam.call("set-variable", self.project_module(), name, value) + + def inherit(self, parent_project): + assert isinstance(parent_project, ProjectTarget) + for c in parent_project.constants_: + # No need to pass the type. Path constants were converted to + # absolute paths already by parent. + self.add_constant(c, parent_project.constants_[c]) + + # Import rules from parent + this_module = self.project_module() + parent_module = parent_project.project_module() + + rules = bjam.call("RULENAMES", parent_module) + if not rules: + rules = [] + user_rules = [x for x in rules + if x not in self.manager().projects().project_rules().all_names()] + if user_rules: + bjam.call("import-rules-from-parent", parent_module, this_module, user_rules) + +class MainTarget (AbstractTarget): + """ A named top-level target in Jamfile. + """ + def __init__ (self, name, project): + AbstractTarget.__init__ (self, name, project) + self.alternatives_ = [] + self.best_alternative = None + self.default_build_ = property_set.empty () + + def add_alternative (self, target): + """ Add a new alternative for this target. + """ + assert isinstance(target, BasicTarget) + d = target.default_build () + + if self.alternatives_ and self.default_build_ != d: + get_manager().errors()("default build must be identical in all alternatives\n" + "main target is '%s'\n" + "with '%s'\n" + "differing from previous default build: '%s'" % (self.full_name (), d.raw (), self.default_build_.raw ())) + + else: + self.default_build_ = d + + self.alternatives_.append (target) + + def __select_alternatives (self, property_set_, debug): + """ Returns the best viable alternative for this property_set + See the documentation for selection rules. + # TODO: shouldn't this be 'alternative' (singular)? + """ + # When selecting alternatives we have to consider defaults, + # for example: + # lib l : l.cpp : <variant>debug ; + # lib l : l_opt.cpp : <variant>release ; + # won't work unless we add default value <variant>debug. + assert isinstance(property_set_, property_set.PropertySet) + assert isinstance(debug, int) # also matches bools + + property_set_ = property_set_.add_defaults () + + # The algorithm: we keep the current best viable alternative. + # When we've got new best viable alternative, we compare it + # with the current one. + best = None + best_properties = None + + if len (self.alternatives_) == 0: + return None + + if len (self.alternatives_) == 1: + return self.alternatives_ [0] + + if debug: + print "Property set for selection:", property_set_ + + for v in self.alternatives_: + properties = v.match (property_set_, debug) + + if properties is not None: + if not best: + best = v + best_properties = properties + + else: + if b2.util.set.equal (properties, best_properties): + return None + + elif b2.util.set.contains (properties, best_properties): + # Do nothing, this alternative is worse + pass + + elif b2.util.set.contains (best_properties, properties): + best = v + best_properties = properties + + else: + return None + + return best + + def apply_default_build (self, property_set_): + assert isinstance(property_set_, property_set.PropertySet) + return apply_default_build(property_set_, self.default_build_) + + def generate (self, ps): + """ Select an alternative for this main target, by finding all alternatives + which requirements are satisfied by 'properties' and picking the one with + longest requirements set. + Returns the result of calling 'generate' on that alternative. + """ + assert isinstance(ps, property_set.PropertySet) + self.manager_.targets ().start_building (self) + + # We want composite properties in build request act as if + # all the properties it expands too are explicitly specified. + ps = ps.expand () + + all_property_sets = self.apply_default_build (ps) + + result = GenerateResult () + + for p in all_property_sets: + result.extend (self.__generate_really (p)) + + self.manager_.targets ().end_building (self) + + return result + + def __generate_really (self, prop_set): + """ Generates the main target with the given property set + and returns a list which first element is property_set object + containing usage_requirements of generated target and with + generated virtual target in other elements. It's possible + that no targets are generated. + """ + assert isinstance(prop_set, property_set.PropertySet) + best_alternative = self.__select_alternatives (prop_set, debug=0) + self.best_alternative = best_alternative + + if not best_alternative: + # FIXME: revive. + # self.__select_alternatives(prop_set, debug=1) + self.manager_.errors()( + "No best alternative for '%s'.\n" + % (self.full_name(),)) + + result = best_alternative.generate (prop_set) + + # Now return virtual targets for the only alternative + return result + + def rename(self, new_name): + assert isinstance(new_name, basestring) + AbstractTarget.rename(self, new_name) + for a in self.alternatives_: + a.rename(new_name) + +class FileReference (AbstractTarget): + """ Abstract target which refers to a source file. + This is artificial creature; it's useful so that sources to + a target can be represented as list of abstract target instances. + """ + def __init__ (self, manager, file, project): + AbstractTarget.__init__ (self, file, project) + self.file_location_ = None + + def generate (self, properties): + return GenerateResult (None, [ + self.manager_.virtual_targets ().from_file ( + self.name_, self.location(), self.project_) ]) + + def exists (self): + """ Returns true if the referred file really exists. + """ + if self.location (): + return True + else: + return False + + def location (self): + # Returns the location of target. Needed by 'testing.jam' + if not self.file_location_: + source_location = self.project_.get('source-location') + + for src_dir in source_location: + location = os.path.join(src_dir, self.name()) + if os.path.isfile(location): + self.file_location_ = src_dir + self.file_path = location + break + + return self.file_location_ + +def resolve_reference(target_reference, project): + """ Given a target_reference, made in context of 'project', + returns the AbstractTarget instance that is referred to, as well + as properties explicitly specified for this reference. + """ + # Separate target name from properties override + assert isinstance(target_reference, basestring) + assert isinstance(project, ProjectTarget) + split = _re_separate_target_from_properties.match (target_reference) + if not split: + raise BaseException ("Invalid reference: '%s'" % target_reference) + + id = split.group (1) + + sproperties = [] + + if split.group (3): + sproperties = property.create_from_strings(feature.split(split.group(3))) + sproperties = feature.expand_composites(sproperties) + + # Find the target + target = project.find (id) + + return (target, property_set.create(sproperties)) + +def generate_from_reference(target_reference, project, property_set_): + """ Attempts to generate the target given by target reference, which + can refer both to a main target or to a file. + Returns a list consisting of + - usage requirements + - generated virtual targets, if any + target_reference: Target reference + project: Project where the reference is made + property_set: Properties of the main target that makes the reference + """ + assert isinstance(target_reference, basestring) + assert isinstance(project, ProjectTarget) + assert isinstance(property_set_, property_set.PropertySet) + target, sproperties = resolve_reference(target_reference, project) + + # Take properties which should be propagated and refine them + # with source-specific requirements. + propagated = property_set_.propagated() + rproperties = propagated.refine(sproperties) + + return target.generate(rproperties) + + + +class BasicTarget (AbstractTarget): + """ Implements the most standard way of constructing main target + alternative from sources. Allows sources to be either file or + other main target and handles generation of those dependency + targets. + """ + def __init__ (self, name, project, sources, requirements = None, default_build = None, usage_requirements = None): + assert is_iterable_typed(sources, basestring) + assert isinstance(requirements, property_set.PropertySet) or requirements is None + assert isinstance(default_build, property_set.PropertySet) or default_build is None + assert isinstance(usage_requirements, property_set.PropertySet) or usage_requirements is None + AbstractTarget.__init__ (self, name, project) + + for s in sources: + if get_grist (s): + raise InvalidSource ("property '%s' found in the 'sources' parameter for '%s'" % (s, name)) + + self.sources_ = sources + + if not requirements: requirements = property_set.empty () + self.requirements_ = requirements + + if not default_build: default_build = property_set.empty () + self.default_build_ = default_build + + if not usage_requirements: usage_requirements = property_set.empty () + self.usage_requirements_ = usage_requirements + + # A cache for resolved references + self.source_targets_ = None + + # A cache for generated targets + self.generated_ = {} + + # A cache for build requests + self.request_cache = {} + + # Result of 'capture_user_context' has everything. For example, if this + # target is declare as result of loading Jamfile which was loaded when + # building target B which was requested from A, then we'll have A, B and + # Jamroot location in context. We only care about Jamroot location, most + # of the times. + self.user_context_ = self.manager_.errors().capture_user_context()[-1:] + + self.always_ = False + + def always(self): + self.always_ = True + + def sources (self): + """ Returns the list of AbstractTargets which are used as sources. + The extra properties specified for sources are not represented. + The only used of this rule at the moment is the '--dump-tests' + feature of the test system. + """ + if self.source_targets_ == None: + self.source_targets_ = [] + for s in self.sources_: + self.source_targets_.append(resolve_reference(s, self.project_)[0]) + + return self.source_targets_ + + def requirements (self): + return self.requirements_ + + def default_build (self): + return self.default_build_ + + def common_properties (self, build_request, requirements): + """ Given build request and requirements, return properties + common to dependency build request and target build + properties. + """ + # For optimization, we add free unconditional requirements directly, + # without using complex algorithsm. + # This gives the complex algorithm better chance of caching results. + # The exact effect of this "optimization" is no longer clear + assert isinstance(build_request, property_set.PropertySet) + assert isinstance(requirements, property_set.PropertySet) + free_unconditional = [] + other = [] + for p in requirements.all(): + if p.feature.free and not p.condition and p.feature.name != 'conditional': + free_unconditional.append(p) + else: + other.append(p) + other = property_set.create(other) + + key = (build_request, other) + if key not in self.request_cache: + self.request_cache[key] = self.__common_properties2 (build_request, other) + + return self.request_cache[key].add_raw(free_unconditional) + + # Given 'context' -- a set of already present properties, and 'requirements', + # decide which extra properties should be applied to 'context'. + # For conditional requirements, this means evaluating condition. For + # indirect conditional requirements, this means calling a rule. Ordinary + # requirements are always applied. + # + # Handles situation where evaluating one conditional requirements affects + # condition of another conditional requirements, for example: + # + # <toolset>gcc:<variant>release <variant>release:<define>RELEASE + # + # If 'what' is 'refined' returns context refined with new requirements. + # If 'what' is 'added' returns just the requirements that must be applied. + def evaluate_requirements(self, requirements, context, what): + # Apply non-conditional requirements. + # It's possible that that further conditional requirement change + # a value set by non-conditional requirements. For example: + # + # exe a : a.cpp : <threading>single <toolset>foo:<threading>multi ; + # + # I'm not sure if this should be an error, or not, especially given that + # + # <threading>single + # + # might come from project's requirements. + assert isinstance(requirements, property_set.PropertySet) + assert isinstance(context, property_set.PropertySet) + assert isinstance(what, basestring) + unconditional = feature.expand(requirements.non_conditional()) + + context = context.refine(property_set.create(unconditional)) + + # We've collected properties that surely must be present in common + # properties. We now try to figure out what other properties + # should be added in order to satisfy rules (4)-(6) from the docs. + + conditionals = property_set.create(requirements.conditional()) + + # It's supposed that #conditionals iterations + # should be enough for properties to propagate along conditions in any + # direction. + max_iterations = len(conditionals.all()) +\ + len(requirements.get("<conditional>")) + 1 + + added_requirements = [] + current = context + + # It's assumed that ordinary conditional requirements can't add + # <indirect-conditional> properties, and that rules referred + # by <indirect-conditional> properties can't add new + # <indirect-conditional> properties. So the list of indirect conditionals + # does not change. + indirect = requirements.get("<conditional>") + + ok = 0 + for i in range(0, max_iterations): + + e = conditionals.evaluate_conditionals(current).all()[:] + + # Evaluate indirect conditionals. + for i in indirect: + new = None + i = b2.util.jam_to_value_maybe(i) + if callable(i): + # This is Python callable, yeah. + new = i(current) + else: + # Name of bjam function. Because bjam is unable to handle + # list of Property, pass list of strings. + br = b2.util.call_jam_function(i[1:], [str(p) for p in current.all()]) + if br: + new = property.create_from_strings(br) + if new: + new = property.translate_paths(new, self.project().location()) + e.extend(new) + + if e == added_requirements: + # If we got the same result, we've found final properties. + ok = 1 + break + else: + # Oops, results of evaluation of conditionals has changed. + # Also 'current' contains leftover from previous evaluation. + # Recompute 'current' using initial properties and conditional + # requirements. + added_requirements = e + current = context.refine(property_set.create(feature.expand(e))) + + if not ok: + self.manager().errors()("Can't evaluate conditional properties " + + str(conditionals)) + + + if what == "added": + return property_set.create(unconditional + added_requirements) + elif what == "refined": + return current + else: + self.manager().errors("Invalid value of the 'what' parameter") + + def __common_properties2(self, build_request, requirements): + # This guarantees that default properties are present + # in result, unless they are overridden by some requirement. + # TODO: There is possibility that we've added <foo>bar, which is composite + # and expands to <foo2>bar2, but default value of <foo2> is not bar2, + # in which case it's not clear what to do. + # + assert isinstance(build_request, property_set.PropertySet) + assert isinstance(requirements, property_set.PropertySet) + build_request = build_request.add_defaults() + # Featured added by 'add-default' can be composite and expand + # to features without default values -- so they are not added yet. + # It could be clearer/faster to expand only newly added properties + # but that's not critical. + build_request = build_request.expand() + + return self.evaluate_requirements(requirements, build_request, + "refined") + + def match (self, property_set_, debug): + """ Returns the alternative condition for this alternative, if + the condition is satisfied by 'property_set'. + """ + # The condition is composed of all base non-conditional properties. + # It's not clear if we should expand 'self.requirements_' or not. + # For one thing, it would be nice to be able to put + # <toolset>msvc-6.0 + # in requirements. + # On the other hand, if we have <variant>release in condition it + # does not make sense to require <optimization>full to be in + # build request just to select this variant. + assert isinstance(property_set_, property_set.PropertySet) + bcondition = self.requirements_.base () + ccondition = self.requirements_.conditional () + condition = b2.util.set.difference (bcondition, ccondition) + + if debug: + print " next alternative: required properties:", [str(p) for p in condition] + + if b2.util.set.contains (condition, property_set_.all()): + + if debug: + print " matched" + + return condition + + else: + return None + + + def generate_dependency_targets (self, target_ids, property_set_): + assert is_iterable_typed(target_ids, basestring) + assert isinstance(property_set_, property_set.PropertySet) + targets = [] + usage_requirements = [] + for id in target_ids: + + result = generate_from_reference(id, self.project_, property_set_) + targets += result.targets() + usage_requirements += result.usage_requirements().all() + + return (targets, usage_requirements) + + def generate_dependency_properties(self, properties, ps): + """ Takes a target reference, which might be either target id + or a dependency property, and generates that target using + 'property_set' as build request. + + Returns a tuple (result, usage_requirements). + """ + assert is_iterable_typed(properties, property.Property) + assert isinstance(ps, property_set.PropertySet) + result_properties = [] + usage_requirements = [] + for p in properties: + + result = generate_from_reference(p.value, self.project_, ps) + + for t in result.targets(): + result_properties.append(property.Property(p.feature, t)) + + usage_requirements += result.usage_requirements().all() + + return (result_properties, usage_requirements) + + + + + @user_error_checkpoint + def generate (self, ps): + """ Determines final build properties, generates sources, + and calls 'construct'. This method should not be + overridden. + """ + assert isinstance(ps, property_set.PropertySet) + self.manager_.errors().push_user_context( + "Generating target " + self.full_name(), self.user_context_) + + if self.manager().targets().logging(): + self.manager().targets().log( + "Building target '%s'" % self.name_) + self.manager().targets().increase_indent () + self.manager().targets().log( + "Build request: '%s'" % str (ps.raw ())) + cf = self.manager().command_line_free_features() + self.manager().targets().log( + "Command line free features: '%s'" % str (cf.raw ())) + self.manager().targets().log( + "Target requirements: %s'" % str (self.requirements().raw ())) + + self.manager().targets().push_target(self) + + if ps not in self.generated_: + + # Apply free features form the command line. If user + # said + # define=FOO + # he most likely want this define to be set for all compiles. + ps = ps.refine(self.manager().command_line_free_features()) + rproperties = self.common_properties (ps, self.requirements_) + + self.manager().targets().log( + "Common properties are '%s'" % str (rproperties)) + + if rproperties.get("<build>") != ["no"]: + + result = GenerateResult () + + properties = rproperties.non_dependency () + + (p, u) = self.generate_dependency_properties (rproperties.dependency (), rproperties) + properties += p + assert all(isinstance(p, property.Property) for p in properties) + usage_requirements = u + + (source_targets, u) = self.generate_dependency_targets (self.sources_, rproperties) + usage_requirements += u + + self.manager_.targets().log( + "Usage requirements for '%s' are '%s'" % (self.name_, usage_requirements)) + + # FIXME: + + rproperties = property_set.create(properties + usage_requirements) + usage_requirements = property_set.create (usage_requirements) + + self.manager_.targets().log( + "Build properties: '%s'" % str(rproperties)) + + source_targets += rproperties.get('<source>') + + # We might get duplicate sources, for example if + # we link to two library which have the same <library> in + # usage requirements. + # Use stable sort, since for some targets the order is + # important. E.g. RUN_PY target need python source to come + # first. + source_targets = unique(source_targets, stable=True) + + # FIXME: figure why this call messes up source_targets in-place + result = self.construct (self.name_, source_targets[:], rproperties) + + if result: + assert len(result) == 2 + gur = result [0] + result = result [1] + + if self.always_: + for t in result: + t.always() + + s = self.create_subvariant ( + result, + self.manager().virtual_targets().recent_targets(), ps, + source_targets, rproperties, usage_requirements) + self.manager().virtual_targets().clear_recent_targets() + + ur = self.compute_usage_requirements (s) + ur = ur.add (gur) + s.set_usage_requirements (ur) + + self.manager_.targets().log ( + "Usage requirements from '%s' are '%s'" % + (self.name(), str(rproperties))) + + self.generated_[ps] = GenerateResult (ur, result) + else: + self.generated_[ps] = GenerateResult (property_set.empty(), []) + else: + # If we just see <build>no, we cannot produce any reasonable + # diagnostics. The code that adds this property is expected + # to explain why a target is not built, for example using + # the configure.log-component-configuration function. + + # If this target fails to build, add <build>no to properties + # to cause any parent target to fail to build. Except that it + # - does not work now, since we check for <build>no only in + # common properties, but not in properties that came from + # dependencies + # - it's not clear if that's a good idea anyway. The alias + # target, for example, should not fail to build if a dependency + # fails. + self.generated_[ps] = GenerateResult( + property_set.create(["<build>no"]), []) + else: + self.manager().targets().log ("Already built") + + self.manager().targets().pop_target() + self.manager().targets().decrease_indent() + + return self.generated_[ps] + + def compute_usage_requirements (self, subvariant): + """ Given the set of generated targets, and refined build + properties, determines and sets appripriate usage requirements + on those targets. + """ + assert isinstance(subvariant, virtual_target.Subvariant) + rproperties = subvariant.build_properties () + xusage_requirements =self.evaluate_requirements( + self.usage_requirements_, rproperties, "added") + + # We generate all dependency properties and add them, + # as well as their usage requirements, to result. + (r1, r2) = self.generate_dependency_properties(xusage_requirements.dependency (), rproperties) + extra = r1 + r2 + + result = property_set.create (xusage_requirements.non_dependency () + extra) + + # Propagate usage requirements we've got from sources, except + # for the <pch-header> and <pch-file> features. + # + # That feature specifies which pch file to use, and should apply + # only to direct dependents. Consider: + # + # pch pch1 : ... + # lib lib1 : ..... pch1 ; + # pch pch2 : + # lib lib2 : pch2 lib1 ; + # + # Here, lib2 should not get <pch-header> property from pch1. + # + # Essentially, when those two features are in usage requirements, + # they are propagated only to direct dependents. We might need + # a more general mechanism, but for now, only those two + # features are special. + properties = [] + for p in subvariant.sources_usage_requirements().all(): + if p.feature.name not in ('pch-header', 'pch-file'): + properties.append(p) + if 'shared' in rproperties.get('link'): + new_properties = [] + for p in properties: + if p.feature.name != 'library': + new_properties.append(p) + properties = new_properties + + result = result.add_raw(properties) + return result + + def create_subvariant (self, root_targets, all_targets, + build_request, sources, + rproperties, usage_requirements): + """Creates a new subvariant-dg instances for 'targets' + - 'root-targets' the virtual targets will be returned to dependents + - 'all-targets' all virtual + targets created while building this main target + - 'build-request' is property-set instance with + requested build properties""" + assert is_iterable_typed(root_targets, virtual_target.VirtualTarget) + assert is_iterable_typed(all_targets, virtual_target.VirtualTarget) + assert isinstance(build_request, property_set.PropertySet) + assert is_iterable_typed(sources, virtual_target.VirtualTarget) + assert isinstance(rproperties, property_set.PropertySet) + assert isinstance(usage_requirements, property_set.PropertySet) + + for e in root_targets: + e.root (True) + + s = Subvariant (self, build_request, sources, + rproperties, usage_requirements, all_targets) + + for v in all_targets: + if not v.creating_subvariant(): + v.creating_subvariant(s) + + return s + + def construct (self, name, source_targets, properties): + """ Constructs the virtual targets for this abstract targets and + the dependency graph. Returns a tuple consisting of the properties and the list of virtual targets. + Should be overridden in derived classes. + """ + raise BaseException ("method should be defined in derived classes") + + +class TypedTarget (BasicTarget): + import generators + + def __init__ (self, name, project, type, sources, requirements, default_build, usage_requirements): + assert isinstance(type, basestring) + BasicTarget.__init__ (self, name, project, sources, requirements, default_build, usage_requirements) + self.type_ = type + + def __jam_repr__(self): + return b2.util.value_to_jam(self) + + def type (self): + return self.type_ + + def construct (self, name, source_targets, prop_set): + assert isinstance(name, basestring) + assert is_iterable_typed(source_targets, virtual_target.VirtualTarget) + assert isinstance(prop_set, property_set.PropertySet) + r = generators.construct (self.project_, os.path.splitext(name)[0], + self.type_, + prop_set.add_raw(['<main-target-type>' + self.type_]), + source_targets, True) + + if not r: + print "warning: Unable to construct '%s'" % self.full_name () + + # Are there any top-level generators for this type/property set. + if not generators.find_viable_generators (self.type_, prop_set): + print "error: no generators were found for type '" + self.type_ + "'" + print "error: and the requested properties" + print "error: make sure you've configured the needed tools" + print "See https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration" + + print "To debug this problem, try the --debug-generators option." + sys.exit(1) + + return r + +def apply_default_build(property_set_, default_build): + # 1. First, see what properties from default_build + # are already present in property_set. + assert isinstance(property_set_, property_set.PropertySet) + assert isinstance(default_build, property_set.PropertySet) + + defaults_to_apply = [] + for d in default_build.all(): + if not property_set_.get(d.feature): + defaults_to_apply.append(d) + + # 2. If there's any defaults to be applied, form the new + # build request. Pass it throw 'expand-no-defaults', since + # default_build might contain "release debug", which will + # result in two property_sets. + result = [] + if defaults_to_apply: + + # We have to compress subproperties here to prevent + # property lists like: + # + # <toolset>msvc <toolset-msvc:version>7.1 <threading>multi + # + # from being expanded into: + # + # <toolset-msvc:version>7.1/<threading>multi + # <toolset>msvc/<toolset-msvc:version>7.1/<threading>multi + # + # due to cross-product property combination. That may + # be an indication that + # build_request.expand-no-defaults is the wrong rule + # to use here. + properties = build_request.expand_no_defaults( + [property_set.create([p]) for p in + feature.compress_subproperties(property_set_.all()) + defaults_to_apply] + ) + + if properties: + for p in properties: + result.append(property_set.create(feature.expand(p.all()))) + else: + result = [property_set.empty()] + + else: + result.append (property_set_) + + return result + + +def create_typed_metatarget(name, type, sources, requirements, default_build, usage_requirements): + assert isinstance(name, basestring) + assert isinstance(type, basestring) + assert is_iterable_typed(requirements, basestring) + assert is_iterable_typed(default_build, basestring) + assert is_iterable_typed(usage_requirements, basestring) + + from b2.manager import get_manager + t = get_manager().targets() + + project = get_manager().projects().current() + + return t.main_target_alternative( + TypedTarget(name, project, type, + t.main_target_sources(sources, name), + t.main_target_requirements(requirements, project), + t.main_target_default_build(default_build, project), + t.main_target_usage_requirements(usage_requirements, project))) + + +def create_metatarget(klass, name, sources, requirements=[], default_build=[], usage_requirements=[]): + assert isinstance(name, basestring) + assert is_iterable_typed(sources, basestring) + assert is_iterable_typed(requirements, basestring) + assert is_iterable_typed(default_build, basestring) + assert is_iterable_typed(usage_requirements, basestring) + from b2.manager import get_manager + t = get_manager().targets() + + project = get_manager().projects().current() + + return t.main_target_alternative( + klass(name, project, + t.main_target_sources(sources, name), + t.main_target_requirements(requirements, project), + t.main_target_default_build(default_build, project), + t.main_target_usage_requirements(usage_requirements, project))) + +def metatarget_function_for_class(class_): + + @bjam_signature((["name"], ["sources", "*"], ["requirements", "*"], + ["default_build", "*"], ["usage_requirements", "*"])) + def create_metatarget(name, sources, requirements = [], default_build = None, usage_requirements = []): + + from b2.manager import get_manager + t = get_manager().targets() + + project = get_manager().projects().current() + + return t.main_target_alternative( + class_(name, project, + t.main_target_sources(sources, name), + t.main_target_requirements(requirements, project), + t.main_target_default_build(default_build, project), + t.main_target_usage_requirements(usage_requirements, project))) + + return create_metatarget diff --git a/src/boost/tools/build/src/build/toolset.jam b/src/boost/tools/build/src/build/toolset.jam new file mode 100644 index 000000000..a632605cc --- /dev/null +++ b/src/boost/tools/build/src/build/toolset.jam @@ -0,0 +1,703 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2005 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Support for toolset definition. + +import errors ; +import feature ; +import generators ; +import numbers ; +import path ; +import property ; +import regex ; +import sequence ; +import set ; +import property-set ; +import order ; +import "class" : new ; +import utility ; + + +.flag-no = 1 ; + +.ignore-requirements = ; + +# This is used only for testing, to make sure we do not get random extra +# elements in paths. +if --ignore-toolset-requirements in [ modules.peek : ARGV ] +{ + .ignore-requirements = 1 ; +} + + +# Initializes an additional toolset-like module. First load the 'toolset-module' +# and then calls its 'init' rule with trailing arguments. +# +rule using ( toolset-module : * ) +{ + import $(toolset-module) ; + $(toolset-module).init $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) + ; +} + + +# Expands subfeatures in each property sets, e.g. '<toolset>gcc-3.2' will be +# converted to '<toolset>gcc/<toolset-version>3.2'. +# +local rule normalize-condition ( property-sets * ) +{ + local result ; + for local p in $(property-sets) + { + local split = [ feature.split $(p) ] ; + local expanded = [ feature.expand-subfeatures [ feature.split $(p) ] ] ; + result += $(expanded:J=/) ; + } + return $(result) ; +} + + +# Specifies if the 'flags' rule should check that the invoking module is the +# same as the module we are setting the flag for. 'v' can be either 'checked' or +# 'unchecked'. Subsequent call to 'pop-checking-for-flags-module' will restore +# the setting that was in effect before calling this rule. +# +rule push-checking-for-flags-module ( v ) +{ + .flags-module-checking = $(v) $(.flags-module-checking) ; +} + +rule pop-checking-for-flags-module ( ) +{ + .flags-module-checking = $(.flags-module-checking[2-]) ; +} + + +# Specifies features that are referenced by the action rule. +# This is necessary in order to detect that these features +# are relevant. +# +rule uses-features ( rule-or-module : features * : unchecked ? ) +{ + local caller = [ CALLER_MODULE ] ; + if ! [ MATCH ".*([.]).*" : $(rule-or-module) ] + && [ MATCH "(Jamfile<.*)" : $(caller) ] + { + # Unqualified rule name, used inside Jamfile. Most likely used with + # 'make' or 'notfile' rules. This prevents setting flags on the entire + # Jamfile module (this will be considered as rule), but who cares? + # Probably, 'flags' rule should be split into 'flags' and + # 'flags-on-module'. + rule-or-module = $(caller).$(rule-or-module) ; + } + else + { + local module_ = [ MATCH "([^.]*).*" : $(rule-or-module) ] ; + if $(unchecked) != unchecked + && $(.flags-module-checking[1]) != unchecked + && $(module_) != $(caller) + { + errors.error "Module $(caller) attempted to set flags for module $(module_)" ; + } + } + .uses-features.$(rule-or-module) += $(features) ; +} + +# Specifies the flags (variables) that must be set on targets under certain +# conditions, described by arguments. +# +rule flags ( + rule-or-module # If contains a dot, should be a rule name. The flags will + # be applied when that rule is used to set up build + # actions. + # + # If does not contain dot, should be a module name. The + # flag will be applied for all rules in that module. If + # module for rule is different from the calling module, an + # error is issued. + + variable-name # Variable that should be set on target. + condition * : # A condition when this flag should be applied. Should be a + # set of property sets. If one of those property sets is + # contained in the build properties, the flag will be used. + # Implied values are not allowed: "<toolset>gcc" should be + # used, not just "gcc". Subfeatures, like in + # "<toolset>gcc-3.2" are allowed. If left empty, the flag + # will be used unconditionally. + # + # Property sets may use value-less properties ('<a>' vs. + # '<a>value') to match absent properties. This allows to + # separately match: + # + # <architecture>/<address-model>64 + # <architecture>ia64/<address-model> + # + # Where both features are optional. Without this syntax + # we would be forced to define "default" values. + + values * : # The value to add to variable. If <feature> is specified, + # then the value of 'feature' will be added. + unchecked ? # If value 'unchecked' is passed, will not test that flags + # are set for the calling module. + : hack-hack ? # For + # flags rule OPTIONS <cxx-abi> : -model ansi + # Treat <cxx-abi> as condition + # FIXME: ugly hack. +) +{ + local caller = [ CALLER_MODULE ] ; + if ! [ MATCH ".*([.]).*" : $(rule-or-module) ] + && [ MATCH "(Jamfile<.*)" : $(caller) ] + { + # Unqualified rule name, used inside Jamfile. Most likely used with + # 'make' or 'notfile' rules. This prevents setting flags on the entire + # Jamfile module (this will be considered as rule), but who cares? + # Probably, 'flags' rule should be split into 'flags' and + # 'flags-on-module'. + rule-or-module = $(caller).$(rule-or-module) ; + } + else + { + local module_ = [ MATCH "([^.]*).*" : $(rule-or-module) ] ; + if $(unchecked) != unchecked + && $(.flags-module-checking[1]) != unchecked + && $(module_) != $(caller) + { + errors.error "Module $(caller) attempted to set flags for module $(module_)" ; + } + } + + if $(condition) && ! $(condition:G=) && ! $(hack-hack) + { + # We have condition in the form '<feature>', that is, without value. + # That is an older syntax: + # flags gcc.link RPATH <dll-path> ; + # for compatibility, convert it to + # flags gcc.link RPATH : <dll-path> ; + values = $(condition) ; + condition = ; + } + + if $(condition) + { + property.validate-property-sets $(condition) ; + condition = [ normalize-condition $(condition) ] ; + } + + add-flag $(rule-or-module) : $(variable-name) : $(condition) : $(values) ; +} + + +# Adds a new flag setting with the specified values. Does no checking. +# +local rule add-flag ( rule-or-module : variable-name : condition * : values * ) +{ + .$(rule-or-module).flags += $(.flag-no) ; + + # Store all flags for a module. + local module_ = [ MATCH "([^.]*).*" : $(rule-or-module) ] ; + .module-flags.$(module_) += $(.flag-no) ; + # Store flag-no -> rule-or-module mapping. + .rule-or-module.$(.flag-no) = $(rule-or-module) ; + + .$(rule-or-module).variable.$(.flag-no) += $(variable-name) ; + .$(rule-or-module).values.$(.flag-no) += $(values) ; + .$(rule-or-module).condition.$(.flag-no) += $(condition) ; + + .flag-no = [ numbers.increment $(.flag-no) ] ; +} + + +# Returns the first element of 'property-sets' which is a subset of +# 'properties' or an empty list if no such element exists. +# +rule find-property-subset ( property-sets * : properties * ) +{ + # Cut property values off. + local prop-keys = $(properties:G) ; + + local result ; + for local s in $(property-sets) + { + if ! $(result) + { + # Handle value-less properties like '<architecture>' (compare with + # '<architecture>x86'). + + local set = [ feature.split $(s) ] ; + + # Find the set of features that + # - have no property specified in required property set + # - are omitted in the build property set. + local default-props ; + for local i in $(set) + { + # If $(i) is a value-less property it should match default value + # of an optional property. See the first line in the example + # below: + # + # property set properties result + # <a> <b>foo <b>foo match + # <a> <b>foo <a>foo <b>foo no match + # <a>foo <b>foo <b>foo no match + # <a>foo <b>foo <a>foo <b>foo match + if ! ( $(i:G=) || ( $(i:G) in $(prop-keys) ) ) + { + default-props += $(i) ; + } + } + + if $(set) in $(properties) $(default-props) + { + result = $(s) ; + } + } + } + return $(result) ; +} + + +# Returns a value to be added to some flag for some target based on the flag's +# value definition and the given target's property set. +# +rule handle-flag-value ( value * : properties * ) +{ + local result ; + if $(value:G) + { + local matches = [ property.select $(value) : $(properties) ] ; + local order ; + for local p in $(matches) + { + local att = [ feature.attributes $(p:G) ] ; + if dependency in $(att) + { + # The value of a dependency feature is a target and needs to be + # actualized. + result += [ $(p:G=).actualize ] ; + } + else if path in $(att) || free in $(att) + { + local values ; + # Treat features with && in the value specially -- each + # &&-separated element is considered a separate value. This is + # needed to handle searched libraries or include paths, which + # may need to be in a specific order. + if ! [ MATCH (&&) : $(p:G=) ] + { + values = $(p:G=) ; + } + else + { + values = [ regex.split $(p:G=) "&&" ] ; + } + if path in $(att) + { + values = [ sequence.transform path.native : $(values) ] ; + } + result += $(values) ; + if $(values[2]) + { + if ! $(order) + { + order = [ new order ] ; + } + local prev ; + for local v in $(values) + { + if $(prev) + { + $(order).add-pair $(prev) $(v) ; + } + prev = $(v) ; + } + } + } + else + { + result += $(p:G=) ; + } + } + if $(order) + { + result = [ $(order).order [ sequence.unique $(result) : stable ] ] ; + DELETE_MODULE $(order) ; + } + } + else + { + result += $(value) ; + } + return $(result) ; +} + + +# Given a rule name and a property set, returns a list of interleaved variables +# names and values which must be set on targets for that rule/property-set +# combination. +# +rule set-target-variables-aux ( rule-or-module : property-set ) +{ + local result ; + properties = [ $(property-set).raw ] ; + for local f in $(.$(rule-or-module).flags) + { + local variable = $(.$(rule-or-module).variable.$(f)) ; + local condition = $(.$(rule-or-module).condition.$(f)) ; + local values = $(.$(rule-or-module).values.$(f)) ; + + if ! $(condition) || + [ find-property-subset $(condition) : $(properties) ] + { + local processed ; + for local v in $(values) + { + # The value might be <feature-name> so needs special treatment. + processed += [ handle-flag-value $(v) : $(properties) ] ; + } + for local r in $(processed) + { + result += $(variable) $(r) ; + } + } + } + + # Strip away last dot separated part and recurse. + local next = [ MATCH "^(.+)\\.([^\\.])*" : $(rule-or-module) ] ; + if $(next) + { + result += [ set-target-variables-aux $(next[1]) : $(property-set) ] ; + } + return $(result) ; +} + +rule relevant-features ( rule-or-module ) +{ + local result ; + if ! $(.relevant-features.$(rule-or-module)) + { + for local f in $(.$(rule-or-module).flags) + { + local condition = $(.$(rule-or-module).condition.$(f)) ; + local values = $(.$(rule-or-module).values.$(f)) ; + + for local c in $(condition) + { + for local p in [ feature.split $(c) ] + { + if $(p:G) + { + result += $(p:G) ; + } + else + { + local temp = [ feature.expand-subfeatures $(p) ] ; + result += $(temp:G) ; + } + } + } + + for local v in $(values) + { + if $(v:G) + { + result += $(v:G) ; + } + } + } + + # Strip away last dot separated part and recurse. + local next = [ MATCH "^(.+)\\.([^\\.])*" : $(rule-or-module) ] ; + if $(next) + { + result += [ relevant-features $(next[1]) ] ; + } + result = [ sequence.unique $(result) ] ; + if $(result[1]) = "" + { + result = $(result) ; + } + .relevant-features.$(rule-or-module) = $(result) ; + return $(result) ; + } + else + { + return $(.relevant-features.$(rule-or-module)) ; + } +} + +# Returns a list of all the features which were +# passed to uses-features. +local rule used-features ( rule-or-module ) +{ + if ! $(.used-features.$(rule-or-module)) + { + local result = $(.uses-features.$(rule-or-module)) ; + + # Strip away last dot separated part and recurse. + local next = [ MATCH "^(.+)\\.([^\\.])*" : $(rule-or-module) ] ; + if $(next) + { + result += [ used-features $(next[1]) ] ; + } + result = [ sequence.unique $(result) ] ; + if $(result[1]) = "" + { + result = $(result) ; + } + .used-features.$(rule-or-module) = $(result) ; + return $(result) ; + } + else + { + return $(.used-features.$(rule-or-module)) ; + } +} + +rule filter-property-set ( rule-or-module : property-set ) +{ + local key = .filtered.property-set.$(rule-or-module).$(property-set) ; + if ! $($(key)) + { + local relevant = [ relevant-features $(rule-or-module) ] ; + local result ; + for local p in [ $(property-set).raw ] + { + if $(p:G) in $(relevant) + { + result += $(p) ; + } + } + $(key) = [ property-set.create $(result) ] ; + } + return $($(key)) ; +} + +rule set-target-variables ( rule-or-module targets + : property-set ) +{ + property-set = [ filter-property-set $(rule-or-module) : $(property-set) ] ; + local key = .stv.$(rule-or-module).$(property-set) ; + local settings = $($(key)) ; + if ! $(settings) + { + settings = [ set-target-variables-aux $(rule-or-module) : + $(property-set) ] ; + + if ! $(settings) + { + settings = none ; + } + $(key) = $(settings) ; + } + + if $(settings) != none + { + local var-name = ; + for local name-or-value in $(settings) + { + if $(var-name) + { + $(var-name) on $(targets) += $(name-or-value) ; + var-name = ; + } + else + { + var-name = $(name-or-value) ; + } + } + } +} + + +# Returns a property-set indicating which features are relevant +# for the given rule. +# +rule relevant ( rule-name ) +{ + if ! $(.relevant-features-ps.$(rule-name)) + { + local features = [ sequence.transform utility.ungrist : + [ relevant-features $(rule-name) ] + [ used-features $(rule-name) ] ] ; + .relevant-features-ps.$(rule-name) = + [ property-set.create <relevant>$(features) ] ; + } + return $(.relevant-features-ps.$(rule-name)) ; +} + + +# Make toolset 'toolset', defined in a module of the same name, inherit from +# 'base'. +# 1. The 'init' rule from 'base' is imported into 'toolset' with full name. +# Another 'init' is called, which forwards to the base one. +# 2. All generators from 'base' are cloned. The ids are adjusted and <toolset> +# property in requires is adjusted too. +# 3. All flags are inherited. +# 4. All rules are imported. +# +rule inherit ( toolset : base ) +{ + import $(base) ; + inherit-generators $(toolset) : $(base) ; + inherit-flags $(toolset) : $(base) ; + inherit-rules $(toolset) : $(base) ; +} + + +rule inherit-generators ( toolset properties * : base : generators-to-ignore * ) +{ + properties ?= <toolset>$(toolset) ; + local base-generators = [ generators.generators-for-toolset $(base) ] ; + for local g in $(base-generators) + { + local id = [ $(g).id ] ; + + if ! $(id) in $(generators-to-ignore) + { + # Some generator names have multiple periods in their name, so + # $(id:B=$(toolset)) does not generate the right new-id name. E.g. + # if id = gcc.compile.c++ then $(id:B=darwin) = darwin.c++, which is + # not what we want. Manually parse the base and suffix. If there is + # a better way to do this, I would love to see it. See also the + # register() rule in the generators module. + local base = $(id) ; + local suffix = "" ; + while $(base:S) + { + suffix = $(base:S)$(suffix) ; + base = $(base:B) ; + } + local new-id = $(toolset)$(suffix) ; + + generators.register [ $(g).clone $(new-id) : $(properties) ] ; + } + } +} + + +# Brings all flag definitions from the 'base' toolset into the 'toolset' +# toolset. Flag definitions whose conditions make use of properties in +# 'prohibited-properties' are ignored. Do not confuse property and feature, for +# example <debug-symbols>on and <debug-symbols>off, so blocking one of them does +# not block the other one. +# +# The flag conditions are not altered at all, so if a condition includes a name, +# or version of a base toolset, it will not ever match the inheriting toolset. +# When such flag settings must be inherited, define a rule in base toolset +# module and call it as needed. +# +rule inherit-flags ( toolset : base : prohibited-properties * : prohibited-vars * ) +{ + for local f in $(.module-flags.$(base)) + { + local rule-or-module = $(.rule-or-module.$(f)) ; + if ( [ set.difference + $(.$(rule-or-module).condition.$(f)) : + $(prohibited-properties) ] + || ! $(.$(rule-or-module).condition.$(f)) + ) && ( ! $(.$(rule-or-module).variable.$(f)) in $(prohibited-vars) ) + { + local rule_ = [ MATCH "[^.]*\.(.*)" : $(rule-or-module) ] ; + local new-rule-or-module ; + if $(rule_) + { + new-rule-or-module = $(toolset).$(rule_) ; + } + else + { + new-rule-or-module = $(toolset) ; + } + + add-flag + $(new-rule-or-module) + : $(.$(rule-or-module).variable.$(f)) + : $(.$(rule-or-module).condition.$(f)) + : $(.$(rule-or-module).values.$(f)) ; + } + } +} + + +rule inherit-rules ( toolset : base : localize ? ) +{ + # It appears that "action" creates a local rule. + local base-generators = [ generators.generators-for-toolset $(base) ] ; + local rules ; + for local g in $(base-generators) + { + rules += [ MATCH "[^.]*\.(.*)" : [ $(g).rule-name ] ] ; + } + rules = [ sequence.unique $(rules) ] ; + IMPORT $(base) : $(rules) : $(toolset) : $(rules) : $(localize) ; + IMPORT $(toolset) : $(rules) : : $(toolset).$(rules) ; +} + +.requirements = [ property-set.empty ] ; + +# Return the list of global 'toolset requirements'. Those requirements will be +# automatically added to the requirements of any main target. +# +rule requirements ( ) +{ + return $(.requirements) ; +} + + +# Adds elements to the list of global 'toolset requirements'. The requirements +# will be automatically added to the requirements for all main targets, as if +# they were specified literally. For best results, all requirements added should +# be conditional or indirect conditional. +# +rule add-requirements ( requirements * ) +{ + if ! $(.ignore-requirements) + { + requirements = [ property.translate-indirect $(requirements) : [ CALLER_MODULE ] ] ; + requirements = [ property.expand-subfeatures-in-conditions $(requirements) ] ; + requirements = [ property.make $(requirements) ] ; + .requirements = [ $(.requirements).add-raw $(requirements) ] ; + } +} + +# Returns the global toolset defaults. +# +.defaults = [ property-set.empty ] ; + +rule defaults ( ) +{ + return $(.defaults) ; +} + +# Add elements to the list of global toolset defaults. These properties +# should be conditional and will override the default value of the feature. +# Do not use this for non-conditionals. Use feature.set-default instead. +# +rule add-defaults ( properties * ) +{ + if ! $(.ignore-requirements) + { + properties = [ property.translate-indirect $(properties) : [ CALLER_MODULE ] ] ; + properties = [ property.expand-subfeatures-in-conditions $(properties) ] ; + properties = [ property.make $(properties) ] ; + .defaults = [ $(.defaults).add-raw $(properties) ] ; + } +} + + +rule __test__ ( ) +{ + import assert ; + local p = <b>0 <c>1 <d>2 <e>3 <f>4 ; + assert.result <c>1/<d>2/<e>3 : find-property-subset <c>1/<d>2/<e>3 <a>0/<b>0/<c>1 <d>2/<e>5 <a>9 : $(p) ; + assert.result : find-property-subset <a>0/<b>0/<c>9/<d>9/<e>5 <a>9 : $(p) ; + + local p-set = <a>/<b> <a>0/<b> <a>/<b>1 <a>0/<b>1 ; + assert.result <a>/<b> : find-property-subset $(p-set) : ; + assert.result <a>0/<b> : find-property-subset $(p-set) : <a>0 <c>2 ; + assert.result <a>/<b>1 : find-property-subset $(p-set) : <b>1 <c>2 ; + assert.result <a>0/<b>1 : find-property-subset $(p-set) : <a>0 <b>1 ; +} diff --git a/src/boost/tools/build/src/build/toolset.py b/src/boost/tools/build/src/build/toolset.py new file mode 100644 index 000000000..6e68cecb7 --- /dev/null +++ b/src/boost/tools/build/src/build/toolset.py @@ -0,0 +1,417 @@ +# Status: being ported by Vladimir Prus +# Base revision: 40958 +# +# Copyright 2003 Dave Abrahams +# Copyright 2005 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +""" Support for toolset definition. +""" +import sys + +import feature, property, generators, property_set +import b2.util.set +import bjam + +from b2.util import cached, qualify_jam_action, is_iterable_typed, is_iterable +from b2.util.utility import * +from b2.util import bjam_signature, sequence +from b2.manager import get_manager + +__re_split_last_segment = re.compile (r'^(.+)\.([^\.])*') +__re_two_ampersands = re.compile ('(&&)') +__re_first_segment = re.compile ('([^.]*).*') +__re_first_group = re.compile (r'[^.]*\.(.*)') +_ignore_toolset_requirements = '--ignore-toolset-requirements' not in sys.argv + +# Flag is a mechanism to set a value +# A single toolset flag. Specifies that when certain +# properties are in build property set, certain values +# should be appended to some variable. +# +# A flag applies to a specific action in specific module. +# The list of all flags for a module is stored, and each +# flag further contains the name of the rule it applies +# for, +class Flag: + + def __init__(self, variable_name, values, condition, rule = None): + assert isinstance(variable_name, basestring) + assert is_iterable(values) and all( + isinstance(v, (basestring, type(None))) for v in values) + assert is_iterable_typed(condition, property_set.PropertySet) + assert isinstance(rule, (basestring, type(None))) + self.variable_name = variable_name + self.values = values + self.condition = condition + self.rule = rule + + def __str__(self): + return("Flag(" + str(self.variable_name) + ", " + str(self.values) +\ + ", " + str(self.condition) + ", " + str(self.rule) + ")") + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + """ + global __module_flags, __flags, __stv + + # Mapping from module name to a list of all flags that apply + # to either that module directly, or to any rule in that module. + # Each element of the list is Flag instance. + # So, for module named xxx this might contain flags for 'xxx', + # for 'xxx.compile', for 'xxx.compile.c++', etc. + __module_flags = {} + + # Mapping from specific rule or module name to a list of Flag instances + # that apply to that name. + # Say, it might contain flags for 'xxx.compile.c++'. If there are + # entries for module name 'xxx', they are flags for 'xxx' itself, + # not including any rules in that module. + __flags = {} + + # A cache for variable settings. The key is generated from the rule name and the properties. + __stv = {} + +reset () + +# FIXME: --ignore-toolset-requirements +def using(toolset_module, *args): + if isinstance(toolset_module, (list, tuple)): + toolset_module = toolset_module[0] + loaded_toolset_module= get_manager().projects().load_module(toolset_module, [os.getcwd()]); + loaded_toolset_module.init(*args) + +# FIXME push-checking-for-flags-module .... +# FIXME: investigate existing uses of 'hack-hack' parameter +# in jam code. + +@bjam_signature((["rule_or_module", "variable_name", "condition", "*"], + ["values", "*"])) +def flags(rule_or_module, variable_name, condition, values = []): + """ Specifies the flags (variables) that must be set on targets under certain + conditions, described by arguments. + rule_or_module: If contains dot, should be a rule name. + The flags will be applied when that rule is + used to set up build actions. + + If does not contain dot, should be a module name. + The flags will be applied for all rules in that + module. + If module for rule is different from the calling + module, an error is issued. + + variable_name: Variable that should be set on target + + condition A condition when this flag should be applied. + Should be set of property sets. If one of + those property sets is contained in build + properties, the flag will be used. + Implied values are not allowed: + "<toolset>gcc" should be used, not just + "gcc". Subfeatures, like in "<toolset>gcc-3.2" + are allowed. If left empty, the flag will + always used. + + Property sets may use value-less properties + ('<a>' vs. '<a>value') to match absent + properties. This allows to separately match + + <architecture>/<address-model>64 + <architecture>ia64/<address-model> + + Where both features are optional. Without this + syntax we'd be forced to define "default" value. + + values: The value to add to variable. If <feature> + is specified, then the value of 'feature' + will be added. + """ + assert isinstance(rule_or_module, basestring) + assert isinstance(variable_name, basestring) + assert is_iterable_typed(condition, basestring) + assert is_iterable(values) and all(isinstance(v, (basestring, type(None))) for v in values) + caller = bjam.caller() + if not '.' in rule_or_module and caller and caller[:-1].startswith("Jamfile"): + # Unqualified rule name, used inside Jamfile. Most likely used with + # 'make' or 'notfile' rules. This prevents setting flags on the entire + # Jamfile module (this will be considered as rule), but who cares? + # Probably, 'flags' rule should be split into 'flags' and + # 'flags-on-module'. + rule_or_module = qualify_jam_action(rule_or_module, caller) + else: + # FIXME: revive checking that we don't set flags for a different + # module unintentionally + pass + + if condition and not replace_grist (condition, ''): + # We have condition in the form '<feature>', that is, without + # value. That's a previous syntax: + # + # flags gcc.link RPATH <dll-path> ; + # for compatibility, convert it to + # flags gcc.link RPATH : <dll-path> ; + values = [ condition ] + condition = None + + if condition: + transformed = [] + for c in condition: + # FIXME: 'split' might be a too raw tool here. + pl = [property.create_from_string(s,False,True) for s in c.split('/')] + pl = feature.expand_subfeatures(pl); + transformed.append(property_set.create(pl)) + condition = transformed + + property.validate_property_sets(condition) + + __add_flag (rule_or_module, variable_name, condition, values) + +def set_target_variables (manager, rule_or_module, targets, ps): + """ + """ + assert isinstance(rule_or_module, basestring) + assert is_iterable_typed(targets, basestring) + assert isinstance(ps, property_set.PropertySet) + settings = __set_target_variables_aux(manager, rule_or_module, ps) + + if settings: + for s in settings: + for target in targets: + manager.engine ().set_target_variable (target, s [0], s[1], True) + +def find_satisfied_condition(conditions, ps): + """Returns the first element of 'property-sets' which is a subset of + 'properties', or an empty list if no such element exists.""" + assert is_iterable_typed(conditions, property_set.PropertySet) + assert isinstance(ps, property_set.PropertySet) + + for condition in conditions: + + found_all = True + for i in condition.all(): + + if i.value: + found = i.value in ps.get(i.feature) + else: + # Handle value-less properties like '<architecture>' (compare with + # '<architecture>x86'). + # If $(i) is a value-less property it should match default + # value of an optional property. See the first line in the + # example below: + # + # property set properties result + # <a> <b>foo <b>foo match + # <a> <b>foo <a>foo <b>foo no match + # <a>foo <b>foo <b>foo no match + # <a>foo <b>foo <a>foo <b>foo match + found = not ps.get(i.feature) + + found_all = found_all and found + + if found_all: + return condition + + return None + + +def register (toolset): + """ Registers a new toolset. + """ + assert isinstance(toolset, basestring) + feature.extend('toolset', [toolset]) + +def inherit_generators (toolset, properties, base, generators_to_ignore = []): + assert isinstance(toolset, basestring) + assert is_iterable_typed(properties, basestring) + assert isinstance(base, basestring) + assert is_iterable_typed(generators_to_ignore, basestring) + if not properties: + properties = [replace_grist (toolset, '<toolset>')] + + base_generators = generators.generators_for_toolset(base) + + for g in base_generators: + id = g.id() + + if not id in generators_to_ignore: + # Some generator names have multiple periods in their name, so + # $(id:B=$(toolset)) doesn't generate the right new_id name. + # e.g. if id = gcc.compile.c++, $(id:B=darwin) = darwin.c++, + # which is not what we want. Manually parse the base and suffix + # (if there's a better way to do this, I'd love to see it.) + # See also register in module generators. + (base, suffix) = split_action_id(id) + + new_id = toolset + '.' + suffix + + generators.register(g.clone(new_id, properties)) + +def inherit_flags(toolset, base, prohibited_properties = []): + """Brings all flag definitions from the 'base' toolset into the 'toolset' + toolset. Flag definitions whose conditions make use of properties in + 'prohibited-properties' are ignored. Don't confuse property and feature, for + example <debug-symbols>on and <debug-symbols>off, so blocking one of them does + not block the other one. + + The flag conditions are not altered at all, so if a condition includes a name, + or version of a base toolset, it won't ever match the inheriting toolset. When + such flag settings must be inherited, define a rule in base toolset module and + call it as needed.""" + assert isinstance(toolset, basestring) + assert isinstance(base, basestring) + assert is_iterable_typed(prohibited_properties, basestring) + for f in __module_flags.get(base, []): + + if not f.condition or b2.util.set.difference(f.condition, prohibited_properties): + match = __re_first_group.match(f.rule) + rule_ = None + if match: + rule_ = match.group(1) + + new_rule_or_module = '' + + if rule_: + new_rule_or_module = toolset + '.' + rule_ + else: + new_rule_or_module = toolset + + __add_flag (new_rule_or_module, f.variable_name, f.condition, f.values) + + +def inherit_rules(toolset, base): + engine = get_manager().engine() + new_actions = {} + for action_name, action in engine.actions.iteritems(): + module, id = split_action_id(action_name) + if module == base: + new_action_name = toolset + '.' + id + # make sure not to override any existing actions + # that may have been declared already + if new_action_name not in engine.actions: + new_actions[new_action_name] = action + + engine.actions.update(new_actions) + +###################################################################################### +# Private functions + +@cached +def __set_target_variables_aux (manager, rule_or_module, ps): + """ Given a rule name and a property set, returns a list of tuples of + variables names and values, which must be set on targets for that + rule/properties combination. + """ + assert isinstance(rule_or_module, basestring) + assert isinstance(ps, property_set.PropertySet) + result = [] + + for f in __flags.get(rule_or_module, []): + + if not f.condition or find_satisfied_condition (f.condition, ps): + processed = [] + for v in f.values: + # The value might be <feature-name> so needs special + # treatment. + processed += __handle_flag_value (manager, v, ps) + + for r in processed: + result.append ((f.variable_name, r)) + + # strip away last dot separated part and recurse. + next = __re_split_last_segment.match(rule_or_module) + + if next: + result.extend(__set_target_variables_aux( + manager, next.group(1), ps)) + + return result + +def __handle_flag_value (manager, value, ps): + assert isinstance(value, basestring) + assert isinstance(ps, property_set.PropertySet) + result = [] + + if get_grist (value): + f = feature.get(value) + values = ps.get(f) + + for value in values: + + if f.dependency: + # the value of a dependency feature is a target + # and must be actualized + result.append(value.actualize()) + + elif f.path or f.free: + + # Treat features with && in the value + # specially -- each &&-separated element is considered + # separate value. This is needed to handle searched + # libraries, which must be in specific order. + if not __re_two_ampersands.search(value): + result.append(value) + + else: + result.extend(value.split ('&&')) + else: + result.append (value) + else: + result.append (value) + + return sequence.unique(result, stable=True) + +def __add_flag (rule_or_module, variable_name, condition, values): + """ Adds a new flag setting with the specified values. + Does no checking. + """ + assert isinstance(rule_or_module, basestring) + assert isinstance(variable_name, basestring) + assert is_iterable_typed(condition, property_set.PropertySet) + assert is_iterable(values) and all( + isinstance(v, (basestring, type(None))) for v in values) + f = Flag(variable_name, values, condition, rule_or_module) + + # Grab the name of the module + m = __re_first_segment.match (rule_or_module) + assert m + module = m.group(1) + + __module_flags.setdefault(module, []).append(f) + __flags.setdefault(rule_or_module, []).append(f) + +__requirements = [] + +def requirements(): + """Return the list of global 'toolset requirements'. + Those requirements will be automatically added to the requirements of any main target.""" + return __requirements + +def add_requirements(requirements): + """Adds elements to the list of global 'toolset requirements'. The requirements + will be automatically added to the requirements for all main targets, as if + they were specified literally. For best results, all requirements added should + be conditional or indirect conditional.""" + assert is_iterable_typed(requirements, basestring) + + if _ignore_toolset_requirements: + __requirements.extend(requirements) + + +# Make toolset 'toolset', defined in a module of the same name, +# inherit from 'base' +# 1. The 'init' rule from 'base' is imported into 'toolset' with full +# name. Another 'init' is called, which forwards to the base one. +# 2. All generators from 'base' are cloned. The ids are adjusted and +# <toolset> property in requires is adjusted too +# 3. All flags are inherited +# 4. All rules are imported. +def inherit(toolset, base): + assert isinstance(toolset, basestring) + assert isinstance(base, basestring) + get_manager().projects().load_module(base, ['.']); + + inherit_generators(toolset, [], base) + inherit_flags(toolset, base) + inherit_rules(toolset, base) diff --git a/src/boost/tools/build/src/build/type.jam b/src/boost/tools/build/src/build/type.jam new file mode 100644 index 000000000..365aaf8d1 --- /dev/null +++ b/src/boost/tools/build/src/build/type.jam @@ -0,0 +1,410 @@ +# Copyright 2002, 2003 Dave Abrahams +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Deals with target type declaration and defines target class which supports +# typed targets. + +import "class" : new ; +import feature ; +import generators : * ; +import os ; +import param ; +import project ; +import property ; +import scanner ; + +# The following import would create a circular dependency: +# project -> project-root -> builtin -> type -> targets -> project +# import targets ; + +# The feature is optional so it would never get added implicitly. It is used +# only for internal purposes and in all cases we want to use it explicitly. +feature.feature target-type : : composite optional ; + +feature.feature main-target-type : : optional incidental ; +feature.feature base-target-type : : composite optional free ; + + +# Registers a target type, possible derived from a 'base-type'. Providing a list +# of 'suffixes' here is a shortcut for separately calling the register-suffixes +# rule with the given suffixes and the set-generated-target-suffix rule with the +# first given suffix. +# +rule register ( type : suffixes * : base-type ? ) +{ + # Type names cannot contain hyphens, because when used as feature-values + # they would be interpreted as composite features which need to be + # decomposed. + switch $(type) + { + case *-* : + import errors ; + errors.error "type name \"$(type)\" contains a hyphen" ; + } + + if $(type) in $(.types) + { + import errors ; + errors.error "Type $(type) is already registered." ; + } + + if $(base-type) && ! $(base-type) in $(.types) + { + import errors ; + errors.error "Type $(base-type) is not registered." ; + } + + { + .types += $(type) ; + .base.$(type) = $(base-type) ; + .derived.$(base-type) += $(type) ; + .bases.$(type) = $(type) $(.bases.$(base-type)) ; + + # Store suffixes for generated targets. + .suffixes.$(type) = [ new property-map ] ; + + # Store prefixes for generated targets (e.g. "lib" for library). + .prefixes.$(type) = [ new property-map ] ; + + if $(suffixes)-is-defined + { + # Specify mapping from suffixes to type. + register-suffixes $(suffixes) : $(type) ; + # By default generated targets of 'type' will use the first of + #'suffixes'. This may be overridden. + set-generated-target-suffix $(type) : : $(suffixes[1]) ; + } + + feature.extend target-type : $(type) ; + feature.extend main-target-type : $(type) ; + feature.extend base-target-type : $(type) ; + + feature.compose <target-type>$(type) : $(base-type:G=<base-target-type>) ; + feature.compose <base-target-type>$(type) : <base-target-type>$(base-type) ; + + # We used to declare the main target rule only when a 'main' parameter + # has been specified. However, it is hard to decide that a type will + # *never* need a main target rule and so from time to time we needed to + # make yet another type 'main'. So now a main target rule is defined for + # each type. + main-rule-name = [ type-to-rule-name $(type) ] ; + .main-target-type.$(main-rule-name) = $(type) ; + IMPORT $(__name__) : main-target-rule : : $(main-rule-name) ; + + # Adding a new derived type affects generator selection so we need to + # make the generator selection module update any of its cached + # information related to a new derived type being defined. + generators.update-cached-information-with-a-new-type $(type) ; + } +} + + +# Given a type, returns the name of the main target rule which creates targets +# of that type. +# +rule type-to-rule-name ( type ) +{ + # Lowercase everything. Convert underscores to dashes. + import regex ; + local n = [ regex.split $(type:L) "_" ] ; + return $(n:J=-) ; +} + + +# Given a main target rule name, returns the type for which it creates targets. +# +rule type-from-rule-name ( rule-name ) +{ + return $(.main-target-type.$(rule-name)) ; +} + + +# Specifies that files with suffix from 'suffixes' be recognized as targets of +# type 'type'. Issues an error if a different type is already specified for any +# of the suffixes. +# +rule register-suffixes ( suffixes + : type ) +{ + for local s in $(suffixes) + { + if ! $(.type.$(s)) + { + .type.$(s) = $(type) ; + } + else if $(.type.$(s)) != $(type) + { + import errors ; + errors.error Attempting to specify multiple types for suffix + \"$(s)\" : "Old type $(.type.$(s)), New type $(type)" ; + } + } +} + + +# Returns true iff type has been registered. +# +rule registered ( type ) +{ + if $(type) in $(.types) + { + return true ; + } +} + + +# Issues an error if 'type' is unknown. +# +rule validate ( type ) +{ + if ! [ registered $(type) ] + { + import errors ; + errors.error "Unknown target type $(type)" ; + } +} + + +# Sets a scanner class that will be used for this 'type'. +# +rule set-scanner ( type : scanner ) +{ + validate $(type) ; + .scanner.$(type) = $(scanner) ; +} + + +# Returns a scanner instance appropriate to 'type' and 'properties'. +# +rule get-scanner ( type : property-set ) +{ + if $(.scanner.$(type)) + { + return [ scanner.get $(.scanner.$(type)) : $(property-set) ] ; + } +} + + +# Returns a base type for the given type or nothing in case the given type is +# not derived. +# +rule base ( type ) +{ + return $(.base.$(type)) ; +} + + +# Returns the given type and all of its base types in order of their distance +# from type. +# +rule all-bases ( type ) +{ + return $(.bases.$(type)) ; +} + + +# Returns the given type and all of its derived types in order of their distance +# from type. +# +rule all-derived ( type ) +{ + local result = $(type) ; + for local d in $(.derived.$(type)) + { + result += [ all-derived $(d) ] ; + } + return $(result) ; +} + + +# Returns true if 'type' is equal to 'base' or has 'base' as its direct or +# indirect base. +# +rule is-derived ( type base ) +{ + if $(base) in $(.bases.$(type)) + { + return true ; + } +} + +# Returns true if 'type' is either derived from or is equal to 'base'. +# +# TODO: It might be that is-derived and is-subtype were meant to be different +# rules - one returning true for type = base and one not, but as currently +# implemented they are actually the same. Clean this up. +# +rule is-subtype ( type base ) +{ + return [ is-derived $(type) $(base) ] ; +} + + + + +# Sets a file suffix to be used when generating a target of 'type' with the +# specified properties. Can be called with no properties if no suffix has +# already been specified for the 'type'. The 'suffix' parameter can be an empty +# string ("") to indicate that no suffix should be used. +# +# Note that this does not cause files with 'suffix' to be automatically +# recognized as being of 'type'. Two different types can use the same suffix for +# their generated files but only one type can be auto-detected for a file with +# that suffix. User should explicitly specify which one using the +# register-suffixes rule. +# +rule set-generated-target-suffix ( type : properties * : suffix ) +{ + set-generated-target-ps suffix : $(type) : $(properties) : $(suffix) ; +} + + +# Change the suffix previously registered for this type/properties combination. +# If suffix is not yet specified, sets it. +# +rule change-generated-target-suffix ( type : properties * : suffix ) +{ + change-generated-target-ps suffix : $(type) : $(properties) : $(suffix) ; +} + + +# Returns the suffix used when generating a file of 'type' with the given +# properties. +# +rule generated-target-suffix ( type : property-set ) +{ + return [ generated-target-ps suffix : $(type) : $(property-set) ] ; +} + + +# Sets a target prefix that should be used when generating targets of 'type' +# with the specified properties. Can be called with empty properties if no +# prefix for 'type' has been specified yet. +# +# The 'prefix' parameter can be empty string ("") to indicate that no prefix +# should be used. +# +# Usage example: library names use the "lib" prefix on unix. +# +rule set-generated-target-prefix ( type : properties * : prefix ) +{ + set-generated-target-ps prefix : $(type) : $(properties) : $(prefix) ; +} + + +# Change the prefix previously registered for this type/properties combination. +# If prefix is not yet specified, sets it. +# +rule change-generated-target-prefix ( type : properties * : prefix ) +{ + change-generated-target-ps prefix : $(type) : $(properties) : $(prefix) ; +} + + +rule generated-target-prefix ( type : property-set ) +{ + return [ generated-target-ps prefix : $(type) : $(property-set) ] ; +} + + +# Common rules for prefix/suffix provisioning follow. + +local rule set-generated-target-ps ( ps : type : properties * : psval ) +{ + $(.$(ps)es.$(type)).insert $(properties) : $(psval) ; +} + + +local rule change-generated-target-ps ( ps : type : properties * : psval ) +{ + local prev = [ $(.$(ps)es.$(type)).find-replace $(properties) : $(psval) ] ; + if ! $(prev) + { + set-generated-target-ps $(ps) : $(type) : $(properties) : $(psval) ; + } +} + + +# Returns either prefix or suffix (as indicated by 'ps') that should be used +# when generating a target of 'type' with the specified properties. Parameter +# 'ps' can be either "prefix" or "suffix". If no prefix/suffix is specified for +# 'type', returns prefix/suffix for base type, if any. +# +local rule generated-target-ps ( ps : type : property-set ) +{ + local result ; + local found ; + while $(type) && ! $(found) + { + result = [ $(.$(ps)es.$(type)).find $(property-set) ] ; + # If the prefix/suffix is explicitly set to an empty string, we consider + # prefix/suffix to be found. If we were not to compare with "", there + # would be no way to specify an empty prefix/suffix. + if $(result)-is-defined + { + found = true ; + } + type = $(.base.$(type)) ; + } + if $(result) = "" + { + result = ; + } + return $(result) ; +} + + +# Returns file type given its name. If there are several dots in filename, tries +# each suffix. E.g. for name of "file.so.1.2" suffixes "2", "1", and "so" will +# be tried. +# +rule type ( filename ) +{ + if [ os.name ] in NT CYGWIN + { + filename = $(filename:L) ; + } + local type ; + while ! $(type) && $(filename:S) + { + local suffix = $(filename:S) ; + type = $(.type$(suffix)) ; + filename = $(filename:S=) ; + } + return $(type) ; +} + + +# Rule used to construct all main targets. Note that this rule gets imported +# into the global namespace under different alias names and the exact target +# type to construct is selected based on the alias used to actually invoke this +# rule. +# +rule main-target-rule ( name : sources * : requirements * : default-build * : + usage-requirements * ) +{ + param.handle-named-params + sources requirements default-build usage-requirements ; + # First discover the required target type based on the exact alias used to + # invoke this rule. + local bt = [ BACKTRACE 1 ] ; + local rulename = $(bt[4]) ; + local target-type = [ type-from-rule-name $(rulename) ] ; + + # This is a circular module dependency and so must be imported here. + import targets ; + + return [ targets.create-typed-target $(target-type) : [ project.current ] : + $(name) : $(sources) : $(requirements) : $(default-build) : + $(usage-requirements) ] ; +} + + +rule __test__ ( ) +{ + import assert ; + + # TODO: Add tests for all the is-derived, is-base & related type relation + # checking rules. +} diff --git a/src/boost/tools/build/src/build/type.py b/src/boost/tools/build/src/build/type.py new file mode 100644 index 000000000..9f6237d7d --- /dev/null +++ b/src/boost/tools/build/src/build/type.py @@ -0,0 +1,381 @@ +# Status: ported. +# Base revision: 45462. + +# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and +# distribute this software is granted provided this copyright notice appears in +# all copies. This software is provided "as is" without express or implied +# warranty, and with no claim as to its suitability for any purpose. + + + +import re +import os +import os.path +from b2.util.utility import replace_grist, os_name +from b2.exceptions import * +from b2.build import feature, property, scanner +from b2.util import bjam_signature, is_iterable_typed + + +__re_hyphen = re.compile ('-') + +def __register_features (): + """ Register features need by this module. + """ + # The feature is optional so that it is never implicitly added. + # It's used only for internal purposes, and in all cases we + # want to explicitly use it. + feature.feature ('target-type', [], ['composite', 'optional']) + feature.feature ('main-target-type', [], ['optional', 'incidental']) + feature.feature ('base-target-type', [], ['composite', 'optional', 'free']) + +def reset (): + """ Clear the module state. This is mainly for testing purposes. + Note that this must be called _after_ resetting the module 'feature'. + """ + global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache + + __register_features () + + # Stores suffixes for generated targets. + __prefixes_suffixes = [property.PropertyMap(), property.PropertyMap()] + + # Maps suffixes to types + __suffixes_to_types = {} + + # A map with all the registered types, indexed by the type name + # Each entry is a dictionary with following values: + # 'base': the name of base type or None if type has no base + # 'derived': a list of names of type which derive from this one + # 'scanner': the scanner class registered for this type, if any + __types = {} + + # Caches suffixes for targets with certain properties. + __target_suffixes_cache = {} + +reset () + +@bjam_signature((["type"], ["suffixes", "*"], ["base_type", "?"])) +def register (type, suffixes = [], base_type = None): + """ Registers a target type, possibly derived from a 'base-type'. + If 'suffixes' are provided, they list all the suffixes that mean a file is of 'type'. + Also, the first element gives the suffix to be used when constructing and object of + 'type'. + type: a string + suffixes: None or a sequence of strings + base_type: None or a string + """ + # Type names cannot contain hyphens, because when used as + # feature-values they will be interpreted as composite features + # which need to be decomposed. + if __re_hyphen.search (type): + raise BaseException ('type name "%s" contains a hyphen' % type) + + # it's possible for a type to be registered with a + # base type that hasn't been registered yet. in the + # check for base_type below and the following calls to setdefault() + # the key `type` will be added to __types. When the base type + # actually gets registered, it would fail after the simple check + # of "type in __types"; thus the check for "'base' in __types[type]" + if type in __types and 'base' in __types[type]: + raise BaseException ('Type "%s" is already registered.' % type) + + entry = __types.setdefault(type, {}) + entry['base'] = base_type + entry.setdefault('derived', []) + entry.setdefault('scanner', None) + + if base_type: + __types.setdefault(base_type, {}).setdefault('derived', []).append(type) + + if len (suffixes) > 0: + # Generated targets of 'type' will use the first of 'suffixes' + # (this may be overridden) + set_generated_target_suffix (type, [], suffixes [0]) + + # Specify mapping from suffixes to type + register_suffixes (suffixes, type) + + feature.extend('target-type', [type]) + feature.extend('main-target-type', [type]) + feature.extend('base-target-type', [type]) + + if base_type: + feature.compose ('<target-type>' + type, [replace_grist (base_type, '<base-target-type>')]) + feature.compose ('<base-target-type>' + type, ['<base-target-type>' + base_type]) + + import b2.build.generators as generators + # Adding a new derived type affects generator selection so we need to + # make the generator selection module update any of its cached + # information related to a new derived type being defined. + generators.update_cached_information_with_a_new_type(type) + + # FIXME: resolving recursive dependency. + from b2.manager import get_manager + get_manager().projects().project_rules().add_rule_for_type(type) + +# FIXME: quick hack. +def type_from_rule_name(rule_name): + assert isinstance(rule_name, basestring) + return rule_name.upper().replace("-", "_") + + +def register_suffixes (suffixes, type): + """ Specifies that targets with suffix from 'suffixes' have the type 'type'. + If a different type is already specified for any of syffixes, issues an error. + """ + assert is_iterable_typed(suffixes, basestring) + assert isinstance(type, basestring) + for s in suffixes: + if s in __suffixes_to_types: + old_type = __suffixes_to_types [s] + if old_type != type: + raise BaseException ('Attempting to specify type for suffix "%s"\nOld type: "%s", New type "%s"' % (s, old_type, type)) + else: + __suffixes_to_types [s] = type + +def registered (type): + """ Returns true iff type has been registered. + """ + assert isinstance(type, basestring) + return type in __types + +def validate (type): + """ Issues an error if 'type' is unknown. + """ + assert isinstance(type, basestring) + if not registered (type): + raise BaseException ("Unknown target type '%s'" % type) + +def set_scanner (type, scanner): + """ Sets a scanner class that will be used for this 'type'. + """ + if __debug__: + from .scanner import Scanner + assert isinstance(type, basestring) + assert issubclass(scanner, Scanner) + validate (type) + __types [type]['scanner'] = scanner + +def get_scanner (type, prop_set): + """ Returns a scanner instance appropriate to 'type' and 'property_set'. + """ + if __debug__: + from .property_set import PropertySet + assert isinstance(type, basestring) + assert isinstance(prop_set, PropertySet) + if registered (type): + scanner_type = __types [type]['scanner'] + if scanner_type: + return scanner.get (scanner_type, prop_set.raw ()) + pass + + return None + +def base(type): + """Returns a base type for the given type or nothing in case the given type is + not derived.""" + assert isinstance(type, basestring) + return __types[type]['base'] + +def all_bases (type): + """ Returns type and all of its bases, in the order of their distance from type. + """ + assert isinstance(type, basestring) + result = [] + while type: + result.append (type) + type = __types [type]['base'] + + return result + +def all_derived (type): + """ Returns type and all classes that derive from it, in the order of their distance from type. + """ + assert isinstance(type, basestring) + result = [type] + for d in __types [type]['derived']: + result.extend (all_derived (d)) + + return result + +def is_derived (type, base): + """ Returns true if 'type' is 'base' or has 'base' as its direct or indirect base. + """ + assert isinstance(type, basestring) + assert isinstance(base, basestring) + # TODO: this isn't very efficient, especially for bases close to type + if base in all_bases (type): + return True + else: + return False + +def is_subtype (type, base): + """ Same as is_derived. Should be removed. + """ + assert isinstance(type, basestring) + assert isinstance(base, basestring) + # TODO: remove this method + return is_derived (type, base) + +@bjam_signature((["type"], ["properties", "*"], ["suffix"])) +def set_generated_target_suffix (type, properties, suffix): + """ Sets a target suffix that should be used when generating target + of 'type' with the specified properties. Can be called with + empty properties if no suffix for 'type' was specified yet. + This does not automatically specify that files 'suffix' have + 'type' --- two different types can use the same suffix for + generating, but only one type should be auto-detected for + a file with that suffix. User should explicitly specify which + one. + + The 'suffix' parameter can be empty string ("") to indicate that + no suffix should be used. + """ + assert isinstance(type, basestring) + assert is_iterable_typed(properties, basestring) + assert isinstance(suffix, basestring) + set_generated_target_ps(1, type, properties, suffix) + + + +def change_generated_target_suffix (type, properties, suffix): + """ Change the suffix previously registered for this type/properties + combination. If suffix is not yet specified, sets it. + """ + assert isinstance(type, basestring) + assert is_iterable_typed(properties, basestring) + assert isinstance(suffix, basestring) + change_generated_target_ps(1, type, properties, suffix) + +def generated_target_suffix(type, properties): + if __debug__: + from .property_set import PropertySet + assert isinstance(type, basestring) + assert isinstance(properties, PropertySet) + return generated_target_ps(1, type, properties) + + +@bjam_signature((["type"], ["properties", "*"], ["prefix"])) +def set_generated_target_prefix(type, properties, prefix): + """ + Sets a file prefix to be used when generating a target of 'type' with the + specified properties. Can be called with no properties if no prefix has + already been specified for the 'type'. The 'prefix' parameter can be an empty + string ("") to indicate that no prefix should be used. + + Note that this does not cause files with 'prefix' to be automatically + recognized as being of 'type'. Two different types can use the same prefix for + their generated files but only one type can be auto-detected for a file with + that prefix. User should explicitly specify which one using the + register-prefixes rule. + + Usage example: library names use the "lib" prefix on unix. + """ + set_generated_target_ps(0, type, properties, prefix) + +# Change the prefix previously registered for this type/properties combination. +# If prefix is not yet specified, sets it. +def change_generated_target_prefix(type, properties, prefix): + assert isinstance(type, basestring) + assert is_iterable_typed(properties, basestring) + assert isinstance(prefix, basestring) + change_generated_target_ps(0, type, properties, prefix) + +def generated_target_prefix(type, properties): + if __debug__: + from .property_set import PropertySet + assert isinstance(type, basestring) + assert isinstance(properties, PropertySet) + return generated_target_ps(0, type, properties) + +def set_generated_target_ps(is_suffix, type, properties, val): + assert isinstance(is_suffix, (int, bool)) + assert isinstance(type, basestring) + assert is_iterable_typed(properties, basestring) + assert isinstance(val, basestring) + properties.append ('<target-type>' + type) + __prefixes_suffixes[is_suffix].insert (properties, val) + +def change_generated_target_ps(is_suffix, type, properties, val): + assert isinstance(is_suffix, (int, bool)) + assert isinstance(type, basestring) + assert is_iterable_typed(properties, basestring) + assert isinstance(val, basestring) + properties.append ('<target-type>' + type) + prev = __prefixes_suffixes[is_suffix].find_replace(properties, val) + if not prev: + set_generated_target_ps(is_suffix, type, properties, val) + +# Returns either prefix or suffix (as indicated by 'is_suffix') that should be used +# when generating a target of 'type' with the specified properties. +# If no prefix/suffix is specified for 'type', returns prefix/suffix for +# base type, if any. +def generated_target_ps_real(is_suffix, type, properties): + assert isinstance(is_suffix, (int, bool)) + assert isinstance(type, basestring) + assert is_iterable_typed(properties, basestring) + result = '' + found = False + while type and not found: + result = __prefixes_suffixes[is_suffix].find (['<target-type>' + type] + properties) + + # Note that if the string is empty (""), but not null, we consider + # suffix found. Setting prefix or suffix to empty string is fine. + if result is not None: + found = True + + type = __types [type]['base'] + + if not result: + result = '' + return result + +def generated_target_ps(is_suffix, type, prop_set): + """ Returns suffix that should be used when generating target of 'type', + with the specified properties. If not suffix were specified for + 'type', returns suffix for base type, if any. + """ + if __debug__: + from .property_set import PropertySet + assert isinstance(is_suffix, (int, bool)) + assert isinstance(type, basestring) + assert isinstance(prop_set, PropertySet) + key = (is_suffix, type, prop_set) + v = __target_suffixes_cache.get(key, None) + + if not v: + v = generated_target_ps_real(is_suffix, type, prop_set.raw()) + __target_suffixes_cache [key] = v + + return v + +def type(filename): + """ Returns file type given it's name. If there are several dots in filename, + tries each suffix. E.g. for name of "file.so.1.2" suffixes "2", "1", and + "so" will be tried. + """ + assert isinstance(filename, basestring) + while 1: + filename, suffix = os.path.splitext (filename) + if not suffix: return None + suffix = suffix[1:] + + if suffix in __suffixes_to_types: + return __suffixes_to_types[suffix] + +# NOTE: moved from tools/types/register +def register_type (type, suffixes, base_type = None, os = []): + """ Register the given type on the specified OSes, or on remaining OSes + if os is not specified. This rule is injected into each of the type + modules for the sake of convenience. + """ + assert isinstance(type, basestring) + assert is_iterable_typed(suffixes, basestring) + assert isinstance(base_type, basestring) or base_type is None + assert is_iterable_typed(os, basestring) + if registered (type): + return + + if not os or os_name () in os: + register (type, suffixes, base_type) diff --git a/src/boost/tools/build/src/build/version.jam b/src/boost/tools/build/src/build/version.jam new file mode 100644 index 000000000..cc9a09ad0 --- /dev/null +++ b/src/boost/tools/build/src/build/version.jam @@ -0,0 +1,225 @@ +# Copyright 2021 Nikita Kniazev +# Copyright 2002, 2003, 2004, 2006 Vladimir Prus +# Copyright 2008, 2012 Jurko Gospodnetic +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import numbers ; + + +# Mirror engine JAM_VERSION +.major = "4" ; +.minor = "8" ; + + +rule boost-build ( ) +{ + return "$(.major).$(.minor)-git" ; +} + + +rule print ( ) +{ + if [ verify-engine-version ] + { + ECHO "B2" [ boost-build ] ; + } +} + + +rule verify-engine-version ( ) +{ + local v = [ modules.peek : JAM_VERSION ] ; + + if $(v[1]) != $(.major) || $(v[2]) != $(.minor) + { + local argv = [ modules.peek : ARGV ] ; + local e = $(argv[1]) ; + local l = [ modules.binding version ] ; + l = $(l:D) ; + l = $(l:D) ; + ECHO "warning: mismatched versions of B2 engine and core" ; + ECHO "warning: B2 engine ($(e)) is $(v:J=.)" ; + ECHO "warning: B2 core (at $(l)) is" [ boost-build ] ; + } + else + { + return true ; + } +} + + +# Utility rule for testing whether all elements in a sequence are equal to 0. +# +local rule is-all-zeroes ( sequence * ) +{ + local result = "true" ; + for local e in $(sequence) + { + if $(e) != "0" + { + result = "" ; + } + } + return $(result) ; +} + + +# Returns "true" if the first version is less than the second one. +# +rule version-less ( lhs + : rhs + ) +{ + numbers.check $(lhs) ; + numbers.check $(rhs) ; + + local done ; + local result ; + + while ! $(done) && $(lhs) && $(rhs) + { + if [ numbers.less $(lhs[1]) $(rhs[1]) ] + { + done = "true" ; + result = "true" ; + } + else if [ numbers.less $(rhs[1]) $(lhs[1]) ] + { + done = "true" ; + } + else + { + lhs = $(lhs[2-]) ; + rhs = $(rhs[2-]) ; + } + } + if ( ! $(done) && ! $(lhs) && ! [ is-all-zeroes $(rhs) ] ) + { + result = "true" ; + } + + return $(result) ; +} + +# Returns "true" if the required version is compatible with the having one. +# This uses sematic versioning where (major.x.y) is compatible with +# (major.n.m) and (major.x.z). And is incompatible for other values. +# +rule version-compatible ( req + : has + ) +{ + numbers.check $(req) ; + numbers.check $(has) ; + + if $(req) = $(has) + { + return true ; + } + + while $(req) && [ numbers.equal $(req[1]) $(has[1]:E=0) ] + { + req = $(req[2-]) ; + has = $(has[2-]) ; + } + + if $(req) + { + return ; + } + + return true ; +} + + +# Returns "true" if the current JAM version version is at least the given +# version. +# +rule check-jam-version ( version + ) +{ + local version-tag = $(version:J=.) ; + if ! $(version-tag) + { + import errors ; + errors.error Invalid version "specifier:" : $(version:E="(undefined)") ; + } + + if ! $(.jam-version-check.$(version-tag))-is-defined + { + local jam-version = [ modules.peek : JAM_VERSION ] ; + if ! $(jam-version) + { + import errors ; + errors.error "Unable to deduce Boost Jam version. Your Boost Jam" + "installation is most likely terribly outdated." ; + } + .jam-version-check.$(version-tag) = "true" ; + if [ version-less [ modules.peek : JAM_VERSION ] : $(version) ] + { + .jam-version-check.$(version-tag) = "" ; + } + } + return $(.jam-version-check.$(version-tag)) ; +} + + +rule __test__ ( ) +{ + import assert ; + + local jam-version = [ modules.peek : JAM_VERSION ] ; + local future-version = $(jam-version) ; + future-version += "1" ; + + assert.true check-jam-version $(jam-version) ; + assert.false check-jam-version $(future-version) ; + + assert.true version-less 0 : 1 ; + assert.false version-less 0 : 0 ; + assert.true version-less 1 : 2 ; + assert.false version-less 1 : 1 ; + assert.false version-less 2 : 1 ; + assert.true version-less 3 1 20 : 3 4 10 ; + assert.false version-less 3 1 10 : 3 1 10 ; + assert.false version-less 3 4 10 : 3 1 20 ; + assert.true version-less 3 1 20 5 1 : 3 4 10 ; + assert.false version-less 3 1 10 5 1 : 3 1 10 ; + assert.false version-less 3 4 10 5 1 : 3 1 20 ; + assert.true version-less 3 1 20 : 3 4 10 5 1 ; + assert.true version-less 3 1 10 : 3 1 10 5 1 ; + assert.false version-less 3 4 10 : 3 1 20 5 1 ; + assert.false version-less 3 1 10 : 3 1 10 0 0 ; + assert.false version-less 3 1 10 0 0 : 3 1 10 ; + assert.false version-less 3 1 10 0 : 3 1 10 0 0 ; + assert.false version-less 3 1 10 0 : 03 1 10 0 0 ; + assert.false version-less 03 1 10 0 : 3 1 10 0 0 ; + + # TODO: Add tests for invalid input data being sent to version-less. + + + assert.true version-compatible 4 : 4 ; + assert.true version-compatible 4 : 4 9 ; + assert.false version-compatible 4 9 : 4 ; + assert.true version-compatible 4 9 : 4 9 ; + assert.false version-compatible 4 9 1 : 4 9 ; + assert.true version-compatible 4 9 1 : 4 9 1 ; + assert.false version-compatible 4 8 : 4 9 ; + assert.false version-compatible 4 8 1 : 4 9 ; + assert.false version-compatible 4 8 1 : 4 9 1 ; + assert.true version-compatible 5 : 5 ; + assert.false version-compatible 5 : 4 ; + assert.false version-compatible 5 : 4 9 ; + assert.false version-compatible 5 1 : 5 ; + assert.true version-compatible 5 1 : 5 1 ; + assert.false version-compatible 5 1 : 5 2 ; + assert.false version-compatible 5 1 1 : 5 ; + assert.false version-compatible 5 1 1 : 5 1 ; + assert.false version-compatible 5 2 : 5 ; + assert.false version-compatible 5 2 : 5 1 ; + assert.true version-compatible 5 2 : 5 2 ; + assert.true version-compatible 4 : 4 0 ; + assert.true version-compatible 4 0 : 4 ; + assert.true version-compatible 04 : 4 ; + assert.true version-compatible 04 : 04 ; + assert.true version-compatible 04 : 4 ; + assert.true version-compatible 04 00 : 04 ; + assert.true version-compatible 04 : 04 00 ; +} + diff --git a/src/boost/tools/build/src/build/version.py b/src/boost/tools/build/src/build/version.py new file mode 100644 index 000000000..88299060e --- /dev/null +++ b/src/boost/tools/build/src/build/version.py @@ -0,0 +1,38 @@ +import os +import sys + +import bjam + + +from b2.manager import get_manager + + +MANAGER = get_manager() +ERROR_HANDLER = MANAGER.errors() + +_major = "2015" +_minor = "07" + + +def boost_build(): + return "{}.{}-git".format(_major, _minor) + + +def verify_engine_version(): + major, minor, _ = v = bjam.variable('JAM_VERSION') + if major != _major or minor != _minor: + from textwrap import dedent + engine = sys.argv[0] + core = os.path.dirname(os.path.dirname(__file__)) + print dedent("""\ + warning: mismatched version of Boost.Build engine core + warning: Boost.Build engine "{}" is "{}" + warning: Boost.Build core at {} is {} + """.format(engine, '.'.join(v), core, boost_build())) + return False + return True + + +def report(): + if verify_engine_version(): + print "Boost.Build " + boost_build() diff --git a/src/boost/tools/build/src/build/virtual-target.jam b/src/boost/tools/build/src/build/virtual-target.jam new file mode 100644 index 000000000..85ef46cdc --- /dev/null +++ b/src/boost/tools/build/src/build/virtual-target.jam @@ -0,0 +1,1394 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2005, 2006 Rene Rivera +# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Implements virtual targets, which correspond to actual files created during a +# build, but are not yet targets in Jam sense. They are needed, for example, +# when searching for possible transformation sequences, when it is not yet known +# whether a particular target should be created at all. +# +# +--------------------------+ +# | virtual-target | +# +==========================+ +# | actualize | +# +--------------------------+ +# | actualize-action() = 0 | +# | actualize-location() = 0 | +# +----------------+---------+ +# | +# ^ +# / \ +# +-+-+ +# | +# +---------------------+ +-------+--------------+ +# | action | | abstract-file-target | +# +=====================| * +======================+ +# | action-name | +--+ action | +# | properties | | +----------------------+ +# +---------------------+--+ | actualize-action() | +# | actualize() |0..1 +-----------+----------+ +# | path() | | +# | adjust-properties() | sources | +# | actualize-sources() | targets | +# +------+--------------+ ^ +# | / \ +# ^ +-+-+ +# / \ | +# +-+-+ +-------------+-------------+ +# | | | +# | +------+---------------+ +--------+-------------+ +# | | file-target | | searched-lib-target | +# | +======================+ +======================+ +# | | actualize-location() | | actualize-location() | +# | +----------------------+ +----------------------+ +# | +# +-+------------------------------+ +# | | +# +----+----------------+ +---------+-----------+ +# | compile-action | | link-action | +# +=====================+ +=====================+ +# | adjust-properties() | | adjust-properties() | +# +---------------------+ | actualize-sources() | +# +---------------------+ +# +# The 'compile-action' and 'link-action' classes are not defined here but in +# builtin.jam modules. They are shown in the diagram to give the big picture. + +import "class" : new ; +import feature ; +import path ; +import property-set ; +import sequence ; +import set ; +import toolset ; +import type ; +import utility ; + + +# Models a potential target. It can be converted into a Jam target and used in +# building, if needed. However, it can be also dropped, which allows us to +# search for different transformations and select only one. +# +class virtual-target +{ + import scanner ; + import sequence ; + import utility ; + import virtual-target ; + + rule __init__ ( + name # Target/project name. + : project # Project to which this target belongs. + ) + { + self.name = $(name) ; + self.project = $(project) ; + self.dependencies = ; + } + + # Name of this target. + # + rule name ( ) + { + return $(self.name) ; + } + + # Project of this target. + # + rule project ( ) + { + return $(self.project) ; + } + + # Adds additional 'virtual-target' instances this one depends on. + # + rule depends ( d + ) + { + self.dependencies = [ sequence.merge $(self.dependencies) : + [ sequence.insertion-sort $(d) ] ] ; + } + + rule dependencies ( ) + { + return $(self.dependencies) ; + } + + rule always ( ) + { + .always = 1 ; + } + + rule fail-expected ( ) + { + .fail-expected = 1 ; + } + + # Generates all the actual targets and sets up build actions for this + # target. + # + # If 'scanner' is specified, creates an additional target with the same + # location as the actual target, which will depend on the actual target and + # be associated with a 'scanner'. That additional target is returned. See + # the docs (#dependency_scanning) for rationale. Target must correspond to a + # file if 'scanner' is specified. + # + # If scanner is not specified then the actual target is returned. + # + rule actualize ( scanner ? ) + { + local actual-name = [ actualize-no-scanner ] ; + + if $(.always) + { + ALWAYS $(actual-name) ; + } + + if $(.fail-expected) + { + FAIL_EXPECTED $(actual-name) ; + } + + if ! $(scanner) + { + return $(actual-name) ; + } + else + { + # Add the scanner instance to the grist for name. + local g = [ sequence.join [ utility.ungrist $(actual-name:G) ] + $(scanner) : - ] ; + local name = $(actual-name:G=$(g)) ; + + if ! $(self.made.$(scanner)) + { + self.made.$(scanner) = true ; + actualize-location $(name) ; + scanner.install $(scanner) : $(name) ; + } + return $(name) ; + } + } + +# private: (overridables) + + # Sets/gets the 'root' flag. Target is root if it directly corresponds to + # some variant of a main target. + # + rule root ( set ? ) + { + if $(set) + { + self.root = true ; + } + return $(self.root) ; + } + + + # Sets up build actions for 'target'. Should call appropriate rules and set + # target variables. + # + rule actualize-action ( target ) + { + import errors : error : errors.error ; + errors.error "method should be defined in derived classes" ; + } + + # Sets up variables on 'target' which specify its location. + # + rule actualize-location ( target ) + { + import errors : error : errors.error ; + errors.error "method should be defined in derived classes" ; + } + + # If the target is a generated one, returns the path where it will be + # generated. Otherwise, returns an empty list. + # + rule path ( ) + { + import errors : error : errors.error ; + errors.error "method should be defined in derived classes" ; + } + + # Returns the actual target name to be used in case when no scanner is + # involved. + # + rule actual-name ( ) + { + import errors : error : errors.error ; + errors.error "method should be defined in derived classes" ; + } + + # Returns additional properties that are relevant for this target + # beyond those required by the action. + # + rule relevant ( ) + { + return [ property-set.empty ] ; + } + +# implementation + rule actualize-no-scanner ( ) + { + # In fact, we just need to merge virtual-target with + # abstract-file-target as the latter is the only class derived from the + # former. But that has been left for later. + + import errors : error : errors.error ; + errors.error "method should be defined in derived classes" ; + } +} + + +# Target corresponding to a file. The exact mapping for file is not yet +# specified in this class. (TODO: Actually, the class name could be better...) +# +# May be a source file (when no action is specified) or a derived file +# (otherwise). +# +# The target's grist is a concatenation of its project's location, action +# properties (for derived targets) and, optionally, value identifying the main +# target. +# +class abstract-file-target : virtual-target +{ + import project ; + import regex ; + import sequence ; + import path ; + import type ; + import property-set ; + import indirect ; + + rule __init__ ( + name # Target's name. + exact ? # If non-empty, the name is exactly the name created file + # should have. Otherwise, the '__init__' method will add a + # suffix obtained from 'type' by calling + # 'type.generated-target-suffix'. + : type ? # Target's type. + : project + : action ? + ) + { + virtual-target.__init__ $(name) : $(project) ; + + self.type = $(type) ; + self.action = $(action) ; + if $(action) + { + $(action).add-targets $(__name__) ; + + if $(self.type) && ! $(exact) + { + _adjust-name $(name) ; + } + } + } + + rule type ( ) + { + return $(self.type) ; + } + + # Sets the path. When generating target name, it will override any path + # computation from properties. + # + rule set-path ( path ) + { + self.path = [ path.native $(path) ] ; + } + + # Returns the currently set action. + # + rule action ( ) + { + return $(self.action) ; + } + + # Gets or sets the subvariant which created this target. Subvariant is set + # when target is brought into existence and is never changed after that. In + # particular, if a target is shared by multiple subvariants, only the first + # one is stored. + # + rule creating-subvariant ( s ? # If specified, specifies the value to set, + # which should be a 'subvariant' class + # instance. + ) + { + if $(s) && ! $(self.creating-subvariant) + { + self.creating-subvariant = $(s) ; + } + return $(self.creating-subvariant) ; + } + + rule actualize-action ( target ) + { + if $(self.action) + { + $(self.action).actualize ; + } + } + + # Return a human-readable representation of this target. If this target has + # an action, that is: + # + # { <action-name>-<self.name>.<self.type> <action-sources>... } + # + # otherwise, it is: + # + # { <self.name>.<self.type> } + # + rule str ( ) + { + local action = [ action ] ; + local name-dot-type = [ sequence.join $(self.name) "." $(self.type) ] ; + + if $(action) + { + local sources = [ $(action).sources ] ; + local action-name = [ $(action).action-name ] ; + + local ss ; + for local s in $(sources) + { + ss += [ $(s).str ] ; + } + + return "{" $(action-name)-$(name-dot-type) $(ss) "}" ; + } + else + { + return "{" $(name-dot-type) "}" ; + } + } + + rule less ( a ) + { + if [ str ] < [ $(a).str ] + { + return true ; + } + } + + rule equal ( a ) + { + if [ str ] = [ $(a).str ] + { + return true ; + } + } + +# private: + rule actual-name ( ) + { + if ! $(self.actual-name) + { + local grist = [ grist ] ; + local basename = [ path.native $(self.name) ] ; + self.actual-name = <$(grist)>$(basename) ; + } + return $(self.actual-name) ; + } + + # Helper to 'actual-name', above. Computes a unique prefix used to + # distinguish this target from other targets with the same name creating + # different files. + # + rule grist ( ) + { + # Depending on target, there may be different approaches to generating + # unique prefixes. We generate prefixes in the form: + # <one letter approach code> <the actual prefix> + local path = [ path ] ; + if $(path) + { + # The target will be generated to a known path. Just use the path + # for identification, since path is as unique as it can get. + return p$(path) ; + } + else + { + # File is either source, which will be searched for, or is not a + # file at all. Use the location of project for distinguishing. + local project-location = [ $(self.project).get location ] ; + local location-grist = [ sequence.join [ regex.split + $(project-location) "/" ] : "!" ] ; + + if $(self.action) + { + local ps = [ $(self.action).properties ] ; + local property-grist = [ $(ps).as-path ] ; + # 'property-grist' can be empty when 'ps' is an empty property + # set. + if $(property-grist) + { + location-grist = $(location-grist)/$(property-grist) ; + } + } + + return l$(location-grist) ; + } + } + + # Given the target name specified in constructor, returns the name which + # should be really used, by looking at the <tag> properties. Tag properties + # need to be specified as <tag>@rule-name. This makes Boost Build call the + # specified rule with the target name, type and properties to get the new + # name. If no <tag> property is specified or the rule specified by <tag> + # returns nothing, returns the result of calling + # virtual-target.add-prefix-and-suffix. + # + rule _adjust-name ( specified-name ) + { + local ps ; + if $(self.action) + { + ps = [ $(self.action).properties ] ; + } + else + { + ps = [ property-set.empty ] ; + } + + # Add this target object for use in getting additional information + # when tagging. + ps = [ property-set.create [ $(ps).raw ] <target>$(__name__) ] ; + + local tag = [ $(ps).get <tag> ] ; + + if $(tag) + { + local rule-name = [ MATCH ^@(.*) : $(tag) ] ; + if $(rule-name) + { + if $(tag[2]) + { + import errors : error : errors.error ; + errors.error <tag>@rulename is present but is not the only + <tag> feature. ; + } + + self.name = [ indirect.call $(rule-name) $(specified-name) + : $(self.type) : $(ps) ] ; + } + else + { + import errors : error : errors.error ; + errors.error <tag> property value must be '@rule-name'. ; + } + } + + # If there is no tag or the tag rule returned nothing. + if ! $(tag) || ! $(self.name) + { + self.name = [ virtual-target.add-prefix-and-suffix $(specified-name) + : $(self.type) : $(ps) ] ; + } + } + + rule actualize-no-scanner ( ) + { + local name = [ actual-name ] ; + + # Do anything only on the first invocation. + if ! $(self.made-no-scanner) + { + self.made-no-scanner = true ; + + if $(self.action) + { + # For non-derived target, we do not care if there are several + # virtual targets that refer to the same name. One case when + # this is unavoidable is when the file name is main.cpp and two + # targets have types CPP (for compiling) and MOCCABLE_CPP (for + # conversion to H via Qt tools). + virtual-target.register-actual-name $(name) : $(__name__) ; + } + + for local i in $(self.dependencies) + { + DEPENDS $(name) : [ $(i).actualize ] ; + } + + actualize-location $(name) ; + actualize-action $(name) ; + } + return $(name) ; + } +} + + +# Appends the suffix appropriate to 'type/property-set' combination to the +# specified name and returns the result. +# +rule add-prefix-and-suffix ( specified-name : type ? : property-set ) +{ + local suffix = [ type.generated-target-suffix $(type) : $(property-set) ] ; + + # Handle suffixes for which no leading dot is desired. Those are specified + # by enclosing them in <...>. Needed by python so it can create "_d.so" + # extensions, for example. + if $(suffix:G) + { + suffix = [ utility.ungrist $(suffix) ] ; + } + else + { + suffix = .$(suffix) ; + } + + local prefix = [ type.generated-target-prefix $(type) : $(property-set) ] ; + + if [ MATCH ^($(prefix)) : $(specified-name) ] + { + prefix = ; + } + return $(prefix:E="")$(specified-name)$(suffix:E="") ; +} + + +# File targets with explicitly known location. +# +# The file path is determined as +# * Value passed to the 'set-path' method, if any. +# * For derived files, project's build dir, joined with components that +# describe action properties. If free properties are not equal to the +# project's reference properties an element with the name of the main +# target is added. +# * For source files, project's source dir. +# +# The file suffix is determined as: +# * The value passed to the 'suffix' method, if any. +# * The suffix corresponding to the target's type. +# +class file-target : abstract-file-target +{ + import "class" : new ; + import common ; + + rule __init__ ( + name exact ? + : type ? # Optional type for this target. + : project + : action ? + : path ? + ) + { + abstract-file-target.__init__ $(name) $(exact) : $(type) : $(project) : + $(action) ; + + self.path = $(path) ; + } + + rule clone-with-different-type ( new-type ) + { + return [ new file-target $(self.name) exact : $(new-type) : + $(self.project) : $(self.action) : $(self.path) ] ; + } + + rule actualize-location ( target ) + { + # Scanner targets are always bound to already existing files in already + # existing folder. They need to be marked as depending on their base + # target (i.e. the target being scanned) but, unlike regular + # dependencies set up by the DEPENDS rule, they must not depend on any + # targets already marked as included by the base target. Otherwise such + # an included file being newer than the file being scanned would cause + # the scanner target to be updated, further causing any target depending + # on that scanner target to be rebuilt. This is the exact relationship + # as set up by Boost Jam's SEARCH binding method (needed to support + # searching for generated targets) so we want to bind scanner targets + # using this method instead of explicitly specifying their location + # using LOCATE. + # + # FIXME: We recognize scanner targets by their given name being + # different from this target's actual name. This is a hack and should be + # cleaned up by reorganizing who knows about scanners in the + # virtual-target/abstract-file-target/file-target/notfile-target/ + # searched-lib-target/... class hierarchy. + local is-scanner-target ; + if $(target) != [ actual-name ] + { + is-scanner-target = true ; + } + + if $(self.action) && ! $(is-scanner-target) + { + # This is a derived file. + local path = [ path ] ; + LOCATE on $(target) = $(path) ; + + # Make sure the path exists. + DEPENDS $(target) : $(path) ; + common.MkDir $(path) ; + + # It is possible that the target name includes a directory too, for + # example when installing headers. Create that directory. + if $(target:D) + { + local d = $(target:D) ; + d = $(d:R=$(path)) ; + DEPENDS $(target) : $(d) ; + common.MkDir $(d) ; + } + + # For a real file target, we create a fake target depending on the + # real target. This allows us to run + # + # b2 hello.o + # + # without trying to guess the name of the real target. Note that the + # target has no directory name and uses a special <e> grist. + # + # First, that means that "b2 hello.o" will build all known hello.o + # targets. Second, the <e> grist makes sure this target will not be + # confused with other targets, for example, if we have subdir 'test' + # with target 'test' in it that includes a 'test.o' file, then the + # target for directory will be just 'test' the target for test.o + # will be <ptest/bin/gcc/debug>test.o and the target we create below + # will be <e>test.o + DEPENDS $(target:G=e) : $(target) ; + # Allow b2 <path-to-file>/<file> to work. This will not catch all + # possible ways to refer to the path (relative/absolute, extra ".", + # various "..", but should help in obvious cases. + DEPENDS $(target:G=e:R=$(path)) : $(target) ; + } + else + { + SEARCH on $(target) = [ path.native $(self.path) ] ; + } + } + + # Returns the directory for this target. + # + rule path ( ) + { + if ! $(self.path) + { + if $(self.action) + { + local p = [ $(self.action).properties ] ; + local path,relative-to-build-dir = [ $(p).target-path ] ; + local path = $(path,relative-to-build-dir[1]) ; + local relative-to-build-dir = $(path,relative-to-build-dir[2]) ; + + if $(relative-to-build-dir) + { + path = [ path.join [ $(self.project).build-dir ] $(path) ] ; + } + + self.path = [ path.native $(path) ] ; + } + } + return $(self.path) ; + } +} + + +class notfile-target : abstract-file-target +{ + rule __init__ ( name : project : action ? ) + { + abstract-file-target.__init__ $(name) : : $(project) : $(action) ; + } + + # Returns nothing to indicate that the target's path is not known. + # + rule path ( ) + { + return ; + } + + rule actualize-location ( target ) + { + NOTFILE $(target) ; + ALWAYS $(target) ; + # TEMPORARY $(target) ; + NOUPDATE $(target) ; + } +} + + +# Class representing an action. Both 'targets' and 'sources' should list +# instances of 'virtual-target'. Action name should name a rule with this +# prototype: +# rule action-name ( targets + : sources * : properties * ) +# Targets and sources are passed as actual Jam targets. The rule may not +# establish additional dependency relationships. +# +class action +{ + import "class" ; + import indirect ; + import path ; + import property-set ; + import set : difference ; + import toolset ; + import type ; + + rule __init__ ( sources * : action-name + : property-set ? ) + { + self.sources = $(sources) ; + + self.action-name = [ indirect.make-qualified $(action-name) ] ; + + if ! $(property-set) + { + property-set = [ property-set.empty ] ; + } + + if ! [ class.is-instance $(property-set) ] + { + import errors : error : errors.error ; + errors.error "Property set instance required" ; + } + + self.properties = $(property-set) ; + } + + rule add-targets ( targets * ) + { + self.targets += $(targets) ; + } + + rule replace-targets ( old-targets * : new-targets * ) + { + self.targets = [ set.difference $(self.targets) : $(old-targets) ] ; + self.targets += $(new-targets) ; + } + + rule targets ( ) + { + return $(self.targets) ; + } + + rule sources ( ) + { + return $(self.sources) ; + } + + rule action-name ( ) + { + return $(self.action-name) ; + } + + rule properties ( ) + { + return $(self.properties) ; + } + + # Generates actual build instructions. + # + rule actualize ( ) + { + if ! $(self.actualized) + { + self.actualized = true ; + + local ps = [ properties ] ; + local properties = [ adjust-properties $(ps) ] ; + + local actual-targets ; + for local i in [ targets ] + { + actual-targets += [ $(i).actualize ] ; + } + + actualize-sources [ sources ] : $(properties) ; + + DEPENDS $(actual-targets) : $(self.actual-sources) + $(self.dependency-only-sources) ; + + # Action name can include additional rule arguments, which should + # not be passed to 'set-target-variables'. + toolset.set-target-variables + [ indirect.get-rule $(self.action-name[1]) ] $(actual-targets) + : $(properties) ; + + # Reflect ourselves in a variable for the target. This allows + # looking up additional info for the action given the raw target. + # For example to debug or output action information from action + # rules. + .action on $(actual-targets) = $(__name__) ; + + #indirect.call $(self.action-name) $(actual-targets) + # : $(self.actual-sources) : [ $(properties).raw ] ; + execute $(self.action-name) $(actual-targets) + : $(self.actual-sources) : [ $(properties).raw ] ; + + # Since we set up the creating action here, we set up the action for + # cleaning up as well. + common.Clean clean-all : $(actual-targets) ; + } + } + + # Helper for 'actualize-sources'. For each passed source, actualizes it with + # the appropriate scanner. Returns the actualized virtual targets. + # + rule actualize-source-type ( sources * : property-set ) + { + local result = ; + for local i in $(sources) + { + local scanner ; + if [ $(i).type ] + { + scanner = [ type.get-scanner [ $(i).type ] : $(property-set) ] ; + } + result += [ $(i).actualize $(scanner) ] ; + } + return $(result) ; + } + + # Creates actual Jam targets for sources. Initializes the following member + # variables: + # 'self.actual-sources' -- sources passed to the updating action. + # 'self.dependency-only-sources' -- sources marked as dependencies, but + # are not used otherwise. + # + # New values will be *appended* to the variables. They may be non-empty if + # caller wants it. + # + rule actualize-sources ( sources * : property-set ) + { + local dependencies = [ $(self.properties).get <dependency> ] ; + + self.dependency-only-sources += + [ actualize-source-type $(dependencies) : $(property-set) ] ; + self.actual-sources += + [ actualize-source-type $(sources) : $(property-set) ] ; + + # This is used to help b2 find dependencies in generated headers and + # other main targets, e.g. in: + # + # make a.h : ....... ; + # exe hello : hello.cpp : <implicit-dependency>a.h ; + # + # For b2 to find the dependency the generated target must be + # actualized (i.e. have its Jam target constructed). In the above case, + # if we are building just hello ("b2 hello"), 'a.h' will not be + # actualized unless we do it here. + local implicit = [ $(self.properties).get <implicit-dependency> ] ; + for local i in $(implicit) + { + $(i:G=).actualize ; + } + } + + # Determines real properties when trying to build with 'properties'. This is + # the last chance to fix properties, for example to adjust includes to get + # generated headers correctly. Default implementation simply returns its + # argument. + # + rule adjust-properties ( property-set ) + { + return $(property-set) ; + } + + # Execute the action rule on the given targets, sources, and properties. + # Since this does the final call to the engine action rule this takes + # engine level targets and raw properties. One could override this, for + # example, to set additional variables on the target that might be + # difficult to determine just using toolset flags. + # Note, you must call this base rule when overriding as otherwise the + # actions will not execute and the engine will not run commands. + # + rule execute ( action-name targets + : sources * : properties * ) + { + indirect.call $(action-name) $(targets) : $(sources) : $(properties) ; + } +} + + +# Action class which does nothing --- it produces the targets with specific +# properties out of nowhere. It is needed to distinguish virtual targets with +# different properties that are known to exist and have no actions which create +# them. +# +class null-action : action +{ + rule __init__ ( property-set ? ) + { + action.__init__ : .no-action : $(property-set) ; + } + + rule actualize ( ) + { + if ! $(self.actualized) + { + self.actualized = true ; + for local i in [ targets ] + { + $(i).actualize ; + } + } + } +} + + +# Class which acts exactly like 'action', except that its sources are not +# scanned for dependencies. +# +class non-scanning-action : action +{ + rule __init__ ( sources * : action-name + : property-set ? ) + { + action.__init__ $(sources) : $(action-name) : $(property-set) ; + } + + rule actualize-source-type ( sources * : property-set ) + { + local result ; + for local i in $(sources) + { + result += [ $(i).actualize ] ; + } + return $(result) ; + } +} + + +# Creates a virtual target with an appropriate name and type from 'file'. If a +# target with that name in that project already exists, returns that already +# created target. +# +# FIXME: a more correct way would be to compute the path to the file, based on +# name and source location for the project, and use that path to determine if +# the target has already been created. This logic should be shared with how we +# usually find targets identified by a specific target id. It should also be +# updated to work correctly when the file is specified using both relative and +# absolute paths. +# +# TODO: passing a project with all virtual targets is starting to be annoying. +# +rule from-file ( file : file-loc : project ) +{ + import type ; # Had to do this here to break a circular dependency. + + # Check whether we already created a target corresponding to this file. + local path = [ path.root [ path.root $(file) $(file-loc) ] [ path.pwd ] ] ; + + if $(.files.$(path)) + { + return $(.files.$(path)) ; + } + else + { + local name = [ path.make $(file) ] ; + local type = [ type.type $(file) ] ; + local result ; + + result = [ new file-target $(file) : $(type) : $(project) : : + $(file-loc) ] ; + + .files.$(path) = $(result) ; + return $(result) ; + } +} + + +# Registers a new virtual target. Checks if there is already a registered target +# with the same name, type, project and subvariant properties as well as the +# same sources and equal action. If such target is found it is returned and a +# new 'target' is not registered. Otherwise, 'target' is registered and +# returned. +# +rule register ( target ) +{ + local signature = [ sequence.join [ $(target).path ] [ $(target).name ] : - + ] ; + + local result ; + for local t in $(.cache.$(signature)) + { + local a1 = [ $(t).action ] ; + local a2 = [ $(target).action ] ; + + if ! $(result) + { + if ! $(a1) && ! $(a2) + { + result = $(t) ; + } + else if $(a1) && $(a2) && + ( [ $(a1).action-name ] = [ $(a2).action-name ] ) && + ( [ $(a1).sources ] = [ $(a2).sources ] ) + { + local ps1 = [ $(a1).properties ] ; + local ps2 = [ $(a2).properties ] ; + local relevant = [ toolset.relevant [ $(a1).action-name ] ] ; + relevant = [ $(relevant).add [ $(target).relevant ] ] ; + local p1 = [ $(ps1).relevant $(relevant) ] ; + local p2 = [ $(ps2).relevant $(relevant) ] ; + if $(p1) = $(p2) + { + result = $(t) ; + } + } + } + } + + if ! $(result) + { + .cache.$(signature) += $(target) ; + result = $(target) ; + } + + .recent-targets += $(result) ; + .all-targets += $(result) ; + + return $(result) ; +} + + +# Each target returned by 'register' is added to the .recent-targets list, +# returned by this function. This allows us to find all virtual targets created +# when building a specific main target, even those constructed only as +# intermediate targets. +# +rule recent-targets ( ) +{ + return $(.recent-targets) ; +} + + +rule clear-recent-targets ( ) +{ + .recent-targets = ; +} + + +# Returns all virtual targets ever created. +# +rule all-targets ( ) +{ + return $(.all-targets) ; +} + + +# Returns all targets from 'targets' with types equal to 'type' or derived from +# it. +# +rule select-by-type ( type : targets * ) +{ + local result ; + for local t in $(targets) + { + if [ type.is-subtype [ $(t).type ] $(type) ] + { + result += $(t) ; + } + } + return $(result) ; +} + + +rule register-actual-name ( actual-name : virtual-target ) +{ + if $(.actual.$(actual-name)) + { + local cs1 = [ $(.actual.$(actual-name)).creating-subvariant ] ; + local cmt1-name ; + if $(cs1)-is-defined + { + local cmt1 = [ $(cs1).main-target ] ; + cmt1-name = [ $(cmt1).full-name ] ; + } + local cs2 = [ $(virtual-target).creating-subvariant ] ; + local cmt2-name ; + if $(cs2)-is-defined + { + local cmt2 = [ $(cs2).main-target ] ; + cmt2-name = [ $(cmt2).full-name ] ; + } + local extra-error-information ; + if ! $(cs1)-is-defined || ! $(cs2)-is-defined + { + extra-error-information = Encountered a virtual-target without a + creating subvariant. It could be the virtual target has not been + registered via the virtual-target.register rule. ; + } + + local action1 = [ $(.actual.$(actual-name)).action ] ; + local action2 = [ $(virtual-target).action ] ; + local properties-added ; + local properties-removed ; + if $(action1) && $(action2) + { + local p1 = [ $(action1).properties ] ; + local p2 = [ $(action2).properties ] ; + # Only show features that are relevant for either target. + local relevant = [ $(p1).get <relevant> ] [ $(p2).get <relevant> ] ; + relevant = [ feature.expand-relevant $(relevant) ] ; + # The presence of relevant can potentially mess things up, + # so we always need to show it. + relevant += relevant ; + relevant = [ property-set.create <relevant>$(relevant) ] ; + p1 = [ $(p1).relevant $(relevant) ] ; + p2 = [ $(p2).relevant $(relevant) ] ; + p1 = [ $(p1).raw ] ; + p2 = [ $(p2).raw ] ; + properties-removed = [ set.difference $(p1) : $(p2) ] ; + properties-removed ?= "none" ; + properties-added = [ set.difference $(p2) : $(p1) ] ; + properties-added ?= "none" ; + } + import errors : user-error : errors.user-error ; + errors.user-error "Name clash for '$(actual-name)'" + : "" + : "Tried to build the target twice, with property sets having " + : "these incompatible properties:" + : "" + : " - " $(properties-removed) + : " - " $(properties-added) + : "" + : "Please make sure to have consistent requirements for these " + : "properties everywhere in your project, especially for install" + : "targets." + ; + } + else + { + .actual.$(actual-name) = $(virtual-target) ; + } +} + + +# Traverses the dependency graph of 'target' and return all targets that will be +# created before this one is created. If the root of some dependency graph is +# found during traversal, it is either included or not, depending on the +# 'include-roots' value. In either case traversal stops at root targets, i.e. +# root target sources are not traversed. +# +rule traverse ( target : include-roots ? : include-sources ? ) +{ + local result ; + if [ $(target).action ] + { + local action = [ $(target).action ] ; + # This includes the 'target' as well. + result += [ $(action).targets ] ; + + for local t in [ $(action).sources ] + { + if ! [ $(t).root ] + { + result += [ traverse $(t) : $(include-roots) : + $(include-sources) ] ; + } + else if $(include-roots) + { + result += $(t) ; + } + } + } + else if $(include-sources) + { + result = $(target) ; + } + return $(result) ; +} + + +# Takes an 'action' instance and creates a new instance of it and all targets +# produced by the action. The rule-name and properties are set to +# 'new-rule-name' and 'new-properties', if those are specified. Returns the +# cloned action. +# +rule clone-action ( action : new-project : new-action-name ? : new-properties ? + ) +{ + if ! $(new-action-name) + { + new-action-name = [ $(action).action-name ] ; + } + if ! $(new-properties) + { + new-properties = [ $(action).properties ] ; + } + + local action-class = [ modules.peek $(action) : __class__ ] ; + local cloned-action = [ class.new $(action-class) + [ $(action).sources ] : $(new-action-name) : $(new-properties) ] ; + + local cloned-targets ; + for local target in [ $(action).targets ] + { + local n = [ $(target).name ] ; + # Do not modify produced target names. + local cloned-target = [ class.new file-target $(n) exact : + [ $(target).type ] : $(new-project) : $(cloned-action) ] ; + local d = [ $(target).dependencies ] ; + if $(d) + { + $(cloned-target).depends $(d) ; + } + $(cloned-target).root [ $(target).root ] ; + $(cloned-target).creating-subvariant [ $(target).creating-subvariant ] ; + + cloned-targets += $(cloned-target) ; + } + + return $(cloned-action) ; +} + + +class subvariant +{ + import sequence ; + import type ; + + rule __init__ ( main-target # The instance of main-target class. + : property-set # Properties requested for this target. + : sources * + : build-properties # Actually used properties. + : sources-usage-requirements # Properties propagated from sources. + : created-targets * ) # Top-level created targets. + { + self.main-target = $(main-target) ; + self.properties = $(property-set) ; + self.sources = $(sources) ; + self.build-properties = $(build-properties) ; + self.sources-usage-requirements = $(sources-usage-requirements) ; + self.created-targets = $(created-targets) ; + + # Pre-compose a list of other dependency graphs this one depends on. + local deps = [ $(build-properties).get <implicit-dependency> ] ; + for local d in $(deps) + { + self.other-dg += [ $(d:G=).creating-subvariant ] ; + } + + self.other-dg = [ sequence.unique $(self.other-dg) ] ; + } + + rule main-target ( ) + { + return $(self.main-target) ; + } + + rule created-targets ( ) + { + return $(self.created-targets) ; + } + + rule requested-properties ( ) + { + return $(self.properties) ; + } + + rule build-properties ( ) + { + return $(self.build-properties) ; + } + + rule sources-usage-requirements ( ) + { + return $(self.sources-usage-requirements) ; + } + + rule set-usage-requirements ( usage-requirements ) + { + self.usage-requirements = $(usage-requirements) ; + } + + rule usage-requirements ( ) + { + return $(self.usage-requirements) ; + } + + # Returns all targets referenced by this subvariant, either directly or + # indirectly, and either as sources, or as dependency properties. Targets + # referred to using the dependency property are returned as properties, not + # targets. + # + rule all-referenced-targets ( theset ) + { + # Find directly referenced targets. + local deps = [ $(self.build-properties).dependency ] ; + local all-targets = $(self.sources) $(deps) ; + + # Find other subvariants. + local r ; + for local t in $(all-targets) + { + if ! [ $(theset).contains $(t) ] + { + $(theset).add $(t) ; + r += [ $(t:G=).creating-subvariant ] ; + } + } + r = [ sequence.unique $(r) ] ; + for local s in $(r) + { + if $(s) != $(__name__) + { + $(s).all-referenced-targets $(theset) ; + } + } + } + + # Returns the properties specifying implicit include paths to generated + # headers. This traverses all targets in this subvariant and subvariants + # referred by <implicit-dependency> properties. For all targets of type + # 'target-type' (or for all targets, if 'target-type' is not specified), the + # result will contain <$(feature)>path-to-that-target. + # + rule implicit-includes ( feature : target-type ? ) + { + local key = ii$(feature)-$(target-type:E="") ; + if ! $($(key))-is-not-empty + { + local target-paths = [ all-target-directories $(target-type) ] ; + target-paths = [ sequence.unique $(target-paths) ] ; + local result = $(target-paths:G=$(feature)) ; + if ! $(result) + { + result = "" ; + } + $(key) = $(result) ; + } + if $($(key)) = "" + { + return ; + } + else + { + return $($(key)) ; + } + } + + rule all-target-directories ( target-type ? ) + { + if ! $(self.target-directories.$(target-type:E=)) + { + compute-target-directories $(target-type) ; + } + return $(self.target-directories.$(target-type:E=)) ; + } + + rule compute-target-directories ( target-type ? ) + { + local result ; + for local t in $(self.created-targets) + { + # Skip targets of the wrong type. + local type = [ $(t).type ] ; + if ! $(target-type) || + ( $(type) && [ type.is-derived $(type) $(target-type) ] ) + { + result = [ sequence.merge $(result) : [ $(t).path ] ] ; + } + } + for local d in $(self.other-dg) + { + result += [ $(d).all-target-directories $(target-type) ] ; + } + self.target-directories.$(target-type:E=) = $(result) ; + } +} diff --git a/src/boost/tools/build/src/build/virtual_target.py b/src/boost/tools/build/src/build/virtual_target.py new file mode 100644 index 000000000..8dfd9fbf0 --- /dev/null +++ b/src/boost/tools/build/src/build/virtual_target.py @@ -0,0 +1,1175 @@ +# Status: ported. +# Base revision: 64488. +# +# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and +# distribute this software is granted provided this copyright notice appears in +# all copies. This software is provided "as is" without express or implied +# warranty, and with no claim as to its suitability for any purpose. + +# Implements virtual targets, which correspond to actual files created during +# build, but are not yet targets in Jam sense. They are needed, for example, +# when searching for possible transormation sequences, when it's not known +# if particular target should be created at all. +# +# +# +--------------------------+ +# | VirtualTarget | +# +==========================+ +# | actualize | +# +--------------------------+ +# | actualize_action() = 0 | +# | actualize_location() = 0 | +# +----------------+---------+ +# | +# ^ +# / \ +# +-+-+ +# | +# +---------------------+ +-------+--------------+ +# | Action | | AbstractFileTarget | +# +=====================| * +======================+ +# | action_name | +--+ action | +# | properties | | +----------------------+ +# +---------------------+--+ | actualize_action() | +# | actualize() |0..1 +-----------+----------+ +# | path() | | +# | adjust_properties() | sources | +# | actualize_sources() | targets | +# +------+--------------+ ^ +# | / \ +# ^ +-+-+ +# / \ | +# +-+-+ +-------------+-------------+ +# | | | +# | +------+---------------+ +--------+-------------+ +# | | FileTarget | | SearchedLibTarget | +# | +======================+ +======================+ +# | | actualize-location() | | actualize-location() | +# | +----------------------+ +----------------------+ +# | +# +-+------------------------------+ +# | | +# +----+----------------+ +---------+-----------+ +# | CompileAction | | LinkAction | +# +=====================+ +=====================+ +# | adjust_properties() | | adjust_properties() | +# +---------------------+ | actualize_sources() | +# +---------------------+ +# +# The 'CompileAction' and 'LinkAction' classes are defined not here, +# but in builtin.jam modules. They are shown in the diagram to give +# the big picture. + +import bjam + +import re +import os.path +import string +import types + +from b2.util import path, utility, set, is_iterable_typed +from b2.util.utility import add_grist, get_grist, ungrist, replace_grist, get_value +from b2.util.sequence import unique +from b2.tools import common +from b2.exceptions import * +import b2.build.type +import b2.build.property_set as property_set + +import b2.build.property as property + +from b2.manager import get_manager +from b2.util import bjam_signature + +__re_starts_with_at = re.compile ('^@(.*)') + +class VirtualTargetRegistry: + def __init__ (self, manager): + self.manager_ = manager + + # A cache for FileTargets + self.files_ = {} + + # A cache for targets. + self.cache_ = {} + + # A map of actual names to virtual targets. + # Used to make sure we don't associate same + # actual target to two virtual targets. + self.actual_ = {} + + self.recent_targets_ = [] + + # All targets ever registered + self.all_targets_ = [] + + self.next_id_ = 0 + + def register (self, target): + """ Registers a new virtual target. Checks if there's already registered target, with the same + name, type, project and subvariant properties, and also with the same sources + and equal action. If such target is found it is returned and 'target' is not registered. + Otherwise, 'target' is registered and returned. + """ + assert isinstance(target, VirtualTarget) + if target.path(): + signature = target.path() + "-" + target.name() + else: + signature = "-" + target.name() + + result = None + if signature not in self.cache_: + self.cache_ [signature] = [] + + for t in self.cache_ [signature]: + a1 = t.action () + a2 = target.action () + + # TODO: why are we checking for not result? + if not result: + if not a1 and not a2: + result = t + else: + if a1 and a2 and a1.action_name () == a2.action_name () and a1.sources () == a2.sources (): + ps1 = a1.properties () + ps2 = a2.properties () + p1 = ps1.base () + ps1.free () +\ + b2.util.set.difference(ps1.dependency(), ps1.incidental()) + p2 = ps2.base () + ps2.free () +\ + b2.util.set.difference(ps2.dependency(), ps2.incidental()) + if p1 == p2: + result = t + + if not result: + self.cache_ [signature].append (target) + result = target + + # TODO: Don't append if we found pre-existing target? + self.recent_targets_.append(result) + self.all_targets_.append(result) + + return result + + def from_file (self, file, file_location, project): + """ Creates a virtual target with appropriate name and type from 'file'. + If a target with that name in that project was already created, returns that already + created target. + TODO: more correct way would be to compute path to the file, based on name and source location + for the project, and use that path to determine if the target was already created. + TODO: passing project with all virtual targets starts to be annoying. + """ + if __debug__: + from .targets import ProjectTarget + assert isinstance(file, basestring) + assert isinstance(file_location, basestring) + assert isinstance(project, ProjectTarget) + # Check if we've created a target corresponding to this file. + path = os.path.join(os.getcwd(), file_location, file) + path = os.path.normpath(path) + + if path in self.files_: + return self.files_ [path] + + file_type = b2.build.type.type (file) + + result = FileTarget (file, file_type, project, + None, file_location) + self.files_ [path] = result + + return result + + def recent_targets(self): + """Each target returned by 'register' is added to a list of + 'recent-target', returned by this function. So, this allows + us to find all targets created when building a given main + target, even if the target.""" + + return self.recent_targets_ + + def clear_recent_targets(self): + self.recent_targets_ = [] + + def all_targets(self): + # Returns all virtual targets ever created + return self.all_targets_ + + # Returns all targets from 'targets' with types + # equal to 'type' or derived from it. + def select_by_type(self, type, targets): + return [t for t in targets if b2.build.type.is_sybtype(t.type(), type)] + + def register_actual_name (self, actual_name, virtual_target): + assert isinstance(actual_name, basestring) + assert isinstance(virtual_target, VirtualTarget) + if actual_name in self.actual_: + cs1 = self.actual_ [actual_name].creating_subvariant () + cs2 = virtual_target.creating_subvariant () + cmt1 = cs1.main_target () + cmt2 = cs2.main_target () + + action1 = self.actual_ [actual_name].action () + action2 = virtual_target.action () + + properties_added = [] + properties_removed = [] + if action1 and action2: + p1 = action1.properties () + p1 = p1.raw () + p2 = action2.properties () + p2 = p2.raw () + + properties_removed = set.difference (p1, p2) + if not properties_removed: + properties_removed = ["none"] + + properties_added = set.difference (p2, p1) + if not properties_added: + properties_added = ["none"] + + # FIXME: Revive printing of real location. + get_manager().errors()( + "Duplicate name of actual target: '%s'\n" + "previous virtual target '%s'\n" + "created from '%s'\n" + "another virtual target '%s'\n" + "created from '%s'\n" + "added properties:\n%s\n" + "removed properties:\n%s\n" + % (actual_name, + self.actual_ [actual_name], cmt1.project().location(), + virtual_target, + cmt2.project().location(), + '\n'.join('\t' + p for p in properties_added), + '\n'.join('\t' + p for p in properties_removed))) + + else: + self.actual_ [actual_name] = virtual_target + + + def add_suffix (self, specified_name, file_type, prop_set): + """ Appends the suffix appropriate to 'type/property_set' combination + to the specified name and returns the result. + """ + assert isinstance(specified_name, basestring) + assert isinstance(file_type, basestring) + assert isinstance(prop_set, property_set.PropertySet) + suffix = b2.build.type.generated_target_suffix (file_type, prop_set) + + if suffix: + return specified_name + '.' + suffix + + else: + return specified_name + +class VirtualTarget: + """ Potential target. It can be converted into jam target and used in + building, if needed. However, it can be also dropped, which allows + to search for different transformation and select only one. + name: name of this target. + project: project to which this target belongs. + """ + def __init__ (self, name, project): + if __debug__: + from .targets import ProjectTarget + assert isinstance(name, basestring) + assert isinstance(project, ProjectTarget) + self.name_ = name + self.project_ = project + self.dependencies_ = [] + self.always_ = False + + # Caches if dapendencies for scanners have already been set. + self.made_ = {} + + def manager(self): + return self.project_.manager() + + def virtual_targets(self): + return self.manager().virtual_targets() + + def name (self): + """ Name of this target. + """ + return self.name_ + + def project (self): + """ Project of this target. + """ + return self.project_ + + def depends (self, d): + """ Adds additional instances of 'VirtualTarget' that this + one depends on. + """ + self.dependencies_ = unique (self.dependencies_ + d).sort () + + def dependencies (self): + return self.dependencies_ + + def always(self): + self.always_ = True + + def actualize (self, scanner = None): + """ Generates all the actual targets and sets up build actions for + this target. + + If 'scanner' is specified, creates an additional target + with the same location as actual target, which will depend on the + actual target and be associated with 'scanner'. That additional + target is returned. See the docs (#dependency_scanning) for rationale. + Target must correspond to a file if 'scanner' is specified. + + If scanner is not specified, then actual target is returned. + """ + if __debug__: + from .scanner import Scanner + assert scanner is None or isinstance(scanner, Scanner) + actual_name = self.actualize_no_scanner () + + if self.always_: + bjam.call("ALWAYS", actual_name) + + if not scanner: + return actual_name + + else: + # Add the scanner instance to the grist for name. + g = '-'.join ([ungrist(get_grist(actual_name)), str(id(scanner))]) + + name = replace_grist (actual_name, '<' + g + '>') + + if name not in self.made_: + self.made_ [name] = True + + self.project_.manager ().engine ().add_dependency (name, actual_name) + + self.actualize_location (name) + + self.project_.manager ().scanners ().install (scanner, name, str (self)) + + return name + +# private: (overridables) + + def actualize_action (self, target): + """ Sets up build actions for 'target'. Should call appropriate rules + and set target variables. + """ + raise BaseException ("method should be defined in derived classes") + + def actualize_location (self, target): + """ Sets up variables on 'target' which specify its location. + """ + raise BaseException ("method should be defined in derived classes") + + def path (self): + """ If the target is generated one, returns the path where it will be + generated. Otherwise, returns empty list. + """ + raise BaseException ("method should be defined in derived classes") + + def actual_name (self): + """ Return that actual target name that should be used + (for the case where no scanner is involved) + """ + raise BaseException ("method should be defined in derived classes") + + +class AbstractFileTarget (VirtualTarget): + """ Target which correspond to a file. The exact mapping for file + is not yet specified in this class. (TODO: Actually, the class name + could be better...) + + May be a source file (when no action is specified), or + derived file (otherwise). + + The target's grist is concatenation of project's location, + properties of action (for derived files), and, optionally, + value identifying the main target. + + exact: If non-empty, the name is exactly the name + created file should have. Otherwise, the '__init__' + method will add suffix obtained from 'type' by + calling 'type.generated-target-suffix'. + + type: optional type of this target. + """ + def __init__ (self, name, type, project, action = None, exact=False): + assert isinstance(type, basestring) or type is None + assert action is None or isinstance(action, Action) + assert isinstance(exact, (int, bool)) + VirtualTarget.__init__ (self, name, project) + + self.type_ = type + + self.action_ = action + self.exact_ = exact + + if action: + action.add_targets ([self]) + + if self.type and not exact: + self.__adjust_name (name) + + + self.actual_name_ = None + self.path_ = None + self.intermediate_ = False + self.creating_subvariant_ = None + + # True if this is a root target. + self.root_ = False + + def type (self): + return self.type_ + + def set_path (self, path): + """ Sets the path. When generating target name, it will override any path + computation from properties. + """ + assert isinstance(path, basestring) + self.path_ = os.path.normpath(path) + + def action (self): + """ Returns the action. + """ + return self.action_ + + def root (self, set = None): + """ Sets/gets the 'root' flag. Target is root is it directly correspods to some + variant of a main target. + """ + assert isinstance(set, (int, bool, type(None))) + if set: + self.root_ = True + return self.root_ + + def creating_subvariant (self, s = None): + """ Gets or sets the subvariant which created this target. Subvariant + is set when target is brought into existence, and is never changed + after that. In particual, if target is shared by subvariant, only + the first is stored. + s: If specified, specified the value to set, + which should be instance of 'subvariant' class. + """ + assert s is None or isinstance(s, Subvariant) + if s and not self.creating_subvariant (): + if self.creating_subvariant (): + raise BaseException ("Attempt to change 'dg'") + + else: + self.creating_subvariant_ = s + + return self.creating_subvariant_ + + def actualize_action (self, target): + assert isinstance(target, basestring) + if self.action_: + self.action_.actualize () + + # Return a human-readable representation of this target + # + # If this target has an action, that's: + # + # { <action-name>-<self.name>.<self.type> <action-sources>... } + # + # otherwise, it's: + # + # { <self.name>.<self.type> } + # + def str(self): + a = self.action() + + name_dot_type = self.name_ + "." + self.type_ + + if a: + action_name = a.action_name() + ss = [ s.str() for s in a.sources()] + + return "{ %s-%s %s}" % (action_name, name_dot_type, str(ss)) + else: + return "{ " + name_dot_type + " }" + +# private: + + def actual_name (self): + if not self.actual_name_: + self.actual_name_ = '<' + self.grist() + '>' + os.path.normpath(self.name_) + + return self.actual_name_ + + def grist (self): + """Helper to 'actual_name', above. Compute unique prefix used to distinguish + this target from other targets with the same name which create different + file. + """ + # Depending on target, there may be different approaches to generating + # unique prefixes. We'll generate prefixes in the form + # <one letter approach code> <the actual prefix> + path = self.path () + + if path: + # The target will be generated to a known path. Just use the path + # for identification, since path is as unique as it can get. + return 'p' + path + + else: + # File is either source, which will be searched for, or is not a file at + # all. Use the location of project for distinguishing. + project_location = self.project_.get ('location') + path_components = b2.util.path.split(project_location) + location_grist = '!'.join (path_components) + + if self.action_: + ps = self.action_.properties () + property_grist = ps.as_path () + # 'property_grist' can be empty when 'ps' is an empty + # property set. + if property_grist: + location_grist = location_grist + '/' + property_grist + + return 'l' + location_grist + + def __adjust_name(self, specified_name): + """Given the target name specified in constructor, returns the + name which should be really used, by looking at the <tag> properties. + The tag properties come in two flavour: + - <tag>value, + - <tag>@rule-name + In the first case, value is just added to name + In the second case, the specified rule is called with specified name, + target type and properties and should return the new name. + If not <tag> property is specified, or the rule specified by + <tag> returns nothing, returns the result of calling + virtual-target.add-suffix""" + assert isinstance(specified_name, basestring) + if self.action_: + ps = self.action_.properties() + else: + ps = property_set.empty() + + # FIXME: I'm not sure how this is used, need to check with + # Rene to figure out how to implement + #~ We add ourselves to the properties so that any tag rule can get + #~ more direct information about the target than just that available + #~ through the properties. This is useful in implementing + #~ name changes based on the sources of the target. For example to + #~ make unique names of object files based on the source file. + #~ --grafik + #ps = property_set.create(ps.raw() + ["<target>%s" % "XXXX"]) + #ps = [ property-set.create [ $(ps).raw ] <target>$(__name__) ] ; + + tag = ps.get("<tag>") + + if tag: + + if len(tag) > 1: + get_manager().errors()( + """<tag>@rulename is present but is not the only <tag> feature""") + + tag = tag[0] + if callable(tag): + self.name_ = tag(specified_name, self.type_, ps) + else: + if not tag[0] == '@': + self.manager_.errors()("""The value of the <tag> feature must be '@rule-nane'""") + + exported_ps = b2.util.value_to_jam(ps, methods=True) + self.name_ = b2.util.call_jam_function( + tag[1:], specified_name, self.type_, exported_ps) + if self.name_: + self.name_ = self.name_[0] + + # If there's no tag or the tag rule returned nothing. + if not tag or not self.name_: + self.name_ = add_prefix_and_suffix(specified_name, self.type_, ps) + + def actualize_no_scanner(self): + name = self.actual_name() + + # Do anything only on the first invocation + if not self.made_: + self.made_[name] = True + + if self.action_: + # For non-derived target, we don't care if there + # are several virtual targets that refer to the same name. + # One case when this is unavoidable is when file name is + # main.cpp and two targets have types CPP (for compiling) + # and MOCCABLE_CPP (for conversion to H via Qt tools). + self.virtual_targets().register_actual_name(name, self) + + for i in self.dependencies_: + self.manager_.engine().add_dependency(name, i.actualize()) + + self.actualize_location(name) + self.actualize_action(name) + + return name + +@bjam_signature((["specified_name"], ["type"], ["property_set"])) +def add_prefix_and_suffix(specified_name, type, property_set): + """Appends the suffix appropriate to 'type/property-set' combination + to the specified name and returns the result.""" + + property_set = b2.util.jam_to_value_maybe(property_set) + + suffix = "" + if type: + suffix = b2.build.type.generated_target_suffix(type, property_set) + + # Handle suffixes for which no leading dot is desired. Those are + # specified by enclosing them in <...>. Needed by python so it + # can create "_d.so" extensions, for example. + if get_grist(suffix): + suffix = ungrist(suffix) + elif suffix: + suffix = "." + suffix + + prefix = "" + if type: + prefix = b2.build.type.generated_target_prefix(type, property_set) + + if specified_name.startswith(prefix): + prefix = "" + + if not prefix: + prefix = "" + if not suffix: + suffix = "" + return prefix + specified_name + suffix + + +class FileTarget (AbstractFileTarget): + """ File target with explicitly known location. + + The file path is determined as + - value passed to the 'set_path' method, if any + - for derived files, project's build dir, joined with components + that describe action's properties. If the free properties + are not equal to the project's reference properties + an element with name of main target is added. + - for source files, project's source dir + + The file suffix is + - the value passed to the 'suffix' method, if any, or + - the suffix which correspond to the target's type. + """ + def __init__ (self, name, type, project, action = None, path=None, exact=False): + assert isinstance(type, basestring) or type is None + assert action is None or isinstance(action, Action) + assert isinstance(exact, (int, bool)) + AbstractFileTarget.__init__ (self, name, type, project, action, exact) + + self.path_ = path + + def __str__(self): + if self.type_: + return self.name_ + "." + self.type_ + else: + return self.name_ + + def clone_with_different_type(self, new_type): + assert isinstance(new_type, basestring) + return FileTarget(self.name_, new_type, self.project_, + self.action_, self.path_, exact=True) + + def actualize_location (self, target): + assert isinstance(target, basestring) + engine = self.project_.manager_.engine () + + if self.action_: + # This is a derived file. + path = self.path () + engine.set_target_variable (target, 'LOCATE', path) + + # Make sure the path exists. + engine.add_dependency (target, path) + common.mkdir(engine, path) + + # It's possible that the target name includes a directory + # too, for example when installing headers. Create that + # directory. + d = os.path.dirname(get_value(target)) + if d: + d = os.path.join(path, d) + engine.add_dependency(target, d) + common.mkdir(engine, d) + + # For real file target, we create a fake target that + # depends on the real target. This allows to run + # + # bjam hello.o + # + # without trying to guess the name of the real target. + # Note the that target has no directory name, and a special + # grist <e>. + # + # First, that means that "bjam hello.o" will build all + # known hello.o targets. + # Second, the <e> grist makes sure this target won't be confused + # with other targets, for example, if we have subdir 'test' + # with target 'test' in it that includes 'test.o' file, + # then the target for directory will be just 'test' the target + # for test.o will be <ptest/bin/gcc/debug>test.o and the target + # we create below will be <e>test.o + engine.add_dependency("<e>%s" % get_value(target), target) + + # Allow bjam <path-to-file>/<file> to work. This won't catch all + # possible ways to refer to the path (relative/absolute, extra ".", + # various "..", but should help in obvious cases. + engine.add_dependency("<e>%s" % (os.path.join(path, get_value(target))), target) + + else: + # This is a source file. + engine.set_target_variable (target, 'SEARCH', self.project_.get ('source-location')) + + + def path (self): + """ Returns the directory for this target. + """ + if not self.path_: + if self.action_: + p = self.action_.properties () + (target_path, relative_to_build_dir) = p.target_path () + + if relative_to_build_dir: + # Indicates that the path is relative to + # build dir. + target_path = os.path.join (self.project_.build_dir (), target_path) + + # Store the computed path, so that it's not recomputed + # any more + self.path_ = target_path + + return os.path.normpath(self.path_) + + +class NotFileTarget(AbstractFileTarget): + + def __init__(self, name, project, action): + assert isinstance(action, Action) + AbstractFileTarget.__init__(self, name, None, project, action) + + def path(self): + """Returns nothing, to indicate that target path is not known.""" + return None + + def actualize_location(self, target): + assert isinstance(target, basestring) + bjam.call("NOTFILE", target) + bjam.call("ALWAYS", target) + bjam.call("NOUPDATE", target) + + +class Action: + """ Class which represents an action. + Both 'targets' and 'sources' should list instances of 'VirtualTarget'. + Action name should name a rule with this prototype + rule action_name ( targets + : sources * : properties * ) + Targets and sources are passed as actual jam targets. The rule may + not establish dependency relationship, but should do everything else. + """ + def __init__ (self, manager, sources, action_name, prop_set): + assert is_iterable_typed(sources, VirtualTarget) + assert isinstance(action_name, basestring) or action_name is None + assert(isinstance(prop_set, property_set.PropertySet)) + self.sources_ = sources + self.action_name_ = action_name + if not prop_set: + prop_set = property_set.empty() + self.properties_ = prop_set + if not all(isinstance(v, VirtualTarget) for v in prop_set.get('implicit-dependency')): + import pdb + pdb.set_trace() + + self.manager_ = manager + self.engine_ = self.manager_.engine () + self.targets_ = [] + + # Indicates whether this has been actualized or not. + self.actualized_ = False + + self.dependency_only_sources_ = [] + self.actual_sources_ = [] + + + def add_targets (self, targets): + assert is_iterable_typed(targets, VirtualTarget) + self.targets_ += targets + + + def replace_targets(self, old_targets, new_targets): + assert is_iterable_typed(old_targets, VirtualTarget) + assert is_iterable_typed(new_targets, VirtualTarget) + self.targets_ = [t for t in self.targets_ if not t in old_targets] + new_targets + + def targets (self): + return self.targets_ + + def sources (self): + return self.sources_ + + def action_name (self): + return self.action_name_ + + def properties (self): + return self.properties_ + + def actualize (self): + """ Generates actual build instructions. + """ + if self.actualized_: + return + + self.actualized_ = True + + ps = self.properties () + properties = self.adjust_properties (ps) + + + actual_targets = [] + + for i in self.targets (): + actual_targets.append (i.actualize ()) + + self.actualize_sources (self.sources (), properties) + + self.engine_.add_dependency (actual_targets, self.actual_sources_ + self.dependency_only_sources_) + + # FIXME: check the comment below. Was self.action_name_ [1] + # Action name can include additional rule arguments, which should not + # be passed to 'set-target-variables'. + # FIXME: breaking circular dependency + import toolset + toolset.set_target_variables (self.manager_, self.action_name_, actual_targets, properties) + + engine = self.manager_.engine () + + # FIXME: this is supposed to help --out-xml option, but we don't + # implement that now, and anyway, we should handle it in Python, + # not but putting variables on bjam-level targets. + bjam.call("set-target-variable", actual_targets, ".action", repr(self)) + + self.manager_.engine ().set_update_action (self.action_name_, actual_targets, self.actual_sources_, + properties) + + # Since we set up creating action here, we also set up + # action for cleaning up + self.manager_.engine ().set_update_action ('common.Clean', 'clean-all', + actual_targets) + + return actual_targets + + def actualize_source_type (self, sources, prop_set): + """ Helper for 'actualize_sources'. + For each passed source, actualizes it with the appropriate scanner. + Returns the actualized virtual targets. + """ + assert is_iterable_typed(sources, VirtualTarget) + assert isinstance(prop_set, property_set.PropertySet) + result = [] + for i in sources: + scanner = None + +# FIXME: what's this? +# if isinstance (i, str): +# i = self.manager_.get_object (i) + + if i.type (): + scanner = b2.build.type.get_scanner (i.type (), prop_set) + + r = i.actualize (scanner) + result.append (r) + + return result + + def actualize_sources (self, sources, prop_set): + """ Creates actual jam targets for sources. Initializes two member + variables: + 'self.actual_sources_' -- sources which are passed to updating action + 'self.dependency_only_sources_' -- sources which are made dependencies, but + are not used otherwise. + + New values will be *appended* to the variables. They may be non-empty, + if caller wants it. + """ + assert is_iterable_typed(sources, VirtualTarget) + assert isinstance(prop_set, property_set.PropertySet) + dependencies = self.properties_.get ('<dependency>') + + self.dependency_only_sources_ += self.actualize_source_type (dependencies, prop_set) + self.actual_sources_ += self.actualize_source_type (sources, prop_set) + + # This is used to help bjam find dependencies in generated headers + # in other main targets. + # Say: + # + # make a.h : ....... ; + # exe hello : hello.cpp : <implicit-dependency>a.h ; + # + # However, for bjam to find the dependency the generated target must + # be actualized (i.e. have the jam target). In the above case, + # if we're building just hello ("bjam hello"), 'a.h' won't be + # actualized unless we do it here. + implicit = self.properties_.get("<implicit-dependency>") + + for i in implicit: + i.actualize() + + def adjust_properties (self, prop_set): + """ Determines real properties when trying building with 'properties'. + This is last chance to fix properties, for example to adjust includes + to get generated headers correctly. Default implementation returns + its argument. + """ + assert isinstance(prop_set, property_set.PropertySet) + return prop_set + + +class NullAction (Action): + """ Action class which does nothing --- it produces the targets with + specific properties out of nowhere. It's needed to distinguish virtual + targets with different properties that are known to exist, and have no + actions which create them. + """ + def __init__ (self, manager, prop_set): + assert isinstance(prop_set, property_set.PropertySet) + Action.__init__ (self, manager, [], None, prop_set) + + def actualize (self): + if not self.actualized_: + self.actualized_ = True + + for i in self.targets (): + i.actualize () + +class NonScanningAction(Action): + """Class which acts exactly like 'action', except that the sources + are not scanned for dependencies.""" + + def __init__(self, sources, action_name, property_set): + #FIXME: should the manager parameter of Action.__init__ + #be removed? -- Steven Watanabe + Action.__init__(self, b2.manager.get_manager(), sources, action_name, property_set) + + def actualize_source_type(self, sources, ps=None): + assert is_iterable_typed(sources, VirtualTarget) + assert isinstance(ps, property_set.PropertySet) or ps is None + result = [] + for s in sources: + result.append(s.actualize()) + return result + +def traverse (target, include_roots = False, include_sources = False): + """ Traverses the dependency graph of 'target' and return all targets that will + be created before this one is created. If root of some dependency graph is + found during traversal, it's either included or not, dependencing of the + value of 'include_roots'. In either case, sources of root are not traversed. + """ + assert isinstance(target, VirtualTarget) + assert isinstance(include_roots, (int, bool)) + assert isinstance(include_sources, (int, bool)) + result = [] + + if target.action (): + action = target.action () + + # This includes 'target' as well + result += action.targets () + + for t in action.sources (): + + # FIXME: + # TODO: see comment in Manager.register_object () + #if not isinstance (t, VirtualTarget): + # t = target.project_.manager_.get_object (t) + + if not t.root (): + result += traverse (t, include_roots, include_sources) + + elif include_roots: + result.append (t) + + elif include_sources: + result.append (target) + + return result + +def clone_action (action, new_project, new_action_name, new_properties): + """Takes an 'action' instances and creates new instance of it + and all produced target. The rule-name and properties are set + to 'new-rule-name' and 'new-properties', if those are specified. + Returns the cloned action.""" + if __debug__: + from .targets import ProjectTarget + assert isinstance(action, Action) + assert isinstance(new_project, ProjectTarget) + assert isinstance(new_action_name, basestring) + assert isinstance(new_properties, property_set.PropertySet) + if not new_action_name: + new_action_name = action.action_name() + + if not new_properties: + new_properties = action.properties() + + cloned_action = action.__class__(action.manager_, action.sources(), new_action_name, + new_properties) + + cloned_targets = [] + for target in action.targets(): + + n = target.name() + # Don't modify the name of the produced targets. Strip the directory f + cloned_target = FileTarget(n, target.type(), new_project, + cloned_action, exact=True) + + d = target.dependencies() + if d: + cloned_target.depends(d) + cloned_target.root(target.root()) + cloned_target.creating_subvariant(target.creating_subvariant()) + + cloned_targets.append(cloned_target) + + return cloned_action + +class Subvariant: + + def __init__ (self, main_target, prop_set, sources, build_properties, sources_usage_requirements, created_targets): + """ + main_target: The instance of MainTarget class + prop_set: Properties requested for this target + sources: + build_properties: Actually used properties + sources_usage_requirements: Properties propagated from sources + created_targets: Top-level created targets + """ + if __debug__: + from .targets import AbstractTarget + assert isinstance(main_target, AbstractTarget) + assert isinstance(prop_set, property_set.PropertySet) + assert is_iterable_typed(sources, VirtualTarget) + assert isinstance(build_properties, property_set.PropertySet) + assert isinstance(sources_usage_requirements, property_set.PropertySet) + assert is_iterable_typed(created_targets, VirtualTarget) + self.main_target_ = main_target + self.properties_ = prop_set + self.sources_ = sources + self.build_properties_ = build_properties + self.sources_usage_requirements_ = sources_usage_requirements + self.created_targets_ = created_targets + + self.usage_requirements_ = None + + # Pre-compose the list of other dependency graphs, on which this one + # depends + deps = build_properties.get('<implicit-dependency>') + + self.other_dg_ = [] + for d in deps: + self.other_dg_.append(d.creating_subvariant ()) + + self.other_dg_ = unique (self.other_dg_) + + self.implicit_includes_cache_ = {} + self.target_directories_ = None + + def main_target (self): + return self.main_target_ + + def created_targets (self): + return self.created_targets_ + + def requested_properties (self): + return self.properties_ + + def build_properties (self): + return self.build_properties_ + + def sources_usage_requirements (self): + return self.sources_usage_requirements_ + + def set_usage_requirements (self, usage_requirements): + assert isinstance(usage_requirements, property_set.PropertySet) + self.usage_requirements_ = usage_requirements + + def usage_requirements (self): + return self.usage_requirements_ + + def all_referenced_targets(self, result): + """Returns all targets referenced by this subvariant, + either directly or indirectly, and either as sources, + or as dependency properties. Targets referred with + dependency property are returned a properties, not targets.""" + if __debug__: + from .property import Property + assert is_iterable_typed(result, (VirtualTarget, Property)) + # Find directly referenced targets. + deps = self.build_properties().dependency() + all_targets = self.sources_ + deps + + # Find other subvariants. + r = [] + for e in all_targets: + if not e in result: + result.add(e) + if isinstance(e, property.Property): + t = e.value + else: + t = e + + # FIXME: how can this be? + cs = t.creating_subvariant() + if cs: + r.append(cs) + r = unique(r) + for s in r: + if s != self: + s.all_referenced_targets(result) + + + def implicit_includes (self, feature, target_type): + """ Returns the properties which specify implicit include paths to + generated headers. This traverses all targets in this subvariant, + and subvariants referred by <implcit-dependecy>properties. + For all targets which are of type 'target-type' (or for all targets, + if 'target_type' is not specified), the result will contain + <$(feature)>path-to-that-target. + """ + assert isinstance(feature, basestring) + assert isinstance(target_type, basestring) + if not target_type: + key = feature + else: + key = feature + "-" + target_type + + + result = self.implicit_includes_cache_.get(key) + if not result: + target_paths = self.all_target_directories(target_type) + target_paths = unique(target_paths) + result = ["<%s>%s" % (feature, p) for p in target_paths] + self.implicit_includes_cache_[key] = result + + return result + + def all_target_directories(self, target_type = None): + assert isinstance(target_type, (basestring, type(None))) + # TODO: does not appear to use target_type in deciding + # if we've computed this already. + if not self.target_directories_: + self.target_directories_ = self.compute_target_directories(target_type) + return self.target_directories_ + + def compute_target_directories(self, target_type=None): + assert isinstance(target_type, (basestring, type(None))) + result = [] + for t in self.created_targets(): + if not target_type or b2.build.type.is_derived(t.type(), target_type): + result.append(t.path()) + + for d in self.other_dg_: + result.extend(d.all_target_directories(target_type)) + + result = unique(result) + return result diff --git a/src/boost/tools/build/src/build_system.py b/src/boost/tools/build/src/build_system.py new file mode 100644 index 000000000..1702acf5a --- /dev/null +++ b/src/boost/tools/build/src/build_system.py @@ -0,0 +1,682 @@ +# Status: mostly ported. Missing is --out-xml support, 'configure' integration +# and some FIXME. +# Base revision: 64351 + +# Copyright 2003, 2005 Dave Abrahams +# Copyright 2006 Rene Rivera +# Copyright 2003, 2004, 2005, 2006, 2007 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) +import os +import sys +import re + +import bjam + +# set this early on since some of the following modules +# require looking at the sys.argv +sys.argv = bjam.variable("ARGV") + + +from b2.build.engine import Engine +from b2.manager import Manager +from b2.util.path import glob +from b2.build import feature, property_set +import b2.build.virtual_target +from b2.build.targets import ProjectTarget +import b2.build.build_request +from b2.build.errors import ExceptionWithUserContext +import b2.tools.common +from b2.build.toolset import using + +import b2.build.virtual_target as virtual_target +import b2.build.build_request as build_request + +import b2.util.regex + +from b2.manager import get_manager +from b2.util import cached +from b2.util import option + +################################################################################ +# +# Module global data. +# +################################################################################ + +# Flag indicating we should display additional debugging information related to +# locating and loading Boost Build configuration files. +debug_config = False + +# The cleaning is tricky. Say, if user says 'bjam --clean foo' where 'foo' is a +# directory, then we want to clean targets which are in 'foo' as well as those +# in any children Jamfiles under foo but not in any unrelated Jamfiles. To +# achieve this we collect a list of projects under which cleaning is allowed. +project_targets = [] + +# Virtual targets obtained when building main targets references on the command +# line. When running 'bjam --clean main_target' we want to clean only files +# belonging to that main target so we need to record which targets are produced +# for it. +results_of_main_targets = [] + +# Was an XML dump requested? +out_xml = False + +# Default toolset & version to be used in case no other toolset has been used +# explicitly by either the loaded configuration files, the loaded project build +# scripts or an explicit toolset request on the command line. If not specified, +# an arbitrary default will be used based on the current host OS. This value, +# while not strictly necessary, has been added to allow testing Boost-Build's +# default toolset usage functionality. +default_toolset = None +default_toolset_version = None + +################################################################################ +# +# Public rules. +# +################################################################################ + +# Returns the property set with the free features from the currently processed +# build request. +# +def command_line_free_features(): + return command_line_free_features + +# Sets the default toolset & version to be used in case no other toolset has +# been used explicitly by either the loaded configuration files, the loaded +# project build scripts or an explicit toolset request on the command line. For +# more detailed information see the comment related to used global variables. +# +def set_default_toolset(toolset, version=None): + default_toolset = toolset + default_toolset_version = version + + +pre_build_hook = [] + +def add_pre_build_hook(callable): + pre_build_hook.append(callable) + +post_build_hook = None + +def set_post_build_hook(callable): + post_build_hook = callable + +################################################################################ +# +# Local rules. +# +################################################################################ + +# Returns actual Jam targets to be used for executing a clean request. +# +def actual_clean_targets(targets): + + # Construct a list of projects explicitly detected as targets on this build + # system run. These are the projects under which cleaning is allowed. + for t in targets: + if isinstance(t, b2.build.targets.ProjectTarget): + project_targets.append(t.project_module()) + + # Construct a list of targets explicitly detected on this build system run + # as a result of building main targets. + targets_to_clean = set() + for t in results_of_main_targets: + # Do not include roots or sources. + targets_to_clean.update(virtual_target.traverse(t)) + + to_clean = [] + for t in get_manager().virtual_targets().all_targets(): + + # Remove only derived targets. + if t.action(): + p = t.project() + if t in targets_to_clean or should_clean_project(p.project_module()): + to_clean.append(t) + + return [t.actualize() for t in to_clean] + +_target_id_split = re.compile("(.*)//(.*)") + +# Given a target id, try to find and return the corresponding target. This is +# only invoked when there is no Jamfile in ".". This code somewhat duplicates +# code in project-target.find but we can not reuse that code without a +# project-targets instance. +# +def find_target(target_id): + + projects = get_manager().projects() + m = _target_id_split.match(target_id) + if m: + pm = projects.find(m.group(1), ".") + else: + pm = projects.find(target_id, ".") + + if pm: + result = projects.target(pm) + + if m: + result = result.find(m.group(2)) + + return result + +def initialize_config_module(module_name, location=None): + + get_manager().projects().initialize(module_name, location) + +# Helper rule used to load configuration files. Loads the first configuration +# file with the given 'filename' at 'path' into module with name 'module-name'. +# Not finding the requested file may or may not be treated as an error depending +# on the must-find parameter. Returns a normalized path to the loaded +# configuration file or nothing if no file was loaded. +# +def load_config(module_name, filename, paths, must_find=False): + + if debug_config: + print "notice: Searching '%s' for '%s' configuration file '%s." \ + % (paths, module_name, filename) + + where = None + for path in paths: + t = os.path.join(path, filename) + if os.path.exists(t): + where = t + break + + if where: + where = os.path.realpath(where) + + if debug_config: + print "notice: Loading '%s' configuration file '%s' from '%s'." \ + % (module_name, filename, where) + + # Set source location so that path-constant in config files + # with relative paths work. This is of most importance + # for project-config.jam, but may be used in other + # config files as well. + attributes = get_manager().projects().attributes(module_name) ; + attributes.set('source-location', os.path.dirname(where), True) + get_manager().projects().load_standalone(module_name, where) + + else: + msg = "Configuration file '%s' not found in '%s'." % (filename, path) + if must_find: + get_manager().errors()(msg) + + elif debug_config: + print msg + + return where + +# Loads all the configuration files used by Boost Build in the following order: +# +# -- test-config -- +# Loaded only if specified on the command-line using the --test-config +# command-line parameter. It is ok for this file not to exist even if +# specified. If this configuration file is loaded, regular site and user +# configuration files will not be. If a relative path is specified, file is +# searched for in the current folder. +# +# -- site-config -- +# Always named site-config.jam. Will only be found if located on the system +# root path (Windows), /etc (non-Windows), user's home folder or the Boost +# Build path, in that order. Not loaded in case the test-config configuration +# file is loaded or the --ignore-site-config command-line option is specified. +# +# -- user-config -- +# Named user-config.jam by default or may be named explicitly using the +# --user-config command-line option or the BOOST_BUILD_USER_CONFIG environment +# variable. If named explicitly the file is looked for from the current working +# directory and if the default one is used then it is searched for in the +# user's home directory and the Boost Build path, in that order. Not loaded in +# case either the test-config configuration file is loaded or an empty file +# name is explicitly specified. If the file name has been given explicitly then +# the file must exist. +# +# Test configurations have been added primarily for use by Boost Build's +# internal unit testing system but may be used freely in other places as well. +# +def load_configuration_files(): + + # Flag indicating that site configuration should not be loaded. + ignore_site_config = "--ignore-site-config" in sys.argv + + initialize_config_module("test-config") + test_config = None + for a in sys.argv: + m = re.match("--test-config=(.*)$", a) + if m: + test_config = b2.util.unquote(m.group(1)) + break + + if test_config: + where = load_config("test-config", os.path.basename(test_config), [os.path.dirname(test_config)]) + if where: + if debug_config: + print "notice: Regular site and user configuration files will" + print "notice: be ignored due to the test configuration being loaded." + + user_path = [os.path.expanduser("~")] + bjam.variable("BOOST_BUILD_PATH") + site_path = ["/etc"] + user_path + if os.name in ["nt"]: + site_path = [os.getenv("SystemRoot")] + user_path + + if debug_config and not test_config and ignore_site_config: + print "notice: Site configuration files will be ignored due to the" + print "notice: --ignore-site-config command-line option." + + initialize_config_module("site-config") + if not test_config and not ignore_site_config: + load_config('site-config', 'site-config.jam', site_path) + + initialize_config_module('user-config') + if not test_config: + + # Here, user_config has value of None if nothing is explicitly + # specified, and value of '' if user explicitly does not want + # to load any user config. + user_config = None + for a in sys.argv: + m = re.match("--user-config=(.*)$", a) + if m: + user_config = m.group(1) + break + + if user_config is None: + user_config = os.getenv("BOOST_BUILD_USER_CONFIG") + + # Special handling for the case when the OS does not strip the quotes + # around the file name, as is the case when using Cygwin bash. + user_config = b2.util.unquote(user_config) + explicitly_requested = user_config + + if user_config is None: + user_config = "user-config.jam" + + if user_config: + if explicitly_requested: + + user_config = os.path.abspath(user_config) + + if debug_config: + print "notice: Loading explicitly specified user configuration file:" + print " " + user_config + + load_config('user-config', os.path.basename(user_config), [os.path.dirname(user_config)], True) + else: + load_config('user-config', os.path.basename(user_config), user_path) + else: + if debug_config: + print "notice: User configuration file loading explicitly disabled." + + # We look for project-config.jam from "." upward. I am not sure this is + # 100% right decision, we might as well check for it only alongside the + # Jamroot file. However: + # - We need to load project-config.jam before Jamroot + # - We probably need to load project-config.jam even if there is no Jamroot + # - e.g. to implement automake-style out-of-tree builds. + if os.path.exists("project-config.jam"): + file = ["project-config.jam"] + else: + file = b2.util.path.glob_in_parents(".", ["project-config.jam"]) + + if file: + initialize_config_module('project-config', os.path.dirname(file[0])) + load_config('project-config', "project-config.jam", [os.path.dirname(file[0])], True) + + get_manager().projects().end_load() + + +# Autoconfigure toolsets based on any instances of --toolset=xx,yy,...zz or +# toolset=xx,yy,...zz in the command line. May return additional properties to +# be processed as if they had been specified by the user. +# +def process_explicit_toolset_requests(): + + extra_properties = [] + + option_toolsets = [e for option in b2.util.regex.transform(sys.argv, "^--toolset=(.*)$") + for e in option.split(',')] + feature_toolsets = [e for option in b2.util.regex.transform(sys.argv, "^toolset=(.*)$") + for e in option.split(',')] + + for t in option_toolsets + feature_toolsets: + + # Parse toolset-version/properties. + (toolset_version, toolset, version) = re.match("(([^-/]+)-?([^/]+)?)/?.*", t).groups() + + if debug_config: + print "notice: [cmdline-cfg] Detected command-line request for '%s': toolset= %s version=%s" \ + % (toolset_version, toolset, version) + + # If the toolset is not known, configure it now. + known = False + if toolset in feature.values("toolset"): + known = True + + if known and version and not feature.is_subvalue("toolset", toolset, "version", version): + known = False + # TODO: we should do 'using $(toolset)' in case no version has been + # specified and there are no versions defined for the given toolset to + # allow the toolset to configure its default version. For this we need + # to know how to detect whether a given toolset has any versions + # defined. An alternative would be to do this whenever version is not + # specified but that would require that toolsets correctly handle the + # case when their default version is configured multiple times which + # should be checked for all existing toolsets first. + + if not known: + + if debug_config: + print "notice: [cmdline-cfg] toolset '%s' not previously configured; attempting to auto-configure now" % toolset_version + if version is not None: + using(toolset, version) + else: + using(toolset) + + else: + + if debug_config: + + print "notice: [cmdline-cfg] toolset '%s' already configured" % toolset_version + + # Make sure we get an appropriate property into the build request in + # case toolset has been specified using the "--toolset=..." command-line + # option form. + if not t in sys.argv and not t in feature_toolsets: + + if debug_config: + print "notice: [cmdline-cfg] adding toolset=%s) to the build request." % t ; + extra_properties += "toolset=%s" % t + + return extra_properties + + + +# Returns 'true' if the given 'project' is equal to or is a (possibly indirect) +# child to any of the projects requested to be cleaned in this build system run. +# Returns 'false' otherwise. Expects the .project-targets list to have already +# been constructed. +# +@cached +def should_clean_project(project): + + if project in project_targets: + return True + else: + + parent = get_manager().projects().attribute(project, "parent-module") + if parent and parent != "user-config": + return should_clean_project(parent) + else: + return False + +################################################################################ +# +# main() +# ------ +# +################################################################################ + +def main(): + + # FIXME: document this option. + if "--profiling" in sys.argv: + import cProfile + r = cProfile.runctx('main_real()', globals(), locals(), "stones.prof") + + import pstats + stats = pstats.Stats("stones.prof") + stats.strip_dirs() + stats.sort_stats('time', 'calls') + stats.print_callers(20) + return r + else: + try: + return main_real() + except ExceptionWithUserContext, e: + e.report() + +def main_real(): + + global debug_config, out_xml + + debug_config = "--debug-configuration" in sys.argv + out_xml = any(re.match("^--out-xml=(.*)$", a) for a in sys.argv) + + engine = Engine() + + global_build_dir = option.get("build-dir") + manager = Manager(engine, global_build_dir) + + import b2.build.configure as configure + + if "--version" in sys.argv: + from b2.build import version + version.report() + return + + # This module defines types and generator and what not, + # and depends on manager's existence + import b2.tools.builtin + + b2.tools.common.init(manager) + + load_configuration_files() + + # Load explicitly specified toolset modules. + extra_properties = process_explicit_toolset_requests() + + # Load the actual project build script modules. We always load the project + # in the current folder so 'use-project' directives have any chance of + # being seen. Otherwise, we would not be able to refer to subprojects using + # target ids. + current_project = None + projects = get_manager().projects() + if projects.find(".", "."): + current_project = projects.target(projects.load(".")) + + # Load the default toolset module if no other has already been specified. + if not feature.values("toolset"): + + dt = default_toolset + dtv = None + if default_toolset: + dtv = default_toolset_version + else: + dt = "gcc" + if os.name == 'nt': + dt = "msvc" + # FIXME: + #else if [ os.name ] = MACOSX + #{ + # default-toolset = darwin ; + #} + + print "warning: No toolsets are configured." + print "warning: Configuring default toolset '%s'." % dt + print "warning: If the default is wrong, your build may not work correctly." + print "warning: Use the \"toolset=xxxxx\" option to override our guess." + print "warning: For more configuration options, please consult" + print "warning: https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration" + + using(dt, dtv) + + # Parse command line for targets and properties. Note that this requires + # that all project files already be loaded. + (target_ids, properties) = build_request.from_command_line(sys.argv[1:] + extra_properties) + + # Check that we actually found something to build. + if not current_project and not target_ids: + get_manager().errors()("no Jamfile in current directory found, and no target references specified.") + # FIXME: + # EXIT + + # Flags indicating that this build system run has been started in order to + # clean existing instead of create new targets. Note that these are not the + # final flag values as they may get changed later on due to some special + # targets being specified on the command line. + clean = "--clean" in sys.argv + cleanall = "--clean-all" in sys.argv + + # List of explicitly requested files to build. Any target references read + # from the command line parameter not recognized as one of the targets + # defined in the loaded Jamfiles will be interpreted as an explicitly + # requested file to build. If any such files are explicitly requested then + # only those files and the targets they depend on will be built and they + # will be searched for among targets that would have been built had there + # been no explicitly requested files. + explicitly_requested_files = [] + + # List of Boost Build meta-targets, virtual-targets and actual Jam targets + # constructed in this build system run. + targets = [] + virtual_targets = [] + actual_targets = [] + + explicitly_requested_files = [] + + # Process each target specified on the command-line and convert it into + # internal Boost Build target objects. Detect special clean target. If no + # main Boost Build targets were explicitly requested use the current project + # as the target. + for id in target_ids: + if id == "clean": + clean = 1 + else: + t = None + if current_project: + t = current_project.find(id, no_error=1) + else: + t = find_target(id) + + if not t: + print "notice: could not find main target '%s'" % id + print "notice: assuming it's a name of file to create " ; + explicitly_requested_files.append(id) + else: + targets.append(t) + + if not targets: + targets = [projects.target(projects.module_name("."))] + + # FIXME: put this BACK. + + ## if [ option.get dump-generators : : true ] + ## { + ## generators.dump ; + ## } + + + # We wish to put config.log in the build directory corresponding + # to Jamroot, so that the location does not differ depending on + # directory where we do build. The amount of indirection necessary + # here is scary. + first_project = targets[0].project() + first_project_root_location = first_project.get('project-root') + first_project_root_module = manager.projects().load(first_project_root_location) + first_project_root = manager.projects().target(first_project_root_module) + first_build_build_dir = first_project_root.build_dir() + configure.set_log_file(os.path.join(first_build_build_dir, "config.log")) + + virtual_targets = [] + + global results_of_main_targets + + # Expand properties specified on the command line into multiple property + # sets consisting of all legal property combinations. Each expanded property + # set will be used for a single build run. E.g. if multiple toolsets are + # specified then requested targets will be built with each of them. + # The expansion is being performed as late as possible so that the feature + # validation is performed after all necessary modules (including project targets + # on the command line) have been loaded. + if properties: + expanded = [] + for p in properties: + expanded.extend(build_request.convert_command_line_element(p)) + + expanded = build_request.expand_no_defaults(expanded) + else: + expanded = [property_set.empty()] + + # Now that we have a set of targets to build and a set of property sets to + # build the targets with, we can start the main build process by using each + # property set to generate virtual targets from all of our listed targets + # and any of their dependants. + for p in expanded: + manager.set_command_line_free_features(property_set.create(p.free())) + + for t in targets: + try: + g = t.generate(p) + if not isinstance(t, ProjectTarget): + results_of_main_targets.extend(g.targets()) + virtual_targets.extend(g.targets()) + except ExceptionWithUserContext, e: + e.report() + except Exception: + raise + + # Convert collected virtual targets into actual raw Jam targets. + for t in virtual_targets: + actual_targets.append(t.actualize()) + + j = option.get("jobs") + if j: + bjam.call("set-variable", 'PARALLELISM', j) + + k = option.get("keep-going", "true", "true") + if k in ["on", "yes", "true"]: + bjam.call("set-variable", "KEEP_GOING", "1") + elif k in ["off", "no", "false"]: + bjam.call("set-variable", "KEEP_GOING", "0") + else: + print "error: Invalid value for the --keep-going option" + sys.exit() + + # The 'all' pseudo target is not strictly needed expect in the case when we + # use it below but people often assume they always have this target + # available and do not declare it themselves before use which may cause + # build failures with an error message about not being able to build the + # 'all' target. + bjam.call("NOTFILE", "all") + + # And now that all the actual raw Jam targets and all the dependencies + # between them have been prepared all that is left is to tell Jam to update + # those targets. + if explicitly_requested_files: + # Note that this case can not be joined with the regular one when only + # exact Boost Build targets are requested as here we do not build those + # requested targets but only use them to construct the dependency tree + # needed to build the explicitly requested files. + # FIXME: add $(.out-xml) + bjam.call("UPDATE", ["<e>%s" % x for x in explicitly_requested_files]) + elif cleanall: + bjam.call("UPDATE", "clean-all") + elif clean: + manager.engine().set_update_action("common.Clean", "clean", + actual_clean_targets(targets)) + bjam.call("UPDATE", "clean") + else: + # FIXME: + #configure.print-configure-checks-summary ; + + if pre_build_hook: + for h in pre_build_hook: + h() + + bjam.call("DEPENDS", "all", actual_targets) + ok = bjam.call("UPDATE_NOW", "all") # FIXME: add out-xml + if post_build_hook: + post_build_hook(ok) + # Prevent automatic update of the 'all' target, now that + # we have explicitly updated what we wanted. + bjam.call("UPDATE") + + if manager.errors().count() == 0: + return ["ok"] + else: + return [] diff --git a/src/boost/tools/build/src/contrib/__init__.py b/src/boost/tools/build/src/contrib/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/src/contrib/boost.jam b/src/boost/tools/build/src/contrib/boost.jam new file mode 100644 index 000000000..6bf28d197 --- /dev/null +++ b/src/boost/tools/build/src/contrib/boost.jam @@ -0,0 +1,309 @@ +# Copyright 2008 - 2013 Roland Schwarz +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Boost library support module. +# +# This module allows to use the boost library from boost-build projects. The +# location of a boost source tree or the path to a pre-built version of the +# library can be configured from either site-config.jam or user-config.jam. If +# no location is configured the module looks for a BOOST_ROOT environment +# variable, which should point to a boost source tree. As a last resort it tries +# to use pre-built libraries from the standard search path of the compiler. +# +# If the location to a source tree is known, the module can be configured from +# the *-config.jam files: +# +# using boost : 1.35 : <root>/path-to-boost-root ; +# +# If the location to a pre-built version is known: +# +# using boost : 1.34 +# : <include>/usr/local/include/boost_1_34 +# <library>/usr/local/lib +# ; +# +# It is legal to configure more than one boost library version in the config +# files. The version identifier is used to disambiguate between them. The first +# configured version becomes the default. +# +# To use a boost library you need to put a 'use' statement into your Jamfile: +# +# import boost ; +# +# boost.use-project 1.35 ; +# +# If you do not care about a specific version you just can omit the version +# part, in which case the default is picked up: +# +# boost.use-project ; +# +# The library can be referenced with the project identifier '/boost'. To +# reference the program_options you would specify: +# +# exe myexe : mysrc.cpp : <library>/boost//program_options ; +# +# Note that the requirements are automatically transformed into suitable tags to +# find the correct pre-built library. +# + +import common ; +import modules ; +import numbers ; +import project ; +import property-set ; +import regex ; +import toolset ; + +.boost.auto_config = [ property-set.create <layout>system ] ; + +if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] +{ + .debug-configuration = true ; +} + +# Configuration of the boost library to use. +# +# This can either be a boost source tree or pre-built libraries. The 'version' +# parameter must be a valid boost version number, e.g. 1.35, if specifying a +# pre-built version with versioned layout. It may be a symbolic name, e.g. +# 'trunk' if specifying a source tree. The options are specified as named +# parameters (like properties). The following parameters are available: +# +# <root>/path-to-boost-root : Specify a source tree. +# <include>/path-to-include : The include directory to search. +# <library>/path-to-library : The library directory to search. +# <layout>system or <layout>versioned : Built library layout. +# <build-id>my_build_id : The custom build id to use. +# +rule init +( + version # Version identifier. + : options * # Set the option properties. +) +{ + if $(.boost.$(version)) + { + import errors ; + errors.user-error Boost $(version) already configured. ; + } + else + { + if $(.debug-configuration) + { + if ! $(.boost_default) + { + echo notice\: configuring default boost library $(version) ; + } + echo notice\: configuring boost library $(version) ; + } + .boost_default ?= $(version) ; # the first configured is default + .boost.$(version) = [ property-set.create $(options) ] ; + } +} + +# Use a certain version of the library. +# +# The use-project rule causes the module to define a boost project of searchable +# pre-built boost libraries, or references a source tree of the boost library. +# If the 'version' parameter is omitted either the configured default (first in +# config files) is used or an auto configuration will be attempted. +# +rule use-project +( + version ? # The version of the library to use. +) +{ + project.push-current [ project.current ] ; + version ?= $(.boost_default) ; + version ?= auto_config ; + + if $(.initialized) + { + if $(.initialized) != $(version) + { + import errors ; + errors.user-error Attempt to use $(__name__) with different + parameters. ; + } + } + else + { + if $(.boost.$(version)) + { + local opt = $(.boost.$(version)) ; + local root = [ $(opt).get <root> ] ; + local inc = [ $(opt).get <include> ] ; + local lib = [ $(opt).get <library> ] ; + + if $(.debug-configuration) + { + echo notice\: using boost library $(version) [ $(opt).raw ] ; + } + + .layout = [ $(opt).get <layout> ] ; + .layout ?= versioned ; + .build_id = [ $(opt).get <build-id> ] ; + .version_tag = [ regex.replace $(version) "[*\\/:.\"\' ]" "_" ] ; + .initialized = $(version) ; + + if ( $(root) && $(inc) ) + || ( $(root) && $(lib) ) + || ( $(lib) && ! $(inc) ) + || ( ! $(lib) && $(inc) ) + { + import errors ; + errors.user-error Ambiguous parameters, use either <root> or + <include> with <library>. ; + } + else if ! $(root) && ! $(inc) + { + root = [ modules.peek : BOOST_ROOT ] ; + } + + local prj = [ project.current ] ; + local mod = [ $(prj).project-module ] ; + + if $(root) + { + modules.call-in $(mod) : use-project boost : $(root) ; + } + else + { + project.initialize $(__name__) ; + # It is possible to override the setup of the searched libraries + # per version. The (unlikely) 0.0.1 tag is meant as an example + # template only. + switch $(version) + { + case 0.0.1 : boost_0_0_1 $(inc) $(lib) ; + case * : boost_std $(inc) $(lib) ; + } + } + } + else + { + import errors ; + errors.user-error Reference to unconfigured boost version. ; + } + } + project.pop-current ; +} + +local rule boost_lib_std ( id : shared-lib-define ) +{ + lib $(id) : : : : <link>shared:<define>$(shared-lib-define) ; +} + +rule boost_std ( inc ? lib ? ) +{ +# The default definitions for pre-built libraries. + + project boost + : usage-requirements <include>$(inc) <define>BOOST_ALL_NO_LIB + : requirements <tag>@tag_std <search>$(lib) + ; + + alias headers ; + boost_lib_std chrono : BOOST_CHRONO_DYN_LINK ; + boost_lib_std container : BOOST_CONTAINER_DYN_LINK ; + boost_lib_std date_time : BOOST_DATE_TIME_DYN_LINK ; + boost_lib_std filesystem : BOOST_FILE_SYSTEM_DYN_LINK ; + boost_lib_std graph : BOOST_GRAPH_DYN_LINK ; + boost_lib_std graph_parallel : BOOST_GRAPH_DYN_LINK ; + boost_lib_std iostreams : BOOST_IOSTREAMS_DYN_LINK ; + boost_lib_std json : BOOST_JSON_DYN_LINK ; + boost_lib_std locale : BOOST_LOCALE_DYN_LINK ; + boost_lib_std log : BOOST_LOG_DYN_LINK ; + boost_lib_std log_setup : BOOST_LOG_SETUP_DYN_LINK ; + boost_lib_std math_c99 : BOOST_MATH_TR1_DYN_LINK ; + boost_lib_std math_c99f : BOOST_MATH_TR1_DYN_LINK ; + boost_lib_std math_c99l : BOOST_MATH_TR1_DYN_LINK ; + boost_lib_std math_tr1 : BOOST_MATH_TR1_DYN_LINK ; + boost_lib_std math_tr1f : BOOST_MATH_TR1_DYN_LINK ; + boost_lib_std math_tr1l : BOOST_MATH_TR1_DYN_LINK ; + boost_lib_std mpi : BOOST_MPI_DYN_LINK ; + boost_lib_std prg_exec_monitor : BOOST_TEST_DYN_LINK ; + boost_lib_std program_options : BOOST_PROGRAM_OPTIONS_DYN_LINK ; + boost_lib_std python : BOOST_PYTHON_DYN_LINK ; + boost_lib_std python3 : BOOST_PYTHON_DYN_LINK ; + boost_lib_std random : BOOST_RANDOM_DYN_LINK ; + boost_lib_std regex : BOOST_REGEX_DYN_LINK ; + boost_lib_std serialization : BOOST_SERIALIZATION_DYN_LINK ; + boost_lib_std signals : BOOST_SIGNALS_DYN_LINK ; + boost_lib_std system : BOOST_SYSTEM_DYN_LINK ; + boost_lib_std test_exec_monitor : BOOST_TEST_DYN_LINK ; + boost_lib_std thread : BOOST_THREAD_DYN_DLL ; + boost_lib_std timer : BOOST_TIMER_DYN_DLL ; + boost_lib_std unit_test_framework : BOOST_TEST_DYN_LINK ; + boost_lib_std wave : BOOST_WAVE_DYN_LINK ; + boost_lib_std wserialization : BOOST_SERIALIZATION_DYN_LINK ; +} + +# Example placeholder for rules defining Boost library project & library targets +# for a specific Boost library version. Copy under a different name and model +# after the boost_std rule. Please note that it is also possible to have a per +# version taging rule in case the tagging algorithm changes between versions. +# +rule boost_0_0_1 ( inc ? lib ? ) +{ + echo "You are trying to use an example placeholder for boost libs." ; +} + +rule tag_std ( name : type ? : property-set ) +{ + name = boost_$(name) ; + if ( [ $(property-set).get <link> ] in static ) && + ( [ $(property-set).get <target-os> ] in windows ) + { + name = lib$(name) ; + } + + local result ; + if $(.layout) = system + { + local version = [ MATCH "^([0-9]+)_([0-9]+)" : $(.version_tag) ] ; + if $(version[1]) = "1" && [ numbers.less $(version[2]) 39 ] + { + result = [ tag_tagged $(name) : $(type) : $(property-set) ] ; + } + else + { + result = [ tag_system $(name) : $(type) : $(property-set) ] ; + } + } + else if $(.layout) = tagged + { + result = [ tag_tagged $(name) : $(type) : $(property-set) ] ; + } + else if $(.layout) = versioned + { + result = [ tag_versioned $(name) : $(type) : $(property-set) ] ; + } + else + { + import errors ; + errors.error Missing layout. ; + } + + return $(result) ; +} + +rule tag_system ( name : type ? : property-set ) +{ + return [ common.format-name <base> -$(.build_id) : $(name) : $(type) : + $(property-set) ] ; +} + +rule tag_tagged ( name : type ? : property-set ) +{ + return [ common.format-name <base> <threading> <runtime> -$(.build_id) : + $(name) : $(type) : $(property-set) ] ; +} + +rule tag_versioned ( name : type ? : property-set ) +{ + return [ common.format-name <base> <toolset> <threading> <runtime> + -$(.version_tag) -$(.build_id) : $(name) : $(type) : $(property-set) ] ; +} diff --git a/src/boost/tools/build/src/contrib/boost.py b/src/boost/tools/build/src/contrib/boost.py new file mode 100644 index 000000000..6f4d6b4ab --- /dev/null +++ b/src/boost/tools/build/src/contrib/boost.py @@ -0,0 +1,280 @@ +# $Id: boost.jam 62249 2010-05-26 19:05:19Z steven_watanabe $ +# Copyright 2008 Roland Schwarz +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Boost library support module. +# +# This module allows to use the boost library from boost-build projects. +# The location of a boost source tree or the path to a pre-built +# version of the library can be configured from either site-config.jam +# or user-config.jam. If no location is configured the module looks for +# a BOOST_ROOT environment variable, which should point to a boost source +# tree. As a last resort it tries to use pre-built libraries from the standard +# search path of the compiler. +# +# If the location to a source tree is known, the module can be configured +# from the *-config.jam files: +# +# using boost : 1.35 : <root>/path-to-boost-root ; +# +# If the location to a pre-built version is known: +# +# using boost : 1.34 +# : <include>/usr/local/include/boost_1_34 +# <library>/usr/local/lib +# ; +# +# It is legal to configure more than one boost library version in the config +# files. The version identifier is used to disambiguate between them. +# The first configured version becomes the default. +# +# To use a boost library you need to put a 'use' statement into your +# Jamfile: +# +# import boost ; +# +# boost.use-project 1.35 ; +# +# If you don't care about a specific version you just can omit the version +# part, in which case the default is picked up: +# +# boost.use-project ; +# +# The library can be referenced with the project identifier '/boost'. To +# reference the program_options you would specify: +# +# exe myexe : mysrc.cpp : <library>/boost//program_options ; +# +# Note that the requirements are automatically transformed into suitable +# tags to find the correct pre-built library. +# + +import re + +import bjam + +from b2.build import alias, property, property_set, feature +from b2.manager import get_manager +from b2.tools import builtin, common +from b2.util import bjam_signature, regex + + +# TODO: This is currently necessary in Python Port, but was not in Jam. +feature.feature('layout', ['system', 'versioned', 'tag'], ['optional']) +feature.feature('root', [], ['optional', 'free']) +feature.feature('build-id', [], ['optional', 'free']) + +__initialized = None +__boost_auto_config = property_set.create([property.Property('layout', 'system')]) +__boost_configured = {} +__boost_default = None +__build_id = None + +__debug = None + +def debug(): + global __debug + if __debug is None: + __debug = "--debug-configuration" in bjam.variable("ARGV") + return __debug + + +# Configuration of the boost library to use. +# +# This can either be a boost source tree or +# pre-built libraries. The 'version' parameter must be a valid boost +# version number, e.g. 1.35, if specifying a pre-built version with +# versioned layout. It may be a symbolic name, e.g. 'trunk' if specifying +# a source tree. The options are specified as named parameters (like +# properties). The following parameters are available: +# +# <root>/path-to-boost-root: Specify a source tree. +# +# <include>/path-to-include: The include directory to search. +# +# <library>/path-to-library: The library directory to search. +# +# <layout>system or <layout>versioned. +# +# <build-id>my_build_id: The custom build id to use. +# +def init(version, options = None): + assert(isinstance(version,list)) + assert(len(version)==1) + version = version[0] + if version in __boost_configured: + get_manager().errors()("Boost {} already configured.".format(version)); + else: + global __boost_default + if debug(): + if not __boost_default: + print "notice: configuring default boost library {}".format(version) + print "notice: configuring boost library {}".format(version) + + if not __boost_default: + __boost_default = version + properties = [] + for option in options: + properties.append(property.create_from_string(option)) + __boost_configured[ version ] = property_set.PropertySet(properties) + +projects = get_manager().projects() +rules = projects.project_rules() + + +# Use a certain version of the library. +# +# The use-project rule causes the module to define a boost project of +# searchable pre-built boost libraries, or references a source tree +# of the boost library. If the 'version' parameter is omitted either +# the configured default (first in config files) is used or an auto +# configuration will be attempted. +# +@bjam_signature(([ "version", "?" ], )) +def use_project(version = None): + projects.push_current( projects.current() ) + if not version: + version = __boost_default + if not version: + version = "auto_config" + + global __initialized + if __initialized: + if __initialized != version: + get_manager().errors()('Attempt to use {} with different parameters'.format('boost')) + else: + if version in __boost_configured: + opts = __boost_configured[ version ] + root = opts.get('<root>' ) + inc = opts.get('<include>') + lib = opts.get('<library>') + + if debug(): + print "notice: using boost library {} {}".format( version, opt.raw() ) + + global __layout + global __version_tag + __layout = opts.get('<layout>') + if not __layout: + __layout = 'versioned' + __build_id = opts.get('<build-id>') + __version_tag = re.sub("[*\\/:.\"\' ]", "_", version) + __initialized = version + + if ( root and inc ) or \ + ( root and lib ) or \ + ( lib and not inc ) or \ + ( not lib and inc ): + get_manager().errors()("Ambiguous parameters, use either <root> or <include> with <library>.") + elif not root and not inc: + root = bjam.variable("BOOST_ROOT") + + module = projects.current().project_module() + + if root: + bjam.call('call-in-module', module, 'use-project', ['boost', root]) + else: + projects.initialize(__name__) + if version == '0.0.1': + boost_0_0_1( inc, lib ) + else: + boost_std( inc, lib ) + else: + get_manager().errors()("Reference to unconfigured boost version.") + projects.pop_current() + + +rules.add_rule( 'boost.use-project', use_project ) + +def boost_std(inc = None, lib = None): + # The default definitions for pre-built libraries. + rules.project( + ['boost'], + ['usage-requirements'] + ['<include>{}'.format(i) for i in inc] + ['<define>BOOST_ALL_NO_LIB'], + ['requirements'] + ['<search>{}'.format(l) for l in lib]) + + # TODO: There should be a better way to add a Python function into a + # project requirements property set. + tag_prop_set = property_set.create([property.Property('<tag>', tag_std)]) + attributes = projects.attributes(projects.current().project_module()) + attributes.requirements = attributes.requirements.refine(tag_prop_set) + + alias('headers') + + def boost_lib(lib_name, dyn_link_macro): + if (isinstance(lib_name,str)): + lib_name = [lib_name] + builtin.lib(lib_name, usage_requirements=['<link>shared:<define>{}'.format(dyn_link_macro)]) + + boost_lib('container' , 'BOOST_CONTAINER_DYN_LINK' ) + boost_lib('date_time' , 'BOOST_DATE_TIME_DYN_LINK' ) + boost_lib('filesystem' , 'BOOST_FILE_SYSTEM_DYN_LINK' ) + boost_lib('graph' , 'BOOST_GRAPH_DYN_LINK' ) + boost_lib('graph_parallel' , 'BOOST_GRAPH_DYN_LINK' ) + boost_lib('iostreams' , 'BOOST_IOSTREAMS_DYN_LINK' ) + boost_lib('locale' , 'BOOST_LOG_DYN_LINK' ) + boost_lib('log' , 'BOOST_LOG_DYN_LINK' ) + boost_lib('log_setup' , 'BOOST_LOG_DYN_LINK' ) + boost_lib('math_tr1' , 'BOOST_MATH_TR1_DYN_LINK' ) + boost_lib('math_tr1f' , 'BOOST_MATH_TR1_DYN_LINK' ) + boost_lib('math_tr1l' , 'BOOST_MATH_TR1_DYN_LINK' ) + boost_lib('math_c99' , 'BOOST_MATH_TR1_DYN_LINK' ) + boost_lib('math_c99f' , 'BOOST_MATH_TR1_DYN_LINK' ) + boost_lib('math_c99l' , 'BOOST_MATH_TR1_DYN_LINK' ) + boost_lib('mpi' , 'BOOST_MPI_DYN_LINK' ) + boost_lib('program_options' , 'BOOST_PROGRAM_OPTIONS_DYN_LINK') + boost_lib('python' , 'BOOST_PYTHON_DYN_LINK' ) + boost_lib('python3' , 'BOOST_PYTHON_DYN_LINK' ) + boost_lib('random' , 'BOOST_RANDOM_DYN_LINK' ) + boost_lib('regex' , 'BOOST_REGEX_DYN_LINK' ) + boost_lib('serialization' , 'BOOST_SERIALIZATION_DYN_LINK' ) + boost_lib('wserialization' , 'BOOST_SERIALIZATION_DYN_LINK' ) + boost_lib('signals' , 'BOOST_SIGNALS_DYN_LINK' ) + boost_lib('system' , 'BOOST_SYSTEM_DYN_LINK' ) + boost_lib('unit_test_framework' , 'BOOST_TEST_DYN_LINK' ) + boost_lib('prg_exec_monitor' , 'BOOST_TEST_DYN_LINK' ) + boost_lib('test_exec_monitor' , 'BOOST_TEST_DYN_LINK' ) + boost_lib('thread' , 'BOOST_THREAD_DYN_DLL' ) + boost_lib('wave' , 'BOOST_WAVE_DYN_LINK' ) + +def boost_0_0_1( inc, lib ): + print "You are trying to use an example placeholder for boost libs." ; + # Copy this template to another place (in the file boost.jam) + # and define a project and libraries modelled after the + # boost_std rule. Please note that it is also possible to have + # a per version taging rule in case they are different between + # versions. + +def tag_std(name, type, prop_set): + name = 'boost_' + name + if 'static' in prop_set.get('<link>') and 'windows' in prop_set.get('<target-os>'): + name = 'lib' + name + result = None + + if __layout == 'system': + versionRe = re.search('^([0-9]+)_([0-9]+)', __version_tag) + if versionRe and versionRe.group(1) == '1' and int(versionRe.group(2)) < 39: + result = tag_tagged(name, type, prop_set) + else: + result = tag_system(name, type, prop_set) + elif __layout == 'tagged': + result = tag_tagged(name, type, prop_set) + elif __layout == 'versioned': + result = tag_versioned(name, type, prop_set) + else: + get_manager().errors()("Missing layout") + return result + +def tag_maybe(param): + return ['-{}'.format(param)] if param else [] + +def tag_system(name, type, prop_set): + return common.format_name(['<base>'] + tag_maybe(__build_id), name, type, prop_set) + +def tag_tagged(name, type, prop_set): + return common.format_name(['<base>', '<threading>', '<runtime>'] + tag_maybe(__build_id), name, type, prop_set) + +def tag_versioned(name, type, prop_set): + return common.format_name(['<base>', '<toolset>', '<threading>', '<runtime>'] + tag_maybe(__version_tag) + tag_maybe(__build_id), + name, type, prop_set) diff --git a/src/boost/tools/build/src/contrib/modular.jam b/src/boost/tools/build/src/contrib/modular.jam new file mode 100644 index 000000000..31d78d6ba --- /dev/null +++ b/src/boost/tools/build/src/contrib/modular.jam @@ -0,0 +1,288 @@ +# Copyright Rene Rivera 2015 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +import path ; +import project ; +import modules ; +import regex ; +import type ; + +# Add a location, i.e. directory, where to search for libraries. +# The optional 'prefix' indicates which rooted-prefixes the new +# search dir applies to. The prefix defaults to '/'. +rule add-location ( dir prefix ? : base-dir ? ) +{ + process-args ; + + prefix ?= "/" ; + + # Dir path of caller to base paths from. + caller-module ?= [ CALLER_MODULE ] ; + local caller-dir = [ modules.peek $(caller-module) : __file__ ] ; + caller-dir = $(caller-dir:D) ; + + base-dir ?= $(caller-dir) ; + + .search-path-prefix += $(prefix) ; + .search-path.$(prefix) += [ path.root [ path.root $(dir) $(base-dir) ] [ path.pwd ] ] ; +} + +# Declares additional definitions of a modular library target external +# to the modular library build itself. This makes it possible to externally +# define modular libraries without modifying the library. The passed in +# values are added on demand when the named library is first declared. +rule external ( + name : sources * : requirements * : default-build * : + usage-requirements * ) +{ + .external.($(name)).sources = $(sources) ; + .external.($(name)).requirements = $(requirements) ; + .external.($(name)).default-build = $(default-build) ; + .external.($(name)).usage-requirements = $(usage-requirements) ; +} + +# Find, and declare, any modular libraries referenced in the target-refs. +# This will both load the modular libraries, and declare/manufacture +# the modular libraries as needed. +rule find ( target-refs + ) +{ + process-args ; + + local caller-mod = [ CALLER_MODULE ] ; + local caller-dir = [ modules.peek $(caller-mod) : __file__ ] ; + caller-dir = $(caller-dir:D) ; + caller-dir = [ path.root $(caller-dir) [ path.pwd ] ] ; + + local result-refs ; + for local target-ref in $(target-refs) + { + result-refs += [ resolve-reference $(target-ref) + : $(caller-mod) $(caller-dir) ] ; + } + + return $(result-refs) ; +} + +############################################################################## + +local rule resolve-reference ( target-ref : caller-mod caller-dir ? ) +{ + # ECHO %%% modular.resolve-target-ref $(target-ref) :: $(caller-mod) $(caller-dir) ; + if ! $(caller-dir) + { + caller-dir = [ modules.peek $(caller-mod) : __file__ ] ; + caller-dir = $(caller-dir:D) ; + caller-dir = [ path.root $(caller-dir) [ path.pwd ] ] ; + } + local result-ref = $(target-ref) ; + local ref = [ MATCH ^(.*)//.* : $(target-ref:G=) ] ; + # if ! ( $(ref) in $(.target-refs) ) + { + # .target-refs += $(ref) ; + local search-prefix ; + local search-sub ; + for local prefix in $(.search-path-prefix) + { + if ! $(search-prefix) + { + local search-match = [ MATCH ^($(prefix))/(.*)$ : $(ref) ] ; + search-prefix = $(search-match[1]) ; + search-sub = $(search-match[2]) ; + } + } + + if $(search-prefix) + { + local found = [ path.glob $(.search-path.$(search-prefix)) : $(search-sub) ] ; + found = $(found[1]) ; + if $(found) + { + local lib-ref = [ regex.split $(search-sub) / ] ; + lib-ref = $(search-prefix)/$(lib-ref[1]) ; + local lib-path = [ path.relative-to $(caller-dir) $(found) ] ; + define-library $(lib-ref) $(caller-mod) : $(lib-path) ; + } + } + } + return $(result-ref) ; +} + +local rule define-library ( name caller-module ? : root ) +{ + # ECHO ~~~ modular.library $(name) $(caller-module) :: $(root) :: $(depends) ; + + process-args ; + + # Dir path of caller to base paths from. + caller-module ?= [ CALLER_MODULE ] ; + local caller-dir = [ modules.peek $(caller-module) : __file__ ] ; + caller-dir = $(caller-dir:D) ; + + # Find the various parts of the library. + local lib-dir = [ path.root [ path.root $(root) $(caller-dir) ] [ path.pwd ] ] ; + local lib-contents = [ path.glob $(lib-dir) : "include" "build" ] ; + lib-contents = $(lib-contents:D=) ; + + # "include" dir for library.. + local include-dir ; + if "include" in $(lib-contents) + { + include-dir = $(root)/include ; + } + + # If it has a build dir, i.e. it has targets to build, + # we root the project at the build dir to make it easy + # to refer to the build targets. This mirrors the regular + # Boost organization of the project aliases. + if "build" in $(lib-contents) + { + root = $(root)/build ; + build-dir = "." ; + } + + # Shadow target declarations so that we can alter build targets + # to work in the standalone modular structure. + local lib-location = [ path.root [ path.make $(root) ] $(caller-dir) ] ; + local lib-module-name = [ project.module-name $(lib-location) ] ; + local modular-rules = [ RULENAMES modular-rules ] ; + IMPORT modular-rules : $(modular-rules) : $(lib-module-name) : $(modular-rules) ; + + # Load/create/declare library project. + local lib-module = [ project.find $(root) : $(caller-dir) ] ; + if ! $(lib-module) + { + # If the find was unable to load the project we synthesize it. + lib-module = [ project.load $(lib-location) : synthesize ] ; + } + local lib-target = [ project.target $(lib-module) ] ; + if ! [ modules.peek $(lib-module) : __library__ ] + { + modules.poke $(lib-module) : __library__ : $(name) ; + for local type in [ modules.peek type : .types ] + { + main-rule-name = [ type.type-to-rule-name $(type) ] ; + IMPORT modular-rules : main-target-rule : $(lib-module-name) : $(main-rule-name) ; + } + } + + # Declare project alternate ID. + modules.call-in $(caller-module) : use-project $(name) : $(root) ; + + # Create a "library" target that has basic usage info if needed. + if ! [ $(lib-target).has-alternative-for-target library ] + { + include-dir = [ path.relative-to $(root) $(include-dir) ] ; + + project.push-current $(lib-target) ; + + # Declare the library alias. + modules.call-in $(lib-module) : library + : # Sources + : # Requirements + : # Default Build + : # Usage Requirements + <include>$(include-dir) + ; + + project.pop-current ; + } +} + +local rule process-args ( ) +{ + if ! $(.did-process-args) + { + .did-process-args = yes ; + local argv = [ modules.peek : ARGV ] ; + local dirs = [ MATCH ^--modular-search-dir=(.*)$ : $(argv) ] ; + for local dir in $(dirs) + { + add-location $(dir) : [ path.pwd ] ; + } + } +} + +rule apply-external ( + mod : field : values * ) +{ + local result ; + local name = [ modules.peek $(mod) : __library__ ] ; + values += $(.external.($(name)).$(field)) ; + for local value in $(values) + { + result += [ resolve-reference $(value) : $(mod) ] ; + } + return $(result) ; +} + +module modular-rules +{ + import type ; + import targets ; + import builtin ; + import alias ; + + # Avoids any form of installation for Boost modules. + rule boost-install ( libraries * ) { } + + # Generic typed target rule to pre-process main target + # declarations to make them work within the standalone + # modular structure. + rule main-target-rule ( + name : sources * : requirements * : default-build * : + usage-requirements * ) + { + local mod = [ CALLER_MODULE ] ; + + # ECHO @@@ [[$(mod)]] modular-rules.main-target-rule $(name) :: $(sources) :: $(requirements) :: $(default-build) :: $(usage-requirements) ; + + # First discover the required target type based on the exact alias used to + # invoke this rule. + local bt = [ BACKTRACE 1 ] ; + local rulename = $(bt[4]) ; + local target-type = [ type.type-from-rule-name $(rulename) ] ; + return [ targets.create-typed-target $(target-type) : [ project.current ] : + $(name) : $(sources) : $(requirements) : $(default-build) : + $(usage-requirements) ] ; + } + + rule lib ( names + : sources * : requirements * : default-build * : + usage-requirements * ) + { + local mod = [ CALLER_MODULE ] ; + requirements += <use>library ; + usage-requirements += <use>library ; + + # ECHO @@@ [[$(mod)]] modular-rules.lib $(names) :: $(sources) :: $(requirements) :: $(default-build) :: $(usage-requirements) ; + return [ builtin.lib $(names) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ] ; + } + + rule alias ( name : sources * : requirements * : default-build * : + usage-requirements * ) + { + local mod = [ CALLER_MODULE ] ; + + # ECHO @@@ [[$(mod)]] modular-rules.alias $(name) :: $(sources) :: $(requirements) :: $(default-build) :: $(usage-requirements) ; + return [ alias.alias $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ] ; + } + + rule library ( name ? : sources * : requirements * : default-build * : + usage-requirements * ) + { + import modular ; + + local mod = [ CALLER_MODULE ] ; + sources = [ modular.apply-external $(mod) : sources : $(sources) ] ; + requirements = [ modular.apply-external $(mod) : requirements : $(requirements) ] ; + default-build = [ modular.apply-external $(mod) : default-build : $(default-build) ] ; + usage-requirements = [ modular.apply-external $(mod) : usage-requirements : $(usage-requirements) ] ; + + name ?= library ; + + # ECHO @@@ [[$(mod)]] modular-rules.library $(name) :: $(sources) :: $(requirements) :: $(default-build) :: $(usage-requirements) ; + return [ alias.alias $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ] ; + } +} + diff --git a/src/boost/tools/build/src/contrib/tntnet.jam b/src/boost/tools/build/src/contrib/tntnet.jam new file mode 100644 index 000000000..1dfa37f7e --- /dev/null +++ b/src/boost/tools/build/src/contrib/tntnet.jam @@ -0,0 +1,208 @@ +# Copyright 2008 Eduardo Gurgel +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) +# + +# Support for creating components for the Tntnet web application +# server (http://tntnet.org) +# +# Example: +# +# using tntnet : /usr ; +# lib index : index.png index.js index.css index.ecpp otherclass.cpp +# /tntnnet//tntnet /tntnet//cxxtools ; +# +# + +import modules ; +import feature ; +import errors ; +import "class" : new ; +import generators ; +import project ; +import toolset : flags ; +import os ; +import virtual-target ; +import scanner ; +import type ; + +type.register ECPP : ecpp ; +type.register JPEG : jpeg ; +type.register JPG : jpg ; +type.register PNG : png ; +type.register JS : js ; +type.register CSS : css ; +type.register GIF : gif ; + +project.initialize $(__name__) ; +project tntnet ; + +# Save the project so that we tolerate 'import + using' combo. +.project = [ project.current ] ; +# Initialized the Tntnet support module. The 'prefix' parameter +# tells where Tntnet is installed. +rule init ( prefix : full_bin ? : full_inc ? : full_lib ? ) +{ + project.push-current $(.project) ; + + # pre-build paths to detect reinitializations changes + local inc_prefix lib_prefix bin_prefix ; + if $(full_inc) + { + inc_prefix = $(full_inc) ; + } + else + { + inc_prefix = $(prefix)/include ; + } + if $(full_lib) + { + lib_prefix = $(full_lib) ; + } + else + { + lib_prefix = $(prefix)/lib ; + } + if $(full_bin) + { + bin_prefix = $(full_bin) ; + } + else + { + bin_prefix = $(prefix)/bin ; + } + + if $(.initialized) + { + if $(prefix) != $(.prefix) + { + errors.error + "Attempt the reinitialize Tntnet with different installation prefix" ; + } + if $(inc_prefix) != $(.incprefix) + { + errors.error + "Attempt the reinitialize Tntnet with different include path" ; + } + if $(lib_prefix) != $(.libprefix) + { + errors.error + "Attempt the reinitialize Tntnet with different library path" ; + } + if $(bin_prefix) != $(.binprefix) + { + errors.error + "Attempt the reinitialize Tntnet with different bin path" ; + } + } + else + { + .initialized = true ; + .prefix = $(prefix) ; + + # Setup prefixes for include, binaries and libs. + .incprefix = $(.prefix)/include ; + .libprefix = $(.prefix)/lib ; + .binprefix = $(.prefix)/bin ; + + # Generates cpp files from ecpp files using "ecppc" tool + generators.register-standard tntnet.ecpp : ECPP : CPP ; + # Generates cpp files from jpeg files using "ecppc" tool + generators.register-standard tntnet.jpeg : JPEG : CPP ; + # Generates cpp files from jpg files using "ecppc" tool + generators.register-standard tntnet.jpg : JPG : CPP ; + # Generates cpp files from png files using "ecppc" tool + generators.register-standard tntnet.png : PNG : CPP ; + # Generates cpp files from js files using "ecppc" tool + generators.register-standard tntnet.js : JS : CPP ; + # Generates cpp files from gif files using "ecppc" tool + generators.register-standard tntnet.gif : GIF : CPP ; + # Generates cpp files from css files using "ecppc" tool + generators.register-standard tntnet.css : CSS : CPP ; + # Scanner for ecpp includes + type.set-scanner ECPP : ecpp-scanner ; + + + local usage-requirements = + <include>$(.incprefix) + <library-path>$(.libprefix) + <dll-path>$(.libprefix) + <threading>multi + <allow>tntnet ; + lib cxxtools : $(main) + : + : + : + <include>$(.incprefix)/cxxtools + $(usage-requiriments) + ; + lib tntnet : $(main) + : + : + : + <include>$(.incprefix)/tntnet + $(usage-requiriments) + ; + + } + project.pop-current ; + +} + +rule directory +{ + return $(.prefix) ; +} + +rule initialized ( ) +{ + return $(.initialized) ; +} + +# Get <include> from current toolset. +flags tntnet.ecpp INCLUDES <include> ; + +actions ecpp +{ + $(.binprefix)/ecppc -I " $(INCLUDES) " -o $(<) $(>) +} + +actions jpeg +{ + $(.binprefix)/ecppc -b -m image/jpeg -o $(<) $(>) +} + +actions jpg +{ + $(.binprefix)/ecppc -b -m image/jpeg -o $(<) $(>) +} + +actions js +{ + $(.binprefix)/ecppc -b -m application/x-javascript -o $(<) $(>) +} + +actions png +{ + $(.binprefix)/ecppc -b -m image/png -o $(<) $(>) +} +actions gif +{ + $(.binprefix)/ecppc -b -m image/gif -o $(<) $(>) +} +actions css +{ + $(.binprefix)/ecppc -b -m text/css -o $(<) $(>) +} + +class ecpp-scanner : common-scanner +{ + rule pattern ( ) + { + return "<%include.*>(.*)</%include>" ; + } +} + +scanner.register ecpp-scanner : include ; diff --git a/src/boost/tools/build/src/contrib/wxFormBuilder.jam b/src/boost/tools/build/src/contrib/wxFormBuilder.jam new file mode 100644 index 000000000..d3d6544c4 --- /dev/null +++ b/src/boost/tools/build/src/contrib/wxFormBuilder.jam @@ -0,0 +1,195 @@ +################################################################################ +# +# Copyright (c) 2007-2008 Dario Senic, Jurko Gospodnetic. +# +# Use, modification and distribution is subject to the Boost Software +# License Version 1.0. (See accompanying file LICENSE.txt or +# https://www.bfgroup.xyz/b2/LICENSE.txt) +# +################################################################################ + +################################################################################ +# +# Boost Build wxFormBuilder generator tool module. +# +# wxFormBuilder is a GUI designer tool for the wxWidgets library. It can then +# generate C++ sources modeling the designed GUI using the wxWidgets library +# APIs. +# +# This module defines a wxFormBuilder project file type and rules needed to +# generate C++ source files from those projects. With it you can simply list +# wxFormBuilder projects as sources for some target and Boost Build will +# automatically convert them to C++ sources and process from there. +# +# The wxFormBuilder executable location may be provided as a parameter when +# configuring this toolset. Otherwise the default wxFormBuilder.exe executable +# name is used located in the folder pointed to by the WXFORMBUILDER environment +# variable. +# +# Current limitations: +# +# * Works only on Windows. +# * Works only when run via Boost Jam using the native Windows cmd.exe command +# interpreter, i.e. the default native Windows Boost Jam build. +# * Used wxFormBuilder projects need to have their output file names defined +# consistently with target names assumed by this build script. This means +# that their target names must use the prefix 'wxFormBuilderGenerated_' and +# have no output folder defined where the base name is equal to the .fpb +# project file's name. +# +################################################################################ + +################################################################################ +# +# Implementation note: +# +# Avoiding the limitation on the generated target file names can be done but +# would require depending on external tools to copy the wxFormBuilder project to +# a temp location and then modify it in-place to set its target file names. On +# the other hand wxFormBuilder is expected to add command-line options for +# choosing the target file names from the command line which will allow us to +# remove this limitation in a much cleaner way. +# (23.08.2008.) (Jurko) +# +################################################################################ + +import generators ; +import os ; +import path ; +import toolset ; +import type ; + + +################################################################################ +# +# wxFormBuilder.generate() +# ------------------------ +# +# Action for processing WX_FORM_BUILDER_PROJECT types. +# +################################################################################ +# +# Implementation notes: +# +# wxFormBuilder generated CPP and H files need to be moved to the location +# where the Boost Build target system expects them so that the generated CPP +# file can be included into the compile process and that the clean rule +# successfully deletes both CPP and H files. We expect wxFormBuilder to generate +# files in the same location where the provided WX_FORM_BUILDER_PROJECT file is +# located. +# (15.05.2007.) (Dario) +# +################################################################################ + +actions generate +{ + start "" /wait "$(EXECUTABLE)" /g "$(2)" + move "$(1[1]:BSR=$(2:P))" "$(1[1]:P)" + move "$(1[2]:BSR=$(2:P))" "$(1[2]:P)" +} + + +################################################################################ +# +# wxFormBuilder.init() +# -------------------- +# +# Main toolset initialization rule called via the toolset.using rule. +# +################################################################################ + +rule init ( executable ? ) +{ + if $(.initialized) + { + if $(.debug-configuration) + { + ECHO notice: [wxFormBuilder-cfg] Repeated initialization request + (executable \"$(executable:E="")\") detected and ignored. ; + } + } + else + { + local environmentVariable = WXFORMBUILDER ; + + if $(.debug-configuration) + { + ECHO notice: [wxFormBuilder-cfg] Configuring wxFormBuilder... ; + } + + # Deduce the path to the used wxFormBuilder executable. + if ! $(executable) + { + executable = "wxFormBuilder.exe" ; + local executable-path = [ os.environ $(environmentVariable) ] ; + if $(executable-path)-is-not-empty + { + executable = [ path.root $(executable) $(executable-path) ] ; + } + else if $(.debug-configuration) + { + ECHO notice: [wxFormBuilder-cfg] No wxFormBuilder path + configured either explicitly or using the + $(environmentVariable) environment variable. ; + ECHO notice: [wxFormBuilder-cfg] To avoid complications please + update your configuration to includes a correct path to the + wxFormBuilder executable. ; + ECHO notice: [wxFormBuilder-cfg] wxFormBuilder executable will + be searched for on the system path. ; + } + } + if $(.debug-configuration) + { + ECHO notice: [wxFormBuilder-cfg] Will use wxFormBuilder executable + \"$(executable)\". ; + } + + # Now we are sure we have everything we need to initialize this toolset. + .initialized = true ; + + # Store the path to the used wxFormBuilder executable. + .executable = $(executable) ; + + # Type registration. + type.register WX_FORM_BUILDER_PROJECT : fbp ; + + # Parameters to be forwarded to the action rule. + toolset.flags wxFormBuilder.generate EXECUTABLE : $(.executable) ; + + # Generator definition and registration. + generators.register-standard wxFormBuilder.generate : + WX_FORM_BUILDER_PROJECT : CPP(wxFormBuilderGenerated_%) + H(wxFormBuilderGenerated_%) ; + } +} + + +################################################################################ +# +# wxFormBuilder.is-initialized() +# ------------------------------ +# +# Returns whether this toolset has been initialized. +# +################################################################################ + +rule is-initialized ( ) +{ + return $(.initialized) ; +} + + +################################################################################ +# +# Startup code executed when loading this module. +# +################################################################################ + +# Global variables for this module. +.executable = ; +.initialized = ; + +if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] +{ + .debug-configuration = true ; +} diff --git a/src/boost/tools/build/src/engine/boost-jam.spec b/src/boost/tools/build/src/engine/boost-jam.spec new file mode 100644 index 000000000..bc572fc96 --- /dev/null +++ b/src/boost/tools/build/src/engine/boost-jam.spec @@ -0,0 +1,64 @@ +Name: boost-jam +Version: 3.1.19 +Summary: Build tool +Release: 1 +Source: %{name}-%{version}.tgz + +License: Boost Software License, Version 1.0 +Group: Development/Tools +URL: http://www.boost.org +Packager: Rene Rivera <grafik@redshift-software.com> +BuildRoot: /var/tmp/%{name}-%{version}.root + +%description +Boost Jam is a build tool based on FTJam, which in turn is based on +Perforce Jam. It contains significant improvements made to facilitate +its use in the Boost Build System, but should be backward compatible +with Perforce Jam. + +Authors: + Perforce Jam : Cristopher Seiwald + FT Jam : David Turner + Boost Jam : David Abrahams + +Copyright: + /+\ + +\ Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + \+/ + License is hereby granted to use this software and distribute it + freely, as long as this copyright notice is retained and modifications + are clearly marked. + ALL WARRANTIES ARE HEREBY DISCLAIMED. + +Also: + Copyright 2001-2006 David Abrahams. + Copyright 2002-2006 Rene Rivera. + Copyright 2003-2006 Vladimir Prus. + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +%prep +%setup -n %{name}-%{version} + +%build +LOCATE_TARGET=bin ./build.sh $BOOST_JAM_TOOLSET + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +install -m 755 bin/bjam $RPM_BUILD_ROOT%{_bindir}/bjam-%{version} +ln -sf bjam-%{version} $RPM_BUILD_ROOT%{_bindir}/bjam +cp -R *.html *.png *.css LICENSE*.txt images jam $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} + +find $RPM_BUILD_ROOT -name CVS -type d -exec rm -r {} \; + +%files +%defattr(-,root,root) +%attr(755,root,root) /usr/bin/* +%doc %{_docdir}/%{name}-%{version} + + +%clean +rm -rf $RPM_BUILD_ROOT diff --git a/src/boost/tools/build/src/engine/boost-no-inspect b/src/boost/tools/build/src/engine/boost-no-inspect new file mode 100644 index 000000000..8a06f3a70 --- /dev/null +++ b/src/boost/tools/build/src/engine/boost-no-inspect @@ -0,0 +1 @@ +this really out of our hands, so tell inspect to ignore directory \ No newline at end of file diff --git a/src/boost/tools/build/src/engine/build.bat b/src/boost/tools/build/src/engine/build.bat new file mode 100644 index 000000000..d2d5f1aaf --- /dev/null +++ b/src/boost/tools/build/src/engine/build.bat @@ -0,0 +1,195 @@ +@ECHO OFF + +REM ~ Copyright 2002-2007 Rene Rivera. +REM ~ Distributed under the Boost Software License, Version 1.0. +REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +setlocal +goto Start + + +:Set_Error +color 00 +goto :eof + + +:Clear_Error +ver >nul +goto :eof + + +:Error_Print +REM Output an error message and set the errorlevel to indicate failure. +setlocal +ECHO ### +ECHO ### %1 +ECHO ### +ECHO ### You can specify the toolset as the argument, i.e.: +ECHO ### .\build.bat msvc +ECHO ### +ECHO ### Toolsets supported by this script are: borland, como, gcc, +ECHO ### gcc-nocygwin, intel-win32, mingw, +ECHO ### vc12, vc14, vc141, vc142, vc143 +ECHO ### +ECHO ### If you have Visual Studio 2017 installed you will need to either update +ECHO ### the Visual Studio 2017 installer or run from VS 2017 Command Prompt +ECHO ### as we where unable to detect your toolset installation. +ECHO ### +call :Set_Error +endlocal +goto :eof + + +:Test_Option +REM Tests whether the given string is in the form of an option: "--*" +call :Clear_Error +setlocal +set test=%1 +if not defined test ( + call :Set_Error + goto Test_Option_End +) +set test=###%test%### +set test=%test:"###=% +set test=%test:###"=% +set test=%test:###=% +if not "-" == "%test:~1,1%" call :Set_Error +:Test_Option_End +endlocal +goto :eof + + +:Test_Empty +REM Tests whether the given string is not empty +call :Clear_Error +setlocal +set test=%1 +if not defined test ( + call :Clear_Error + goto Test_Empty_End +) +set test=###%test%### +set test=%test:"###=% +set test=%test:###"=% +set test=%test:###=% +if not "" == "%test%" call :Set_Error +:Test_Empty_End +endlocal +goto :eof + + +:Guess_Toolset +set local +REM Try and guess the toolset to bootstrap the build with... +REM Sets B2_TOOLSET to the first found toolset. +REM May also set B2_TOOLSET_ROOT to the +REM location of the found toolset. + +call :Clear_Error +call :Test_Empty "%ProgramFiles%" +if not errorlevel 1 set "ProgramFiles=C:\Program Files" + +REM Visual Studio is by default installed to %ProgramFiles% on 32-bit machines and +REM %ProgramFiles(x86)% on 64-bit machines. Making a common variable for both. +call :Clear_Error +call :Test_Empty "%ProgramFiles(x86)%" +if errorlevel 1 ( + set "VS_ProgramFiles=%ProgramFiles(x86)%" +) else ( + set "VS_ProgramFiles=%ProgramFiles%" +) + +call guess_toolset.bat +if errorlevel 1 ( + call :Error_Print "Could not find a suitable toolset.") +goto :eof + +endlocal +goto :eof + + +:Start +set B2_TOOLSET= +set B2_BUILD_ARGS= + +REM If no arguments guess the toolset; +REM or if first argument is an option guess the toolset; +REM otherwise the argument is the toolset to use. +call :Clear_Error +call :Test_Empty %1 +if not errorlevel 1 ( + call :Guess_Toolset + if not errorlevel 1 ( goto Setup_Toolset ) else ( goto Finish ) +) + +call :Clear_Error +call :Test_Option %1 +if not errorlevel 1 ( + call :Guess_Toolset + if not errorlevel 1 ( goto Setup_Toolset ) else ( goto Finish ) +) + +call :Clear_Error +set B2_TOOLSET=%1 +shift +goto Setup_Toolset + + +:Setup_Toolset +REM Setup the toolset command and options. This bit of code +REM needs to be flexible enough to handle both when +REM the toolset was guessed at and found, or when the toolset +REM was indicated in the command arguments. +REM NOTE: The strange multiple "if ?? == _toolset_" tests are that way +REM because in BAT variables are subsituted only once during a single +REM command. A complete "if ... else ..." +REM is a single command, even though it's in multiple lines here. +:Setup_Args +call :Clear_Error +call :Test_Empty %1 +if not errorlevel 1 goto Config_Toolset +call :Clear_Error +call :Test_Option %1 +if errorlevel 1 ( + set B2_BUILD_ARGS=%B2_BUILD_ARGS% %1 + shift + goto Setup_Args +) +:Config_Toolset +call config_toolset.bat +if "_%_known_%_" == "__" ( + call :Error_Print "Unknown toolset: %B2_TOOLSET%" +) +if errorlevel 1 goto Finish + +echo ### +echo ### Using '%B2_TOOLSET%' toolset. +echo ### + +set B2_SOURCES= +set B2_SOURCES=%B2_SOURCES% builtins.cpp class.cpp +set B2_SOURCES=%B2_SOURCES% command.cpp compile.cpp constants.cpp cwd.cpp +set B2_SOURCES=%B2_SOURCES% debug.cpp debugger.cpp +set B2_SOURCES=%B2_SOURCES% execcmd.cpp execnt.cpp execunix.cpp filent.cpp filesys.cpp fileunix.cpp frames.cpp function.cpp +set B2_SOURCES=%B2_SOURCES% glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam.cpp +set B2_SOURCES=%B2_SOURCES% jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp +set B2_SOURCES=%B2_SOURCES% native.cpp object.cpp option.cpp output.cpp parse.cpp pathnt.cpp +set B2_SOURCES=%B2_SOURCES% pathsys.cpp pathunix.cpp regexp.cpp rules.cpp scan.cpp search.cpp jam_strings.cpp +set B2_SOURCES=%B2_SOURCES% startup.cpp subst.cpp sysinfo.cpp +set B2_SOURCES=%B2_SOURCES% timestamp.cpp variable.cpp w32_getreg.cpp +set B2_SOURCES=%B2_SOURCES% modules/order.cpp +set B2_SOURCES=%B2_SOURCES% modules/path.cpp +set B2_SOURCES=%B2_SOURCES% modules/property-set.cpp +set B2_SOURCES=%B2_SOURCES% modules/regex.cpp +set B2_SOURCES=%B2_SOURCES% modules/sequence.cpp +set B2_SOURCES=%B2_SOURCES% modules/set.cpp + +set B2_CXXFLAGS=%B2_CXXFLAGS% -DNDEBUG + +@echo ON +%B2_CXX% %CXXFLAGS% %B2_CXXFLAGS% %B2_SOURCES% %B2_CXX_LINK% +dir *.exe +copy /b .\b2.exe .\bjam.exe + +:Finish +@exit /b %ERRORLEVEL% diff --git a/src/boost/tools/build/src/engine/build.sh b/src/boost/tools/build/src/engine/build.sh new file mode 100755 index 000000000..42723ac5c --- /dev/null +++ b/src/boost/tools/build/src/engine/build.sh @@ -0,0 +1,511 @@ +#!/bin/sh + +#~ Copyright 2002-2020 Rene Rivera. +#~ Distributed under the Boost Software License, Version 1.0. +#~ (See accompanying file LICENSE_1_0.txt or copy at +#~ http://www.boost.org/LICENSE_1_0.txt) + +FALSE=1 +TRUE=0 + +# Reset the toolset. +B2_TOOLSET= +B2_SETUP= + +# Internal options. +B2_VERBOSE_OPT=${B2_VERBOSE_OPT:=${FALSE}} +B2_DEBUG_OPT=${B2_DEBUG_OPT:=${FALSE}} +B2_GUESS_TOOLSET_OPT=${FALSE} +B2_HELP_OPT=${FALSE} +B2_CXX_OPT= +B2_CXXFLAGS_OPT= + +# We need to calculate and set SCRIPT_PATH and SCRIPT_DIR to reference this +# script so that we can refer to file relative to it. +SCRIPT_PATH="" +if test "${BASH_SOURCE}" ; then + SCRIPT_PATH=${BASH_SOURCE} +fi +if test "${SCRIPT_PATH}" = "" ; then + SCRIPT_PATH=$0 +fi +SCRIPT_DIR="$( cd "$( dirname "${SCRIPT_PATH}" )" && pwd )" + +# This script needs to operate at engine source directory. +SAVED_PWD="${PWD}" +cd "${SCRIPT_DIR}" + +test_true () +{ + if test $1 -eq ${TRUE} ; then + return ${TRUE} + fi + return ${FALSE} +} + +# Run a command, and echo before doing so. Also checks the exit status and quits +# if there was an error. +echo_run () +{ + if test_true ${B2_VERBOSE_OPT} ; then echo "> $@" ; fi + $@ + r=$? + if test $r -ne ${TRUE} ; then + exit $r + fi +} + +# Print an error message, and exit with a status of 1. +error_exit () +{ + echo " +${@} + +You can specify the toolset as the argument, i.e.: + ./build.sh [options] gcc + +Toolsets supported by this script are: + acc, clang, como, gcc, intel-darwin, intel-linux, kcc, kylix, mipspro, + pathscale, pgi, qcc, sun, sunpro, tru64cxx, vacpp + +For any toolset you can override the path to the compiler with the '--cxx' +option. You can also use additional flags for the compiler with the +'--cxxflags' option. + +A special toolset; cxx, is available which is used as a fallback when a more +specific toolset is not found and the cxx command is detected. The 'cxx' +toolset will use the '--cxx' and '--cxxflags' options, if present. + +Options: + --help Show this help message. + --verbose Show messages about what this script is doing. + --debug Build b2 with debug information, and no + optimizations. + --guess-toolset Print the toolset we can detect for building. + --cxx=CXX The compiler exec to use instead of the detected + compiler exec. + --cxxflags=CXXFLAGS The compiler flags to use in addition to the + flags for the detected compiler. + +" 1>&2 + exit 1 +} + +# Check that a command is in the PATH. +test_path () +{ + if `command -v command 1>/dev/null 2>/dev/null`; then + command -v $1 1>/dev/null 2>/dev/null + else + hash $1 1>/dev/null 2>/dev/null + fi +} + +# Check that the OS name, as returned by "uname", is as given. +test_uname () +{ + if test_path uname; then + test `uname` = $* + fi +} + +test_compiler () +{ + EXE="${B2_CXX_OPT:-$1}" + shift + CMD="${EXE} $@ ${B2_CXXFLAGS_OPT:-}" + SETUP=${B2_SETUP:-true} + if test_true ${B2_VERBOSE_OPT} ; then + echo "> ${CMD} check_cxx11.cpp" + ( ${SETUP} ; ${CMD} check_clib.cpp check_cxx11.cpp ) + else + ( ${SETUP} ; ${CMD} check_clib.cpp check_cxx11.cpp ) 1>/dev/null 2>/dev/null + fi + CHECK_RESULT=$? + if test_true ${CHECK_RESULT} ; then + B2_CXX=${CMD} + fi + rm -rf check_cxx11.o* a.out a.exe 1>/dev/null 2>/dev/null + return ${CHECK_RESULT} +} + +test_toolset () +{ + if test "${TOOLSET}" = "" ; then return ${TRUE} ; fi + if test "${TOOLSET}" = "$1" -o "${TOOLSET}" = "$2" -o "${TOOLSET}" = "$3" ; then return ${TRUE} ; fi + return 1 +} + +# Check the toolset to bootstrap the build with. The one optional argument to +# the function is a toolset name. This operates as follows based on these +# contextual vars, if set, and if an arg is given: +# +# No vars set: +# Checks, in some priority order, possible toolset commands. Upon finding the +# first working command sets B2_TOOLSET to the toolset and B2_CXX to the +# compile command with any base options. +# +# B2_TOOLSET set: +# Checks that toolset for possible compile commands and sets B2_CXX to the +# command that works for the toolset. +# +check_toolset () +{ + TOOLSET=${B2_TOOLSET%%-[0-9]*} + TOOLSET_SUFFIX=${B2_TOOLSET##$TOOLSET} + + # Prefer Clang (clang) on macOS.. + if test_toolset clang && test_uname Darwin && test_compiler clang++$TOOLSET_SUFFIX -x c++ -std=c++11 ; then B2_TOOLSET=clang$TOOLSET_SUFFIX ; return ${TRUE} ; fi + # GCC (gcc).. + if test_toolset gcc && test_compiler g++$TOOLSET_SUFFIX -x c++ -std=c++11 ; then B2_TOOLSET=gcc$TOOLSET_SUFFIX ; return ${TRUE} ; fi + if test_toolset gcc && test_compiler g++$TOOLSET_SUFFIX -x c++ -std=c++11 -D_GNU_SOURCE ; then B2_TOOLSET=gcc$TOOLSET_SUFFIX ; return ${TRUE} ; fi + # GCC (gcc) with -pthread arg (for AIX).. + if test_toolset gcc && test_compiler g++$TOOLSET_SUFFIX -x c++ -std=c++11 -pthread ; then B2_TOOLSET=gcc$TOOLSET_SUFFIX ; return ${TRUE} ; fi + # Clang (clang).. + if test_toolset clang && test_compiler clang++$TOOLSET_SUFFIX -x c++ -std=c++11 ; then B2_TOOLSET=clang$TOOLSET_SUFFIX ; return ${TRUE} ; fi + # Intel macOS (intel-darwin) + if test_toolset intel-darwin && test -r "${HOME}/intel/oneapi/setvars.sh" && test_uname Darwin ; then + B2_SETUP="source ${HOME}/intel/oneapi/setvars.sh" + if test_toolset intel-darwin && test_compiler icpx -x c++ -std=c++11 ; then B2_TOOLSET=intel-darwin ; return ${TRUE} ; fi + if test_toolset intel-darwin && test_compiler icc -x c++ -std=c++11 ; then B2_TOOLSET=intel-darwin ; return ${TRUE} ; fi + B2_SETUP= + fi + if test_toolset intel-darwin && test -r "/opt/intel/oneapi/setvars.sh" && test_uname Darwin ; then + B2_SETUP="source /opt/intel/oneapi/setvars.sh" + if test_toolset intel-darwin && test_compiler icpx -x c++ -std=c++11 ; then B2_TOOLSET=intel-darwin ; return ${TRUE} ; fi + if test_toolset intel-darwin && test_compiler icc -x c++ -std=c++11 ; then B2_TOOLSET=intel-darwin ; return ${TRUE} ; fi + B2_SETUP= + fi + # Intel oneAPI (intel-linux) + if test_toolset intel-linux && test_path icpx ; then + if test_compiler icpx -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + fi + if test_toolset xyz && test_path icc ; then + if test_compiler icc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + fi + if test_toolset intel-linux && test -r "${HOME}/intel/oneapi/setvars.sh" ; then + B2_SETUP="source ${HOME}/intel/oneapi/setvars.sh" + if test_toolset intel-linux && test_compiler icpx -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + if test_toolset intel-linux && test_compiler icc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + B2_SETUP= + fi + if test_toolset intel-linux && test -r "/opt/intel/oneapi/setvars.sh" ; then + B2_SETUP="source /opt/intel/oneapi/setvars.sh" + if test_toolset intel-linux && test_compiler icpx -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + if test_toolset intel-linux && test_compiler icc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + B2_SETUP= + fi + # Intel Pro (intel-linux) + if test_toolset intel-linux && test_path icpc ; then + if test_compiler icpc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + fi + if test_toolset intel-linux && test -r "/opt/intel/inteloneapi/setvars.sh" ; then + B2_SETUP="source /opt/intel/inteloneapi/setvars.sh" + if test_compiler icpc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + B2_SETUP= + fi + if test_toolset intel-linux && test -r "/opt/intel/cc/9.0/bin/iccvars.sh" ; then + B2_SETUP="source /opt/intel/cc/9.0/bin/iccvars.sh" + if test_compiler icpc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + B2_SETUP= + fi + if test_toolset intel-linux && test -r "/opt/intel_cc_80/bin/iccvars.sh" ; then + B2_SETUP="source /opt/intel_cc_80/bin/iccvars.sh" + if test_compiler icpc -x c++ -std=c++11 ; then B2_TOOLSET=intel-linux ; return ${TRUE} ; fi + B2_SETUP= + fi + # Mips Pro (mipspro) + if test_toolset mipspro && test_uname IRIX && test_compiler CC -FE:template_in_elf_section -ptused ; then B2_TOOLSET=mipspro ; return ${TRUE} ; fi + if test_toolset mipspro && test_uname IRIX64 && test_compiler CC -FE:template_in_elf_section -ptused ; then B2_TOOLSET=mipspro ; return ${TRUE} ; fi + # OSF Tru64 C++ (tru64cxx) + if test_toolset tru64cxx && test_uname OSF1 && test_compiler cc ; then B2_TOOLSET=mipspro ; return ${TRUE} ; fi + # QNX (qcc) + if test_toolset qcc && test_uname QNX && test_compiler QCC ; then B2_TOOLSET=mipspro ; return ${TRUE} ; fi + # Linux XL/VA C++ (xlcpp, vacpp) + if test_toolset xlcpp vacpp && test_uname Linux && test_compiler xlC_r ; then + if /usr/bin/lscpu | grep Byte | grep Little > /dev/null 2>&1 ; then + # Little endian linux + B2_TOOLSET=xlcpp + return ${TRUE} + else + # Big endian linux + B2_TOOLSET=vacpp + return ${TRUE} + fi + fi + # AIX VA C++ (vacpp) + if test_toolset vacpp && test_uname AIX && test_compiler xlC_r ; then B2_TOOLSET=vacpp ; return ${TRUE} ; fi + # PGI (pgi) + if test_toolset pgi && test_compiler pgc++ -std=c++11 ; then B2_TOOLSET=pgi ; return ${TRUE} ; fi + # Pathscale C++ (pathscale) + if test_toolset pathscale && test_compiler pathCC ; then B2_TOOLSET=pathscale ; return ${TRUE} ; fi + # Como (como) + if test_toolset como && test_compiler como ; then B2_TOOLSET=como ; return ${TRUE} ; fi + # Borland C++ (kylix) + if test_toolset kylix && test_compiler bc++ -tC -q ; then B2_TOOLSET=kylix ; return ${TRUE} ; fi + # aCC (acc) + if test_toolset acc && test_compiler aCC -AA ; then B2_TOOLSET=acc ; return ${TRUE} ; fi + # Sun Pro C++ (sunpro) + if test_toolset sunpro && test_compiler /opt/SUNWspro/bin/CC -std=c++11 ; then B2_TOOLSET=sunpro ; return ${TRUE} ; fi + # Generic (cxx) + if test_toolset cxx && test_compiler cxx ; then B2_TOOLSET=cxx ; return ${TRUE} ; fi + if test_toolset cxx && test_compiler cpp ; then B2_TOOLSET=cxx ; return ${TRUE} ; fi + if test_toolset cxx && test_compiler CC ; then B2_TOOLSET=cxx ; return ${TRUE} ; fi + + # Nothing found. + if test "${B2_TOOLSET}" = "" ; then + error_exit "Could not find a suitable toolset." + fi + return ${FALSE} +} + +# Handle command options and args. +while test $# -gt 0 +do + case "$1" in + --verbose) B2_VERBOSE_OPT=${TRUE} ;; + --debug) B2_DEBUG_OPT=${TRUE} ;; + --guess-toolset) B2_GUESS_TOOLSET_OPT=${TRUE} ;; + --help) B2_HELP_OPT=${TRUE} ;; + --cxx=*) B2_CXX_OPT=`expr "x$1" : "x--cxx=\(.*\)"` ;; + --cxxflags=*) B2_CXXFLAGS_OPT=`expr "x$1" : "x--cxxflags=\(.*\)"` ;; + -*) ;; + ?*) B2_TOOLSET=$1 ;; + esac + shift +done + +# Show some help, if requested. +if test_true ${B2_HELP_OPT} ; then + error_exit +fi + +# If we have a CXX but no B2_TOOLSET specified by the user we assume they meant +# "cxx" as the toolset. +if test "${B2_CXX_OPT}" != "" -a "${B2_TOOLSET}" = "" ; then + B2_TOOLSET=cxx +fi + +# If we have B2_TOOLSET=cxx but no B2_CXX_OPT nor B2_CXXFLAGS_OPT specified by the user +# we assume they meant $CXX and $CXXFLAGS. +if test "${B2_TOOLSET}" = "cxx" -a "${B2_CXX_OPT}" = "" -a "${B2_CXXFLAGS_OPT}" = "" ; then + B2_CXX_OPT="${CXX}" + B2_CXXFLAGS_OPT="${CXXFLAGS}" +fi + +# Guess toolset, or toolset commands. +check_toolset +TOOLSET_CHECK=$? + +# We can bail from the rest of the checks and build if we are just guessing +# the toolset. +if test_true ${B2_GUESS_TOOLSET_OPT} ; then + echo "${B2_TOOLSET}" + exit 0 +fi + +# We need a viable compiler. Check here and give some feedback about it. +if ! test_true ${TOOLSET_CHECK} ; then + echo " +A C++11 capable compiler is required for building the B2 engine. +Toolset '${B2_TOOLSET}' does not appear to support C++11. +" + (B2_VERBOSE_OPT=${TRUE} check_toolset) + error_exit " +** Note, the C++11 capable compiler is _only_ required for building the B2 +** engine. The B2 build system allows for using any C++ level and any other +** supported language and resource in your projects. +" +fi + +# Set the additional options needed to build the engine based on the toolset. +case "${B2_TOOLSET}" in + + gcc|gcc-*) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O2 -s" + B2_CXXFLAGS_DEBUG="-O0 -g" + ;; + + intel-*) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O3 -static-intel" + B2_CXXFLAGS_DEBUG="-O0 -g -static-intel" + ;; + + vacpp) + CXX_VERSION_OPT=${CXX_VERSION_OPT:--qversion} + B2_CXXFLAGS_RELEASE="-O3 -s -qstrict -qinline" + B2_CXXFLAGS_DEBUG="-g -qNOOPTimize -qnoinline -pg" + ;; + + xlcpp) + CXX_VERSION_OPT=${CXX_VERSION_OPT:--qversion} + B2_CXXFLAGS_RELEASE="-s -O3 -qstrict -qinline" + B2_CXXFLAGS_DEBUG="-g -qNOOPTimize -qnoinline -pg" + ;; + + como) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O3 --inlining" + B2_CXXFLAGS_DEBUG="-O0 -g --no_inlining --long_long" + ;; + + kcc) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="+K2 -s" + B2_CXXFLAGS_DEBUG="+K0 -g" + ;; + + kylix) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O2 -vi -w-inl -s" + B2_CXXFLAGS_DEBUG="-Od -v -vi-" + ;; + + mipspro) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-Ofast -g0 \"-INLINE:none\" -s" + B2_CXXFLAGS_DEBUG="-O0 -INLINE -g" + ;; + + pathscale) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O3 -inline -s" + B2_CXXFLAGS_DEBUG="-O0 -noinline -ggdb" + ;; + + pgi) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-fast -s" + B2_CXXFLAGS_DEBUG="-O0 -gopt" + ;; + + sun*) + CXX_VERSION_OPT=${CXX_VERSION_OPT:--V} + B2_CXXFLAGS_RELEASE="-xO4 -s" + B2_CXXFLAGS_DEBUG="-g" + ;; + + clang|clang-*) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O3 -s" + B2_CXXFLAGS_DEBUG="-O0 -fno-inline -g" + ;; + + tru64cxx) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O5 -inline speed -s" + B2_CXXFLAGS_DEBUG="-O0 -pg -g" + ;; + + acc) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O3 -s" + B2_CXXFLAGS_DEBUG="+d -g" + ;; + + qcc) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + B2_CXXFLAGS_RELEASE="-O3 -Wc,-finline-functions" + B2_CXXFLAGS_DEBUG="O0 -Wc,-fno-inline -gstabs+" + ;; + + cxx) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} + ;; + + *) + error_exit "Unknown toolset: ${B2_TOOLSET}" + ;; +esac + +build_b2 () +{ + echo " +### +### +### Using '${B2_TOOLSET}' toolset. +### +### +" + echo_run ${B2_CXX} ${CXX_VERSION_OPT} +echo " +### +### +" + B2_SOURCES="\ +builtins.cpp \ +class.cpp \ +command.cpp \ +compile.cpp \ +constants.cpp \ +cwd.cpp \ +debug.cpp \ +debugger.cpp \ +execcmd.cpp \ +execnt.cpp \ +execunix.cpp \ +filesys.cpp \ +filent.cpp \ +fileunix.cpp \ +frames.cpp \ +function.cpp \ +glob.cpp \ +hash.cpp \ +hcache.cpp \ +hdrmacro.cpp \ +headers.cpp \ +jam_strings.cpp \ +jam.cpp \ +jamgram.cpp \ +lists.cpp \ +make.cpp \ +make1.cpp \ +md5.cpp \ +mem.cpp \ +modules.cpp \ +native.cpp \ +object.cpp \ +option.cpp \ +output.cpp \ +parse.cpp \ +pathnt.cpp \ +pathsys.cpp \ +pathunix.cpp \ +regexp.cpp \ +rules.cpp \ +scan.cpp \ +search.cpp \ +startup.cpp \ +subst.cpp \ +sysinfo.cpp \ +timestamp.cpp \ +variable.cpp \ +w32_getreg.cpp \ +modules/order.cpp \ +modules/path.cpp \ +modules/property-set.cpp \ +modules/regex.cpp \ +modules/sequence.cpp \ +modules/set.cpp \ +" + + if test_true ${B2_DEBUG_OPT} ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}" + else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG" + fi + ( B2_VERBOSE_OPT=${TRUE} echo_run ${B2_CXX} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2 ) + ( B2_VERBOSE_OPT=${TRUE} echo_run cp b2 bjam ) +} + +if test_true ${B2_VERBOSE_OPT} ; then + ( + ${B2_SETUP} + build_b2 + ) +else + ( + ${B2_SETUP} 1>/dev/null 2>/dev/null + build_b2 + ) +fi diff --git a/src/boost/tools/build/src/engine/build_vms.com b/src/boost/tools/build/src/engine/build_vms.com new file mode 100644 index 000000000..6f73512d0 --- /dev/null +++ b/src/boost/tools/build/src/engine/build_vms.com @@ -0,0 +1,153 @@ +$ ! Copyright 2002-2003 Rene Rivera, Johan Nilsson. +$ ! +$ ! 8-APR-2004 Boris Gubenko +$ ! Miscellaneous improvements. +$ ! +$ ! 20-JAN-2015 Artur Shepilko +$ ! Adapt for jam 3.1.19 +$ ! +$ ! Distributed under the Boost Software License, Version 1.0. +$ ! (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +$ ! +$ ! bootstrap build script for Jam +$ ! +$ THIS_FACILITY = "BUILDJAM" +$ +$ verify = f$trnlnm("VERIFY_''THIS_FACILITY'") +$ save_verify = f$verify(verify) +$ +$ SAY := WRITE SYS$OUTPUT +$ ! +$ ON WARNING THEN CONTINUE +$ ON ERROR THEN GOTO EXIT +$ +$ BOOST_JAM_TOOLSET = "vmsdecc" +$ BOOST_JAM_CC = "CC" +$ BJAM_UPDATE = "" +$ +$ ARGS = F$EDIT("''p1' ''p2' ''p3' ''p4'","TRIM,LOWERCASE") +$ ARGS_LEN = F$LENGTH(ARGS) +$ +$ IF F$LOCATE("--update", ARGS) .NE. F$LENGTH(ARGS) THEN BJAM_UPDATE = "update" +$ IF BJAM_UPDATE .EQS. "update" - + .AND. F$SEARCH("[.bootstrap_vms]jam0.exe") .EQS. "" THEN BJAM_UPDATE = "" +$ +$ IF BJAM_UPDATE .NES. "update" +$ THEN +$ GOSUB CLEAN +$ +$ SAY "I|Creating bootstrap directory..." +$ CREATE /DIR [.bootstrap_vms] +$ +$ !------------------ +$ ! NOTE: Assume jamgram and jambase have been generated (true for fresh release). +$ ! Otherwise these need to be re-generated manually. +$ !------------------ +$ +$ SAY "I|Building bootstrap jam..." +$ ! +$ CC_FLAGS = "/DEFINE=VMS /STANDARD=VAXC " + - + "/PREFIX_LIBRARY_ENTRIES=(ALL_ENTRIES) " + - + "/WARNING=DISABLE=(LONGEXTERN)" + - + "/OBJ=[.bootstrap_vms] " +$ +$ CC_INCLUDE="" +$ +$ SAY "I|Using compile flags: ", CC_FLAGS +$ +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE command.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE compile.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE constants.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE debug.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE execcmd.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE frames.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE function.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE glob.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE hash.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE hdrmacro.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE headers.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE jam.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE jambase.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE jamgram.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE lists.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE make.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE make1.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE object.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE option.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE output.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE parse.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE pathsys.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE regexp.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE rules.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE scan.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE search.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE subst.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE timestamp.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE variable.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE modules.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE strings.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE filesys.c +$ +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE execvms.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE pathvms.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE filevms.c +$ +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE builtins.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE class.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE cwd.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE native.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE md5.c +$ +$ CC_INCLUDE = "/INCLUDE=(""./modules"")" +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE [.modules]set.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE [.modules]path.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE [.modules]regex.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE [.modules]property-set.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE [.modules]sequence.c +$ 'BOOST_JAM_CC' 'CC_FLAGS 'CC_INCLUDE [.modules]order.c +$ +$ LIB /CREATE [.bootstrap_vms]jam0.olb [.bootstrap_vms]*.obj +$ LINK /EXEC=[.bootstrap_vms]jam0.exe - + [.bootstrap_vms]jam0.olb/INCLUDE=JAM/LIB +$ +$ IF F$SEARCH("[.bootstrap_vms]*.obj") .NES. "" THEN - + DELETE /NOCONF /NOLOG [.bootstrap_vms]*.obj;*, *.olb;* +$ ENDIF +$ +$ IF F$SEARCH("[.bootstrap_vms]jam0.exe") .NES. "" +$ THEN +$ IF BJAM_UPDATE .NES. "update" +$ THEN +$ SAY "I|Cleaning previous build..." +$ MCR [.bootstrap_vms]jam0.exe -f build.jam --toolset='BOOST_JAM_TOOLSET' 'ARGS' clean +$ ENDIF +$ +$ SAY "I|Building Boost.Jam..." +$ MCR [.bootstrap_vms]jam0.exe -f build.jam --toolset='BOOST_JAM_TOOLSET' 'ARGS' +$ ENDIF +$ +$ +$EXIT: +$ sts = $STATUS +$ exit 'sts' + (0 * f$verify(save_verify)) + + +$CLEAN: !GOSUB +$ ! +$ IF F$SEARCH("[.bootstrap_vms]*.*") .NES. "" +$ THEN +$ SAY "I|Cleaning previous bootstrap files..." +$ ! +$ SET FILE /PROT=(W:RWED) [.bootstrap_vms]*.*;* +$ DELETE /NOCONF /NOLOG [.bootstrap_vms]*.*;* +$ ENDIF +$ ! +$ IF F$SEARCH("bootstrap_vms.dir") .NES. "" +$ THEN +$ SAY "I|Removing previous bootstrap directory..." +$ ! +$ SET FILE /PROT=(W:RWED) bootstrap_vms.dir +$ DELETE /NOCONF /NOLOG bootstrap_vms.dir; +$ ENDIF +$ ! +$ RETURN diff --git a/src/boost/tools/build/src/engine/builtins.cpp b/src/boost/tools/build/src/engine/builtins.cpp new file mode 100644 index 000000000..c61e77a4f --- /dev/null +++ b/src/boost/tools/build/src/engine/builtins.cpp @@ -0,0 +1,2631 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +#include "jam.h" +#include "builtins.h" + +#include "compile.h" +#include "constants.h" +#include "cwd.h" +#include "debugger.h" +#include "filesys.h" +#include "frames.h" +#include "hash.h" +#include "hdrmacro.h" +#include "lists.h" +#include "make.h" +#include "md5.h" +#include "native.h" +#include "object.h" +#include "parse.h" +#include "pathsys.h" +#include "rules.h" +#include "jam_strings.h" +#include "startup.h" +#include "subst.h" +#include "timestamp.h" +#include "variable.h" +#include "output.h" + +#include <ctype.h> +#include <stdlib.h> + +#ifdef OS_NT +#include <windows.h> +#ifndef FSCTL_GET_REPARSE_POINT +/* MinGW's version of windows.h is missing this, so we need + * to include winioctl.h directly + */ +#include <winioctl.h> +#endif + +/* With VC8 (VS2005) these are not defined: + * FSCTL_GET_REPARSE_POINT (expects WINVER >= 0x0500 _WIN32_WINNT >= 0x0500 ) + * IO_REPARSE_TAG_SYMLINK (is part of a separate Driver SDK) + * So define them explicitly to their expected values. + */ +#ifndef FSCTL_GET_REPARSE_POINT +# define FSCTL_GET_REPARSE_POINT 0x000900a8 +#endif +#ifndef IO_REPARSE_TAG_SYMLINK +# define IO_REPARSE_TAG_SYMLINK (0xA000000CL) +#endif + +#include <io.h> +#if !defined(__BORLANDC__) +#define dup _dup +#define dup2 _dup2 +#define open _open +#define close _close +#endif /* __BORLANDC__ */ +#endif /* OS_NT */ + +#if defined(USE_EXECUNIX) +# include <sys/types.h> +# include <sys/wait.h> +#elif defined(OS_VMS) +# include <wait.h> +#else +/* + * NT does not have wait() and associated macros and uses the system() return + * value instead. Status code group are documented at: + * http://msdn.microsoft.com/en-gb/library/ff565436.aspx + */ +# define WIFEXITED(w) (((w) & 0XFFFFFF00) == 0) +# define WEXITSTATUS(w)(w) +#endif + +/* + * builtins.c - builtin jam rules + * + * External routines: + * load_builtins() - define builtin rules + * unknown_rule() - reports an unknown rule occurrence to the + * user and exits + * + * Internal routines: + * append_if_exists() - if file exists, append it to the list + * builtin_calc() - CALC rule + * builtin_delete_module() - DELETE_MODULE ( MODULE ? ) + * builtin_depends() - DEPENDS/INCLUDES rule + * builtin_echo() - ECHO rule + * builtin_exit() - EXIT rule + * builtin_export() - EXPORT ( MODULE ? : RULES * ) + * builtin_flags() - NOCARE, NOTFILE, TEMPORARY rule + * builtin_glob() - GLOB rule + * builtin_glob_recursive() - ??? + * builtin_hdrmacro() - ??? + * builtin_import() - IMPORT rule + * builtin_match() - MATCH rule, regexp matching + * builtin_rebuilds() - REBUILDS rule + * builtin_rulenames() - RULENAMES ( MODULE ? ) + * builtin_split_by_characters() - splits the given string into tokens + * builtin_varnames() - VARNAMES ( MODULE ? ) + * get_source_line() - get a frame's file and line number + * information + */ + + +/* + * compile_builtin() - define builtin rules + */ + +#define P0 (PARSE *)0 +#define C0 (OBJECT *)0 + +#if defined( OS_NT ) || defined( OS_CYGWIN ) + LIST * builtin_system_registry ( FRAME *, int ); + LIST * builtin_system_registry_names( FRAME *, int ); +#endif + +int glob( char const * s, char const * c ); + +void backtrace ( FRAME * ); +void backtrace_line ( FRAME * ); +void print_source_line( FRAME * ); + + +RULE * bind_builtin( char const * name_, LIST * (* f)( FRAME *, int flags ), + int flags, char const * * args ) +{ + FUNCTION * func; + RULE * result; + OBJECT * name = object_new( name_ ); + + func = function_builtin( f, flags, args ); + + result = new_rule_body( root_module(), name, func, 1 ); + + function_free( func ); + + object_free( name ); + + return result; +} + + +RULE * duplicate_rule( char const * name_, RULE * other ) +{ + OBJECT * name = object_new( name_ ); + RULE * result = import_rule( other, root_module(), name ); + object_free( name ); + return result; +} + + +/* + * load_builtins() - define builtin rules + */ + +void load_builtins() +{ + duplicate_rule( "Always", + bind_builtin( "ALWAYS", + builtin_flags, T_FLAG_TOUCHED, 0 ) ); + + duplicate_rule( "Depends", + bind_builtin( "DEPENDS", + builtin_depends, 0, 0 ) ); + + duplicate_rule( "echo", + duplicate_rule( "Echo", + bind_builtin( "ECHO", + builtin_echo, 0, 0 ) ) ); + + { + char const * args[] = { "message", "*", ":", "result-value", "?", 0 }; + duplicate_rule( "exit", + duplicate_rule( "Exit", + bind_builtin( "EXIT", + builtin_exit, 0, args ) ) ); + } + + { + char const * args[] = { "directories", "*", ":", "patterns", "*", ":", + "case-insensitive", "?", 0 }; + duplicate_rule( "Glob", + bind_builtin( "GLOB", builtin_glob, 0, args ) ); + } + + { + char const * args[] = { "patterns", "*", 0 }; + bind_builtin( "GLOB-RECURSIVELY", + builtin_glob_recursive, 0, args ); + } + + duplicate_rule( "Includes", + bind_builtin( "INCLUDES", + builtin_depends, 1, 0 ) ); + + { + char const * args[] = { "targets", "*", ":", "targets-to-rebuild", "*", + 0 }; + bind_builtin( "REBUILDS", + builtin_rebuilds, 0, args ); + } + + duplicate_rule( "Leaves", + bind_builtin( "LEAVES", + builtin_flags, T_FLAG_LEAVES, 0 ) ); + + duplicate_rule( "Match", + bind_builtin( "MATCH", + builtin_match, 0, 0 ) ); + + { + char const * args[] = { "string", ":", "delimiters", 0 }; + bind_builtin( "SPLIT_BY_CHARACTERS", + builtin_split_by_characters, 0, args ); + } + + duplicate_rule( "NoCare", + bind_builtin( "NOCARE", + builtin_flags, T_FLAG_NOCARE, 0 ) ); + + duplicate_rule( "NOTIME", + duplicate_rule( "NotFile", + bind_builtin( "NOTFILE", + builtin_flags, T_FLAG_NOTFILE, 0 ) ) ); + + duplicate_rule( "NoUpdate", + bind_builtin( "NOUPDATE", + builtin_flags, T_FLAG_NOUPDATE, 0 ) ); + + duplicate_rule( "Temporary", + bind_builtin( "TEMPORARY", + builtin_flags, T_FLAG_TEMP, 0 ) ); + + bind_builtin( "ISFILE", + builtin_flags, T_FLAG_ISFILE, 0 ); + + duplicate_rule( "HdrMacro", + bind_builtin( "HDRMACRO", + builtin_hdrmacro, 0, 0 ) ); + + /* FAIL_EXPECTED is used to indicate that the result of a target build + * action should be inverted (ok <=> fail) this can be useful when + * performing test runs from Jamfiles. + */ + bind_builtin( "FAIL_EXPECTED", + builtin_flags, T_FLAG_FAIL_EXPECTED, 0 ); + + bind_builtin( "RMOLD", + builtin_flags, T_FLAG_RMOLD, 0 ); + + { + char const * args[] = { "targets", "*", 0 }; + bind_builtin( "UPDATE", + builtin_update, 0, args ); + } + + { + char const * args[] = { "targets", "*", + ":", "log", "?", + ":", "ignore-minus-n", "?", + ":", "ignore-minus-q", "?", 0 }; + bind_builtin( "UPDATE_NOW", + builtin_update_now, 0, args ); + } + + { + char const * args[] = { "string", "pattern", "replacements", "+", 0 }; + duplicate_rule( "subst", + bind_builtin( "SUBST", + builtin_subst, 0, args ) ); + } + + { + char const * args[] = { "module", "?", 0 }; + bind_builtin( "RULENAMES", + builtin_rulenames, 0, args ); + } + + { + char const * args[] = { "module", "?", 0 }; + bind_builtin( "VARNAMES", + builtin_varnames, 0, args ); + } + + { + char const * args[] = { "module", "?", 0 }; + bind_builtin( "DELETE_MODULE", + builtin_delete_module, 0, args ); + } + + { + char const * args[] = { "source_module", "?", + ":", "source_rules", "*", + ":", "target_module", "?", + ":", "target_rules", "*", + ":", "localize", "?", 0 }; + bind_builtin( "IMPORT", + builtin_import, 0, args ); + } + + { + char const * args[] = { "module", "?", ":", "rules", "*", 0 }; + bind_builtin( "EXPORT", + builtin_export, 0, args ); + } + + { + char const * args[] = { "levels", "?", 0 }; + bind_builtin( "CALLER_MODULE", + builtin_caller_module, 0, args ); + } + + { + char const * args[] = { "levels", "?", 0 }; + bind_builtin( "BACKTRACE", + builtin_backtrace, 0, args ); + } + + { + char const * args[] = { 0 }; + bind_builtin( "PWD", + builtin_pwd, 0, args ); + } + + { + char const * args[] = { "modules_to_import", "+", + ":", "target_module", "?", 0 }; + bind_builtin( "IMPORT_MODULE", + builtin_import_module, 0, args ); + } + + { + char const * args[] = { "module", "?", 0 }; + bind_builtin( "IMPORTED_MODULES", + builtin_imported_modules, 0, args ); + } + + { + char const * args[] = { "instance_module", ":", "class_module", 0 }; + bind_builtin( "INSTANCE", + builtin_instance, 0, args ); + } + + { + char const * args[] = { "sequence", "*", 0 }; + bind_builtin( "SORT", + builtin_sort, 0, args ); + } + + { + char const * args[] = { "path_parts", "*", 0 }; + bind_builtin( "NORMALIZE_PATH", + builtin_normalize_path, 0, args ); + } + + { + char const * args[] = { "args", "*", 0 }; + bind_builtin( "CALC", + builtin_calc, 0, args ); + } + + { + char const * args[] = { "module", ":", "rule", 0 }; + bind_builtin( "NATIVE_RULE", + builtin_native_rule, 0, args ); + } + + { + char const * args[] = { "module", ":", "rule", ":", "version", 0 }; + bind_builtin( "HAS_NATIVE_RULE", + builtin_has_native_rule, 0, args ); + } + + { + char const * args[] = { "module", "*", 0 }; + bind_builtin( "USER_MODULE", + builtin_user_module, 0, args ); + } + + { + char const * args[] = { 0 }; + bind_builtin( "NEAREST_USER_LOCATION", + builtin_nearest_user_location, 0, args ); + } + + { + char const * args[] = { "file", 0 }; + bind_builtin( "CHECK_IF_FILE", + builtin_check_if_file, 0, args ); + } + +#ifdef HAVE_PYTHON + { + char const * args[] = { "python-module", + ":", "function", + ":", "jam-module", + ":", "rule-name", 0 }; + bind_builtin( "PYTHON_IMPORT_RULE", + builtin_python_import_rule, 0, args ); + } +#endif + +# if defined( OS_NT ) || defined( OS_CYGWIN ) + { + char const * args[] = { "key_path", ":", "data", "?", 0 }; + bind_builtin( "W32_GETREG", + builtin_system_registry, 0, args ); + } + + { + char const * args[] = { "key_path", ":", "result-type", 0 }; + bind_builtin( "W32_GETREGNAMES", + builtin_system_registry_names, 0, args ); + } +# endif + + { + char const * args[] = { "command", ":", "*", 0 }; + duplicate_rule( "SHELL", + bind_builtin( "COMMAND", + builtin_shell, 0, args ) ); + } + + { + char const * args[] = { "string", 0 }; + bind_builtin( "MD5", + builtin_md5, 0, args ); + } + + { + char const * args[] = { "name", ":", "mode", 0 }; + bind_builtin( "FILE_OPEN", + builtin_file_open, 0, args ); + } + + { + char const * args[] = { "string", ":", "width", 0 }; + bind_builtin( "PAD", + builtin_pad, 0, args ); + } + + { + char const * args[] = { "targets", "*", 0 }; + bind_builtin( "PRECIOUS", + builtin_precious, 0, args ); + } + + { + char const * args [] = { 0 }; + bind_builtin( "SELF_PATH", builtin_self_path, 0, args ); + } + + { + char const * args [] = { "path", 0 }; + bind_builtin( "MAKEDIR", builtin_makedir, 0, args ); + } + + { + const char * args [] = { "path", 0 }; + bind_builtin( "READLINK", builtin_readlink, 0, args ); + } + + { + char const * args[] = { "archives", "*", + ":", "member-patterns", "*", + ":", "case-insensitive", "?", + ":", "symbol-patterns", "*", 0 }; + bind_builtin( "GLOB_ARCHIVE", builtin_glob_archive, 0, args ); + } + +#ifdef JAM_DEBUGGER + + { + const char * args[] = { "list", "*", 0 }; + bind_builtin("__DEBUG_PRINT_HELPER__", builtin_debug_print_helper, 0, args); + } + +#endif + + /* Initialize builtin modules. */ + init_set(); + init_path(); + init_regex(); + init_property_set(); + init_sequence(); + init_order(); +} + + +/* + * builtin_calc() - CALC rule + * + * Performs simple mathematical operations on two arguments. + */ + +LIST * builtin_calc( FRAME * frame, int flags ) +{ + LIST * arg = lol_get( frame->args, 0 ); + + LIST * result = L0; + long lhs_value; + long rhs_value; + long result_value; + char buffer[ 16 ]; + char const * lhs; + char const * op; + char const * rhs; + LISTITER iter = list_begin( arg ); + LISTITER const end = list_end( arg ); + + if ( iter == end ) return L0; + lhs = object_str( list_item( iter ) ); + + iter = list_next( iter ); + if ( iter == end ) return L0; + op = object_str( list_item( iter ) ); + + iter = list_next( iter ); + if ( iter == end ) return L0; + rhs = object_str( list_item( iter ) ); + + lhs_value = atoi( lhs ); + rhs_value = atoi( rhs ); + + if ( !strcmp( "+", op ) ) + result_value = lhs_value + rhs_value; + else if ( !strcmp( "-", op ) ) + result_value = lhs_value - rhs_value; + else + return L0; + + sprintf( buffer, "%ld", result_value ); + result = list_push_back( result, object_new( buffer ) ); + return result; +} + + +/* + * builtin_depends() - DEPENDS/INCLUDES rule + * + * The DEPENDS/INCLUDES builtin rule appends each of the listed sources on the + * dependency/includes list of each of the listed targets. It binds both the + * targets and sources as TARGETs. + */ + +LIST * builtin_depends( FRAME * frame, int flags ) +{ + LIST * const targets = lol_get( frame->args, 0 ); + LIST * const sources = lol_get( frame->args, 1 ); + + LISTITER iter = list_begin( targets ); + LISTITER end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * const t = bindtarget( list_item( iter ) ); + + if ( flags ) + target_include_many( t, sources ); + else + targetlist( t->depends, sources ); + } + + /* Enter reverse links */ + iter = list_begin( sources ); + end = list_end( sources ); + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * const s = bindtarget( list_item( iter ) ); + if ( flags ) + { + LISTITER t_iter = list_begin( targets ); + LISTITER const t_end = list_end( targets ); + for ( ; t_iter != t_end; t_iter = list_next( t_iter ) ) + targetentry( s->dependants, bindtarget( + list_item( t_iter ) )->includes ); + } + else + targetlist( s->dependants, targets ); + } + + return L0; +} + + +/* + * builtin_rebuilds() - REBUILDS rule + * + * Appends each of the rebuild-targets listed in its second argument to the + * rebuilds list for each of the targets listed in its first argument. + */ + +LIST * builtin_rebuilds( FRAME * frame, int flags ) +{ + LIST * targets = lol_get( frame->args, 0 ); + LIST * rebuilds = lol_get( frame->args, 1 ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * const t = bindtarget( list_item( iter ) ); + targetlist( t->rebuilds, rebuilds ); + } + return L0; +} + + +/* + * builtin_echo() - ECHO rule + * + * Echoes the targets to the user. No other actions are taken. + */ + +LIST * builtin_echo( FRAME * frame, int flags ) +{ + list_print( lol_get( frame->args, 0 ) ); + out_printf( "\n" ); + out_flush(); + return L0; +} + + +/* + * builtin_exit() - EXIT rule + * + * Echoes the targets to the user and exits the program with a failure status. + */ + +LIST * builtin_exit( FRAME * frame, int flags ) +{ + LIST * const code = lol_get( frame->args, 1 ); + list_print( lol_get( frame->args, 0 ) ); + out_printf( "\n" ); + if ( !list_empty( code ) ) + { + int status = atoi( object_str( list_front( code ) ) ); +#ifdef OS_VMS + switch( status ) + { + case 0: + status = EXITOK; + break; + case 1: + status = EXITBAD; + break; + } +#endif + b2::clean_exit( status ); + } + else + b2::clean_exit( EXITBAD ); /* yeech */ + return L0; +} + + +/* + * builtin_flags() - NOCARE, NOTFILE, TEMPORARY rule + * + * Marks the target with the appropriate flag, for use by make0(). It binds each + * target as a TARGET. + */ + +LIST * builtin_flags( FRAME * frame, int flags ) +{ + LIST * const targets = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + bindtarget( list_item( iter ) )->flags |= flags; + return L0; +} + + +/* + * builtin_glob() - GLOB rule + */ + +struct globbing +{ + LIST * patterns; + LIST * results; + LIST * case_insensitive; +}; + + +static void downcase_inplace( char * p ) +{ + for ( ; *p; ++p ) + *p = tolower( *p ); +} + + +static void builtin_glob_back( void * closure, OBJECT * file, int status, + timestamp const * const time ) +{ + PROFILE_ENTER( BUILTIN_GLOB_BACK ); + + struct globbing * const globbing = (struct globbing *)closure; + PATHNAME f; + string buf[ 1 ]; + LISTITER iter; + LISTITER end; + + /* Null out directory for matching. We wish we had file_dirscan() pass up a + * PATHNAME. + */ + path_parse( object_str( file ), &f ); + f.f_dir.len = 0; + + /* For globbing, we unconditionally ignore current and parent directory + * items. Since these items always exist, there is no reason why caller of + * GLOB would want to see them. We could also change file_dirscan(), but + * then paths with embedded "." and ".." would not work anywhere. + */ + if ( !strcmp( f.f_base.ptr, "." ) || !strcmp( f.f_base.ptr, ".." ) ) + { + PROFILE_EXIT( BUILTIN_GLOB_BACK ); + return; + } + + string_new( buf ); + path_build( &f, buf ); + + if ( globbing->case_insensitive ) + downcase_inplace( buf->value ); + + iter = list_begin( globbing->patterns ); + end = list_end( globbing->patterns ); + for ( ; iter != end; iter = list_next( iter ) ) + { + if ( !glob( object_str( list_item( iter ) ), buf->value ) ) + { + globbing->results = list_push_back( globbing->results, object_copy( + file ) ); + break; + } + } + + string_free( buf ); + + PROFILE_EXIT( BUILTIN_GLOB_BACK ); +} + + +static LIST * downcase_list( LIST * in ) +{ + LIST * result = L0; + LISTITER iter = list_begin( in ); + LISTITER const end = list_end( in ); + + string s[ 1 ]; + string_new( s ); + + for ( ; iter != end; iter = list_next( iter ) ) + { + string_append( s, object_str( list_item( iter ) ) ); + downcase_inplace( s->value ); + result = list_push_back( result, object_new( s->value ) ); + string_truncate( s, 0 ); + } + + string_free( s ); + return result; +} + + +LIST * builtin_glob( FRAME * frame, int flags ) +{ + LIST * const l = lol_get( frame->args, 0 ); + LIST * const r = lol_get( frame->args, 1 ); + + LISTITER iter; + LISTITER end; + struct globbing globbing; + + globbing.results = L0; + globbing.patterns = r; + + globbing.case_insensitive = +# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS ) + l; /* Always case-insensitive if any files can be found. */ +# else + lol_get( frame->args, 2 ); +# endif + + if ( globbing.case_insensitive ) + globbing.patterns = downcase_list( r ); + + iter = list_begin( l ); + end = list_end( l ); + for ( ; iter != end; iter = list_next( iter ) ) + file_dirscan( list_item( iter ), builtin_glob_back, &globbing ); + + if ( globbing.case_insensitive ) + list_free( globbing.patterns ); + + return globbing.results; +} + + +static int has_wildcards( char const * const str ) +{ + return str[ strcspn( str, "[]*?" ) ] ? 1 : 0; +} + + +/* + * append_if_exists() - if file exists, append it to the list + */ + +static LIST * append_if_exists( LIST * list, OBJECT * file ) +{ + file_info_t * info = file_query( file ); + return info + ? list_push_back( list, object_copy( info->name ) ) + : list ; +} + + +LIST * glob1( OBJECT * dirname, OBJECT * pattern ) +{ + LIST * const plist = list_new( object_copy( pattern ) ); + struct globbing globbing; + + globbing.results = L0; + globbing.patterns = plist; + + globbing.case_insensitive +# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS ) + = plist; /* always case-insensitive if any files can be found */ +# else + = L0; +# endif + + if ( globbing.case_insensitive ) + globbing.patterns = downcase_list( plist ); + + file_dirscan( dirname, builtin_glob_back, &globbing ); + + if ( globbing.case_insensitive ) + list_free( globbing.patterns ); + + list_free( plist ); + + return globbing.results; +} + + +LIST * glob_recursive( char const * pattern ) +{ + LIST * result = L0; + + /* Check if there's metacharacters in pattern */ + if ( !has_wildcards( pattern ) ) + { + /* No metacharacters. Check if the path exists. */ + OBJECT * const p = object_new( pattern ); + result = append_if_exists( result, p ); + object_free( p ); + } + else + { + /* Have metacharacters in the pattern. Split into dir/name. */ + PATHNAME path[ 1 ]; + path_parse( pattern, path ); + + if ( path->f_dir.ptr ) + { + LIST * dirs = L0; + string dirname[ 1 ]; + string basename[ 1 ]; + string_new( dirname ); + string_new( basename ); + + string_append_range( dirname, path->f_dir.ptr, + path->f_dir.ptr + path->f_dir.len ); + + path->f_grist.ptr = 0; + path->f_grist.len = 0; + path->f_dir.ptr = 0; + path->f_dir.len = 0; + path_build( path, basename ); + + dirs = has_wildcards( dirname->value ) + ? glob_recursive( dirname->value ) + : list_push_back( dirs, object_new( dirname->value ) ); + + if ( has_wildcards( basename->value ) ) + { + OBJECT * const b = object_new( basename->value ); + LISTITER iter = list_begin( dirs ); + LISTITER const end = list_end( dirs ); + for ( ; iter != end; iter = list_next( iter ) ) + result = list_append( result, glob1( list_item( iter ), b ) + ); + object_free( b ); + } + else + { + LISTITER iter = list_begin( dirs ); + LISTITER const end = list_end( dirs ); + string file_string[ 1 ]; + string_new( file_string ); + + /* No wildcard in basename. */ + for ( ; iter != end; iter = list_next( iter ) ) + { + OBJECT * p; + path->f_dir.ptr = object_str( list_item( iter ) ); + path->f_dir.len = int32_t(strlen( object_str( list_item( iter ) ) )); + path_build( path, file_string ); + + p = object_new( file_string->value ); + + result = append_if_exists( result, p ); + + object_free( p ); + + string_truncate( file_string, 0 ); + } + + string_free( file_string ); + } + + string_free( dirname ); + string_free( basename ); + + list_free( dirs ); + } + else + { + /* No directory, just a pattern. */ + OBJECT * const p = object_new( pattern ); + result = list_append( result, glob1( constant_dot, p ) ); + object_free( p ); + } + } + + return result; +} + + +/* + * builtin_glob_recursive() - ??? + */ + +LIST * builtin_glob_recursive( FRAME * frame, int flags ) +{ + LIST * result = L0; + LIST * const l = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( l ); + LISTITER const end = list_end( l ); + for ( ; iter != end; iter = list_next( iter ) ) + result = list_append( result, glob_recursive( object_str( list_item( + iter ) ) ) ); + return result; +} + + +/* + * builtin_match() - MATCH rule, regexp matching + */ + +LIST * builtin_match( FRAME * frame, int flags ) +{ + LIST * l; + LIST * r; + LIST * result = L0; + LISTITER l_iter; + LISTITER l_end; + LISTITER r_iter; + LISTITER r_end; + + string buf[ 1 ]; + string_new( buf ); + + /* For each pattern */ + + l = lol_get( frame->args, 0 ); + l_iter = list_begin( l ); + l_end = list_end( l ); + for ( ; l_iter != l_end; l_iter = list_next( l_iter ) ) + { + /* Result is cached and intentionally never freed. */ + regexp * re = regex_compile( list_item( l_iter ) ); + + /* For each string to match against. */ + r = lol_get( frame->args, 1 ); + r_iter = list_begin( r ); + r_end = list_end( r ); + for ( ; r_iter != r_end; r_iter = list_next( r_iter ) ) + { + if ( regexec( re, object_str( list_item( r_iter ) ) ) ) + { + int i; + int top; + + /* Find highest parameter */ + + for ( top = NSUBEXP; top-- > 1; ) + if ( re->startp[ top ] ) + break; + + /* And add all parameters up to highest onto list. */ + /* Must have parameters to have results! */ + for ( i = 1; i <= top; ++i ) + { + string_append_range( buf, re->startp[ i ], re->endp[ i ] ); + result = list_push_back( result, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + } + } + } + + string_free( buf ); + return result; +} + + +/* + * builtin_split_by_characters() - splits the given string into tokens + */ + +LIST * builtin_split_by_characters( FRAME * frame, int flags ) +{ + LIST * l1 = lol_get( frame->args, 0 ); + LIST * l2 = lol_get( frame->args, 1 ); + + LIST * result = L0; + + string buf[ 1 ]; + + char const * delimiters = object_str( list_front( l2 ) ); + char * t; + + string_copy( buf, object_str( list_front( l1 ) ) ); + + t = strtok( buf->value, delimiters ); + while ( t ) + { + result = list_push_back( result, object_new( t ) ); + t = strtok( NULL, delimiters ); + } + + string_free( buf ); + + return result; +} + + +/* + * builtin_hdrmacro() - ??? + */ + +LIST * builtin_hdrmacro( FRAME * frame, int flags ) +{ + LIST * const l = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( l ); + LISTITER const end = list_end( l ); + + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * const t = bindtarget( list_item( iter ) ); + + /* Scan file for header filename macro definitions. */ + if ( DEBUG_HEADER ) + out_printf( "scanning '%s' for header file macro definitions\n", + object_str( list_item( iter ) ) ); + + macro_headers( t ); + } + + return L0; +} + + +/* + * builtin_rulenames() - RULENAMES ( MODULE ? ) + * + * Returns a list of the non-local rule names in the given MODULE. If MODULE is + * not supplied, returns the list of rule names in the global module. + */ + +static void add_rule_name( void * r_, void * result_ ) +{ + RULE * const r = (RULE *)r_; + LIST * * const result = (LIST * *)result_; + if ( r->exported ) + *result = list_push_back( *result, object_copy( r->name ) ); +} + + +LIST * builtin_rulenames( FRAME * frame, int flags ) +{ + LIST * arg0 = lol_get( frame->args, 0 ); + LIST * result = L0; + module_t * const source_module = bindmodule( list_empty( arg0 ) + ? 0 + : list_front( arg0 ) ); + + if ( source_module->rules ) + hashenumerate( source_module->rules, add_rule_name, &result ); + return result; +} + + +/* + * builtin_varnames() - VARNAMES ( MODULE ? ) + * + * Returns a list of the variable names in the given MODULE. If MODULE is not + * supplied, returns the list of variable names in the global module. + */ + +/* helper function for builtin_varnames(), below. Used with hashenumerate, will + * prepend the key of each element to the list + */ +static void add_hash_key( void * np, void * result_ ) +{ + LIST * * result = (LIST * *)result_; + *result = list_push_back( *result, object_copy( *(OBJECT * *)np ) ); +} + + +LIST * builtin_varnames( FRAME * frame, int flags ) +{ + LIST * arg0 = lol_get( frame->args, 0 ); + LIST * result = L0; + module_t * source_module = bindmodule( list_empty( arg0 ) + ? 0 + : list_front( arg0 ) ); + + struct hash * const vars = source_module->variables; + if ( vars ) + hashenumerate( vars, add_hash_key, &result ); + return result; +} + + +/* + * builtin_delete_module() - DELETE_MODULE ( MODULE ? ) + * + * Clears all rules and variables from the given module. + */ + +LIST * builtin_delete_module( FRAME * frame, int flags ) +{ + LIST * const arg0 = lol_get( frame->args, 0 ); + module_t * const source_module = bindmodule( list_empty( arg0 ) ? 0 : + list_front( arg0 ) ); + delete_module( source_module ); + return L0; +} + + +/* + * unknown_rule() - reports an unknown rule occurrence to the user and exits + */ + +void unknown_rule( FRAME * frame, char const * key, module_t * module, + OBJECT * rule_name ) +{ + backtrace_line( frame->prev ); + if ( key ) + out_printf("%s error", key); + else + out_printf("ERROR"); + out_printf( ": rule \"%s\" unknown in ", object_str( rule_name ) ); + if ( module->name ) + out_printf( "module \"%s\".\n", object_str( module->name ) ); + else + out_printf( "root module.\n" ); + backtrace( frame->prev ); + b2::clean_exit( EXITBAD ); +} + + +/* + * builtin_import() - IMPORT rule + * + * IMPORT + * ( + * SOURCE_MODULE ? : + * SOURCE_RULES * : + * TARGET_MODULE ? : + * TARGET_RULES * : + * LOCALIZE ? + * ) + * + * Imports rules from the SOURCE_MODULE into the TARGET_MODULE as local rules. + * If either SOURCE_MODULE or TARGET_MODULE is not supplied, it refers to the + * global module. SOURCE_RULES specifies which rules from the SOURCE_MODULE to + * import; TARGET_RULES specifies the names to give those rules in + * TARGET_MODULE. If SOURCE_RULES contains a name that does not correspond to + * a rule in SOURCE_MODULE, or if it contains a different number of items than + * TARGET_RULES, an error is issued. If LOCALIZE is specified, the rules will be + * executed in TARGET_MODULE, with corresponding access to its module local + * variables. + */ + +LIST * builtin_import( FRAME * frame, int flags ) +{ + LIST * source_module_list = lol_get( frame->args, 0 ); + LIST * source_rules = lol_get( frame->args, 1 ); + LIST * target_module_list = lol_get( frame->args, 2 ); + LIST * target_rules = lol_get( frame->args, 3 ); + LIST * localize = lol_get( frame->args, 4 ); + + module_t * target_module = bindmodule( list_empty( target_module_list ) + ? 0 + : list_front( target_module_list ) ); + module_t * source_module = bindmodule( list_empty( source_module_list ) + ? 0 + : list_front( source_module_list ) ); + + LISTITER source_iter = list_begin( source_rules ); + LISTITER const source_end = list_end( source_rules ); + LISTITER target_iter = list_begin( target_rules ); + LISTITER const target_end = list_end( target_rules ); + + for ( ; + source_iter != source_end && target_iter != target_end; + source_iter = list_next( source_iter ), + target_iter = list_next( target_iter ) ) + { + RULE * r = nullptr; + RULE * imported = nullptr; + + if ( !source_module->rules || !(r = (RULE *)hash_find( + source_module->rules, list_item( source_iter ) ) ) ) + { + unknown_rule( frame, "IMPORT", source_module, list_item( source_iter + ) ); + } + + imported = import_rule( r, target_module, list_item( target_iter ) ); + if ( !list_empty( localize ) ) + rule_localize( imported, target_module ); + /* This rule is really part of some other module. Just refer to it here, + * but do not let it out. + */ + imported->exported = 0; + } + + if ( source_iter != source_end || target_iter != target_end ) + { + backtrace_line( frame->prev ); + out_printf( "import error: length of source and target rule name lists " + "don't match!\n" ); + out_printf( " source: " ); + list_print( source_rules ); + out_printf( "\n target: " ); + list_print( target_rules ); + out_printf( "\n" ); + backtrace( frame->prev ); + b2::clean_exit( EXITBAD ); + } + + return L0; +} + + +/* + * builtin_export() - EXPORT ( MODULE ? : RULES * ) + * + * The EXPORT rule marks RULES from the SOURCE_MODULE as non-local (and thus + * exportable). If an element of RULES does not name a rule in MODULE, an error + * is issued. + */ + +LIST * builtin_export( FRAME * frame, int flags ) +{ + LIST * const module_list = lol_get( frame->args, 0 ); + LIST * const rules = lol_get( frame->args, 1 ); + module_t * const m = bindmodule( list_empty( module_list ) ? 0 : list_front( + module_list ) ); + + LISTITER iter = list_begin( rules ); + LISTITER const end = list_end( rules ); + for ( ; iter != end; iter = list_next( iter ) ) + { + RULE * r = nullptr; + if ( !m->rules || !( r = (RULE *)hash_find( m->rules, list_item( iter ) + ) ) ) + { + unknown_rule( frame, "EXPORT", m, list_item( iter ) ); + } + r->exported = 1; + } + return L0; +} + + +/* + * get_source_line() - get a frame's file and line number information + * + * This is the execution traceback information to be indicated for in debug + * output or an error backtrace. + */ + +static void get_source_line( FRAME * frame, char const * * file, int * line ) +{ + if ( frame->file ) + { + char const * f = object_str( frame->file ); + int l = frame->line; + *file = f; + *line = l; + } + else + { + *file = "(builtin)"; + *line = -1; + } +} + + +void print_source_line( FRAME * frame ) +{ + char const * file; + int line; + get_source_line( frame, &file, &line ); + if ( line < 0 ) + out_printf( "(builtin):" ); + else + out_printf( "%s:%d:", file, line ); +} + + +/* + * backtrace_line() - print a single line of error backtrace for the given + * frame. + */ + +void backtrace_line( FRAME * frame ) +{ + if ( frame == 0 ) + { + out_printf( "(no frame):" ); + } + else + { + print_source_line( frame ); + out_printf( " in %s\n", frame->rulename ); + } +} + + +/* + * backtrace() - Print the entire backtrace from the given frame to the Jambase + * which invoked it. + */ + +void backtrace( FRAME * frame ) +{ + if ( !frame ) return; + while ( ( frame = frame->prev ) ) + backtrace_line( frame ); +} + + +/* + * builtin_backtrace() - A Jam version of the backtrace function, taking no + * arguments and returning a list of quadruples: FILENAME LINE MODULE. RULENAME + * describing each frame. Note that the module-name is always followed by a + * period. + */ + +LIST * builtin_backtrace( FRAME * frame, int flags ) +{ + LIST * const levels_arg = lol_get( frame->args, 0 ); + int levels = list_empty( levels_arg ) + ? (int)( (unsigned int)(-1) >> 1 ) + : atoi( object_str( list_front( levels_arg ) ) ); + + LIST * result = L0; + for ( ; ( frame = frame->prev ) && levels; --levels ) + { + char const * file; + int line; + char buf[ 32 ]; + string module_name[ 1 ]; + get_source_line( frame, &file, &line ); + sprintf( buf, "%d", line ); + string_new( module_name ); + if ( frame->module->name ) + { + string_append( module_name, object_str( frame->module->name ) ); + string_append( module_name, "." ); + } + result = list_push_back( result, object_new( file ) ); + result = list_push_back( result, object_new( buf ) ); + result = list_push_back( result, object_new( module_name->value ) ); + result = list_push_back( result, object_new( frame->rulename ) ); + string_free( module_name ); + } + return result; +} + + +/* + * builtin_caller_module() - CALLER_MODULE ( levels ? ) + * + * If levels is not supplied, returns the name of the module of the rule which + * called the one calling this one. If levels is supplied, it is interpreted as + * an integer specifying a number of additional levels of call stack to traverse + * in order to locate the module in question. If no such module exists, returns + * the empty list. Also returns the empty list when the module in question is + * the global module. This rule is needed for implementing module import + * behavior. + */ + +LIST * builtin_caller_module( FRAME * frame, int flags ) +{ + LIST * const levels_arg = lol_get( frame->args, 0 ); + int const levels = list_empty( levels_arg ) + ? 0 + : atoi( object_str( list_front( levels_arg ) ) ); + + int i; + for ( i = 0; ( i < levels + 2 ) && frame->prev; ++i ) + frame = frame->prev; + + return frame->module == root_module() + ? L0 + : list_new( object_copy( frame->module->name ) ); +} + + +/* + * Return the current working directory. + * + * Usage: pwd = [ PWD ] ; + */ + +LIST * builtin_pwd( FRAME * frame, int flags ) +{ + return list_new( object_copy( cwd() ) ); +} + + +/* + * Adds targets to the list of target that jam will attempt to update. + */ + +LIST * builtin_update( FRAME * frame, int flags ) +{ + LIST * result = list_copy( targets_to_update() ); + LIST * arg1 = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( arg1 ), end = list_end( arg1 ); + clear_targets_to_update(); + for ( ; iter != end; iter = list_next( iter ) ) + mark_target_for_updating( object_copy( list_item( iter ) ) ); + return result; +} + +extern int anyhow; +int last_update_now_status; + +/* Takes a list of target names and immediately updates them. + * + * Parameters: + * 1. Target list. + * 2. Optional file descriptor (converted to a string) for a log file where all + * the related build output should be redirected. + * 3. If specified, makes the build temporarily disable the -n option, i.e. + * forces all needed out-of-date targets to be rebuilt. + * 4. If specified, makes the build temporarily disable the -q option, i.e. + * forces the build to continue even if one of the targets fails to build. + */ +LIST * builtin_update_now( FRAME * frame, int flags ) +{ + LIST * targets = lol_get( frame->args, 0 ); + LIST * log = lol_get( frame->args, 1 ); + LIST * force = lol_get( frame->args, 2 ); + LIST * continue_ = lol_get( frame->args, 3 ); + int status; + int original_stdout = 0; + int original_stderr = 0; + int original_noexec = 0; + int original_quitquick = 0; + + if ( !list_empty( log ) ) + { + /* Temporarily redirect stdout and stderr to the given log file. */ + int const fd = atoi( object_str( list_front( log ) ) ); + original_stdout = dup( 0 ); + original_stderr = dup( 1 ); + dup2( fd, 0 ); + dup2( fd, 1 ); + } + + if ( !list_empty( force ) ) + { + original_noexec = globs.noexec; + globs.noexec = 0; + } + + if ( !list_empty( continue_ ) ) + { + original_quitquick = globs.quitquick; + globs.quitquick = 0; + } + + status = make( targets, anyhow ); + + if ( !list_empty( force ) ) + { + globs.noexec = original_noexec; + } + + if ( !list_empty( continue_ ) ) + { + globs.quitquick = original_quitquick; + } + + if ( !list_empty( log ) ) + { + /* Flush whatever stdio might have buffered, while descriptions 0 and 1 + * still refer to the log file. + */ + out_flush( ); + err_flush( ); + dup2( original_stdout, 0 ); + dup2( original_stderr, 1 ); + close( original_stdout ); + close( original_stderr ); + } + + last_update_now_status = status; + + return status ? L0 : list_new( object_copy( constant_ok ) ); +} + + +LIST * builtin_import_module( FRAME * frame, int flags ) +{ + LIST * const arg1 = lol_get( frame->args, 0 ); + LIST * const arg2 = lol_get( frame->args, 1 ); + module_t * const m = list_empty( arg2 ) + ? root_module() + : bindmodule( list_front( arg2 ) ); + import_module( arg1, m ); + return L0; +} + + +LIST * builtin_imported_modules( FRAME * frame, int flags ) +{ + LIST * const arg0 = lol_get( frame->args, 0 ); + OBJECT * const module = list_empty( arg0 ) ? 0 : list_front( arg0 ); + return imported_modules( bindmodule( module ) ); +} + + +LIST * builtin_instance( FRAME * frame, int flags ) +{ + LIST * arg1 = lol_get( frame->args, 0 ); + LIST * arg2 = lol_get( frame->args, 1 ); + module_t * const instance = bindmodule( list_front( arg1 ) ); + module_t * const class_module = bindmodule( list_front( arg2 ) ); + instance->class_module = class_module; + module_set_fixed_variables( instance, class_module->num_fixed_variables ); + return L0; +} + + +LIST * builtin_sort( FRAME * frame, int flags ) +{ + return list_sort( lol_get( frame->args, 0 ) ); +} + + +namespace +{ + template <class S> + void replace_all(S &str, const S &from, const S &to) + { + const auto from_len = from.length(); + const auto to_len = to.length(); + auto pos = str.find(from, 0); + while (pos != S::npos) + { + str.replace(pos, from_len, to); + pos += to_len; + pos = str.find(from, pos); + } + } +} + + +LIST * builtin_normalize_path( FRAME * frame, int flags ) +{ + LIST * arg = lol_get( frame->args, 0 ); + LISTITER arg_iter = list_begin( arg ); + LISTITER arg_end = list_end( arg ); + std::string in; + for ( ; arg_iter != arg_end; arg_iter = list_next( arg_iter ) ) + { + auto arg_str = object_str( list_item( arg_iter ) ); + if (arg_str[ 0 ] == '\0') continue; + if (!in.empty()) in += "/"; + in += arg_str; + } + std::string out = b2::paths::normalize(in); + + if (out.empty()) return L0; + else return list_new(object_new(out.c_str())); +} + + +LIST * builtin_native_rule( FRAME * frame, int flags ) +{ + LIST * module_name = lol_get( frame->args, 0 ); + LIST * rule_name = lol_get( frame->args, 1 ); + + module_t * module = bindmodule( list_front( module_name ) ); + + native_rule_t * np; + if ( module->native_rules && (np = (native_rule_t *)hash_find( + module->native_rules, list_front( rule_name ) ) ) ) + { + new_rule_body( module, np->name, np->procedure, 1 ); + } + else + { + backtrace_line( frame->prev ); + out_printf( "error: no native rule \"%s\" defined in module \"%s.\"\n", + object_str( list_front( rule_name ) ), object_str( module->name ) ); + backtrace( frame->prev ); + b2::clean_exit( EXITBAD ); + } + return L0; +} + + +LIST * builtin_has_native_rule( FRAME * frame, int flags ) +{ + LIST * module_name = lol_get( frame->args, 0 ); + LIST * rule_name = lol_get( frame->args, 1 ); + LIST * version = lol_get( frame->args, 2 ); + + module_t * module = bindmodule( list_front( module_name ) ); + + native_rule_t * np; + if ( module->native_rules && (np = (native_rule_t *)hash_find( + module->native_rules, list_front( rule_name ) ) ) ) + { + int expected_version = atoi( object_str( list_front( version ) ) ); + if ( np->version == expected_version ) + return list_new( object_copy( constant_true ) ); + } + return L0; +} + + +LIST * builtin_user_module( FRAME * frame, int flags ) +{ + LIST * const module_name = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( module_name ); + LISTITER const end = list_end( module_name ); + for ( ; iter != end; iter = list_next( iter ) ) + bindmodule( list_item( iter ) )->user_module = 1; + return L0; +} + + +LIST * builtin_nearest_user_location( FRAME * frame, int flags ) +{ + FRAME * const nearest_user_frame = frame->module->user_module + ? frame + : frame->prev_user; + if ( !nearest_user_frame ) + return L0; + + { + LIST * result = L0; + char const * file; + int line; + char buf[ 32 ]; + + get_source_line( nearest_user_frame, &file, &line ); + sprintf( buf, "%d", line ); + result = list_push_back( result, object_new( file ) ); + result = list_push_back( result, object_new( buf ) ); + return result; + } +} + + +LIST * builtin_check_if_file( FRAME * frame, int flags ) +{ + LIST * const name = lol_get( frame->args, 0 ); + return file_is_file( list_front( name ) ) == 1 + ? list_new( object_copy( constant_true ) ) + : L0; +} + + +LIST * builtin_md5( FRAME * frame, int flags ) +{ + LIST * l = lol_get( frame->args, 0 ); + char const * s = object_str( list_front( l ) ); + + md5_state_t state; + md5_byte_t digest[ 16 ]; + char hex_output[ 16 * 2 + 1 ]; + + int di; + + md5_init( &state ); + md5_append( &state, (md5_byte_t const *)s, strlen( s ) ); + md5_finish( &state, digest ); + + for ( di = 0; di < 16; ++di ) + sprintf( hex_output + di * 2, "%02x", digest[ di ] ); + + return list_new( object_new( hex_output ) ); +} + + +LIST * builtin_file_open( FRAME * frame, int flags ) +{ + char const * name = object_str( list_front( lol_get( frame->args, 0 ) ) ); + char const * mode = object_str( list_front( lol_get( frame->args, 1 ) ) ); + int fd; + char buffer[ sizeof( "4294967295" ) ]; + + if ( strcmp(mode, "w") == 0 ) + fd = open( name, O_WRONLY|O_CREAT|O_TRUNC, 0666 ); + else + fd = open( name, O_RDONLY ); + + if ( fd != -1 ) + { + sprintf( buffer, "%d", fd ); + return list_new( object_new( buffer ) ); + } + return L0; +} + + +LIST * builtin_pad( FRAME * frame, int flags ) +{ + OBJECT * string = list_front( lol_get( frame->args, 0 ) ); + char const * width_s = object_str( list_front( lol_get( frame->args, 1 ) ) ); + + int32_t current = int32_t(strlen( object_str( string ) )); + int32_t desired = atoi( width_s ); + if ( current >= desired ) + return list_new( object_copy( string ) ); + else + { + char * buffer = (char *)BJAM_MALLOC( desired + 1 ); + int32_t i; + LIST * result; + + strcpy( buffer, object_str( string ) ); + for ( i = current; i < desired; ++i ) + buffer[ i ] = ' '; + buffer[ desired ] = '\0'; + result = list_new( object_new( buffer ) ); + BJAM_FREE( buffer ); + return result; + } +} + + +LIST * builtin_precious( FRAME * frame, int flags ) +{ + LIST * targets = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + bindtarget( list_item( iter ) )->flags |= T_FLAG_PRECIOUS; + return L0; +} + + +LIST * builtin_self_path( FRAME * frame, int flags ) +{ + extern char const * saved_argv0; + char * p = executable_path( saved_argv0 ); + if ( p ) + { + LIST * const result = list_new( object_new( p ) ); + free( p ); + return result; + } + return L0; +} + + +LIST * builtin_makedir( FRAME * frame, int flags ) +{ + LIST * const path = lol_get( frame->args, 0 ); + return file_mkdir( object_str( list_front( path ) ) ) + ? L0 + : list_new( object_copy( list_front( path ) ) ); +} + +LIST *builtin_readlink( FRAME * frame, int flags ) +{ + const char * path = object_str( list_front( lol_get( frame->args, 0 ) ) ); +#ifdef OS_NT + + /* This struct is declared in ntifs.h which is + * part of the Windows Driver Kit. + */ + typedef struct _REPARSE_DATA_BUFFER { + ULONG ReparseTag; + USHORT ReparseDataLength; + USHORT Reserved; + union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[ 1 ]; + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[ 1 ]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[ 1 ]; + } GenericReparseBuffer; + }; + } REPARSE_DATA_BUFFER; + + HANDLE hLink = CreateFileA( path, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL ); + DWORD n; + union { + REPARSE_DATA_BUFFER reparse; + char data[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; + } buf; + int okay = DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, &buf, sizeof(buf), &n, NULL); + + CloseHandle( hLink ); + + if (okay && buf.reparse.ReparseTag == IO_REPARSE_TAG_SYMLINK ) + { + int index = buf.reparse.SymbolicLinkReparseBuffer.SubstituteNameOffset / 2; + int length = buf.reparse.SymbolicLinkReparseBuffer.SubstituteNameLength / 2; + char cbuf[MAX_PATH + 1]; + int numchars = WideCharToMultiByte( CP_ACP, 0, buf.reparse.SymbolicLinkReparseBuffer.PathBuffer + index, length, cbuf, sizeof(cbuf), NULL, NULL ); + if( numchars >= int(sizeof(cbuf)) ) + { + return 0; + } + cbuf[numchars] = '\0'; + return list_new( object_new( cbuf ) ); + } + else if( okay && buf.reparse.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT ) + { + int index = buf.reparse.MountPointReparseBuffer.SubstituteNameOffset / 2; + int length = buf.reparse.MountPointReparseBuffer.SubstituteNameLength / 2; + char cbuf[MAX_PATH + 1]; + const char * result; + int numchars = WideCharToMultiByte( CP_ACP, 0, buf.reparse.MountPointReparseBuffer.PathBuffer + index, length, cbuf, sizeof(cbuf), NULL, NULL ); + if( numchars >= int(sizeof(cbuf)) ) + { + return 0; + } + cbuf[numchars] = '\0'; + /* strip off the leading "\??\" */ + result = cbuf; + if ( cbuf[ 0 ] == '\\' && cbuf[ 1 ] == '?' && + cbuf[ 2 ] == '?' && cbuf[ 3 ] == '\\' && + cbuf[ 4 ] != '\0' && cbuf[ 5 ] == ':' ) + { + result += 4; + } + return list_new( object_new( result ) ); + } + return 0; +#else + char static_buf[256]; + char * buf = static_buf; + int32_t bufsize = 256; + LIST * result = 0; + while (1) { + ssize_t len = readlink( path, buf, bufsize ); + if ( len < 0 ) + { + break; + } + else if ( int32_t(len) < bufsize ) + { + buf[ len ] = '\0'; + result = list_new( object_new( buf ) ); + break; + } + if ( buf != static_buf ) + BJAM_FREE( buf ); + bufsize *= 2; + buf = (char *)BJAM_MALLOC( bufsize ); + } + + if ( buf != static_buf ) + BJAM_FREE( buf ); + + return result; +#endif +} + +#ifdef JAM_DEBUGGER + +LIST *builtin_debug_print_helper( FRAME * frame, int flags ) +{ + debug_print_result = list_copy( lol_get( frame->args, 0 ) ); + return L0; +} + +#endif + +#ifdef HAVE_PYTHON + +LIST * builtin_python_import_rule( FRAME * frame, int flags ) +{ + static int first_time = 1; + char const * python_module = object_str( list_front( lol_get( frame->args, + 0 ) ) ); + char const * python_function = object_str( list_front( lol_get( frame->args, + 1 ) ) ); + OBJECT * jam_module = list_front( lol_get( frame->args, 2 ) ); + OBJECT * jam_rule = list_front( lol_get( frame->args, 3 ) ); + + PyObject * pName; + PyObject * pModule; + PyObject * pDict; + PyObject * pFunc; + + if ( first_time ) + { + /* At the first invocation, we add the value of the global + * EXTRA_PYTHONPATH to the sys.path Python variable. + */ + LIST * extra = 0; + module_t * outer_module = frame->module; + LISTITER iter, end; + + first_time = 0; + + extra = var_get( root_module(), constant_extra_pythonpath ); + + iter = list_begin( extra ), end = list_end( extra ); + for ( ; iter != end; iter = list_next( iter ) ) + { + string buf[ 1 ]; + string_new( buf ); + string_append( buf, "import sys\nsys.path.append(\"" ); + string_append( buf, object_str( list_item( iter ) ) ); + string_append( buf, "\")\n" ); + PyRun_SimpleString( buf->value ); + string_free( buf ); + } + } + + pName = PyString_FromString( python_module ); + pModule = PyImport_Import( pName ); + Py_DECREF( pName ); + + if ( pModule != NULL ) + { + pDict = PyModule_GetDict( pModule ); + pFunc = PyDict_GetItemString( pDict, python_function ); + + if ( pFunc && PyCallable_Check( pFunc ) ) + { + module_t * m = bindmodule( jam_module ); + new_rule_body( m, jam_rule, function_python( pFunc, 0 ), 0 ); + } + else + { + if ( PyErr_Occurred() ) + PyErr_Print(); + err_printf( "Cannot find function \"%s\"\n", python_function ); + } + Py_DECREF( pModule ); + } + else + { + PyErr_Print(); + err_printf( "Failed to load \"%s\"\n", python_module ); + } + return L0; + +} + +#endif /* #ifdef HAVE_PYTHON */ + + +void lol_build( LOL * lol, char const * * elements ) +{ + LIST * l = L0; + lol_init( lol ); + + while ( elements && *elements ) + { + if ( !strcmp( *elements, ":" ) ) + { + lol_add( lol, l ); + l = L0; + } + else + { + l = list_push_back( l, object_new( *elements ) ); + } + ++elements; + } + + if ( l != L0 ) + lol_add( lol, l ); +} + + +#ifdef HAVE_PYTHON + +static LIST *jam_list_from_string(PyObject *a) +{ + return list_new( object_new( PyString_AsString( a ) ) ); +} + +static LIST *jam_list_from_sequence(PyObject *a) +{ + LIST * l = 0; + + int i = 0; + int s = PySequence_Size( a ); + + for ( ; i < s; ++i ) + { + /* PySequence_GetItem returns new reference. */ + PyObject * e = PySequence_GetItem( a, i ); + char * s = PyString_AsString( e ); + if ( !s ) + { + /* try to get the repr() on the object */ + PyObject *repr = PyObject_Repr(e); + if (repr) + { + const char *str = PyString_AsString(repr); + PyErr_Format(PyExc_TypeError, "expecting type <str> got %s", str); + } + /* fall back to a dumb error */ + else + { + PyErr_BadArgument(); + } + return NULL; + } + l = list_push_back( l, object_new( s ) ); + Py_DECREF( e ); + } + + return l; +} + +static void make_jam_arguments_from_python(FRAME* inner, PyObject *args) +{ + int i; + int size; + + /* Build up the list of arg lists. */ + frame_init( inner ); + inner->prev = 0; + inner->prev_user = 0; + inner->module = bindmodule( constant_python_interface ); + + size = PyTuple_Size( args ); + for (i = 0 ; i < size; ++i) + { + PyObject * a = PyTuple_GetItem( args, i ); + if ( PyString_Check( a ) ) + { + lol_add( inner->args, jam_list_from_string(a) ); + } + else if ( PySequence_Check( a ) ) + { + lol_add( inner->args, jam_list_from_sequence(a) ); + } + } +} + + +/* + * Calls the bjam rule specified by name passed in 'args'. The name is looked up + * in the context of bjam's 'python_interface' module. Returns the list of + * strings returned by the rule. + */ + +PyObject * bjam_call( PyObject * self, PyObject * args ) +{ + FRAME inner[ 1 ]; + LIST * result; + PARSE * p; + OBJECT * rulename; + PyObject *args_proper; + + /* PyTuple_GetItem returns borrowed reference. */ + rulename = object_new( PyString_AsString( PyTuple_GetItem( args, 0 ) ) ); + + args_proper = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + make_jam_arguments_from_python (inner, args_proper); + if ( PyErr_Occurred() ) + { + return NULL; + } + Py_DECREF(args_proper); + + result = evaluate_rule( bindrule( rulename, inner->module), rulename, inner ); + object_free( rulename ); + + frame_free( inner ); + + /* Convert the bjam list into a Python list result. */ + { + PyObject * const pyResult = PyList_New( list_length( result ) ); + int i = 0; + LISTITER iter = list_begin( result ); + LISTITER const end = list_end( result ); + for ( ; iter != end; iter = list_next( iter ) ) + { + PyList_SetItem( pyResult, i, PyString_FromString( object_str( + list_item( iter ) ) ) ); + i += 1; + } + list_free( result ); + return pyResult; + } +} + + +/* + * Accepts four arguments: + * - module name + * - rule name, + * - Python callable. + * - (optional) bjam language function signature. + * Creates a bjam rule with the specified name in the specified module, which + * will invoke the Python callable. + */ + +PyObject * bjam_import_rule( PyObject * self, PyObject * args ) +{ + char * module; + char * rule; + PyObject * func; + PyObject * bjam_signature = NULL; + module_t * m; + RULE * r; + OBJECT * module_name; + OBJECT * rule_name; + + if ( !PyArg_ParseTuple( args, "ssO|O:import_rule", + &module, &rule, &func, &bjam_signature ) ) + return NULL; + + if ( !PyCallable_Check( func ) ) + { + PyErr_SetString( PyExc_RuntimeError, "Non-callable object passed to " + "bjam.import_rule" ); + return NULL; + } + + module_name = *module ? object_new( module ) : 0; + m = bindmodule( module_name ); + if ( module_name ) + object_free( module_name ); + rule_name = object_new( rule ); + new_rule_body( m, rule_name, function_python( func, bjam_signature ), 0 ); + object_free( rule_name ); + + Py_INCREF( Py_None ); + return Py_None; +} + + +/* + * Accepts four arguments: + * - an action name + * - an action body + * - a list of variable that will be bound inside the action + * - integer flags. + * Defines an action on bjam side. + */ + +PyObject * bjam_define_action( PyObject * self, PyObject * args ) +{ + char * name; + char * body; + module_t * m; + PyObject * bindlist_python; + int flags; + LIST * bindlist = L0; + int n; + int i; + OBJECT * name_str; + FUNCTION * body_func; + + if ( !PyArg_ParseTuple( args, "ssO!i:define_action", &name, &body, + &PyList_Type, &bindlist_python, &flags ) ) + return NULL; + + n = PyList_Size( bindlist_python ); + for ( i = 0; i < n; ++i ) + { + PyObject * next = PyList_GetItem( bindlist_python, i ); + if ( !PyString_Check( next ) ) + { + PyErr_SetString( PyExc_RuntimeError, "bind list has non-string " + "type" ); + return NULL; + } + bindlist = list_push_back( bindlist, object_new( PyString_AsString( next + ) ) ); + } + + name_str = object_new( name ); + body_func = function_compile_actions( body, constant_builtin, -1 ); + new_rule_actions( root_module(), name_str, body_func, bindlist, flags ); + function_free( body_func ); + object_free( name_str ); + + Py_INCREF( Py_None ); + return Py_None; +} + + +/* + * Returns the value of a variable in root Jam module. + */ + +PyObject * bjam_variable( PyObject * self, PyObject * args ) +{ + char * name; + LIST * value; + PyObject * result; + int i; + OBJECT * varname; + LISTITER iter; + LISTITER end; + + if ( !PyArg_ParseTuple( args, "s", &name ) ) + return NULL; + + varname = object_new( name ); + value = var_get( root_module(), varname ); + object_free( varname ); + iter = list_begin( value ); + end = list_end( value ); + + result = PyList_New( list_length( value ) ); + for ( i = 0; iter != end; iter = list_next( iter ), ++i ) + PyList_SetItem( result, i, PyString_FromString( object_str( list_item( + iter ) ) ) ); + + return result; +} + + +PyObject * bjam_backtrace( PyObject * self, PyObject * args ) +{ + PyObject * result = PyList_New( 0 ); + struct frame * f = frame_before_python_call; + + for ( ; (f = f->prev); ) + { + PyObject * tuple = PyTuple_New( 4 ); + char const * file; + int line; + char buf[ 32 ]; + string module_name[ 1 ]; + + get_source_line( f, &file, &line ); + sprintf( buf, "%d", line ); + string_new( module_name ); + if ( f->module->name ) + { + string_append( module_name, object_str( f->module->name ) ); + string_append( module_name, "." ); + } + + /* PyTuple_SetItem steals reference. */ + PyTuple_SetItem( tuple, 0, PyString_FromString( file ) ); + PyTuple_SetItem( tuple, 1, PyString_FromString( buf ) ); + PyTuple_SetItem( tuple, 2, PyString_FromString( module_name->value ) ); + PyTuple_SetItem( tuple, 3, PyString_FromString( f->rulename ) ); + + string_free( module_name ); + + PyList_Append( result, tuple ); + Py_DECREF( tuple ); + } + return result; +} + +PyObject * bjam_caller( PyObject * self, PyObject * args ) +{ + return PyString_FromString( frame_before_python_call->prev->module->name ? + object_str( frame_before_python_call->prev->module->name ) : "" ); +} + +#endif /* #ifdef HAVE_PYTHON */ + + +#ifdef HAVE_POPEN + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW64__) || defined(__MINGW32__) + #undef popen + #define popen windows_popen_wrapper + #undef pclose + #define pclose _pclose + + /* + * This wrapper is a workaround for a funny _popen() feature on Windows + * where it eats external quotes in some cases. The bug seems to be related + * to the quote stripping functionality used by the Windows cmd.exe + * interpreter when its /S is not specified. + * + * Cleaned up quote from the cmd.exe help screen as displayed on Windows XP + * SP3: + * + * 1. If all of the following conditions are met, then quote characters on + * the command line are preserved: + * + * - no /S switch + * - exactly two quote characters + * - no special characters between the two quote characters, where + * special is one of: &<>()@^| + * - there are one or more whitespace characters between the two quote + * characters + * - the string between the two quote characters is the name of an + * executable file. + * + * 2. Otherwise, old behavior is to see if the first character is a quote + * character and if so, strip the leading character and remove the last + * quote character on the command line, preserving any text after the + * last quote character. + * + * This causes some commands containing quotes not to be executed correctly. + * For example: + * + * "\Long folder name\aaa.exe" --name="Jurko" --no-surname + * + * would get its outermost quotes stripped and would be executed as: + * + * \Long folder name\aaa.exe" --name="Jurko --no-surname + * + * which would report an error about '\Long' not being a valid command. + * + * cmd.exe help seems to indicate it would be enough to add an extra space + * character in front of the command to avoid this but this does not work, + * most likely due to the shell first stripping all leading whitespace + * characters from the command. + * + * Solution implemented here is to quote the whole command in case it + * contains any quote characters. Note thought this will not work correctly + * should Windows ever 'fix' this feature. + * (03.06.2008.) (Jurko) + */ + static FILE * windows_popen_wrapper( char const * command, + char const * mode ) + { + int const extra_command_quotes_needed = !!strchr( command, '"' ); + string quoted_command; + FILE * result; + + if ( extra_command_quotes_needed ) + { + string_new( "ed_command ); + string_append( "ed_command, "\"" ); + string_append( "ed_command, command ); + string_append( "ed_command, "\"" ); + command = quoted_command.value; + } + + result = _popen( command, "r" ); + + if ( extra_command_quotes_needed ) + string_free( "ed_command ); + + return result; + } +#endif /* defined(_MSC_VER) || defined(__BORLANDC__) */ + + +LIST * builtin_shell( FRAME * frame, int flags ) +{ + LIST * command = lol_get( frame->args, 0 ); + LIST * result = L0; + string s; + int32_t ret; + char buffer[ 1024 ]; + FILE * p = NULL; + int exit_status = -1; + int exit_status_opt = 0; + int no_output_opt = 0; + int strip_eol_opt = 0; + + /* Process the variable args options. */ + { + int a = 1; + LIST * arg = lol_get( frame->args, a ); + for ( ; !list_empty( arg ); arg = lol_get( frame->args, ++a ) ) + { + if ( !strcmp( "exit-status", object_str( list_front( arg ) ) ) ) + exit_status_opt = 1; + else if ( !strcmp( "no-output", object_str( list_front( arg ) ) ) ) + no_output_opt = 1; + else if ( !strcmp("strip-eol", object_str( list_front( arg ) ) ) ) + strip_eol_opt = 1; + } + } + + /* The following fflush() call seems to be indicated as a workaround for a + * popen() bug on POSIX implementations related to synhronizing input + * stream positions for the called and the calling process. + */ + fflush( NULL ); + + p = popen( object_str( list_front( command ) ), "r" ); + if ( p == NULL ) + return L0; + + string_new( &s ); + + while ( ( ret = int32_t(fread( buffer, sizeof( char ), sizeof( buffer ) - 1, p )) ) > + 0 ) + { + buffer[ ret ] = 0; + if ( !no_output_opt ) + { + string_append( &s, buffer ); + } + + /* Explicit EOF check for systems with broken fread */ + if ( feof( p ) ) break; + } + + if ( strip_eol_opt ) + string_rtrim( &s ); + + exit_status = pclose( p ); + + /* The command output is returned first. */ + result = list_new( object_new( s.value ) ); + string_free( &s ); + + /* The command exit result next. */ + if ( exit_status_opt ) + { + if ( WIFEXITED( exit_status ) ) + exit_status = WEXITSTATUS( exit_status ); + else + exit_status = -1; + +#ifdef OS_VMS + /* Harmonize VMS success status with POSIX */ + if ( exit_status == 1 ) exit_status = EXIT_SUCCESS; +#endif + sprintf( buffer, "%d", exit_status ); + result = list_push_back( result, object_new( buffer ) ); + } + + return result; +} + +#else /* #ifdef HAVE_POPEN */ + +LIST * builtin_shell( FRAME * frame, int flags ) +{ + return L0; +} + +#endif /* #ifdef HAVE_POPEN */ + + +/* + * builtin_glob_archive() - GLOB_ARCHIVE rule + */ + +struct globbing2 +{ + LIST * patterns[ 2 ]; + LIST * results; + LIST * case_insensitive; +}; + + +static void builtin_glob_archive_back( void * closure, OBJECT * member, + LIST * symbols, int status, timestamp const * const time ) +{ + PROFILE_ENTER( BUILTIN_GLOB_ARCHIVE_BACK ); + + struct globbing2 * const globbing = (struct globbing2 *)closure; + PATHNAME f; + string buf[ 1 ]; + LISTITER iter; + LISTITER end; + LISTITER iter_symbols; + LISTITER end_symbols; + int matched = 0; + + /* Match member name. + */ + path_parse( object_str( member ), &f ); + + if ( !strcmp( f.f_member.ptr, "" ) ) + { + PROFILE_EXIT( BUILTIN_GLOB_ARCHIVE_BACK ); + return; + } + + string_new( buf ); + string_append_range( buf, f.f_member.ptr, f.f_member.ptr + f.f_member.len ); + + if ( globbing->case_insensitive ) + downcase_inplace( buf->value ); + + /* Glob with member patterns. If not matched, then match symbols. + */ + matched = 0; + iter = list_begin( globbing->patterns[ 0 ] ); + end = list_end( globbing->patterns[ 0 ] ); + for ( ; !matched && iter != end; + iter = list_next( iter ) ) + { + const char * pattern = object_str( list_item( iter ) ); + int match_exact = ( !has_wildcards( pattern ) ); + matched = ( match_exact ? + ( !strcmp( pattern, buf->value ) ) : + ( !glob( pattern, buf->value ) ) ); + } + + + /* Glob with symbol patterns, if requested. + */ + iter = list_begin( globbing->patterns[ 1 ] ); + end = list_end( globbing->patterns[ 1 ] ); + + if ( iter != end ) matched = 0; + + for ( ; !matched && iter != end; + iter = list_next( iter ) ) + { + const char * pattern = object_str( list_item( iter ) ); + int match_exact = ( !has_wildcards( pattern ) ); + + iter_symbols = list_begin( symbols ); + end_symbols = list_end( symbols ); + + for ( ; !matched && iter_symbols != end_symbols; + iter_symbols = list_next( iter_symbols ) ) + { + const char * symbol = object_str( list_item( iter_symbols ) ); + + string_copy( buf, symbol ); + if ( globbing->case_insensitive ) + downcase_inplace( buf->value ); + + matched = ( match_exact ? + ( !strcmp( pattern, buf->value ) ) : + ( !glob( pattern, buf->value ) ) ); + } + } + + if ( matched ) + { + globbing->results = list_push_back( globbing->results, + object_copy( member ) ); + } + + string_free( buf ); + + PROFILE_EXIT( BUILTIN_GLOB_ARCHIVE_BACK ); +} + + +LIST * builtin_glob_archive( FRAME * frame, int flags ) +{ + LIST * const l = lol_get( frame->args, 0 ); + LIST * const r1 = lol_get( frame->args, 1 ); + LIST * const r3 = lol_get( frame->args, 3 ); + + LISTITER iter; + LISTITER end; + struct globbing2 globbing; + + globbing.results = L0; + globbing.patterns[ 0 ] = r1; + globbing.patterns[ 1 ] = r3; + + globbing.case_insensitive = +# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_VMS ) + l; /* Always case-insensitive. */ +# else + lol_get( frame->args, 2 ); // r2 +# endif + + if ( globbing.case_insensitive ) + { + globbing.patterns[ 0 ] = downcase_list( globbing.patterns[ 0 ] ); + globbing.patterns[ 1 ] = downcase_list( globbing.patterns[ 1 ] ); + } + + iter = list_begin( l ); + end = list_end( l ); + for ( ; iter != end; iter = list_next( iter ) ) + file_archivescan( list_item( iter ), builtin_glob_archive_back, &globbing ); + + if ( globbing.case_insensitive ) + { + list_free( globbing.patterns[ 0 ] ); + list_free( globbing.patterns[ 1 ] ); + } + + return globbing.results; +} diff --git a/src/boost/tools/build/src/engine/builtins.h b/src/boost/tools/build/src/engine/builtins.h new file mode 100644 index 000000000..241a0d050 --- /dev/null +++ b/src/boost/tools/build/src/engine/builtins.h @@ -0,0 +1,74 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +#ifndef JAM_BUILTINS_H +# define JAM_BUILTINS_H + +# include "config.h" +# include "frames.h" + +/* + * builtins.h - compile parsed jam statements + */ + +void load_builtins(); +void init_set(); +void init_path(); +void init_regex(); +void init_property_set(); +void init_sequence(); +void init_order(); + +void property_set_done(); + +LIST *builtin_calc( FRAME * frame, int flags ); +LIST *builtin_depends( FRAME * frame, int flags ); +LIST *builtin_rebuilds( FRAME * frame, int flags ); +LIST *builtin_echo( FRAME * frame, int flags ); +LIST *builtin_exit( FRAME * frame, int flags ); +LIST *builtin_flags( FRAME * frame, int flags ); +LIST *builtin_glob( FRAME * frame, int flags ); +LIST *builtin_glob_recursive( FRAME * frame, int flags ); +LIST *builtin_subst( FRAME * frame, int flags ); +LIST *builtin_match( FRAME * frame, int flags ); +LIST *builtin_split_by_characters( FRAME * frame, int flags ); +LIST *builtin_hdrmacro( FRAME * frame, int flags ); +LIST *builtin_rulenames( FRAME * frame, int flags ); +LIST *builtin_varnames( FRAME * frame, int flags ); +LIST *builtin_delete_module( FRAME * frame, int flags ); +LIST *builtin_import( FRAME * frame, int flags ); +LIST *builtin_export( FRAME * frame, int flags ); +LIST *builtin_caller_module( FRAME * frame, int flags ); +LIST *builtin_backtrace( FRAME * frame, int flags ); +LIST *builtin_pwd( FRAME * frame, int flags ); +LIST *builtin_update( FRAME * frame, int flags ); +LIST *builtin_update_now( FRAME * frame, int flags ); +LIST *builtin_import_module( FRAME * frame, int flags ); +LIST *builtin_imported_modules( FRAME * frame, int flags ); +LIST *builtin_instance( FRAME * frame, int flags ); +LIST *builtin_sort( FRAME * frame, int flags ); +LIST *builtin_normalize_path( FRAME * frame, int flags ); +LIST *builtin_native_rule( FRAME * frame, int flags ); +LIST *builtin_has_native_rule( FRAME * frame, int flags ); +LIST *builtin_user_module( FRAME * frame, int flags ); +LIST *builtin_nearest_user_location( FRAME * frame, int flags ); +LIST *builtin_check_if_file( FRAME * frame, int flags ); +LIST *builtin_python_import_rule( FRAME * frame, int flags ); +LIST *builtin_shell( FRAME * frame, int flags ); +LIST *builtin_md5( FRAME * frame, int flags ); +LIST *builtin_file_open( FRAME * frame, int flags ); +LIST *builtin_pad( FRAME * frame, int flags ); +LIST *builtin_precious( FRAME * frame, int flags ); +LIST *builtin_self_path( FRAME * frame, int flags ); +LIST *builtin_makedir( FRAME * frame, int flags ); +LIST *builtin_readlink( FRAME * frame, int flags ); +LIST *builtin_glob_archive( FRAME * frame, int flags ); +LIST *builtin_debug_print_helper( FRAME * frame, int flags ); + +void backtrace( FRAME *frame ); +extern int last_update_now_status; + +#endif diff --git a/src/boost/tools/build/src/engine/bump_version.py b/src/boost/tools/build/src/engine/bump_version.py new file mode 100644 index 000000000..66f5f1c72 --- /dev/null +++ b/src/boost/tools/build/src/engine/bump_version.py @@ -0,0 +1,98 @@ +#!/usr/bin/python + +# This script is used to bump the bjam version. It takes a single argument, e.g +# +# ./bump_version.py 3.1.9 +# +# and updates all the necessary files. +# +# Copyright 2006 Rene Rivera. +# Copyright 2005-2006 Vladimir Prus. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + + +import os +import os.path +import re +import string +import sys + +srcdir = os.path.abspath(os.path.dirname(__file__)) +docdir = os.path.abspath(os.path.join(srcdir, "..", "doc")) + + +def edit(file, *replacements): + print(" '%s'..." % file) + f = open(file, 'r') + text = f.read() + f.close() + for (source, target) in replacements: + text, n = re.compile(source, re.MULTILINE).subn(target, text) + assert n > 0 + f = open(file, 'w') + f.write(text) + f.close() + + +def make_edits(ver): + ver03 = (list(ver) + [0] * 3)[0:3] + ver02 = ver03[0:2] + + join = lambda v, s : s.join(str(x) for x in v) + dotJoin = lambda v : join(v, ".") + + print("Setting version to %s" % str(ver03)) + + edit(os.path.join(srcdir, "boost-jam.spec"), + ('^(Version:) .*$', '\\1 %s' % dotJoin(ver03))) + + edit(os.path.join(srcdir, "build.jam"), + ('^(_VERSION_ =).* ;$', '\\1 %s ;' % join(ver03, " "))) + + edit(os.path.join(docdir, "bjam.qbk"), + ('(\[version).*(\])', '\\1: %s\\2' % dotJoin(ver03)), + ('(\[def :version:).*(\])', '\\1 %s\\2' % dotJoin(ver03))) + + edit(os.path.join(srcdir, "patchlevel.h"), + ('^(#define VERSION_MAJOR) .*$', '\\1 %s' % ver03[0]), + ('^(#define VERSION_MINOR) .*$', '\\1 %s' % ver03[1]), + ('^(#define VERSION_PATCH) .*$', '\\1 %s' % ver03[2]), + ('^(#define VERSION_MAJOR_SYM) .*$', '\\1 "%02d"' % ver03[0]), + ('^(#define VERSION_MINOR_SYM) .*$', '\\1 "%02d"' % ver03[1]), + ('^(#define VERSION_PATCH_SYM) .*$', '\\1 "%02d"' % ver03[2]), + ('^(#define VERSION) .*$', '\\1 "%s"' % dotJoin(ver)), + ('^(#define JAMVERSYM) .*$', '\\1 "JAMVERSION=%s"' % dotJoin(ver02))) + + +def main(): + if len(sys.argv) < 2: + print("Expect new version as argument.") + sys.exit(1) + if len(sys.argv) > 3: + print("Too many arguments.") + sys.exit(1) + + version = sys.argv[1].split(".") + if len(version) > 3: + print("Expect version argument in the format: <MAJOR>.<MINOR>.<PATCH>") + sys.exit(1) + + try: + version = list(int(x) for x in version) + except ValueError: + print("Version values must be valid integers.") + sys.exit(1) + + while version and version[-1] == 0: + version.pop() + + if not version: + print("At least one of the version values must be positive.") + sys.exit() + + make_edits(version) + + +if __name__ == '__main__': + main() diff --git a/src/boost/tools/build/src/engine/check_clib.cpp b/src/boost/tools/build/src/engine/check_clib.cpp new file mode 100644 index 000000000..158f81acf --- /dev/null +++ b/src/boost/tools/build/src/engine/check_clib.cpp @@ -0,0 +1,19 @@ +/* Copyright 2021 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* +This program is a compile test for support of clib use. +This is used by the build script to guess and check the compiler to build the engine with. +*/ + +// Some headers we depend on.. +#include <string.h> + + +int check_clib() +{ + { auto _ = strdup("-"); } + return 0; +} diff --git a/src/boost/tools/build/src/engine/check_cxx11.cpp b/src/boost/tools/build/src/engine/check_cxx11.cpp new file mode 100644 index 000000000..085547b26 --- /dev/null +++ b/src/boost/tools/build/src/engine/check_cxx11.cpp @@ -0,0 +1,31 @@ +/* Copyright 2020 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* +This program is a compile test for support of C++11. If it compiles +successfully some key parts of C++11 the B2 engine requires are +available. This is used by the build script to guess and check the +compiler to build the engine with. +*/ + +// Some headers we test... +#include <thread> +#include <memory> + + +int main() +{ + // Check for basic thread calls. + // [2020-08-19] Mingw-w64 with win32 threading model (as opposed to posix + // threading model) does not really have std::thread etc. Please see comments + // in sysinfo.cpp. + #ifndef _WIN32 + { auto _ = std::thread::hardware_concurrency(); } + #endif + + // [2021-08-07] We check the following C++11 features: brace initialization, + // unique_ptr. Plus the author's ability to memorize some digits. + { const std::unique_ptr <float> pf {new float {3.14159f}}; } +} diff --git a/src/boost/tools/build/src/engine/class.cpp b/src/boost/tools/build/src/engine/class.cpp new file mode 100644 index 000000000..09084c892 --- /dev/null +++ b/src/boost/tools/build/src/engine/class.cpp @@ -0,0 +1,192 @@ +/* + * Copyright Vladimir Prus 2003. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "class.h" + +#include "constants.h" +#include "frames.h" +#include "hash.h" +#include "lists.h" +#include "object.h" +#include "rules.h" +#include "jam_strings.h" +#include "variable.h" +#include "output.h" +#include "startup.h" + +#include <stdio.h> +#include <stdlib.h> + + +static struct hash * classes = 0; + + +static void check_defined( LIST * class_names ) +{ + LISTITER iter = list_begin( class_names ); + LISTITER const end = list_end( class_names ); + for ( ; iter != end; iter = list_next( iter ) ) + { + if ( !hash_find( classes, list_item( iter ) ) ) + { + out_printf( "Class %s is not defined\n", object_str( list_item( iter ) ) + ); + b2::clean_exit( b2::exit_result::failure ); + } + } +} + + +static OBJECT * class_module_name( OBJECT * declared_name ) +{ + string name[ 1 ]; + OBJECT * result; + + string_new( name ); + string_append( name, "class@" ); + string_append( name, object_str( declared_name ) ); + + result = object_new( name->value ); + string_free( name ); + + return result; +} + + +struct import_base_data +{ + OBJECT * base_name; + module_t * base_module; + module_t * class_module; +}; + + +static void import_base_rule( void * r_, void * d_ ) +{ + RULE * r = (RULE *)r_; + RULE * ir1; + RULE * ir2; + struct import_base_data * d = (struct import_base_data *)d_; + OBJECT * qname; + + string qualified_name[ 1 ]; + string_new ( qualified_name ); + string_append ( qualified_name, object_str( d->base_name ) ); + string_push_back( qualified_name, '.' ); + string_append ( qualified_name, object_str( r->name ) ); + qname = object_new( qualified_name->value ); + string_free( qualified_name ); + + ir1 = import_rule( r, d->class_module, r->name ); + ir2 = import_rule( r, d->class_module, qname ); + + object_free( qname ); + + /* Copy 'exported' flag. */ + ir1->exported = ir2->exported = r->exported; + + /* If we are importing a class method, localize it. */ + if ( ( r->module == d->base_module ) || ( r->module->class_module && + ( r->module->class_module == d->base_module ) ) ) + { + rule_localize( ir1, d->class_module ); + rule_localize( ir2, d->class_module ); + } +} + + +/* + * For each exported rule 'n', declared in class module for base, imports that + * rule in 'class' as 'n' and as 'base.n'. Imported rules are localized and + * marked as exported. + */ + +static void import_base_rules( module_t * class_, OBJECT * base ) +{ + OBJECT * module_name = class_module_name( base ); + module_t * base_module = bindmodule( module_name ); + LIST * imported; + struct import_base_data d; + d.base_name = base; + d.base_module = base_module; + d.class_module = class_; + object_free( module_name ); + + if ( base_module->rules ) + hashenumerate( base_module->rules, import_base_rule, &d ); + + imported = imported_modules( base_module ); + import_module( imported, class_ ); + list_free( imported ); +} + + +OBJECT * make_class_module( LIST * xname, LIST * bases, FRAME * frame ) +{ + OBJECT * name = class_module_name( list_front( xname ) ); + OBJECT * * pp; + module_t * class_module = 0; + int found; + + if ( !classes ) + classes = hashinit( sizeof( OBJECT * ), "classes" ); + + pp = (OBJECT * *)hash_insert( classes, list_front( xname ), &found ); + if ( !found ) + { + *pp = object_copy( list_front( xname ) ); + } + else + { + out_printf( "Class %s already defined\n", object_str( list_front( xname ) ) + ); + b2::clean_exit( b2::exit_result::failure ); + } + check_defined( bases ); + + class_module = bindmodule( name ); + + { + /* + Initialize variables that B2 inserts in every object. + We want to avoid creating the object's hash if it isn't needed. + */ + int num = class_module->num_fixed_variables; + module_add_fixed_var( class_module, constant_name, &num ); + module_add_fixed_var( class_module, constant_class, &num ); + module_set_fixed_variables( class_module, num ); + } + + var_set( class_module, constant_name, xname, VAR_SET ); + var_set( class_module, constant_bases, bases, VAR_SET ); + + { + LISTITER iter = list_begin( bases ); + LISTITER const end = list_end( bases ); + for ( ; iter != end; iter = list_next( iter ) ) + import_base_rules( class_module, list_item( iter ) ); + } + + return name; +} + + +static void free_class( void * xclass, void * data ) +{ + object_free( *(OBJECT * *)xclass ); +} + + +void class_done( void ) +{ + if ( classes ) + { + hashenumerate( classes, free_class, (void *)0 ); + hashdone( classes ); + classes = 0; + } +} diff --git a/src/boost/tools/build/src/engine/class.h b/src/boost/tools/build/src/engine/class.h new file mode 100644 index 000000000..6272ff454 --- /dev/null +++ b/src/boost/tools/build/src/engine/class.h @@ -0,0 +1,15 @@ +/* Copyright Vladimir Prus 2003. Distributed under the Boost */ +/* Software License, Version 1.0. (See accompanying */ +/* file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) */ + +#ifndef CLASS_H_VP_2003_08_01 +#define CLASS_H_VP_2003_08_01 + +#include "config.h" +#include "lists.h" +#include "frames.h" + +OBJECT * make_class_module( LIST * xname, LIST * bases, FRAME * frame ); +void class_done( void ); + +#endif diff --git a/src/boost/tools/build/src/engine/command.cpp b/src/boost/tools/build/src/engine/command.cpp new file mode 100644 index 000000000..75837d49d --- /dev/null +++ b/src/boost/tools/build/src/engine/command.cpp @@ -0,0 +1,120 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * command.c - maintain lists of commands + */ + +#include "jam.h" +#include "command.h" + +#include "lists.h" +#include "rules.h" + +#include <assert.h> + + +/* + * cmdlist_append_cmd + */ +CMDLIST * cmdlist_append_cmd( CMDLIST * l, CMD * cmd ) +{ + CMDLIST * result = (CMDLIST *)BJAM_MALLOC( sizeof( CMDLIST ) ); + result->iscmd = 1; + result->next = l; + result->impl.cmd = cmd; + return result; +} + +CMDLIST * cmdlist_append_target( CMDLIST * l, TARGET * t ) +{ + CMDLIST * result = (CMDLIST *)BJAM_MALLOC( sizeof( CMDLIST ) ); + result->iscmd = 0; + result->next = l; + result->impl.t = t; + return result; +} + +void cmdlist_free( CMDLIST * l ) +{ + while ( l ) + { + CMDLIST * tmp = l->next; + BJAM_FREE( l ); + l = tmp; + } +} + +/* + * cmd_new() - return a new CMD. + */ + +CMD * cmd_new( RULE * rule, LIST * targets, LIST * sources, LIST * shell ) +{ + CMD * cmd = b2::jam::make_ptr<CMD>(); + FRAME frame[ 1 ]; + + assert( cmd ); + cmd->rule = rule; + cmd->shell = shell; + cmd->next = 0; + cmd->noop = 0; + cmd->asynccnt = 1; + cmd->status = 0; + cmd->lock = NULL; + cmd->unlock = NULL; + + lol_init( &cmd->args ); + lol_add( &cmd->args, targets ); + lol_add( &cmd->args, sources ); + string_new( cmd->buf ); + + frame_init( frame ); + frame->module = rule->module; + lol_init( frame->args ); + lol_add( frame->args, list_copy( targets ) ); + lol_add( frame->args, list_copy( sources ) ); + function_run_actions( rule->actions->command, frame, stack_global(), + cmd->buf ); + frame_free( frame ); + + return cmd; +} + + +/* + * cmd_free() - free a CMD + */ + +void cmd_free( CMD * cmd ) +{ + cmdlist_free( cmd->next ); + lol_free( &cmd->args ); + list_free( cmd->shell ); + string_free( cmd->buf ); + b2::jam::free_ptr( cmd ); +} + + +/* + * cmd_release_targets_and_shell() + * + * Makes the CMD release its hold on its targets & shell lists and forget + * about them. Useful in case caller still has references to those lists and + * wants to reuse them after freeing the CMD object. + */ + +void cmd_release_targets_and_shell( CMD * cmd ) +{ + cmd->args.list[ 0 ] = L0; /* targets */ + cmd->shell = L0; /* shell */ +} diff --git a/src/boost/tools/build/src/engine/command.h b/src/boost/tools/build/src/engine/command.h new file mode 100644 index 000000000..9163d91ac --- /dev/null +++ b/src/boost/tools/build/src/engine/command.h @@ -0,0 +1,108 @@ +/* + * Copyright 1994 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * command.h - the CMD structure and routines to manipulate them + * + * Both ACTION and CMD contain a rule, targets, and sources. An + * ACTION describes a rule to be applied to the given targets and + * sources; a CMD is what actually gets executed by the shell. The + * differences are due to: + * + * ACTIONS must be combined if 'actions together' is given. + * ACTIONS must be split if 'actions piecemeal' is given. + * ACTIONS must have current sources omitted for 'actions updated'. + * + * The CMD datatype holds a single command that is to be executed + * against a target, and they can chain together to represent the + * full collection of commands used to update a target. + * + * Structures: + * + * CMD - an action, ready to be formatted into a buffer and executed. + * + * External routines: + * + * cmd_new() - return a new CMD or 0 if too many args. + * cmd_free() - delete CMD and its parts. + * cmd_next() - walk the CMD chain. + * cmd_release_targets_and_shell() - CMD forgets about its targets & shell. + */ + + +/* + * CMD - an action, ready to be formatted into a buffer and executed. + */ + +#ifndef COMMAND_SW20111118_H +#define COMMAND_SW20111118_H + +#include "config.h" +#include "lists.h" +#include "mem.h" +#include "rules.h" +#include "jam_strings.h" + + +typedef struct _cmd CMD; + +/* + * A list whose elements are either TARGETS or CMDS. + * CMDLIST is used only by CMD. A TARGET means that + * the CMD is the last updating action required to + * build the target. A CMD is the next CMD required + * to build the same target. (Note that a single action + * can update more than one target, so the CMDs form + * a DAG, not a straight linear list.) + */ +typedef struct _cmdlist { + struct _cmdlist * next; + union { + CMD * cmd; + TARGET * t; + } impl; + char iscmd; +} CMDLIST; + +CMDLIST * cmdlist_append_cmd( CMDLIST *, CMD * ); +CMDLIST * cmdlist_append_target( CMDLIST *, TARGET * ); +void cmd_list_free( CMDLIST * ); + +struct _cmd +{ + CMDLIST * next; + RULE * rule; /* rule->actions contains shell script */ + LIST * shell; /* $(JAMSHELL) value */ + LOL args; /* LISTs for $(<), $(>) */ + string buf[ 1 ]; /* actual commands */ + int noop; /* no-op commands should be faked instead of executed */ + int asynccnt; /* number of outstanding dependencies */ + targets_ptr lock; /* semaphores that are required by this cmd. */ + targets_uptr unlock; /* semaphores that are released when this cmd finishes. */ + char status; /* the command status */ +}; + +CMD * cmd_new +( + RULE * rule, /* rule (referenced) */ + LIST * targets, /* $(<) (ownership transferred) */ + LIST * sources, /* $(>) (ownership transferred) */ + LIST * shell /* $(JAMSHELL) (ownership transferred) */ +); + +void cmd_release_targets_and_shell( CMD * ); + +void cmd_free( CMD * ); + +#define cmd_next( c ) ((c)->next) + +#endif diff --git a/src/boost/tools/build/src/engine/compile.cpp b/src/boost/tools/build/src/engine/compile.cpp new file mode 100644 index 000000000..daeb3d2f9 --- /dev/null +++ b/src/boost/tools/build/src/engine/compile.cpp @@ -0,0 +1,231 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * compile.c - compile parsed jam statements + * + * External routines: + * evaluate_rule() - execute a rule invocation + * + * Internal routines: + * debug_compile() - printf with indent to show rule expansion + */ + +#include "jam.h" +#include "compile.h" + +#include "builtins.h" +#include "class.h" +#include "constants.h" +#include "hash.h" +#include "hdrmacro.h" +#include "make.h" +#include "modules.h" +#include "parse.h" +#include "rules.h" +#include "search.h" +#include "jam_strings.h" +#include "variable.h" +#include "output.h" + +#include <assert.h> +#include <stdarg.h> +#include <string.h> + + +static void debug_compile( int which, char const * s, FRAME * ); + +/* Internal functions from builtins.c */ +void backtrace( FRAME * ); +void backtrace_line( FRAME * ); +void print_source_line( FRAME * ); +void unknown_rule( FRAME *, char const * key, module_t *, OBJECT * rule_name ); + + +/* + * evaluate_rule() - execute a rule invocation + */ + +LIST * evaluate_rule( RULE * rule, OBJECT * rulename, FRAME * frame ) +{ + LIST * result = L0; + profile_frame prof[ 1 ]; + module_t * prev_module = frame->module; + + if ( DEBUG_COMPILE ) + { + /* Try hard to indicate in which module the rule is going to execute. */ + char buf[ 256 ] = ""; + if ( rule->module->name ) + { + strncat( buf, object_str( rule->module->name ), sizeof( buf ) - + 1 ); + strncat( buf, ".", sizeof( buf ) - 1 ); + if ( strncmp( buf, object_str( rule->name ), strlen( buf ) ) == 0 ) + { + buf[ 0 ] = 0; + } + } + strncat( buf, object_str( rule->name ), sizeof( buf ) - 1 ); + debug_compile( 1, buf, frame ); + + lol_print( frame->args ); + out_printf( "\n" ); + } + + if ( rule->procedure && rule->module != prev_module ) + { + /* Propagate current module to nested rule invocations. */ + frame->module = rule->module; + } + + /* Record current rule name in frame. */ + if ( rule->procedure ) + { + frame->rulename = object_str( rulename ); + /* And enter record profile info. */ + if ( DEBUG_PROFILE ) + profile_enter( function_rulename( rule->procedure ), prof ); + } + + /* Check traditional targets $(<) and sources $(>). */ + if ( !rule->actions && !rule->procedure ) + unknown_rule( frame, NULL, frame->module, rulename ); + + /* If this rule will be executed for updating the targets then construct the + * action for make(). + */ + if ( rule->actions ) + { + targets_ptr t; + + /* The action is associated with this instance of this rule. */ + ACTION * const action = b2::jam::make_ptr<ACTION>(); + + action->rule = rule; + action->targets.reset(); targetlist( action->targets, lol_get( frame->args, 0 ) ); + action->sources.reset(); targetlist( action->sources, lol_get( frame->args, 1 ) ); + action->refs = 1; + + /* If we have a group of targets all being built using the same action + * and any of these targets is updated, then we have to consider them + * all to be out-dated. We do this by adding a REBUILDS in both directions + * between the first target and all the other targets. + */ + if ( action->targets ) + { + TARGET * const t0 = action->targets->target; + for ( t = action->targets->next.get(); t; t = t->next.get() ) + { + targetentry( t->target->rebuilds, t0 ); + targetentry( t0->rebuilds, t->target ); + } + } + + /* Append this action to the actions of each target. */ + for ( t = action->targets.get(); t; t = t->next.get() ) + t->target->actions = actionlist( t->target->actions, action ); + + action_free( action ); + } + + /* Now recursively compile any parse tree associated with this rule. + * function_refer()/function_free() call pair added to ensure the rule does + * not get freed while in use. + */ + if ( rule->procedure ) + { + auto function = b2::jam::make_unique_bare_jptr( rule->procedure, function_refer, function_free ); + result = function_run( function.get(), frame, stack_global() ); + } + + if ( DEBUG_PROFILE && rule->procedure ) + profile_exit( prof ); + + if ( DEBUG_COMPILE ) + debug_compile( -1, 0, frame ); + + return result; +} + + +/* + * Call the given rule with the specified parameters. The parameters should be + * of type LIST* and end with a NULL pointer. This differs from 'evaluate_rule' + * in that frame for the called rule is prepared inside 'call_rule'. + * + * This function is useful when a builtin rule (in C) wants to call another rule + * which might be implemented in Jam. + */ + +LIST * call_rule( OBJECT * rulename, FRAME * caller_frame, ... ) +{ + va_list va; + LIST * result; + + FRAME inner[ 1 ]; + frame_init( inner ); + inner->prev = caller_frame; + inner->prev_user = caller_frame->module->user_module + ? caller_frame + : caller_frame->prev_user; + inner->module = caller_frame->module; + + va_start( va, caller_frame ); + for ( ; ; ) + { + LIST * const l = va_arg( va, LIST * ); + if ( !l ) + break; + lol_add( inner->args, l ); + } + va_end( va ); + + result = evaluate_rule( bindrule( rulename, inner->module ), rulename, inner ); + + frame_free( inner ); + + return result; +} + + +/* + * debug_compile() - printf with indent to show rule expansion + */ + +static void debug_compile( int which, char const * s, FRAME * frame ) +{ + static int level = 0; + static char indent[ 36 ] = ">>>>|>>>>|>>>>|>>>>|>>>>|>>>>|>>>>|"; + + if ( which >= 0 ) + { + int i; + + print_source_line( frame ); + + i = ( level + 1 ) * 2; + while ( i > 35 ) + { + out_puts( indent ); + i -= 35; + } + + out_printf( "%*.*s ", i, i, indent ); + } + + if ( s ) + out_printf( "%s ", s ); + + level += which; +} diff --git a/src/boost/tools/build/src/engine/compile.h b/src/boost/tools/build/src/engine/compile.h new file mode 100644 index 000000000..72927810e --- /dev/null +++ b/src/boost/tools/build/src/engine/compile.h @@ -0,0 +1,60 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * compile.h - compile parsed jam statements + */ + +#ifndef COMPILE_DWA20011022_H +#define COMPILE_DWA20011022_H + +#include "config.h" +#include "frames.h" +#include "lists.h" +#include "object.h" +#include "rules.h" + +void compile_builtins(); + +LIST * evaluate_rule( RULE * rule, OBJECT * rulename, FRAME * ); +LIST * call_rule( OBJECT * rulename, FRAME * caller_frame, ... ); + +/* Flags for compile_set(), etc */ + +#define ASSIGN_SET 0x00 /* = assign variable */ +#define ASSIGN_APPEND 0x01 /* += append variable */ +#define ASSIGN_DEFAULT 0x02 /* set only if unset */ + +/* Flags for compile_setexec() */ + +#define EXEC_UPDATED 0x01 /* executes updated */ +#define EXEC_TOGETHER 0x02 /* executes together */ +#define EXEC_IGNORE 0x04 /* executes ignore */ +#define EXEC_QUIETLY 0x08 /* executes quietly */ +#define EXEC_PIECEMEAL 0x10 /* executes piecemeal */ +#define EXEC_EXISTING 0x20 /* executes existing */ + +/* Conditions for compile_if() */ + +#define EXPR_NOT 0 /* ! cond */ +#define EXPR_AND 1 /* cond && cond */ +#define EXPR_OR 2 /* cond || cond */ +#define EXPR_EXISTS 3 /* arg */ +#define EXPR_EQUALS 4 /* arg = arg */ +#define EXPR_NOTEQ 5 /* arg != arg */ +#define EXPR_LESS 6 /* arg < arg */ +#define EXPR_LESSEQ 7 /* arg <= arg */ +#define EXPR_MORE 8 /* arg > arg */ +#define EXPR_MOREEQ 9 /* arg >= arg */ +#define EXPR_IN 10 /* arg in arg */ + +#endif diff --git a/src/boost/tools/build/src/engine/config.h b/src/boost/tools/build/src/engine/config.h new file mode 100644 index 000000000..863f1aa77 --- /dev/null +++ b/src/boost/tools/build/src/engine/config.h @@ -0,0 +1,60 @@ +#ifndef B2_CONFIG_H +#define B2_CONFIG_H + +/* +Copyright 2002-2021 Rene Rivera. +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or copy at +https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#define OPT_HEADER_CACHE_EXT 1 +#define OPT_GRAPH_DEBUG_EXT 1 +#define OPT_SEMAPHORE 1 +#define OPT_AT_FILES 1 +#define OPT_DEBUG_PROFILE 1 +#define JAM_DEBUGGER 1 +#define OPT_FIX_TARGET_VARIABLES_EXT 1 +#define OPT_IMPROVED_PATIENCE_EXT 1 +// #define BJAM_NO_MEM_CACHE 1 + +// Autodetect various operating systems.. + +#if defined(_WIN32) || defined(_WIN64) || \ + defined(__WIN32__) || defined(__TOS_WIN__) || \ + defined(__WINDOWS__) + #define NT 1 +#endif + +#if defined(__VMS) || defined(__VMS_VER) + #if !defined(VMS) + #define VMS 1 + #endif +#endif + +// To work around QEMU failures on mixed mode situations (32 vs 64) we need to +// enable partial LFS support in system headers. And we need to do this before +// any system headers are included. + +#if !defined(NT) && !defined(VMS) +# define _FILE_OFFSET_BITS 64 +#endif + +// Correct missing types in some earlier compilers.. + +#include <stdint.h> +#ifndef INT32_MIN + +// VS 2013 is barely C++11/C99. And opts to not provide specific sized int types. +// Provide a generic implementation of the sizes we use. +#if UINT_MAX == 0xffffffff +typedef int int32_t; +#elif (USHRT_MAX == 0xffffffff) +typedef short int32_t; +#elif ULONG_MAX == 0xffffffff +typedef long int32_t; +#endif + +#endif + +#endif diff --git a/src/boost/tools/build/src/engine/config_toolset.bat b/src/boost/tools/build/src/engine/config_toolset.bat new file mode 100644 index 000000000..48ccd3aaf --- /dev/null +++ b/src/boost/tools/build/src/engine/config_toolset.bat @@ -0,0 +1,238 @@ +@ECHO OFF + +REM ~ Copyright 2002-2018 Rene Rivera. +REM ~ Distributed under the Boost Software License, Version 1.0. +REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +:Start +REM Setup the toolset command and options. +if "_%B2_TOOLSET%_" == "_msvc_" call :Config_MSVC +if "_%B2_TOOLSET%_" == "_vc12_" call :Config_VC12 +if "_%B2_TOOLSET%_" == "_vc14_" call :Config_VC14 +if "_%B2_TOOLSET%_" == "_vc141_" call :Config_VC141 +if "_%B2_TOOLSET%_" == "_vc142_" call :Config_VC142 +if "_%B2_TOOLSET%_" == "_vc143_" call :Config_VC143 +if "_%B2_TOOLSET%_" == "_borland_" call :Config_BORLAND +if "_%B2_TOOLSET%_" == "_como_" call :Config_COMO +if "_%B2_TOOLSET%_" == "_gcc_" call :Config_GCC +if "_%B2_TOOLSET%_" == "_clang_" call :Config_CLANG +if "_%B2_TOOLSET%_" == "_gcc-nocygwin_" call :Config_GCC_NOCYGWIN +if "_%B2_TOOLSET%_" == "_intel-win32_" call :Config_INTEL_WIN32 +if "_%B2_TOOLSET%_" == "_mingw_" call :Config_MINGW +exit /b %errorlevel% + +:Call_If_Exists +ECHO Call_If_Exists %* +if EXIST %1 call %* +goto :eof + +:Config_MSVC +if not defined CXX ( set "CXX=cl" ) +if NOT "_%MSVCDir%_" == "__" ( + set "B2_TOOLSET_ROOT=%MSVCDir%\" + ) +call :Call_If_Exists "%B2_TOOLSET_ROOT%bin\VCVARS32.BAT" +if not "_%B2_TOOLSET_ROOT%_" == "__" ( + set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%" + ) +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VC11 +if not defined CXX ( set "CXX=cl" ) +if NOT "_%VS110COMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\" + ) +if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%VCVARSALL.BAT" %B2_BUILD_ARGS% +if NOT "_%B2_TOOLSET_ROOT%_" == "__" ( + if "_%VCINSTALLDIR%_" == "__" ( + set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%" + ) ) +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VC12 +if not defined CXX ( set "CXX=cl" ) +if NOT "_%VS120COMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\" + ) + +if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE% +set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH% + +if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%VCVARSALL.BAT" %B2_BUILD_ARGS% +if NOT "_%B2_TOOLSET_ROOT%_" == "__" ( + if "_%VCINSTALLDIR%_" == "__" ( + set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%" + ) ) +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VC14 +if not defined CXX ( set "CXX=cl" ) +if "_%B2_TOOLSET_ROOT%_" == "__" ( + if NOT "_%VS140COMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VS140COMNTOOLS%..\..\VC\" + )) + +if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE% +set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH% + +if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%VCVARSALL.BAT" %B2_BUILD_ARGS% +if NOT "_%B2_TOOLSET_ROOT%_" == "__" ( + if "_%VCINSTALLDIR%_" == "__" ( + set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%" + ) ) +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VC141 +if not defined CXX ( set "CXX=cl" ) +call vswhere_usability_wrapper.cmd +REM Reset ERRORLEVEL since from now on it's all based on ENV vars +ver > nul 2> nul +if "_%B2_TOOLSET_ROOT%_" == "__" ( + if NOT "_%VS150COMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VS150COMNTOOLS%..\..\VC\" + )) + +if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE% +set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH% + +REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists. +pushd %CD% +if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS% +popd +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VC142 +if not defined CXX ( set "CXX=cl" ) +call vswhere_usability_wrapper.cmd +REM Reset ERRORLEVEL since from now on it's all based on ENV vars +ver > nul 2> nul +if "_%B2_TOOLSET_ROOT%_" == "__" ( + if NOT "_%VS160COMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VS160COMNTOOLS%..\..\VC\" + )) + +if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE% +set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH% + +REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists. +pushd %CD% +if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS% +popd +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VC143 +if not defined CXX ( set "CXX=cl" ) +call vswhere_usability_wrapper.cmd +REM Reset ERRORLEVEL since from now on it's all based on ENV vars +ver > nul 2> nul +if "_%B2_TOOLSET_ROOT%_" == "__" ( + if NOT "_%VS170COMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VS170COMNTOOLS%..\..\VC\" + )) + +if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE% +set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH% + +REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists. +pushd %CD% +if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS% +popd +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_VCUNK +if NOT "_%B2_TOOLSET%_" == "_vcunk_" goto Skip_VCUNK +call vswhere_usability_wrapper.cmd +REM Reset ERRORLEVEL since from now on it's all based on ENV vars +ver > nul 2> nul +if "_%B2_TOOLSET_ROOT%_" == "__" ( + if NOT "_%VSUNKCOMNTOOLS%_" == "__" ( + set "B2_TOOLSET_ROOT=%VSUNKCOMNTOOLS%..\..\VC\" + )) + +if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE% +set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH% + +REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists. +pushd %CD% +if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS% +popd +set "B2_CXX="%CXX%" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc" +set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib" +set "_known_=1" +goto :eof + +:Config_BORLAND +if not defined CXX ( set "CXX=bcc32c" ) +if "_%B2_TOOLSET_ROOT%_" == "__" ( + call guess_toolset.bat test_path bcc32c.exe ) +if "_%B2_TOOLSET_ROOT%_" == "__" ( + if not errorlevel 1 ( + set "B2_TOOLSET_ROOT=%FOUND_PATH%..\" + ) ) +if not "_%B2_TOOLSET_ROOT%_" == "__" ( + set "PATH=%B2_TOOLSET_ROOT%Bin;%PATH%" + ) +set "B2_CXX="%CXX%" -tC -P -O2 -w- -I"%B2_TOOLSET_ROOT%Include" -L"%B2_TOOLSET_ROOT%Lib" -eb2" +set "_known_=1" +goto :eof + +:Config_COMO +if not defined CXX ( set "CXX=como" ) +set "B2_CXX="%CXX%" --inlining -o b2.exe" +set "_known_=1" +goto :eof + +:Config_GCC +if not defined CXX ( set "CXX=g++" ) +set "B2_CXX="%CXX%" -x c++ -std=c++11 -s -O3 -o b2.exe -D_GNU_SOURCE" +set "_known_=1" +goto :eof + +:Config_CLANG +if not defined CXX ( set "CXX=clang++" ) +set "B2_CXX="%CXX%" -x c++ -std=c++11 -s -O3 -o b2.exe" +set "_known_=1" +goto :eof + +:Config_GCC_NOCYGWIN +if not defined CXX ( set "CXX=g++" ) +set "B2_CXX="%CXX%" -x c++ -std=c++11 -s -O3 -mno-cygwin -o b2.exe" +set "_known_=1" +goto :eof + +:Config_INTEL_WIN32 +if not defined CXX ( set "CXX=icl" ) +set "B2_CXX="%CXX%" /nologo /MT /O2 /Ob2 /Gy /GF /GA /GB /Feb2" +set "_known_=1" +goto :eof + +:Config_MINGW +if not defined CXX ( set "CXX=g++" ) +if not "_%B2_TOOLSET_ROOT%_" == "__" ( + set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%" + ) +for /F "delims=" %%I in ("%CXX%") do set "PATH=%PATH%;%%~dpI" +set "B2_CXX="%CXX%" -x c++ -std=c++11 -s -O3 -o b2.exe" +set "_known_=1" +goto :eof diff --git a/src/boost/tools/build/src/engine/constants.cpp b/src/boost/tools/build/src/engine/constants.cpp new file mode 100644 index 000000000..c64ea3b63 --- /dev/null +++ b/src/boost/tools/build/src/engine/constants.cpp @@ -0,0 +1,199 @@ +/* + * Copyright 2011 Steven Watanabe + * Copyright 2020 René Ferdinand Rivera Morell + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * constants.c - constant objects + * + * External functions: + * + * constants_init() - initialize constants + * constants_done() - free constants + * + */ + +#include "constants.h" + + +void constants_init( void ) +{ + constant_empty = object_new( "" ); + constant_dot = object_new( "." ); + constant_plus = object_new( "+" ); + constant_star = object_new( "*" ); + constant_question_mark = object_new( "?" ); + constant_ok = object_new( "ok" ); + constant_true = object_new( "true" ); + constant_name = object_new( "__name__" ); + constant_bases = object_new( "__bases__" ); + constant_class = object_new( "__class__" ); + constant_typecheck = object_new( ".typecheck" ); + constant_builtin = object_new( "(builtin)" ); + constant_HCACHEFILE = object_new( "HCACHEFILE" ); + constant_HCACHEMAXAGE = object_new( "HCACHEMAXAGE" ); + constant_HDRSCAN = object_new( "HDRSCAN" ); + constant_HDRRULE = object_new( "HDRRULE" ); + constant_BINDRULE = object_new( "BINDRULE" ); + constant_LOCATE = object_new( "LOCATE" ); + constant_SEARCH = object_new( "SEARCH" ); + constant_JAM_SEMAPHORE = object_new( "JAM_SEMAPHORE" ); + constant_TIMING_RULE = object_new( "__TIMING_RULE__" ); + constant_ACTION_RULE = object_new( "__ACTION_RULE__" ); + constant_JAMSHELL = object_new( "JAMSHELL" ); + constant_TMPDIR = object_new( "TMPDIR" ); + constant_TMPNAME = object_new( "TMPNAME" ); + constant_TMPFILE = object_new( "TMPFILE" ); + constant_STDOUT = object_new( "STDOUT" ); + constant_STDERR = object_new( "STDERR" ); + constant_JAMDATE = object_new( "JAMDATE" ); + constant_JAM_TIMESTAMP_RESOLUTION = object_new( "JAM_TIMESTAMP_RESOLUTION" ); + constant_JAM_VERSION = object_new( "JAM_VERSION" ); + constant_JAMUNAME = object_new( "JAMUNAME" ); + constant_ENVIRON = object_new( ".ENVIRON" ); + constant_ARGV = object_new( "ARGV" ); + constant_all = object_new( "all" ); + constant_PARALLELISM = object_new( "PARALLELISM" ); + constant_KEEP_GOING = object_new( "KEEP_GOING" ); + constant_other = object_new( "[OTHER]" ); + constant_total = object_new( "[TOTAL]" ); + constant_FILE_DIRSCAN = object_new( "FILE_DIRSCAN" ); + constant_MAIN = object_new( "MAIN" ); + constant_MAIN_MAKE = object_new( "MAIN_MAKE" ); + constant_MAKE_MAKE0 = object_new( "MAKE_MAKE0" ); + constant_MAKE_MAKE1 = object_new( "MAKE_MAKE1" ); + constant_MAKE_MAKE0SORT = object_new( "MAKE_MAKE0SORT" ); + constant_BINDMODULE = object_new( "BINDMODULE" ); + constant_IMPORT_MODULE = object_new( "IMPORT_MODULE" ); + constant_BUILTIN_GLOB_BACK = object_new( "BUILTIN_GLOB_BACK" ); + constant_timestamp = object_new( "timestamp" ); + constant_python = object_new("__python__"); + constant_python_interface = object_new( "python_interface" ); + constant_extra_pythonpath = object_new( "EXTRA_PYTHONPATH" ); + constant_MAIN_PYTHON = object_new( "MAIN_PYTHON" ); + constant_BUILTIN_GLOB_ARCHIVE_BACK= object_new( "BUILTIN_GLOB_ARCHIVE_BACK" ); + constant_FILE_ARCHIVESCAN = object_new( "FILE_ARCHIVESCAN" ); + + constant_RESPONSE_FILE_SUB = object_new( "RESPONSE_FILE_SUB" ); +} + +void constants_done( void ) +{ + object_free( constant_empty ); + object_free( constant_dot ); + object_free( constant_plus ); + object_free( constant_star ); + object_free( constant_question_mark ); + object_free( constant_ok ); + object_free( constant_true ); + object_free( constant_name ); + object_free( constant_bases ); + object_free( constant_class ); + object_free( constant_typecheck ); + object_free( constant_builtin ); + object_free( constant_HCACHEFILE ); + object_free( constant_HCACHEMAXAGE ); + object_free( constant_HDRSCAN ); + object_free( constant_HDRRULE ); + object_free( constant_BINDRULE ); + object_free( constant_LOCATE ); + object_free( constant_SEARCH ); + object_free( constant_JAM_SEMAPHORE ); + object_free( constant_TIMING_RULE ); + object_free( constant_ACTION_RULE ); + object_free( constant_JAMSHELL ); + object_free( constant_TMPDIR ); + object_free( constant_TMPNAME ); + object_free( constant_TMPFILE ); + object_free( constant_STDOUT ); + object_free( constant_STDERR ); + object_free( constant_JAMDATE ); + object_free( constant_JAM_TIMESTAMP_RESOLUTION ); + object_free( constant_JAM_VERSION ); + object_free( constant_JAMUNAME ); + object_free( constant_ENVIRON ); + object_free( constant_ARGV ); + object_free( constant_all ); + object_free( constant_PARALLELISM ); + object_free( constant_KEEP_GOING ); + object_free( constant_other ); + object_free( constant_total ); + object_free( constant_FILE_DIRSCAN ); + object_free( constant_MAIN ); + object_free( constant_MAIN_MAKE ); + object_free( constant_MAKE_MAKE0 ); + object_free( constant_MAKE_MAKE1 ); + object_free( constant_MAKE_MAKE0SORT ); + object_free( constant_BINDMODULE ); + object_free( constant_IMPORT_MODULE ); + object_free( constant_BUILTIN_GLOB_BACK ); + object_free( constant_timestamp ); + object_free( constant_python ); + object_free( constant_python_interface ); + object_free( constant_extra_pythonpath ); + object_free( constant_MAIN_PYTHON ); + object_free( constant_FILE_ARCHIVESCAN ); + object_free( constant_BUILTIN_GLOB_ARCHIVE_BACK ); + + object_free( constant_RESPONSE_FILE_SUB ); +} + +OBJECT * constant_empty; +OBJECT * constant_dot; +OBJECT * constant_plus; +OBJECT * constant_star; +OBJECT * constant_question_mark; +OBJECT * constant_ok; +OBJECT * constant_true; +OBJECT * constant_name; +OBJECT * constant_bases; +OBJECT * constant_class; +OBJECT * constant_typecheck; +OBJECT * constant_builtin; +OBJECT * constant_HCACHEFILE; +OBJECT * constant_HCACHEMAXAGE; +OBJECT * constant_HDRSCAN; +OBJECT * constant_HDRRULE; +OBJECT * constant_BINDRULE; +OBJECT * constant_LOCATE; +OBJECT * constant_SEARCH; +OBJECT * constant_JAM_SEMAPHORE; +OBJECT * constant_TIMING_RULE; +OBJECT * constant_ACTION_RULE; +OBJECT * constant_JAMSHELL; +OBJECT * constant_TMPDIR; +OBJECT * constant_TMPNAME; +OBJECT * constant_TMPFILE; +OBJECT * constant_STDOUT; +OBJECT * constant_STDERR; +OBJECT * constant_JAMDATE; +OBJECT * constant_JAM_VERSION; +OBJECT * constant_JAMUNAME; +OBJECT * constant_ENVIRON; +OBJECT * constant_ARGV; +OBJECT * constant_all; +OBJECT * constant_PARALLELISM; +OBJECT * constant_KEEP_GOING; +OBJECT * constant_other; +OBJECT * constant_total; +OBJECT * constant_FILE_DIRSCAN; +OBJECT * constant_MAIN; +OBJECT * constant_MAIN_MAKE; +OBJECT * constant_MAKE_MAKE0; +OBJECT * constant_MAKE_MAKE1; +OBJECT * constant_MAKE_MAKE0SORT; +OBJECT * constant_BINDMODULE; +OBJECT * constant_IMPORT_MODULE; +OBJECT * constant_BUILTIN_GLOB_BACK; +OBJECT * constant_timestamp; +OBJECT * constant_JAM_TIMESTAMP_RESOLUTION; +OBJECT * constant_python; +OBJECT * constant_python_interface; +OBJECT * constant_extra_pythonpath; +OBJECT * constant_MAIN_PYTHON; +OBJECT * constant_FILE_ARCHIVESCAN; +OBJECT * constant_BUILTIN_GLOB_ARCHIVE_BACK; + +OBJECT * constant_RESPONSE_FILE_SUB; diff --git a/src/boost/tools/build/src/engine/constants.h b/src/boost/tools/build/src/engine/constants.h new file mode 100644 index 000000000..675b66579 --- /dev/null +++ b/src/boost/tools/build/src/engine/constants.h @@ -0,0 +1,78 @@ +/* + * Copyright 2011 Steven Watanabe + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * constants.h - constant objects + */ + +#ifndef BOOST_JAM_CONSTANTS_H +#define BOOST_JAM_CONSTANTS_H + +#include "config.h" +#include "object.h" + +void constants_init( void ); +void constants_done( void ); + +extern OBJECT * constant_empty; /* "" */ +extern OBJECT * constant_dot; /* "." */ +extern OBJECT * constant_plus; /* "+" */ +extern OBJECT * constant_star; /* "*" */ +extern OBJECT * constant_question_mark; /* "?" */ +extern OBJECT * constant_ok; /* "ok" */ +extern OBJECT * constant_true; /* "true" */ +extern OBJECT * constant_name; /* "__name__" */ +extern OBJECT * constant_bases; /* "__bases__" */ +extern OBJECT * constant_class; /* "__class__" */ +extern OBJECT * constant_typecheck; /* ".typecheck" */ +extern OBJECT * constant_builtin; /* "(builtin)" */ +extern OBJECT * constant_HCACHEFILE; /* "HCACHEFILE" */ +extern OBJECT * constant_HCACHEMAXAGE; /* "HCACHEMAXAGE" */ +extern OBJECT * constant_HDRSCAN; /* "HDRSCAN" */ +extern OBJECT * constant_HDRRULE; /* "HDRRULE" */ +extern OBJECT * constant_BINDRULE; /* "BINDRULE" */ +extern OBJECT * constant_LOCATE; /* "LOCATE" */ +extern OBJECT * constant_SEARCH; /* "SEARCH" */ +extern OBJECT * constant_JAM_SEMAPHORE; /* "JAM_SEMAPHORE" */ +extern OBJECT * constant_TIMING_RULE; /* "__TIMING_RULE__" */ +extern OBJECT * constant_ACTION_RULE; /* "__ACTION_RULE__" */ +extern OBJECT * constant_JAMSHELL; /* "JAMSHELL" */ +extern OBJECT * constant_TMPDIR; /* "TMPDIR" */ +extern OBJECT * constant_TMPNAME; /* "TMPNAME" */ +extern OBJECT * constant_TMPFILE; /* "TMPFILE" */ +extern OBJECT * constant_STDOUT; /* "STDOUT" */ +extern OBJECT * constant_STDERR; /* "STDERR" */ +extern OBJECT * constant_JAMDATE; /* "JAMDATE" */ +extern OBJECT * constant_JAM_TIMESTAMP_RESOLUTION; /* "JAM_TIMESTAMP_RESOLUTION" */ +extern OBJECT * constant_JAM_VERSION; /* "JAM_VERSION" */ +extern OBJECT * constant_JAMUNAME; /* "JAMUNAME" */ +extern OBJECT * constant_ENVIRON; /* ".ENVIRON" */ +extern OBJECT * constant_ARGV; /* "ARGV" */ +extern OBJECT * constant_all; /* "all" */ +extern OBJECT * constant_PARALLELISM; /* "PARALLELISM" */ +extern OBJECT * constant_KEEP_GOING; /* "KEEP_GOING" */ +extern OBJECT * constant_other; /* "[OTHER]" */ +extern OBJECT * constant_total; /* "[TOTAL]" */ +extern OBJECT * constant_FILE_DIRSCAN; /* "FILE_DIRSCAN" */ +extern OBJECT * constant_MAIN; /* "MAIN" */ +extern OBJECT * constant_MAIN_MAKE; /* "MAIN_MAKE" */ +extern OBJECT * constant_MAKE_MAKE0; /* "MAKE_MAKE0" */ +extern OBJECT * constant_MAKE_MAKE1; /* "MAKE_MAKE1" */ +extern OBJECT * constant_MAKE_MAKE0SORT; /* "MAKE_MAKE0SORT" */ +extern OBJECT * constant_BINDMODULE; /* "BINDMODULE" */ +extern OBJECT * constant_IMPORT_MODULE; /* "IMPORT_MODULE" */ +extern OBJECT * constant_BUILTIN_GLOB_BACK; /* "BUILTIN_GLOB_BACK" */ +extern OBJECT * constant_timestamp; /* "timestamp" */ +extern OBJECT * constant_python; /* "__python__" */ +extern OBJECT * constant_python_interface; /* "python_interface" */ +extern OBJECT * constant_extra_pythonpath; /* "EXTRA_PYTHONPATH" */ +extern OBJECT * constant_MAIN_PYTHON; /* "MAIN_PYTHON" */ +extern OBJECT * constant_FILE_ARCHIVESCAN; /* "FILE_ARCHIVESCAN" */ +extern OBJECT * constant_BUILTIN_GLOB_ARCHIVE_BACK; /* "BUILTIN_GLOB_ARCHIVE_BACK" */ + +extern OBJECT * constant_RESPONSE_FILE_SUB; // "RESPONSE_FILE_SUB" + +#endif diff --git a/src/boost/tools/build/src/engine/cwd.cpp b/src/boost/tools/build/src/engine/cwd.cpp new file mode 100644 index 000000000..f216e7151 --- /dev/null +++ b/src/boost/tools/build/src/engine/cwd.cpp @@ -0,0 +1,101 @@ +/* + * Copyright 2002. Vladimir Prus + * Copyright 2005. Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "cwd.h" + +#include "jam.h" +#include "mem.h" +#include "output.h" +#include "pathsys.h" +#include "startup.h" + +#include <assert.h> +#include <errno.h> +#include <limits.h> + +/* MinGW on Windows declares PATH_MAX in limits.h */ +#if defined( NT ) && !defined( __GNUC__ ) +# include <direct.h> +# define PATH_MAX _MAX_PATH +#else +# include <unistd.h> +# if defined( __COMO__ ) +# include <linux/limits.h> +# endif +#endif + +#ifndef PATH_MAX +# define PATH_MAX 1024 +#endif + + +static OBJECT * cwd_; +namespace +{ + std::string cwd_s; +} + + +void cwd_init( void ) +{ + int buffer_size = PATH_MAX; + char * cwd_buffer = 0; + int error; + + assert( !cwd_ ); + + do + { + char * const buffer = (char *)BJAM_MALLOC_RAW( buffer_size ); +#ifdef OS_VMS + /* cwd in POSIX-format */ + cwd_buffer = getcwd( buffer, buffer_size, 0 ); +#else + cwd_buffer = getcwd( buffer, buffer_size ); +#endif + error = errno; + if ( cwd_buffer ) + { + /* We store the path using its canonical/long/key format. */ + OBJECT * const cwd = object_new( cwd_buffer ); + cwd_ = path_as_key( cwd ); + object_free( cwd ); + cwd_s = cwd_buffer; + } + buffer_size *= 2; + BJAM_FREE_RAW( buffer ); + } + while ( !cwd_ && error == ERANGE ); + + if ( !cwd_ ) + { + errno_puts( "can not get current working directory" ); + b2::clean_exit( EXITBAD ); + } +} + + +OBJECT * cwd( void ) +{ + assert( cwd_ ); + return cwd_; +} + + +void cwd_done( void ) +{ + assert( cwd_ ); + object_free( cwd_ ); + cwd_ = NULL; +} + + +const std::string & b2::cwd_str() +{ + return cwd_s; +} \ No newline at end of file diff --git a/src/boost/tools/build/src/engine/cwd.h b/src/boost/tools/build/src/engine/cwd.h new file mode 100644 index 000000000..2910c2f82 --- /dev/null +++ b/src/boost/tools/build/src/engine/cwd.h @@ -0,0 +1,42 @@ +/* + * Copyright 2002. Vladimir Prus + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * cwd.h - manages the current working folder information + */ + +#ifndef CWD_H +#define CWD_H + +#include "config.h" +#include "object.h" + +#include <string> + + +/* cwd() - returns the current working folder */ +OBJECT * cwd( void ); +namespace b2 +{ + const std::string & cwd_str(); +} + +/* cwd_init() - initialize the cwd module functionality + * + * The current working folder can not change in Boost Jam so this function + * gets the current working folder information from the OS and stores it + * internally. + * + * Expected to be called at program startup before the program's current + * working folder has been changed + */ +void cwd_init( void ); + +/* cwd_done() - cleans up the cwd module functionality */ +void cwd_done( void ); + +#endif diff --git a/src/boost/tools/build/src/engine/debian/changelog b/src/boost/tools/build/src/engine/debian/changelog new file mode 100644 index 000000000..29084289c --- /dev/null +++ b/src/boost/tools/build/src/engine/debian/changelog @@ -0,0 +1,72 @@ +bjam (3.1.12-1) unstable; urgency=low + + * New upstream release. + + -- Rene Rivera <grafik@redshift-software.com> Sat, 01 Oct 2005 00:00:00 +0000 + +bjam (3.1.11-1) unstable; urgency=low + + * New upstream release. + + -- Rene Rivera <grafik@redshift-software.com> Sat, 30 Apr 2005 00:00:00 +0000 + +bjam (3.1.10-1) unstable; urgency=low + + * New upstream release. + + -- Rene Rivera <grafik@redshift-software.com> Tue, 1 Jun 2004 05:42:35 +0000 + +bjam (3.1.9-2) unstable; urgency=low + + * Use default value of BOOST_BUILD_PATH is not is set in environment. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Wed, 17 Dec 2003 16:44:35 +0300 + +bjam (3.1.9-1) unstable; urgency=low + + * Implement NATIVE_FILE builtin and several native rules. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Thu, 11 Dec 2003 13:15:26 +0300 + +bjam (3.1.8-1) unstable; urgency=low + + * New upstream release. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Tue, 4 Nov 2003 20:50:43 +0300 + +bjam (3.1.7-1) unstable; urgency=low + + * New upstream release. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Thu, 11 Sep 2003 10:45:44 +0400 + +bjam (3.1.6-1) unstable; urgency=low + + * New upstream release. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Tue, 1 Jul 2003 09:12:18 +0400 + +bjam (3.1.5-1) unstable; urgency=low + + * New upstream release. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Mon, 19 May 2003 14:05:13 +0400 + +bjam (3.1.3-2) unstable; urgency=low + + * Changed Debian package to be similar to Jam's package. + + -- Vladimir Prus <ghost@cs.msu.su> Thu, 10 Oct 2002 18:43:26 +0400 + +bjam (3.1.3-1) unstable; urgency=low + + * New upstream release. + + -- Vladimir Prus <ghost@zigzag.lvk.cs.msu.su> Fri, 4 Oct 2002 18:16:54 +0400 + +bjam (3.1.2-1) unstable; urgency=low + + * Initial Release. + + -- Vladimir Prus <ghost@cs.msu.su> Wed, 14 Aug 2002 14:08:00 +0400 + diff --git a/src/boost/tools/build/src/engine/debian/control b/src/boost/tools/build/src/engine/debian/control new file mode 100644 index 000000000..46747d838 --- /dev/null +++ b/src/boost/tools/build/src/engine/debian/control @@ -0,0 +1,16 @@ +Source: bjam +Section: devel +Priority: optional +Maintainer: Vladimir Prus <ghost@cs.msu.su> +Build-Depends: debhelper (>> 3.0.0), docbook-to-man, bison +Standards-Version: 3.5.2 + +Package: bjam +Architecture: any +Depends: ${shlibs:Depends} +Description: Build tool + Boost.Jam is a portable build tool with its own interpreted language, which + allows to implement rather complex logic in a readable way and without + resorting to external programs. It is a descendant of Jam/MR tool modified to + suit the needs of B2. In particular, modules and rule parameters + were added, as well as several new builtins. diff --git a/src/boost/tools/build/src/engine/debian/copyright b/src/boost/tools/build/src/engine/debian/copyright new file mode 100644 index 000000000..f72e4e3a9 --- /dev/null +++ b/src/boost/tools/build/src/engine/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Vladimir Prus <ghost@cs.msu.su> on +Wed, 17 July 2002, 19:27:00 +0400. + +Copyright: + + /+\ + +\ Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + \+/ + + This is Release 2.4 of Jam/MR, a make-like program. + + License is hereby granted to use this software and distribute it + freely, as long as this copyright notice is retained and modifications + are clearly marked. + + ALL WARRANTIES ARE HEREBY DISCLAIMED. + +Some portions are also: + + Copyright 2001-2006 David Abrahams. + Copyright 2002-2006 Rene Rivera. + Copyright 2003-2006 Vladimir Prus. + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) diff --git a/src/boost/tools/build/src/engine/debian/jam.man.sgml b/src/boost/tools/build/src/engine/debian/jam.man.sgml new file mode 100644 index 000000000..1fabfb64c --- /dev/null +++ b/src/boost/tools/build/src/engine/debian/jam.man.sgml @@ -0,0 +1,236 @@ +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ + +<!-- Process this file with docbook-to-man to generate an nroff manual + page: `docbook-to-man manpage.sgml > manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + --> + + <!ENTITY dhfirstname "<firstname>Yann</firstname>"> + <!ENTITY dhsurname "<surname>Dirson</surname>"> + <!-- Please adjust the date whenever revising the manpage. --> + <!ENTITY dhdate "<date>mai 23, 2001</date>"> + <!ENTITY dhemail "<email>dirson@debian.org</email>"> + <!ENTITY dhusername "Yann Dirson"> + <!ENTITY dhpackage "jam"> + + <!ENTITY debian "<productname>Debian GNU/Linux</productname>"> + <!ENTITY gnu "<acronym>GNU</acronym>"> +]> + +<refentry> + <refentryinfo> + <address> + &dhemail; + </address> + <author> + &dhfirstname; + &dhsurname; + </author> + <copyright> + <year>2001</year> + <holder>&dhusername;</holder> + </copyright> + &dhdate; + </refentryinfo> + + <refmeta> + <refentrytitle>JAM</refentrytitle> + <manvolnum>1</manvolnum> + </refmeta> + + <refnamediv> + <refname>Jam/MR</refname> + <refpurpose>Make(1) Redux</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <cmdsynopsis> + <command>jam</command> + + <arg><option>-a</option></arg> + <arg><option>-n</option></arg> + <arg><option>-v</option></arg> + + <arg><option>-d <replaceable/debug/</option></arg> + <arg><option>-f <replaceable/jambase/</option></arg> + <arg><option>-j <replaceable/jobs/</option></arg> + <arg><option>-o <replaceable/actionsfile/</option></arg> + <arg><option>-s <replaceable/var/=<replaceable/value/</option></arg> + <arg><option>-t <replaceable/target/</option></arg> + + <arg repeat><option><replaceable/target/</option></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <refsect1> + <title>DESCRIPTION + + Jam is a program construction tool, like make(1). + + Jam recursively builds target files from source files, using + dependency information and updating actions expressed in the + Jambase file, which is written in jam's own interpreted language. + The default Jambase is compiled into jam and provides a + boilerplate for common use, relying on a user-provide file + "Jamfile" to enumerate actual targets and sources. + + + + OPTIONS + + + + + + + + + Enable cumulative debugging levels from 1 to + + + + + + Show + dependency analysis, and target/source + timestamps/paths + + + + + + Show + directory/header file/archive + scans + + + + + + + + + + + + + + + Enable debugging level + + + + + + + + + + Read + + + + + + + Run up to + + + + + + + + + + Write the updating actions to the specified file + instead of running them (or outputting them, as on the + Mac). + + + + + + + Set the variable + + + + + + + Rebuild + + + + + + + + + + + SEE ALSO + + Jam is documented fully in HTML pages available on Debian + systems from + /usr/share/doc/jam/Jam.html. + + + + AUTHOR + + This manual page was created by &dhusername; &dhemail; from + the + + + + diff --git a/src/boost/tools/build/src/engine/debian/rules b/src/boost/tools/build/src/engine/debian/rules new file mode 100755 index 000000000..8538b3572 --- /dev/null +++ b/src/boost/tools/build/src/engine/debian/rules @@ -0,0 +1,73 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +# GNU copyright 2001 by Yann Dirson. + +# This is the debian/rules file for packages jam and ftjam +# It should be usable with both packages without any change + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=3 + +topdir=$(shell pwd) + +jam=bjam +binname=bjam + +build: build-stamp +build-stamp: debian/jam.1 + dh_testdir + + ./build.sh + + touch build-stamp + +%.1: %.man.sgml + /usr/bin/docbook-to-man $< > $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + rm -rf bin.* + rm -f jam0 debian/jam.1 + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + install -d ${topdir}/debian/${jam}/usr/bin + install -m755 bin.linuxx86/bjam ${topdir}/debian/${jam}/usr/bin/ + install -d ${topdir}/debian/${jam}/usr/share/man/man1/ + install -m644 debian/jam.1 ${topdir}/debian/${jam}/usr/share/man/man1/${binname}.1 + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs README RELNOTES Jambase *.html +# dh_installemacsen +# dh_undocumented + dh_installchangelogs + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/src/boost/tools/build/src/engine/debug.cpp b/src/boost/tools/build/src/engine/debug.cpp new file mode 100644 index 000000000..f802b8a00 --- /dev/null +++ b/src/boost/tools/build/src/engine/debug.cpp @@ -0,0 +1,158 @@ +/* + * Copyright 2005, 2016. Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "jam.h" +#include "debug.h" +#include "output.h" +#include "hash.h" +#include + + +static profile_frame * profile_stack = 0; +static struct hash * profile_hash = 0; +static profile_info profile_other = { 0 }; +static profile_info profile_total = { 0 }; + + +profile_frame * profile_init( OBJECT * rulename, profile_frame * frame ) +{ + if ( DEBUG_PROFILE ) profile_enter( rulename, frame ); + return frame; +} + + +void profile_enter( OBJECT * rulename, profile_frame * frame ) +{ + if ( DEBUG_PROFILE ) + { + double start = profile_clock(); + profile_info * p; + + if ( !profile_hash && rulename ) + profile_hash = hashinit( sizeof( profile_info ), "profile" ); + + if ( rulename ) + { + int found; + p = (profile_info *)hash_insert( profile_hash, rulename, &found ); + if ( !found ) + { + p->name = rulename; + p->cumulative = 0; + p->net = 0; + p->num_entries = 0; + p->stack_count = 0; + p->memory = 0; + } + } + else + { + p = &profile_other; + } + + p->num_entries += 1; + p->stack_count += 1; + + frame->info = p; + + frame->caller = profile_stack; + profile_stack = frame; + + frame->entry_time = profile_clock(); + frame->overhead = 0; + frame->subrules = 0; + + /* caller pays for the time it takes to play with the hash table */ + if ( frame->caller ) + frame->caller->overhead += frame->entry_time - start; + } +} + + +void profile_memory( size_t mem ) +{ + if ( DEBUG_PROFILE ) + if ( profile_stack && profile_stack->info ) + profile_stack->info->memory += ((double)mem) / 1024; +} + + +void profile_exit( profile_frame * frame ) +{ + if ( DEBUG_PROFILE ) + { + /* Cumulative time for this call. */ + double t = profile_clock() - frame->entry_time - frame->overhead; + /* If this rule is already present on the stack, do not add the time for + * this instance. + */ + if ( frame->info->stack_count == 1 ) + frame->info->cumulative += t; + /* Net time does not depend on presence of the same rule in call stack. + */ + frame->info->net += t - frame->subrules; + + if ( frame->caller ) + { + /* Caller's cumulative time must account for this overhead. */ + frame->caller->overhead += frame->overhead; + frame->caller->subrules += t; + } + /* Pop this stack frame. */ + --frame->info->stack_count; + profile_stack = frame->caller; + } +} + + +static void dump_profile_entry( void * p_, void * ignored ) +{ + profile_info * p = (profile_info *)p_; + double mem_each = ( p->memory / ( p->num_entries ? p->num_entries : 1 + ) ); + double q = p->net; + if (p->num_entries) q /= p->num_entries; + if ( !ignored ) + { + profile_total.cumulative += p->net; + profile_total.memory += p->memory; + } + out_printf( "%10ld %12.6f %12.6f %12.8f %10.2f %10.2f %s\n", p->num_entries, + p->cumulative, p->net, q, p->memory, mem_each, object_str( p->name ) ); +} + + +void profile_dump() +{ + if ( profile_hash ) + { + out_printf( "%10s %12s %12s %12s %10s %10s %s\n", "--count--", "--gross--", + "--net--", "--each--", "--mem--", "--each--", "--name--" ); + hashenumerate( profile_hash, dump_profile_entry, 0 ); + profile_other.name = constant_other; + dump_profile_entry( &profile_other, 0 ); + profile_total.name = constant_total; + dump_profile_entry( &profile_total, (void *)1 ); + } +} + +double profile_clock() +{ + return ((double) clock()) / CLOCKS_PER_SEC; +} + +OBJECT * profile_make_local( char const * scope ) +{ + if ( DEBUG_PROFILE ) + { + return object_new( scope ); + } + else + { + return 0; + } +} diff --git a/src/boost/tools/build/src/engine/debug.h b/src/boost/tools/build/src/engine/debug.h new file mode 100644 index 000000000..fad73f9f5 --- /dev/null +++ b/src/boost/tools/build/src/engine/debug.h @@ -0,0 +1,63 @@ +/* + * Copyright 2005, 2016. Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef BJAM_DEBUG_H +#define BJAM_DEBUG_H + +#include "config.h" +#include "constants.h" +#include "object.h" + + +typedef struct profile_info +{ + /* name of rule being called */ + OBJECT * name; + /* cumulative time spent in rule, in seconds */ + double cumulative; + /* time spent in rule proper, in seconds */ + double net; + /* number of time rule was entered */ + unsigned long num_entries; + /* number of the times this function is present in stack */ + unsigned long stack_count; + /* memory allocated by the call, in KiB */ + double memory; +} profile_info; + +typedef struct profile_frame +{ + /* permanent storage where data accumulates */ + profile_info * info; + /* overhead for profiling in this call */ + double overhead; + /* time of last entry to rule */ + double entry_time; + /* stack frame of caller */ + struct profile_frame * caller; + /* time spent in subrules */ + double subrules; +} profile_frame; + +profile_frame * profile_init( OBJECT * rulename, profile_frame * ); +void profile_enter( OBJECT * rulename, profile_frame * ); +void profile_memory( size_t mem ); +void profile_exit( profile_frame * ); +void profile_dump(); +double profile_clock(); + +#define PROFILE_ENTER( scope ) profile_frame PROF_ ## scope, *PROF_ ## scope ## _p = profile_init( constant_ ## scope, &PROF_ ## scope ) +#define PROFILE_EXIT( scope ) profile_exit( PROF_ ## scope ## _p ) + +OBJECT * profile_make_local( char const * ); +#define PROFILE_ENTER_LOCAL( scope ) \ + static OBJECT * constant_LOCAL_##scope = 0; \ + if (DEBUG_PROFILE && !constant_LOCAL_##scope) constant_LOCAL_##scope = profile_make_local( #scope ); \ + PROFILE_ENTER( LOCAL_##scope ) +#define PROFILE_EXIT_LOCAL( scope ) PROFILE_EXIT( LOCAL_##scope ) + +#endif diff --git a/src/boost/tools/build/src/engine/debugger.cpp b/src/boost/tools/build/src/engine/debugger.cpp new file mode 100644 index 000000000..2b9755995 --- /dev/null +++ b/src/boost/tools/build/src/engine/debugger.cpp @@ -0,0 +1,2737 @@ +/* + * Copyright 2015 Steven Watanabe + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "debugger.h" +#include "constants.h" +#include "jam_strings.h" +#include "pathsys.h" +#include "cwd.h" +#include "function.h" +#include "mem.h" +#include "startup.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef NT +#include +#include +#include +#else +#include +#include +#include +#endif + +#include +#include + +#undef debug_on_enter_function +#undef debug_on_exit_function + +struct breakpoint +{ + OBJECT * file; + OBJECT * bound_file; + int line; + int status; +}; + +#define BREAKPOINT_ENABLED 1 +#define BREAKPOINT_DISABLED 2 +#define BREAKPOINT_DELETED 3 + +static struct breakpoint * breakpoints; +static int num_breakpoints; +static int breakpoints_capacity; + +#define DEBUG_NO_CHILD 0 +#define DEBUG_RUN 1 +#define DEBUG_STEP 2 +#define DEBUG_NEXT 3 +#define DEBUG_FINISH 4 +#define DEBUG_STOPPED 5 + +#define DEBUG_MSG_BREAKPOINT 1 +#define DEBUG_MSG_END_STEPPING 2 +#define DEBUG_MSG_SETUP 3 +#define DEBUG_MSG_DONE 32 + +static int debug_state; +static int debug_depth; +static OBJECT * debug_file; +static int debug_line; +static FRAME * debug_frame; +LIST * debug_print_result; +static int current_token; +static int debug_selected_frame_number; + +/* Commands are read from this stream. */ +static FILE * command_input; +/* Where to send output from commands. */ +static FILE * command_output; +/* Only valid in the parent. Reads command output from the child. */ +static FILE * command_child; + +struct command_elem +{ + const char * key; + void (*command)( int, const char * * ); +}; + +static struct command_elem * command_array; + +static void debug_listen( void ); +static int read_command( void ); +static int is_same_file( OBJECT * file1, OBJECT * file2 ); +static void debug_mi_format_token( void ); +static OBJECT * make_absolute_path( OBJECT * filename ); + +static void debug_string_write( FILE * out, const char * data ) +{ + fprintf( out, "%s", data ); + fputc( '\0', out ); +} + +static std::string debug_string_read( FILE * in ) +{ + string buf[ 1 ]; + int ch; + std::string result; + string_new( buf ); + while( ( ch = fgetc( in ) ) > 0 ) + { + string_push_back( buf, (char)ch ); + } + result = buf->value; + string_free( buf ); + return result; +} + +static void debug_object_write( FILE * out, OBJECT * data ) +{ + debug_string_write( out, object_str( data ) ); +} + +static OBJECT * debug_object_read( FILE * in ) +{ + string buf[ 1 ]; + int ch; + OBJECT * result; + string_new( buf ); + while( ( ch = fgetc( in ) ) > 0 ) + { + string_push_back( buf, (char)ch ); + } + result = object_new( buf->value ); + string_free( buf ); + return result; +} + +static void debug_int_write( FILE * out, int i ) +{ + fprintf( out, "%d", i ); + fputc( '\0', out ); +} + +static int debug_int_read( FILE * in ) +{ + OBJECT * str = debug_object_read( in ); + int result = atoi( object_str( str ) ); + object_free( str ); + return result; +} + +static void debug_list_write( FILE * out, LIST * l ) +{ + LISTITER iter = list_begin( l ), end = list_end( l ); + fprintf( out, "%d\n", list_length( l ) ); + for ( ; iter != end; iter = list_next( iter ) ) + { + debug_object_write( out, list_item( iter ) ); + } +} + +static LIST * debug_list_read( FILE * in ) +{ + int len; + int i; + LIST * result = L0; + int ret = fscanf( in, "%d", &len ); + if (ret == 1) + { + int ch = fgetc( in ); + if (ch > 0) assert( ch == '\n' ); + for ( i = 0; i < len; ++i ) + { + result = list_push_back( result, debug_object_read( in ) ); + } + } + return result; +} + +static void debug_lol_write( FILE * out, LOL * lol ) +{ + int i; + debug_int_write( out, lol->count ); + for ( i = 0; i < lol->count; ++i ) + { + debug_list_write( out, lol_get( lol, i ) ); + } +} + +static void debug_lol_read( FILE * in, LOL * lol ) +{ + int count, i; + lol_init( lol ); + count = debug_int_read( in ); + for ( i = 0; i < count; ++i ) + { + lol_add( lol, debug_list_read( in ) ); + } +} + +static void debug_format_rulename ( string * out, FRAME * frame ) +{ + const char * pos = strchr( frame->rulename, '.' ); + if ( frame->module->class_module && pos ) + { + string_copy( out, object_str( frame->module->name ) ); + string_push_back( out, '.' ); + string_append( out, pos + 1 ); + } + else + { + string_copy( out, frame->rulename ); + } +} + +static void debug_frame_write( FILE * out, FRAME * frame ) +{ + string rulename_buffer [ 1 ]; + OBJECT * fullname = constant_builtin; + OBJECT * file = frame->file; + if ( file == NULL ) file = constant_builtin; + else fullname = make_absolute_path( frame->file ); + debug_format_rulename( rulename_buffer, frame ); + debug_object_write( out, file ); + debug_int_write( out, frame->line ); + debug_object_write( out, fullname ); + debug_lol_write( out, frame->args ); + debug_string_write( out, rulename_buffer->value ); + object_free( fullname ); + string_free( rulename_buffer ); +} + +/* + * The information passed to the debugger for + * a frame is slightly different from the FRAME + * struct. + */ +typedef struct _frame_info +{ + OBJECT * file = nullptr; + int line = 0; + OBJECT * fullname = nullptr; + LOL args[ 1 ]; + std::string rulename; + + _frame_info() + { + lol_init( args ); + } + + ~_frame_info() + { + if ( file ) object_free( file ); + if ( fullname ) object_free( fullname ); + lol_free( args ); + } +} FRAME_INFO; + +static void debug_frame_read( FILE * in, FRAME_INFO * frame ) +{ + frame->file = debug_object_read( in ); + frame->line = debug_int_read( in ); + frame->fullname = debug_object_read( in ); + debug_lol_read( in, frame->args ); + frame->rulename = debug_string_read( in ); +} + +static int add_breakpoint( struct breakpoint elem ) +{ + if ( num_breakpoints == breakpoints_capacity ) + { + int new_capacity = breakpoints_capacity * 2; + if ( new_capacity == 0 ) new_capacity = 1; + breakpoints = ( struct breakpoint * )realloc( breakpoints, new_capacity * sizeof( struct breakpoint ) ); + breakpoints_capacity = new_capacity; + } + breakpoints[ num_breakpoints++ ] = elem; + return num_breakpoints; +} + +static int add_line_breakpoint( OBJECT * file, int line ) +{ + struct breakpoint elem; + elem.file = file; + elem.bound_file = NULL; + elem.line = line; + elem.status = BREAKPOINT_ENABLED; + return add_breakpoint( elem ); +} + +static int add_function_breakpoint( OBJECT * name ) +{ + struct breakpoint elem; + elem.file = name; + elem.bound_file = object_copy( name ); + elem.line = -1; + elem.status = BREAKPOINT_ENABLED; + return add_breakpoint( elem ); +} + +/* + * Checks whether there is an active breakpoint at the + * specified location. Returns the breakpoint id + * or -1 if none is found. + */ +static int handle_line_breakpoint( OBJECT * file, int line ) +{ + int i; + if ( file == NULL ) return 0; + for ( i = 0; i < num_breakpoints; ++i ) + { + if ( breakpoints[ i ].bound_file == NULL && is_same_file( breakpoints[ i ].file, file ) ) + { + breakpoints[ i ].bound_file = object_copy( file ); + } + if ( breakpoints[ i ].status == BREAKPOINT_ENABLED && + breakpoints[ i ].bound_file != NULL && + object_equal( breakpoints[ i ].bound_file, file ) && + breakpoints[ i ].line == line ) + { + return i + 1; + } + } + return 0; +} + +static int handle_function_breakpoint( OBJECT * name ) +{ + return handle_line_breakpoint( name, -1 ); +} + +static OBJECT * make_absolute_path( OBJECT * filename ) +{ + PATHNAME path1[ 1 ]; + string buf[ 1 ]; + OBJECT * result; + const char * root = object_str( cwd() ); + path_parse( object_str( filename ), path1 ); + path1->f_root.ptr = root; + path1->f_root.len = int32_t(strlen( root )); + string_new( buf ); + path_build( path1, buf ); + result = object_new( buf->value ); + string_free( buf ); + return result; +} + +static OBJECT * get_filename( OBJECT * path ) +{ + PATHNAME path1[ 1 ]; + string buf[ 1 ]; + OBJECT * result; + path_parse( object_str( path ), path1 ); + path1->f_dir.ptr = NULL; + path1->f_dir.len = 0; + string_new( buf ); + path_build( path1, buf ); + result = object_new( buf->value ); + string_free( buf ); + return result; +} + +static int is_same_file( OBJECT * file1, OBJECT * file2 ) +{ + OBJECT * absolute1 = make_absolute_path( file1 ); + OBJECT * absolute2 = make_absolute_path( file2 ); + OBJECT * norm1 = path_as_key( absolute1 ); + OBJECT * norm2 = path_as_key( absolute2 ); + OBJECT * base1 = get_filename( file1 ); + OBJECT * base2 = get_filename( file2 ); + OBJECT * normbase1 = path_as_key( base1 ); + OBJECT * normbase2 = path_as_key( base2 ); + int result = object_equal( norm1, norm2 ) || + ( object_equal( base1, file1 ) && object_equal( normbase1, normbase2 ) ); + object_free( absolute1 ); + object_free( absolute2 ); + object_free( norm1 ); + object_free( norm2 ); + object_free( base1 ); + object_free( base2 ); + object_free( normbase1 ); + object_free( normbase2 ); + return result; +} + +static void debug_print_source( OBJECT * filename, int line ) +{ + FILE * file; + + if ( filename == NULL || object_equal( filename, constant_builtin ) ) + return; + + file = fopen( object_str( filename ), "r" ); + if ( file ) + { + int ch; + int printing = 0; + int current_line = 1; + if ( line == 1 ) + { + printing = 1; + printf( "%d\t", current_line ); + } + while ( ( ch = fgetc( file ) ) != EOF ) + { + if ( printing ) + fputc( ch, stdout ); + + if ( ch == '\n' ) + { + if ( printing ) + break; + + ++current_line; + if ( current_line == line ) + { + printing = 1; + printf( "%d\t", current_line ); + } + } + } + fclose( file ); + } +} + +static void debug_print_frame_info( FRAME_INFO & frame ) +{ + OBJECT * file = frame.file; + if ( file == NULL ) file = constant_builtin; + printf( "%s ", frame.rulename.c_str() ); + if ( frame.rulename != "module scope" ) + { + printf( "( " ); + if ( frame.args->count ) + { + lol_print( frame.args ); + printf( " " ); + } + printf( ") " ); + } + printf( "at %s:%d", object_str( file ), frame.line ); +} + +static void debug_mi_print_frame_info( FRAME_INFO * frame ) +{ + printf( "frame={func=\"%s\",args=[],file=\"%s\",fullname=\"%s\",line=\"%d\"}", + frame->rulename.c_str(), + object_str( frame->file ), + object_str( frame->fullname ), + frame->line ); +} + +static void debug_on_breakpoint( int id ) +{ + fputc( DEBUG_MSG_BREAKPOINT, command_output ); + debug_int_write( command_output, id ); + fflush( command_output ); + debug_listen(); +} + +static void debug_end_stepping( void ) +{ + fputc( DEBUG_MSG_END_STEPPING, command_output ); + fflush( command_output ); + debug_listen(); +} + +void debug_on_instruction( FRAME * frame, OBJECT * file, int line ) +{ + int breakpoint_id; + assert( debug_is_debugging() ); + if ( debug_state == DEBUG_NEXT && + ( debug_depth < 0 || ( debug_depth == 0 && debug_line != line ) ) ) + { + debug_file = file; + debug_line = line; + debug_frame = frame; + debug_end_stepping(); + } + else if ( debug_state == DEBUG_STEP && debug_line != line ) + { + debug_file = file; + debug_line = line; + debug_frame = frame; + debug_end_stepping(); + } + else if ( debug_state == DEBUG_FINISH && debug_depth < 0 ) + { + debug_file = file; + debug_line = line; + debug_frame = frame; + debug_end_stepping(); + } + else if ( ( debug_file == NULL || ! object_equal( file, debug_file ) || + line != debug_line || debug_depth != 0 ) && + ( breakpoint_id = handle_line_breakpoint( file, line ) ) ) + { + debug_file = file; + debug_line = line; + debug_frame = frame; + debug_on_breakpoint( breakpoint_id ); + } + else if ( ( debug_state == DEBUG_RUN || debug_state == DEBUG_FINISH ) && + ( debug_depth < 0 || ( debug_depth == 0 && debug_line != line ) ) ) + { + debug_file = NULL; + debug_line = 0; + } +} + +void debug_on_enter_function( FRAME * frame, OBJECT * name, OBJECT * file, int line ) +{ + int breakpoint_id; + assert( debug_is_debugging() ); + ++debug_depth; + if ( debug_state == DEBUG_STEP && file ) + { + debug_file = file; + debug_line = line; + debug_frame = frame; + debug_end_stepping(); + } + else if ( ( breakpoint_id = handle_function_breakpoint( name ) ) || + ( breakpoint_id = handle_line_breakpoint( file, line ) ) ) + { + debug_file = file; + debug_line = line; + debug_frame = frame; + debug_on_breakpoint( breakpoint_id ); + } +} + +void debug_on_exit_function( OBJECT * name ) +{ + assert( debug_is_debugging() ); + --debug_depth; + if ( debug_depth < 0 ) + { + /* The current location is no longer valid + after we return from the containing function. */ + debug_file = NULL; + debug_line = 0; + } +} + +#if NT +static HANDLE child_handle; +static DWORD child_pid; +#else +static int child_pid; +#endif + +static void debug_child_continue( int argc, const char * * argv ) +{ + debug_state = DEBUG_RUN; + debug_depth = 0; +} + +static void debug_child_step( int argc, const char * * argv ) +{ + debug_state = DEBUG_STEP; + debug_depth = 0; +} + +static void debug_child_next( int argc, const char * * argv ) +{ + debug_state = DEBUG_NEXT; + debug_depth = 0; +} + +static void debug_child_finish( int argc, const char * * argv ) +{ + debug_state = DEBUG_FINISH; + debug_depth = 0; +} + +static void debug_child_kill( int argc, const char * * argv ) +{ + b2::clean_exit( 0 ); +} + +static int debug_add_breakpoint( const char * name ) +{ + const char * file_ptr = name; + const char * ptr = strrchr( file_ptr, ':' ); + if ( ptr ) + { + char * end; + long line = strtoul( ptr + 1, &end, 10 ); + if ( line > 0 && line <= INT_MAX && end != ptr + 1 && *end == 0 ) + { + OBJECT * file = object_new_range( file_ptr, int32_t(ptr - file_ptr) ); + return add_line_breakpoint( file, line ); + } + else + { + OBJECT * name = object_new( file_ptr ); + return add_function_breakpoint( name ); + } + } + else + { + OBJECT * name = object_new( file_ptr ); + return add_function_breakpoint( name ); + } +} + +static void debug_child_break( int argc, const char * * argv ) +{ + if ( argc == 2 ) + { + debug_add_breakpoint( argv[ 1 ] ); + } +} + +static int get_breakpoint_by_name( const char * name ) +{ + int result; + const char * file_ptr = name; + const char * ptr = strrchr( file_ptr, ':' ); + if ( ptr ) + { + char * end; + long line = strtoul( ptr + 1, &end, 10 ); + if ( line > 0 && line <= INT_MAX && end != ptr + 1 && *end == 0 ) + { + OBJECT * file = object_new_range( file_ptr, int32_t(ptr - file_ptr) ); + result = handle_line_breakpoint( file, line ); + object_free( file ); + } + else + { + OBJECT * name = object_new( file_ptr ); + result = handle_function_breakpoint( name ); + object_free( name ); + } + } + else + { + OBJECT * name = object_new( file_ptr ); + result = handle_function_breakpoint( name ); + object_free( name ); + } + return result; +} + +static void debug_child_disable( int argc, const char * * argv ) +{ + if ( argc == 2 ) + { + int id = atoi( argv[ 1 ] ); + if ( id < 1 || id > num_breakpoints ) + return; + --id; + if ( breakpoints[ id ].status == BREAKPOINT_DELETED ) + return; + breakpoints[ id ].status = BREAKPOINT_DISABLED; + } +} + +static void debug_child_enable( int argc, const char * * argv ) +{ + if ( argc == 2 ) + { + int id = atoi( argv[ 1 ] ); + if ( id < 1 || id > num_breakpoints ) + return; + --id; + if ( breakpoints[ id ].status == BREAKPOINT_DELETED ) + return; + breakpoints[ id ].status = BREAKPOINT_ENABLED; + } +} + +static void debug_child_delete( int argc, const char * * argv ) +{ + if ( argc == 2 ) + { + int id = atoi( argv[ 1 ] ); + if ( id < 1 || id > num_breakpoints ) + return; + --id; + breakpoints[ id ].status = BREAKPOINT_DELETED; + } +} + +static void debug_child_print( int argc, const char * * argv ) +{ + FRAME * saved_frame; + OBJECT * saved_file; + int saved_line; + string buf[ 1 ]; + const char * lines[ 2 ]; + int i; + FRAME new_frame = *debug_frame; + /* Save the current file/line, since running parse_string + * will likely change it. + */ + saved_frame = debug_frame; + saved_file = debug_file; + saved_line = debug_line; + string_new( buf ); + string_append( buf, "__DEBUG_PRINT_HELPER__" ); + for ( i = 1; i < argc; ++i ) + { + string_push_back( buf, ' ' ); + string_append( buf, argv[ i ] ); + } + string_append( buf, " ;\n" ); + lines[ 0 ] = buf->value; + lines[ 1 ] = NULL; + parse_string( constant_builtin, lines, &new_frame ); + string_free( buf ); + debug_list_write( command_output, debug_print_result ); + fflush( command_output ); + debug_frame = saved_frame; + debug_file = saved_file; + debug_line = saved_line; +} + +static void debug_child_frame( int argc, const char * * argv ) +{ + if ( argc == 2 ) + { + debug_selected_frame_number = atoi( argv[ 1 ] ); + } + else + { + assert( !"Wrong number of arguments to frame." ); + } +} + +static void debug_child_info( int argc, const char * * argv ) +{ + if ( strcmp( argv[ 1 ], "locals" ) == 0 ) + { + LIST * locals = L0; + if ( debug_frame->function ) + { + locals = function_get_variables( (FUNCTION*)debug_frame->function ); + } + debug_list_write( command_output, locals ); + fflush( command_output ); + list_free( locals ); + } + else if ( strcmp( argv[ 1 ], "frame" ) == 0 ) + { + int frame_number = debug_selected_frame_number; + int i; + FRAME base = *debug_frame; + FRAME * frame = &base; + base.file = debug_file; + base.line = debug_line; + if ( argc == 3 ) frame_number = atoi( argv[ 2 ] ); + + for ( i = 0; i < frame_number; ++i ) frame = frame->prev; + + debug_frame_write( command_output, frame ); + } + else if ( strcmp( argv[ 1 ], "depth" ) == 0 ) + { + int result = 0; + FRAME * frame = debug_frame; + while ( frame ) + { + frame = frame->prev; + ++result; + } + fprintf( command_output, "%d", result ); + fputc( '\0', command_output ); + fflush( command_output ); + } +} + +/* Commands for the parent. */ + +#ifdef NT + +static int get_module_filename( string * out ) +{ + DWORD result; + string_reserve( out, 256 + 1 ); + string_truncate( out, 256 ); + while( ( result = GetModuleFileNameA( NULL, out->value, DWORD(out->size) ) ) == DWORD(out->size) ) + { + string_reserve( out, out->size * 2 + 1); + string_truncate( out, out->size * 2 ); + } + if ( result != 0 ) + { + string_truncate( out, result ); + return 1; + } + else + { + return 0; + } +} + +#endif + +static struct command_elem child_commands[] = +{ + { "continue", &debug_child_continue }, + { "kill", &debug_child_kill }, + { "step", &debug_child_step }, + { "next", &debug_child_next }, + { "finish", &debug_child_finish }, + { "break", &debug_child_break }, + { "disable", &debug_child_disable }, + { "enable", &debug_child_enable }, + { "delete", &debug_child_delete }, + { "print", &debug_child_print }, + { "frame", &debug_child_frame }, + { "info", &debug_child_info }, + { NULL, NULL } +}; + +static void debug_mi_error( const char * message ) +{ + debug_mi_format_token(); + printf( "^error,msg=\"%s\"\n(gdb) \n", message ); +} + +static void debug_error_( const char * message ) +{ + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + printf( "%s\n", message ); + } + else if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_error( message ); + } +} + +static const char * debug_format_message( const char * format, va_list vargs ) +{ + char * buf; + int result; + int sz = 80; + for ( ; ; ) + { + va_list args; + buf = (char *)malloc( sz ); + if ( !buf ) + return 0; + #ifndef va_copy + args = vargs; + #else + va_copy( args, vargs ); + #endif + #if defined(_MSC_VER) && (_MSC_VER <= 1310) + result = _vsnprintf( buf, sz, format, args ); + #else + result = vsnprintf( buf, sz, format, args ); + #endif + va_end( args ); + if ( 0 <= result && result < sz ) + return buf; + free( buf ); + if ( result < 0 ) + return 0; + sz = result + 1; + } +} + +static void debug_error( const char * format, ... ) +{ + va_list args; + const char * msg; + va_start( args, format ); + msg = debug_format_message( format, args ); + va_end( args ); + if ( !msg ) + { + debug_error_( "Failed formatting error message." ); + return; + } + debug_error_( msg ); + free( ( void * )msg ); +} + +static void debug_parent_child_exited( int pid, int exit_code ) +{ + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + printf( "Child %d exited with status %d\n", (int)child_pid, (int)exit_code ); + } + else if ( debug_interface == DEBUG_INTERFACE_MI ) + { + if ( exit_code == 0 ) + printf( "*stopped,reason=\"exited-normally\"\n(gdb) \n" ); + else + printf( "*stopped,reason=\"exited\",exit-code=\"%d\"\n(gdb) \n", exit_code ); + } + else + { + assert( !"Wrong value of debug_interface." ); + } +} + +#if !NT + +static void debug_parent_child_signalled( int pid, int id ) +{ + + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + printf( "Child %d exited on signal %d\n", child_pid, id ); + } + else if ( debug_interface == DEBUG_INTERFACE_MI ) + { + const char * name = "unknown"; + const char * meaning = "unknown"; + switch( id ) + { + case SIGINT: name = "SIGINT"; meaning = "Interrupt"; break; + } + printf("*stopped,reason=\"exited-signalled\",signal-name=\"%s\",signal-meaning=\"%s\"\n(gdb) \n", name, meaning); + } + else + { + assert( !"Wrong value of debug_interface." ); + } +} + +#endif + +static void debug_parent_on_breakpoint( void ) +{ + FRAME_INFO base; + int id; + id = debug_int_read( command_child ); + fprintf( command_output, "info frame\n" ); + fflush( command_output ); + debug_frame_read( command_child, &base ); + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + printf( "Breakpoint %d, ", id ); + debug_print_frame_info( base ); + printf( "\n" ); + debug_print_source( base.file, base.line ); + } + else if ( debug_interface == DEBUG_INTERFACE_MI ) + { + printf( "*stopped,reason=\"breakpoint-hit\",bkptno=\"%d\",disp=\"keep\",", id ); + debug_mi_print_frame_info( &base ); + printf( ",thread-id=\"1\",stopped-threads=\"all\"" ); + printf( "\n(gdb) \n" ); + } + else + { + assert( !"Wrong value if debug_interface" ); + } + fflush( stdout ); +} + +static void debug_parent_on_end_stepping( void ) +{ + FRAME_INFO base; + fprintf( command_output, "info frame\n" ); + fflush( command_output ); + debug_frame_read( command_child, &base ); + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + debug_print_source( base.file, base.line ); + } + else + { + printf( "*stopped,reason=\"end-stepping-range\"," ); + debug_mi_print_frame_info( &base ); + printf( ",thread-id=\"1\"" ); + printf( "\n(gdb) \n" ); + } + fflush( stdout ); +} + +/* Waits for events from the child. */ +static void debug_parent_wait( int print_message ) +{ + int ch = fgetc( command_child ); + if ( ch == DEBUG_MSG_BREAKPOINT ) + { + debug_parent_on_breakpoint(); + } + else if ( ch == DEBUG_MSG_END_STEPPING ) + { + debug_parent_on_end_stepping(); + } + else if ( ch == DEBUG_MSG_SETUP ) + { + /* FIXME: This is handled in the caller, but it would make + more sense to handle it here. */ + return; + } + else if ( ch == EOF ) + { +#if NT + WaitForSingleObject( child_handle, INFINITE ); + if ( print_message ) + { + DWORD exit_code; + GetExitCodeProcess( child_handle, &exit_code ); + debug_parent_child_exited( (int)child_pid, (int)exit_code ); + } + CloseHandle( child_handle ); +#else + int status; + int pid; + while ( ( pid = waitpid( child_pid, &status, 0 ) ) == -1 ) + if ( errno != EINTR ) + break; + if ( print_message ) + { + if ( WIFEXITED( status ) ) + debug_parent_child_exited( child_pid, WEXITSTATUS( status ) ); + else if ( WIFSIGNALED( status ) ) + debug_parent_child_signalled( child_pid, WTERMSIG( status ) ); + } +#endif + fclose( command_child ); + fclose( command_output ); + debug_state = DEBUG_NO_CHILD; + } +} + +/* Prints the message for starting the child. */ +static void debug_parent_run_print( int argc, const char * * argv ) +{ + int i; + extern char const * saved_argv0; + char * name = executable_path( saved_argv0 ); + printf( "Starting program: %s", name ); + free( name ); + for ( i = 1; i < argc; ++i ) + { + printf( " %s", argv[ i ] ); + } + printf( "\n" ); + fflush( stdout ); +} + +#if NT + +void debug_init_handles( const char * in, const char * out ) +{ + HANDLE read_handle; + int read_fd; + HANDLE write_handle; + int write_fd; + + sscanf( in, "%p", &read_handle ); + read_fd = _open_osfhandle( (intptr_t)read_handle, _O_RDONLY ); + command_input = _fdopen( read_fd, "r" ); + + sscanf( out, "%p", &write_handle ); + write_fd = _open_osfhandle( (intptr_t)write_handle, _O_WRONLY ); + command_output = _fdopen( write_fd, "w" ); + + command_array = child_commands; + + /* Handle the initial setup */ + /* wake up the parent */ + fputc( DEBUG_MSG_SETUP, command_output ); + debug_listen(); +} + +static void init_parent_handles( HANDLE out, HANDLE in ) +{ + command_child = _fdopen( _open_osfhandle( (intptr_t)in, _O_RDONLY ), "r" ); + command_output = _fdopen( _open_osfhandle( (intptr_t)out, _O_WRONLY ), "w" ); +} + +static void debug_parent_copy_breakpoints( void ) +{ + int i; + for ( i = 0; i < num_breakpoints; ++i ) + { + fprintf( command_output, "break %s", object_str( breakpoints[ i ].file ) ); + if ( breakpoints[ i ].line != -1 ) + { + fprintf( command_output, ":%d", breakpoints[ i ].line ); + } + fprintf( command_output, "\n" ); + + switch ( breakpoints[ i ].status ) + { + case BREAKPOINT_ENABLED: + break; + case BREAKPOINT_DISABLED: + fprintf( command_output, "disable %d\n", i + 1 ); + break; + case BREAKPOINT_DELETED: + fprintf( command_output, "delete %d\n", i + 1 ); + break; + default: + assert( !"Wrong breakpoint status." ); + } + } + fflush( command_output ); +} + +#endif + +static void debug_start_child( int argc, const char * * argv ) +{ +#if NT + char buf[ 80 ]; + HANDLE pipe1[ 2 ]; + HANDLE pipe2[ 2 ]; + string self[ 1 ]; + string command_line[ 1 ]; + SECURITY_ATTRIBUTES sa = { sizeof( SECURITY_ATTRIBUTES ), NULL, TRUE }; + PROCESS_INFORMATION pi = { NULL, NULL, 0, 0 }; + STARTUPINFOA si = { sizeof( STARTUPINFOA ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 }; + assert( debug_state == DEBUG_NO_CHILD ); + if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) ) + { + printf("internal error: CreatePipe:1: 0x%08lx\n", GetLastError()); + return; + } + if ( ! CreatePipe( &pipe2[ 0 ], &pipe2[ 1 ], &sa, 0 ) ) + { + printf("internal error: CreatePipe:2: 0x%08lx\n", GetLastError()); + CloseHandle( pipe1[ 0 ] ); + CloseHandle( pipe1[ 1 ] ); + return; + } + string_new( self ); + if ( ! get_module_filename( self ) ) + { + printf("internal error\n"); + CloseHandle( pipe1[ 0 ] ); + CloseHandle( pipe1[ 1 ] ); + CloseHandle( pipe2[ 0 ] ); + CloseHandle( pipe2[ 1 ] ); + return; + } + string_copy( command_line, "b2 " ); + /* Pass the handles as the first and second arguments. */ + string_append( command_line, debugger_opt ); + sprintf( buf, "%p", pipe1[ 0 ] ); + string_append( command_line, buf ); + string_push_back( command_line, ' ' ); + string_append( command_line, debugger_opt ); + sprintf( buf, "%p", pipe2[ 1 ] ); + string_append( command_line, buf ); + /* Pass the rest of the command line. */ + { + int i; + for ( i = 1; i < argc; ++i ) + { + string_push_back( command_line, ' ' ); + string_append( command_line, argv[ i ] ); + } + } + SetHandleInformation( pipe1[ 1 ], HANDLE_FLAG_INHERIT, 0 ); + SetHandleInformation( pipe2[ 0 ], HANDLE_FLAG_INHERIT, 0 ); + if ( ! CreateProcessA( + self->value, + command_line->value, + NULL, + NULL, + TRUE, + 0, + NULL, + NULL, + &si, + &pi + ) ) + { + printf("internal error\n"); + CloseHandle( pipe1[ 0 ] ); + CloseHandle( pipe1[ 1 ] ); + CloseHandle( pipe2[ 0 ] ); + CloseHandle( pipe2[ 1 ] ); + string_free( self ); + string_free( command_line ); + return; + } + child_pid = pi.dwProcessId; + child_handle = pi.hProcess; + CloseHandle( pi.hThread ); + CloseHandle( pipe1[ 0 ] ); + CloseHandle( pipe2[ 1 ] ); + string_free( self ); + string_free( command_line ); + + debug_state = DEBUG_RUN; + + init_parent_handles( pipe1[ 1 ], pipe2[ 0 ] ); + debug_parent_wait( 1 ); + debug_parent_copy_breakpoints(); + fprintf( command_output, "continue\n" ); + fflush( command_output ); +#else + int pipe1[2]; + int pipe2[2]; + int write_fd; + int read_fd; + int pid; + assert( debug_state == DEBUG_NO_CHILD ); + if (pipe(pipe1) == -1) + { + printf("internal error: pipe:1: %s\n", strerror(errno)); + return; + } + if (pipe(pipe2) == -1) + { + close( pipe1[ 0 ] ); + close( pipe1[ 1 ] ); + printf("internal error: pipe:2: %s\n", strerror(errno)); + return; + } + + pid = fork(); + if ( pid == -1 ) + { + /* error */ + close( pipe1[ 0 ] ); + close( pipe1[ 1 ] ); + close( pipe2[ 0 ] ); + close( pipe2[ 1 ] ); + printf("internal error: fork: %s\n", strerror(errno)); + return; + } + else if ( pid == 0 ) + { + /* child */ + extern const char * saved_argv0; + read_fd = pipe1[ 0 ]; + write_fd = pipe2[ 1 ]; + close( pipe2[ 0 ] ); + close( pipe1[ 1 ] ); + command_array = child_commands; + argv[ 0 ] = executable_path( saved_argv0 ); + debug_child_data.argc = argc; + debug_child_data.argv = argv; + command_input = fdopen( read_fd, "r" ); + command_output = fdopen( write_fd, "w" ); + longjmp( debug_child_data.jmp, 1 ); + } + else + { + /* parent */ + read_fd = pipe2[ 0 ]; + write_fd = pipe1[ 1 ]; + close( pipe1[ 0 ] ); + close( pipe2[ 1 ] ); + command_output = fdopen( write_fd, "w" ); + command_child = fdopen( read_fd, "r" ); + child_pid = pid; + } + debug_state = DEBUG_RUN; +#endif +} + +static void debug_parent_run( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_RUN ) + { + fprintf( command_output, "kill\n" ); + fflush( command_output ); + debug_parent_wait( 1 ); + } + debug_parent_run_print( argc, argv ); + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + printf( "=thread-created,id=\"1\",group-id=\"i1\"\n" ); + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + } + debug_start_child( argc, argv ); + debug_parent_wait( 1 ); +} + +static int debug_parent_forward_nowait( int argc, const char * * argv, int print_message, int require_child ) +{ + int i; + if ( debug_state == DEBUG_NO_CHILD ) + { + if ( require_child ) + printf( "The program is not being run.\n" ); + return 1; + } + fputs( argv[ 0 ], command_output ); + for( i = 1; i < argc; ++i ) + { + fputc( ' ', command_output ); + fputs( argv[ i ], command_output ); + } + fputc( '\n', command_output ); + fflush( command_output ); + return 0; +} + +/* FIXME: This function should be eliminated when I finish all stdout to the parent. */ +static void debug_parent_forward( int argc, const char * * argv, int print_message, int require_child ) +{ + if ( debug_parent_forward_nowait( argc, argv, print_message, require_child ) != 0 ) + { + return; + } + debug_parent_wait( print_message ); +} + +static void debug_parent_continue( int argc, const char * * argv ) +{ + if ( argc > 1 ) + { + debug_error( "Too many arguments to continue." ); + return; + } + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + } + debug_parent_forward( 1, argv, 1, 1 ); +} + +static void debug_parent_kill( int argc, const char * * argv ) +{ + if ( argc > 1 ) + { + debug_error( "Too many arguments to kill." ); + return; + } + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + fflush( stdout ); + } + debug_parent_forward( 1, argv, 0, 1 ); +} + +static void debug_parent_step( int argc, const char * * argv ) +{ + if ( argc > 1 ) + { + debug_error( "Too many arguments to step." ); + return; + } + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + } + debug_parent_forward( 1, argv, 1, 1 ); +} + +static void debug_parent_next( int argc, const char * * argv ) +{ + if ( argc > 1 ) + { + debug_error( "Too many arguments to next." ); + return; + } + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + } + debug_parent_forward( 1, argv, 1, 1 ); +} + +static void debug_parent_finish( int argc, const char * * argv ) +{ + if ( argc > 1 ) + { + debug_error( "Too many arguments to finish." ); + return; + } + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + } + debug_parent_forward( 1, argv, 1, 1 ); +} + +static void debug_parent_break( int argc, const char * * argv ) +{ + int id; + if ( argc < 2 ) + { + debug_error( "Missing argument to break." ); + return; + } + else if ( argc > 2 ) + { + debug_error( "Too many arguments to break." ); + return; + } + id = debug_add_breakpoint( argv[ 1 ] ); + debug_parent_forward_nowait( argc, argv, 1, 0 ); + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + printf( "Breakpoint %d set at %s\n", id, argv[ 1 ] ); + } + else if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + } + else + { + assert( !"wrong value of debug_interface." ); + } +} + +int check_breakpoint_fn_args( int argc, const char * * argv ) +{ + if ( argc < 2 ) + { + debug_error( "Missing argument to %s.", argv[ 0 ] ); + return 0; + } + else if ( argc > 2 ) + { + debug_error( "Too many arguments to %s.", argv[ 0 ] ); + return 0; + } + else + { + char * end; + long x = strtol( argv[ 1 ], &end, 10 ); + if ( *end ) + { + debug_error( "Invalid breakpoint number %s.", argv[ 1 ] ); + return 0; + } + if ( x < 1 || x > num_breakpoints || breakpoints[ x - 1 ].status == BREAKPOINT_DELETED ) + { + debug_error( "Unknown breakpoint %s.", argv[ 1 ] ); + return 0; + } + } + return 1; +} + +static void debug_parent_disable( int argc, const char * * argv ) +{ + if ( ! check_breakpoint_fn_args( argc, argv ) ) + { + return; + } + debug_child_disable( argc, argv ); + debug_parent_forward_nowait( 2, argv, 1, 0 ); + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + } +} + +static void debug_parent_enable( int argc, const char * * argv ) +{ + if ( ! check_breakpoint_fn_args( argc, argv ) ) + { + return; + } + debug_child_enable( argc, argv ); + debug_parent_forward_nowait( 2, argv, 1, 0 ); + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + } +} + +static void debug_parent_delete( int argc, const char * * argv ) +{ + if ( ! check_breakpoint_fn_args( argc, argv ) ) + { + return; + } + debug_child_delete( argc, argv ); + debug_parent_forward_nowait( 2, argv, 1, 0 ); + if ( debug_interface == DEBUG_INTERFACE_MI ) + { + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + } +} + +static void debug_parent_clear( int argc, const char * * argv ) +{ + char buf[ 16 ]; + const char * new_args[ 2 ]; + int id; + if ( argc < 2 ) + { + debug_error( "Missing argument to clear." ); + return; + } + else if ( argc > 2 ) + { + debug_error( "Too many arguments to clear." ); + return; + } + id = get_breakpoint_by_name( argv[ 1 ] ); + if ( id == 0 ) + { + debug_error( "No breakpoint at %s.", argv[ 1 ] ); + return; + } + + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + printf( "Deleted breakpoint %d\n", id ); + } + + sprintf( buf, "%d", id ); + new_args[ 0 ] = "delete"; + new_args[ 1 ] = buf; + debug_parent_delete( 2, new_args ); +} + +static void debug_parent_print( int argc, const char * * argv ) +{ + LIST * result; + if ( debug_parent_forward_nowait( argc, argv, 1, 1 ) != 0 ) + { + return; + } + result = debug_list_read( command_child ); + + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + { + list_print( result ); + printf( "\n" ); + } + else if ( debug_interface == DEBUG_INTERFACE_MI ) + { + printf( "~\"$1 = " ); + list_print( result ); + printf( "\"\n~\"\\n\"\n" ); + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + } + + list_free( result ); +} + +static void debug_parent_backtrace( int argc, const char * * argv ) +{ + const char * new_args[ 3 ]; + OBJECT * depth_str; + int depth; + int i; + FRAME_INFO frame; + + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_error( "The program is not being run." ); + return; + } + + new_args[ 0 ] = "info"; + new_args[ 1 ] = "frame"; + + fprintf( command_output, "info depth\n" ); + fflush( command_output ); + depth_str = debug_object_read( command_child ); + depth = atoi( object_str( depth_str ) ); + object_free( depth_str ); + + for ( i = 0; i < depth; ++i ) + { + char buf[ 16 ]; + sprintf( buf, "%d", i ); + new_args[ 2 ] = buf; + debug_parent_forward_nowait( 3, new_args, 0, 0 ); + debug_frame_read( command_child, &frame ); + printf( "#%d in ", i ); + debug_print_frame_info( frame ); + printf( "\n" ); + } + fflush( stdout ); +} + +static void debug_parent_quit( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_RUN ) + { + fprintf( command_output, "kill\n" ); + fflush( command_output ); + debug_parent_wait( 0 ); + } + b2::clean_exit( 0 ); +} + +static const char * const help_text[][2] = +{ + { + "run", + "run \n" + "Creates a new b2 child process passing on the command line." + " Terminates\nthe current child (if any).\n" + }, + { + "continue", + "continue\nContinue debugging\n" + }, + { + "step", + "step\nContinue to the next statement\n" + }, + { + "next", + "next\nContinue to the next line in the current frame\n" + }, + { + "finish", + "finish\nContinue to the end of the current frame\n" + }, + { + "break", + "break \n" + "Sets a breakpoint at . can be either a the name of a\nfunction or :\n" + }, + { + "disable", + "disable \nDisable a breakpoint\n" + }, + { + "enable", + "enable \nEnable a breakpoint\n" + }, + { + "delete", + "delete \nDelete a breakpoint\n" + }, + { + "clear", + "clear \nDelete the breakpoint at \n" + }, + { + "print", + "print \nDisplay the value of \n" + }, + { + "backtrace", + "backtrace\nDisplay the call stack\n" + }, + { + "kill", + "kill\nTerminate the child\n" + }, + { + "quit", + "quit\nExit the debugger\n" + }, + { + "help", + "help\nhelp \nShow help for debugger commands.\n" + }, + { 0, 0 } +}; + +static void debug_parent_help( int argc, const char * * argv ) +{ + if ( argc == 1 ) + { + printf( + "run - Start debugging\n" + "continue - Continue debugging\n" + "step - Continue to the next statement\n" + "next - Continue to the next line in the current frame\n" + "finish - Continue to the end of the current frame\n" + "break - Set a breakpoint\n" + "disable - Disable a breakpoint\n" + "enable - Enable a breakpoint\n" + "delete - Delete a breakpoint\n" + "clear - Delete a breakpoint by location\n" + ); + printf( + "print - Display an expression\n" + "backtrace - Display the call stack\n" + "kill - Terminate the child\n" + "quit - Exit the debugger\n" + "help - Debugger help\n" + ); + } + else if ( argc == 2 ) + { + int i; + for ( i = 0; help_text[ i ][ 0 ]; ++i ) + { + if ( strcmp( argv[ 1 ], help_text[ i ][ 0 ] ) == 0 ) + { + printf( "%s", help_text[ i ][ 1 ] ); + return; + } + } + printf( "No command named %s\n", argv[ 1 ] ); + } +} + +static void debug_mi_break_insert( int argc, const char * * argv ); +static void debug_mi_break_delete( int argc, const char * * argv ); +static void debug_mi_break_disable( int argc, const char * * argv ); +static void debug_mi_break_enable( int argc, const char * * argv ); +static void debug_mi_break_info( int argc, const char * * argv ); +static void debug_mi_break_list( int argc, const char * * argv ); +static void debug_mi_inferior_tty_set( int argc, const char * * argv ); +static void debug_mi_gdb_exit( int argc, const char * * argv ); +static void debug_mi_gdb_set( int argc, const char * * argv ); +static void debug_mi_gdb_show( int argc, const char * * argv ); +static void debug_mi_not_implemented( int argc, const char * * argv ); +static void debug_mi_file_list_exec_source_files( int argc, const char * * argv ); +static void debug_mi_file_list_exec_source_file( int argc, const char * * argv ); +static void debug_mi_thread_info( int argc, const char * * argv ); +static void debug_mi_thread_select( int argc, const char * * argv ); +static void debug_mi_stack_info_frame( int argc, const char * * argv ); +static void debug_mi_stack_select_frame( int argc, const char * * argv ); +static void debug_mi_stack_list_variables( int argc, const char * * argv ); +static void debug_mi_stack_list_locals( int argc, const char * * argv ); +static void debug_mi_stack_list_frames( int argc, const char * * argv ); +static void debug_mi_list_target_features( int argc, const char * * argv ); +static void debug_mi_exec_run( int argc, const char * * argv ); +static void debug_mi_exec_continue( int argc, const char * * argv ); +static void debug_mi_exec_step( int argc, const char * * argv ); +static void debug_mi_exec_next( int argc, const char * * argv ); +static void debug_mi_exec_finish( int argc, const char * * argv ); +static void debug_mi_data_list_register_names( int argc, const char * * argv ); +static void debug_mi_data_evaluate_expression( int argc, const char * * argv ); +static void debug_mi_interpreter_exec( int argc, const char * * argv ); + +static struct command_elem parent_commands[] = +{ + { "run", &debug_parent_run }, + { "continue", &debug_parent_continue }, + { "kill", &debug_parent_kill }, + { "step", &debug_parent_step }, + { "next", &debug_parent_next }, + { "finish", &debug_parent_finish }, + { "break", &debug_parent_break }, + { "disable", &debug_parent_disable }, + { "enable", &debug_parent_enable }, + { "delete", &debug_parent_delete }, + { "clear", &debug_parent_clear }, + { "print", &debug_parent_print }, + { "backtrace", &debug_parent_backtrace }, + { "quit", &debug_parent_quit }, + { "help", &debug_parent_help }, + { "-break-insert", &debug_mi_break_insert }, + { "-break-delete", &debug_mi_break_delete }, + { "-break-disable", &debug_mi_break_disable }, + { "-break-enable", &debug_mi_break_enable }, + { "-break-info", &debug_mi_break_info }, + { "-break-list", &debug_mi_break_list }, + { "-inferior-tty-set", &debug_mi_inferior_tty_set }, + { "-gdb-exit", &debug_mi_gdb_exit }, + { "-gdb-set", &debug_mi_gdb_set }, + { "-gdb-show", &debug_mi_gdb_show }, + { "-enable-pretty-printing", &debug_mi_not_implemented }, + { "-file-list-exec-source-files", &debug_mi_file_list_exec_source_files }, + { "-file-list-exec-source-file", &debug_mi_file_list_exec_source_file }, + { "-thread-info", &debug_mi_thread_info }, + { "-thread-select", &debug_mi_thread_select }, + { "-stack-info-frame", &debug_mi_stack_info_frame }, + { "-stack-select-frame", &debug_mi_stack_select_frame }, + { "-stack-list-variables", &debug_mi_stack_list_variables }, + { "-stack-list-locals", &debug_mi_stack_list_locals }, + { "-stack-list-frames", &debug_mi_stack_list_frames }, + { "-list-target-features", &debug_mi_list_target_features }, + { "-exec-run", &debug_mi_exec_run }, + { "-exec-continue", &debug_mi_exec_continue }, + { "-exec-step", &debug_mi_exec_step }, + { "-exec-next", &debug_mi_exec_next }, + { "-exec-finish", &debug_mi_exec_finish }, + { "-data-list-register-names", &debug_mi_data_list_register_names }, + { "-data-evaluate-expression", &debug_mi_data_evaluate_expression }, + { "-interpreter-exec", &debug_mi_interpreter_exec }, + { NULL, NULL } +}; + +static void debug_mi_format_token( void ) +{ + if ( current_token != 0 ) + { + printf( "%d", current_token ); + } +} + +static void debug_mi_format_breakpoint( int id ) +{ + struct breakpoint * ptr = &breakpoints[ id - 1 ]; + printf( "bkpt={" ); + printf( "number=\"%d\"", id ); + printf( ",type=\"breakpoint\"" ); + printf( ",disp=\"keep\"" ); /* FIXME: support temporary breakpoints. */ + printf( ",enabled=\"%s\"", ptr->status == BREAKPOINT_ENABLED ? "y" : "n" ); + /* addr */ + if ( ptr->line == -1 ) + { + printf( ",func=\"%s\"", object_str( ptr->file ) ); + } + else + { + printf( ",file=\"%s\"", object_str( ptr->file ) ); + printf( ",line=\"%d\"", ptr->line ); + printf( ",fullname=\"%s\"", object_str( ptr->file ) ); + } + /* fullname */ + /* times */ + // printf( "" ); + printf( "}" ); +} + +static int breakpoint_id_parse( const char * name ) +{ + int id = atoi( name ); + if ( id > num_breakpoints || id < 1 || breakpoints[ id ].status == BREAKPOINT_DELETED ) + return -1; + return id; +} + +static void debug_mi_break_insert( int argc, const char * * argv ) +{ + const char * inner_argv[ 2 ]; + // int temporary = 0; /* FIXME: not supported yet */ + // int hardware = 0; /* unsupported */ + // int force = 1; /* We don't have global debug information... */ + int disabled = 0; + // int tracepoint = 0; /* unsupported */ + // int thread_id = 0; + // int ignore_count = 0; + // const char * condition; /* FIXME: not supported yet */ + const char * location; + int id; + for ( --argc, ++argv; argc; --argc, ++argv ) + { + if ( strcmp( *argv, "-t" ) == 0 ) + { + // temporary = 1; + } + else if ( strcmp( *argv, "-h" ) == 0 ) + { + // hardware = 1; + } + else if ( strcmp( *argv, "-f" ) == 0 ) + { + // force = 1; + } + else if ( strcmp( *argv, "-d" ) == 0 ) + { + disabled = 1; + } + else if ( strcmp( *argv, "-a" ) == 0 ) + { + // tracepoint = 1; + } + else if ( strcmp( *argv, "-c" ) == 0 ) + { + if ( argc < 2 ) + { + debug_mi_error( "Missing argument for -c." ); + return; + } + + // condition = argv[ 1 ]; + --argc; + ++argv; + } + else if ( strcmp( *argv, "-i" ) == 0 ) + { + if ( argc < 2 ) + { + debug_mi_error( "Missing argument for -i." ); + return; + } + + // ignore_count = atoi( argv[ 1 ] ); + --argc; + ++argv; + } + else if ( strcmp( *argv, "-p" ) == 0 ) + { + if ( argc < 2 ) + { + debug_mi_error( "Missing argument for -p." ); + return; + } + + // thread_id = atoi( argv[ 1 ] ); + --argc; + ++argv; + } + else if ( strcmp( *argv, "--" ) == 0 ) + { + --argc; + ++argv; + break; + } + else if ( **argv != '-' ) + { + break; + } + else + { + debug_mi_error( "Unknown argument." ); + return; + } + } + if ( argc > 1 ) + { + debug_mi_error( "Too many arguments for -break-insert." ); + return; + } + + if ( argc == 1 ) + { + location = *argv; + } + else + { + debug_mi_error( "Not implemented: -break-insert with no location." ); + return; + } + inner_argv[ 0 ] = "break"; + inner_argv[ 1 ] = location; + + id = debug_add_breakpoint( location ); + debug_parent_forward_nowait( 2, inner_argv, 1, 0 ); + + if ( disabled ) + { + char buf[ 80 ]; + sprintf( buf, "%d", num_breakpoints ); + inner_argv[ 0 ] = "disable"; + inner_argv[ 1 ] = buf; + debug_child_disable( 2, inner_argv ); + debug_parent_forward_nowait( 2, inner_argv, 1, 0 ); + } + + debug_mi_format_token(); + printf( "^done," ); + debug_mi_format_breakpoint( id ); + printf( "\n(gdb) \n" ); +} + +static void debug_mi_break_delete( int argc, const char * * argv ) +{ + if ( argc < 2 ) + { + debug_mi_error( "Not enough arguments for -break-delete" ); + return; + } + for ( --argc, ++argv; argc; --argc, ++argv ) + { + const char * inner_argv[ 2 ]; + int id = breakpoint_id_parse( *argv ); + if ( id == -1 ) + { + debug_mi_error( "Not a valid breakpoint" ); + return; + } + inner_argv[ 0 ] = "delete"; + inner_argv[ 1 ] = *argv; + debug_parent_delete( 2, inner_argv ); + } +} + +static void debug_mi_break_enable( int argc, const char * * argv ) +{ + if ( argc < 2 ) + { + debug_mi_error( "Not enough arguments for -break-enable" ); + return; + } + for ( --argc, ++argv; argc; --argc, ++argv ) + { + const char * inner_argv[ 2 ]; + int id = breakpoint_id_parse( *argv ); + if ( id == -1 ) + { + debug_mi_error( "Not a valid breakpoint" ); + return; + } + inner_argv[ 0 ] = "enable"; + inner_argv[ 1 ] = *argv; + debug_parent_enable( 2, inner_argv ); + } +} + +static void debug_mi_break_disable( int argc, const char * * argv ) +{ + if ( argc < 2 ) + { + debug_mi_error( "Not enough arguments for -break-disable" ); + return; + } + for ( --argc, ++argv; argc; --argc, ++argv ) + { + const char * inner_argv[ 2 ]; + int id = breakpoint_id_parse( *argv ); + if ( id == -1 ) + { + debug_mi_error( "Not a valid breakpoint" ); + return; + } + inner_argv[ 0 ] = "disable"; + inner_argv[ 1 ] = *argv; + debug_parent_disable( 2, inner_argv ); + } +} + +static void debug_mi_format_breakpoint_header_col( int width, int alignment, const char * col_name, const char * colhdr ) +{ + printf( "{width=\"%d\",alignment=\"%d\",col_name=\"%s\",colhdr=\"%s\"}", width, alignment, col_name, colhdr ); +} + +static void debug_mi_format_breakpoint_hdr( void ) +{ + printf( "hdr=[" ); + debug_mi_format_breakpoint_header_col( 7, -1, "number", "Num" ); + printf( "," ); + debug_mi_format_breakpoint_header_col( 14, -1, "type", "Type" ); + printf( "," ); + debug_mi_format_breakpoint_header_col( 4, -1, "disp", "Disp" ); + printf( "," ); + debug_mi_format_breakpoint_header_col( 3, -1, "enabled", "Enb" ); + printf( "," ); + debug_mi_format_breakpoint_header_col( 10, -1, "addr", "Address" ); + printf( "," ); + debug_mi_format_breakpoint_header_col( 40, 2, "what", "What" ); + printf( "]" ); +} + +static void debug_mi_break_info( int argc, const char * * argv ) +{ + int id; + --argc; + ++argv; + if ( strcmp( *argv, "--" ) == 0 ) + { + --argc; + ++argv; + } + if ( argc < 1 ) + { + debug_mi_error( "Not enough arguments for -break-info" ); + return; + } + if ( argc > 1 ) + { + debug_mi_error( "Too many arguments for -break-info" ); + } + + id = breakpoint_id_parse( *argv ); + if ( id == -1 ) + { + debug_mi_error( "No such breakpoint." ); + return; + } + + printf( "^done,BreakpointTable={" + "nr_rows=\"%d\",nr_cols=\"6\",", 1 ); + debug_mi_format_breakpoint_hdr(); + printf( ",body=[" ); + debug_mi_format_breakpoint( id ); + printf( "]}" ); + printf("\n(gdb) \n"); +} + +static void debug_mi_break_list( int argc, const char * * argv ) +{ + int number; + int i; + int first; + if ( argc > 2 || ( argc == 2 && strcmp( argv[ 1 ], "--" ) ) ) + { + debug_mi_error( "Too many arguments for -break-list" ); + return; + } + + number = 0; + for ( i = 0; i < num_breakpoints; ++i ) + if ( breakpoints[ i ].status != BREAKPOINT_DELETED ) + ++number; + debug_mi_format_token(); + printf( "^done,BreakpointTable={" + "nr_rows=\"%d\",nr_cols=\"6\",", number ); + debug_mi_format_breakpoint_hdr(); + printf( ",body=[" ); + first = 1; + for ( i = 0; i < num_breakpoints; ++i ) + if ( breakpoints[ i ].status != BREAKPOINT_DELETED ) + { + if ( first ) first = 0; + else printf( "," ); + debug_mi_format_breakpoint( i + 1 ); + } + printf( "]}" ); + printf("\n(gdb) \n"); +} + +static void debug_mi_inferior_tty_set( int argc, const char * * argv ) +{ + /* FIXME: implement this for real */ + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); +} + +static void debug_mi_gdb_exit( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_RUN ) + { + fprintf( command_output, "kill\n" ); + fflush( command_output ); + debug_parent_wait( 0 ); + } + debug_mi_format_token(); + printf( "^exit\n" ); + b2::clean_exit( EXIT_SUCCESS ); +} + +static void debug_mi_gdb_set( int argc, const char * * argv ) +{ + /* FIXME: implement this for real */ + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); +} + +static void debug_mi_gdb_show( int argc, const char * * argv ) +{ + const char * value = ""; + /* FIXME: implement this for real */ + debug_mi_format_token(); + value = "(gdb) "; + printf( "^done,value=\"%s\"\n(gdb) \n", value ); +} + +static void debug_mi_not_implemented( int argc, const char * * argv ) +{ + /* FIXME: implement this for real */ + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); +} + +void debug_mi_file_list_exec_source_files( int argc, const char * * argv ) +{ + /* FIXME: implement this for real */ + debug_mi_format_token(); + printf( "^done,files=[]\n(gdb) \n" ); +} + +static void debug_mi_file_list_exec_source_file( int argc, const char * * argv ) +{ + /* FIXME: implement this for real */ + debug_mi_format_token(); + printf( "^error,msg=\"Don't know how to handle this yet\"\n(gdb) \n" ); +} + +static void debug_mi_thread_info( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_mi_format_token(); + printf( "^done,threads=[]\n(gdb) \n" ); + } + else + { + const char * new_args[] = { "info", "frame" }; + FRAME_INFO info; + debug_parent_forward_nowait( 2, new_args, 0, 0 ); + debug_frame_read( command_child, &info ); + + debug_mi_format_token(); + printf( "^done,threads=[{id=\"1\"," ); + debug_mi_print_frame_info( &info ); + printf( "}],current-thread-id=\"1\"\n(gdb) \n" ); + } +} + +static void debug_mi_thread_select( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + /* FIXME: better error handling*/ + debug_mi_format_token(); + printf( "^error,msg=\"Thread ID 1 not known\"\n(gdb) \n" ); + } + else + { + const char * new_args[] = { "info", "frame" }; + FRAME_INFO info; + debug_parent_forward_nowait( 2, new_args, 0, 0 ); + debug_frame_read( command_child, &info ); + + debug_mi_format_token(); + printf( "^done,new-thread-id=\"1\"," ); + debug_mi_print_frame_info( &info ); + printf( "\n(gdb) \n" ); + } +} + +static void debug_mi_stack_select_frame( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_mi_format_token(); + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + const char * new_args[ 2 ]; + new_args[ 0 ] = "frame"; + new_args[ 1 ] = argv[ 1 ]; + debug_parent_forward_nowait( 2, new_args, 0, 0 ); + debug_mi_format_token(); + printf( "^done\n(gdb) \n" ); + } +} + +static void debug_mi_stack_info_frame( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_mi_format_token(); + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + FRAME_INFO info; + fprintf( command_output, "info frame\n" ); + fflush( command_output ); + debug_frame_read( command_child, &info ); + debug_mi_format_token(); + printf( "^done," ); + debug_mi_print_frame_info( &info ); + printf( "\n(gdb) \n" ); + } +} + +static void debug_mi_stack_list_variables( int argc, const char * * argv ) +{ +#define DEBUG_PRINT_VARIABLES_NO_VALUES 1 +#define DEBUG_PRINT_VARIABLES_ALL_VALUES 2 +#define DEBUG_PRINT_VARIABLES_SIMPLE_VALUES 3 + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_mi_format_token(); + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + return; + } + --argc; + ++argv; + for ( ; argc; --argc, ++argv ) + { + if ( strcmp( *argv, "--thread" ) == 0 ) + { + /* Only one thread. */ + --argc; + ++argv; + } + else if ( strcmp( *argv, "--no-values" ) == 0 ) + { + // print_values = DEBUG_PRINT_VARIABLES_NO_VALUES; + } + else if ( strcmp( *argv, "--all-values" ) == 0 ) + { + // print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES; + } + else if ( strcmp( *argv, "--simple-values" ) == 0 ) + { + // print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES; + } + else if ( strcmp( *argv, "--" ) == 0 ) + { + --argc; + ++argv; + break; + } + else if ( argv[ 0 ][ 0 ] == '-' ) + { + debug_mi_format_token(); + printf( "^error,msg=\"Unknown argument %s\"\n(gdb) \n", *argv ); + return; + } + else + { + break; + } + } + if ( argc != 0 ) + { + debug_mi_format_token(); + printf( "^error,msg=\"Too many arguments for -stack-list-variables\"\n(gdb) \n" ); + return; + } + + { + LIST * vars; + LISTITER iter, end; + int first = 1; + fprintf( command_output, "info locals\n" ); + fflush( command_output ); + vars = debug_list_read( command_child ); + debug_parent_wait( 0 ); + debug_mi_format_token(); + printf( "^done,variables=[" ); + for ( iter = list_begin( vars ), end = list_end( vars ); iter != end; iter = list_next( iter ) ) + { + OBJECT * varname = list_item( iter ); + string varbuf[1]; + const char * new_args[2]; + if ( first ) + { + first = 0; + } + else + { + printf( "," ); + } + printf( "{name=\"%s\",value=\"", object_str( varname ) ); + fflush( stdout ); + string_new( varbuf ); + string_append( varbuf, "$(" ); + string_append( varbuf, object_str( varname ) ); + string_append( varbuf, ")" ); + new_args[ 0 ] = "print"; + new_args[ 1 ] = varbuf->value; + debug_parent_forward( 2, new_args, 0, 0 ); + string_free( varbuf ); + printf( "\"}" ); + } + printf( "]\n(gdb) \n" ); + fflush( stdout ); + list_free( vars ); + } +} + +static void debug_mi_stack_list_locals( int argc, const char * * argv ) +{ +#define DEBUG_PRINT_VARIABLES_NO_VALUES 1 +#define DEBUG_PRINT_VARIABLES_ALL_VALUES 2 +#define DEBUG_PRINT_VARIABLES_SIMPLE_VALUES 3 + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_mi_format_token(); + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + return; + } + --argc; + ++argv; + for ( ; argc; --argc, ++argv ) + { + if ( strcmp( *argv, "--thread" ) == 0 ) + { + /* Only one thread. */ + --argc; + ++argv; + if ( argc == 0 ) + { + debug_mi_format_token(); + printf( "^error,msg=\"Argument required for --thread.\"" ); + return; + } + } + else if ( strcmp( *argv, "--no-values" ) == 0 ) + { + // print_values = DEBUG_PRINT_VARIABLES_NO_VALUES; + } + else if ( strcmp( *argv, "--all-values" ) == 0 ) + { + // print_values = DEBUG_PRINT_VARIABLES_ALL_VALUES; + } + else if ( strcmp( *argv, "--simple-values" ) == 0 ) + { + // print_values = DEBUG_PRINT_VARIABLES_SIMPLE_VALUES; + } + else if ( strcmp( *argv, "--" ) == 0 ) + { + --argc; + ++argv; + break; + } + else if ( argv[ 0 ][ 0 ] == '-' ) + { + debug_mi_format_token(); + printf( "^error,msg=\"Unknown argument %s\"\n(gdb) \n", *argv ); + return; + } + else + { + break; + } + } + if ( argc != 0 ) + { + debug_mi_format_token(); + printf( "^error,msg=\"Too many arguments for -stack-list-variables\"\n(gdb) \n" ); + return; + } + + { + LIST * vars; + LISTITER iter, end; + int first = 1; + fprintf( command_output, "info locals\n" ); + fflush( command_output ); + vars = debug_list_read( command_child ); + debug_parent_wait( 0 ); + debug_mi_format_token(); + printf( "^done,locals=[" ); + for ( iter = list_begin( vars ), end = list_end( vars ); iter != end; iter = list_next( iter ) ) + { + OBJECT * varname = list_item( iter ); + string varbuf[1]; + const char * new_args[2]; + if ( first ) + { + first = 0; + } + else + { + printf( "," ); + } + printf( "{name=\"%s\",type=\"list\",value=\"", object_str( varname ) ); + fflush( stdout ); + string_new( varbuf ); + string_append( varbuf, "$(" ); + string_append( varbuf, object_str( varname ) ); + string_append( varbuf, ")" ); + new_args[ 0 ] = "print"; + new_args[ 1 ] = varbuf->value; + debug_parent_forward( 2, new_args, 0, 0 ); + string_free( varbuf ); + printf( "\"}" ); + } + printf( "]\n(gdb) \n" ); + fflush( stdout ); + list_free( vars ); + } +} + +static void debug_mi_stack_list_frames( int argc, const char * * argv ) +{ + int depth; + int i; + + if ( debug_state == DEBUG_NO_CHILD ) + { + debug_mi_format_token(); + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + return; + } + + fprintf( command_output, "info depth\n" ); + fflush( command_output ); + depth = debug_int_read( command_child ); + + debug_mi_format_token(); + printf( "^done,stack=[" ); + for ( i = 0; i < depth; ++i ) + { + FRAME_INFO frame; + fprintf( command_output, "info frame %d\n", i ); + fflush( command_output ); + if ( i != 0 ) + { + printf( "," ); + } + debug_frame_read( command_child, &frame ); + debug_mi_print_frame_info( &frame ); + } + printf( "]\n(gdb) \n" ); + fflush( stdout ); +} + +static void debug_mi_list_target_features( int argc, const char * * argv ) +{ + /* FIXME: implement this for real */ + debug_mi_format_token(); + printf( "^done,features=[\"async\"]\n(gdb) \n" ); +} + +static void debug_mi_exec_run( int argc, const char * * argv ) +{ + printf( "=thread-created,id=\"1\",group-id=\"i1\"\n" ); + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + debug_start_child( argc, argv ); + debug_parent_wait( 1 ); +} + +static void debug_mi_exec_continue( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + const char * new_args[] = { "continue" }; + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + debug_parent_forward( 1, new_args, 1, 0 ); + } +} + +static void debug_mi_exec_step( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + const char * new_args[] = { "step" }; + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + debug_parent_forward( 1, new_args, 1, 0 ); + } +} + +static void debug_mi_exec_next( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + const char * new_args[] = { "next" }; + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + debug_parent_forward( 1, new_args, 1, 0 ); + } +} + +static void debug_mi_exec_finish( int argc, const char * * argv ) +{ + if ( debug_state == DEBUG_NO_CHILD ) + { + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + const char * new_args[] = { "finish" }; + debug_mi_format_token(); + printf( "^running\n(gdb) \n" ); + fflush( stdout ); + debug_parent_forward( 1, new_args, 1, 0 ); + } +} + +static void debug_mi_data_list_register_names( int argc, const char * * argv ) +{ + debug_mi_format_token(); + printf( "^done,register-names=[]\n(gdb) \n" ); +} + +static void debug_mi_data_evaluate_expression( int argc, const char * * argv ) +{ + if ( argc < 2 ) + { + printf( "^error,msg=\"Not enough arguments for -data-evaluate-expression\"\n(gdb) \n" ); + } + if ( debug_state == DEBUG_NO_CHILD ) + { + printf( "^error,msg=\"No child\"\n(gdb) \n" ); + } + else + { + const char * new_args[ 2 ]; + debug_mi_format_token(); + printf( "^done,value=\"" ); + fflush( stdout ); + new_args[ 0 ] = "print"; + new_args[ 1 ] = argv[ 1 ]; + debug_parent_forward( 2, new_args, 1, 0 ); + printf( "\"\n(gdb) \n" ); + } +} + +static int process_command( char * command ); + +static void debug_mi_interpreter_exec( int argc, const char * * argv ) +{ + if ( argc < 3 ) + { + debug_mi_error( "Not enough arguments for -interpreter-exec" ); + } + process_command( (char *)argv[ 2 ] ); +} + +/* The debugger's main loop. */ +int debugger( void ) +{ + command_array = parent_commands; + command_input = stdin; + if ( debug_interface == DEBUG_INTERFACE_MI ) + printf( "=thread-group-added,id=\"i1\"\n(gdb) \n" ); + while ( 1 ) + { + if ( debug_interface == DEBUG_INTERFACE_CONSOLE ) + printf("(b2db) "); + fflush( stdout ); + read_command(); + } + return 0; +} + + +/* Runs the matching command in the current command_array. */ +static int run_command( int argc, const char * * argv ) +{ + struct command_elem * command; + const char * command_name; + if ( argc == 0 ) + { + return 1; + } + command_name = argv[ 0 ]; + /* Skip the GDB/MI token when choosing the command to run. */ + while( isdigit( *command_name ) ) ++command_name; + current_token = atoi( argv[ 0 ] ); + for( command = command_array; command->key; ++command ) + { + if ( strcmp( command->key, command_name ) == 0 ) + { + ( *command->command )( argc, argv ); + return 1; + } + } + debug_error( "Unknown command: %s", command_name ); + return 0; +} + +/* Parses a single command into whitespace separated tokens, and runs it. */ +static int process_command( char * line ) +{ + int result; + size_t capacity = 8; + std::vector tokens; + tokens.reserve(capacity); + char * iter = line; + char * saved = iter; + for ( ; ; ) + { + /* skip spaces */ + while ( *iter && isspace( *iter ) ) + { + ++iter; + } + if ( ! *iter ) + { + break; + } + /* Find the next token */ + saved = iter; + if ( *iter == '\"' ) + { + saved = ++iter; + /* FIXME: handle escaping */ + while ( *iter && *iter != '\"' ) + { + ++iter; + } + } + else + { + while ( *iter && ! isspace( *iter ) ) + { + ++iter; + } + } + /* append the token to the buffer */ + tokens.push_back(saved); + /* null terminate the token */ + if ( *iter ) + { + *iter++ = '\0'; + } + } + result = run_command( (int) tokens.size(), const_cast( &tokens[0] ) ); + return result; +} + +static int read_command( void ) +{ + int result; + int ch; + string line[ 1 ]; + auto line_delete = b2::jam::make_unique_bare_jptr( line, string_new, string_free ); + /* HACK: force line to be on the heap. */ + string_reserve( line, 64 ); + while( ( ch = fgetc( command_input ) ) != EOF ) + { + if ( ch == '\n' ) + { + break; + } + else + { + string_push_back( line, (char)ch ); + } + } + result = process_command( line->value ); + return result; +} + +static void debug_listen( void ) +{ + debug_state = DEBUG_STOPPED; + while ( debug_state == DEBUG_STOPPED ) + { + if ( feof( command_input ) ) + b2::clean_exit( 1 ); + fflush(stdout); + fflush( command_output ); + read_command(); + } + debug_selected_frame_number = 0; +} + +struct debug_child_data_t debug_child_data; +const char debugger_opt[] = "--b2db-internal-debug-handle="; +int debug_interface; diff --git a/src/boost/tools/build/src/engine/debugger.h b/src/boost/tools/build/src/engine/debugger.h new file mode 100644 index 000000000..d0bd1c689 --- /dev/null +++ b/src/boost/tools/build/src/engine/debugger.h @@ -0,0 +1,64 @@ +/* + * Copyright 2015 Steven Watanabe + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef DEBUGGER_SW20150314_H +#define DEBUGGER_SW20150314_H + +#include "config.h" +#include +#include "object.h" +#include "frames.h" + +#ifdef JAM_DEBUGGER + +void debug_on_instruction( FRAME * frame, OBJECT * file, int line ); +void debug_on_enter_function( FRAME * frame, OBJECT * name, OBJECT * file, int line ); +void debug_on_exit_function( OBJECT * name ); +int debugger( void ); + +struct debug_child_data_t +{ + int argc; + const char * * argv; + jmp_buf jmp; +}; + +extern struct debug_child_data_t debug_child_data; +extern LIST * debug_print_result; +extern const char debugger_opt[]; +extern int debug_interface; + +#define DEBUG_INTERFACE_CONSOLE 1 +#define DEBUG_INTERFACE_MI 2 +#define DEBUG_INTERFACE_CHILD 3 + +#define debug_is_debugging() ( debug_interface != 0 ) +#define debug_on_enter_function( frame, name, file, line ) \ + ( debug_is_debugging()? \ + debug_on_enter_function( frame, name, file, line ) : \ + (void)0 ) +#define debug_on_exit_function( name ) \ + ( debug_is_debugging()? \ + debug_on_exit_function( name ) : \ + (void)0 ) + +#if NT + +void debug_init_handles( const char * in, const char * out ); + +#endif + +#else + +#define debug_on_instruction( frame, file, line ) ( ( void )0 ) +#define debug_on_enter_function( frame, name, file, line ) ( ( void )0 ) +#define debug_on_exit_function( name ) ( ( void )0 ) +#define debug_is_debugging() ( 0 ) + +#endif + +#endif diff --git a/src/boost/tools/build/src/engine/execcmd.cpp b/src/boost/tools/build/src/engine/execcmd.cpp new file mode 100644 index 000000000..dfbd5a7f8 --- /dev/null +++ b/src/boost/tools/build/src/engine/execcmd.cpp @@ -0,0 +1,122 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * Copyright 2007 Noel Belcourt. + * + * Utility functions shared between different exec*.c platform specific + * implementation modules. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +#include "jam.h" +#include "execcmd.h" +#include "output.h" + +#include +#include +#include + + +/* Internal interrupt counter. */ +static int intr; + + +/* Constructs a list of command-line elements using the format specified by the + * given shell list. + * + * Given argv array should have at least MAXARGC + 1 elements. + * Slot numbers may be between 0 and 998 (inclusive). + * + * Constructed argv list will be zero terminated. Character arrays referenced by + * the argv structure elements will be either elements from the give shell list, + * internal static buffers or the given command string and should thus not + * considered owned by or released via the argv structure and should be + * considered invalidated by the next argv_from_shell() call. + * + * Shell list elements: + * - Starting with '%' - represent the command string. + * - Starting with '!' - represent the slot number (increased by one). + * - Anything else - used as a literal. + * - If no '%' element is found, the command string is appended as an extra. + */ + +void argv_from_shell( char const * * argv, LIST * shell, char const * command, + int32_t const slot ) +{ + static char jobno[ 12 ]; + + int i; + int gotpercent = 0; + LISTITER iter = list_begin( shell ); + LISTITER end = list_end( shell ); + + assert( 0 <= slot ); + assert( slot < 999 ); + sprintf( jobno, "%d", slot + 1 ); + + for ( i = 0; iter != end && i < MAXARGC; ++i, iter = list_next( iter ) ) + { + switch ( object_str( list_item( iter ) )[ 0 ] ) + { + case '%': argv[ i ] = command; ++gotpercent; break; + case '!': argv[ i ] = jobno; break; + default : argv[ i ] = object_str( list_item( iter ) ); + } + } + + if ( !gotpercent ) + argv[ i++ ] = command; + + argv[ i ] = NULL; +} + + +/* Returns whether the given command string contains lines longer than the given + * maximum. + */ +int check_cmd_for_too_long_lines( char const * command, int32_t max, + int32_t * const error_length, int32_t * const error_max_length ) +{ + while ( *command ) + { + int32_t const l = int32_t(strcspn( command, "\n" )); + if ( l > max ) + { + *error_length = l; + *error_max_length = max; + return EXEC_CHECK_LINE_TOO_LONG; + } + command += l; + if ( *command ) + ++command; + } + return EXEC_CHECK_OK; +} + + +/* Checks whether the given shell list is actually a request to execute raw + * commands without an external shell. + */ +int is_raw_command_request( LIST * shell ) +{ + return !list_empty( shell ) && + !strcmp( object_str( list_front( shell ) ), "%" ) && + list_next( list_begin( shell ) ) == list_end( shell ); +} + + +/* Returns whether an interrupt has been detected so far. */ + +int interrupted( void ) +{ + return intr != 0; +} + + +/* Internal interrupt handler. */ + +void onintr( int disp ) +{ + ++intr; + out_printf( "...interrupted\n" ); +} diff --git a/src/boost/tools/build/src/engine/execcmd.h b/src/boost/tools/build/src/engine/execcmd.h new file mode 100644 index 000000000..293822b30 --- /dev/null +++ b/src/boost/tools/build/src/engine/execcmd.h @@ -0,0 +1,119 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * execcmd.h - execute a shell script. + * + * Defines the interface to be implemented in platform specific implementation + * modules as well as different shared utility functions prepared in the + * execcmd.c module. + */ + +#ifndef EXECCMD_H +#define EXECCMD_H + +#include "config.h" +#include "lists.h" +#include "jam_strings.h" +#include "timestamp.h" + + +typedef struct timing_info +{ + double system; + double user; + timestamp start; + timestamp end; +} timing_info; + +typedef void (* ExecCmdCallback) +( + void * const closure, + int const status, + timing_info const * const, + char const * const cmd_stdout, + char const * const cmd_stderr, + int const cmd_exit_reason +); + +/* Global initialization. Must be called after setting + * globs.jobs. May be called multiple times. */ +void exec_init( void ); +/* Global cleanup */ +void exec_done( void ); + +/* Status codes passed to ExecCmdCallback routines. */ +#define EXEC_CMD_OK 0 +#define EXEC_CMD_FAIL 1 +#define EXEC_CMD_INTR 2 + +int exec_check +( + string const * command, + LIST * * pShell, + int32_t * error_length, + int32_t * error_max_length +); + +/* exec_check() return codes. */ +#define EXEC_CHECK_OK 101 +#define EXEC_CHECK_NOOP 102 +#define EXEC_CHECK_LINE_TOO_LONG 103 +#define EXEC_CHECK_TOO_LONG 104 + +/* Prevents action output from being written + * immediately to stdout/stderr. + */ +#define EXEC_CMD_QUIET 1 + +void exec_cmd +( + string const * command, + int flags, + ExecCmdCallback func, + void * closure, + LIST * shell +); + +void exec_wait(); + + +/****************************************************************************** + * * + * Utility functions defined in the execcmd.c module. * + * * + ******************************************************************************/ + +/* Constructs a list of command-line elements using the format specified by the + * given shell list. + */ +void argv_from_shell( char const * * argv, LIST * shell, char const * command, + int32_t const slot ); + +/* Interrupt routine bumping the internal interrupt counter. Needs to be + * registered by platform specific exec*.c modules. + */ +void onintr( int disp ); + +/* Returns whether an interrupt has been detected so far. */ +int interrupted( void ); + +/* Checks whether the given shell list is actually a request to execute raw + * commands without an external shell. + */ +int is_raw_command_request( LIST * shell ); + +/* Utility worker for exec_check() checking whether all the given command lines + * are under the specified length limit. + */ +int check_cmd_for_too_long_lines( char const * command, int32_t max, + int32_t * const error_length, int32_t * const error_max_length ); + +/* Maximum shell command line length. + */ +int32_t shell_maxline(); + +#endif diff --git a/src/boost/tools/build/src/engine/execnt.cpp b/src/boost/tools/build/src/engine/execnt.cpp new file mode 100644 index 000000000..1cf627f2f --- /dev/null +++ b/src/boost/tools/build/src/engine/execnt.cpp @@ -0,0 +1,1389 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2007 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * execnt.c - execute a shell command on Windows NT + * + * If $(JAMSHELL) is defined, uses that to formulate the actual command. The + * default is: cmd.exe /Q/C + * + * In $(JAMSHELL), % expands to the command string and ! expands to the slot + * number (starting at 1) for multiprocess (-j) invocations. If $(JAMSHELL) does + * not include a %, it is tacked on as the last argument. + * + * Each $(JAMSHELL) placeholder must be specified as a separate individual + * element in a jam variable value. + * + * Do not just set JAMSHELL to cmd.exe - it will not work! + * + * External routines: + * exec_check() - preprocess and validate the command + * exec_cmd() - launch an async command execution + * exec_wait() - wait for any of the async command processes to terminate + * + * Internal routines: + * filetime_to_seconds() - Windows FILETIME --> number of seconds conversion + */ + +#include "jam.h" + +#ifdef USE_EXECNT + +#include "output.h" +#include "execcmd.h" + +#include "lists.h" +#include "output.h" +#include "pathsys.h" +#include "startup.h" +#include "string.h" + +#include +#include +#include +#include + +#define WIN32_LEAN_AND_MEAN +#include +#include +#include + +#if defined(__GNUC__) || defined(__clang__) +#else +#pragma warning( push ) +#pragma warning(disable: 4800) // 'BOOL' forced to 'true' or 'false' +#endif +#include +#if defined(__GNUC__) || defined(__clang__) +#else +#pragma warning( pop ) +#endif + + +/* get the maximum shell command line length according to the OS */ +static int32_t maxline(); +/* valid raw command string length */ +static int32_t raw_command_length( char const * command ); +/* add two 64-bit unsigned numbers, h1l1 and h2l2 */ +static FILETIME add_64( + unsigned long h1, unsigned long l1, + unsigned long h2, unsigned long l2 ); +/* */ +static FILETIME add_FILETIME( FILETIME t1, FILETIME t2 ); +/* */ +static FILETIME negate_FILETIME( FILETIME t ); +/* record the timing info for the process */ +static void record_times( HANDLE const, timing_info * const ); +/* calc the current running time of an *active* process */ +static double running_time( HANDLE const ); +/* terminate the given process, after terminating all its children first */ +static void kill_process_tree( DWORD const procesdId, HANDLE const ); +/* waits for a command to complete or time out */ +static int32_t try_wait( int32_t const timeoutMillis ); +/* reads any pending output for running commands */ +static void read_output(); +/* checks if a command ran out of time, and kills it */ +static int32_t try_kill_one(); +/* is the first process a parent (direct or indirect) to the second one */ +static int32_t is_parent_child( DWORD const parent, DWORD const child ); +/* */ +static void close_alert( PROCESS_INFORMATION const * const ); +/* close any alerts hanging around */ +static void close_alerts(); +/* prepare a command file to be executed using an external shell */ +static char const * prepare_command_file( string const * command, int32_t slot ); +/* invoke the actual external process using the given command line */ +static void invoke_cmd( char const * const command, int32_t const slot ); +/* find a free slot in the running commands table */ +static int32_t get_free_cmdtab_slot(); +/* put together the final command string we are to run */ +static void string_new_from_argv( string * result, char const * const * argv ); +/* frees and renews the given string */ +static void string_renew( string * const ); +/* reports the last failed Windows API related error message */ +static void reportWindowsError( char const * const apiName, int32_t slot ); +/* closes a Windows HANDLE and resets its variable to 0. */ +static void closeWinHandle( HANDLE * const handle ); +/* Adds the job index to the list of currently active jobs. */ +static void register_wait( int32_t job_id ); + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* CreateProcessA() Windows API places a limit of 32768 characters (bytes) on + * the allowed command-line length, including a trailing Unicode (2-byte) + * nul-terminator character. + */ +#define MAX_RAW_COMMAND_LENGTH 32766 + + /* Communication buffers size */ +#define IO_BUFFER_SIZE ( 64 * 1024 ) + +/* We hold handles for pipes used to communicate with child processes in two + * element arrays indexed as follows. + */ +#define EXECCMD_PIPE_READ 0 +#define EXECCMD_PIPE_WRITE 1 + +static int32_t intr_installed; + + +/* The list of commands we run. */ +static struct _cmdtab_t +{ + /* Temporary command file used to execute the action when needed. */ + string command_file[ 1 ]; + + /* Pipes for communicating with the child process. Parent reads from (0), + * child writes to (1). + */ + HANDLE pipe_out[ 2 ]; + HANDLE pipe_err[ 2 ]; + + string buffer_out[ 1 ]; /* buffer to hold stdout, if any */ + string buffer_err[ 1 ]; /* buffer to hold stderr, if any */ + + PROCESS_INFORMATION pi; /* running process information */ + + HANDLE wait_handle; + + int32_t flags; + + /* Function called when the command completes. */ + ExecCmdCallback func; + + /* Opaque data passed back to the 'func' callback. */ + void * closure; +} * cmdtab = NULL; +static int32_t cmdtab_size = 0; + +/* A thread-safe single element queue. Used by the worker threads + * to signal the main thread that a process is completed. + */ +struct +{ + int32_t job_index; + HANDLE read_okay; + HANDLE write_okay; +} process_queue; + +/* + * Execution unit tests. + */ + +void execnt_unit_test() +{ +#if !defined( NDEBUG ) + /* vc6 preprocessor is broken, so assert with these strings gets confused. + * Use a table instead. + */ + { + typedef struct test { const char * command; int32_t result; } test; + test tests[] = { + { "", 0 }, + { " ", 0 }, + { "x", 1 }, + { "\nx", 1 }, + { "x\n", 1 }, + { "\nx\n", 1 }, + { "\nx \n", 2 }, + { "\nx \n ", 2 }, + { " \n\t\t\v\r\r\n \t x \v \t\t\r\n\n\n \n\n\v\t", 8 }, + { "x\ny", -1 }, + { "x\n\n y", -1 }, + { "echo x > foo.bar", -1 }, + { "echo x < foo.bar", -1 }, + { "echo x | foo.bar", -1 }, + { "echo x \">\" foo.bar", 18 }, + { "echo x '<' foo.bar", 18 }, + { "echo x \"|\" foo.bar", 18 }, + { "echo x \\\">\\\" foo.bar", -1 }, + { "echo x \\\"<\\\" foo.bar", -1 }, + { "echo x \\\"|\\\" foo.bar", -1 }, + { "\"echo x > foo.bar\"", 18 }, + { "echo x \"'\"<' foo.bar", -1 }, + { "echo x \\\\\"<\\\\\" foo.bar", 22 }, + { "echo x \\x\\\"<\\\\\" foo.bar", -1 }, + { 0 } }; + test const * t; + for ( t = tests; t->command; ++t ) + assert( raw_command_length( t->command ) == t->result ); + } + + { + int32_t const length = maxline() + 9; + char * const cmd = (char *)BJAM_MALLOC_ATOMIC( size_t(length) + 1 ); + memset( cmd, 'x', size_t(length) ); + cmd[ length ] = 0; + assert( raw_command_length( cmd ) == length ); + BJAM_FREE( cmd ); + } +#endif +} + +/* + * exec_init() - global initialization + */ +void exec_init( void ) +{ + if ( globs.jobs > cmdtab_size ) + { + cmdtab = (_cmdtab_t*)BJAM_REALLOC( cmdtab, globs.jobs * sizeof( *cmdtab ) ); + memset( cmdtab + cmdtab_size, 0, ( globs.jobs - cmdtab_size ) * sizeof( *cmdtab ) ); + cmdtab_size = globs.jobs; + } + if ( globs.jobs > MAXIMUM_WAIT_OBJECTS && !process_queue.read_okay ) + { + process_queue.read_okay = CreateEvent( NULL, FALSE, FALSE, NULL ); + process_queue.write_okay = CreateEvent( NULL, FALSE, TRUE, NULL ); + } +} + +/* + * exec_done - free resources. + */ +void exec_done( void ) +{ + if ( process_queue.read_okay ) + { + CloseHandle( process_queue.read_okay ); + } + if ( process_queue.write_okay ) + { + CloseHandle( process_queue.write_okay ); + } + BJAM_FREE( cmdtab ); +} + +/* + * exec_check() - preprocess and validate the command + */ + +int32_t exec_check +( + string const * command, + LIST * * pShell, + int32_t * error_length, + int32_t * error_max_length +) +{ + /* Default shell does nothing when triggered with an empty or a + * whitespace-only command so we simply skip running it in that case. We + * still pass them on to non-default shells as we do not really know what + * they are going to do with such commands. + */ + if ( list_empty( *pShell ) ) + { + char const * s = command->value; + while ( isspace( *s ) ) ++s; + if ( !*s ) + return EXEC_CHECK_NOOP; + } + + /* Check prerequisites for executing raw commands. */ + if ( is_raw_command_request( *pShell ) ) + { + int32_t const raw_cmd_length = raw_command_length( command->value ); + if ( raw_cmd_length < 0 ) + { + /* Invalid characters detected - fallback to default shell. */ + list_free( *pShell ); + *pShell = L0; + } + else if ( raw_cmd_length > MAX_RAW_COMMAND_LENGTH ) + { + *error_length = raw_cmd_length; + *error_max_length = MAX_RAW_COMMAND_LENGTH; + return EXEC_CHECK_TOO_LONG; + } + else + return raw_cmd_length ? EXEC_CHECK_OK : EXEC_CHECK_NOOP; + } + + /* Now we know we are using an external shell. Note that there is no need to + * check for too long command strings when using an external shell since we + * use a command file and assume no one is going to set up a JAMSHELL format + * string longer than a few hundred bytes at most which should be well under + * the total command string limit. Should someone actually construct such a + * JAMSHELL value it will get reported as an 'invalid parameter' + * CreateProcessA() Windows API failure which seems like a good enough + * result for such intentional mischief. + */ + + /* Check for too long command lines. */ + return check_cmd_for_too_long_lines( command->value, shell_maxline(), + error_length, error_max_length ); +} + + +/* + * exec_cmd() - launch an async command execution + * + * We assume exec_check() already verified that the given command can have its + * command string constructed as requested. + */ + +void exec_cmd +( + string const * cmd_orig, + int32_t flags, + ExecCmdCallback func, + void * closure, + LIST * shell +) +{ + int32_t const slot = get_free_cmdtab_slot(); + int32_t const is_raw_cmd = is_raw_command_request( shell ); + string cmd_local[ 1 ]; + + /* Initialize default shell - anything more than /Q/C is non-portable. */ + static LIST * default_shell; + if ( !default_shell ) + default_shell = list_new( object_new( "cmd.exe /Q/C" ) ); + + /* Specifying no shell means requesting the default shell. */ + if ( list_empty( shell ) ) + shell = default_shell; + + if ( DEBUG_EXECCMD ) + { + if ( is_raw_cmd ) + out_printf( "Executing raw command directly\n" ); + else + { + out_printf( "Executing using a command file and the shell: " ); + list_print( shell ); + out_printf( "\n" ); + } + } + + /* If we are running a raw command directly - trim its leading whitespaces + * as well as any trailing all-whitespace lines but keep any trailing + * whitespace in the final/only line containing something other than + * whitespace). + */ + if ( is_raw_cmd ) + { + char const * start = cmd_orig->value; + char const * p = cmd_orig->value + cmd_orig->size; + char const * end = p; + while ( isspace( *start ) ) ++start; + while ( p > start && isspace( p[ -1 ] ) ) + if ( *--p == '\n' ) + end = p; + string_new( cmd_local ); + string_append_range( cmd_local, start, end ); + assert( int32_t(cmd_local->size) == raw_command_length( cmd_orig->value ) ); + } + /* If we are not running a raw command directly, prepare a command file to + * be executed using an external shell and the actual command string using + * that command file. + */ + else + { + char const * const cmd_file = prepare_command_file( cmd_orig, slot ); + char const * argv[ MAXARGC + 1 ]; /* +1 for NULL */ + argv_from_shell( argv, shell, cmd_file, slot ); + string_new_from_argv( cmd_local, argv ); + } + + /* Catch interrupts whenever commands are running. */ + if ( !intr_installed ) + { + intr_installed = 1; + signal( SIGINT, onintr ); + } + + cmdtab[ slot ].flags = flags; + + /* Save input data into the selected running commands table slot. */ + cmdtab[ slot ].func = func; + cmdtab[ slot ].closure = closure; + + /* Invoke the actual external process using the constructed command line. */ + invoke_cmd( cmd_local->value, slot ); + + /* Free our local command string copy. */ + string_free( cmd_local ); +} + + +/* + * exec_wait() - wait for any of the async command processes to terminate + * + * Wait and drive at most one execution completion, while processing the I/O for + * all ongoing commands. + */ + +void exec_wait() +{ + int32_t i = -1; + int32_t exit_reason; /* reason why a command completed */ + + /* Wait for a command to complete, while snarfing up any output. */ + while ( 1 ) + { + /* Check for a complete command, briefly. */ + i = try_wait( 500 ); + /* Read in the output of all running commands. */ + read_output(); + /* Close out pending debug style dialogs. */ + close_alerts(); + /* Process the completed command we found. */ + if ( i >= 0 ) { exit_reason = EXIT_OK; break; } + /* Check if a command ran out of time. */ + i = try_kill_one(); + if ( i >= 0 ) { exit_reason = EXIT_TIMEOUT; break; } + } + + /* We have a command... process it. */ + { + DWORD exit_code; + timing_info time; + int32_t rstat; + + /* The time data for the command. */ + record_times( cmdtab[ i ].pi.hProcess, &time ); + + /* Removed the used temporary command file. */ + if ( cmdtab[ i ].command_file->size ) + unlink( cmdtab[ i ].command_file->value ); + + /* Find out the process exit code. */ + GetExitCodeProcess( cmdtab[ i ].pi.hProcess, &exit_code ); + + /* The dispossition of the command. */ + if ( interrupted() ) + rstat = EXEC_CMD_INTR; + else if ( exit_code ) + rstat = EXEC_CMD_FAIL; + else + rstat = EXEC_CMD_OK; + + /* Call the callback, may call back to jam rule land. */ + (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time, + cmdtab[ i ].buffer_out->value, cmdtab[ i ].buffer_err->value, + exit_reason ); + + /* Clean up our child process tracking data. No need to clear the + * temporary command file name as it gets reused. + */ + closeWinHandle( &cmdtab[ i ].pi.hProcess ); + closeWinHandle( &cmdtab[ i ].pi.hThread ); + closeWinHandle( &cmdtab[ i ].pipe_out[ EXECCMD_PIPE_READ ] ); + closeWinHandle( &cmdtab[ i ].pipe_out[ EXECCMD_PIPE_WRITE ] ); + closeWinHandle( &cmdtab[ i ].pipe_err[ EXECCMD_PIPE_READ ] ); + closeWinHandle( &cmdtab[ i ].pipe_err[ EXECCMD_PIPE_WRITE ] ); + string_renew( cmdtab[ i ].buffer_out ); + string_renew( cmdtab[ i ].buffer_err ); + } +} + + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* + * Invoke the actual external process using the given command line. Track the + * process in our running commands table. + */ + +static void invoke_cmd( char const * const command, int32_t const slot ) +{ + SECURITY_ATTRIBUTES sa = { sizeof( SECURITY_ATTRIBUTES ), 0, 0 }; + SECURITY_DESCRIPTOR sd; + STARTUPINFOA si = { sizeof( STARTUPINFOA ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 }; + + /* Init the security data. */ + InitializeSecurityDescriptor( &sd, SECURITY_DESCRIPTOR_REVISION ); + SetSecurityDescriptorDacl( &sd, TRUE, NULL, FALSE ); + sa.lpSecurityDescriptor = &sd; + sa.bInheritHandle = TRUE; + + /* Create output buffers. */ + string_new( cmdtab[ slot ].buffer_out ); + string_new( cmdtab[ slot ].buffer_err ); + + /* Create pipes for communicating with the child process. */ + if ( !CreatePipe( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_READ ], + &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ], &sa, IO_BUFFER_SIZE ) ) + { + reportWindowsError( "CreatePipe", slot ); + return; + } + if ( globs.pipe_action && !CreatePipe( &cmdtab[ slot ].pipe_err[ + EXECCMD_PIPE_READ ], &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_WRITE ], + &sa, IO_BUFFER_SIZE ) ) + { + reportWindowsError( "CreatePipe", slot ); + return; + } + + /* Set handle inheritance off for the pipe ends the parent reads from. */ + SetHandleInformation( cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_READ ], + HANDLE_FLAG_INHERIT, 0 ); + if ( globs.pipe_action ) + SetHandleInformation( cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_READ ], + HANDLE_FLAG_INHERIT, 0 ); + + /* Hide the child window, if any. */ + si.dwFlags |= STARTF_USESHOWWINDOW; + si.wShowWindow = SW_HIDE; + + /* Redirect the child's output streams to our pipes. */ + si.dwFlags |= STARTF_USESTDHANDLES; + si.hStdOutput = cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ]; + si.hStdError = globs.pipe_action + ? cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_WRITE ] + : cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ]; + + /* Let the child inherit stdin, as some commands assume it is available. */ + si.hStdInput = GetStdHandle( STD_INPUT_HANDLE ); + + if ( DEBUG_EXECCMD ) + out_printf( "Command string for CreateProcessA(): '%s'\n", command ); + + /* Run the command by creating a sub-process for it. */ + if ( !CreateProcessA( + NULL , /* application name */ + (char *)command , /* command line */ + NULL , /* process attributes */ + NULL , /* thread attributes */ + TRUE , /* inherit handles */ + CREATE_NEW_PROCESS_GROUP, /* create flags */ + NULL , /* env vars, null inherits env */ + NULL , /* current dir, null is our current dir */ + &si , /* startup info */ + &cmdtab[ slot ].pi ) ) /* child process info, if created */ + { + reportWindowsError( "CreateProcessA", slot ); + return; + } + + register_wait( slot ); +} + + +/* + * For more details on Windows cmd.exe shell command-line length limitations see + * the following MSDN article: + * http://support.microsoft.com/default.aspx?scid=kb;en-us;830473 + */ + +static int32_t raw_maxline() +{ + if ( IsWindowsVersionOrGreater(5,0,0) == TRUE ) return 8191; /* XP */ + if ( IsWindowsVersionOrGreater(4,0,0) == TRUE ) return 2047; /* NT 4.x */ + return 996; /* NT 3.5.1 */ +} + +static int32_t maxline() +{ + static int32_t result; + if ( !result ) result = raw_maxline(); + return result; +} + + +/* + * Closes a Windows HANDLE and resets its variable to 0. + */ + +static void closeWinHandle( HANDLE * const handle ) +{ + if ( *handle ) + { + CloseHandle( *handle ); + *handle = 0; + } +} + + +/* + * Frees and renews the given string. + */ + +static void string_renew( string * const s ) +{ + string_free( s ); + string_new( s ); +} + + +/* + * raw_command_length() - valid raw command string length + * + * Checks whether the given command may be executed as a raw command. If yes, + * returns the corresponding command string length. If not, returns -1. + * + * Rules for constructing raw command strings: + * - Command may not contain unquoted shell I/O redirection characters. + * - May have at most one command line with non-whitespace content. + * - Leading whitespace trimmed. + * - Trailing all-whitespace lines trimmed. + * - Trailing whitespace on the sole command line kept (may theoretically + * affect the executed command). + */ + +static int32_t raw_command_length( char const * command ) +{ + char const * p; + char const * escape = 0; + char inquote = 0; + char const * newline = 0; + + /* Skip leading whitespace. */ + while ( isspace( *command ) ) + ++command; + + p = command; + + /* Look for newlines and unquoted I/O redirection. */ + do + { + p += strcspn( p, "\n\"'<>|\\" ); + switch ( *p ) + { + case '\n': + /* If our command contains non-whitespace content split over + * multiple lines we can not execute it directly. + */ + newline = p; + while ( isspace( *++p ) ); + if ( *p ) return -1; + break; + + case '\\': + escape = escape && escape == p - 1 ? 0 : p; + ++p; + break; + + case '"': + case '\'': + if ( escape && escape == p - 1 ) + escape = 0; + else if ( inquote == *p ) + inquote = 0; + else if ( !inquote ) + inquote = *p; + ++p; + break; + + case '<': + case '>': + case '|': + if ( !inquote ) + return -1; + ++p; + break; + } + } + while ( *p ); + + /* Return the number of characters the command will occupy. */ + return int32_t(( newline ? newline : p ) - command); +} + + +/* 64-bit arithmetic helpers. */ + +/* Compute the carry bit from the addition of two 32-bit unsigned numbers. */ +#define add_carry_bit( a, b ) ((((a) | (b)) >> 31) & (~((a) + (b)) >> 31) & 0x1) + +/* Compute the high 32 bits of the addition of two 64-bit unsigned numbers, h1l1 + * and h2l2. + */ +#define add_64_hi( h1, l1, h2, l2 ) ((h1) + (h2) + add_carry_bit(l1, l2)) + + +/* + * Add two 64-bit unsigned numbers, h1l1 and h2l2. + */ + +static FILETIME add_64 +( + unsigned long h1, unsigned long l1, + unsigned long h2, unsigned long l2 +) +{ + FILETIME result; + result.dwLowDateTime = l1 + l2; + result.dwHighDateTime = add_64_hi( h1, l1, h2, l2 ); + return result; +} + + +static FILETIME add_FILETIME( FILETIME t1, FILETIME t2 ) +{ + return add_64( t1.dwHighDateTime, t1.dwLowDateTime, t2.dwHighDateTime, + t2.dwLowDateTime ); +} + + +static FILETIME negate_FILETIME( FILETIME t ) +{ + /* 2s complement negation */ + return add_64( ~t.dwHighDateTime, ~t.dwLowDateTime, 0, 1 ); +} + + +/* + * filetime_to_seconds() - Windows FILETIME --> number of seconds conversion + */ + +static double filetime_to_seconds( FILETIME const ft ) +{ + return ft.dwHighDateTime * ( (double)( 1UL << 31 ) * 2.0 * 1.0e-7 ) + + ft.dwLowDateTime * 1.0e-7; +} + + +static void record_times( HANDLE const process, timing_info * const time ) +{ + FILETIME creation; + FILETIME exit; + FILETIME kernel; + FILETIME user; + if ( GetProcessTimes( process, &creation, &exit, &kernel, &user ) ) + { + time->system = filetime_to_seconds( kernel ); + time->user = filetime_to_seconds( user ); + timestamp_from_filetime( &time->start, &creation ); + timestamp_from_filetime( &time->end, &exit ); + } +} + + +static char ioBuffer[ IO_BUFFER_SIZE + 1 ]; + +#define FORWARD_PIPE_NONE 0 +#define FORWARD_PIPE_STDOUT 1 +#define FORWARD_PIPE_STDERR 2 + +static void read_pipe +( + HANDLE in, /* the pipe to read from */ + string * out, + int32_t forwarding_mode +) +{ + DWORD bytesInBuffer = 0; + DWORD bytesAvailable = 0; + DWORD i; + + for (;;) + { + /* check if we have any data to read */ + if ( !PeekNamedPipe( in, NULL, IO_BUFFER_SIZE, NULL, + &bytesAvailable, NULL ) || bytesAvailable == 0 ) + return; + + /* we only read in the available bytes, to avoid blocking */ + if ( !ReadFile( in, ioBuffer, bytesAvailable <= IO_BUFFER_SIZE ? + bytesAvailable : IO_BUFFER_SIZE, &bytesInBuffer, NULL ) || bytesInBuffer == 0 ) + return; + + /* Clean up some illegal chars. */ + for ( i = 0; i < bytesInBuffer; ++i ) + { + if ( ( (unsigned char)ioBuffer[ i ] < 1 ) ) + ioBuffer[ i ] = '?'; + } + /* Null, terminate. */ + ioBuffer[ bytesInBuffer ] = '\0'; + /* Append to the output. */ + string_append( out, ioBuffer ); + /* Copy it to our output if appropriate */ + if ( forwarding_mode == FORWARD_PIPE_STDOUT ) + out_data( ioBuffer ); + else if ( forwarding_mode == FORWARD_PIPE_STDERR ) + err_data( ioBuffer ); + } +} + +#define EARLY_OUTPUT( cmd ) \ + ( ! ( cmd.flags & EXEC_CMD_QUIET ) ) + +#define FORWARD_STDOUT( c ) \ + ( ( EARLY_OUTPUT( c ) && ( globs.pipe_action != 2 ) ) ? \ + FORWARD_PIPE_STDOUT : FORWARD_PIPE_NONE ) +#define FORWARD_STDERR( c ) \ + ( ( EARLY_OUTPUT( c ) && ( globs.pipe_action & 2 ) ) ? \ + FORWARD_PIPE_STDERR : FORWARD_PIPE_NONE ) + +static void read_output() +{ + int32_t i; + for ( i = 0; i < globs.jobs; ++i ) + if ( cmdtab[ i ].pi.hProcess ) + { + /* Read stdout data. */ + if ( cmdtab[ i ].pipe_out[ EXECCMD_PIPE_READ ] ) + read_pipe( cmdtab[ i ].pipe_out[ EXECCMD_PIPE_READ ], + cmdtab[ i ].buffer_out, FORWARD_STDOUT( cmdtab[ i ] ) ); + /* Read stderr data. */ + if ( cmdtab[ i ].pipe_err[ EXECCMD_PIPE_READ ] ) + read_pipe( cmdtab[ i ].pipe_err[ EXECCMD_PIPE_READ ], + cmdtab[ i ].buffer_err, FORWARD_STDERR( cmdtab[ i ] ) ); + } +} + +static void CALLBACK try_wait_callback( void * data, BOOLEAN is_timeout ) +{ + struct _cmdtab_t * slot = ( struct _cmdtab_t * )data; + WaitForSingleObject( process_queue.write_okay, INFINITE ); + process_queue.job_index = int32_t(slot - cmdtab); + assert( !is_timeout ); + SetEvent( process_queue.read_okay ); + /* Okay. Non-blocking. */ + UnregisterWait( slot->wait_handle ); +} + +static int32_t try_wait_impl( DWORD timeout ) +{ + int32_t job_index; + int32_t res = WaitForSingleObject( process_queue.read_okay, timeout ); + if ( res != WAIT_OBJECT_0 ) + return -1; + job_index = process_queue.job_index; + SetEvent( process_queue.write_okay ); + return job_index; +} + +static void register_wait( int32_t job_id ) +{ + if ( globs.jobs > MAXIMUM_WAIT_OBJECTS ) + { + RegisterWaitForSingleObject( &cmdtab[ job_id ].wait_handle, + cmdtab[ job_id ].pi.hProcess, + &try_wait_callback, &cmdtab[ job_id ], INFINITE, + WT_EXECUTEDEFAULT | WT_EXECUTEONLYONCE ); + } +} + +/* + * Waits for a single child process command to complete, or the timeout, + * whichever comes first. Returns the index of the completed command in the + * cmdtab array, or -1. + */ + +static int32_t try_wait( int32_t const timeoutMillis ) +{ + if ( globs.jobs <= MAXIMUM_WAIT_OBJECTS ) + { + int32_t i; + HANDLE active_handles[ MAXIMUM_WAIT_OBJECTS ]; + int32_t job_ids[ MAXIMUM_WAIT_OBJECTS ]; + DWORD num_handles = 0; + DWORD wait_api_result; + for ( i = 0; i < globs.jobs; ++i ) + { + if( cmdtab[ i ].pi.hProcess ) + { + job_ids[ num_handles ] = i; + active_handles[ num_handles ] = cmdtab[ i ].pi.hProcess; + ++num_handles; + } + } + wait_api_result = WaitForMultipleObjects( num_handles, active_handles, FALSE, timeoutMillis ); + if ( WAIT_OBJECT_0 <= wait_api_result && wait_api_result < WAIT_OBJECT_0 + globs.jobs ) + { + return job_ids[ wait_api_result - WAIT_OBJECT_0 ]; + } + else + { + return -1; + } + } + else + { + return try_wait_impl( timeoutMillis ); + } + +} + + +static int32_t try_kill_one() +{ + /* Only need to check if a timeout was specified with the -l option. */ + if ( globs.timeout > 0 ) + { + int32_t i; + for ( i = 0; i < globs.jobs; ++i ) + if ( cmdtab[ i ].pi.hProcess ) + { + double const t = running_time( cmdtab[ i ].pi.hProcess ); + if ( t > (double)globs.timeout ) + { + /* The job may have left an alert dialog around, try and get + * rid of it before killing the job itself. + */ + close_alert( &cmdtab[ i ].pi ); + /* We have a "runaway" job, kill it. */ + kill_process_tree( cmdtab[ i ].pi.dwProcessId, + cmdtab[ i ].pi.hProcess ); + /* And return its running commands table slot. */ + return i; + } + } + } + return -1; +} + + +static void close_alerts() +{ + /* We only attempt this every 5 seconds or so, because it is not a cheap + * operation, and we will catch the alerts eventually. This check uses + * floats as some compilers define CLOCKS_PER_SEC as a float or double. + */ + if ( ( (float)clock() / (float)( CLOCKS_PER_SEC * 5 ) ) < ( 1.0 / 5.0 ) ) + { + int32_t i; + for ( i = 0; i < globs.jobs; ++i ) + if ( cmdtab[ i ].pi.hProcess ) + close_alert( &cmdtab[ i ].pi ); + } +} + + +/* + * Calc the current running time of an *active* process. + */ + +static double running_time( HANDLE const process ) +{ + FILETIME creation; + FILETIME exit; + FILETIME kernel; + FILETIME user; + if ( GetProcessTimes( process, &creation, &exit, &kernel, &user ) ) + { + /* Compute the elapsed time. */ + FILETIME current; + GetSystemTimeAsFileTime( ¤t ); + return filetime_to_seconds( add_FILETIME( current, + negate_FILETIME( creation ) ) ); + } + return 0.0; +} + + +/* + * Not really optimal, or efficient, but it is easier this way, and it is not + * like we are going to be killing thousands, or even tens of processes. + */ + +static void kill_process_tree( DWORD const pid, HANDLE const process ) +{ + HANDLE const process_snapshot_h = CreateToolhelp32Snapshot( + TH32CS_SNAPPROCESS, 0 ); + if ( INVALID_HANDLE_VALUE != process_snapshot_h ) + { + BOOL ok = TRUE; + PROCESSENTRY32 pinfo; + pinfo.dwSize = sizeof( PROCESSENTRY32 ); + for ( + ok = Process32First( process_snapshot_h, &pinfo ); + ok == TRUE; + ok = Process32Next( process_snapshot_h, &pinfo ) ) + { + if ( pinfo.th32ParentProcessID == pid ) + { + /* Found a child, recurse to kill it and anything else below it. + */ + HANDLE const ph = OpenProcess( PROCESS_ALL_ACCESS, FALSE, + pinfo.th32ProcessID ); + if ( ph ) + { + kill_process_tree( pinfo.th32ProcessID, ph ); + CloseHandle( ph ); + } + } + } + CloseHandle( process_snapshot_h ); + } + /* Now that the children are all dead, kill the root. */ + TerminateProcess( process, -2 ); +} + + +static double creation_time( HANDLE const process ) +{ + FILETIME creation; + FILETIME exit; + FILETIME kernel; + FILETIME user; + return GetProcessTimes( process, &creation, &exit, &kernel, &user ) + ? filetime_to_seconds( creation ) + : 0.0; +} + + +/* + * Recursive check if first process is parent (directly or indirectly) of the + * second one. Both processes are passed as process ids, not handles. Special + * return value 2 means that the second process is smss.exe and its parent + * process is System (first argument is ignored). + */ + +static int32_t is_parent_child( DWORD const parent, DWORD const child ) +{ + HANDLE process_snapshot_h = INVALID_HANDLE_VALUE; + + if ( !child ) + return 0; + if ( parent == child ) + return 1; + + process_snapshot_h = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); + if ( INVALID_HANDLE_VALUE != process_snapshot_h ) + { + BOOL ok = TRUE; + PROCESSENTRY32 pinfo; + pinfo.dwSize = sizeof( PROCESSENTRY32 ); + for ( + ok = Process32First( process_snapshot_h, &pinfo ); + ok == TRUE; + ok = Process32Next( process_snapshot_h, &pinfo ) ) + { + if ( pinfo.th32ProcessID == child ) + { + /* Unfortunately, process ids are not really unique. There might + * be spurious "parent and child" relationship match between two + * non-related processes if real parent process of a given + * process has exited (while child process kept running as an + * "orphan") and the process id of such parent process has been + * reused by internals of the operating system when creating + * another process. + * + * Thus an additional check is needed - process creation time. + * This check may fail (i.e. return 0) for system processes due + * to insufficient privileges, and that is OK. + */ + double tchild = 0.0; + double tparent = 0.0; + HANDLE const hchild = OpenProcess( PROCESS_QUERY_INFORMATION, + FALSE, pinfo.th32ProcessID ); + CloseHandle( process_snapshot_h ); + + /* csrss.exe may display message box like following: + * xyz.exe - Unable To Locate Component + * This application has failed to start because + * boost_foo-bar.dll was not found. Re-installing the + * application may fix the problem + * This actually happens when starting a test process that + * depends on a dynamic library which failed to build. We want + * to automatically close these message boxes even though + * csrss.exe is not our child process. We may depend on the fact + * that (in all current versions of Windows) csrss.exe is a + * direct child of the smss.exe process, which in turn is a + * direct child of the System process, which always has process + * id == 4. This check must be performed before comparing + * process creation times. + */ + +#ifdef UNICODE // no PROCESSENTRY32A + if ( !wcsicmp( pinfo.szExeFile, L"csrss.exe" ) && +#else + if ( !stricmp( pinfo.szExeFile, "csrss.exe" ) && +#endif + is_parent_child( parent, pinfo.th32ParentProcessID ) == 2 ) + return 1; + +#ifdef UNICODE // no PROCESSENTRY32A + if ( !wcsicmp( pinfo.szExeFile, L"smss.exe" ) && +#else + if ( !stricmp( pinfo.szExeFile, "smss.exe" ) && +#endif + ( pinfo.th32ParentProcessID == 4 ) ) + return 2; + + if ( hchild ) + { + HANDLE hparent = OpenProcess( PROCESS_QUERY_INFORMATION, + FALSE, pinfo.th32ParentProcessID ); + if ( hparent ) + { + tchild = creation_time( hchild ); + tparent = creation_time( hparent ); + CloseHandle( hparent ); + } + CloseHandle( hchild ); + } + + /* Return 0 if one of the following is true: + * 1. we failed to read process creation time + * 2. child was created before alleged parent + */ + if ( ( tchild == 0.0 ) || ( tparent == 0.0 ) || + ( tchild < tparent ) ) + return 0; + + return is_parent_child( parent, pinfo.th32ParentProcessID ) & 1; + } + } + + CloseHandle( process_snapshot_h ); + } + + return 0; +} + + +/* + * Called by the OS for each topmost window. + */ + +BOOL CALLBACK close_alert_window_enum( HWND hwnd, LPARAM lParam ) +{ + char buf[ 7 ] = { 0 }; + PROCESS_INFORMATION const * const pi = (PROCESS_INFORMATION *)lParam; + DWORD pid; + DWORD tid; + + /* We want to find and close any window that: + * 1. is visible and + * 2. is a dialog and + * 3. is displayed by any of our child processes + */ + if ( + /* We assume hidden windows do not require user interaction. */ + !IsWindowVisible( hwnd ) + /* Failed to read class name; presume it is not a dialog. */ + || !GetClassNameA( hwnd, buf, sizeof( buf ) ) + /* All Windows system dialogs use the same Window class name. */ + || strcmp( buf, "#32770" ) ) + return TRUE; + + /* GetWindowThreadProcessId() returns 0 on error, otherwise thread id of + * the window's message pump thread. + */ + tid = GetWindowThreadProcessId( hwnd, &pid ); + if ( !tid || !is_parent_child( pi->dwProcessId, pid ) ) + return TRUE; + + /* Ask real nice. */ + PostMessageA( hwnd, WM_CLOSE, 0, 0 ); + + /* Wait and see if it worked. If not, insist. */ + if ( WaitForSingleObject( pi->hProcess, 200 ) == WAIT_TIMEOUT ) + { + PostThreadMessageA( tid, WM_QUIT, 0, 0 ); + WaitForSingleObject( pi->hProcess, 300 ); + } + + /* Done, we do not want to check any other windows now. */ + return FALSE; +} + + +static void close_alert( PROCESS_INFORMATION const * const pi ) +{ + EnumWindows( &close_alert_window_enum, (LPARAM)pi ); +} + + +/* + * Open a command file to store the command into for executing using an external + * shell. Returns a pointer to a FILE open for writing or 0 in case such a file + * could not be opened. The file name used is stored back in the corresponding + * running commands table slot. + * + * Expects the running commands table slot's command_file attribute to contain + * either a zeroed out string object or one prepared previously by this same + * function. + */ + +static FILE * open_command_file( int32_t const slot ) +{ + string * const command_file = cmdtab[ slot ].command_file; + + /* If the temporary command file name has not already been prepared for this + * slot number, prepare a new one containing a '##' place holder that will + * be changed later and needs to be located at a fixed distance from the + * end. + */ + if ( !command_file->value ) + { + DWORD const procID = GetCurrentProcessId(); + string const * const tmpdir = path_tmpdir(); + string_new( command_file ); + string_reserve( command_file, tmpdir->size + 64 ); + command_file->size = sprintf( command_file->value, + "%s\\jam%lu-%02d-##.bat", tmpdir->value, procID, slot ); + } + + /* For some reason opening a command file can fail intermittently. But doing + * some retries works. Most likely this is due to a previously existing file + * of the same name that happens to still be opened by an active virus + * scanner. Originally pointed out and fixed by Bronek Kozicki. + * + * We first try to open several differently named files to avoid having to + * wait idly if not absolutely necessary. Our temporary command file names + * contain a fixed position place holder we use for generating different + * file names. + */ + { + char * const index1 = command_file->value + command_file->size - 6; + char * const index2 = index1 + 1; + int32_t waits_remaining; + assert( command_file->value < index1 ); + assert( index2 + 1 < command_file->value + command_file->size ); + assert( index2[ 1 ] == '.' ); + for ( waits_remaining = 3; ; --waits_remaining ) + { + int32_t index; + for ( index = 0; index != 20; ++index ) + { + FILE * f; + *index1 = '0' + index / 10; + *index2 = '0' + index % 10; + f = fopen( command_file->value, "w" ); + if ( f ) return f; + } + if ( !waits_remaining ) break; + Sleep( 250 ); + } + } + + return 0; +} + + +/* + * Prepare a command file to be executed using an external shell. + */ + +static char const * prepare_command_file( string const * command, int32_t slot ) +{ + FILE * const f = open_command_file( slot ); + if ( !f ) + { + err_printf( "failed to write command file!\n" ); + b2::clean_exit( EXITBAD ); + } + fputs( command->value, f ); + fclose( f ); + return cmdtab[ slot ].command_file->value; +} + + +/* + * Find a free slot in the running commands table. + */ + +static int32_t get_free_cmdtab_slot() +{ + int32_t slot; + for ( slot = 0; slot < globs.jobs; ++slot ) + if ( !cmdtab[ slot ].pi.hProcess ) + return slot; + err_printf( "no slots for child!\n" ); + b2::clean_exit( EXITBAD ); + return -1; +} + + +/* + * Put together the final command string we are to run. + */ + +static void string_new_from_argv( string * result, char const * const * argv ) +{ + assert( argv ); + assert( argv[ 0 ] ); + string_copy( result, *(argv++) ); + while ( *argv ) + { + string_push_back( result, ' ' ); + string_push_back( result, '"' ); + string_append( result, *(argv++) ); + string_push_back( result, '"' ); + } +} + + +/* + * Reports the last failed Windows API related error message. + */ + +static void reportWindowsError( char const * const apiName, int32_t slot ) +{ + char * errorMessage; + char buf[24]; + string * err_buf; + timing_info time; + DWORD const errorCode = GetLastError(); + DWORD apiResult = FormatMessageA( + FORMAT_MESSAGE_ALLOCATE_BUFFER | /* __in DWORD dwFlags */ + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, /* __in_opt LPCVOID lpSource */ + errorCode, /* __in DWORD dwMessageId */ + 0, /* __in DWORD dwLanguageId */ + (LPSTR)&errorMessage, /* __out LPTSTR lpBuffer */ + 0, /* __in DWORD nSize */ + 0 ); /* __in_opt va_list * Arguments */ + + /* Build a message as if the process had written to stderr. */ + if ( globs.pipe_action ) + err_buf = cmdtab[ slot ].buffer_err; + else + err_buf = cmdtab[ slot ].buffer_out; + string_append( err_buf, apiName ); + string_append( err_buf, "() Windows API failed: " ); + sprintf( buf, "%lu", errorCode ); + string_append( err_buf, buf ); + + if ( !apiResult ) + string_append( err_buf, ".\n" ); + else + { + string_append( err_buf, " - " ); + string_append( err_buf, errorMessage ); + /* Make sure that the buffer is terminated with a newline */ + if( err_buf->value[ err_buf->size - 1 ] != '\n' ) + string_push_back( err_buf, '\n' ); + LocalFree( errorMessage ); + } + + /* Since the process didn't actually start, use a blank timing_info. */ + time.system = 0; + time.user = 0; + timestamp_current( &time.start ); + timestamp_current( &time.end ); + + /* Invoke the callback with a failure status. */ + (*cmdtab[ slot ].func)( cmdtab[ slot ].closure, EXEC_CMD_FAIL, &time, + cmdtab[ slot ].buffer_out->value, cmdtab[ slot ].buffer_err->value, + EXIT_OK ); + + /* Clean up any handles that were opened. */ + closeWinHandle( &cmdtab[ slot ].pi.hProcess ); + closeWinHandle( &cmdtab[ slot ].pi.hThread ); + closeWinHandle( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_READ ] ); + closeWinHandle( &cmdtab[ slot ].pipe_out[ EXECCMD_PIPE_WRITE ] ); + closeWinHandle( &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_READ ] ); + closeWinHandle( &cmdtab[ slot ].pipe_err[ EXECCMD_PIPE_WRITE ] ); + string_renew( cmdtab[ slot ].buffer_out ); + string_renew( cmdtab[ slot ].buffer_err ); +} + +int32_t shell_maxline() +{ + return maxline(); +} + + +#endif /* USE_EXECNT */ diff --git a/src/boost/tools/build/src/engine/execunix.cpp b/src/boost/tools/build/src/engine/execunix.cpp new file mode 100644 index 000000000..7825fffe7 --- /dev/null +++ b/src/boost/tools/build/src/engine/execunix.cpp @@ -0,0 +1,614 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * Copyright 2007 Noel Belcourt. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +#include "jam.h" + +#ifdef USE_EXECUNIX + +#include "execcmd.h" + +#include "lists.h" +#include "output.h" +#include "jam_strings.h" +#include "startup.h" + +#include +#include +#include +#include +#include /* vfork(), _exit(), STDOUT_FILENO and such */ +#include +#include +#include +#include + +#if defined(sun) || defined(__sun) + #include +#endif + +#include + +#if defined(__APPLE__) + #define NO_VFORK +#endif + +#ifdef NO_VFORK + #define vfork() fork() +#endif + + +/* + * execunix.c - execute a shell script on UNIX/OS2/AmigaOS + * + * If $(JAMSHELL) is defined, uses that to formulate execvp()/spawnvp(). The + * default is: /bin/sh -c + * + * In $(JAMSHELL), % expands to the command string and ! expands to the slot + * number (starting at 1) for multiprocess (-j) invocations. If $(JAMSHELL) does + * not include a %, it is tacked on as the last argument. + * + * Each word must be an individual element in a jam variable value. + * + * Do not just set JAMSHELL to /bin/sh - it will not work! + * + * External routines: + * exec_check() - preprocess and validate the command. + * exec_cmd() - launch an async command execution. + * exec_wait() - wait for any of the async command processes to terminate. + */ + +/* find a free slot in the running commands table */ +static int get_free_cmdtab_slot(); + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +static clock_t tps; + +/* We hold stdout & stderr child process information in two element arrays + * indexed as follows. + */ +#define OUT 0 +#define ERR 1 + +static struct cmdtab_t +{ + int pid; /* on win32, a real process handle */ + int fd[ 2 ]; /* file descriptors for stdout and stderr */ + FILE * stream[ 2 ]; /* child's stdout and stderr file streams */ + clock_t start_time; /* start time of child process */ + int exit_reason; /* termination status */ + char * buffer[ 2 ]; /* buffers to hold stdout and stderr, if any */ + int buf_size[ 2 ]; /* buffer sizes in bytes */ + timestamp start_dt; /* start of command timestamp */ + + int flags; + + /* Function called when the command completes. */ + ExecCmdCallback func; + + /* Opaque data passed back to the 'func' callback. */ + void * closure; +} * cmdtab = NULL; +static int cmdtab_size = 0; + +/* Contains both stdin and stdout of all processes. + * The length is either globs.jobs or globs.jobs * 2 + * depending on globs.pipe_action. + */ +struct pollfd * wait_fds = NULL; +#define WAIT_FDS_SIZE ( globs.jobs * ( globs.pipe_action ? 2 : 1 ) ) +#define GET_WAIT_FD( job_idx ) ( wait_fds + ( ( job_idx * ( globs.pipe_action ? 2 : 1 ) ) ) ) + +/* + * exec_init() - global initialization + */ +void exec_init( void ) +{ + int i; + if ( globs.jobs > cmdtab_size ) + { + cmdtab = (cmdtab_t*)BJAM_REALLOC( cmdtab, globs.jobs * sizeof( *cmdtab ) ); + memset( cmdtab + cmdtab_size, 0, ( globs.jobs - cmdtab_size ) * sizeof( *cmdtab ) ); + wait_fds = (pollfd*)BJAM_REALLOC( wait_fds, WAIT_FDS_SIZE * sizeof ( *wait_fds ) ); + for ( i = cmdtab_size; i < globs.jobs; ++i ) + { + GET_WAIT_FD( i )[ OUT ].fd = -1; + GET_WAIT_FD( i )[ OUT ].events = POLLIN; + if ( globs.pipe_action ) + { + GET_WAIT_FD( i )[ ERR ].fd = -1; + GET_WAIT_FD( i )[ ERR ].events = POLLIN; + } + } + cmdtab_size = globs.jobs; + } +} + +void exec_done( void ) +{ + BJAM_FREE( cmdtab ); + BJAM_FREE( wait_fds ); +} + +/* + * exec_check() - preprocess and validate the command. + */ + +int exec_check +( + string const * command, + LIST * * pShell, + int32_t * error_length, + int32_t * error_max_length +) +{ + int const is_raw_cmd = is_raw_command_request( *pShell ); + + /* We allow empty commands for non-default shells since we do not really + * know what they are going to do with such commands. + */ + if ( !command->size && ( is_raw_cmd || list_empty( *pShell ) ) ) + return EXEC_CHECK_NOOP; + + return is_raw_cmd + ? EXEC_CHECK_OK + : check_cmd_for_too_long_lines( command->value, shell_maxline(), error_length, + error_max_length ); +} + + +/* + * exec_cmd() - launch an async command execution. + */ + +/* We hold file descriptors for pipes used to communicate with child processes + * in two element arrays indexed as follows. + */ +#define EXECCMD_PIPE_READ 0 +#define EXECCMD_PIPE_WRITE 1 + +void exec_cmd +( + string const * command, + int flags, + ExecCmdCallback func, + void * closure, + LIST * shell +) +{ + struct sigaction ignore, saveintr, savequit; + sigset_t chldmask, savemask; + + int const slot = get_free_cmdtab_slot(); + int out[ 2 ]; + int err[ 2 ]; + char const * argv[ MAXARGC + 1 ]; /* +1 for NULL */ + + /* Initialize default shell. */ + static LIST * default_shell; + if ( !default_shell ) + default_shell = list_push_back( list_new( + object_new( "/bin/sh" ) ), + object_new( "-c" ) ); + + if ( list_empty( shell ) ) + shell = default_shell; + + /* Forumulate argv. If shell was defined, be prepared for % and ! subs. + * Otherwise, use stock /bin/sh. + */ + argv_from_shell( argv, shell, command->value, slot ); + + if ( DEBUG_EXECCMD ) + { + int i; + out_printf( "Using shell: " ); + list_print( shell ); + out_printf( "\n" ); + for ( i = 0; argv[ i ]; ++i ) + out_printf( " argv[%d] = '%s'\n", i, argv[ i ] ); + } + + /* Create pipes for collecting child output. */ + if ( pipe( out ) < 0 || ( globs.pipe_action && pipe( err ) < 0 ) ) + { + errno_puts( "pipe" ); + b2::clean_exit( EXITBAD ); + } + + /* Start the command */ + + timestamp_current( &cmdtab[ slot ].start_dt ); + + if ( 0 < globs.timeout ) + { + /* Handle hung processes by manually tracking elapsed time and signal + * process when time limit expires. + */ + struct tms buf; + cmdtab[ slot ].start_time = times( &buf ); + + /* Make a global, only do this once. */ + if ( !tps ) tps = sysconf( _SC_CLK_TCK ); + } + + /* Child does not need the read pipe ends used by the parent. */ + fcntl( out[ EXECCMD_PIPE_READ ], F_SETFD, FD_CLOEXEC ); + if ( globs.pipe_action ) + fcntl( err[ EXECCMD_PIPE_READ ], F_SETFD, FD_CLOEXEC ); + + /* ignore SIGINT and SIGQUIT */ + ignore.sa_handler = SIG_IGN; + sigemptyset(&ignore.sa_mask); + ignore.sa_flags = 0; + if (sigaction(SIGINT, &ignore, &saveintr) < 0) + return; + if (sigaction(SIGQUIT, &ignore, &savequit) < 0) + return; + + /* block SIGCHLD */ + sigemptyset(&chldmask); + sigaddset(&chldmask, SIGCHLD); + if (sigprocmask(SIG_BLOCK, &chldmask, &savemask) < 0) + return; + + if ( ( cmdtab[ slot ].pid = vfork() ) == -1 ) + { + errno_puts( "vfork" ); + b2::clean_exit( EXITBAD ); + } + + if ( cmdtab[ slot ].pid == 0 ) + { + /*****************/ + /* Child process */ + /*****************/ + int const pid = getpid(); + + /* restore previous signals */ + sigaction(SIGINT, &saveintr, NULL); + sigaction(SIGQUIT, &savequit, NULL); + sigprocmask(SIG_SETMASK, &savemask, NULL); + + /* Redirect stdout and stderr to pipes inherited from the parent. */ + dup2( out[ EXECCMD_PIPE_WRITE ], STDOUT_FILENO ); + dup2( globs.pipe_action ? err[ EXECCMD_PIPE_WRITE ] : + out[ EXECCMD_PIPE_WRITE ], STDERR_FILENO ); + close( out[ EXECCMD_PIPE_WRITE ] ); + if ( globs.pipe_action ) + close( err[ EXECCMD_PIPE_WRITE ] ); + + /* Make this process a process group leader so that when we kill it, all + * child processes of this process are terminated as well. We use + * killpg( pid, SIGKILL ) to kill the process group leader and all its + * children. + */ + if ( 0 < globs.timeout ) + { + struct rlimit r_limit; + r_limit.rlim_cur = globs.timeout; + r_limit.rlim_max = globs.timeout; + setrlimit( RLIMIT_CPU, &r_limit ); + } + if (0 != setpgid( pid, pid )) { + errno_puts("setpgid(child)"); + /* b2::clean_exit( EXITBAD ); */ + } + execvp( argv[ 0 ], (char * *)argv ); + errno_puts( "execvp" ); + _exit( 127 ); + } + + /******************/ + /* Parent process */ + /******************/ + + /* redundant call, ignore return value */ + setpgid(cmdtab[ slot ].pid, cmdtab[ slot ].pid); + + /* Parent not need the write pipe ends used by the child. */ + close( out[ EXECCMD_PIPE_WRITE ] ); + if ( globs.pipe_action ) + close( err[ EXECCMD_PIPE_WRITE ] ); + + /* Set both pipe read file descriptors to non-blocking. */ + fcntl( out[ EXECCMD_PIPE_READ ], F_SETFL, O_NONBLOCK ); + if ( globs.pipe_action ) + fcntl( err[ EXECCMD_PIPE_READ ], F_SETFL, O_NONBLOCK ); + + /* Parent reads from out[ EXECCMD_PIPE_READ ]. */ + cmdtab[ slot ].fd[ OUT ] = out[ EXECCMD_PIPE_READ ]; + cmdtab[ slot ].stream[ OUT ] = fdopen( cmdtab[ slot ].fd[ OUT ], "rb" ); + if ( !cmdtab[ slot ].stream[ OUT ] ) + { + errno_puts( "fdopen" ); + b2::clean_exit( EXITBAD ); + } + + /* Parent reads from err[ EXECCMD_PIPE_READ ]. */ + if ( globs.pipe_action ) + { + cmdtab[ slot ].fd[ ERR ] = err[ EXECCMD_PIPE_READ ]; + cmdtab[ slot ].stream[ ERR ] = fdopen( cmdtab[ slot ].fd[ ERR ], "rb" ); + if ( !cmdtab[ slot ].stream[ ERR ] ) + { + errno_puts( "fdopen" ); + b2::clean_exit( EXITBAD ); + } + } + + GET_WAIT_FD( slot )[ OUT ].fd = out[ EXECCMD_PIPE_READ ]; + if ( globs.pipe_action ) + GET_WAIT_FD( slot )[ ERR ].fd = err[ EXECCMD_PIPE_READ ]; + + cmdtab[ slot ].flags = flags; + + /* Save input data into the selected running commands table slot. */ + cmdtab[ slot ].func = func; + cmdtab[ slot ].closure = closure; + + /* restore previous signals */ + sigaction(SIGINT, &saveintr, NULL); + sigaction(SIGQUIT, &savequit, NULL); + sigprocmask(SIG_SETMASK, &savemask, NULL); +} + +#undef EXECCMD_PIPE_READ +#undef EXECCMD_PIPE_WRITE + + +/* Returns 1 if file descriptor is closed, or 0 if it is still alive. + * + * i is index into cmdtab + * + * s (stream) indexes: + * - cmdtab[ i ].stream[ s ] + * - cmdtab[ i ].buffer[ s ] + * - cmdtab[ i ].fd [ s ] + */ + +static int read_descriptor( int i, int s ) +{ + int ret; + char buffer[ BUFSIZ ]; + + while ( 0 < ( ret = fread( buffer, sizeof( char ), BUFSIZ - 1, + cmdtab[ i ].stream[ s ] ) ) ) + { + buffer[ ret ] = 0; + + /* Copy it to our output if appropriate */ + if ( ! ( cmdtab[ i ].flags & EXEC_CMD_QUIET ) ) + { + if ( s == OUT && ( globs.pipe_action != 2 ) ) + out_data( buffer ); + else if ( s == ERR && ( globs.pipe_action & 2 ) ) + err_data( buffer ); + } + + if ( !cmdtab[ i ].buffer[ s ] ) + { + /* Never been allocated. */ + if ( globs.max_buf && ret > globs.max_buf ) + { + ret = globs.max_buf; + buffer[ ret ] = 0; + } + cmdtab[ i ].buf_size[ s ] = ret + 1; + cmdtab[ i ].buffer[ s ] = (char*)BJAM_MALLOC_ATOMIC( ret + 1 ); + memcpy( cmdtab[ i ].buffer[ s ], buffer, ret + 1 ); + } + else + { + /* Previously allocated. */ + if ( cmdtab[ i ].buf_size[ s ] < globs.max_buf || !globs.max_buf ) + { + char * tmp = cmdtab[ i ].buffer[ s ]; + int const old_len = cmdtab[ i ].buf_size[ s ] - 1; + int const new_len = old_len + ret + 1; + cmdtab[ i ].buf_size[ s ] = new_len; + cmdtab[ i ].buffer[ s ] = (char*)BJAM_MALLOC_ATOMIC( new_len ); + memcpy( cmdtab[ i ].buffer[ s ], tmp, old_len ); + memcpy( cmdtab[ i ].buffer[ s ] + old_len, buffer, ret + 1 ); + BJAM_FREE( tmp ); + } + } + } + + /* If buffer full, ensure last buffer char is newline so that jam log + * contains the command status at beginning of it own line instead of + * appended to end of the previous output. + */ + if ( globs.max_buf && globs.max_buf <= cmdtab[ i ].buf_size[ s ] ) + cmdtab[ i ].buffer[ s ][ cmdtab[ i ].buf_size[ s ] - 2 ] = '\n'; + + return feof( cmdtab[ i ].stream[ s ] ); +} + + +/* + * close_streams() - Close the stream and pipe descriptor. + */ + +static void close_streams( int const i, int const s ) +{ + fclose( cmdtab[ i ].stream[ s ] ); + cmdtab[ i ].stream[ s ] = 0; + + close( cmdtab[ i ].fd[ s ] ); + cmdtab[ i ].fd[ s ] = 0; + + GET_WAIT_FD( i )[ s ].fd = -1; +} + + +/* + * exec_wait() - wait for any of the async command processes to terminate. + * + * May register more than one terminated child process but will exit as soon as + * at least one has been registered. + */ + +void exec_wait() +{ + int finished = 0; + + /* Process children that signaled. */ + while ( !finished ) + { + int i; + int select_timeout = globs.timeout; + + /* Check for timeouts: + * - kill children that already timed out + * - decide how long until the next one times out + */ + if ( globs.timeout > 0 ) + { + struct tms buf; + clock_t const current = times( &buf ); + for ( i = 0; i < globs.jobs; ++i ) + if ( cmdtab[ i ].pid ) + { + clock_t const consumed = + ( current - cmdtab[ i ].start_time ) / tps; + if ( consumed >= globs.timeout ) + { + killpg( cmdtab[ i ].pid, SIGKILL ); + cmdtab[ i ].exit_reason = EXIT_TIMEOUT; + } + else if ( globs.timeout - consumed < select_timeout ) + select_timeout = globs.timeout - consumed; + } + } + + /* select() will wait for I/O on a descriptor, a signal, or timeout. */ + { + /* disable child termination signals while in select */ + int ret; + int timeout; + sigset_t sigmask; + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGCHLD); + sigprocmask(SIG_BLOCK, &sigmask, NULL); + + /* If no timeout is specified, pass -1 (which means no timeout, + * wait indefinitely) to poll, to prevent busy-looping. + */ + timeout = select_timeout? select_timeout * 1000 : -1; + while ( ( ret = poll( wait_fds, WAIT_FDS_SIZE, timeout ) ) == -1 ) + if ( errno != EINTR ) + break; + /* restore original signal mask by unblocking sigchld */ + sigprocmask(SIG_UNBLOCK, &sigmask, NULL); + if ( ret <= 0 ) + continue; + } + + for ( i = 0; i < globs.jobs; ++i ) + { + int out_done = 0; + int err_done = 0; + if ( GET_WAIT_FD( i )[ OUT ].revents ) + out_done = read_descriptor( i, OUT ); + + if ( globs.pipe_action && ( GET_WAIT_FD( i )[ ERR ].revents ) ) + err_done = read_descriptor( i, ERR ); + + /* If feof on either descriptor, we are done. */ + if ( out_done || err_done ) + { + int pid; + int status; + int rstat; + timing_info time_info; + struct rusage cmd_usage; + + /* We found a terminated child process - our search is done. */ + finished = 1; + + /* Close the stream and pipe descriptors. */ + close_streams( i, OUT ); + if ( globs.pipe_action ) + close_streams( i, ERR ); + + /* Reap the child and release resources. */ + while ( ( pid = wait4( cmdtab[ i ].pid, &status, 0, &cmd_usage ) ) == -1 ) + if ( errno != EINTR ) + break; + if ( pid != cmdtab[ i ].pid ) + { + err_printf( "unknown pid %d with errno = %d\n", pid, errno ); + b2::clean_exit( EXITBAD ); + } + + /* Set reason for exit if not timed out. */ + if ( WIFEXITED( status ) ) + cmdtab[ i ].exit_reason = WEXITSTATUS( status ) + ? EXIT_FAIL + : EXIT_OK; + + { + time_info.system = ((double)(cmd_usage.ru_stime.tv_sec)*1000000.0+(double)(cmd_usage.ru_stime.tv_usec))/1000000.0; + time_info.user = ((double)(cmd_usage.ru_utime.tv_sec)*1000000.0+(double)(cmd_usage.ru_utime.tv_usec))/1000000.0; + timestamp_copy( &time_info.start, &cmdtab[ i ].start_dt ); + timestamp_current( &time_info.end ); + } + + /* Drive the completion. */ + if ( interrupted() ) + rstat = EXEC_CMD_INTR; + else if ( status ) + rstat = EXEC_CMD_FAIL; + else + rstat = EXEC_CMD_OK; + + /* Call the callback, may call back to jam rule land. */ + (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time_info, + cmdtab[ i ].buffer[ OUT ], cmdtab[ i ].buffer[ ERR ], + cmdtab[ i ].exit_reason ); + + /* Clean up the command's running commands table slot. */ + BJAM_FREE( cmdtab[ i ].buffer[ OUT ] ); + cmdtab[ i ].buffer[ OUT ] = 0; + cmdtab[ i ].buf_size[ OUT ] = 0; + + BJAM_FREE( cmdtab[ i ].buffer[ ERR ] ); + cmdtab[ i ].buffer[ ERR ] = 0; + cmdtab[ i ].buf_size[ ERR ] = 0; + + cmdtab[ i ].pid = 0; + cmdtab[ i ].func = 0; + cmdtab[ i ].closure = 0; + cmdtab[ i ].start_time = 0; + } + } + } +} + + +/* + * Find a free slot in the running commands table. + */ + +static int get_free_cmdtab_slot() +{ + int slot; + for ( slot = 0; slot < globs.jobs; ++slot ) + if ( !cmdtab[ slot ].pid ) + return slot; + err_printf( "no slots for child!\n" ); + b2::clean_exit( EXITBAD ); + return -1; +} + +int32_t shell_maxline() +{ + return MAXLINE; +} + +# endif /* USE_EXECUNIX */ diff --git a/src/boost/tools/build/src/engine/execvms.cpp b/src/boost/tools/build/src/engine/execvms.cpp new file mode 100644 index 000000000..05b6c7a20 --- /dev/null +++ b/src/boost/tools/build/src/engine/execvms.cpp @@ -0,0 +1,426 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2015 Artur Shepilko. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + + +/* + * execvms.c - execute a shell script, ala VMS. + * + * The approach is this: + * + * If the command is a single line, and shorter than WRTLEN (what we believe to + * be the maximum line length), we just system() it. + * + * If the command is multi-line, or longer than WRTLEN, we write the command + * block to a temp file, splitting long lines (using "-" at the end of the line + * to indicate contiuation), and then source that temp file. We use special + * logic to make sure we do not continue in the middle of a quoted string. + * + * 05/04/94 (seiwald) - async multiprocess interface; noop on VMS + * 12/20/96 (seiwald) - rewritten to handle multi-line commands well + * 01/14/96 (seiwald) - do not put -'s between "'s + * 01/19/15 (shepilko)- adapt for jam-3.1.19 + */ + +#include "jam.h" +#include "lists.h" +#include "execcmd.h" +#include "output.h" +#include "startup.h" + +#ifdef OS_VMS + +#include +#include +#include +#include +#include +#include +#include + + +#define WRTLEN 240 + +#define MIN( a, b ) ((a) < (b) ? (a) : (b)) + +#define CHAR_DQUOTE '"' + +#define VMS_PATH_MAX 1024 +#define VMS_COMMAND_MAX 1024 + +#define VMS_WARNING 0 +#define VMS_SUCCESS 1 +#define VMS_ERROR 2 +#define VMS_FATAL 4 + +char commandbuf[ VMS_COMMAND_MAX ] = { 0 }; + + +static int get_status(int vms_status); +static clock_t get_cpu_time(); + +/* + * exec_check() - preprocess and validate the command. + */ + +int exec_check +( + string const * command, + LIST * * pShell, + int32_t * error_length, + int32_t * error_max_length +) +{ + int const is_raw_cmd = 1; + + /* We allow empty commands for non-default shells since we do not really + * know what they are going to do with such commands. + */ + if ( !command->size && ( is_raw_cmd || list_empty( *pShell ) ) ) + return EXEC_CHECK_NOOP; + + return is_raw_cmd + ? EXEC_CHECK_OK + : check_cmd_for_too_long_lines( command->value, shell_maxline(), error_length, + error_max_length ); +} + + +/* + * exec_cmd() - execute system command. + */ + +void exec_cmd +( + string const * command, + int flags, + ExecCmdCallback func, + void * closure, + LIST * shell +) +{ + char * s; + char * e; + char * p; + int vms_status; + int status; + int rstat = EXEC_CMD_OK; + int exit_reason = EXIT_OK; + timing_info time_info; + timestamp start_dt; + struct tms start_time; + struct tms end_time; + char * cmd_string = command->value; + + + /* Start the command */ + + timestamp_current( &time_info.start ); + times( &start_time ); + + /* See if command is more than one line discounting leading/trailing white + * space. + */ + for ( s = cmd_string; *s && isspace( *s ); ++s ); + + e = p = strchr( s, '\n' ); + + while ( p && isspace( *p ) ) + ++p; + + /* If multi line or long, write to com file. Otherwise, exec directly. */ + if ( ( p && *p ) || ( e - s > WRTLEN ) ) + { + FILE * f; + + /* Create temp file invocation. */ + + if ( !*commandbuf ) + { + OBJECT * tmp_filename = 0; + + tmp_filename = path_tmpfile(); + + + /* Get tmp file name is VMS-format. */ + { + string os_filename[ 1 ]; + string_new( os_filename ); + path_translate_to_os( object_str( tmp_filename ), os_filename ); + object_free( tmp_filename ); + tmp_filename = object_new( os_filename->value ); + string_free( os_filename ); + } + + commandbuf[0] = '@'; + strncat( commandbuf + 1, object_str( tmp_filename ), + VMS_COMMAND_MAX - 2); + } + + + /* Open tempfile. */ + if ( !( f = fopen( commandbuf + 1, "w" ) ) ) + { + err_printf( "[errno %d] failed to wite cmd_string file '%s': %s", + errno, commandbuf + 1, strerror(errno) ); + rstat = EXEC_CMD_FAIL; + exit_reason = EXIT_FAIL; + + times( &end_time ); + + timestamp_current( &time_info.end ); + time_info.system = (double)( end_time.tms_cstime - + start_time.tms_cstime ) / 100.; + time_info.user = (double)( end_time.tms_cutime - + start_time.tms_cutime ) / 100.; + + (*func)( closure, rstat, &time_info, "" , "", exit_reason ); + return; + } + + + /* Running from TMP, so explicitly set default to CWD. */ + { + char * cwd = NULL; + int cwd_buf_size = VMS_PATH_MAX; + + while ( !(cwd = getcwd( NULL, cwd_buf_size ) ) /* alloc internally */ + && errno == ERANGE ) + { + cwd_buf_size += VMS_PATH_MAX; + } + + if ( !cwd ) + { + errno_puts( "can not get current working directory" ); + b2::clean_exit( EXITBAD ); + } + + fprintf( f, "$ SET DEFAULT %s\n", cwd); + + free( cwd ); + } + + + /* For each line of the command. */ + while ( *cmd_string ) + { + char * s = strchr( cmd_string,'\n' ); + int len = s ? s + 1 - cmd_string : strlen( cmd_string ); + + fputc( '$', f ); + + /* For each chunk of a line that needs to be split. */ + while ( len > 0 ) + { + char * q = cmd_string; + char * qe = cmd_string + MIN( len, WRTLEN ); + char * qq = q; + int quote = 0; + + /* Look for matching "s -- expected in the same line. */ + for ( ; q < qe; ++q ) + if ( ( *q == CHAR_DQUOTE ) && ( quote = !quote ) ) + qq = q; + + /* When needs splitting and is inside an open quote, + * back up to opening quote and split off at it. + * When the quoted string spans over a chunk, + * pass string as a whole. + * If no matching quote found, dump the rest of command. + */ + if ( len > WRTLEN && quote ) + { + q = qq; + + if ( q == cmd_string ) + { + for ( q = qe; q < ( cmd_string + len ) + && *q != CHAR_DQUOTE ; ++q) {} + q = ( *q == CHAR_DQUOTE) ? ( q + 1 ) : ( cmd_string + len ); + } + } + + fwrite( cmd_string, ( q - cmd_string ), 1, f ); + + len -= ( q - cmd_string ); + cmd_string = q; + + if ( len ) + { + fputc( '-', f ); + fputc( '\n', f ); + } + } + } + + fclose( f ); + + if ( DEBUG_EXECCMD ) + { + FILE * f; + char buf[ WRTLEN + 1 ] = { 0 }; + + if ( (f = fopen( commandbuf + 1, "r" ) ) ) + { + int nbytes; + printf( "Command file: %s\n", commandbuf + 1 ); + + do + { + nbytes = fread( buf, sizeof( buf[0] ), sizeof( buf ) - 1, f ); + + if ( nbytes ) fwrite(buf, sizeof( buf[0] ), nbytes, stdout); + } + while ( !feof(f) ); + + fclose(f); + } + } + + /* Execute command file */ + vms_status = system( commandbuf ); + status = get_status( vms_status ); + + unlink( commandbuf + 1 ); + } + else + { + /* Execute single line command. Strip trailing newline before execing. + * TODO:Call via popen() with capture of the output may be better here. + */ + if ( e ) *e = 0; + + status = VMS_SUCCESS; /* success on empty command */ + if ( *s ) + { + vms_status = system( s ); + status = get_status( vms_status ); + } + } + + + times( &end_time ); + + timestamp_current( &time_info.end ); + time_info.system = (double)( end_time.tms_cstime - + start_time.tms_cstime ) / 100.; + time_info.user = (double)( end_time.tms_cutime - + start_time.tms_cutime ) / 100.; + + + /* Fail for error or fatal error. OK on OK, warning or info exit. */ + if ( ( status == VMS_ERROR ) || ( status == VMS_FATAL ) ) + { + rstat = EXEC_CMD_FAIL; + exit_reason = EXIT_FAIL; + } + + (*func)( closure, rstat, &time_info, "" , "", exit_reason ); +} + + +void exec_wait() +{ + return; +} + + +/* get_status() - returns status of the VMS command execution. + - Map VMS status to its severity (lower 3-bits) + - W-DCL-IVVERB is returned on unrecognized command -- map to general ERROR +*/ +int get_status( int vms_status ) +{ +#define VMS_STATUS_DCL_IVVERB 0x00038090 + + int status; + + switch (vms_status) + { + case VMS_STATUS_DCL_IVVERB: + status = VMS_ERROR; + break; + + default: + status = vms_status & 0x07; /* $SEVERITY bits */ + } + + return status; +} + + +#define __NEW_STARLET 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * get_cpu_time() - returns CPU time in CLOCKS_PER_SEC since process start. + * on error returns (clock_t)-1. + * + * Intended to emulate (system + user) result of *NIX times(), if CRTL times() + * is not available. +* However, this accounts only for the current process. To account for child +* processes, these need to be directly spawned/forked via exec(). +* Moreover, child processes should be running a C main program or a program +* that calls VAXC$CRTL_INIT or DECC$CRTL_INIT. +*/ + +clock_t get_cpu_time() +{ + clock_t result = (clock_t) 0; + + IOSB iosb; + int status; + long cputime = 0; + + + ILE3 jpi_items[] = { + { sizeof( cputime ), JPI$_CPUTIM, &cputime, NULL }, /* longword int, 10ms */ + { 0 }, + }; + + status = sys$getjpiw (EFN$C_ENF, 0, 0, jpi_items, &iosb, 0, 0); + + if ( !$VMS_STATUS_SUCCESS( status ) ) + { + lib$signal( status ); + + result = (clock_t) -1; + return result; + } + + + result = ( cputime / 100 ) * CLOCKS_PER_SEC; + + return result; +} + +int32_t shell_maxline() +{ + return MAXLINE; +} + + +# endif /* VMS */ + diff --git a/src/boost/tools/build/src/engine/filent.cpp b/src/boost/tools/build/src/engine/filent.cpp new file mode 100644 index 000000000..e32879424 --- /dev/null +++ b/src/boost/tools/build/src/engine/filent.cpp @@ -0,0 +1,517 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * filent.c - scan directories and archives on NT + * + * External routines: + * file_archscan() - scan an archive for files + * file_mkdir() - create a directory + * file_supported_fmt_resolution() - file modification timestamp resolution + * + * External routines called only via routines in filesys.c: + * file_collect_dir_content_() - collects directory content information + * file_dirscan_() - OS specific file_dirscan() implementation + * file_query_() - query information about a path from the OS + * file_collect_archive_content_() - collects information about archive members + * file_archivescan_() - OS specific file_archivescan() implementation + */ + +#include "jam.h" +#ifdef OS_NT +#include "filesys.h" + +#include "object.h" +#include "pathsys.h" +#include "jam_strings.h" +#include "output.h" + +#ifdef __BORLANDC__ +# undef FILENAME /* cpp namespace collision */ +#endif + +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include +#include +#include + + +int file_collect_archive_content_( file_archive_info_t * const archive ); + +/* + * file_collect_dir_content_() - collects directory content information + */ + +int file_collect_dir_content_( file_info_t * const d ) +{ + PATHNAME f; + string pathspec[ 1 ]; + string pathname[ 1 ]; + LIST * files = L0; + int32_t d_length; + + assert( d ); + assert( d->is_dir ); + assert( list_empty( d->files ) ); + + d_length = int32_t(strlen( object_str( d->name ) )); + + memset( (char *)&f, '\0', sizeof( f ) ); + f.f_dir.ptr = object_str( d->name ); + f.f_dir.len = d_length; + + /* Prepare file search specification for the FindXXX() Windows API. */ + if ( !d_length ) + string_copy( pathspec, ".\\*" ); + else + { + /* We can not simply assume the given folder name will never include its + * trailing path separator or otherwise we would not support the Windows + * root folder specified without its drive letter, i.e. '\'. + */ + char const trailingChar = object_str( d->name )[ d_length - 1 ] ; + string_copy( pathspec, object_str( d->name ) ); + if ( ( trailingChar != '\\' ) && ( trailingChar != '/' ) ) + string_append( pathspec, "\\" ); + string_append( pathspec, "*" ); + } + + /* The following code for collecting information about all files in a folder + * needs to be kept synchronized with how the file_query() operation is + * implemented (collects information about a single file). + */ + { + /* FIXME: Avoid duplicate FindXXX Windows API calls here and in the code + * determining a normalized path. + */ + WIN32_FIND_DATAA finfo; + HANDLE const findHandle = FindFirstFileA( pathspec->value, &finfo ); + if ( findHandle == INVALID_HANDLE_VALUE ) + { + string_free( pathspec ); + return -1; + } + + string_new( pathname ); + do + { + OBJECT * pathname_obj; + + f.f_base.ptr = finfo.cFileName; + f.f_base.len = int32_t(strlen( finfo.cFileName )); + + string_truncate( pathname, 0 ); + path_build( &f, pathname ); + + pathname_obj = object_new( pathname->value ); + path_register_key( pathname_obj ); + files = list_push_back( files, pathname_obj ); + { + int found; + file_info_t * const ff = file_info( pathname_obj, &found ); + ff->is_dir = finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + ff->is_file = !ff->is_dir; + ff->exists = 1; + timestamp_from_filetime( &ff->time, &finfo.ftLastWriteTime ); + // Use the timestamp of the link target, not the link itself + // (i.e. stat instead of lstat) + if ( finfo.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT ) + { + HANDLE hLink = CreateFileA( pathname->value, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); + BY_HANDLE_FILE_INFORMATION target_finfo[ 1 ]; + if ( hLink != INVALID_HANDLE_VALUE && GetFileInformationByHandle( hLink, target_finfo ) ) + { + ff->is_file = target_finfo->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? 0 : 1; + ff->is_dir = target_finfo->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? 1 : 0; + timestamp_from_filetime( &ff->time, &target_finfo->ftLastWriteTime ); + } + } + } + } + while ( FindNextFileA( findHandle, &finfo ) ); + + FindClose( findHandle ); + } + + string_free( pathname ); + string_free( pathspec ); + + d->files = files; + return 0; +} + + +/* + * file_dirscan_() - OS specific file_dirscan() implementation + */ + +void file_dirscan_( file_info_t * const d, scanback func, void * closure ) +{ + assert( d ); + assert( d->is_dir ); + + /* Special case \ or d:\ : enter it */ + { + char const * const name = object_str( d->name ); + if ( name[ 0 ] == '\\' && !name[ 1 ] ) + { + (*func)( closure, d->name, 1 /* stat()'ed */, &d->time ); + } + else if ( name[ 0 ] && name[ 1 ] == ':' && name[ 2 ] && !name[ 3 ] ) + { + /* We have just entered a 3-letter drive name spelling (with a + * trailing slash), into the hash table. Now enter its two-letter + * variant, without the trailing slash, so that if we try to check + * whether "c:" exists, we hit it. + * + * Jam core has workarounds for that. Given: + * x = c:\whatever\foo ; + * p = $(x:D) ; + * p2 = $(p:D) ; + * There will be no trailing slash in $(p), but there will be one in + * $(p2). But, that seems rather fragile. + */ + OBJECT * const dir_no_slash = object_new_range( name, 2 ); + (*func)( closure, d->name, 1 /* stat()'ed */, &d->time ); + (*func)( closure, dir_no_slash, 1 /* stat()'ed */, &d->time ); + object_free( dir_no_slash ); + } + } +} + + +/* + * file_mkdir() - create a directory + */ + +int file_mkdir( char const * const path ) +{ + return _mkdir( path ); +} + + +/* + * file_query_() - query information about a path from the OS + * + * The following code for collecting information about a single file needs to be + * kept synchronized with how the file_collect_dir_content_() operation is + * implemented (collects information about all files in a folder). + */ + +int try_file_query_root( file_info_t * const info ) +{ + WIN32_FILE_ATTRIBUTE_DATA fileData; + char buf[ 4 ]; + char const * const pathstr = object_str( info->name ); + if ( !pathstr[ 0 ] ) + { + buf[ 0 ] = '.'; + buf[ 1 ] = 0; + } + else if ( pathstr[ 0 ] == '\\' && ! pathstr[ 1 ] ) + { + buf[ 0 ] = '\\'; + buf[ 1 ] = '\0'; + } + else if ( pathstr[ 1 ] == ':' ) + { + if ( !pathstr[ 2 ] || ( pathstr[ 2 ] == '\\' && !pathstr[ 3 ] ) ) + { + buf[ 0 ] = pathstr[ 0 ]; + buf[ 1 ] = ':'; + buf[ 2 ] = '\\'; + buf[ 3 ] = '\0'; + } + else + { + return 0; + } + } + else + { + return 0; + } + + /* We have a root path */ + if ( !GetFileAttributesExA( buf, GetFileExInfoStandard, &fileData ) ) + { + info->is_dir = 0; + info->is_file = 0; + info->exists = 0; + timestamp_clear( &info->time ); + } + else + { + info->is_dir = fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + info->is_file = !info->is_dir; + info->exists = 1; + timestamp_from_filetime( &info->time, &fileData.ftLastWriteTime ); + } + return 1; +} + +void file_query_( file_info_t * const info ) +{ + char const * const pathstr = object_str( info->name ); + const char * dir; + OBJECT * parent; + file_info_t * parent_info; + + if ( try_file_query_root( info ) ) + return; + + if ( ( dir = strrchr( pathstr, '\\' ) ) ) + { + parent = object_new_range( pathstr, int32_t(dir - pathstr) ); + } + else + { + parent = object_copy( constant_empty ); + } + parent_info = file_query( parent ); + object_free( parent ); + if ( !parent_info || !parent_info->is_dir ) + { + info->is_dir = 0; + info->is_file = 0; + info->exists = 0; + timestamp_clear( &info->time ); + } + else + { + info->is_dir = 0; + info->is_file = 0; + info->exists = 0; + timestamp_clear( &info->time ); + if ( list_empty( parent_info->files ) ) + file_collect_dir_content_( parent_info ); + } +} + + +/* + * file_supported_fmt_resolution() - file modification timestamp resolution + * + * Returns the minimum file modification timestamp resolution supported by this + * Boost Jam implementation. File modification timestamp changes of less than + * the returned value might not be recognized. + * + * Does not take into consideration any OS or file system related restrictions. + * + * Return value 0 indicates that any value supported by the OS is also supported + * here. + */ + +void file_supported_fmt_resolution( timestamp * const t ) +{ + /* On Windows we support nano-second file modification timestamp resolution, + * just the same as the Windows OS itself. + */ + timestamp_init( t, 0, 0 ); +} + + +/* + * file_archscan() - scan an archive for files + */ + +/* Straight from SunOS */ + +#define ARMAG "!\n" +#define SARMAG 8 + +#define ARFMAG "`\n" + +struct ar_hdr +{ + char ar_name[ 16 ]; + char ar_date[ 12 ]; + char ar_uid[ 6 ]; + char ar_gid[ 6 ]; + char ar_mode[ 8 ]; + char ar_size[ 10 ]; + char ar_fmag[ 2 ]; +}; + +#define SARFMAG 2 +#define SARHDR sizeof( struct ar_hdr ) + +void file_archscan( char const * arch, scanback func, void * closure ) +{ + OBJECT * path = object_new( arch ); + file_archive_info_t * archive = file_archive_query( path ); + + object_free( path ); + + if ( filelist_empty( archive->members ) ) + { + if ( file_collect_archive_content_( archive ) < 0 ) + return; + } + + /* Report the collected archive content. */ + { + FILELISTITER iter = filelist_begin( archive->members ); + FILELISTITER const end = filelist_end( archive->members ); + char buf[ MAXJPATH ]; + + for ( ; iter != end ; iter = filelist_next( iter ) ) + { + file_info_t * member_file = filelist_item( iter ); + + /* Construct member path: 'archive-path(member-name)' + */ + sprintf( buf, "%s(%s)", + object_str( archive->file->name ), + object_str( member_file->name ) ); + { + OBJECT * const member = object_new( buf ); + (*func)( closure, member, 1 /* time valid */, &member_file->time ); + object_free( member ); + } + } + } +} + + +/* + * file_archivescan_() - OS specific file_archivescan() implementation + */ + +void file_archivescan_( file_archive_info_t * const archive, archive_scanback func, + void * closure ) +{ +} + + +/* + * file_collect_archive_content_() - collects information about archive members + */ + +int file_collect_archive_content_( file_archive_info_t * const archive ) +{ + struct ar_hdr ar_hdr; + char * string_table = 0; + char buf[ MAXJPATH ]; + long offset; + const char * path = object_str( archive->file->name ); + int const fd = open( path , O_RDONLY | O_BINARY, 0 ); + + if ( ! filelist_empty( archive->members ) ) filelist_free( archive->members ); + + if ( fd < 0 ) + return -1; + + if ( read( fd, buf, SARMAG ) != SARMAG || strncmp( ARMAG, buf, SARMAG ) ) + { + close( fd ); + return -1; + } + + offset = SARMAG; + + if ( DEBUG_BINDSCAN ) + out_printf( "scan archive %s\n", path ); + + while ( ( read( fd, &ar_hdr, SARHDR ) == SARHDR ) && + !memcmp( ar_hdr.ar_fmag, ARFMAG, SARFMAG ) ) + { + long lar_date; + long lar_size; + char * name = 0; + char * endname; + + sscanf( ar_hdr.ar_date, "%ld", &lar_date ); + sscanf( ar_hdr.ar_size, "%ld", &lar_size ); + + lar_size = ( lar_size + 1 ) & ~1; + + if ( ar_hdr.ar_name[ 0 ] == '/' && ar_hdr.ar_name[ 1 ] == '/' ) + { + /* This is the "string table" entry of the symbol table, holding + * filename strings longer than 15 characters, i.e. those that do + * not fit into ar_name. + */ + string_table = (char*)BJAM_MALLOC_ATOMIC( lar_size + 1 ); + if ( read( fd, string_table, lar_size ) != lar_size ) + out_printf( "error reading string table\n" ); + string_table[ lar_size ] = '\0'; + offset += SARHDR + lar_size; + continue; + } + else if ( ar_hdr.ar_name[ 0 ] == '/' && ar_hdr.ar_name[ 1 ] != ' ' ) + { + /* Long filenames are recognized by "/nnnn" where nnnn is the + * string's offset in the string table represented in ASCII + * decimals. + */ + name = string_table + atoi( ar_hdr.ar_name + 1 ); + for ( endname = name; *endname && *endname != '\n'; ++endname ); + } + else + { + /* normal name */ + name = ar_hdr.ar_name; + endname = name + sizeof( ar_hdr.ar_name ); + } + + /* strip trailing white-space, slashes, and backslashes */ + + while ( endname-- > name ) + if ( !isspace( *endname ) && ( *endname != '\\' ) && ( *endname != + '/' ) ) + break; + *++endname = 0; + + /* strip leading directory names, an NT specialty */ + { + char * c; + if ( (c = strrchr( name, '/' )) != nullptr ) + name = c + 1; + if ( (c = strrchr( name, '\\' )) != nullptr ) + name = c + 1; + } + + sprintf( buf, "%.*s", int(endname - name), name ); + + if ( strcmp( buf, "") != 0 ) + { + file_info_t * member = 0; + + /* NT static libraries appear to store the objects in a sequence + * reverse to the order in which they were inserted. + * Here we reverse the stored sequence by pushing members to front of + * member file list to get the intended members order. + */ + archive->members = filelist_push_front( archive->members, object_new( buf ) ); + member = filelist_front( archive->members ); + member->is_file = 1; + member->is_dir = 0; + member->exists = 0; + timestamp_init( &member->time, (time_t)lar_date, 0 ); + } + + offset += SARHDR + lar_size; + lseek( fd, offset, 0 ); + } + + close( fd ); + + return 0; +} + +#endif /* OS_NT */ diff --git a/src/boost/tools/build/src/engine/filesys.cpp b/src/boost/tools/build/src/engine/filesys.cpp new file mode 100644 index 000000000..b23f3791d --- /dev/null +++ b/src/boost/tools/build/src/engine/filesys.cpp @@ -0,0 +1,708 @@ +/* + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * filesys.c - OS independent file system manipulation support + * + * External routines: + * file_build1() - construct a path string based on PATHNAME information + * file_dirscan() - scan a directory for files + * file_done() - module cleanup called on shutdown + * file_info() - return cached information about a path + * file_is_file() - return whether a path identifies an existing file + * file_query() - get cached information about a path, query the OS if + * needed + * file_remove_atexit() - schedule a path to be removed on program exit + * file_time() - get a file timestamp + * + * External routines - utilities for OS specific module implementations: + * file_query_posix_() - query information about a path using POSIX stat() + * + * Internal routines: + * file_dirscan_impl() - no-profiling worker for file_dirscan() + */ + + +#include "jam.h" +#include "filesys.h" + +#include "lists.h" +#include "object.h" +#include "pathsys.h" +#include "jam_strings.h" +#include "output.h" + +#include +#include + + +/* Internal OS specific implementation details - have names ending with an + * underscore and are expected to be implemented in an OS specific fileXXX.c + * module. + */ +void file_dirscan_( file_info_t * const dir, scanback func, void * closure ); +int file_collect_dir_content_( file_info_t * const dir ); +void file_query_( file_info_t * const ); + +void file_archivescan_( file_archive_info_t * const archive, archive_scanback func, + void * closure ); +int file_collect_archive_content_( file_archive_info_t * const archive ); +void file_archive_query_( file_archive_info_t * const ); + +static void file_archivescan_impl( OBJECT * path, archive_scanback func, + void * closure ); +static void file_dirscan_impl( OBJECT * dir, scanback func, void * closure ); +static void free_file_archive_info( void * xarchive, void * data ); +static void free_file_info( void * xfile, void * data ); + +static void remove_files_atexit( void ); + + +static struct hash * filecache_hash; +static struct hash * archivecache_hash; + + +/* + * file_archive_info() - return cached information about an archive + * + * Returns a default initialized structure containing only queried file's info + * in case this is the first time this file system entity has been + * referenced. + */ + +file_archive_info_t * file_archive_info( OBJECT * const path, int * found ) +{ + OBJECT * const path_key = path_as_key( path ); + file_archive_info_t * archive; + + if ( !archivecache_hash ) + archivecache_hash = hashinit( sizeof( file_archive_info_t ), + "file_archive_info" ); + + archive = (file_archive_info_t *)hash_insert( archivecache_hash, path_key, + found ); + + if ( !*found ) + { + archive->name = path_key; + archive->file = 0; + archive->members = FL0; + } + else + object_free( path_key ); + + return archive; +} + + +/* + * file_archive_query() - get cached information about a archive file path + * + * Returns 0 in case querying the OS about the given path fails, e.g. because + * the path does not reference an existing file system object. + */ + +file_archive_info_t * file_archive_query( OBJECT * const path ) +{ + int found; + file_archive_info_t * const archive = file_archive_info( path, &found ); + file_info_t * file = file_query( path ); + + if ( !( file && file->is_file ) ) + { + return 0; + } + + archive->file = file; + + + return archive; +} + + + +/* + * file_archivescan() - scan an archive for members + */ + +void file_archivescan( OBJECT * path, archive_scanback func, void * closure ) +{ + PROFILE_ENTER( FILE_ARCHIVESCAN ); + file_archivescan_impl( path, func, closure ); + PROFILE_EXIT( FILE_ARCHIVESCAN ); +} + + +/* + * file_build1() - construct a path string based on PATHNAME information + */ + +void file_build1( PATHNAME * const f, string * file ) +{ + if ( DEBUG_SEARCH ) + { + out_printf( "build file: " ); + if ( f->f_root.len ) + out_printf( "root = '%.*s' ", f->f_root.len, f->f_root.ptr ); + if ( f->f_dir.len ) + out_printf( "dir = '%.*s' ", f->f_dir.len, f->f_dir.ptr ); + if ( f->f_base.len ) + out_printf( "base = '%.*s' ", f->f_base.len, f->f_base.ptr ); + out_printf( "\n" ); + } + + /* Start with the grist. If the current grist is not surrounded by <>'s, add + * them. + */ + if ( f->f_grist.len ) + { + if ( f->f_grist.ptr[ 0 ] != '<' ) + string_push_back( file, '<' ); + string_append_range( + file, f->f_grist.ptr, f->f_grist.ptr + f->f_grist.len ); + if ( file->value[ file->size - 1 ] != '>' ) + string_push_back( file, '>' ); + } +} + + +/* + * file_dirscan() - scan a directory for files + */ + +void file_dirscan( OBJECT * dir, scanback func, void * closure ) +{ + PROFILE_ENTER( FILE_DIRSCAN ); + file_dirscan_impl( dir, func, closure ); + PROFILE_EXIT( FILE_DIRSCAN ); +} + + +/* + * file_done() - module cleanup called on shutdown + */ + +void file_done() +{ + remove_files_atexit(); + if ( filecache_hash ) + { + hashenumerate( filecache_hash, free_file_info, (void *)0 ); + hashdone( filecache_hash ); + } + + if ( archivecache_hash ) + { + hashenumerate( archivecache_hash, free_file_archive_info, (void *)0 ); + hashdone( archivecache_hash ); + } +} + + +/* + * file_info() - return cached information about a path + * + * Returns a default initialized structure containing only the path's normalized + * name in case this is the first time this file system entity has been + * referenced. + */ + +file_info_t * file_info( OBJECT * const path, int * found ) +{ + OBJECT * const path_key = path_as_key( path ); + file_info_t * finfo; + + if ( !filecache_hash ) + filecache_hash = hashinit( sizeof( file_info_t ), "file_info" ); + + finfo = (file_info_t *)hash_insert( filecache_hash, path_key, found ); + if ( !*found ) + { + finfo->name = path_key; + finfo->files = L0; + } + else + object_free( path_key ); + + return finfo; +} + + +/* + * file_is_file() - return whether a path identifies an existing file + */ + +int file_is_file( OBJECT * const path ) +{ + file_info_t const * const ff = file_query( path ); + return ff ? ff->is_file : -1; +} + + +/* + * file_time() - get a file timestamp + */ + +int file_time( OBJECT * const path, timestamp * const time ) +{ + file_info_t const * const ff = file_query( path ); + if ( !ff ) return -1; + timestamp_copy( time, &ff->time ); + return 0; +} + + +/* + * file_query() - get cached information about a path, query the OS if needed + * + * Returns 0 in case querying the OS about the given path fails, e.g. because + * the path does not reference an existing file system object. + */ + +file_info_t * file_query( OBJECT * const path ) +{ + /* FIXME: Add tracking for disappearing files (i.e. those that can not be + * detected by stat() even though they had been detected successfully + * before) and see how they should be handled in the rest of Boost Jam code. + * Possibly allow Jamfiles to specify some files as 'volatile' which would + * make Boost Jam avoid caching information about those files and instead + * ask the OS about them every time. + */ + int found; + file_info_t * const ff = file_info( path, &found ); + if ( !found ) + { + file_query_( ff ); + if ( ff->exists ) + { + /* Set the path's timestamp to 1 in case it is 0 or undetected to avoid + * confusion with non-existing paths. + */ + if ( timestamp_empty( &ff->time ) ) + timestamp_init( &ff->time, 1, 0 ); + } + } + if ( !ff->exists ) + { + return 0; + } + return ff; +} + +#ifndef OS_NT + +/* + * file_query_posix_() - query information about a path using POSIX stat() + * + * Fallback file_query_() implementation for OS specific modules. + * + * Note that the Windows POSIX stat() function implementation suffers from + * several issues: + * * Does not support file timestamps with resolution finer than 1 second, + * meaning it can not be used to detect file timestamp changes of less than + * 1 second. One possible consequence is that some fast-paced touch commands + * (such as those done by Boost Build's internal testing system if it does + * not do some extra waiting) will not be detected correctly by the build + * system. + * * Returns file modification times automatically adjusted for daylight + * savings time even though daylight savings time should have nothing to do + * with internal time representation. + */ + +void file_query_posix_( file_info_t * const info ) +{ + struct stat statbuf; + char const * const pathstr = object_str( info->name ); + char const * const pathspec = *pathstr ? pathstr : "."; + + if ( stat( pathspec, &statbuf ) < 0 ) + { + info->is_file = 0; + info->is_dir = 0; + info->exists = 0; + timestamp_clear( &info->time ); + } + else + { + info->is_file = statbuf.st_mode & S_IFREG ? 1 : 0; + info->is_dir = statbuf.st_mode & S_IFDIR ? 1 : 0; + info->exists = 1; +#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809 +#if defined(OS_MACOSX) + timestamp_init( &info->time, statbuf.st_mtimespec.tv_sec, statbuf.st_mtimespec.tv_nsec ); +#else + timestamp_init( &info->time, statbuf.st_mtim.tv_sec, statbuf.st_mtim.tv_nsec ); +#endif +#else + timestamp_init( &info->time, statbuf.st_mtime, 0 ); +#endif + } +} + +/* + * file_supported_fmt_resolution() - file modification timestamp resolution + * + * Returns the minimum file modification timestamp resolution supported by this + * Boost Jam implementation. File modification timestamp changes of less than + * the returned value might not be recognized. + * + * Does not take into consideration any OS or file system related restrictions. + * + * Return value 0 indicates that any value supported by the OS is also supported + * here. + */ + +void file_supported_fmt_resolution( timestamp * const t ) +{ +#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809 + timestamp_init( t, 0, 1 ); +#else + /* The current implementation does not support file modification timestamp + * resolution of less than one second. + */ + timestamp_init( t, 1, 0 ); +#endif +} + +#endif + + +/* + * file_remove_atexit() - schedule a path to be removed on program exit + */ + +static LIST * files_to_remove = L0; + +void file_remove_atexit( OBJECT * const path ) +{ + files_to_remove = list_push_back( files_to_remove, object_copy( path ) ); +} + + +/* + * file_archivescan_impl() - no-profiling worker for file_archivescan() + */ + +static void file_archivescan_impl( OBJECT * path, archive_scanback func, void * closure ) +{ + file_archive_info_t * const archive = file_archive_query( path ); + if ( !archive || !archive->file->is_file ) + return; + + /* Lazy collect the archive content information. */ + if ( filelist_empty( archive->members ) ) + { + if ( DEBUG_BINDSCAN ) + printf( "scan archive %s\n", object_str( archive->file->name ) ); + if ( file_collect_archive_content_( archive ) < 0 ) + return; + } + + /* OS specific part of the file_archivescan operation. */ + file_archivescan_( archive, func, closure ); + + /* Report the collected archive content. */ + { + FILELISTITER iter = filelist_begin( archive->members ); + FILELISTITER const end = filelist_end( archive->members ); + char buf[ MAXJPATH ]; + + for ( ; iter != end ; iter = filelist_next( iter ) ) + { + file_info_t * member_file = filelist_item( iter ); + LIST * symbols = member_file->files; + + /* Construct member path: 'archive-path(member-name)' + */ + sprintf( buf, "%s(%s)", + object_str( archive->file->name ), + object_str( member_file->name ) ); + + { + OBJECT * const member = object_new( buf ); + (*func)( closure, member, symbols, 1, &member_file->time ); + object_free( member ); + } + } + } +} + + +/* + * file_dirscan_impl() - no-profiling worker for file_dirscan() + */ + +static void file_dirscan_impl( OBJECT * dir, scanback func, void * closure ) +{ + file_info_t * const d = file_query( dir ); + if ( !d || !d->is_dir ) + return; + + /* Lazy collect the directory content information. */ + if ( list_empty( d->files ) ) + { + if ( DEBUG_BINDSCAN ) + out_printf( "scan directory %s\n", object_str( d->name ) ); + if ( file_collect_dir_content_( d ) < 0 ) + return; + } + + /* OS specific part of the file_dirscan operation. */ + file_dirscan_( d, func, closure ); + + /* Report the collected directory content. */ + { + LISTITER iter = list_begin( d->files ); + LISTITER const end = list_end( d->files ); + for ( ; iter != end; iter = list_next( iter ) ) + { + OBJECT * const path = list_item( iter ); + file_info_t const * const ffq = file_query( path ); + /* Using a file name read from a file_info_t structure allows OS + * specific implementations to store some kind of a normalized file + * name there. Using such a normalized file name then allows us to + * correctly recognize different file paths actually identifying the + * same file. For instance, an implementation may: + * - convert all file names internally to lower case on a case + * insensitive file system + * - convert the NTFS paths to their long path variants as that + * file system each file system entity may have a long and a + * short path variant thus allowing for many different path + * strings identifying the same file. + */ + (*func)( closure, ffq->name, 1 /* stat()'ed */, &ffq->time ); + } + } +} + + +static void free_file_archive_info( void * xarchive, void * data ) +{ + file_archive_info_t * const archive = (file_archive_info_t *)xarchive; + + if ( archive ) filelist_free( archive->members ); +} + + +static void free_file_info( void * xfile, void * data ) +{ + file_info_t * const file = (file_info_t *)xfile; + object_free( file->name ); + list_free( file->files ); +} + + +static void remove_files_atexit( void ) +{ + LISTITER iter = list_begin( files_to_remove ); + LISTITER const end = list_end( files_to_remove ); + for ( ; iter != end; iter = list_next( iter ) ) + remove( object_str( list_item( iter ) ) ); + list_free( files_to_remove ); + files_to_remove = L0; +} + + +/* + * FILELIST linked-list implementation + */ + +FILELIST * filelist_new( OBJECT * path ) +{ + FILELIST * list = b2::jam::make_ptr(); + + memset( list, 0, sizeof( *list ) ); + list->size = 0; + list->head = 0; + list->tail = 0; + + return filelist_push_back( list, path ); +} + +FILELIST * filelist_push_back( FILELIST * list, OBJECT * path ) +{ + FILEITEM * item; + file_info_t * file; + + /* Lazy initialization + */ + if ( filelist_empty( list ) ) + { + list = filelist_new( path ); + return list; + } + + + item = b2::jam::make_ptr(); + item->value = b2::jam::make_ptr(); + + file = item->value; + file->name = path; + file->files = L0; + + if ( list->tail ) + { + list->tail->next = item; + } + else + { + list->head = item; + } + list->tail = item; + list->size++; + + return list; +} + +FILELIST * filelist_push_front( FILELIST * list, OBJECT * path ) +{ + FILEITEM * item; + file_info_t * file; + + /* Lazy initialization + */ + if ( filelist_empty( list ) ) + { + list = filelist_new( path ); + return list; + } + + + item = b2::jam::make_ptr(); + memset( item, 0, sizeof( *item ) ); + item->value = b2::jam::make_ptr(); + + file = item->value; + memset( file, 0, sizeof( *file ) ); + + file->name = path; + file->files = L0; + + if ( list->head ) + { + item->next = list->head; + } + else + { + list->tail = item; + } + list->head = item; + list->size++; + + return list; +} + + +FILELIST * filelist_pop_front( FILELIST * list ) +{ + FILEITEM * item; + + if ( filelist_empty( list ) ) return list; + + item = list->head; + + if ( item ) + { + if ( item->value ) + { + free_file_info( item->value, 0 ); + b2::jam::free_ptr( item->value ); + } + + list->head = item->next; + list->size--; + if ( !list->size ) list->tail = list->head; + + b2::jam::free_ptr( item ); + } + + return list; +} + +int filelist_length( FILELIST * list ) +{ + int result = 0; + if ( !filelist_empty( list ) ) result = list->size; + + return result; +} + +void filelist_free( FILELIST * list ) +{ + if ( filelist_empty( list ) ) return; + + while ( filelist_length( list ) ) filelist_pop_front( list ); + + b2::jam::free_ptr( list ); +} + +int filelist_empty( FILELIST * list ) +{ + return ( list == FL0 ); +} + + +FILELISTITER filelist_begin( FILELIST * list ) +{ + if ( filelist_empty( list ) + || list->head == 0 ) return (FILELISTITER)0; + + return &list->head->value; +} + + +FILELISTITER filelist_end( FILELIST * list ) +{ + return (FILELISTITER)0; +} + + +FILELISTITER filelist_next( FILELISTITER iter ) +{ + if ( iter ) + { + /* Given FILEITEM.value is defined as first member of FILEITEM structure + * and FILELISTITER = &FILEITEM.value, + * FILEITEM = *(FILEITEM **)FILELISTITER + */ + FILEITEM * item = (FILEITEM *)iter; + iter = ( item->next ? &item->next->value : (FILELISTITER)0 ); + } + + return iter; +} + + +file_info_t * filelist_item( FILELISTITER it ) +{ + file_info_t * result = (file_info_t *)0; + + if ( it ) + { + result = (file_info_t *)*it; + } + + return result; +} + + +file_info_t * filelist_front( FILELIST * list ) +{ + if ( filelist_empty( list ) + || list->head == 0 ) return (file_info_t *)0; + + return list->head->value; +} + + +file_info_t * filelist_back( FILELIST * list ) +{ + if ( filelist_empty( list ) + || list->tail == 0 ) return (file_info_t *)0; + + return list->tail->value; +} diff --git a/src/boost/tools/build/src/engine/filesys.h b/src/boost/tools/build/src/engine/filesys.h new file mode 100644 index 000000000..ee49f28c6 --- /dev/null +++ b/src/boost/tools/build/src/engine/filesys.h @@ -0,0 +1,125 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * filesys.h - OS specific file routines + */ + +#ifndef FILESYS_DWA20011025_H +#define FILESYS_DWA20011025_H + +#include "config.h" +#include "hash.h" +#include "lists.h" +#include "object.h" +#include "pathsys.h" +#include "timestamp.h" + +#include + + +typedef struct file_info_t +{ + OBJECT * name; + char is_file; + char is_dir; + char exists; + timestamp time; + LIST * files; +} file_info_t; + +typedef struct file_item FILEITEM; +struct file_item +{ + file_info_t * value; /* expected to be equivalent with &FILEITEM */ + FILEITEM * next; +}; + +typedef struct file_list +{ + FILEITEM * head; + FILEITEM * tail; + int size; +} FILELIST; + +typedef file_info_t * * FILELISTITER; /* also &FILEITEM equivalent */ + + +typedef struct file_archive_info_t +{ + OBJECT * name; + file_info_t * file; + FILELIST * members; +} file_archive_info_t; + + +typedef void (*archive_scanback)( void * closure, OBJECT * path, LIST * symbols, + int found, timestamp const * const ); +typedef void (*scanback)( void * closure, OBJECT * path, int found, + timestamp const * const ); + + +void file_archscan( char const * arch, scanback func, void * closure ); +void file_archivescan( OBJECT * path, archive_scanback func, void * closure ); +void file_build1( PATHNAME * const f, string * file ) ; +void file_dirscan( OBJECT * dir, scanback func, void * closure ); +file_info_t * file_info( OBJECT * const path, int * found ); +int file_is_file( OBJECT * const path ); +int file_mkdir( char const * const path ); +file_info_t * file_query( OBJECT * const path ); +void file_remove_atexit( OBJECT * const path ); +void file_supported_fmt_resolution( timestamp * const ); +int file_time( OBJECT * const path, timestamp * const ); + +namespace b2 { namespace filesys { + + inline bool is_file(const std::string &path) + { + OBJECT * path_o = object_new(path.c_str()); + bool result = file_is_file(path_o) == 1; + object_free(path_o); + return result; + } + +}} + + +/* Archive/library file support */ +file_archive_info_t * file_archive_info( OBJECT * const path, int * found ); +file_archive_info_t * file_archive_query( OBJECT * const path ); + +/* FILELIST linked-list */ +FILELIST * filelist_new( OBJECT * path ); +FILELIST * filelist_push_back( FILELIST * list, OBJECT * path ); +FILELIST * filelist_push_front( FILELIST * list, OBJECT * path ); +FILELIST * filelist_pop_front( FILELIST * list ); +int filelist_length( FILELIST * list ); +void filelist_free( FILELIST * list ); + +FILELISTITER filelist_begin( FILELIST * list ); +FILELISTITER filelist_end( FILELIST * list ); +FILELISTITER filelist_next( FILELISTITER it ); +file_info_t * filelist_item( FILELISTITER it ); +file_info_t * filelist_front( FILELIST * list ); +file_info_t * filelist_back( FILELIST * list ); + +int filelist_empty( FILELIST * list ); + +#define FL0 ((FILELIST *)0) + + +/* Internal utility worker functions. */ +void file_query_posix_( file_info_t * const ); + +void file_done(); + +#endif diff --git a/src/boost/tools/build/src/engine/fileunix.cpp b/src/boost/tools/build/src/engine/fileunix.cpp new file mode 100644 index 000000000..4982c9bb8 --- /dev/null +++ b/src/boost/tools/build/src/engine/fileunix.cpp @@ -0,0 +1,533 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * fileunix.c - manipulate file names and scan directories on UNIX/AmigaOS + * + * External routines: + * file_archscan() - scan an archive for files + * file_mkdir() - create a directory + * file_supported_fmt_resolution() - file modification timestamp resolution + * + * External routines called only via routines in filesys.c: + * file_collect_dir_content_() - collects directory content information + * file_dirscan_() - OS specific file_dirscan() implementation + * file_query_() - query information about a path from the OS + * file_collect_archive_content_() - collects information about archive members + * file_archivescan_() - OS specific file_archivescan() implementation + */ + +#include "jam.h" +#ifdef USE_FILEUNIX +#include "filesys.h" + +#include "object.h" +#include "pathsys.h" +#include "jam_strings.h" +#include "output.h" + +#include +#include +#include +#include /* needed for mkdir() */ + +#if defined( sun ) || defined( __sun ) || defined( linux ) +# include /* needed for read and close prototype */ +#endif + +#if defined( OS_SEQUENT ) || \ + defined( OS_DGUX ) || \ + defined( OS_SCO ) || \ + defined( OS_ISC ) +# define PORTAR 1 +#endif + +#if defined( OS_RHAPSODY ) || defined( OS_MACOSX ) || defined( OS_NEXT ) +# include +# include /* need unistd for rhapsody's proper lseek */ +# define STRUCT_DIRENT struct direct +#else +# include +# define STRUCT_DIRENT struct dirent +#endif + +#ifdef OS_COHERENT +# include +# define HAVE_AR +#endif + +#if defined( OS_MVS ) || defined( OS_INTERIX ) +#define ARMAG "!\n" +#define SARMAG 8 +#define ARFMAG "`\n" +#define HAVE_AR + +struct ar_hdr /* archive file member header - printable ascii */ +{ + char ar_name[ 16 ]; /* file member name - `/' terminated */ + char ar_date[ 12 ]; /* file member date - decimal */ + char ar_uid[ 6 ]; /* file member user id - decimal */ + char ar_gid[ 6 ]; /* file member group id - decimal */ + char ar_mode[ 8 ]; /* file member mode - octal */ + char ar_size[ 10 ]; /* file member size - decimal */ + char ar_fmag[ 2 ]; /* ARFMAG - string to end header */ +}; +#endif + +#if defined( OS_QNX ) || \ + defined( OS_BEOS ) || \ + defined( OS_HAIKU ) || \ + defined( OS_MPEIX ) +# define NO_AR +# define HAVE_AR +#endif + +#ifndef HAVE_AR +# ifdef OS_AIX +/* Define these for AIX to get the definitions for both small and big archive + * file format variants. + */ +# define __AR_SMALL__ +# define __AR_BIG__ +# endif +# include +#endif + + +/* + * file_collect_dir_content_() - collects directory content information + */ + +int file_collect_dir_content_( file_info_t * const d ) +{ + LIST * files = L0; + PATHNAME f; + int n; + STRUCT_DIRENT ** namelist; + STRUCT_DIRENT * dirent; + string path[ 1 ]; + char const * dirstr; + + assert( d ); + assert( d->is_dir ); + assert( list_empty( d->files ) ); + + dirstr = object_str( d->name ); + + memset( (char *)&f, '\0', sizeof( f ) ); + f.f_dir.ptr = dirstr; + f.f_dir.len = strlen( dirstr ); + + if ( !*dirstr ) dirstr = "."; + + if ( -1 == ( n = scandir( dirstr, &namelist, NULL, alphasort ) ) ) + { + if (n != ENOENT && n != ENOTDIR) + err_printf( "[errno %d] scandir '%s' failed: %s\n", + errno, dirstr, strerror(errno) ); + return -1; + } + + string_new( path ); + while ( n-- ) + { + OBJECT * name; + dirent = namelist[ n ]; + f.f_base.ptr = dirent->d_name + #ifdef old_sinix + - 2 /* Broken structure definition on sinix. */ + #endif + ; + f.f_base.len = strlen( f.f_base.ptr ); + + string_truncate( path, 0 ); + path_build( &f, path ); + name = object_new( path->value ); + /* Immediately stat the file to preserve invariants. */ + if ( file_query( name ) ) + files = list_push_back( files, name ); + else + object_free( name ); + free( dirent ); + } + string_free( path ); + + free( namelist ); + + d->files = files; + return 0; +} + + +/* + * file_dirscan_() - OS specific file_dirscan() implementation + */ + +void file_dirscan_( file_info_t * const d, scanback func, void * closure ) +{ + assert( d ); + assert( d->is_dir ); + + /* Special case / : enter it */ + if ( !strcmp( object_str( d->name ), "/" ) ) + (*func)( closure, d->name, 1 /* stat()'ed */, &d->time ); +} + + +/* + * file_mkdir() - create a directory + */ + +int file_mkdir( char const * const path ) +{ + /* Explicit cast to remove const modifiers and avoid related compiler + * warnings displayed when using the intel compiler. + */ + return mkdir( (char *)path, 0777 ); +} + + +/* + * file_query_() - query information about a path from the OS + */ + +void file_query_( file_info_t * const info ) +{ + file_query_posix_( info ); +} + + +int file_collect_archive_content_( file_archive_info_t * const archive ); + +/* + * file_archscan() - scan an archive for files + */ +void file_archscan( char const * arch, scanback func, void * closure ) +{ + OBJECT * path = object_new( arch ); + file_archive_info_t * archive = file_archive_query( path ); + + object_free( path ); + + if ( filelist_empty( archive->members ) ) + { + if ( file_collect_archive_content_( archive ) < 0 ) + return; + } + + /* Report the collected archive content. */ + { + FILELISTITER iter = filelist_begin( archive->members ); + FILELISTITER const end = filelist_end( archive->members ); + char buf[ MAXJPATH ]; + + for ( ; iter != end ; iter = filelist_next( iter ) ) + { + file_info_t * member_file = filelist_item( iter ); + + /* Construct member path: 'archive-path(member-name)' + */ + sprintf( buf, "%s(%s)", + object_str( archive->file->name ), + object_str( member_file->name ) ); + { + OBJECT * const member = object_new( buf ); + (*func)( closure, member, 1 /* time valid */, &member_file->time ); + object_free( member ); + } + } + } +} + + +/* + * file_archivescan_() - OS specific file_archivescan() implementation + */ + +void file_archivescan_( file_archive_info_t * const archive, archive_scanback func, + void * closure ) +{ +} + + +/* + * file_collect_archive_content_() - collects information about archive members + */ + +#ifndef AIAMAG /* God-fearing UNIX */ + +#define SARFMAG 2 +#define SARHDR sizeof( struct ar_hdr ) + +int file_collect_archive_content_( file_archive_info_t * const archive ) +{ +#ifndef NO_AR + struct ar_hdr ar_hdr; + char * string_table = 0; + char buf[ MAXJPATH ]; + long offset; + int fd; + const char * path = object_str( archive->file->name ); + + if ( ! filelist_empty( archive->members ) ) filelist_free( archive->members ); + + if ( ( fd = open( path, O_RDONLY, 0 ) ) < 0 ) + return -1; + + if ( read( fd, buf, SARMAG ) != SARMAG || + strncmp( ARMAG, buf, SARMAG ) ) + { + close( fd ); + return -1; + } + + offset = SARMAG; + + if ( DEBUG_BINDSCAN ) + out_printf( "scan archive %s\n", path ); + + while ( ( read( fd, &ar_hdr, SARHDR ) == SARHDR ) && + !( memcmp( ar_hdr.ar_fmag, ARFMAG, SARFMAG ) +#ifdef ARFZMAG + /* OSF also has a compressed format */ + && memcmp( ar_hdr.ar_fmag, ARFZMAG, SARFMAG ) +#endif + ) ) + { + char lar_name_[ 257 ]; + char * lar_name = lar_name_ + 1; + long lar_date; + long lar_size; + long lar_offset; + char * c; + char * src; + char * dest; + + int32_t ar_hdr_name_size = sizeof( ar_hdr.ar_name ); // Workaround for sizeof strncpy warning. + strncpy( lar_name, ar_hdr.ar_name, ar_hdr_name_size ); + + sscanf( ar_hdr.ar_date, "%ld", &lar_date ); + sscanf( ar_hdr.ar_size, "%ld", &lar_size ); + + if ( ar_hdr.ar_name[ 0 ] == '/' ) + { + if ( ar_hdr.ar_name[ 1 ] == '/' ) + { + /* This is the "string table" entry of the symbol table, holding + * filename strings longer than 15 characters, i.e. those that + * do not fit into ar_name. + */ + string_table = (char *)BJAM_MALLOC_ATOMIC( lar_size ); + lseek( fd, offset + SARHDR, 0 ); + if ( read( fd, string_table, lar_size ) != lar_size ) + out_printf("error reading string table\n"); + } + else if ( string_table && ar_hdr.ar_name[ 1 ] != ' ' ) + { + /* Long filenames are recognized by "/nnnn" where nnnn is the + * offset of the string in the string table represented in ASCII + * decimals. + */ + dest = lar_name; + lar_offset = atoi( lar_name + 1 ); + src = &string_table[ lar_offset ]; + while ( *src != '/' ) + *dest++ = *src++; + *dest = '/'; + } + } + + c = lar_name - 1; + while ( ( *++c != ' ' ) && ( *c != '/' ) ); + *c = '\0'; + + if ( DEBUG_BINDSCAN ) + out_printf( "archive name %s found\n", lar_name ); + + sprintf( buf, "%s", lar_name ); + + if ( strcmp( buf, "") != 0 ) + { + file_info_t * member = 0; + + archive->members = filelist_push_back( archive->members, object_new( buf ) ); + member = filelist_back( archive->members ); + member->is_file = 1; + member->is_dir = 0; + member->exists = 0; + timestamp_init( &member->time, (time_t)lar_date, 0 ); + } + + offset += SARHDR + ( ( lar_size + 1 ) & ~1 ); + lseek( fd, offset, 0 ); + } + + if ( string_table ) + BJAM_FREE( string_table ); + + close( fd ); +#endif /* NO_AR */ + + return 0; +} + +#else /* AIAMAG - RS6000 AIX */ + +static void collect_archive_content_small( int fd, file_archive_info_t * const archive ) +{ + struct fl_hdr fl_hdr; + + struct { + struct ar_hdr hdr; + char pad[ 256 ]; + } ar_hdr ; + + char buf[ MAXJPATH ]; + long offset; + const char * path = object_str( archive->file->name ); + + if ( read( fd, (char *)&fl_hdr, FL_HSZ ) != FL_HSZ ) + return; + + sscanf( fl_hdr.fl_fstmoff, "%ld", &offset ); + + if ( DEBUG_BINDSCAN ) + out_printf( "scan archive %s\n", path ); + + while ( offset > 0 && lseek( fd, offset, 0 ) >= 0 && + read( fd, &ar_hdr, sizeof( ar_hdr ) ) >= (int)sizeof( ar_hdr.hdr ) ) + { + long lar_date; + int lar_namlen; + + sscanf( ar_hdr.hdr.ar_namlen, "%d" , &lar_namlen ); + sscanf( ar_hdr.hdr.ar_date , "%ld", &lar_date ); + sscanf( ar_hdr.hdr.ar_nxtmem, "%ld", &offset ); + + if ( !lar_namlen ) + continue; + + ar_hdr.hdr._ar_name.ar_name[ lar_namlen ] = '\0'; + + sprintf( buf, "%s", ar_hdr.hdr._ar_name.ar_name ); + + if ( strcmp( buf, "") != 0 ) + { + file_info_t * member = 0; + + archive->members = filelist_push_back( archive->members, object_new( buf ) ); + member = filelist_back( archive->members ); + member->is_file = 1; + member->is_dir = 0; + member->exists = 0; + timestamp_init( &member->time, (time_t)lar_date, 0 ); + } + } +} + +/* Check for OS versions supporting the big variant. */ +#ifdef AR_HSZ_BIG + +static void collect_archive_content_big( int fd, file_archive_info_t * const archive ) +{ + struct fl_hdr_big fl_hdr; + + struct { + struct ar_hdr_big hdr; + char pad[ 256 ]; + } ar_hdr ; + + char buf[ MAXJPATH ]; + long long offset; + const char * path = object_str( archive->file->name ); + + if ( read( fd, (char *)&fl_hdr, FL_HSZ_BIG ) != FL_HSZ_BIG ) + return; + + sscanf( fl_hdr.fl_fstmoff, "%lld", &offset ); + + if ( DEBUG_BINDSCAN ) + out_printf( "scan archive %s\n", path ); + + while ( offset > 0 && lseek( fd, offset, 0 ) >= 0 && + read( fd, &ar_hdr, sizeof( ar_hdr ) ) >= sizeof( ar_hdr.hdr ) ) + { + long lar_date; + int lar_namlen; + + sscanf( ar_hdr.hdr.ar_namlen, "%d" , &lar_namlen ); + sscanf( ar_hdr.hdr.ar_date , "%ld" , &lar_date ); + sscanf( ar_hdr.hdr.ar_nxtmem, "%lld", &offset ); + + if ( !lar_namlen ) + continue; + + ar_hdr.hdr._ar_name.ar_name[ lar_namlen ] = '\0'; + + sprintf( buf, "%s", ar_hdr.hdr._ar_name.ar_name ); + + if ( strcmp( buf, "") != 0 ) + { + file_info_t * member = 0; + + archive->members = filelist_push_back( archive->members, object_new( buf ) ); + member = filelist_back( archive->members ); + member->is_file = 1; + member->is_dir = 0; + member->exists = 0; + timestamp_init( &member->time, (time_t)lar_date, 0 ); + } + } +} + +#endif /* AR_HSZ_BIG */ + +int file_collect_archive_content_( file_archive_info_t * const archive ) +{ + int fd; + char fl_magic[ SAIAMAG ]; + const char * path = object_str( archive->file->name ); + + if ( ! filelist_empty( archive->members ) ) filelist_free( archive->members ); + + if ( ( fd = open( path, O_RDONLY, 0 ) ) < 0 ) + return -1; + + if ( read( fd, fl_magic, SAIAMAG ) != SAIAMAG || + lseek( fd, 0, SEEK_SET ) == -1 ) + { + close( fd ); + return -1; + } + + if ( !strncmp( AIAMAG, fl_magic, SAIAMAG ) ) + { + /* read small variant */ + collect_archive_content_small( fd, archive ); + } +#ifdef AR_HSZ_BIG + else if ( !strncmp( AIAMAGBIG, fl_magic, SAIAMAG ) ) + { + /* read big variant */ + collect_archive_content_big( fd, archive ); + } +#endif + + close( fd ); + + return 0; +} + +#endif /* AIAMAG - RS6000 AIX */ + +#endif /* USE_FILEUNIX */ diff --git a/src/boost/tools/build/src/engine/filevms.cpp b/src/boost/tools/build/src/engine/filevms.cpp new file mode 100644 index 000000000..6dc84ae63 --- /dev/null +++ b/src/boost/tools/build/src/engine/filevms.cpp @@ -0,0 +1,440 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Copyright 2015 Artur Shepilko. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + + +#include "jam.h" +#include "filesys.h" + +#include "object.h" +#include "pathsys.h" +#include "jam_strings.h" + + +#ifdef OS_VMS + +/* + * filevms.c - manipulate file names and scan directories on VMS. + * + * This implementation is based on POSIX-style path manipulation. + * + * VMS CTRL directly supports both POSIX- and native VMS-style path expressions, + * with the POSIX-to-VMS path translation performed internally by the same + * set of functions. For the most part such processing is transparent, with + * few differences mainly related to file versions (in POSIX mode only the recent + * version is visible). + * + * This should allow us to re-use fileunix.c implementation, + * excluding archive/library member processing. + * + * Thus in jam-files the path references can also remain POSIX/UNIX-style on all + * levels EXCEPT in actions scope, where these must be translated to the native + * VMS-style. This approach is somewhat similar to jam CYGWIN handling. + * + * + * External routines: + * file_archscan() - scan an archive for files + * file_mkdir() - create a directory + * file_supported_fmt_resolution() - file modification timestamp resolution + * + * External routines called only via routines in filesys.c: + * file_collect_dir_content_() - collects directory content information + * file_dirscan_() - OS specific file_dirscan() implementation + * file_query_() - query information about a path from the OS + * file_collect_archive_content_() - collects information about archive members + * file_archivescan_() - OS specific file_archivescan() implementation + */ + +#include +#include + +#include /* needed for mkdir() */ +#include /* needed for read and close prototype */ + +#include +#define STRUCT_DIRENT struct dirent + + +void path_translate_to_os_( char const * f, string * file ); + +/* + * file_collect_dir_content_() - collects directory content information + */ + +int file_collect_dir_content_( file_info_t * const d ) +{ + LIST * files = L0; + PATHNAME f; + DIR * dd; + STRUCT_DIRENT * dirent; + string path[ 1 ]; + char const * dirstr; + + assert( d ); + assert( d->is_dir ); + assert( list_empty( d->files ) ); + + dirstr = object_str( d->name ); + + memset( (char *)&f, '\0', sizeof( f ) ); + f.f_dir.ptr = dirstr; + f.f_dir.len = strlen( dirstr ); + + if ( !*dirstr ) dirstr = "."; + + if ( !( dd = opendir( dirstr ) ) ) + return -1; + + string_new( path ); + while ( ( dirent = readdir( dd ) ) ) + { + OBJECT * name; + f.f_base.ptr = dirent->d_name + #ifdef old_sinix + - 2 /* Broken structure definition on sinix. */ + #endif + ; + f.f_base.len = strlen( f.f_base.ptr ); + + string_truncate( path, 0 ); + path_build( &f, path ); + name = object_new( path->value ); + /* Immediately stat the file to preserve invariants. */ + if ( file_query( name ) ) + files = list_push_back( files, name ); + else + object_free( name ); + } + string_free( path ); + + closedir( dd ); + + d->files = files; + return 0; +} + + +/* + * file_dirscan_() - OS specific file_dirscan() implementation + */ + +void file_dirscan_( file_info_t * const d, scanback func, void * closure ) +{ + assert( d ); + assert( d->is_dir ); + + /* Special case / : enter it */ + if ( !strcmp( object_str( d->name ), "/" ) ) + (*func)( closure, d->name, 1 /* stat()'ed */, &d->time ); +} + + +/* + * file_mkdir() - create a directory + */ + +int file_mkdir( char const * const path ) +{ + /* Explicit cast to remove const modifiers and avoid related compiler + * warnings displayed when using the intel compiler. + */ + return mkdir( (char *)path, 0777 ); +} + + +/* + * file_query_() - query information about a path from the OS + */ + +void file_query_( file_info_t * const info ) +{ + file_query_posix_( info ); +} + + +/*------------------------------------------------------------------------------ +* VMS-specific processing: +* +*/ + +#include +#include +#include +#include +#include +#include +#include + +/* Supply missing prototypes for lbr$-routines*/ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +int lbr$set_module( + void **, + unsigned long *, + struct dsc$descriptor_s *, + unsigned short *, + void * ); + +int lbr$open( void **, + struct dsc$descriptor_s *, + void *, + void *, + void *, + void *, + void * ); + +int lbr$ini_control( + void **, + unsigned long *, + unsigned long *, + void * ); + +int lbr$get_index( + void **, + unsigned long * const, + int (*func)( struct dsc$descriptor_s *, unsigned long *), + void * ); + +int lbr$search( + void **, + unsigned long * const, + unsigned short *, + int (*func)( struct dsc$descriptor_s *, unsigned long *), + unsigned long *); + +int lbr$close( + void ** ); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + + +static void +file_cvttime( + unsigned int *curtime, + time_t *unixtime ) +{ + static const int32_t divisor = 10000000; + static unsigned int bastim[2] = { 0x4BEB4000, 0x007C9567 }; /* 1/1/1970 */ + int delta[2], remainder; + + lib$subx( curtime, bastim, delta ); + lib$ediv( &divisor, delta, unixtime, &remainder ); +} + + +static void downcase_inplace( char * p ) +{ + for ( ; *p; ++p ) + *p = tolower( *p ); +} + + +static file_archive_info_t * m_archive = NULL; +static file_info_t * m_member_found = NULL; +static void * m_lbr_context = NULL; +static unsigned short * m_rfa_found = NULL; +static const unsigned long LBR_MODINDEX_NUM = 1, + LBR_SYMINDEX_NUM = 2; /* GST:global symbol table */ + + +static unsigned int set_archive_symbol( struct dsc$descriptor_s *symbol, + unsigned long *rfa ) +{ + file_info_t * member = m_member_found; + char buf[ MAXJPATH ] = { 0 }; + + strncpy(buf, symbol->dsc$a_pointer, symbol->dsc$w_length); + buf[ symbol->dsc$w_length ] = 0; + + member->files = list_push_back( member->files, object_new( buf ) ); + + return ( 1 ); /* continue */ +} + + +static unsigned int set_archive_member( struct dsc$descriptor_s *module, + unsigned long *rfa ) +{ + file_archive_info_t * archive = m_archive; + + static struct dsc$descriptor_s bufdsc = + {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL}; + + struct mhddef *mhd; + char filename[128] = { 0 }; + char buf[ MAXJPATH ] = { 0 }; + + int status; + time_t library_date; + + register int i; + register char *p; + + bufdsc.dsc$a_pointer = filename; + bufdsc.dsc$w_length = sizeof( filename ); + status = lbr$set_module( &m_lbr_context, rfa, &bufdsc, + &bufdsc.dsc$w_length, NULL ); + + if ( !(status & 1) ) + return ( 1 ); /* continue */ + + mhd = (struct mhddef *)filename; + + file_cvttime( &mhd->mhd$l_datim, &library_date ); + + /* strncpy( filename, module->dsc$a_pointer, module->dsc$w_length ); + */ + for ( i = 0, p = module->dsc$a_pointer; i < module->dsc$w_length; ++i, ++p ) + filename[ i ] = *p; + + filename[ i ] = '\0'; + + if ( strcmp( filename, "" ) != 0 ) + { + file_info_t * member = 0; + + /* Construct member's filename as lowercase "module.obj" */ + sprintf( buf, "%s.obj", filename ); + downcase_inplace( buf ); + archive->members = filelist_push_back( archive->members, object_new( buf ) ); + + member = filelist_back( archive->members ); + member->is_file = 1; + member->is_dir = 0; + member->exists = 0; + timestamp_init( &member->time, (time_t)library_date, 0 ); + + m_member_found = member; + m_rfa_found = rfa; + status = lbr$search(&m_lbr_context, &LBR_SYMINDEX_NUM, m_rfa_found, set_archive_symbol, NULL); + } + + return ( 1 ); /* continue */ +} + + + +void file_archscan( char const * arch, scanback func, void * closure ) +{ + OBJECT * path = object_new( arch ); + file_archive_info_t * archive = file_archive_query( path ); + + object_free( path ); + + if ( filelist_empty( archive->members ) ) + { + if ( DEBUG_BINDSCAN ) + out_printf( "scan archive %s\n", object_str( archive->file->name ) ); + + if ( file_collect_archive_content_( archive ) < 0 ) + return; + } + + /* Report the collected archive content. */ + { + FILELISTITER iter = filelist_begin( archive->members ); + FILELISTITER const end = filelist_end( archive->members ); + char buf[ MAXJPATH ]; + + for ( ; iter != end ; iter = filelist_next( iter ) ) + { + file_info_t * member_file = filelist_item( iter ); + LIST * symbols = member_file->files; + + /* Construct member path: 'archive-path(member-name)' + */ + sprintf( buf, "%s(%s)", + object_str( archive->file->name ), + object_str( member_file->name ) ); + { + OBJECT * const member = object_new( buf ); + (*func)( closure, member, 1 /* time valid */, &member_file->time ); + object_free( member ); + } + } + } +} + + +/* + * file_archivescan_() - OS specific file_archivescan() implementation + */ +void file_archivescan_( file_archive_info_t * const archive, archive_scanback func, + void * closure ) +{ +} + + +/* + * file_collect_archive_content_() - collects information about archive members + */ + +int file_collect_archive_content_( file_archive_info_t * const archive ) +{ + unsigned short rfa[3]; + + static struct dsc$descriptor_s library = + {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL}; + + unsigned long lfunc = LBR$C_READ; + unsigned long typ = LBR$C_TYP_UNK; + + register int status; + string buf[ 1 ]; + char vmspath[ MAXJPATH ] = { 0 }; + + m_archive = archive; + + if ( ! filelist_empty( archive->members ) ) filelist_free( archive->members ); + + /* Translate path to VMS + */ + string_new( buf ); + path_translate_to_os_( object_str( archive->file->name ), buf ); + strcpy( vmspath, buf->value ); + string_free( buf ); + + + status = lbr$ini_control( &m_lbr_context, &lfunc, &typ, NULL ); + if ( !( status & 1 ) ) + return -1; + + library.dsc$a_pointer = vmspath; + library.dsc$w_length = strlen( vmspath ); + + status = lbr$open( &m_lbr_context, &library, NULL, NULL, NULL, NULL, NULL ); + if ( !( status & 1 ) ) + return -1; + + /* Scan main index for modules. + * For each module search symbol-index to collect module's symbols. + */ + status = lbr$get_index( &m_lbr_context, &LBR_MODINDEX_NUM, set_archive_member, NULL ); + + if ( !( status & 1 ) ) + return -1; + + + (void) lbr$close( &m_lbr_context ); + + return 0; +} + +#endif /* OS_VMS */ + diff --git a/src/boost/tools/build/src/engine/frames.cpp b/src/boost/tools/build/src/engine/frames.cpp new file mode 100644 index 000000000..b64d54fa7 --- /dev/null +++ b/src/boost/tools/build/src/engine/frames.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "jam.h" +#include "frames.h" + + +FRAME * frame_before_python_call; + + +void frame_init( FRAME * frame ) +{ + frame->prev = 0; + frame->prev_user = 0; + lol_init( frame->args ); + frame->module = root_module(); + frame->rulename = "module scope"; + frame->file = 0; + frame->line = -1; +} + + +void frame_free( FRAME * frame ) +{ + lol_free( frame->args ); +} diff --git a/src/boost/tools/build/src/engine/frames.h b/src/boost/tools/build/src/engine/frames.h new file mode 100644 index 000000000..2a3a22837 --- /dev/null +++ b/src/boost/tools/build/src/engine/frames.h @@ -0,0 +1,46 @@ +/* + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef FRAMES_DWA20011021_H +#define FRAMES_DWA20011021_H + +#include "config.h" +#include "lists.h" +#include "modules.h" +#include "object.h" + + +typedef struct frame FRAME; + +struct frame +{ + FRAME * prev; + FRAME * prev_user; /* The nearest enclosing frame for which + module->user_module is true. */ + LOL args[ 1 ]; + module_t * module; + OBJECT * file; + int line; + char const * rulename; +#ifdef JAM_DEBUGGER + void * function; +#endif +}; + + +/* When a call into Python is in progress, this variable points to the bjam + * frame that was current at the moment of the call. When the call completes, + * the variable is not defined. Furthermore, if Jam calls Python which calls Jam + * and so on, this variable only keeps the most recent Jam frame. + */ +extern FRAME * frame_before_python_call; + + +void frame_init( FRAME * ); +void frame_free( FRAME * ); + +#endif diff --git a/src/boost/tools/build/src/engine/function.cpp b/src/boost/tools/build/src/engine/function.cpp new file mode 100644 index 000000000..2db31cfae --- /dev/null +++ b/src/boost/tools/build/src/engine/function.cpp @@ -0,0 +1,5560 @@ +/* + * Copyright 2011 Steven Watanabe + * Copyright 2016 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "jam.h" +#include "function.h" + +#include "class.h" +#include "compile.h" +#include "constants.h" +#include "debugger.h" +#include "execcmd.h" +#include "filesys.h" +#include "frames.h" +#include "lists.h" +#include "mem.h" +#include "pathsys.h" +#include "rules.h" +#include "search.h" +#include "variable.h" +#include "output.h" +#include "startup.h" + +#include +#include +#include +#include +#include + +#include + +/* +#define FUNCTION_DEBUG_PROFILE +*/ + +#ifndef FUNCTION_DEBUG_PROFILE +#undef PROFILE_ENTER_LOCAL +#define PROFILE_ENTER_LOCAL(x) while (false) +#undef PROFILE_EXIT_LOCAL +#define PROFILE_EXIT_LOCAL(x) +#endif + +int32_t glob( char const * s, char const * c ); +void backtrace( FRAME * ); +void backtrace_line( FRAME * ); + +#define INSTR_PUSH_EMPTY 0 +#define INSTR_PUSH_CONSTANT 1 +#define INSTR_PUSH_ARG 2 +#define INSTR_PUSH_VAR 3 +#define INSTR_PUSH_VAR_FIXED 57 +#define INSTR_PUSH_GROUP 4 +#define INSTR_PUSH_RESULT 5 +#define INSTR_PUSH_APPEND 6 +#define INSTR_SWAP 7 + +#define INSTR_JUMP_EMPTY 8 +#define INSTR_JUMP_NOT_EMPTY 9 + +#define INSTR_JUMP 10 +#define INSTR_JUMP_LT 11 +#define INSTR_JUMP_LE 12 +#define INSTR_JUMP_GT 13 +#define INSTR_JUMP_GE 14 +#define INSTR_JUMP_EQ 15 +#define INSTR_JUMP_NE 16 +#define INSTR_JUMP_IN 17 +#define INSTR_JUMP_NOT_IN 18 + +#define INSTR_JUMP_NOT_GLOB 19 + +#define INSTR_FOR_INIT 56 +#define INSTR_FOR_LOOP 20 + +#define INSTR_SET_RESULT 21 +#define INSTR_RETURN 22 +#define INSTR_POP 23 + +#define INSTR_PUSH_LOCAL 24 +#define INSTR_POP_LOCAL 25 +#define INSTR_SET 26 +#define INSTR_APPEND 27 +#define INSTR_DEFAULT 28 + +#define INSTR_PUSH_LOCAL_FIXED 58 +#define INSTR_POP_LOCAL_FIXED 59 +#define INSTR_SET_FIXED 60 +#define INSTR_APPEND_FIXED 61 +#define INSTR_DEFAULT_FIXED 62 + +#define INSTR_PUSH_LOCAL_GROUP 29 +#define INSTR_POP_LOCAL_GROUP 30 +#define INSTR_SET_GROUP 31 +#define INSTR_APPEND_GROUP 32 +#define INSTR_DEFAULT_GROUP 33 + +#define INSTR_PUSH_ON 34 +#define INSTR_POP_ON 35 +#define INSTR_SET_ON 36 +#define INSTR_APPEND_ON 37 +#define INSTR_DEFAULT_ON 38 +#define INSTR_GET_ON 65 + +#define INSTR_CALL_RULE 39 +#define INSTR_CALL_MEMBER_RULE 66 + +#define INSTR_APPLY_MODIFIERS 40 +#define INSTR_APPLY_INDEX 41 +#define INSTR_APPLY_INDEX_MODIFIERS 42 +#define INSTR_APPLY_MODIFIERS_GROUP 43 +#define INSTR_APPLY_INDEX_GROUP 44 +#define INSTR_APPLY_INDEX_MODIFIERS_GROUP 45 +#define INSTR_COMBINE_STRINGS 46 +#define INSTR_GET_GRIST 64 + +#define INSTR_INCLUDE 47 +#define INSTR_RULE 48 +#define INSTR_ACTIONS 49 +#define INSTR_PUSH_MODULE 50 +#define INSTR_POP_MODULE 51 +#define INSTR_CLASS 52 +#define INSTR_BIND_MODULE_VARIABLES 63 + +#define INSTR_APPEND_STRINGS 53 +#define INSTR_WRITE_FILE 54 +#define INSTR_OUTPUT_STRINGS 55 + +#define INSTR_DEBUG_LINE 67 +#define INSTR_FOR_POP 70 + +typedef struct instruction +{ + uint32_t op_code; + int32_t arg; +} instruction; + +typedef struct _subfunction +{ + OBJECT * name; + FUNCTION * code; + int32_t local; +} SUBFUNCTION; + +typedef struct _subaction +{ + OBJECT * name; + FUNCTION * command; + int32_t flags; +} SUBACTION; + +#define FUNCTION_BUILTIN 0 +#define FUNCTION_JAM 1 + +struct argument +{ + int32_t flags; +#define ARG_ONE 0 +#define ARG_OPTIONAL 1 +#define ARG_PLUS 2 +#define ARG_STAR 3 +#define ARG_VARIADIC 4 + OBJECT * type_name; + OBJECT * arg_name; + int32_t index; +}; + +struct arg_list +{ + int32_t size; + struct argument * args; +}; + +struct _function +{ + int32_t type; + int32_t reference_count; + OBJECT * rulename; + struct arg_list * formal_arguments; + int32_t num_formal_arguments; +}; + +typedef struct _builtin_function +{ + FUNCTION base; + LIST * ( * func )( FRAME *, int32_t flags ); + int32_t flags; +} BUILTIN_FUNCTION; + +typedef struct _jam_function +{ + FUNCTION base; + int32_t code_size; + instruction * code; + int32_t num_constants; + OBJECT * * constants; + int32_t num_subfunctions; + SUBFUNCTION * functions; + int32_t num_subactions; + SUBACTION * actions; + FUNCTION * generic; + OBJECT * file; + int32_t line; +} JAM_FUNCTION; + + +#ifdef HAVE_PYTHON + +#define FUNCTION_PYTHON 2 + +typedef struct _python_function +{ + FUNCTION base; + PyObject * python_function; +} PYTHON_FUNCTION; + +static LIST * call_python_function( PYTHON_FUNCTION *, FRAME * ); + +#endif + + +struct _stack +{ + void * data; +}; + +static void * stack; + +STACK * stack_global() +{ + static STACK result; + if ( !stack ) + { + int32_t const size = 1 << 21; + stack = BJAM_MALLOC( size ); + result.data = (char *)stack + size; + } + return &result; +} + +struct list_alignment_helper +{ + char ch; + LIST * l; +}; + +#define LISTPTR_ALIGN_BASE ( sizeof( struct list_alignment_helper ) - sizeof( LIST * ) ) +#define LISTPTR_ALIGN ( ( LISTPTR_ALIGN_BASE > sizeof( LIST * ) ) ? sizeof( LIST * ) : LISTPTR_ALIGN_BASE ) + +static void check_alignment( STACK * s ) +{ + assert( (size_t)s->data % LISTPTR_ALIGN == 0 ); +} + +void * stack_allocate( STACK * s, int32_t size ) +{ + check_alignment( s ); + s->data = (char *)s->data - size; + check_alignment( s ); + return s->data; +} + +void stack_deallocate( STACK * s, int32_t size ) +{ + check_alignment( s ); + s->data = (char *)s->data + size; + check_alignment( s ); +} + +void stack_push( STACK * s, LIST * l ) +{ + *(LIST * *)stack_allocate( s, sizeof( LIST * ) ) = l; +} + +LIST * stack_pop( STACK * s ) +{ + LIST * const result = *(LIST * *)s->data; + stack_deallocate( s, sizeof( LIST * ) ); + return result; +} + +LIST * stack_top( STACK * s ) +{ + check_alignment( s ); + return *(LIST * *)s->data; +} + +LIST * stack_at( STACK * s, int32_t n ) +{ + check_alignment( s ); + return *( (LIST * *)s->data + n ); +} + +void stack_set( STACK * s, int32_t n, LIST * value ) +{ + check_alignment( s ); + *((LIST * *)s->data + n) = value; +} + +void * stack_get( STACK * s ) +{ + check_alignment( s ); + return s->data; +} + +LIST * frame_get_local( FRAME * frame, int32_t idx ) +{ + /* The only local variables are the arguments. */ + return list_copy( lol_get( frame->args, idx ) ); +} + +static OBJECT * function_get_constant( JAM_FUNCTION * function, int32_t idx ) +{ + return function->constants[ idx ]; +} + +static LIST * function_get_variable( JAM_FUNCTION * function, FRAME * frame, + int32_t idx ) +{ + return list_copy( var_get( frame->module, function->constants[ idx ] ) ); +} + +static void function_set_variable( JAM_FUNCTION * function, FRAME * frame, + int32_t idx, LIST * value ) +{ + var_set( frame->module, function->constants[ idx ], value, VAR_SET ); +} + +static LIST * function_swap_variable( JAM_FUNCTION * function, FRAME * frame, + int32_t idx, LIST * value ) +{ + return var_swap( frame->module, function->constants[ idx ], value ); +} + +static void function_append_variable( JAM_FUNCTION * function, FRAME * frame, + int32_t idx, LIST * value ) +{ + var_set( frame->module, function->constants[ idx ], value, VAR_APPEND ); +} + +static void function_default_variable( JAM_FUNCTION * function, FRAME * frame, + int32_t idx, LIST * value ) +{ + var_set( frame->module, function->constants[ idx ], value, VAR_DEFAULT ); +} + +static void function_set_rule( JAM_FUNCTION * function, FRAME * frame, + STACK * s, int32_t idx ) +{ + SUBFUNCTION * sub = function->functions + idx; + new_rule_body( frame->module, sub->name, sub->code, !sub->local ); +} + +static void function_set_actions( JAM_FUNCTION * function, FRAME * frame, + STACK * s, int32_t idx ) +{ + SUBACTION * sub = function->actions + idx; + LIST * bindlist = stack_pop( s ); + new_rule_actions( frame->module, sub->name, sub->command, bindlist, + sub->flags ); +} + + +/* + * Returns the index if name is "<", ">", "1", "2", ... or "19" otherwise + * returns -1. + */ + +static int32_t get_argument_index( char const * s ) +{ + if ( s[ 0 ] != '\0') + { + if ( s[ 1 ] == '\0' ) + { + switch ( s[ 0 ] ) + { + case '<': return 0; + case '>': return 1; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return s[ 0 ] - '1'; + } + } + else if ( s[ 0 ] == '1' && s[ 2 ] == '\0' ) + { + switch( s[ 1 ] ) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return s[ 1 ] - '0' + 10 - 1; + } + } + } + return -1; +} + +static LIST * function_get_named_variable( JAM_FUNCTION * function, + FRAME * frame, OBJECT * name ) +{ + int32_t const idx = get_argument_index( object_str( name ) ); + return idx == -1 + ? list_copy( var_get( frame->module, name ) ) + : list_copy( lol_get( frame->args, idx ) ); +} + +static void function_set_named_variable( JAM_FUNCTION * function, FRAME * frame, + OBJECT * name, LIST * value) +{ + var_set( frame->module, name, value, VAR_SET ); +} + +static LIST * function_swap_named_variable( JAM_FUNCTION * function, + FRAME * frame, OBJECT * name, LIST * value ) +{ + return var_swap( frame->module, name, value ); +} + +static void function_append_named_variable( JAM_FUNCTION * function, + FRAME * frame, OBJECT * name, LIST * value) +{ + var_set( frame->module, name, value, VAR_APPEND ); +} + +static void function_default_named_variable( JAM_FUNCTION * function, + FRAME * frame, OBJECT * name, LIST * value ) +{ + var_set( frame->module, name, value, VAR_DEFAULT ); +} + +static LIST * function_call_rule( JAM_FUNCTION * function, FRAME * frame, + STACK * s, int32_t n_args, char const * unexpanded, OBJECT * file, int32_t line ) +{ + FRAME inner[ 1 ]; + int32_t i; + LIST * first = stack_pop( s ); + LIST * result = L0; + OBJECT * rulename; + LIST * trailing; + + frame->file = file; + frame->line = line; + + if ( list_empty( first ) ) + { + backtrace_line( frame ); + out_printf( "warning: rulename %s expands to empty string\n", unexpanded ); + backtrace( frame ); + list_free( first ); + for ( i = 0; i < n_args; ++i ) + list_free( stack_pop( s ) ); + return result; + } + + rulename = object_copy( list_front( first ) ); + + frame_init( inner ); + inner->prev = frame; + inner->prev_user = frame->module->user_module ? frame : frame->prev_user; + inner->module = frame->module; /* This gets fixed up in evaluate_rule(). */ + + if ( n_args > LOL_MAX ) + { + out_printf( "ERROR: rules are limited to %d arguments\n", LOL_MAX ); + backtrace( inner ); + b2::clean_exit( EXITBAD ); + } + + for ( i = 0; i < n_args; ++i ) + lol_add( inner->args, stack_at( s, n_args - i - 1 ) ); + + for ( i = 0; i < n_args; ++i ) + stack_pop( s ); + + trailing = list_pop_front( first ); + if ( trailing ) + { + if ( inner->args->count == 0 ) + lol_add( inner->args, trailing ); + else + { + LIST * * const l = &inner->args->list[ 0 ]; + *l = list_append( trailing, *l ); + } + } + + result = evaluate_rule( bindrule( rulename, inner->module ), rulename, inner ); + frame_free( inner ); + object_free( rulename ); + return result; +} + +static LIST * function_call_member_rule( JAM_FUNCTION * function, FRAME * frame, STACK * s, int32_t n_args, OBJECT * rulename, OBJECT * file, int32_t line ) +{ + FRAME inner[ 1 ]; + int32_t i; + LIST * first = stack_pop( s ); + LIST * result = L0; + RULE * rule; + module_t * module; + OBJECT * real_rulename = 0; + + frame->file = file; + frame->line = line; + + if ( list_empty( first ) ) + { + backtrace_line( frame ); + out_printf( "warning: object is empty\n" ); + backtrace( frame ); + + list_free( first ); + + for( i = 0; i < n_args; ++i ) + { + list_free( stack_pop( s ) ); + } + + return result; + } + + /* FIXME: handle generic case */ + assert( list_length( first ) == 1 ); + + module = bindmodule( list_front( first ) ); + if ( module->class_module ) + { + rule = bindrule( rulename, module ); + if ( rule->procedure ) + { + real_rulename = object_copy( function_rulename( rule->procedure ) ); + } + else + { + string buf[ 1 ]; + string_new( buf ); + string_append( buf, object_str( module->name ) ); + string_push_back( buf, '.' ); + string_append( buf, object_str( rulename ) ); + real_rulename = object_new( buf->value ); + string_free( buf ); + } + } + else + { + string buf[ 1 ]; + string_new( buf ); + string_append( buf, object_str( list_front( first ) ) ); + string_push_back( buf, '.' ); + string_append( buf, object_str( rulename ) ); + real_rulename = object_new( buf->value ); + string_free( buf ); + rule = bindrule( real_rulename, frame->module ); + } + + frame_init( inner ); + + inner->prev = frame; + inner->prev_user = frame->module->user_module ? frame : frame->prev_user; + inner->module = frame->module; /* This gets fixed up in evaluate_rule(), below. */ + + if ( n_args > LOL_MAX ) + { + out_printf( "ERROR: member rules are limited to %d arguments\n", LOL_MAX ); + backtrace( inner ); + b2::clean_exit( EXITBAD ); + } + + for( i = 0; i < n_args; ++i ) + { + lol_add( inner->args, stack_at( s, n_args - i - 1 ) ); + } + + for( i = 0; i < n_args; ++i ) + { + stack_pop( s ); + } + + if ( list_length( first ) > 1 ) + { + string buf[ 1 ]; + LIST * trailing = L0; + LISTITER iter = list_begin( first ), end = list_end( first ); + iter = list_next( iter ); + string_new( buf ); + for ( ; iter != end; iter = list_next( iter ) ) + { + string_append( buf, object_str( list_item( iter ) ) ); + string_push_back( buf, '.' ); + string_append( buf, object_str( rulename ) ); + trailing = list_push_back( trailing, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + string_free( buf ); + if ( inner->args->count == 0 ) + lol_add( inner->args, trailing ); + else + { + LIST * * const l = &inner->args->list[ 0 ]; + *l = list_append( trailing, *l ); + } + } + + list_free( first ); + result = evaluate_rule( rule, real_rulename, inner ); + frame_free( inner ); + object_free( real_rulename ); + return result; +} + + +/* Variable expansion */ + +typedef struct +{ + int32_t sub1; + int32_t sub2; +} subscript_t; + +typedef struct +{ + PATHNAME f; /* :GDBSMR -- pieces */ + PATHPART empty; /* :E -- default for empties */ + PATHPART join; /* :J -- join list with char */ + PATHPART prefix; /* :< */ + PATHPART postfix; /* :> */ + bool parent:1; /* :P -- go to parent directory */ + bool filemods:1; /* one of the above applied */ + bool downshift:1; /* :L -- downshift result */ + bool upshift:1; /* :U -- upshift result */ + bool to_slashes:1; /* :T -- convert "\" to "/" */ + bool to_windows:1; /* :W -- convert cygwin to native paths */ + bool opt_file:1; /* :O=F -- replace @() with the file part */ + bool opt_content:1; /* :O=C -- repalce @() with the content (E) part */ +} VAR_EDITS; + +struct VAR_EXPANDED +{ + LIST * value = L0; + LIST * inner = L0; + bool opt_file:1; + bool opt_content:1; +}; + +static VAR_EXPANDED apply_modifiers_impl( LIST * result, string * buf, + VAR_EDITS * edits, int32_t n, LISTITER iter, LISTITER end ); +static void get_iters( subscript_t const subscript, LISTITER * const first, + LISTITER * const last, int32_t const length ); + + +/* + * var_edit_parse() - parse : modifiers into PATHNAME structure + * + * The : modifiers in a $(varname:modifier) currently support replacing or + * omitting elements of a filename, and so they are parsed into a PATHNAME + * structure (which contains pointers into the original string). + * + * Modifiers of the form "X=value" replace the component X with the given value. + * Modifiers without the "=value" cause everything but the component X to be + * omitted. X is one of: + * + * G + * D directory name + * B base name + * S .suffix + * M (member) + * R root directory - prepended to whole path + * + * This routine sets: + * + * f->f_xxx.ptr = 0 + * f->f_xxx.len = 0 + * -> leave the original component xxx + * + * f->f_xxx.ptr = string + * f->f_xxx.len = strlen( string ) + * -> replace component xxx with string + * + * f->f_xxx.ptr = "" + * f->f_xxx.len = 0 + * -> omit component xxx + * + * var_edit_file() below and path_build() obligingly follow this convention. + */ + +static int32_t var_edit_parse( char const * mods, VAR_EDITS * edits, int32_t havezeroed + ) +{ + while ( *mods ) + { + PATHPART * fp; + bool opt = false; + + switch ( *mods++ ) + { + case 'L': edits->downshift = 1; continue; + case 'U': edits->upshift = 1; continue; + case 'P': edits->parent = edits->filemods = 1; continue; + case 'E': fp = &edits->empty; goto strval; + case 'J': fp = &edits->join; goto strval; + case 'G': fp = &edits->f.f_grist; goto fileval; + case 'R': fp = &edits->f.f_root; goto fileval; + case 'D': fp = &edits->f.f_dir; goto fileval; + case 'B': fp = &edits->f.f_base; goto fileval; + case 'S': fp = &edits->f.f_suffix; goto fileval; + case 'M': fp = &edits->f.f_member; goto fileval; + case 'T': edits->to_slashes = 1; continue; + case 'W': edits->to_windows = 1; continue; + case '<': fp = &edits->prefix; goto strval; + case '>': fp = &edits->postfix; goto strval; + case 'O': opt = true; goto strval; + default: + continue; /* Should complain, but so what... */ + } + + fileval: + /* Handle :CHARS, where each char (without a following =) selects a + * particular file path element. On the first such char, we deselect all + * others (by setting ptr = "", len = 0) and for each char we select + * that element (by setting ptr = 0). + */ + edits->filemods = 1; + + if ( *mods != '=' ) + { + if ( !havezeroed++ ) + { + int32_t i; + for ( i = 0; i < 6; ++i ) + { + edits->f.part[ i ].len = 0; + edits->f.part[ i ].ptr = ""; + } + } + + fp->ptr = 0; + continue; + } + + strval: + /* Handle :O=??? */ + if ( opt ) + { + if ( *mods == '=' ) + { + for (++mods; *mods; ++mods) + { + switch ( *mods ) + { + case 'F': edits->opt_file = true; break; + case 'C': edits->opt_content = true; break; + } + } + } + } + else + { + /* Handle :X=value, or :X */ + if ( *mods != '=' ) + { + fp->ptr = ""; + fp->len = 0; + } + else + { + fp->ptr = ++mods; + fp->len = int32_t(strlen( mods )); + mods += fp->len; + } + } + } + + return havezeroed; +} + + +/* + * var_edit_file() - copy input target name to output, modifying filename. + */ + +static void var_edit_file( char const * in, string * out, VAR_EDITS * edits ) +{ + if ( edits->filemods ) + { + PATHNAME pathname; + + /* Parse apart original filename, putting parts into "pathname". */ + path_parse( in, &pathname ); + + /* Replace any pathname with edits->f */ + if ( edits->f.f_grist .ptr ) pathname.f_grist = edits->f.f_grist; + if ( edits->f.f_root .ptr ) pathname.f_root = edits->f.f_root; + if ( edits->f.f_dir .ptr ) pathname.f_dir = edits->f.f_dir; + if ( edits->f.f_base .ptr ) pathname.f_base = edits->f.f_base; + if ( edits->f.f_suffix.ptr ) pathname.f_suffix = edits->f.f_suffix; + if ( edits->f.f_member.ptr ) pathname.f_member = edits->f.f_member; + + /* If requested, modify pathname to point to parent. */ + if ( edits->parent ) + path_parent( &pathname ); + + /* Put filename back together. */ + path_build( &pathname, out ); + } + else + string_append( out, in ); +} + + +#if defined( OS_CYGWIN ) || defined( OS_VMS ) + +/* + * var_edit_translate_path() - translate path to os native format. + */ + +static void var_edit_translate_path( string * out, int32_t pos, VAR_EDITS * edits ) +{ + if ( edits->to_windows ) + { + string result[ 1 ]; + int32_t translated; + + /* Translate path to os native format. */ + translated = path_translate_to_os( out->value + pos, result ); + if ( translated ) + { + string_truncate( out, pos ); + string_append( out, result->value ); + edits->to_slashes = 0; + } + + string_free( result ); + } +} + +#endif + + +/* + * var_edit_shift() - do upshift/downshift & other mods. + */ + +static void var_edit_shift( string * out, int32_t pos, VAR_EDITS * edits ) +{ +#if defined( OS_CYGWIN ) || defined( OS_VMS ) + var_edit_translate_path( out, pos, edits ); +#endif + + if ( edits->upshift || edits->downshift || edits->to_slashes ) + { + /* Handle upshifting, downshifting and slash translation now. */ + char * p; + for ( p = out->value + pos; *p; ++p ) + { + if ( edits->upshift ) + *p = toupper( *p ); + else if ( edits->downshift ) + *p = tolower( *p ); + if ( edits->to_slashes && ( *p == '\\' ) ) + *p = '/'; + } + } +} + + +/* + * Reads n LISTs from the top of the STACK and combines them to form VAR_EDITS. + * Returns the number of VAR_EDITS pushed onto the STACK. + */ + +static int32_t expand_modifiers( STACK * s, int32_t n ) +{ + int32_t i; + int32_t total = 1; + LIST * * args = (LIST**)stack_get( s ); + for ( i = 0; i < n; ++i ) + total *= list_length( args[ i ] ); + + if ( total != 0 ) + { + VAR_EDITS * out = (VAR_EDITS*)stack_allocate( s, total * sizeof( VAR_EDITS ) ); + LISTITER * iter = (LISTITER*)stack_allocate( s, n * sizeof( LIST * ) ); + for ( i = 0; i < n; ++i ) + iter[ i ] = list_begin( args[ i ] ); + i = 0; + { + int32_t havezeroed; + loop: + memset( out, 0, sizeof( *out ) ); + havezeroed = 0; + for ( i = 0; i < n; ++i ) + havezeroed = var_edit_parse( object_str( list_item( iter[ i ] ) + ), out, havezeroed ); + ++out; + while ( --i >= 0 ) + { + if ( list_next( iter[ i ] ) != list_end( args[ i ] ) ) + { + iter[ i ] = list_next( iter[ i ] ); + goto loop; + } + iter[ i ] = list_begin( args[ i ] ); + } + } + stack_deallocate( s, n * sizeof( LIST * ) ); + } + return total; +} + +static VAR_EXPANDED apply_modifiers( STACK * s, int32_t n ) +{ + LIST * value = stack_top( s ); + VAR_EXPANDED result; + VAR_EDITS * const edits = (VAR_EDITS *)( (LIST * *)stack_get( s ) + 1 ); + string buf[ 1 ]; + string_new( buf ); + result = apply_modifiers_impl( L0, buf, edits, n, list_begin( value ), + list_end( value ) ); + string_free( buf ); + return result; +} + +// STACK: LIST * modifiers[modifier_count] +static VAR_EXPANDED eval_modifiers( STACK * s, LIST * value, int32_t modifier_count ) +{ + // Convert modifiers to value edits. + int32_t edits = expand_modifiers( s, modifier_count ); + // Edit the value on the stack. + stack_push( s, value ); + VAR_EXPANDED result = apply_modifiers( s, edits ); + list_free( stack_pop( s ) ); + // Clean up the value edits on the stack. + stack_deallocate( s, edits * sizeof( VAR_EDITS ) ); + // Clean up the filename modifiers. + for ( int32_t i = 0; i < modifier_count; ++i ) + list_free( stack_pop( s ) ); + // Done. + return result; +} + + +/* + * Parse a string of the form "1-2", "-2--1", "2-" and return the two + * subscripts. + */ + +subscript_t parse_subscript( char const * s ) +{ + subscript_t result; + result.sub1 = 0; + result.sub2 = 0; + do /* so we can use "break" */ + { + /* Allow negative subscripts. */ + if ( !isdigit( *s ) && ( *s != '-' ) ) + { + result.sub2 = 0; + break; + } + result.sub1 = atoi( s ); + + /* Skip over the first symbol, which is either a digit or dash. */ + ++s; + while ( isdigit( *s ) ) ++s; + + if ( *s == '\0' ) + { + result.sub2 = result.sub1; + break; + } + + if ( *s != '-' ) + { + result.sub2 = 0; + break; + } + + ++s; + + if ( *s == '\0' ) + { + result.sub2 = -1; + break; + } + + if ( !isdigit( *s ) && ( *s != '-' ) ) + { + result.sub2 = 0; + break; + } + + /* First, compute the index of the last element. */ + result.sub2 = atoi( s ); + while ( isdigit( *++s ) ); + + if ( *s != '\0' ) + result.sub2 = 0; + + } while ( 0 ); + return result; +} + +static LIST * apply_subscript( STACK * s ) +{ + LIST * value = stack_top( s ); + LIST * indices = stack_at( s, 1 ); + LIST * result = L0; + int32_t length = list_length( value ); + string buf[ 1 ]; + LISTITER indices_iter = list_begin( indices ); + LISTITER const indices_end = list_end( indices ); + string_new( buf ); + for ( ; indices_iter != indices_end; indices_iter = list_next( indices_iter + ) ) + { + LISTITER iter = list_begin( value ); + LISTITER end = list_end( value ); + subscript_t const subscript = parse_subscript( object_str( list_item( + indices_iter ) ) ); + get_iters( subscript, &iter, &end, length ); + for ( ; iter != end; iter = list_next( iter ) ) + result = list_push_back( result, object_copy( list_item( iter ) ) ); + } + string_free( buf ); + return result; +} + + +/* + * Reads the LIST from first and applies subscript to it. The results are + * written to *first and *last. + */ + +static void get_iters( subscript_t const subscript, LISTITER * const first, + LISTITER * const last, int32_t const length ) +{ + int32_t start; + int32_t size; + LISTITER iter; + LISTITER end; + { + + if ( subscript.sub1 < 0 ) + start = length + subscript.sub1; + else if ( subscript.sub1 > length ) + start = length; + else + start = subscript.sub1 - 1; + + size = subscript.sub2 < 0 + ? length + 1 + subscript.sub2 - start + : subscript.sub2 - start; + + /* + * HACK: When the first subscript is before the start of the list, it + * magically becomes the beginning of the list. This is inconsistent, + * but needed for backwards compatibility. + */ + if ( start < 0 ) + start = 0; + + /* The "sub2 < 0" test handles the semantic error of sub2 < sub1. */ + if ( size < 0 ) + size = 0; + + if ( start + size > length ) + size = length - start; + } + + iter = *first; + while ( start-- > 0 ) + iter = list_next( iter ); + + end = iter; + while ( size-- > 0 ) + end = list_next( end ); + + *first = iter; + *last = end; +} + +static LIST * apply_modifiers_prepost( LIST * result, string * buf, + VAR_EDITS * edits, int32_t n, LISTITER begin, LISTITER end ) +{ + for ( LISTITER iter = begin; iter != end; iter = list_next( iter ) ) + { + for ( int32_t i = 0; i < n; ++i ) + { + if ( edits[ i ].prefix.ptr ) + { + string_append( buf, edits[ i ].prefix.ptr ); + } + } + string_append( buf, object_str( list_item( iter ) ) ); + for ( int32_t i = 0; i < n; ++i ) + { + if ( edits[ i ].postfix.ptr ) + { + string_append( buf, edits[ i ].postfix.ptr ); + } + } + result = list_push_back( result, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + return result; +} + +static LIST * apply_modifiers_empty( LIST * result, string * buf, + VAR_EDITS * edits, int32_t n ) +{ + int32_t i; + for ( i = 0; i < n; ++i ) + { + if ( edits[ i ].empty.ptr ) + { + /** FIXME: is empty.ptr always null-terminated? */ + var_edit_file( edits[ i ].empty.ptr, buf, edits + i ); + var_edit_shift( buf, 0, edits + i ); + result = list_push_back( result, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + } + return result; +} + +static LIST * apply_modifiers_non_empty( LIST * result, string * buf, + VAR_EDITS * edits, int32_t n, LISTITER begin, LISTITER end ) +{ + int32_t i; + LISTITER iter; + for ( i = 0; i < n; ++i ) + { + if ( edits[ i ].join.ptr ) + { + var_edit_file( object_str( list_item( begin ) ), buf, edits + i ); + var_edit_shift( buf, 0, edits + i ); + for ( iter = list_next( begin ); iter != end; iter = list_next( iter + ) ) + { + int32_t size; + string_append( buf, edits[ i ].join.ptr ); + size = buf->size; + var_edit_file( object_str( list_item( iter ) ), buf, edits + i + ); + var_edit_shift( buf, size, edits + i ); + } + result = list_push_back( result, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + else + { + for ( iter = begin; iter != end; iter = list_next( iter ) ) + { + var_edit_file( object_str( list_item( iter ) ), buf, edits + i ); + var_edit_shift( buf, 0, edits + i ); + result = list_push_back( result, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + } + } + return result; +} + +static VAR_EXPANDED apply_modifiers_impl( LIST * result, string * buf, + VAR_EDITS * edits, int32_t n, LISTITER iter, LISTITER end ) +{ + LIST * modified = iter == end + ? apply_modifiers_empty( result, buf, edits, n ) + : apply_modifiers_non_empty( result, buf, edits, n, iter, end ); + VAR_EXPANDED expanded; + expanded.value = apply_modifiers_prepost( + L0, buf, edits, n, list_begin( modified ), list_end( modified ) ); + expanded.inner = modified; + expanded.opt_file = false; + expanded.opt_content = false; + for ( int32_t i = 0; i < n; ++i ) + { + expanded.opt_file |= edits[i].opt_file; + expanded.opt_content |= edits[i].opt_content; + } + return expanded; +} + +static LIST * apply_subscript_and_modifiers( STACK * s, int32_t n ) +{ + LIST * const value = stack_top( s ); + LIST * const indices = stack_at( s, 1 ); + LIST * result = L0; + VAR_EDITS * const edits = (VAR_EDITS *)((LIST * *)stack_get( s ) + 2); + int32_t const length = list_length( value ); + string buf[ 1 ]; + LISTITER indices_iter = list_begin( indices ); + LISTITER const indices_end = list_end( indices ); + string_new( buf ); + for ( ; indices_iter != indices_end; indices_iter = list_next( indices_iter + ) ) + { + LISTITER iter = list_begin( value ); + LISTITER end = list_end( value ); + subscript_t const sub = parse_subscript( object_str( list_item( + indices_iter ) ) ); + get_iters( sub, &iter, &end, length ); + VAR_EXPANDED modified + = apply_modifiers_impl( result, buf, edits, n, iter, end ); + result = modified.value; + list_free( modified.inner ); + } + string_free( buf ); + return result; +} + + +/* + * expand() - expands a list of concatenated strings and variable references + * + * Takes a list of expansion items - each representing one element to be + * concatenated and each containing a list of its values. Returns a list of all + * possible values constructed by selecting a single value from each of the + * elements and concatenating them together. + * + * For example, in the following code: + * + * local a = one two three four ; + * local b = foo bar ; + * ECHO /$(a)/$(b)/$(a)/ ; + * + * When constructing the result of /$(a)/$(b)/ this function would get called + * with the following 7 expansion items: + * 1. / + * 2. one two three four + * 3. / + * 4. foo bar + * 5. / + * 6. one two three four + * 7. / + * + * And would result in a list containing 32 values: + * 1. /one/foo/one/ + * 2. /one/foo/two/ + * 3. /one/foo/three/ + * 4. /one/foo/four/ + * 5. /one/bar/one/ + * ... + * + */ + +typedef struct expansion_item +{ + /* Item's value list initialized prior to calling expand(). */ + LIST * values; + + /* Internal data initialized and used inside expand(). */ + LISTITER current; /* Currently used value. */ + int32_t size; /* Concatenated string length prior to concatenating the + * item's current value. + */ +} expansion_item; + +static LIST * expand( expansion_item * items, int32_t const length ) +{ + LIST * result = L0; + string buf[ 1 ]; + int32_t size = 0; + int32_t i; + + assert( length > 0 ); + for ( i = 0; i < length; ++i ) + { + LISTITER iter = list_begin( items[ i ].values ); + LISTITER const end = list_end( items[ i ].values ); + + /* If any of the items has no values - the result is an empty list. */ + if ( iter == end ) return L0; + + /* Set each item's 'current' to its first listed value. This indicates + * each item's next value to be used when constructing the list of all + * possible concatenated values. + */ + items[ i ].current = iter; + + /* Calculate the longest concatenated string length - to know how much + * memory we need to allocate as a buffer for holding the concatenated + * strings. + */ + { + int32_t max = 0; + for ( ; iter != end; iter = list_next( iter ) ) + { + int32_t const len = int32_t(strlen( object_str( list_item( iter ) ) )); + if ( len > max ) max = len; + } + size += max; + } + } + + string_new( buf ); + string_reserve( buf, size ); + + i = 0; + while ( i >= 0 ) + { + for ( ; i < length; ++i ) + { + items[ i ].size = buf->size; + string_append( buf, object_str( list_item( items[ i ].current ) ) ); + } + result = list_push_back( result, object_new( buf->value ) ); + while ( --i >= 0 ) + { + if ( list_next( items[ i ].current ) != list_end( items[ i ].values + ) ) + { + items[ i ].current = list_next( items[ i ].current ); + string_truncate( buf, items[ i ].size ); + break; + } + else + items[ i ].current = list_begin( items[ i ].values ); + } + } + + string_free( buf ); + return result; +} + +static void combine_strings( STACK * s, int32_t n, string * out ) +{ + int32_t i; + for ( i = 0; i < n; ++i ) + { + LIST * const values = stack_pop( s ); + LISTITER iter = list_begin( values ); + LISTITER const end = list_end( values ); + if ( iter != end ) + { + string_append( out, object_str( list_item( iter ) ) ); + for ( iter = list_next( iter ); iter != end; iter = list_next( iter + ) ) + { + string_push_back( out, ' ' ); + string_append( out, object_str( list_item( iter ) ) ); + } + list_free( values ); + } + } +} + +struct dynamic_array +{ + int32_t size; + int32_t capacity; + int32_t unit_size; + void * data; +}; + +static void dynamic_array_init( struct dynamic_array * array ) +{ + array->size = 0; + array->capacity = 0; + array->unit_size = 0; + array->data = 0; +} + +static void dynamic_array_free( struct dynamic_array * array ) +{ + BJAM_FREE( array->data ); +} + +static void dynamic_array_push_impl( struct dynamic_array * const array, + void const * const value, int32_t const unit_size ) +{ + if ( array->unit_size == 0 ) + { + array->unit_size = unit_size; + } + else + { + assert( array->unit_size == unit_size ); + } + if ( array->capacity == 0 ) + { + array->capacity = 2; + array->data = BJAM_MALLOC( array->capacity * unit_size ); + } + else if ( array->capacity == array->size ) + { + void * new_data; + array->capacity *= 2; + new_data = BJAM_MALLOC( array->capacity * unit_size ); + memcpy( new_data, array->data, array->size * unit_size ); + BJAM_FREE( array->data ); + array->data = new_data; + } + memcpy( (char *)array->data + array->size * unit_size, value, unit_size ); + ++array->size; +} + +#define dynamic_array_push( array, value ) (dynamic_array_push_impl(array, &value, sizeof(value))) +#define dynamic_array_at( type, array, idx ) ( (assert( array->unit_size == sizeof(type) )) , (((type *)(array)->data)[idx]) ) +#define dynamic_array_pop( array ) (--(array)->size) + +/* + * struct compiler + */ + +struct label_info +{ + int32_t absolute_position; + struct dynamic_array uses[ 1 ]; +}; + +#define LOOP_INFO_BREAK 0 +#define LOOP_INFO_CONTINUE 1 + +struct loop_info +{ + int32_t type; + int32_t label; + int32_t cleanup_depth; +}; + +struct stored_rule +{ + OBJECT * name; + PARSE * parse; + int32_t num_arguments; + struct arg_list * arguments; + int32_t local; +}; + +typedef struct compiler +{ + struct dynamic_array code[ 1 ]; + struct dynamic_array constants[ 1 ]; + struct dynamic_array labels[ 1 ]; + struct dynamic_array rules[ 1 ]; + struct dynamic_array actions[ 1 ]; + struct dynamic_array cleanups[ 1 ]; + struct dynamic_array loop_scopes[ 1 ]; +} compiler; + +static void compiler_init( compiler * c ) +{ + dynamic_array_init( c->code ); + dynamic_array_init( c->constants ); + dynamic_array_init( c->labels ); + dynamic_array_init( c->rules ); + dynamic_array_init( c->actions ); + dynamic_array_init( c->cleanups ); + dynamic_array_init( c->loop_scopes ); +} + +static void compiler_free( compiler * c ) +{ + int32_t i; + dynamic_array_free( c->actions ); + dynamic_array_free( c->rules ); + for ( i = 0; i < c->labels->size; ++i ) + dynamic_array_free( dynamic_array_at( struct label_info, c->labels, i + ).uses ); + dynamic_array_free( c->labels ); + dynamic_array_free( c->constants ); + dynamic_array_free( c->code ); + dynamic_array_free( c->cleanups ); + dynamic_array_free( c->loop_scopes ); +} + +static void compile_emit_instruction( compiler * c, instruction instr ) +{ + dynamic_array_push( c->code, instr ); +} + +static int32_t compile_new_label( compiler * c ) +{ + int32_t result = c->labels->size; + struct label_info info; + info.absolute_position = -1; + dynamic_array_init( info.uses ); + dynamic_array_push( c->labels, info ); + return result; +} + +static void compile_set_label( compiler * c, int32_t label ) +{ + struct label_info * const l = &dynamic_array_at( struct label_info, + c->labels, label ); + int32_t const pos = c->code->size; + int32_t i; + assert( l->absolute_position == -1 ); + l->absolute_position = pos; + for ( i = 0; i < l->uses->size; ++i ) + { + int32_t id = dynamic_array_at( int32_t, l->uses, i ); + int32_t offset = (int32_t)( pos - id - 1 ); + dynamic_array_at( instruction, c->code, id ).arg = offset; + } +} + +static void compile_emit( compiler * c, uint32_t op_code, int32_t arg ) +{ + instruction instr; + instr.op_code = op_code; + instr.arg = arg; + compile_emit_instruction( c, instr ); +} + +static void compile_emit_branch( compiler * c, uint32_t op_code, int32_t label ) +{ + struct label_info * const l = &dynamic_array_at( struct label_info, + c->labels, label ); + int32_t const pos = c->code->size; + instruction instr; + instr.op_code = op_code; + if ( l->absolute_position == -1 ) + { + instr.arg = 0; + dynamic_array_push( l->uses, pos ); + } + else + instr.arg = (int32_t)( l->absolute_position - pos - 1 ); + compile_emit_instruction( c, instr ); +} + +static int32_t compile_emit_constant( compiler * c, OBJECT * value ) +{ + OBJECT * copy = object_copy( value ); + dynamic_array_push( c->constants, copy ); + return c->constants->size - 1; +} + +static void compile_push_cleanup( compiler * c, uint32_t op_code, int32_t arg ) +{ + instruction instr; + instr.op_code = op_code; + instr.arg = arg; + dynamic_array_push( c->cleanups, instr ); +} + +static void compile_pop_cleanup( compiler * c ) +{ + dynamic_array_pop( c->cleanups ); +} + +static void compile_emit_cleanups( compiler * c, int32_t end ) +{ + int32_t i; + for ( i = c->cleanups->size; --i >= end; ) + { + compile_emit_instruction( c, dynamic_array_at( instruction, c->cleanups, i ) ); + } +} + +static void compile_emit_loop_jump( compiler * c, int32_t type ) +{ + struct loop_info * info = NULL; + int32_t i; + for ( i = c->loop_scopes->size; --i >= 0; ) + { + struct loop_info * elem = &dynamic_array_at( struct loop_info, c->loop_scopes, i ); + if ( elem->type == type ) + { + info = elem; + break; + } + } + if ( info == NULL ) + { + printf( "warning: ignoring break statement used outside of loop\n" ); + return; + } + compile_emit_cleanups( c, info->cleanup_depth ); + compile_emit_branch( c, INSTR_JUMP, info->label ); +} + +static void compile_push_break_scope( compiler * c, int32_t label ) +{ + struct loop_info info; + info.type = LOOP_INFO_BREAK; + info.label = label; + info.cleanup_depth = c->cleanups->size; + dynamic_array_push( c->loop_scopes, info ); +} + +static void compile_push_continue_scope( compiler * c, int32_t label ) +{ + struct loop_info info; + info.type = LOOP_INFO_CONTINUE; + info.label = label; + info.cleanup_depth = c->cleanups->size; + dynamic_array_push( c->loop_scopes, info ); +} + +static void compile_pop_break_scope( compiler * c ) +{ + assert( c->loop_scopes->size > 0 ); + assert( dynamic_array_at( struct loop_info, c->loop_scopes, c->loop_scopes->size - 1 ).type == LOOP_INFO_BREAK ); + dynamic_array_pop( c->loop_scopes ); +} + +static void compile_pop_continue_scope( compiler * c ) +{ + assert( c->loop_scopes->size > 0 ); + assert( dynamic_array_at( struct loop_info, c->loop_scopes, c->loop_scopes->size - 1 ).type == LOOP_INFO_CONTINUE ); + dynamic_array_pop( c->loop_scopes ); +} + +static int32_t compile_emit_rule( compiler * c, OBJECT * name, PARSE * parse, + int32_t num_arguments, struct arg_list * arguments, int32_t local ) +{ + struct stored_rule rule; + rule.name = object_copy( name ); + rule.parse = parse; + rule.num_arguments = num_arguments; + rule.arguments = arguments; + rule.local = local; + dynamic_array_push( c->rules, rule ); + return (int32_t)( c->rules->size - 1 ); +} + +static int32_t compile_emit_actions( compiler * c, PARSE * parse ) +{ + SUBACTION a; + a.name = object_copy( parse->string ); + a.command = function_compile_actions( object_str( parse->string1 ), + parse->file, parse->line ); + a.flags = parse->num; + dynamic_array_push( c->actions, a ); + return (int32_t)( c->actions->size - 1 ); +} + +static JAM_FUNCTION * compile_to_function( compiler * c ) +{ + JAM_FUNCTION * const result = (JAM_FUNCTION*)BJAM_MALLOC( sizeof( JAM_FUNCTION ) ); + int32_t i; + result->base.type = FUNCTION_JAM; + result->base.reference_count = 1; + result->base.formal_arguments = 0; + result->base.num_formal_arguments = 0; + + result->base.rulename = 0; + + result->code_size = c->code->size; + result->code = (instruction*)BJAM_MALLOC( c->code->size * sizeof( instruction ) ); + memcpy( result->code, c->code->data, c->code->size * sizeof( instruction ) ); + + result->constants = (OBJECT**)BJAM_MALLOC( c->constants->size * sizeof( OBJECT * ) ); + if ( c->constants->size != 0 ) + memcpy( result->constants, c->constants->data, + c->constants->size * sizeof( OBJECT * ) ); + result->num_constants = c->constants->size; + + result->num_subfunctions = c->rules->size; + result->functions = (SUBFUNCTION*)BJAM_MALLOC( c->rules->size * sizeof( SUBFUNCTION ) ); + for ( i = 0; i < c->rules->size; ++i ) + { + struct stored_rule * const rule = &dynamic_array_at( struct stored_rule, + c->rules, i ); + result->functions[ i ].name = rule->name; + result->functions[ i ].code = function_compile( rule->parse ); + result->functions[ i ].code->num_formal_arguments = rule->num_arguments; + result->functions[ i ].code->formal_arguments = rule->arguments; + result->functions[ i ].local = rule->local; + } + + result->actions = (SUBACTION*)BJAM_MALLOC( c->actions->size * sizeof( SUBACTION ) ); + if ( c->actions->size != 0 ) + memcpy( result->actions, c->actions->data, + c->actions->size * sizeof( SUBACTION ) ); + result->num_subactions = c->actions->size; + + result->generic = 0; + + result->file = 0; + result->line = -1; + + return result; +} + + +/* + * Parsing of variable expansions + */ + +typedef struct VAR_PARSE_GROUP +{ + struct dynamic_array elems[ 1 ]; +} VAR_PARSE_GROUP; + +typedef struct VAR_PARSE_ACTIONS +{ + struct dynamic_array elems[ 1 ]; +} VAR_PARSE_ACTIONS; + +#define VAR_PARSE_TYPE_VAR 0 +#define VAR_PARSE_TYPE_STRING 1 +#define VAR_PARSE_TYPE_FILE 2 + +typedef struct _var_parse +{ + int32_t type; /* string, variable or file */ +} VAR_PARSE; + +typedef struct +{ + VAR_PARSE base; + VAR_PARSE_GROUP * name; + VAR_PARSE_GROUP * subscript; + struct dynamic_array modifiers[ 1 ]; +} VAR_PARSE_VAR; + +typedef struct +{ + VAR_PARSE base; + OBJECT * s; +} VAR_PARSE_STRING; + +static void var_parse_free( VAR_PARSE * ); + +static std::string var_parse_to_string( VAR_PARSE_STRING * string, bool debug = false ); +static std::string var_parse_to_string( VAR_PARSE_GROUP * group, bool debug = false ); +static std::string var_parse_to_string( VAR_PARSE_VAR const * parse, bool debug = false ); + +static std::string var_parse_to_string( VAR_PARSE_STRING * string, bool debug ) +{ + std::string result; + if ( debug ) result += "'"; + result += object_str( string->s ) ? object_str( string->s ) : ""; + if ( debug ) result += "'"; + return result; +} +static std::string var_parse_to_string( VAR_PARSE_GROUP * group, bool debug ) +{ + std::string result; + if ( debug ) result += "["; + for ( int32_t i = 0; i < group->elems->size; ++i ) + { + switch ( dynamic_array_at( VAR_PARSE *, group->elems, i )->type ) + { + case VAR_PARSE_TYPE_VAR: + result += var_parse_to_string( dynamic_array_at( VAR_PARSE_VAR *, group->elems, i ), debug ); + break; + + case VAR_PARSE_TYPE_STRING: + result += var_parse_to_string( dynamic_array_at( VAR_PARSE_STRING *, group->elems, i ), debug ); + break; + } + } + if ( debug ) result += "["; + return result; +} +static std::string var_parse_to_string( VAR_PARSE_VAR const * parse, bool debug ) +{ + std::string result = "$("; + result += var_parse_to_string( parse->name, debug ); + if ( parse->subscript ) + { + result += "[" + var_parse_to_string( parse->subscript, debug ) + "]"; + } + for ( int32_t i = 0; i < parse->modifiers->size; ++i ) + { + result += ":" + var_parse_to_string( dynamic_array_at( VAR_PARSE_GROUP *, parse->modifiers, i ), debug ); + } + return result + ")"; +} + + +/* + * VAR_PARSE_GROUP + */ + +static VAR_PARSE_GROUP * var_parse_group_new() +{ + VAR_PARSE_GROUP * const result = (VAR_PARSE_GROUP*)BJAM_MALLOC( sizeof( VAR_PARSE_GROUP ) ); + dynamic_array_init( result->elems ); + return result; +} + +static void var_parse_group_free( VAR_PARSE_GROUP * group ) +{ + int32_t i; + for ( i = 0; i < group->elems->size; ++i ) + var_parse_free( dynamic_array_at( VAR_PARSE *, group->elems, i ) ); + dynamic_array_free( group->elems ); + BJAM_FREE( group ); +} + +static void var_parse_group_add( VAR_PARSE_GROUP * group, VAR_PARSE * elem ) +{ + dynamic_array_push( group->elems, elem ); +} + +static void var_parse_group_maybe_add_constant( VAR_PARSE_GROUP * group, + char const * start, char const * end ) +{ + if ( start != end ) + { + string buf[ 1 ]; + VAR_PARSE_STRING * const value = (VAR_PARSE_STRING *)BJAM_MALLOC( + sizeof(VAR_PARSE_STRING) ); + value->base.type = VAR_PARSE_TYPE_STRING; + string_new( buf ); + string_append_range( buf, start, end ); + value->s = object_new( buf->value ); + string_free( buf ); + var_parse_group_add( group, (VAR_PARSE *)value ); + } +} + +VAR_PARSE_STRING * var_parse_group_as_literal( VAR_PARSE_GROUP * group ) +{ + if ( group->elems->size == 1 ) + { + VAR_PARSE * result = dynamic_array_at( VAR_PARSE *, group->elems, 0 ); + if ( result->type == VAR_PARSE_TYPE_STRING ) + return (VAR_PARSE_STRING *)result; + } + return 0; +} + + +/* + * VAR_PARSE_ACTIONS + */ + +static VAR_PARSE_ACTIONS * var_parse_actions_new() +{ + VAR_PARSE_ACTIONS * const result = (VAR_PARSE_ACTIONS *)BJAM_MALLOC( + sizeof(VAR_PARSE_ACTIONS) ); + dynamic_array_init( result->elems ); + return result; +} + +static void var_parse_actions_free( VAR_PARSE_ACTIONS * actions ) +{ + int32_t i; + for ( i = 0; i < actions->elems->size; ++i ) + var_parse_group_free( dynamic_array_at( VAR_PARSE_GROUP *, + actions->elems, i ) ); + dynamic_array_free( actions->elems ); + BJAM_FREE( actions ); +} + + +/* + * VAR_PARSE_VAR + */ + +static VAR_PARSE_VAR * var_parse_var_new() +{ + VAR_PARSE_VAR * result = (VAR_PARSE_VAR*)BJAM_MALLOC( sizeof( VAR_PARSE_VAR ) ); + result->base.type = VAR_PARSE_TYPE_VAR; + result->name = var_parse_group_new(); + result->subscript = 0; + dynamic_array_init( result->modifiers ); + return result; +} + +static void var_parse_var_free( VAR_PARSE_VAR * var ) +{ + int32_t i; + var_parse_group_free( var->name ); + if ( var->subscript ) + var_parse_group_free( var->subscript ); + for ( i = 0; i < var->modifiers->size; ++i ) + var_parse_group_free( dynamic_array_at( VAR_PARSE_GROUP *, + var->modifiers, i ) ); + dynamic_array_free( var->modifiers ); + BJAM_FREE( var ); +} + +static VAR_PARSE_GROUP * var_parse_var_new_modifier( VAR_PARSE_VAR * var ) +{ + VAR_PARSE_GROUP * result = var_parse_group_new(); + dynamic_array_push( var->modifiers, result ); + return result; +} + +static int32_t var_parse_var_mod_index( VAR_PARSE_VAR const * var , char m) +{ + for ( int32_t i = 0; i < var->modifiers->size; ++i ) + { + VAR_PARSE_GROUP * mod = dynamic_array_at( VAR_PARSE_GROUP *, var->modifiers, i ); + VAR_PARSE_STRING * mod_val = dynamic_array_at( VAR_PARSE_STRING *, mod->elems, 0 ); + const char * mod_str = object_str(mod_val->s); + if (mod_str && mod_str[0] == m) + { + return i; + } + } + return -1; +} + + +/* + * VAR_PARSE_STRING + */ + +static void var_parse_string_free( VAR_PARSE_STRING * string ) +{ + object_free( string->s ); + BJAM_FREE( string ); +} + + +/* + * VAR_PARSE + */ + +static void var_parse_free( VAR_PARSE * parse ) +{ + switch ( parse->type ) + { + case VAR_PARSE_TYPE_VAR: + case VAR_PARSE_TYPE_FILE: + var_parse_var_free( (VAR_PARSE_VAR *)parse ); + break; + + case VAR_PARSE_TYPE_STRING: + var_parse_string_free( (VAR_PARSE_STRING *)parse ); + break; + + default: + assert( !"Invalid type" ); + } +} + + +/* + * Compile VAR_PARSE + */ + +static void var_parse_group_compile( VAR_PARSE_GROUP const * parse, + compiler * c ); + +static void var_parse_var_compile( VAR_PARSE_VAR const * parse, compiler * c ) +{ + int32_t expand_name = 0; + int32_t is_get_grist = 0; + int32_t has_modifiers = 0; + /* Special case common modifiers */ + if ( parse->modifiers->size == 1 ) + { + VAR_PARSE_GROUP * mod = dynamic_array_at( VAR_PARSE_GROUP *, parse->modifiers, 0 ); + if ( mod->elems->size == 1 ) + { + VAR_PARSE * mod1 = dynamic_array_at( VAR_PARSE *, mod->elems, 0 ); + if ( mod1->type == VAR_PARSE_TYPE_STRING ) + { + OBJECT * s = ( (VAR_PARSE_STRING *)mod1 )->s; + if ( ! strcmp ( object_str( s ), "G" ) ) + { + is_get_grist = 1; + } + } + } + } + /* If there are modifiers, emit them in reverse order. */ + if ( parse->modifiers->size > 0 && !is_get_grist ) + { + int32_t i; + has_modifiers = 1; + for ( i = 0; i < parse->modifiers->size; ++i ) + var_parse_group_compile( dynamic_array_at( VAR_PARSE_GROUP *, + parse->modifiers, parse->modifiers->size - i - 1 ), c ); + } + + /* If there is a subscript, emit it. */ + if ( parse->subscript ) + var_parse_group_compile( parse->subscript, c ); + + /* If the variable name is empty, look it up. */ + if ( parse->name->elems->size == 0 ) + compile_emit( c, INSTR_PUSH_VAR, compile_emit_constant( c, + constant_empty ) ); + /* If the variable name does not need to be expanded, look it up. */ + else if ( parse->name->elems->size == 1 && dynamic_array_at( VAR_PARSE *, + parse->name->elems, 0 )->type == VAR_PARSE_TYPE_STRING ) + { + OBJECT * const name = ( (VAR_PARSE_STRING *)dynamic_array_at( + VAR_PARSE *, parse->name->elems, 0 ) )->s; + int32_t const idx = get_argument_index( object_str( name ) ); + if ( idx != -1 ) + compile_emit( c, INSTR_PUSH_ARG, idx ); + else + compile_emit( c, INSTR_PUSH_VAR, compile_emit_constant( c, name ) ); + } + /* Otherwise, push the var names and use the group instruction. */ + else + { + var_parse_group_compile( parse->name, c ); + expand_name = 1; + } + + /** Select the instruction for expanding the variable. */ + if ( !has_modifiers && !parse->subscript && !expand_name ) + ; + else if ( !has_modifiers && !parse->subscript && expand_name ) + compile_emit( c, INSTR_PUSH_GROUP, 0 ); + else if ( !has_modifiers && parse->subscript && !expand_name ) + compile_emit( c, INSTR_APPLY_INDEX, 0 ); + else if ( !has_modifiers && parse->subscript && expand_name ) + compile_emit( c, INSTR_APPLY_INDEX_GROUP, 0 ); + else if ( has_modifiers && !parse->subscript && !expand_name ) + compile_emit( c, INSTR_APPLY_MODIFIERS, parse->modifiers->size ); + else if ( has_modifiers && !parse->subscript && expand_name ) + compile_emit( c, INSTR_APPLY_MODIFIERS_GROUP, parse->modifiers->size ); + else if ( has_modifiers && parse->subscript && !expand_name ) + compile_emit( c, INSTR_APPLY_INDEX_MODIFIERS, parse->modifiers->size ); + else if ( has_modifiers && parse->subscript && expand_name ) + compile_emit( c, INSTR_APPLY_INDEX_MODIFIERS_GROUP, + parse->modifiers->size ); + + /* Now apply any special modifiers */ + if ( is_get_grist ) + { + compile_emit( c, INSTR_GET_GRIST, 0 ); + } +} + +static void var_parse_string_compile( VAR_PARSE_STRING const * parse, + compiler * c ) +{ + compile_emit( c, INSTR_PUSH_CONSTANT, compile_emit_constant( c, parse->s ) + ); +} + +static void parse_var_string( char const * first, char const * last, + struct dynamic_array * out ); + +static void var_parse_file_compile( VAR_PARSE_VAR const * parse, compiler * c ) +{ + std::string var = var_parse_to_string( parse, true ); + int32_t empty_mod_index = var_parse_var_mod_index( parse, 'E' ); + int32_t grist_mod_index = var_parse_var_mod_index( parse, 'G' ); + int32_t modifier_count = 0; + // Push the contents, aka the edit modifier value. + { + assert( empty_mod_index >= 0 ); + // We reparse the edit modifier as we do teh expansion differently than + // regular var expansion. + std::string contents_val = var_parse_to_string( + dynamic_array_at( + VAR_PARSE_GROUP *, parse->modifiers, empty_mod_index ), false ); + dynamic_array contents_dyn_array; + dynamic_array_init( &contents_dyn_array ); + parse_var_string( + contents_val.c_str() + 2, contents_val.c_str() + contents_val.size(), + &contents_dyn_array ); + for ( int32_t i = contents_dyn_array.size - 1; i >= 0; --i ) + { + auto group = dynamic_array_at( + VAR_PARSE_GROUP *, ( &contents_dyn_array ), i ); + var_parse_group_compile( group, c ); + var_parse_group_free( group ); + } + dynamic_array_free( &contents_dyn_array ); + compile_emit( c, INSTR_APPEND_STRINGS, contents_dyn_array.size ); + } + // If there are modifiers, emit them in reverse order. + if ( parse->modifiers->size > 0 ) + { + for ( int32_t i = parse->modifiers->size - 1; i >= 0; --i ) + { + // Skip special modifiers. + if ( i == empty_mod_index || i == grist_mod_index ) continue; + modifier_count += 1; + var_parse_group_compile( + dynamic_array_at( VAR_PARSE_GROUP *, parse->modifiers, i ), c ); + } + } + // Push the filename, aka var name. + var_parse_group_compile( parse->name, c ); + // This instruction applies the modifiers and writes out the file and fills + // in the file name. + compile_emit( c, INSTR_WRITE_FILE, modifier_count ); +} + +static void var_parse_compile( VAR_PARSE const * parse, compiler * c ) +{ + switch ( parse->type ) + { + case VAR_PARSE_TYPE_VAR: + var_parse_var_compile( (VAR_PARSE_VAR const *)parse, c ); + break; + + case VAR_PARSE_TYPE_STRING: + var_parse_string_compile( (VAR_PARSE_STRING const *)parse, c ); + break; + + case VAR_PARSE_TYPE_FILE: + var_parse_file_compile( (VAR_PARSE_VAR const *)parse, c ); + break; + + default: + assert( !"Unknown var parse type." ); + } +} + +static void var_parse_group_compile( VAR_PARSE_GROUP const * parse, compiler * c + ) +{ + /* Emit the elements in reverse order. */ + int32_t i; + for ( i = 0; i < parse->elems->size; ++i ) + var_parse_compile( dynamic_array_at( VAR_PARSE *, parse->elems, + parse->elems->size - i - 1 ), c ); + /* If there are no elements, emit an empty string. */ + if ( parse->elems->size == 0 ) + compile_emit( c, INSTR_PUSH_CONSTANT, compile_emit_constant( c, + constant_empty ) ); + /* If there is more than one element, combine them. */ + if ( parse->elems->size > 1 ) + compile_emit( c, INSTR_COMBINE_STRINGS, parse->elems->size ); +} + +static void var_parse_actions_compile( VAR_PARSE_ACTIONS const * actions, + compiler * c ) +{ + int32_t i; + for ( i = 0; i < actions->elems->size; ++i ) + var_parse_group_compile( dynamic_array_at( VAR_PARSE_GROUP *, + actions->elems, actions->elems->size - i - 1 ), c ); + compile_emit( c, INSTR_OUTPUT_STRINGS, actions->elems->size ); +} + + +/* + * Parse VAR_PARSE_VAR + */ + +static VAR_PARSE * parse_variable( char const * * string ); +static int32_t try_parse_variable( char const * * s_, char const * * string, + VAR_PARSE_GROUP * out ); +static void balance_parentheses( char const * * s_, char const * * string, + VAR_PARSE_GROUP * out ); +static void parse_var_string( char const * first, char const * last, + struct dynamic_array * out ); + + +/* + * Parses a string that can contain variables to expand. + */ + +static VAR_PARSE_GROUP * parse_expansion( char const * * string ) +{ + VAR_PARSE_GROUP * result = var_parse_group_new(); + char const * s = *string; + for ( ; ; ) + { + if ( try_parse_variable( &s, string, result ) ) {} + else if ( s[ 0 ] == '\0' ) + { + var_parse_group_maybe_add_constant( result, *string, s ); + return result; + } + else + ++s; + } +} + +static VAR_PARSE_ACTIONS * parse_actions( char const * string ) +{ + VAR_PARSE_ACTIONS * const result = var_parse_actions_new(); + parse_var_string( string, string + strlen( string ), result->elems ); + return result; +} + +/* + * Checks whether the string a *s_ starts with a variable expansion "$(". + * *string should point to the first unemitted character before *s. If *s_ + * starts with variable expansion, appends elements to out up to the closing + * ")", and adjusts *s_ and *string to point to next character. Returns 1 if s_ + * starts with a variable, 0 otherwise. + */ + +static int32_t try_parse_variable( char const * * s_, char const * * string, + VAR_PARSE_GROUP * out ) +{ + char const * s = *s_; + if ( s[ 0 ] == '$' && s[ 1 ] == '(' ) + { + var_parse_group_maybe_add_constant( out, *string, s ); + s += 2; + var_parse_group_add( out, parse_variable( &s ) ); + *string = s; + *s_ = s; + return 1; + } + if ( s[ 0 ] == '@' && s[ 1 ] == '(' ) + { + var_parse_group_maybe_add_constant( out, *string, s ); + s += 2; + VAR_PARSE_VAR *vp = (VAR_PARSE_VAR*)parse_variable( &s ); + /* We at least need the empty (:E) modifier. */ + if (var_parse_var_mod_index(vp, 'E') >= 0) + { + vp->base.type = VAR_PARSE_TYPE_FILE; + var_parse_group_add( out, (VAR_PARSE*)vp ); + *string = s; + *s_ = s; + return 1; + } + else + { + var_parse_var_free( vp ); + } + } + return 0; +} + + +static char const * current_file = ""; +static int32_t current_line; + +static void parse_error( char const * message ) +{ + out_printf( "%s:%d: %s\n", current_file, current_line, message ); +} + + +/* + * Parses a single variable up to the closing ")" and adjusts *string to point + * to the next character. *string should point to the character immediately + * after the initial "$(". + */ + +static VAR_PARSE * parse_variable( char const * * string ) +{ + VAR_PARSE_VAR * const result = var_parse_var_new(); + VAR_PARSE_GROUP * const name = result->name; + char const * s = *string; + for ( ; ; ) + { + if ( try_parse_variable( &s, string, name ) ) {} + else if ( s[ 0 ] == ':' ) + { + VAR_PARSE_GROUP * mod; + var_parse_group_maybe_add_constant( name, *string, s ); + ++s; + *string = s; + mod = var_parse_var_new_modifier( result ); + for ( ; ; ) + { + if ( try_parse_variable( &s, string, mod ) ) {} + else if ( s[ 0 ] == ')' ) + { + var_parse_group_maybe_add_constant( mod, *string, s ); + *string = ++s; + return (VAR_PARSE *)result; + } + else if ( s[ 0 ] == '(' ) + { + ++s; + balance_parentheses( &s, string, mod ); + } + else if ( s[ 0 ] == ':' ) + { + var_parse_group_maybe_add_constant( mod, *string, s ); + *string = ++s; + mod = var_parse_var_new_modifier( result ); + } + else if ( s[ 0 ] == '[' ) + { + parse_error("unexpected subscript"); + ++s; + } + else if ( s[ 0 ] == '\0' ) + { + parse_error( "unbalanced parentheses" ); + var_parse_group_maybe_add_constant( mod, *string, s ); + *string = s; + return (VAR_PARSE *)result; + } + else + ++s; + } + } + else if ( s[ 0 ] == '[' ) + { + VAR_PARSE_GROUP * subscript = var_parse_group_new(); + result->subscript = subscript; + var_parse_group_maybe_add_constant( name, *string, s ); + *string = ++s; + for ( ; ; ) + { + if ( try_parse_variable( &s, string, subscript ) ) {} + else if ( s[ 0 ] == ']' ) + { + var_parse_group_maybe_add_constant( subscript, *string, s ); + *string = ++s; + if ( s[ 0 ] != ')' && s[ 0 ] != ':' && s[ 0 ] != '\0' ) + parse_error( "unexpected text following []" ); + break; + } + else if ( isdigit( s[ 0 ] ) || s[ 0 ] == '-' ) + { + ++s; + } + else if ( s[ 0 ] == '\0' ) + { + parse_error( "malformed subscript" ); + break; + } + else + { + parse_error( "malformed subscript" ); + ++s; + } + } + } + else if ( s[ 0 ] == ')' ) + { + var_parse_group_maybe_add_constant( name, *string, s ); + *string = ++s; + return (VAR_PARSE *)result; + } + else if ( s[ 0 ] == '(' ) + { + ++s; + balance_parentheses( &s, string, name ); + } + else if ( s[ 0 ] == '\0' ) + { + parse_error( "unbalanced parentheses" ); + var_parse_group_maybe_add_constant( name, *string, s ); + *string = s; + return (VAR_PARSE *)result; + } + else + ++s; + } +} + +static void parse_var_string( char const * first, char const * last, + struct dynamic_array * out ) +{ + char const * saved = first; + while ( first != last ) + { + /* Handle whitespace. */ + while ( first != last && isspace( *first ) ) ++first; + if ( saved != first ) + { + VAR_PARSE_GROUP * const group = var_parse_group_new(); + var_parse_group_maybe_add_constant( group, saved, first ); + saved = first; + dynamic_array_push( out, group ); + } + if ( first == last ) break; + + /* Handle non-whitespace */ + { + VAR_PARSE_GROUP * group = var_parse_group_new(); + for ( ; ; ) + { + if ( first == last || isspace( *first ) ) + { + var_parse_group_maybe_add_constant( group, saved, first ); + saved = first; + break; + } + if ( try_parse_variable( &first, &saved, group ) ) + assert( first <= last ); + else + ++first; + } + dynamic_array_push( out, group ); + } + } +} + +/* + * Given that *s_ points to the character after a "(", parses up to the matching + * ")". *string should point to the first unemitted character before *s_. + * + * When the function returns, *s_ will point to the character after the ")", and + * *string will point to the first unemitted character before *s_. The range + * from *string to *s_ does not contain any variables that need to be expanded. + */ + +void balance_parentheses( char const * * s_, char const * * string, + VAR_PARSE_GROUP * out) +{ + int32_t depth = 1; + char const * s = *s_; + for ( ; ; ) + { + if ( try_parse_variable( &s, string, out ) ) { } + else if ( s[ 0 ] == ':' || s[ 0 ] == '[' ) + { + parse_error( "unbalanced parentheses" ); + ++s; + } + else if ( s[ 0 ] == '\0' ) + { + parse_error( "unbalanced parentheses" ); + break; + } + else if ( s[ 0 ] == ')' ) + { + ++s; + if ( --depth == 0 ) break; + } + else if ( s[ 0 ] == '(' ) + { + ++depth; + ++s; + } + else + ++s; + } + *s_ = s; +} + + +/* + * Main compile. + */ + +#define RESULT_STACK 0 +#define RESULT_RETURN 1 +#define RESULT_NONE 2 + +static void compile_parse( PARSE * parse, compiler * c, int32_t result_location ); +static struct arg_list * arg_list_compile( PARSE * parse, int32_t * num_arguments ); + +static void compile_condition( PARSE * parse, compiler * c, int32_t branch_true, int32_t label ) +{ + assert( parse->type == PARSE_EVAL ); + switch ( parse->num ) + { + case EXPR_EXISTS: + compile_parse( parse->left, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_NOT_EMPTY, label ); + else + compile_emit_branch( c, INSTR_JUMP_EMPTY, label ); + break; + + case EXPR_EQUALS: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_EQ, label ); + else + compile_emit_branch( c, INSTR_JUMP_NE, label ); + break; + + case EXPR_NOTEQ: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_NE, label ); + else + compile_emit_branch( c, INSTR_JUMP_EQ, label ); + break; + + case EXPR_LESS: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_LT, label ); + else + compile_emit_branch( c, INSTR_JUMP_GE, label ); + break; + + case EXPR_LESSEQ: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_LE, label ); + else + compile_emit_branch( c, INSTR_JUMP_GT, label ); + break; + + case EXPR_MORE: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_GT, label ); + else + compile_emit_branch( c, INSTR_JUMP_LE, label ); + break; + + case EXPR_MOREEQ: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_GE, label ); + else + compile_emit_branch( c, INSTR_JUMP_LT, label ); + break; + + case EXPR_IN: + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + if ( branch_true ) + compile_emit_branch( c, INSTR_JUMP_IN, label ); + else + compile_emit_branch( c, INSTR_JUMP_NOT_IN, label ); + break; + + case EXPR_AND: + if ( branch_true ) + { + int32_t f = compile_new_label( c ); + compile_condition( parse->left, c, 0, f ); + compile_condition( parse->right, c, 1, label ); + compile_set_label( c, f ); + } + else + { + compile_condition( parse->left, c, 0, label ); + compile_condition( parse->right, c, 0, label ); + } + break; + + case EXPR_OR: + if ( branch_true ) + { + compile_condition( parse->left, c, 1, label ); + compile_condition( parse->right, c, 1, label ); + } + else + { + int32_t t = compile_new_label( c ); + compile_condition( parse->left, c, 1, t ); + compile_condition( parse->right, c, 0, label ); + compile_set_label( c, t ); + } + break; + + case EXPR_NOT: + compile_condition( parse->left, c, !branch_true, label ); + break; + } +} + +static void adjust_result( compiler * c, int32_t actual_location, + int32_t desired_location ) +{ + if ( actual_location == desired_location ) + ; + else if ( actual_location == RESULT_STACK && desired_location == RESULT_RETURN ) + compile_emit( c, INSTR_SET_RESULT, 0 ); + else if ( actual_location == RESULT_STACK && desired_location == RESULT_NONE ) + compile_emit( c, INSTR_POP, 0 ); + else if ( actual_location == RESULT_RETURN && desired_location == RESULT_STACK ) + compile_emit( c, INSTR_PUSH_RESULT, 0 ); + else if ( actual_location == RESULT_RETURN && desired_location == RESULT_NONE ) + ; + else if ( actual_location == RESULT_NONE && desired_location == RESULT_STACK ) + compile_emit( c, INSTR_PUSH_EMPTY, 0 ); + else if ( actual_location == RESULT_NONE && desired_location == RESULT_RETURN ) + { + compile_emit( c, INSTR_PUSH_EMPTY, 0 ); + compile_emit( c, INSTR_SET_RESULT, 0 ); + } + else + assert( !"invalid result location" ); +} + +static void compile_append_chain( PARSE * parse, compiler * c ) +{ + assert( parse->type == PARSE_APPEND ); + if ( parse->left->type == PARSE_NULL ) + compile_parse( parse->right, c, RESULT_STACK ); + else + { + if ( parse->left->type == PARSE_APPEND ) + compile_append_chain( parse->left, c ); + else + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit( c, INSTR_PUSH_APPEND, 0 ); + } +} + +static void compile_emit_debug(compiler * c, int32_t line) +{ +#ifdef JAM_DEBUGGER + if ( debug_is_debugging() ) + compile_emit( c, INSTR_DEBUG_LINE, line ); +#endif +} + +static void compile_parse( PARSE * parse, compiler * c, int32_t result_location ) +{ + compile_emit_debug(c, parse->line); + if ( parse->type == PARSE_APPEND ) + { + compile_append_chain( parse, c ); + adjust_result( c, RESULT_STACK, result_location ); + } + else if ( parse->type == PARSE_EVAL ) + { + /* FIXME: This is only needed because of the bizarre parsing of + * conditions. + */ + if ( parse->num == EXPR_EXISTS ) + compile_parse( parse->left, c, result_location ); + else + { + int32_t f = compile_new_label( c ); + int32_t end = compile_new_label( c ); + + out_printf( "%s:%d: Conditional used as list (check operator " + "precedence).\n", object_str( parse->file ), parse->line ); + + /* Emit the condition */ + compile_condition( parse, c, 0, f ); + compile_emit( c, INSTR_PUSH_CONSTANT, compile_emit_constant( c, + constant_true ) ); + compile_emit_branch( c, INSTR_JUMP, end ); + compile_set_label( c, f ); + compile_emit( c, INSTR_PUSH_EMPTY, 0 ); + compile_set_label( c, end ); + adjust_result( c, RESULT_STACK, result_location ); + } + } + else if ( parse->type == PARSE_FOREACH ) + { + int32_t var = compile_emit_constant( c, parse->string ); + int32_t top = compile_new_label( c ); + int32_t end = compile_new_label( c ); + int32_t continue_ = compile_new_label( c ); + + /* + * Evaluate the list. + */ + compile_parse( parse->left, c, RESULT_STACK ); + + /* Localize the loop variable */ + if ( parse->num ) + { + compile_emit( c, INSTR_PUSH_EMPTY, 0 ); + compile_emit( c, INSTR_PUSH_LOCAL, var ); + compile_emit( c, INSTR_SWAP, 1 ); + compile_push_cleanup( c, INSTR_POP_LOCAL, var ); + } + + compile_emit( c, INSTR_FOR_INIT, 0 ); + compile_set_label( c, top ); + compile_emit_branch( c, INSTR_FOR_LOOP, end ); + compile_emit_debug( c, parse->line ); + compile_emit( c, INSTR_SET, var ); + + compile_push_break_scope( c, end ); + compile_push_cleanup( c, INSTR_FOR_POP, 0 ); + compile_push_continue_scope( c, continue_ ); + + /* Run the loop body */ + compile_parse( parse->right, c, RESULT_NONE ); + + compile_pop_continue_scope( c ); + compile_pop_cleanup( c ); + compile_pop_break_scope( c ); + + compile_set_label( c, continue_ ); + compile_emit_branch( c, INSTR_JUMP, top ); + compile_set_label( c, end ); + + if ( parse->num ) + { + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_LOCAL, var ); + } + + adjust_result( c, RESULT_NONE, result_location); + } + else if ( parse->type == PARSE_IF ) + { + int32_t f = compile_new_label( c ); + /* Emit the condition */ + compile_condition( parse->left, c, 0, f ); + /* Emit the if block */ + compile_parse( parse->right, c, result_location ); + if ( parse->third->type != PARSE_NULL || result_location != RESULT_NONE ) + { + /* Emit the else block */ + int32_t end = compile_new_label( c ); + compile_emit_branch( c, INSTR_JUMP, end ); + compile_set_label( c, f ); + compile_parse( parse->third, c, result_location ); + compile_set_label( c, end ); + } + else + compile_set_label( c, f ); + + } + else if ( parse->type == PARSE_WHILE ) + { + int32_t nested_result = result_location == RESULT_NONE + ? RESULT_NONE + : RESULT_RETURN; + int32_t test = compile_new_label( c ); + int32_t top = compile_new_label( c ); + int32_t end = compile_new_label( c ); + /* Make sure that we return an empty list if the loop runs zero times. + */ + adjust_result( c, RESULT_NONE, nested_result ); + /* Jump to the loop test. */ + compile_emit_branch( c, INSTR_JUMP, test ); + compile_set_label( c, top ); + /* Emit the loop body. */ + compile_push_break_scope( c, end ); + compile_push_continue_scope( c, test ); + compile_parse( parse->right, c, nested_result ); + compile_pop_continue_scope( c ); + compile_pop_break_scope( c ); + /* Emit the condition. */ + compile_set_label( c, test ); + compile_condition( parse->left, c, 1, top ); + compile_set_label( c, end ); + + adjust_result( c, nested_result, result_location ); + } + else if ( parse->type == PARSE_INCLUDE ) + { + compile_parse( parse->left, c, RESULT_STACK ); + compile_emit( c, INSTR_INCLUDE, 0 ); + compile_emit( c, INSTR_BIND_MODULE_VARIABLES, 0 ); + adjust_result( c, RESULT_NONE, result_location ); + } + else if ( parse->type == PARSE_MODULE ) + { + int32_t const nested_result = result_location == RESULT_NONE + ? RESULT_NONE + : RESULT_RETURN; + compile_parse( parse->left, c, RESULT_STACK ); + compile_emit( c, INSTR_PUSH_MODULE, 0 ); + compile_push_cleanup( c, INSTR_POP_MODULE, 0 ); + compile_parse( parse->right, c, nested_result ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_MODULE, 0 ); + adjust_result( c, nested_result, result_location ); + } + else if ( parse->type == PARSE_CLASS ) + { + /* Evaluate the class name. */ + compile_parse( parse->left->right, c, RESULT_STACK ); + /* Evaluate the base classes. */ + if ( parse->left->left ) + compile_parse( parse->left->left->right, c, RESULT_STACK ); + else + compile_emit( c, INSTR_PUSH_EMPTY, 0 ); + compile_emit( c, INSTR_CLASS, 0 ); + compile_push_cleanup( c, INSTR_POP_MODULE, 0 ); + compile_parse( parse->right, c, RESULT_NONE ); + compile_emit( c, INSTR_BIND_MODULE_VARIABLES, 0 ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_MODULE, 0 ); + + adjust_result( c, RESULT_NONE, result_location ); + } + else if ( parse->type == PARSE_LIST ) + { + OBJECT * const o = parse->string; + char const * s = object_str( o ); + VAR_PARSE_GROUP * group; + current_file = object_str( parse->file ); + current_line = parse->line; + group = parse_expansion( &s ); + var_parse_group_compile( group, c ); + var_parse_group_free( group ); + adjust_result( c, RESULT_STACK, result_location ); + } + else if ( parse->type == PARSE_LOCAL ) + { + int32_t nested_result = result_location == RESULT_NONE + ? RESULT_NONE + : RESULT_RETURN; + /* This should be left recursive group of compile_appends. */ + PARSE * vars = parse->left; + + /* Special case an empty list of vars */ + if ( vars->type == PARSE_NULL ) + { + compile_parse( parse->right, c, RESULT_NONE ); + compile_parse( parse->third, c, result_location ); + nested_result = result_location; + } + /* Check whether there is exactly one variable with a constant name. */ + else if ( vars->left->type == PARSE_NULL && + vars->right->type == PARSE_LIST ) + { + char const * s = object_str( vars->right->string ); + VAR_PARSE_GROUP * group; + current_file = object_str( parse->file ); + current_line = parse->line; + group = parse_expansion( &s ); + if ( group->elems->size == 1 && dynamic_array_at( VAR_PARSE *, + group->elems, 0 )->type == VAR_PARSE_TYPE_STRING ) + { + int32_t const name = compile_emit_constant( c, ( + (VAR_PARSE_STRING *)dynamic_array_at( VAR_PARSE *, + group->elems, 0 ) )->s ); + var_parse_group_free( group ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit_debug(c, parse->line); + compile_emit( c, INSTR_PUSH_LOCAL, name ); + compile_push_cleanup( c, INSTR_POP_LOCAL, name ); + compile_parse( parse->third, c, nested_result ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_LOCAL, name ); + } + else + { + var_parse_group_compile( group, c ); + var_parse_group_free( group ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit_debug(c, parse->line); + compile_emit( c, INSTR_PUSH_LOCAL_GROUP, 0 ); + compile_push_cleanup( c, INSTR_POP_LOCAL_GROUP, 0 ); + compile_parse( parse->third, c, nested_result ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_LOCAL_GROUP, 0 ); + } + } + else + { + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit_debug(c, parse->line); + compile_emit( c, INSTR_PUSH_LOCAL_GROUP, 0 ); + compile_push_cleanup( c, INSTR_POP_LOCAL_GROUP, 0 ); + compile_parse( parse->third, c, nested_result ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_LOCAL_GROUP, 0 ); + } + adjust_result( c, nested_result, result_location ); + } + else if ( parse->type == PARSE_ON ) + { + if ( parse->right->type == PARSE_APPEND && + parse->right->left->type == PARSE_NULL && + parse->right->right->type == PARSE_LIST ) + { + /* [ on $(target) return $(variable) ] */ + PARSE * value = parse->right->right; + OBJECT * const o = value->string; + char const * s = object_str( o ); + VAR_PARSE_GROUP * group; + OBJECT * varname = 0; + current_file = object_str( value->file ); + current_line = value->line; + group = parse_expansion( &s ); + if ( group->elems->size == 1 ) + { + VAR_PARSE * one = dynamic_array_at( VAR_PARSE *, group->elems, 0 ); + if ( one->type == VAR_PARSE_TYPE_VAR ) + { + VAR_PARSE_VAR * var = ( VAR_PARSE_VAR * )one; + if ( var->modifiers->size == 0 && !var->subscript && var->name->elems->size == 1 ) + { + VAR_PARSE * name = dynamic_array_at( VAR_PARSE *, var->name->elems, 0 ); + if ( name->type == VAR_PARSE_TYPE_STRING ) + { + varname = ( ( VAR_PARSE_STRING * )name )->s; + } + } + } + } + if ( varname ) + { + /* We have one variable with a fixed name and no modifiers. */ + compile_parse( parse->left, c, RESULT_STACK ); + compile_emit( c, INSTR_GET_ON, compile_emit_constant( c, varname ) ); + } + else + { + /* Too complex. Fall back on push/pop. */ + int32_t end = compile_new_label( c ); + compile_parse( parse->left, c, RESULT_STACK ); + compile_emit_branch( c, INSTR_PUSH_ON, end ); + compile_push_cleanup( c, INSTR_POP_ON, 0 ); + var_parse_group_compile( group, c ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_ON, 0 ); + compile_set_label( c, end ); + } + var_parse_group_free( group ); + } + else + { + int32_t end = compile_new_label( c ); + compile_parse( parse->left, c, RESULT_STACK ); + compile_emit_branch( c, INSTR_PUSH_ON, end ); + compile_push_cleanup( c, INSTR_POP_ON, 0 ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_pop_cleanup( c ); + compile_emit( c, INSTR_POP_ON, 0 ); + compile_set_label( c, end ); + } + adjust_result( c, RESULT_STACK, result_location ); + } + else if ( parse->type == PARSE_RULE ) + { + PARSE * p; + int32_t n = 0; + VAR_PARSE_GROUP * group; + char const * s = object_str( parse->string ); + + if ( parse->left->left || parse->left->right->type != PARSE_NULL ) + for ( p = parse->left; p; p = p->left ) + { + compile_parse( p->right, c, RESULT_STACK ); + ++n; + } + + current_file = object_str( parse->file ); + current_line = parse->line; + group = parse_expansion( &s ); + + if ( group->elems->size == 2 && + dynamic_array_at( VAR_PARSE *, group->elems, 0 )->type == VAR_PARSE_TYPE_VAR && + dynamic_array_at( VAR_PARSE *, group->elems, 1 )->type == VAR_PARSE_TYPE_STRING && + ( object_str( ( (VAR_PARSE_STRING *)dynamic_array_at( VAR_PARSE *, group->elems, 1 ) )->s )[ 0 ] == '.' ) ) + { + VAR_PARSE_STRING * access = (VAR_PARSE_STRING *)dynamic_array_at( VAR_PARSE *, group->elems, 1 ); + OBJECT * member = object_new( object_str( access->s ) + 1 ); + /* Emit the object */ + var_parse_var_compile( (VAR_PARSE_VAR *)dynamic_array_at( VAR_PARSE *, group->elems, 0 ), c ); + var_parse_group_free( group ); + compile_emit( c, INSTR_CALL_MEMBER_RULE, n ); + compile_emit( c, compile_emit_constant( c, member ), parse->line ); + object_free( member ); + } + else + { + var_parse_group_compile( group, c ); + var_parse_group_free( group ); + compile_emit( c, INSTR_CALL_RULE, n ); + compile_emit( c, compile_emit_constant( c, parse->string ), parse->line ); + } + + adjust_result( c, RESULT_STACK, result_location ); + } + else if ( parse->type == PARSE_RULES ) + { + do compile_parse( parse->left, c, RESULT_NONE ); + while ( ( parse = parse->right )->type == PARSE_RULES ); + compile_parse( parse, c, result_location ); + } + else if ( parse->type == PARSE_SET ) + { + PARSE * vars = parse->left; + uint32_t op_code; + uint32_t op_code_group; + + switch ( parse->num ) + { + case ASSIGN_APPEND: op_code = INSTR_APPEND; op_code_group = INSTR_APPEND_GROUP; break; + case ASSIGN_DEFAULT: op_code = INSTR_DEFAULT; op_code_group = INSTR_DEFAULT_GROUP; break; + default: op_code = INSTR_SET; op_code_group = INSTR_SET_GROUP; break; + } + + /* Check whether there is exactly one variable with a constant name. */ + if ( vars->type == PARSE_LIST ) + { + char const * s = object_str( vars->string ); + VAR_PARSE_GROUP * group; + current_file = object_str( parse->file ); + current_line = parse->line; + group = parse_expansion( &s ); + if ( group->elems->size == 1 && dynamic_array_at( VAR_PARSE *, + group->elems, 0 )->type == VAR_PARSE_TYPE_STRING ) + { + int32_t const name = compile_emit_constant( c, ( + (VAR_PARSE_STRING *)dynamic_array_at( VAR_PARSE *, + group->elems, 0 ) )->s ); + var_parse_group_free( group ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit_debug(c, parse->line); + if ( result_location != RESULT_NONE ) + { + compile_emit( c, INSTR_SET_RESULT, 1 ); + } + compile_emit( c, op_code, name ); + } + else + { + var_parse_group_compile( group, c ); + var_parse_group_free( group ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit_debug(c, parse->line); + if ( result_location != RESULT_NONE ) + { + compile_emit( c, INSTR_SET_RESULT, 1 ); + } + compile_emit( c, op_code_group, 0 ); + } + } + else + { + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + compile_emit_debug(c, parse->line); + if ( result_location != RESULT_NONE ) + { + compile_emit( c, INSTR_SET_RESULT, 1 ); + } + compile_emit( c, op_code_group, 0 ); + } + if ( result_location != RESULT_NONE ) + { + adjust_result( c, RESULT_RETURN, result_location ); + } + } + else if ( parse->type == PARSE_SETCOMP ) + { + int32_t n_args; + struct arg_list * args = arg_list_compile( parse->right, &n_args ); + int32_t const rule_id = compile_emit_rule( c, parse->string, parse->left, + n_args, args, parse->num ); + compile_emit( c, INSTR_RULE, rule_id ); + adjust_result( c, RESULT_NONE, result_location ); + } + else if ( parse->type == PARSE_SETEXEC ) + { + int32_t const actions_id = compile_emit_actions( c, parse ); + compile_parse( parse->left, c, RESULT_STACK ); + compile_emit( c, INSTR_ACTIONS, actions_id ); + adjust_result( c, RESULT_NONE, result_location ); + } + else if ( parse->type == PARSE_SETTINGS ) + { + compile_parse( parse->left, c, RESULT_STACK ); + compile_parse( parse->third, c, RESULT_STACK ); + compile_parse( parse->right, c, RESULT_STACK ); + + compile_emit_debug(c, parse->line); + switch ( parse->num ) + { + case ASSIGN_APPEND: compile_emit( c, INSTR_APPEND_ON, 0 ); break; + case ASSIGN_DEFAULT: compile_emit( c, INSTR_DEFAULT_ON, 0 ); break; + default: compile_emit( c, INSTR_SET_ON, 0 ); break; + } + + adjust_result( c, RESULT_STACK, result_location ); + } + else if ( parse->type == PARSE_SWITCH ) + { + int32_t const switch_end = compile_new_label( c ); + compile_parse( parse->left, c, RESULT_STACK ); + + for ( parse = parse->right; parse; parse = parse->right ) + { + int32_t const id = compile_emit_constant( c, parse->left->string ); + int32_t const next_case = compile_new_label( c ); + compile_emit( c, INSTR_PUSH_CONSTANT, id ); + compile_emit_branch( c, INSTR_JUMP_NOT_GLOB, next_case ); + compile_parse( parse->left->left, c, result_location ); + compile_emit_branch( c, INSTR_JUMP, switch_end ); + compile_set_label( c, next_case ); + } + compile_emit( c, INSTR_POP, 0 ); + adjust_result( c, RESULT_NONE, result_location ); + compile_set_label( c, switch_end ); + } + else if ( parse->type == PARSE_RETURN ) + { + compile_parse( parse->left, c, RESULT_RETURN ); + compile_emit_cleanups( c, 0 ); + compile_emit( c, INSTR_RETURN, 0 ); /* 0 for return in the middle of a function. */ + } + else if ( parse->type == PARSE_BREAK ) + { + compile_emit_loop_jump( c, LOOP_INFO_BREAK ); + } + else if ( parse->type == PARSE_CONTINUE ) + { + compile_emit_loop_jump( c, LOOP_INFO_CONTINUE ); + } + else if ( parse->type == PARSE_NULL ) + adjust_result( c, RESULT_NONE, result_location ); + else + assert( !"unknown PARSE type." ); +} + +OBJECT * function_rulename( FUNCTION * function ) +{ + return function->rulename; +} + +void function_set_rulename( FUNCTION * function, OBJECT * rulename ) +{ + function->rulename = rulename; +} + +void function_location( FUNCTION * function_, OBJECT * * file, int32_t * line ) +{ + if ( function_->type == FUNCTION_BUILTIN ) + { + *file = constant_builtin; + *line = -1; + } +#ifdef HAVE_PYTHON + if ( function_->type == FUNCTION_PYTHON ) + { + *file = constant_builtin; + *line = -1; + } +#endif + else + { + JAM_FUNCTION * function = (JAM_FUNCTION *)function_; + assert( function_->type == FUNCTION_JAM ); + *file = function->file; + *line = function->line; + } +} + +static struct arg_list * arg_list_compile_builtin( char const * * args, + int32_t * num_arguments ); + +FUNCTION * function_builtin( LIST * ( * func )( FRAME * frame, int32_t flags ), + int32_t flags, char const * * args ) +{ + BUILTIN_FUNCTION * result = (BUILTIN_FUNCTION*)BJAM_MALLOC( sizeof( BUILTIN_FUNCTION ) ); + result->base.type = FUNCTION_BUILTIN; + result->base.reference_count = 1; + result->base.rulename = 0; + result->base.formal_arguments = arg_list_compile_builtin( args, + &result->base.num_formal_arguments ); + result->func = func; + result->flags = flags; + return (FUNCTION *)result; +} + +FUNCTION * function_compile( PARSE * parse ) +{ + compiler c[ 1 ]; + JAM_FUNCTION * result; + compiler_init( c ); + compile_parse( parse, c, RESULT_RETURN ); + compile_emit( c, INSTR_RETURN, 1 ); + result = compile_to_function( c ); + compiler_free( c ); + result->file = object_copy( parse->file ); + result->line = parse->line; + return (FUNCTION *)result; +} + +FUNCTION * function_compile_actions( char const * actions, OBJECT * file, + int32_t line ) +{ + compiler c[ 1 ]; + JAM_FUNCTION * result; + VAR_PARSE_ACTIONS * parse; + current_file = object_str( file ); + current_line = line; + parse = parse_actions( actions ); + compiler_init( c ); + var_parse_actions_compile( parse, c ); + var_parse_actions_free( parse ); + compile_emit( c, INSTR_RETURN, 1 ); + result = compile_to_function( c ); + compiler_free( c ); + result->file = object_copy( file ); + result->line = line; + return (FUNCTION *)result; +} + +static void argument_list_print( struct arg_list * args, int32_t num_args ); + + +/* Define delimiters for type check elements in argument lists (and return type + * specifications, eventually). + */ +# define TYPE_OPEN_DELIM '[' +# define TYPE_CLOSE_DELIM ']' + +/* + * is_type_name() - true iff the given string represents a type check + * specification. + */ + +int32_t is_type_name( char const * s ) +{ + return s[ 0 ] == TYPE_OPEN_DELIM && s[ strlen( s ) - 1 ] == + TYPE_CLOSE_DELIM; +} + +static void argument_error( char const * message, FUNCTION * procedure, + FRAME * frame, OBJECT * arg ) +{ + extern void print_source_line( FRAME * ); + LOL * actual = frame->args; + backtrace_line( frame->prev ); + out_printf( "*** argument error\n* rule %s ( ", frame->rulename ); + argument_list_print( procedure->formal_arguments, + procedure->num_formal_arguments ); + out_printf( " )\n* called with: ( " ); + lol_print( actual ); + out_printf( " )\n* %s %s\n", message, arg ? object_str ( arg ) : "" ); + function_location( procedure, &frame->file, &frame->line ); + print_source_line( frame ); + out_printf( "see definition of rule '%s' being called\n", frame->rulename ); + backtrace( frame->prev ); + b2::clean_exit( EXITBAD ); +} + +static void type_check_range( OBJECT * type_name, LISTITER iter, LISTITER end, + FRAME * caller, FUNCTION * called, OBJECT * arg_name ) +{ + static module_t * typecheck = 0; + + /* If nothing to check, bail now. */ + if ( iter == end || !type_name ) + return; + + if ( !typecheck ) + typecheck = bindmodule( constant_typecheck ); + + /* If the checking rule can not be found, also bail. */ + if ( !typecheck->rules || !hash_find( typecheck->rules, type_name ) ) + return; + + for ( ; iter != end; iter = list_next( iter ) ) + { + LIST * error; + FRAME frame[ 1 ]; + frame_init( frame ); + frame->module = typecheck; + frame->prev = caller; + frame->prev_user = caller->module->user_module + ? caller + : caller->prev_user; + + /* Prepare the argument list */ + lol_add( frame->args, list_new( object_copy( list_item( iter ) ) ) ); + error = evaluate_rule( bindrule( type_name, frame->module ), type_name, frame ); + + if ( !list_empty( error ) ) + argument_error( object_str( list_front( error ) ), called, caller, + arg_name ); + + frame_free( frame ); + } +} + +static void type_check( OBJECT * type_name, LIST * values, FRAME * caller, + FUNCTION * called, OBJECT * arg_name ) +{ + type_check_range( type_name, list_begin( values ), list_end( values ), + caller, called, arg_name ); +} + +void argument_list_check( struct arg_list * formal, int32_t formal_count, + FUNCTION * function, FRAME * frame ) +{ + LOL * all_actual = frame->args; + int32_t i; + + for ( i = 0; i < formal_count; ++i ) + { + LIST * actual = lol_get( all_actual, i ); + LISTITER actual_iter = list_begin( actual ); + LISTITER const actual_end = list_end( actual ); + int32_t j; + for ( j = 0; j < formal[ i ].size; ++j ) + { + struct argument * formal_arg = &formal[ i ].args[ j ]; + + switch ( formal_arg->flags ) + { + case ARG_ONE: + if ( actual_iter == actual_end ) + argument_error( "missing argument", function, frame, + formal_arg->arg_name ); + type_check_range( formal_arg->type_name, actual_iter, + list_next( actual_iter ), frame, function, + formal_arg->arg_name ); + actual_iter = list_next( actual_iter ); + break; + case ARG_OPTIONAL: + if ( actual_iter != actual_end ) + { + type_check_range( formal_arg->type_name, actual_iter, + list_next( actual_iter ), frame, function, + formal_arg->arg_name ); + actual_iter = list_next( actual_iter ); + } + break; + case ARG_PLUS: + if ( actual_iter == actual_end ) + argument_error( "missing argument", function, frame, + formal_arg->arg_name ); + /* fallthrough */ + case ARG_STAR: + type_check_range( formal_arg->type_name, actual_iter, + actual_end, frame, function, formal_arg->arg_name ); + actual_iter = actual_end; + break; + case ARG_VARIADIC: + return; + } + } + + if ( actual_iter != actual_end ) + argument_error( "extra argument", function, frame, list_item( + actual_iter ) ); + } + + for ( ; i < all_actual->count; ++i ) + { + LIST * actual = lol_get( all_actual, i ); + if ( !list_empty( actual ) ) + argument_error( "extra argument", function, frame, list_front( + actual ) ); + } +} + +void argument_list_push( struct arg_list * formal, int32_t formal_count, + FUNCTION * function, FRAME * frame, STACK * s ) +{ + LOL * all_actual = frame->args; + int32_t i; + + for ( i = 0; i < formal_count; ++i ) + { + LIST * actual = lol_get( all_actual, i ); + LISTITER actual_iter = list_begin( actual ); + LISTITER const actual_end = list_end( actual ); + int32_t j; + for ( j = 0; j < formal[ i ].size; ++j ) + { + struct argument * formal_arg = &formal[ i ].args[ j ]; + LIST * value = L0; + + switch ( formal_arg->flags ) + { + case ARG_ONE: + if ( actual_iter == actual_end ) + argument_error( "missing argument", function, frame, + formal_arg->arg_name ); + value = list_new( object_copy( list_item( actual_iter ) ) ); + actual_iter = list_next( actual_iter ); + break; + case ARG_OPTIONAL: + if ( actual_iter == actual_end ) + value = L0; + else + { + value = list_new( object_copy( list_item( actual_iter ) ) ); + actual_iter = list_next( actual_iter ); + } + break; + case ARG_PLUS: + if ( actual_iter == actual_end ) + argument_error( "missing argument", function, frame, + formal_arg->arg_name ); + /* fallthrough */ + case ARG_STAR: + value = list_copy_range( actual, actual_iter, actual_end ); + actual_iter = actual_end; + break; + case ARG_VARIADIC: + return; + } + + type_check( formal_arg->type_name, value, frame, function, + formal_arg->arg_name ); + + if ( formal_arg->index != -1 ) + { + LIST * * const old = &frame->module->fixed_variables[ + formal_arg->index ]; + stack_push( s, *old ); + *old = value; + } + else + stack_push( s, var_swap( frame->module, formal_arg->arg_name, + value ) ); + } + + if ( actual_iter != actual_end ) + argument_error( "extra argument", function, frame, list_item( + actual_iter ) ); + } + + for ( ; i < all_actual->count; ++i ) + { + LIST * const actual = lol_get( all_actual, i ); + if ( !list_empty( actual ) ) + argument_error( "extra argument", function, frame, list_front( + actual ) ); + } +} + +void argument_list_pop( struct arg_list * formal, int32_t formal_count, + FRAME * frame, STACK * s ) +{ + int32_t i; + for ( i = formal_count - 1; i >= 0; --i ) + { + int32_t j; + for ( j = formal[ i ].size - 1; j >= 0 ; --j ) + { + struct argument * formal_arg = &formal[ i ].args[ j ]; + + if ( formal_arg->flags == ARG_VARIADIC ) + continue; + if ( formal_arg->index != -1 ) + { + LIST * const old = stack_pop( s ); + LIST * * const pos = &frame->module->fixed_variables[ + formal_arg->index ]; + list_free( *pos ); + *pos = old; + } + else + var_set( frame->module, formal_arg->arg_name, stack_pop( s ), + VAR_SET ); + } + } +} + + +struct argument_compiler +{ + struct dynamic_array args[ 1 ]; + struct argument arg; + int32_t state; +#define ARGUMENT_COMPILER_START 0 +#define ARGUMENT_COMPILER_FOUND_TYPE 1 +#define ARGUMENT_COMPILER_FOUND_OBJECT 2 +#define ARGUMENT_COMPILER_DONE 3 +}; + + +static void argument_compiler_init( struct argument_compiler * c ) +{ + dynamic_array_init( c->args ); + c->state = ARGUMENT_COMPILER_START; +} + +static void argument_compiler_free( struct argument_compiler * c ) +{ + dynamic_array_free( c->args ); +} + +static void argument_compiler_add( struct argument_compiler * c, OBJECT * arg, + OBJECT * file, int32_t line ) +{ + switch ( c->state ) + { + case ARGUMENT_COMPILER_FOUND_OBJECT: + + if ( object_equal( arg, constant_question_mark ) ) + { + c->arg.flags = ARG_OPTIONAL; + } + else if ( object_equal( arg, constant_plus ) ) + { + c->arg.flags = ARG_PLUS; + } + else if ( object_equal( arg, constant_star ) ) + { + c->arg.flags = ARG_STAR; + } + + dynamic_array_push( c->args, c->arg ); + c->state = ARGUMENT_COMPILER_START; + + if ( c->arg.flags != ARG_ONE ) + break; + /* fall-through */ + + case ARGUMENT_COMPILER_START: + + c->arg.type_name = 0; + c->arg.index = -1; + c->arg.flags = ARG_ONE; + + if ( is_type_name( object_str( arg ) ) ) + { + c->arg.type_name = object_copy( arg ); + c->state = ARGUMENT_COMPILER_FOUND_TYPE; + break; + } + /* fall-through */ + + case ARGUMENT_COMPILER_FOUND_TYPE: + + if ( is_type_name( object_str( arg ) ) ) + { + err_printf( "%s:%d: missing argument name before type name: %s\n", + object_str( file ), line, object_str( arg ) ); + b2::clean_exit( EXITBAD ); + } + + c->arg.arg_name = object_copy( arg ); + if ( object_equal( arg, constant_star ) ) + { + c->arg.flags = ARG_VARIADIC; + dynamic_array_push( c->args, c->arg ); + c->state = ARGUMENT_COMPILER_DONE; + } + else + { + c->state = ARGUMENT_COMPILER_FOUND_OBJECT; + } + break; + + case ARGUMENT_COMPILER_DONE: + break; + } +} + +static void argument_compiler_recurse( struct argument_compiler * c, + PARSE * parse ) +{ + if ( parse->type == PARSE_APPEND ) + { + argument_compiler_recurse( c, parse->left ); + argument_compiler_recurse( c, parse->right ); + } + else if ( parse->type != PARSE_NULL ) + { + assert( parse->type == PARSE_LIST ); + argument_compiler_add( c, parse->string, parse->file, parse->line ); + } +} + +static struct arg_list arg_compile_impl( struct argument_compiler * c, + OBJECT * file, int32_t line ) +{ + struct arg_list result; + switch ( c->state ) + { + case ARGUMENT_COMPILER_START: + case ARGUMENT_COMPILER_DONE: + break; + case ARGUMENT_COMPILER_FOUND_TYPE: + err_printf( "%s:%d: missing argument name after type name: %s\n", + object_str( file ), line, object_str( c->arg.type_name ) ); + b2::clean_exit( EXITBAD ); + case ARGUMENT_COMPILER_FOUND_OBJECT: + dynamic_array_push( c->args, c->arg ); + break; + } + result.size = c->args->size; + result.args = (struct argument*)BJAM_MALLOC( c->args->size * sizeof( struct argument ) ); + if ( c->args->size != 0 ) + memcpy( result.args, c->args->data, + c->args->size * sizeof( struct argument ) ); + return result; +} + +static struct arg_list arg_compile( PARSE * parse ) +{ + struct argument_compiler c[ 1 ]; + struct arg_list result; + argument_compiler_init( c ); + argument_compiler_recurse( c, parse ); + result = arg_compile_impl( c, parse->file, parse->line ); + argument_compiler_free( c ); + return result; +} + +struct argument_list_compiler +{ + struct dynamic_array args[ 1 ]; +}; + +static void argument_list_compiler_init( struct argument_list_compiler * c ) +{ + dynamic_array_init( c->args ); +} + +static void argument_list_compiler_free( struct argument_list_compiler * c ) +{ + dynamic_array_free( c->args ); +} + +static void argument_list_compiler_add( struct argument_list_compiler * c, + PARSE * parse ) +{ + struct arg_list args = arg_compile( parse ); + dynamic_array_push( c->args, args ); +} + +static void argument_list_compiler_recurse( struct argument_list_compiler * c, + PARSE * parse ) +{ + if ( parse ) + { + argument_list_compiler_add( c, parse->right ); + argument_list_compiler_recurse( c, parse->left ); + } +} + +static struct arg_list * arg_list_compile( PARSE * parse, int32_t * num_arguments ) +{ + if ( parse ) + { + struct argument_list_compiler c[ 1 ]; + struct arg_list * result; + argument_list_compiler_init( c ); + argument_list_compiler_recurse( c, parse ); + *num_arguments = c->args->size; + result = (struct arg_list*)BJAM_MALLOC( c->args->size * sizeof( struct arg_list ) ); + memcpy( result, c->args->data, c->args->size * sizeof( struct arg_list ) + ); + argument_list_compiler_free( c ); + return result; + } + *num_arguments = 0; + return 0; +} + +static struct arg_list * arg_list_compile_builtin( char const * * args, + int32_t * num_arguments ) +{ + if ( args ) + { + struct argument_list_compiler c[ 1 ]; + struct arg_list * result; + argument_list_compiler_init( c ); + while ( *args ) + { + struct argument_compiler arg_comp[ 1 ]; + struct arg_list arg; + argument_compiler_init( arg_comp ); + for ( ; *args; ++args ) + { + OBJECT * token; + if ( strcmp( *args, ":" ) == 0 ) + { + ++args; + break; + } + token = object_new( *args ); + argument_compiler_add( arg_comp, token, constant_builtin, -1 ); + object_free( token ); + } + arg = arg_compile_impl( arg_comp, constant_builtin, -1 ); + dynamic_array_push( c->args, arg ); + argument_compiler_free( arg_comp ); + } + *num_arguments = c->args->size; + result = (struct arg_list *)BJAM_MALLOC( c->args->size * sizeof( struct arg_list ) ); + if ( c->args->size != 0 ) + memcpy( result, c->args->data, + c->args->size * sizeof( struct arg_list ) ); + argument_list_compiler_free( c ); + return result; + } + *num_arguments = 0; + return 0; +} + +static void argument_list_print( struct arg_list * args, int32_t num_args ) +{ + if ( args ) + { + int32_t i; + for ( i = 0; i < num_args; ++i ) + { + int32_t j; + if ( i ) out_printf( " : " ); + for ( j = 0; j < args[ i ].size; ++j ) + { + struct argument * formal_arg = &args[ i ].args[ j ]; + if ( j ) out_printf( " " ); + if ( formal_arg->type_name ) + out_printf( "%s ", object_str( formal_arg->type_name ) ); + out_printf( "%s", object_str( formal_arg->arg_name ) ); + switch ( formal_arg->flags ) + { + case ARG_OPTIONAL: out_printf( " ?" ); break; + case ARG_PLUS: out_printf( " +" ); break; + case ARG_STAR: out_printf( " *" ); break; + } + } + } + } +} + + +struct arg_list * argument_list_bind_variables( struct arg_list * formal, + int32_t formal_count, module_t * module, int32_t * counter ) +{ + if ( formal ) + { + struct arg_list * result = (struct arg_list *)BJAM_MALLOC( sizeof( + struct arg_list ) * formal_count ); + int32_t i; + + for ( i = 0; i < formal_count; ++i ) + { + int32_t j; + struct argument * args = (struct argument *)BJAM_MALLOC( sizeof( + struct argument ) * formal[ i ].size ); + for ( j = 0; j < formal[ i ].size; ++j ) + { + args[ j ] = formal[ i ].args[ j ]; + if ( args[ j ].type_name ) + args[ j ].type_name = object_copy( args[ j ].type_name ); + args[ j ].arg_name = object_copy( args[ j ].arg_name ); + if ( args[ j ].flags != ARG_VARIADIC ) + args[ j ].index = module_add_fixed_var( module, + args[ j ].arg_name, counter ); + } + result[ i ].args = args; + result[ i ].size = formal[ i ].size; + } + + return result; + } + return 0; +} + + +void argument_list_free( struct arg_list * args, int32_t args_count ) +{ + int32_t i; + for ( i = 0; i < args_count; ++i ) + { + int32_t j; + for ( j = 0; j < args[ i ].size; ++j ) + { + if ( args[ i ].args[ j ].type_name ) + object_free( args[ i ].args[ j ].type_name ); + object_free( args[ i ].args[ j ].arg_name ); + } + BJAM_FREE( args[ i ].args ); + } + BJAM_FREE( args ); +} + + +FUNCTION * function_unbind_variables( FUNCTION * f ) +{ + if ( f->type == FUNCTION_JAM ) + { + JAM_FUNCTION * const func = (JAM_FUNCTION *)f; + return func->generic ? func->generic : f; + } +#ifdef HAVE_PYTHON + if ( f->type == FUNCTION_PYTHON ) + return f; +#endif + assert( f->type == FUNCTION_BUILTIN ); + return f; +} + +FUNCTION * function_bind_variables( FUNCTION * f, module_t * module, + int32_t * counter ) +{ + if ( f->type == FUNCTION_BUILTIN ) + return f; +#ifdef HAVE_PYTHON + if ( f->type == FUNCTION_PYTHON ) + return f; +#endif + { + JAM_FUNCTION * func = (JAM_FUNCTION *)f; + JAM_FUNCTION * new_func = (JAM_FUNCTION *)BJAM_MALLOC( sizeof( JAM_FUNCTION ) ); + instruction * code; + int32_t i; + assert( f->type == FUNCTION_JAM ); + memcpy( new_func, func, sizeof( JAM_FUNCTION ) ); + new_func->base.reference_count = 1; + new_func->base.formal_arguments = argument_list_bind_variables( + f->formal_arguments, f->num_formal_arguments, module, counter ); + new_func->code = (instruction *)BJAM_MALLOC( func->code_size * sizeof( instruction ) ); + memcpy( new_func->code, func->code, func->code_size * sizeof( + instruction ) ); + new_func->generic = (FUNCTION *)func; + func = new_func; + for ( i = 0; ; ++i ) + { + OBJECT * key; + int32_t op_code; + code = func->code + i; + switch ( code->op_code ) + { + case INSTR_PUSH_VAR: op_code = INSTR_PUSH_VAR_FIXED; break; + case INSTR_PUSH_LOCAL: op_code = INSTR_PUSH_LOCAL_FIXED; break; + case INSTR_POP_LOCAL: op_code = INSTR_POP_LOCAL_FIXED; break; + case INSTR_SET: op_code = INSTR_SET_FIXED; break; + case INSTR_APPEND: op_code = INSTR_APPEND_FIXED; break; + case INSTR_DEFAULT: op_code = INSTR_DEFAULT_FIXED; break; + case INSTR_RETURN: + if( code->arg == 1 ) return (FUNCTION *)new_func; + else continue; + case INSTR_CALL_MEMBER_RULE: + case INSTR_CALL_RULE: ++i; continue; + case INSTR_PUSH_MODULE: + { + int32_t depth = 1; + ++i; + while ( depth > 0 ) + { + code = func->code + i; + switch ( code->op_code ) + { + case INSTR_PUSH_MODULE: + case INSTR_CLASS: + ++depth; + break; + case INSTR_POP_MODULE: + --depth; + break; + case INSTR_CALL_RULE: + ++i; + break; + } + ++i; + } + --i; + } + default: continue; + } + key = func->constants[ code->arg ]; + if ( !( object_equal( key, constant_TMPDIR ) || + object_equal( key, constant_TMPNAME ) || + object_equal( key, constant_TMPFILE ) || + object_equal( key, constant_STDOUT ) || + object_equal( key, constant_STDERR ) ) ) + { + code->op_code = op_code; + code->arg = module_add_fixed_var( module, key, counter ); + } + } + } +} + +LIST * function_get_variables( FUNCTION * f ) +{ + if ( f->type == FUNCTION_BUILTIN ) + return L0; +#ifdef HAVE_PYTHON + if ( f->type == FUNCTION_PYTHON ) + return L0; +#endif + { + JAM_FUNCTION * func = (JAM_FUNCTION *)f; + LIST * result = L0; + instruction * code; + int32_t i; + assert( f->type == FUNCTION_JAM ); + if ( func->generic ) func = ( JAM_FUNCTION * )func->generic; + + for ( i = 0; ; ++i ) + { + OBJECT * var; + code = func->code + i; + switch ( code->op_code ) + { + case INSTR_PUSH_LOCAL: break; + case INSTR_RETURN: return result; + case INSTR_CALL_MEMBER_RULE: + case INSTR_CALL_RULE: ++i; continue; + case INSTR_PUSH_MODULE: + { + int32_t depth = 1; + ++i; + while ( depth > 0 ) + { + code = func->code + i; + switch ( code->op_code ) + { + case INSTR_PUSH_MODULE: + case INSTR_CLASS: + ++depth; + break; + case INSTR_POP_MODULE: + --depth; + break; + case INSTR_CALL_RULE: + ++i; + break; + } + ++i; + } + --i; + } + default: continue; + } + var = func->constants[ code->arg ]; + if ( !( object_equal( var, constant_TMPDIR ) || + object_equal( var, constant_TMPNAME ) || + object_equal( var, constant_TMPFILE ) || + object_equal( var, constant_STDOUT ) || + object_equal( var, constant_STDERR ) ) ) + { + result = list_push_back( result, var ); + } + } + } +} + +void function_refer( FUNCTION * func ) +{ + ++func->reference_count; +} + +void function_free( FUNCTION * function_ ) +{ + int32_t i; + + if ( --function_->reference_count != 0 ) + return; + + if ( function_->formal_arguments ) + argument_list_free( function_->formal_arguments, + function_->num_formal_arguments ); + + if ( function_->type == FUNCTION_JAM ) + { + JAM_FUNCTION * func = (JAM_FUNCTION *)function_; + + BJAM_FREE( func->code ); + + if ( func->generic ) + function_free( func->generic ); + else + { + if ( function_->rulename ) object_free( function_->rulename ); + + for ( i = 0; i < func->num_constants; ++i ) + object_free( func->constants[ i ] ); + BJAM_FREE( func->constants ); + + for ( i = 0; i < func->num_subfunctions; ++i ) + { + object_free( func->functions[ i ].name ); + function_free( func->functions[ i ].code ); + } + BJAM_FREE( func->functions ); + + for ( i = 0; i < func->num_subactions; ++i ) + { + object_free( func->actions[ i ].name ); + function_free( func->actions[ i ].command ); + } + BJAM_FREE( func->actions ); + + object_free( func->file ); + } + } +#ifdef HAVE_PYTHON + else if ( function_->type == FUNCTION_PYTHON ) + { + PYTHON_FUNCTION * func = (PYTHON_FUNCTION *)function_; + Py_DECREF( func->python_function ); + if ( function_->rulename ) object_free( function_->rulename ); + } +#endif + else + { + assert( function_->type == FUNCTION_BUILTIN ); + if ( function_->rulename ) object_free( function_->rulename ); + } + + BJAM_FREE( function_ ); +} + + +/* Alignment check for stack */ + +struct align_var_edits +{ + char ch; + VAR_EDITS e; +}; + +struct align_expansion_item +{ + char ch; + expansion_item e; +}; + +static_assert( + sizeof(struct align_var_edits) <= sizeof(VAR_EDITS) + sizeof(void *), + "sizeof(struct align_var_edits) <= sizeof(VAR_EDITS) + sizeof(void *)" ); +static_assert( + sizeof(struct align_expansion_item) <= sizeof(expansion_item) + sizeof(void *), + "sizeof(struct align_expansion_item) <= sizeof(expansion_item) + sizeof(void *)" ); + +static_assert( sizeof(LIST *) <= sizeof(void *), "sizeof(LIST *) <= sizeof(void *)" ); +static_assert( sizeof(char *) <= sizeof(void *), "sizeof(char *) <= sizeof(void *)" ); + +void function_run_actions( FUNCTION * function, FRAME * frame, STACK * s, + string * out ) +{ + *(string * *)stack_allocate( s, sizeof( string * ) ) = out; + list_free( function_run( function, frame, s ) ); + stack_deallocate( s, sizeof( string * ) ); +} + +// Result is either the filename or contents depending on: +// 1. If the RESPONSE_FILE_SUB == f or not set (it's filename) +// 2. If the RESPONSE_FILE_SUB == c (it's contents) +// 3. If the RESPONSE_FILE_SUB == a (depends on the length of contents) +// Note, returns a *copy* of the filename or contents. +LIST * function_execute_write_file( + JAM_FUNCTION * function, FRAME * frame, STACK * s, + VAR_EXPANDED filename, LIST * contents ) +{ + LIST * filename_or_contents_result = nullptr; + + char response_file_sub_c = 'f'; + if ( filename.opt_file && filename.opt_content ) + { + LIST * response_file_sub = function_get_named_variable( + function, frame, constant_RESPONSE_FILE_SUB ); + if ( response_file_sub && list_front( response_file_sub ) ) + response_file_sub_c = object_str( list_front( response_file_sub ) )[0]; + list_free( response_file_sub ); + const char * contents_str = object_str( list_front( contents ) ); + if ( response_file_sub_c == 'a' ) + { + if ( int32_t( strlen( contents_str ) + 256 ) > shell_maxline() ) + response_file_sub_c = 'f'; + else + response_file_sub_c = 'c'; + } + } + else if ( filename.opt_file ) + response_file_sub_c = 'f'; + else if ( filename.opt_content ) + response_file_sub_c = 'c'; + if ( response_file_sub_c == 'c' ) + { + filename_or_contents_result = list_copy( contents ); + } + else + { + char const * out = object_str( list_front( filename.inner ) ); + OBJECT * tmp_filename = nullptr; + FILE * out_file = nullptr; + bool out_debug = DEBUG_EXEC != 0; + + /* For stdout/stderr we will create a temp file and generate a + * command that outputs the content as needed. + */ + if ( ( strcmp( "STDOUT", out ) == 0 ) || + ( strcmp( "STDERR", out ) == 0 ) ) + { + int32_t err_redir = strcmp( "STDERR", out ) == 0; + string result[ 1 ]; + + tmp_filename = path_tmpfile(); + + /* Construct os-specific cat command. */ + { + const char * command = "cat"; + const char * quote = "\""; + const char * redirect = "1>&2"; + + #ifdef OS_NT + command = "type"; + quote = "\""; + #elif defined( OS_VMS ) + command = "pipe type"; + quote = ""; + + /* Get tmp file name in os-format. */ + { + string os_filename[ 1 ]; + + string_new( os_filename ); + path_translate_to_os( object_str( tmp_filename ), os_filename ); + object_free( tmp_filename ); + tmp_filename = object_new( os_filename->value ); + string_free( os_filename ); + } + #endif + + string_new( result ); + string_append( result, command ); + string_append( result, " " ); + string_append( result, quote ); + string_append( result, object_str( tmp_filename ) ); + string_append( result, quote ); + if ( err_redir ) + { + string_append( result, " " ); + string_append( result, redirect ); + } + } + + /* Replace STDXXX with the temporary file. */ + filename_or_contents_result = list_new( object_new( result->value ) ); + out = object_str( tmp_filename ); + + string_free( result ); + + /* Make sure temp files created by this get nuked eventually. */ + file_remove_atexit( tmp_filename ); + } + else + { + filename_or_contents_result = list_copy( filename.value ); + } + + if ( !globs.noexec ) + { + string out_name[ 1 ]; + /* Handle "path to file" filenames. */ + if ( ( out[ 0 ] == '"' ) && ( out[ strlen( out ) - 1 ] == '"' ) + ) + { + string_copy( out_name, out + 1 ); + string_truncate( out_name, out_name->size - 1 ); + } + else + string_copy( out_name, out ); + out_file = fopen( out_name->value, "w" ); + + if ( !out_file ) + { + err_printf( "[errno %d] failed to write output file '%s': %s", + errno, out_name->value, strerror(errno) ); + b2::clean_exit( EXITBAD ); + } + string_free( out_name ); + } + + if ( out_debug ) out_printf( "\nfile %s\n", out ); + if ( out_file ) fputs( object_str( list_front( contents ) ), out_file ); + if ( out_debug ) out_puts( object_str( list_front( contents ) ) ); + if ( out_file ) + { + fflush( out_file ); + fclose( out_file ); + } + if ( tmp_filename ) + object_free( tmp_filename ); + + if ( out_debug ) out_putc( '\n' ); + } + + return filename_or_contents_result; +} + +/* + * WARNING: The instruction set is tuned for Jam and is not really generic. Be + * especially careful about stack push/pop. + */ + +LIST * function_run( FUNCTION * function_, FRAME * frame, STACK * s ) +{ + JAM_FUNCTION * function; + instruction * code; + LIST * l; + LIST * r; + LIST * result = L0; +#ifndef NDEBUG + void * saved_stack = s->data; +#endif + + PROFILE_ENTER_LOCAL(function_run); + +#ifdef JAM_DEBUGGER + frame->function = function_; +#endif + + if ( function_->type == FUNCTION_BUILTIN ) + { + PROFILE_ENTER_LOCAL(function_run_FUNCTION_BUILTIN); + BUILTIN_FUNCTION const * const f = (BUILTIN_FUNCTION *)function_; + if ( function_->formal_arguments ) + argument_list_check( function_->formal_arguments, + function_->num_formal_arguments, function_, frame ); + + debug_on_enter_function( frame, f->base.rulename, NULL, -1 ); + result = f->func( frame, f->flags ); + debug_on_exit_function( f->base.rulename ); + PROFILE_EXIT_LOCAL(function_run_FUNCTION_BUILTIN); + PROFILE_EXIT_LOCAL(function_run); + return result; + } + +#ifdef HAVE_PYTHON + else if ( function_->type == FUNCTION_PYTHON ) + { + PROFILE_ENTER_LOCAL(function_run_FUNCTION_PYTHON); + PYTHON_FUNCTION * f = (PYTHON_FUNCTION *)function_; + debug_on_enter_function( frame, f->base.rulename, NULL, -1 ); + result = call_python_function( f, frame ); + debug_on_exit_function( f->base.rulename ); + PROFILE_EXIT_LOCAL(function_run_FUNCTION_PYTHON); + PROFILE_EXIT_LOCAL(function_run); + return result; + } +#endif + + assert( function_->type == FUNCTION_JAM ); + + if ( function_->formal_arguments ) + argument_list_push( function_->formal_arguments, + function_->num_formal_arguments, function_, frame, s ); + + function = (JAM_FUNCTION *)function_; + debug_on_enter_function( frame, function->base.rulename, function->file, function->line ); + code = function->code; + for ( ; ; ) + { + switch ( code->op_code ) + { + + /* + * Basic stack manipulation + */ + + case INSTR_PUSH_EMPTY: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_EMPTY); + stack_push( s, L0 ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_EMPTY); + break; + } + + case INSTR_PUSH_CONSTANT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_CONSTANT); + OBJECT * value = function_get_constant( function, code->arg ); + stack_push( s, list_new( object_copy( value ) ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_CONSTANT); + break; + } + + case INSTR_PUSH_ARG: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_ARG); + stack_push( s, frame_get_local( frame, code->arg ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_ARG); + break; + } + + case INSTR_PUSH_VAR: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_VAR); + stack_push( s, function_get_variable( function, frame, code->arg ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_VAR); + break; + } + + case INSTR_PUSH_VAR_FIXED: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_VAR_FIXED); + stack_push( s, list_copy( frame->module->fixed_variables[ code->arg + ] ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_VAR_FIXED); + break; + } + + case INSTR_PUSH_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_GROUP); + LIST * value = L0; + LISTITER iter; + LISTITER end; + l = stack_pop( s ); + for ( iter = list_begin( l ), end = list_end( l ); iter != end; + iter = list_next( iter ) ) + value = list_append( value, function_get_named_variable( + function, frame, list_item( iter ) ) ); + list_free( l ); + stack_push( s, value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_GROUP); + break; + } + + case INSTR_PUSH_APPEND: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_APPEND); + r = stack_pop( s ); + l = stack_pop( s ); + stack_push( s, list_append( l, r ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_APPEND); + break; + } + + case INSTR_SWAP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_SWAP); + l = stack_top( s ); + stack_set( s, 0, stack_at( s, code->arg ) ); + stack_set( s, code->arg, l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_SWAP); + break; + } + + case INSTR_POP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_POP); + list_free( stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_POP); + break; + } + + /* + * Branch instructions + */ + + case INSTR_JUMP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP); + code += code->arg; + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP); + break; + } + + case INSTR_JUMP_EMPTY: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_EMPTY); + l = stack_pop( s ); + if ( !list_cmp( l, L0 ) ) code += code->arg; + list_free( l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_EMPTY); + break; + } + + case INSTR_JUMP_NOT_EMPTY: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_NOT_EMPTY); + l = stack_pop( s ); + if ( list_cmp( l, L0 ) ) code += code->arg; + list_free( l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_NOT_EMPTY); + break; + } + + case INSTR_JUMP_LT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_LT); + r = stack_pop( s ); + l = stack_pop( s ); + if ( list_cmp( l, r ) < 0 ) code += code->arg; + list_free( l ); + list_free( r ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_LT); + break; + } + + case INSTR_JUMP_LE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_LE); + r = stack_pop( s ); + l = stack_pop( s ); + if ( list_cmp( l, r ) <= 0 ) code += code->arg; + list_free( l ); + list_free( r ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_LE); + break; + } + + case INSTR_JUMP_GT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_GT); + r = stack_pop( s ); + l = stack_pop( s ); + if ( list_cmp( l, r ) > 0 ) code += code->arg; + list_free( l ); + list_free( r ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_GT); + break; + } + + case INSTR_JUMP_GE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_GE); + r = stack_pop( s ); + l = stack_pop( s ); + if ( list_cmp( l, r ) >= 0 ) code += code->arg; + list_free( l ); + list_free( r ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_GE); + break; + } + + case INSTR_JUMP_EQ: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_EQ); + r = stack_pop( s ); + l = stack_pop( s ); + if ( list_cmp( l, r ) == 0 ) code += code->arg; + list_free( l ); + list_free( r ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_EQ); + break; + } + + case INSTR_JUMP_NE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_NE); + r = stack_pop(s); + l = stack_pop(s); + if ( list_cmp(l, r) != 0 ) code += code->arg; + list_free(l); + list_free(r); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_NE); + break; + } + + case INSTR_JUMP_IN: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_IN); + r = stack_pop(s); + l = stack_pop(s); + if ( list_is_sublist( l, r ) ) code += code->arg; + list_free(l); + list_free(r); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_IN); + break; + } + + case INSTR_JUMP_NOT_IN: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_NOT_IN); + r = stack_pop( s ); + l = stack_pop( s ); + if ( !list_is_sublist( l, r ) ) code += code->arg; + list_free( l ); + list_free( r ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_NOT_IN); + break; + } + + /* + * For + */ + + case INSTR_FOR_INIT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_FOR_INIT); + l = stack_top( s ); + *(LISTITER *)stack_allocate( s, sizeof( LISTITER ) ) = + list_begin( l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_FOR_INIT); + break; + } + + case INSTR_FOR_LOOP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_FOR_LOOP); + LISTITER iter = *(LISTITER *)stack_get( s ); + stack_deallocate( s, sizeof( LISTITER ) ); + l = stack_top( s ); + if ( iter == list_end( l ) ) + { + list_free( stack_pop( s ) ); + code += code->arg; + } + else + { + r = list_new( object_copy( list_item( iter ) ) ); + iter = list_next( iter ); + *(LISTITER *)stack_allocate( s, sizeof( LISTITER ) ) = iter; + stack_push( s, r ); + } + PROFILE_EXIT_LOCAL(function_run_INSTR_FOR_LOOP); + break; + } + + case INSTR_FOR_POP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_FOR_POP); + stack_deallocate( s, sizeof( LISTITER ) ); + list_free( stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_FOR_POP); + break; + } + + /* + * Switch + */ + + case INSTR_JUMP_NOT_GLOB: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_JUMP_NOT_GLOB); + char const * pattern; + char const * match; + l = stack_pop( s ); + r = stack_top( s ); + pattern = list_empty( l ) ? "" : object_str( list_front( l ) ); + match = list_empty( r ) ? "" : object_str( list_front( r ) ); + if ( glob( pattern, match ) ) + code += code->arg; + else + list_free( stack_pop( s ) ); + list_free( l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_JUMP_NOT_GLOB); + break; + } + + /* + * Return + */ + + case INSTR_SET_RESULT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_SET_RESULT); + list_free( result ); + if ( !code->arg ) + result = stack_pop( s ); + else + result = list_copy( stack_top( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_SET_RESULT); + break; + } + + case INSTR_PUSH_RESULT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_RESULT); + stack_push( s, result ); + result = L0; + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_RESULT); + break; + } + + case INSTR_RETURN: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_RETURN); + if ( function_->formal_arguments ) + argument_list_pop( function_->formal_arguments, + function_->num_formal_arguments, frame, s ); +#ifndef NDEBUG + if ( !( saved_stack == s->data ) ) + { + frame->file = function->file; + frame->line = function->line; + backtrace_line( frame ); + out_printf( "error: stack check failed.\n" ); + backtrace( frame ); + assert( saved_stack == s->data ); + } + assert( saved_stack == s->data ); +#endif + debug_on_exit_function( function->base.rulename ); + PROFILE_EXIT_LOCAL(function_run_INSTR_RETURN); + PROFILE_EXIT_LOCAL(function_run); + return result; + } + + /* + * Local variables + */ + + case INSTR_PUSH_LOCAL: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_LOCAL); + LIST * value = stack_pop( s ); + stack_push( s, function_swap_variable( function, frame, code->arg, + value ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_LOCAL); + break; + } + + case INSTR_POP_LOCAL: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_POP_LOCAL); + function_set_variable( function, frame, code->arg, stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_POP_LOCAL); + break; + } + + case INSTR_PUSH_LOCAL_FIXED: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_LOCAL_FIXED); + LIST * value = stack_pop( s ); + LIST * * ptr = &frame->module->fixed_variables[ code->arg ]; + assert( code->arg < frame->module->num_fixed_variables ); + stack_push( s, *ptr ); + *ptr = value; + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_LOCAL_FIXED); + break; + } + + case INSTR_POP_LOCAL_FIXED: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_POP_LOCAL_FIXED); + LIST * value = stack_pop( s ); + LIST * * ptr = &frame->module->fixed_variables[ code->arg ]; + assert( code->arg < frame->module->num_fixed_variables ); + list_free( *ptr ); + *ptr = value; + PROFILE_EXIT_LOCAL(function_run_INSTR_POP_LOCAL_FIXED); + break; + } + + case INSTR_PUSH_LOCAL_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_LOCAL_GROUP); + LIST * const value = stack_pop( s ); + LISTITER iter; + LISTITER end; + l = stack_pop( s ); + for ( iter = list_begin( l ), end = list_end( l ); iter != end; + iter = list_next( iter ) ) + stack_push( s, function_swap_named_variable( function, frame, + list_item( iter ), list_copy( value ) ) ); + list_free( value ); + stack_push( s, l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_LOCAL_GROUP); + break; + } + + case INSTR_POP_LOCAL_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_POP_LOCAL_GROUP); + LISTITER iter; + LISTITER end; + r = stack_pop( s ); + l = list_reverse( r ); + list_free( r ); + for ( iter = list_begin( l ), end = list_end( l ); iter != end; + iter = list_next( iter ) ) + function_set_named_variable( function, frame, list_item( iter ), + stack_pop( s ) ); + list_free( l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_POP_LOCAL_GROUP); + break; + } + + /* + * on $(TARGET) variables + */ + + case INSTR_PUSH_ON: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_ON); + LIST * targets = stack_top( s ); + if ( !list_empty( targets ) ) + { + /* FIXME: push the state onto the stack instead of using + * pushsettings. + */ + TARGET * t = bindtarget( list_front( targets ) ); + pushsettings( frame->module, t->settings ); + } + else + { + /* [ on $(TARGET) ... ] is ignored if $(TARGET) is empty. */ + list_free( stack_pop( s ) ); + stack_push( s, L0 ); + code += code->arg; + } + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_ON); + break; + } + + case INSTR_POP_ON: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_POP_ON); + LIST * result = stack_pop( s ); + LIST * targets = stack_pop( s ); + if ( !list_empty( targets ) ) + { + TARGET * t = bindtarget( list_front( targets ) ); + popsettings( frame->module, t->settings ); + } + list_free( targets ); + stack_push( s, result ); + PROFILE_EXIT_LOCAL(function_run_INSTR_POP_ON); + break; + } + + case INSTR_SET_ON: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_SET_ON); + LIST * targets = stack_pop( s ); + LIST * value = stack_pop( s ); + LIST * vars = stack_pop( s ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * t = bindtarget( list_item( iter ) ); + LISTITER vars_iter = list_begin( vars ); + LISTITER const vars_end = list_end( vars ); + for ( ; vars_iter != vars_end; vars_iter = list_next( vars_iter + ) ) + t->settings = addsettings( t->settings, VAR_SET, list_item( + vars_iter ), list_copy( value ) ); + } + list_free( vars ); + list_free( targets ); + stack_push( s, value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_SET_ON); + break; + } + + case INSTR_APPEND_ON: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPEND_ON); + LIST * targets = stack_pop( s ); + LIST * value = stack_pop( s ); + LIST * vars = stack_pop( s ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * const t = bindtarget( list_item( iter ) ); + LISTITER vars_iter = list_begin( vars ); + LISTITER const vars_end = list_end( vars ); + for ( ; vars_iter != vars_end; vars_iter = list_next( vars_iter + ) ) + t->settings = addsettings( t->settings, VAR_APPEND, + list_item( vars_iter ), list_copy( value ) ); + } + list_free( vars ); + list_free( targets ); + stack_push( s, value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPEND_ON); + break; + } + + case INSTR_DEFAULT_ON: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_DEFAULT_ON); + LIST * targets = stack_pop( s ); + LIST * value = stack_pop( s ); + LIST * vars = stack_pop( s ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * t = bindtarget( list_item( iter ) ); + LISTITER vars_iter = list_begin( vars ); + LISTITER const vars_end = list_end( vars ); + for ( ; vars_iter != vars_end; vars_iter = list_next( vars_iter + ) ) + t->settings = addsettings( t->settings, VAR_DEFAULT, + list_item( vars_iter ), list_copy( value ) ); + } + list_free( vars ); + list_free( targets ); + stack_push( s, value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_DEFAULT_ON); + break; + } + + /* [ on $(target) return $(variable) ] */ + case INSTR_GET_ON: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_GET_ON); + LIST * targets = stack_pop( s ); + LIST * result = L0; + if ( !list_empty( targets ) ) + { + OBJECT * varname = function->constants[ code->arg ]; + TARGET * t = bindtarget( list_front( targets ) ); + SETTINGS * s = t->settings; + int32_t found = 0; + for ( ; s != 0; s = s->next ) + { + if ( object_equal( s->symbol, varname ) ) + { + result = s->value; + found = 1; + break; + } + } + if ( !found ) + { + result = var_get( frame->module, varname ) ; + } + } + list_free( targets ); + stack_push( s, list_copy( result ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_GET_ON); + break; + } + + /* + * Variable setting + */ + + case INSTR_SET: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_SET); + function_set_variable( function, frame, code->arg, + stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_SET); + break; + } + + case INSTR_APPEND: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPEND); + function_append_variable( function, frame, code->arg, + stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPEND); + break; + } + + case INSTR_DEFAULT: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_DEFAULT); + function_default_variable( function, frame, code->arg, + stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_DEFAULT); + break; + } + + case INSTR_SET_FIXED: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_SET_FIXED); + LIST * * ptr = &frame->module->fixed_variables[ code->arg ]; + assert( code->arg < frame->module->num_fixed_variables ); + list_free( *ptr ); + *ptr = stack_pop( s ); + PROFILE_EXIT_LOCAL(function_run_INSTR_SET_FIXED); + break; + } + + case INSTR_APPEND_FIXED: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPEND_FIXED); + LIST * * ptr = &frame->module->fixed_variables[ code->arg ]; + assert( code->arg < frame->module->num_fixed_variables ); + *ptr = list_append( *ptr, stack_pop( s ) ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPEND_FIXED); + break; + } + + case INSTR_DEFAULT_FIXED: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_DEFAULT_FIXED); + LIST * * ptr = &frame->module->fixed_variables[ code->arg ]; + LIST * value = stack_pop( s ); + assert( code->arg < frame->module->num_fixed_variables ); + if ( list_empty( *ptr ) ) + *ptr = value; + else + list_free( value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_DEFAULT_FIXED); + break; + } + + case INSTR_SET_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_SET_GROUP); + LIST * value = stack_pop( s ); + LIST * vars = stack_pop( s ); + LISTITER iter = list_begin( vars ); + LISTITER const end = list_end( vars ); + for ( ; iter != end; iter = list_next( iter ) ) + function_set_named_variable( function, frame, list_item( iter ), + list_copy( value ) ); + list_free( vars ); + list_free( value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_SET_GROUP); + break; + } + + case INSTR_APPEND_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPEND_GROUP); + LIST * value = stack_pop( s ); + LIST * vars = stack_pop( s ); + LISTITER iter = list_begin( vars ); + LISTITER const end = list_end( vars ); + for ( ; iter != end; iter = list_next( iter ) ) + function_append_named_variable( function, frame, list_item( iter + ), list_copy( value ) ); + list_free( vars ); + list_free( value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPEND_GROUP); + break; + } + + case INSTR_DEFAULT_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_DEFAULT_GROUP); + LIST * value = stack_pop( s ); + LIST * vars = stack_pop( s ); + LISTITER iter = list_begin( vars ); + LISTITER const end = list_end( vars ); + for ( ; iter != end; iter = list_next( iter ) ) + function_default_named_variable( function, frame, list_item( + iter ), list_copy( value ) ); + list_free( vars ); + list_free( value ); + PROFILE_EXIT_LOCAL(function_run_INSTR_DEFAULT_GROUP); + break; + } + + /* + * Rules + */ + + case INSTR_CALL_RULE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_CALL_RULE); + char const * unexpanded = object_str( function_get_constant( + function, code[ 1 ].op_code ) ); + LIST * result = function_call_rule( function, frame, s, code->arg, + unexpanded, function->file, code[ 1 ].arg ); + stack_push( s, result ); + ++code; + PROFILE_EXIT_LOCAL(function_run_INSTR_CALL_RULE); + break; + } + + case INSTR_CALL_MEMBER_RULE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_CALL_MEMBER_RULE); + OBJECT * rule_name = function_get_constant( function, code[1].op_code ); + LIST * result = function_call_member_rule( function, frame, s, code->arg, rule_name, function->file, code[1].arg ); + stack_push( s, result ); + ++code; + PROFILE_EXIT_LOCAL(function_run_INSTR_CALL_MEMBER_RULE); + break; + } + + case INSTR_RULE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_RULE); + function_set_rule( function, frame, s, code->arg ); + PROFILE_EXIT_LOCAL(function_run_INSTR_RULE); + break; + } + + case INSTR_ACTIONS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_ACTIONS); + function_set_actions( function, frame, s, code->arg ); + PROFILE_EXIT_LOCAL(function_run_INSTR_ACTIONS); + break; + } + + /* + * Variable expansion + */ + + case INSTR_APPLY_MODIFIERS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPLY_MODIFIERS); + int32_t n; + int32_t i; + l = stack_pop( s ); + n = expand_modifiers( s, code->arg ); + stack_push( s, l ); + VAR_EXPANDED m = apply_modifiers( s, n ); + l = m.value; + list_free( m.inner ); + list_free( stack_pop( s ) ); + stack_deallocate( s, n * sizeof( VAR_EDITS ) ); + for ( i = 0; i < code->arg; ++i ) + list_free( stack_pop( s ) ); /* pop modifiers */ + stack_push( s, l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPLY_MODIFIERS); + break; + } + + case INSTR_APPLY_INDEX: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPLY_INDEX); + l = apply_subscript( s ); + list_free( stack_pop( s ) ); + list_free( stack_pop( s ) ); + stack_push( s, l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPLY_INDEX); + break; + } + + case INSTR_APPLY_INDEX_MODIFIERS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPLY_INDEX_MODIFIERS); + int32_t i; + int32_t n; + l = stack_pop( s ); + r = stack_pop( s ); + n = expand_modifiers( s, code->arg ); + stack_push( s, r ); + stack_push( s, l ); + l = apply_subscript_and_modifiers( s, n ); + list_free( stack_pop( s ) ); + list_free( stack_pop( s ) ); + stack_deallocate( s, n * sizeof( VAR_EDITS ) ); + for ( i = 0; i < code->arg; ++i ) + list_free( stack_pop( s ) ); /* pop modifiers */ + stack_push( s, l ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPLY_INDEX_MODIFIERS); + break; + } + + case INSTR_APPLY_MODIFIERS_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPLY_MODIFIERS_GROUP); + int32_t i; + LIST * const vars = stack_pop( s ); + int32_t const n = expand_modifiers( s, code->arg ); + LIST * result = L0; + LISTITER iter = list_begin( vars ); + LISTITER const end = list_end( vars ); + for ( ; iter != end; iter = list_next( iter ) ) + { + stack_push( s, function_get_named_variable( function, frame, + list_item( iter ) ) ); + VAR_EXPANDED m = apply_modifiers( s, n ); + result = m.value; + list_free( m.inner ); + list_free( stack_pop( s ) ); + } + list_free( vars ); + stack_deallocate( s, n * sizeof( VAR_EDITS ) ); + for ( i = 0; i < code->arg; ++i ) + list_free( stack_pop( s ) ); /* pop modifiers */ + stack_push( s, result ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPLY_MODIFIERS_GROUP); + break; + } + + case INSTR_APPLY_INDEX_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPLY_INDEX_GROUP); + LIST * vars = stack_pop( s ); + LIST * result = L0; + LISTITER iter = list_begin( vars ); + LISTITER const end = list_end( vars ); + for ( ; iter != end; iter = list_next( iter ) ) + { + stack_push( s, function_get_named_variable( function, frame, + list_item( iter ) ) ); + result = list_append( result, apply_subscript( s ) ); + list_free( stack_pop( s ) ); + } + list_free( vars ); + list_free( stack_pop( s ) ); + stack_push( s, result ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPLY_INDEX_GROUP); + break; + } + + case INSTR_APPLY_INDEX_MODIFIERS_GROUP: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPLY_INDEX_MODIFIERS_GROUP); + int32_t i; + LIST * const vars = stack_pop( s ); + LIST * const r = stack_pop( s ); + int32_t const n = expand_modifiers( s, code->arg ); + LIST * result = L0; + LISTITER iter = list_begin( vars ); + LISTITER const end = list_end( vars ); + stack_push( s, r ); + for ( ; iter != end; iter = list_next( iter ) ) + { + stack_push( s, function_get_named_variable( function, frame, + list_item( iter ) ) ); + result = list_append( result, apply_subscript_and_modifiers( s, + n ) ); + list_free( stack_pop( s ) ); + } + list_free( stack_pop( s ) ); + list_free( vars ); + stack_deallocate( s, n * sizeof( VAR_EDITS ) ); + for ( i = 0; i < code->arg; ++i ) + list_free( stack_pop( s ) ); /* pop modifiers */ + stack_push( s, result ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPLY_INDEX_MODIFIERS_GROUP); + break; + } + + case INSTR_COMBINE_STRINGS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_COMBINE_STRINGS); + int32_t const buffer_size = code->arg * sizeof( expansion_item ); + LIST * * const stack_pos = (LIST * * const)stack_get( s ); + expansion_item * items = (expansion_item *)stack_allocate( s, buffer_size ); + LIST * result; + int32_t i; + for ( i = 0; i < code->arg; ++i ) + items[ i ].values = stack_pos[ i ]; + result = expand( items, code->arg ); + stack_deallocate( s, buffer_size ); + for ( i = 0; i < code->arg; ++i ) + list_free( stack_pop( s ) ); + stack_push( s, result ); + PROFILE_EXIT_LOCAL(function_run_INSTR_COMBINE_STRINGS); + break; + } + + case INSTR_GET_GRIST: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_GET_GRIST); + LIST * vals = stack_pop( s ); + LIST * result = L0; + LISTITER iter, end; + + for ( iter = list_begin( vals ), end = list_end( vals ); iter != end; ++iter ) + { + OBJECT * new_object; + const char * value = object_str( list_item( iter ) ); + const char * p; + if ( value[ 0 ] == '<' && ( p = strchr( value, '>' ) ) ) + { + if( p[ 1 ] ) + new_object = object_new_range( value, int32_t(p - value + 1) ); + else + new_object = object_copy( list_item( iter ) ); + } + else + { + new_object = object_copy( constant_empty ); + } + result = list_push_back( result, new_object ); + } + + list_free( vals ); + stack_push( s, result ); + PROFILE_EXIT_LOCAL(function_run_INSTR_GET_GRIST); + break; + } + + case INSTR_INCLUDE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_INCLUDE); + LIST * nt = stack_pop( s ); + if ( !list_empty( nt ) ) + { + TARGET * const t = bindtarget( list_front( nt ) ); + list_free( nt ); + + /* DWA 2001/10/22 - Perforce Jam cleared the arguments here, + * which prevented an included file from being treated as part + * of the body of a rule. I did not see any reason to do that, + * so I lifted the restriction. + */ + + /* Bind the include file under the influence of "on-target" + * variables. Though they are targets, include files are not + * built with make(). + */ + + pushsettings( root_module(), t->settings ); + /* We do not expect that a file to be included is generated by + * some action. Therefore, pass 0 as third argument. If the name + * resolves to a directory, let it error out. + */ + object_free( t->boundname ); + t->boundname = search( t->name, &t->time, 0, 0 ); + popsettings( root_module(), t->settings ); + + parse_file( t->boundname, frame ); +#ifdef JAM_DEBUGGER + frame->function = function_; +#endif + } + PROFILE_EXIT_LOCAL(function_run_INSTR_INCLUDE); + break; + } + + /* + * Classes and modules + */ + + case INSTR_PUSH_MODULE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_PUSH_MODULE); + LIST * const module_name = stack_pop( s ); + module_t * const outer_module = frame->module; + frame->module = !list_empty( module_name ) + ? bindmodule( list_front( module_name ) ) + : root_module(); + list_free( module_name ); + *(module_t * *)stack_allocate( s, sizeof( module_t * ) ) = + outer_module; + PROFILE_EXIT_LOCAL(function_run_INSTR_PUSH_MODULE); + break; + } + + case INSTR_POP_MODULE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_POP_MODULE); + module_t * const outer_module = *(module_t * *)stack_get( s ); + stack_deallocate( s, sizeof( module_t * ) ); + frame->module = outer_module; + PROFILE_EXIT_LOCAL(function_run_INSTR_POP_MODULE); + break; + } + + case INSTR_CLASS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_CLASS); + LIST * bases = stack_pop( s ); + LIST * name = stack_pop( s ); + OBJECT * class_module = make_class_module( name, bases, frame ); + + module_t * const outer_module = frame->module; + frame->module = bindmodule( class_module ); + object_free( class_module ); + + *(module_t * *)stack_allocate( s, sizeof( module_t * ) ) = + outer_module; + PROFILE_EXIT_LOCAL(function_run_INSTR_CLASS); + break; + } + + case INSTR_BIND_MODULE_VARIABLES: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_BIND_MODULE_VARIABLES); + module_bind_variables( frame->module ); + PROFILE_EXIT_LOCAL(function_run_INSTR_BIND_MODULE_VARIABLES); + break; + } + + case INSTR_APPEND_STRINGS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_APPEND_STRINGS); + string buf[ 1 ]; + string_new( buf ); + combine_strings( s, code->arg, buf ); + stack_push( s, list_new( object_new( buf->value ) ) ); + string_free( buf ); + PROFILE_EXIT_LOCAL(function_run_INSTR_APPEND_STRINGS); + break; + } + + // WRITE_FILE( LIST*1 filename, LIST*1 modifiers[N], LIST*1 contents ) + case INSTR_WRITE_FILE: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_WRITE_FILE); + // Get expanded filename. + LIST * filename = nullptr; + { + expansion_item ei = { stack_pop( s ) }; + filename = expand( &ei, 1 ); + list_free( ei.values ); + } + // Apply modifiers to "raw" filename. + VAR_EXPANDED filename_mod = eval_modifiers( s, filename, code->arg ); + // Get contents. + LIST * contents = stack_pop( s ); + // Write out the contents file, or expand the contents, as needed. + LIST * filename_or_contents = function_execute_write_file( function, frame, s, filename_mod, contents ); + // The result that gets replaced into the @() space. + stack_push( s, filename_or_contents ); + list_free( filename_mod.value ); + list_free( filename_mod.inner ); + list_free( contents ); + PROFILE_EXIT_LOCAL(function_run_INSTR_WRITE_FILE); + break; + } + + case INSTR_OUTPUT_STRINGS: + { + PROFILE_ENTER_LOCAL(function_run_INSTR_OUTPUT_STRINGS); + string * const buf = *(string * *)( (char *)stack_get( s ) + ( + code->arg * sizeof( LIST * ) ) ); + combine_strings( s, code->arg, buf ); + PROFILE_EXIT_LOCAL(function_run_INSTR_OUTPUT_STRINGS); + break; + } + + case INSTR_DEBUG_LINE: + { + debug_on_instruction( frame, function->file, code->arg ); + break; + } + + } + ++code; + } + + PROFILE_EXIT_LOCAL(function_run); +} + + +#ifdef HAVE_PYTHON + +static struct arg_list * arg_list_compile_python( PyObject * bjam_signature, + int32_t * num_arguments ) +{ + if ( bjam_signature ) + { + struct argument_list_compiler c[ 1 ]; + struct arg_list * result; + Py_ssize_t s; + Py_ssize_t i; + argument_list_compiler_init( c ); + + s = PySequence_Size( bjam_signature ); + for ( i = 0; i < s; ++i ) + { + struct argument_compiler arg_comp[ 1 ]; + struct arg_list arg; + PyObject * v = PySequence_GetItem( bjam_signature, i ); + Py_ssize_t j; + Py_ssize_t inner; + argument_compiler_init( arg_comp ); + + inner = PySequence_Size( v ); + for ( j = 0; j < inner; ++j ) + argument_compiler_add( arg_comp, object_new( PyString_AsString( + PySequence_GetItem( v, j ) ) ), constant_builtin, -1 ); + + arg = arg_compile_impl( arg_comp, constant_builtin, -1 ); + dynamic_array_push( c->args, arg ); + argument_compiler_free( arg_comp ); + Py_DECREF( v ); + } + + *num_arguments = c->args->size; + result = (struct arg_list *)BJAM_MALLOC( c->args->size * sizeof( struct arg_list ) ); + memcpy( result, c->args->data, c->args->size * sizeof( struct arg_list ) + ); + argument_list_compiler_free( c ); + return result; + } + *num_arguments = 0; + return 0; +} + +FUNCTION * function_python( PyObject * function, PyObject * bjam_signature ) +{ + PYTHON_FUNCTION * result = (PYTHON_FUNCTION *)BJAM_MALLOC( sizeof( PYTHON_FUNCTION ) ); + + result->base.type = FUNCTION_PYTHON; + result->base.reference_count = 1; + result->base.rulename = 0; + result->base.formal_arguments = arg_list_compile_python( bjam_signature, + &result->base.num_formal_arguments ); + Py_INCREF( function ); + result->python_function = function; + + return (FUNCTION *)result; +} + + +static void argument_list_to_python( struct arg_list * formal, int32_t formal_count, + FUNCTION * function, FRAME * frame, PyObject * kw ) +{ + LOL * all_actual = frame->args; + int32_t i; + + for ( i = 0; i < formal_count; ++i ) + { + LIST * actual = lol_get( all_actual, i ); + LISTITER actual_iter = list_begin( actual ); + LISTITER const actual_end = list_end( actual ); + int32_t j; + for ( j = 0; j < formal[ i ].size; ++j ) + { + struct argument * formal_arg = &formal[ i ].args[ j ]; + PyObject * value; + LIST * l; + + switch ( formal_arg->flags ) + { + case ARG_ONE: + if ( actual_iter == actual_end ) + argument_error( "missing argument", function, frame, + formal_arg->arg_name ); + type_check_range( formal_arg->type_name, actual_iter, list_next( + actual_iter ), frame, function, formal_arg->arg_name ); + value = PyString_FromString( object_str( list_item( actual_iter + ) ) ); + actual_iter = list_next( actual_iter ); + break; + case ARG_OPTIONAL: + if ( actual_iter == actual_end ) + value = 0; + else + { + type_check_range( formal_arg->type_name, actual_iter, + list_next( actual_iter ), frame, function, + formal_arg->arg_name ); + value = PyString_FromString( object_str( list_item( + actual_iter ) ) ); + actual_iter = list_next( actual_iter ); + } + break; + case ARG_PLUS: + if ( actual_iter == actual_end ) + argument_error( "missing argument", function, frame, + formal_arg->arg_name ); + /* fallthrough */ + case ARG_STAR: + type_check_range( formal_arg->type_name, actual_iter, + actual_end, frame, function, formal_arg->arg_name ); + l = list_copy_range( actual, actual_iter, actual_end ); + value = list_to_python( l ); + list_free( l ); + actual_iter = actual_end; + break; + case ARG_VARIADIC: + return; + } + + if ( value ) + { + PyObject * key = PyString_FromString( object_str( + formal_arg->arg_name ) ); + PyDict_SetItem( kw, key, value ); + Py_DECREF( key ); + Py_DECREF( value ); + } + } + + if ( actual_iter != actual_end ) + argument_error( "extra argument", function, frame, list_item( + actual_iter ) ); + } + + for ( ; i < all_actual->count; ++i ) + { + LIST * const actual = lol_get( all_actual, i ); + if ( !list_empty( actual ) ) + argument_error( "extra argument", function, frame, list_front( + actual ) ); + } +} + + +/* Given a Python object, return a string to use in Jam code instead of the said + * object. + * + * If the object is a string, use the string value. + * If the object implemenets __jam_repr__ method, use that. + * Otherwise return 0. + */ + +OBJECT * python_to_string( PyObject * value ) +{ + if ( PyString_Check( value ) ) + return object_new( PyString_AS_STRING( value ) ); + + /* See if this instance defines the special __jam_repr__ method. */ + if ( PyInstance_Check( value ) + && PyObject_HasAttrString( value, "__jam_repr__" ) ) + { + PyObject * repr = PyObject_GetAttrString( value, "__jam_repr__" ); + if ( repr ) + { + PyObject * arguments2 = PyTuple_New( 0 ); + PyObject * value2 = PyObject_Call( repr, arguments2, 0 ); + Py_DECREF( repr ); + Py_DECREF( arguments2 ); + if ( PyString_Check( value2 ) ) + return object_new( PyString_AS_STRING( value2 ) ); + Py_DECREF( value2 ); + } + } + return 0; +} + + +static module_t * python_module() +{ + static module_t * python = 0; + if ( !python ) + python = bindmodule( constant_python ); + return python; +} + + +static LIST * call_python_function( PYTHON_FUNCTION * function, FRAME * frame ) +{ + LIST * result = 0; + PyObject * arguments = 0; + PyObject * kw = NULL; + int32_t i; + PyObject * py_result; + FRAME * prev_frame_before_python_call; + + if ( function->base.formal_arguments ) + { + arguments = PyTuple_New( 0 ); + kw = PyDict_New(); + argument_list_to_python( function->base.formal_arguments, + function->base.num_formal_arguments, &function->base, frame, kw ); + } + else + { + arguments = PyTuple_New( frame->args->count ); + for ( i = 0; i < frame->args->count; ++i ) + PyTuple_SetItem( arguments, i, list_to_python( lol_get( frame->args, + i ) ) ); + } + + frame->module = python_module(); + + prev_frame_before_python_call = frame_before_python_call; + frame_before_python_call = frame; + py_result = PyObject_Call( function->python_function, arguments, kw ); + frame_before_python_call = prev_frame_before_python_call; + Py_DECREF( arguments ); + Py_XDECREF( kw ); + if ( py_result != NULL ) + { + if ( PyList_Check( py_result ) ) + { + int32_t size = PyList_Size( py_result ); + int32_t i; + for ( i = 0; i < size; ++i ) + { + OBJECT * s = python_to_string( PyList_GetItem( py_result, i ) ); + if ( !s ) + err_printf( + "Non-string object returned by Python call.\n" ); + else + result = list_push_back( result, s ); + } + } + else if ( py_result == Py_None ) + { + result = L0; + } + else + { + OBJECT * const s = python_to_string( py_result ); + if ( s ) + result = list_new( s ); + else + /* We have tried all we could. Return empty list. There are + * cases, e.g. feature.feature function that should return a + * value for the benefit of Python code and which also can be + * called by Jam code, where no sensible value can be returned. + * We cannot even emit a warning, since there would be a pile of + * them. + */ + result = L0; + } + + Py_DECREF( py_result ); + } + else + { + PyErr_Print(); + err_printf( "Call failed\n" ); + } + + return result; +} + +#endif + + +void function_done( void ) +{ + BJAM_FREE( stack ); +} diff --git a/src/boost/tools/build/src/engine/function.h b/src/boost/tools/build/src/engine/function.h new file mode 100644 index 000000000..afa0277bb --- /dev/null +++ b/src/boost/tools/build/src/engine/function.h @@ -0,0 +1,53 @@ +/* + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2011 Steven Watanabe + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef FUNCTION_SW20111123_H +#define FUNCTION_SW20111123_H + +#include "config.h" +#include "object.h" +#include "frames.h" +#include "lists.h" +#include "parse.h" +#include "jam_strings.h" + +typedef struct _function FUNCTION; +typedef struct _stack STACK; + +typedef FUNCTION* function_ptr; +typedef STACK* stack_ptr; + +STACK * stack_global( void ); +void stack_push( STACK * s, LIST * l ); +LIST * stack_pop( STACK * s ); + +FUNCTION * function_compile( PARSE * parse ); +FUNCTION * function_builtin( LIST * ( * func )( FRAME * frame, int32_t flags ), int32_t flags, const char * * args ); +void function_refer( FUNCTION * ); +void function_free( FUNCTION * ); +OBJECT * function_rulename( FUNCTION * ); +void function_set_rulename( FUNCTION *, OBJECT * ); +void function_location( FUNCTION *, OBJECT * *, int32_t * ); +LIST * function_run( FUNCTION * function, FRAME * frame, STACK * s ); + +FUNCTION * function_compile_actions( const char * actions, OBJECT * file, int32_t line ); +void function_run_actions( FUNCTION * function, FRAME * frame, STACK * s, string * out ); + +FUNCTION * function_bind_variables( FUNCTION * f, module_t * module, int32_t * counter ); +FUNCTION * function_unbind_variables( FUNCTION * f ); + +LIST * function_get_variables( FUNCTION * f ); + +void function_done( void ); + +#ifdef HAVE_PYTHON + +FUNCTION * function_python( PyObject * function, PyObject * bjam_signature ); + +#endif + +#endif diff --git a/src/boost/tools/build/src/engine/glob.cpp b/src/boost/tools/build/src/engine/glob.cpp new file mode 100644 index 000000000..bec00ee56 --- /dev/null +++ b/src/boost/tools/build/src/engine/glob.cpp @@ -0,0 +1,152 @@ +/* + * Copyright 1994 Christopher Seiwald. All rights reserved. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * glob.c - match a string against a simple pattern + * + * Understands the following patterns: + * + * * any number of characters + * ? any single character + * [a-z] any single character in the range a-z + * [^a-z] any single character not in the range a-z + * \x match x + * + * External functions: + * + * glob() - match a string against a simple pattern + * + * Internal functions: + * + * globchars() - build a bitlist to check for character group match + */ + +# include "jam.h" + +# define CHECK_BIT( tab, bit ) ( tab[ (bit)/8 ] & (1<<( (bit)%8 )) ) +# define BITLISTSIZE 16 /* bytes used for [chars] in compiled expr */ + +static void globchars( const char * s, const char * e, char * b ); + + +/* + * glob() - match a string against a simple pattern. + */ + +int glob( const char * c, const char * s ) +{ + char bitlist[ BITLISTSIZE ]; + const char * here; + + for ( ; ; ) + switch ( *c++ ) + { + case '\0': + return *s ? -1 : 0; + + case '?': + if ( !*s++ ) + return 1; + break; + + case '[': + /* Scan for matching ]. */ + + here = c; + do if ( !*c++ ) return 1; + while ( ( here == c ) || ( *c != ']' ) ); + ++c; + + /* Build character class bitlist. */ + + globchars( here, c, bitlist ); + + if ( !CHECK_BIT( bitlist, *(const unsigned char *)s ) ) + return 1; + ++s; + break; + + case '*': + here = s; + + while ( *s ) + ++s; + + /* Try to match the rest of the pattern in a recursive */ + /* call. If the match fails we'll back up chars, retrying. */ + + while ( s != here ) + { + int r; + + /* A fast path for the last token in a pattern. */ + r = *c ? glob( c, s ) : *s ? -1 : 0; + + if ( !r ) + return 0; + if ( r < 0 ) + return 1; + --s; + } + break; + + case '\\': + /* Force literal match of next char. */ + if ( !*c || ( *s++ != *c++ ) ) + return 1; + break; + + default: + if ( *s++ != c[ -1 ] ) + return 1; + break; + } +} + + +/* + * globchars() - build a bitlist to check for character group match. + */ + +static void globchars( const char * s, const char * e, char * b ) +{ + int neg = 0; + + memset( b, '\0', BITLISTSIZE ); + + if ( *s == '^' ) + { + ++neg; + ++s; + } + + while ( s < e ) + { + int c; + + if ( ( s + 2 < e ) && ( s[1] == '-' ) ) + { + for ( c = s[0]; c <= s[2]; ++c ) + b[ c/8 ] |= ( 1 << ( c % 8 ) ); + s += 3; + } + else + { + c = *s++; + b[ c/8 ] |= ( 1 << ( c % 8 ) ); + } + } + + if ( neg ) + { + int i; + for ( i = 0; i < BITLISTSIZE; ++i ) + b[ i ] ^= 0377; + } + + /* Do not include \0 in either $[chars] or $[^chars]. */ + b[0] &= 0376; +} diff --git a/src/boost/tools/build/src/engine/guess_toolset.bat b/src/boost/tools/build/src/engine/guess_toolset.bat new file mode 100644 index 000000000..09f7808b0 --- /dev/null +++ b/src/boost/tools/build/src/engine/guess_toolset.bat @@ -0,0 +1,107 @@ +@ECHO OFF + +REM ~ Copyright 2002-2018 Rene Rivera. +REM ~ Distributed under the Boost Software License, Version 1.0. +REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +if "_%1_" == "_yacc_" goto Guess_Yacc +if "_%1_" == "_test_path_" ( + shift + goto Test_Path) +goto Guess + + +:Clear_Error +ver >nul +goto :eof + + +:Test_Path +REM Tests for the given executable file presence in the directories in the PATH +REM environment variable. Additionally sets FOUND_PATH to the path of the +REM found file. +call :Clear_Error +setlocal +set test=%~$PATH:1 +endlocal +if not errorlevel 1 set FOUND_PATH=%~dp$PATH:1 +goto :eof + + +:Guess +REM Let vswhere tell us where msvc is at, if available. +call :Clear_Error +call vswhere_usability_wrapper.cmd +call :Clear_Error +if NOT "_%VS170COMNTOOLS%_" == "__" ( + set "B2_TOOLSET=vc143" + set "B2_TOOLSET_ROOT=%VS170COMNTOOLS%..\..\VC\" + goto :eof) +if NOT "_%VS160COMNTOOLS%_" == "__" ( + set "B2_TOOLSET=vc142" + set "B2_TOOLSET_ROOT=%VS160COMNTOOLS%..\..\VC\" + goto :eof) +if NOT "_%VS150COMNTOOLS%_" == "__" ( + set "B2_TOOLSET=vc141" + set "B2_TOOLSET_ROOT=%VS150COMNTOOLS%..\..\VC\" + goto :eof) +REM VSUNKCOMNTOOLS represents unknown but detected version from vswhere +if NOT "_%VSUNKCOMNTOOLS%_" == "__" ( + set "B2_TOOLSET=vcunk" + set "B2_TOOLSET_ROOT=%VSUNKCOMNTOOLS%..\..\VC\" + goto :eof) +if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ( + set "B2_TOOLSET=vc141" + set "B2_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\VC\" + exit /b 0) +if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" ( + set "B2_TOOLSET=vc141" + set "B2_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio\2017\Professional\VC\" + exit /b 0) +if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" ( + set "B2_TOOLSET=vc141" + set "B2_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio\2017\Community\VC\" + exit /b 0) +if NOT "_%VS140COMNTOOLS%_" == "__" ( + set "B2_TOOLSET=vc14" + set "B2_TOOLSET_ROOT=%VS140COMNTOOLS%..\..\VC\" + exit /b 0) +if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio 14.0\VC\VCVARSALL.BAT" ( + set "B2_TOOLSET=vc14" + set "B2_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio 14.0\VC\" + exit /b 0) +if NOT "_%VS120COMNTOOLS%_" == "__" ( + set "B2_TOOLSET=vc12" + set "B2_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\" + exit /b 0) +if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio 12.0\VC\VCVARSALL.BAT" ( + set "B2_TOOLSET=vc12" + set "B2_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio 12.0\VC\" + exit /b 0) +call :Test_Path cl.exe +if not errorlevel 1 ( + set "B2_TOOLSET=msvc" + set "B2_TOOLSET_ROOT=%FOUND_PATH%..\" + exit /b 0) +call :Test_Path vcvars32.bat +if not errorlevel 1 ( + set "B2_TOOLSET=msvc" + call "%FOUND_PATH%VCVARS32.BAT" + set "B2_TOOLSET_ROOT=%MSVCDir%\" + exit /b 0) +call :Test_Path bcc32c.exe +if not errorlevel 1 ( + set "B2_TOOLSET=borland" + set "B2_TOOLSET_ROOT=%FOUND_PATH%..\" + exit /b 0) +call :Test_Path icl.exe +if not errorlevel 1 ( + set "B2_TOOLSET=intel-win32" + set "B2_TOOLSET_ROOT=%FOUND_PATH%..\" + exit /b 0) +if EXIST "C:\MinGW\bin\gcc.exe" ( + set "B2_TOOLSET=mingw" + set "B2_TOOLSET_ROOT=C:\MinGW\" + exit /b 0) +REM Could not find a suitable toolset +exit /b 1 diff --git a/src/boost/tools/build/src/engine/hash.cpp b/src/boost/tools/build/src/engine/hash.cpp new file mode 100644 index 000000000..9dcd5816b --- /dev/null +++ b/src/boost/tools/build/src/engine/hash.cpp @@ -0,0 +1,388 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * hash.c - simple in-memory hashing routines + * + * External routines: + * hashinit() - initialize a hash table, returning a handle + * hashitem() - find a record in the table, and optionally enter a new one + * hashdone() - free a hash table, given its handle + * + * Internal routines: + * hashrehash() - resize and rebuild hp->tab, the hash table + */ + +#include "jam.h" +#include "hash.h" + +#include "compile.h" +#include "output.h" + +#include + +/* +#define HASH_DEBUG_PROFILE 1 +*/ + +/* Header attached to all hash table data items. */ + +typedef struct item ITEM; +struct item +{ + ITEM * next; +}; + +#define MAX_LISTS 32 + +struct hash +{ + /* + * the hash table, just an array of item pointers + */ + struct + { + int32_t nel; + ITEM * * base; + } tab; + + int32_t bloat; /* tab.nel / items.nel */ + int32_t inel; /* initial number of elements */ + + /* + * the array of records, maintained by these routines - essentially a + * microallocator + */ + struct + { + int32_t more; /* how many more ITEMs fit in lists[ list ] */ + ITEM * free; /* free list of items */ + char * next; /* where to put more ITEMs in lists[ list ] */ + int32_t size; /* sizeof( ITEM ) + aligned datalen */ + int32_t nel; /* total ITEMs held by all lists[] */ + int32_t list; /* index into lists[] */ + + struct + { + int32_t nel; /* total ITEMs held by this list */ + char * base; /* base of ITEMs array */ + } lists[ MAX_LISTS ]; + } items; + + char const * name; /* just for hashstats() */ +}; + +static void hashrehash( struct hash * ); +static void hashstat( struct hash * ); + +static uint32_t hash_keyval( OBJECT * key ) +{ + return object_hash( key ); +} + +#define hash_bucket(hp, keyval) ((hp)->tab.base + ((keyval) % (hp)->tab.nel)) + +#define hash_data_key(data) (*(OBJECT * *)(data)) +#define hash_item_data(item) ((HASHDATA *)((char *)item + sizeof(ITEM))) +#define hash_item_key(item) (hash_data_key(hash_item_data(item))) + + +#define ALIGNED(x) ((x + sizeof(ITEM) - 1) & ~(sizeof(ITEM) - 1)) + +/* + * hashinit() - initialize a hash table, returning a handle + */ + +struct hash * hashinit( int32_t datalen, char const * name ) +{ + struct hash * hp = (struct hash *)BJAM_MALLOC( sizeof( *hp ) ); + + hp->bloat = 3; + hp->tab.nel = 0; + hp->tab.base = 0; + hp->items.more = 0; + hp->items.free = 0; + hp->items.size = sizeof( ITEM ) + ALIGNED( datalen ); + hp->items.list = -1; + hp->items.nel = 0; + hp->inel = 11; /* 47 */ + hp->name = name; + + return hp; +} + + +/* + * hash_search() - Find the hash item for the given data. + * + * Returns a pointer to a hashed item with the given key. If given a 'previous' + * pointer, makes it point to the item prior to the found item in the same + * bucket or to 0 if our item is the first item in its bucket. + */ + +static ITEM * hash_search( struct hash * hp, uint32_t keyval, + OBJECT * keydata, ITEM * * previous ) +{ + ITEM * i = *hash_bucket( hp, keyval ); + ITEM * p = 0; + for ( ; i; i = i->next ) + { + if ( object_equal( hash_item_key( i ), keydata ) ) + { + if ( previous ) + *previous = p; + return i; + } + p = i; + } + return 0; +} + + +/* + * hash_insert() - insert a record in the table or return the existing one + */ + +HASHDATA * hash_insert( struct hash * hp, OBJECT * key, int32_t * found ) +{ + ITEM * i; + uint32_t keyval = hash_keyval( key ); + + #ifdef HASH_DEBUG_PROFILE + profile_frame prof[ 1 ]; + if ( DEBUG_PROFILE ) + profile_enter( 0, prof ); + #endif + + if ( !hp->items.more ) + hashrehash( hp ); + + i = hash_search( hp, keyval, key, 0 ); + if ( i ) + *found = 1; + else + { + ITEM * * base = hash_bucket( hp, keyval ); + + /* Try to grab one from the free list. */ + if ( hp->items.free ) + { + i = hp->items.free; + hp->items.free = i->next; + assert( !hash_item_key( i ) ); + } + else + { + i = (ITEM *)hp->items.next; + hp->items.next += hp->items.size; + } + --hp->items.more; + i->next = *base; + *base = i; + *found = 0; + } + + #ifdef HASH_DEBUG_PROFILE + if ( DEBUG_PROFILE ) + profile_exit( prof ); + #endif + + return hash_item_data( i ); +} + + +/* + * hash_find() - find a record in the table or NULL if none exists + */ + +HASHDATA * hash_find( struct hash * hp, OBJECT * key ) +{ + ITEM * i; + uint32_t keyval = hash_keyval( key ); + + #ifdef HASH_DEBUG_PROFILE + profile_frame prof[ 1 ]; + if ( DEBUG_PROFILE ) + profile_enter( 0, prof ); + #endif + + if ( !hp->items.nel ) + { + #ifdef HASH_DEBUG_PROFILE + if ( DEBUG_PROFILE ) + profile_exit( prof ); + #endif + return 0; + } + + i = hash_search( hp, keyval, key, 0 ); + + #ifdef HASH_DEBUG_PROFILE + if ( DEBUG_PROFILE ) + profile_exit( prof ); + #endif + + return i ? hash_item_data( i ) : 0; +} + + +/* + * hashrehash() - resize and rebuild hp->tab, the hash table + */ + +static void hashrehash( struct hash * hp ) +{ + int32_t i = ++hp->items.list; + hp->items.more = i ? 2 * hp->items.nel : hp->inel; + hp->items.next = (char *)BJAM_MALLOC( hp->items.more * hp->items.size ); + hp->items.free = 0; + + hp->items.lists[ i ].nel = hp->items.more; + hp->items.lists[ i ].base = hp->items.next; + hp->items.nel += hp->items.more; + + if ( hp->tab.base ) + BJAM_FREE( (char *)hp->tab.base ); + + hp->tab.nel = hp->items.nel * hp->bloat; + hp->tab.base = (ITEM * *)BJAM_MALLOC( hp->tab.nel * sizeof( ITEM * ) ); + + memset( (char *)hp->tab.base, '\0', hp->tab.nel * sizeof( ITEM * ) ); + + for ( i = 0; i < hp->items.list; ++i ) + { + int32_t nel = hp->items.lists[ i ].nel; + char * next = hp->items.lists[ i ].base; + + for ( ; nel--; next += hp->items.size ) + { + ITEM * i = (ITEM *)next; + ITEM * * ip = hp->tab.base + object_hash( hash_item_key( i ) ) % + hp->tab.nel; + /* code currently assumes rehashing only when there are no free + * items + */ + assert( hash_item_key( i ) ); + + i->next = *ip; + *ip = i; + } + } +} + + +void hashenumerate( struct hash * hp, void (* f)( void *, void * ), void * data + ) +{ + int32_t i; + for ( i = 0; i <= hp->items.list; ++i ) + { + char * next = hp->items.lists[ i ].base; + int32_t nel = hp->items.lists[ i ].nel; + if ( i == hp->items.list ) + nel -= hp->items.more; + + for ( ; nel--; next += hp->items.size ) + { + ITEM * const i = (ITEM *)next; + if ( hash_item_key( i ) != 0 ) /* Do not enumerate freed items. */ + f( hash_item_data( i ), data ); + } + } +} + + +/* + * hash_free() - free a hash table, given its handle + */ + +void hash_free( struct hash * hp ) +{ + int32_t i; + if ( !hp ) + return; + if ( hp->tab.base ) + BJAM_FREE( (char *)hp->tab.base ); + for ( i = 0; i <= hp->items.list; ++i ) + BJAM_FREE( hp->items.lists[ i ].base ); + BJAM_FREE( (char *)hp ); +} + + +static void hashstat( struct hash * hp ) +{ + struct hashstats stats[ 1 ]; + hashstats_init( stats ); + hashstats_add( stats, hp ); + hashstats_print( stats, hp->name ); +} + + +void hashstats_init( struct hashstats * stats ) +{ + stats->count = 0; + stats->num_items = 0; + stats->tab_size = 0; + stats->item_size = 0; + stats->sets = 0; + stats->num_hashes = 0; +} + + +void hashstats_add( struct hashstats * stats, struct hash * hp ) +{ + if ( hp ) + { + ITEM * * tab = hp->tab.base; + int nel = hp->tab.nel; + int count = 0; + int sets = 0; + int i; + + for ( i = 0; i < nel; ++i ) + { + ITEM * item; + int here = 0; + for ( item = tab[ i ]; item; item = item->next ) + ++here; + + count += here; + if ( here > 0 ) + ++sets; + } + + stats->count += count; + stats->sets += sets; + stats->num_items += hp->items.nel; + stats->tab_size += hp->tab.nel; + stats->item_size = hp->items.size; + ++stats->num_hashes; + } +} + + +void hashstats_print( struct hashstats * stats, char const * name ) +{ + out_printf( "%s table: %d+%d+%d (%dK+%luK+%luK) items+table+hash, %f density\n", + name, + stats->count, + stats->num_items, + stats->tab_size, + stats->num_items * stats->item_size / 1024, + (long unsigned)stats->tab_size * sizeof( ITEM * * ) / 1024, + (long unsigned)stats->num_hashes * sizeof( struct hash ) / 1024, + (float)stats->count / (float)stats->sets ); +} + + +void hashdone( struct hash * hp ) +{ + if ( !hp ) + return; + if ( DEBUG_MEM || DEBUG_PROFILE ) + hashstat( hp ); + hash_free( hp ); +} diff --git a/src/boost/tools/build/src/engine/hash.h b/src/boost/tools/build/src/engine/hash.h new file mode 100644 index 000000000..4088894e3 --- /dev/null +++ b/src/boost/tools/build/src/engine/hash.h @@ -0,0 +1,99 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * hash.h - simple in-memory hashing routines + */ + +#ifndef BOOST_JAM_HASH_H +#define BOOST_JAM_HASH_H + +#include "config.h" +#include "object.h" + +/* + * An opaque struct representing an item in the hash table. The first element of + * every struct stored in the table must be an OBJECT * which is treated as the + * key. + */ +typedef struct hashdata HASHDATA; + +/* + * hashinit() - initialize a hash table, returning a handle. + * + * Parameters: + * datalen - item size + * name - used for debugging + */ +struct hash * hashinit( int32_t datalen, char const * name ); + +/* + * hash_free() - free a hash table, given its handle + */ +void hash_free( struct hash * ); +void hashdone( struct hash * ); + +typedef void (* hashenumerate_f)( void *, void * ); + +/* + * hashenumerate() - call f(i, data) on each item, i in the hash table. The + * enumeration order is unspecified. + */ +void hashenumerate( struct hash *, void (* f)( void *, void * ), void * data ); + +template +void hash_enumerate( struct hash * h, void (* f)(T *, D *), D * data) +{ + hashenumerate(h, reinterpret_cast(f), data); +} +template +void hash_enumerate( struct hash * h, void (* f)(T *, D *)) +{ + hashenumerate(h, reinterpret_cast(f), nullptr); +} + +/* + * hash_insert() - insert a new item in a hash table, or return an existing one. + * + * Preconditions: + * - hp must be a hash table created by hashinit() + * - key must be an object created by object_new() + * + * Postconditions: + * - if the key does not already exist in the hash table, *found == 0 and the + * result will be a pointer to an uninitialized item. The key of the new + * item must be set to a value equal to key before any further operations on + * the hash table except hashdone(). + * - if the key is present then *found == 1 and the result is a pointer to the + * existing record. + */ +HASHDATA * hash_insert( struct hash *, OBJECT * key, int32_t * found ); + +/* + * hash_find() - find a record in the table or NULL if none exists + */ +HASHDATA * hash_find( struct hash *, OBJECT * key ); + +struct hashstats { + int count; + int num_items; + int tab_size; + int item_size; + int sets; + int num_hashes; +}; + +void hashstats_init( struct hashstats * stats ); +void hashstats_add( struct hashstats * stats, struct hash * ); +void hashstats_print( struct hashstats * stats, char const * name ); + +#endif diff --git a/src/boost/tools/build/src/engine/hcache.cpp b/src/boost/tools/build/src/engine/hcache.cpp new file mode 100644 index 000000000..f46f69bf9 --- /dev/null +++ b/src/boost/tools/build/src/engine/hcache.cpp @@ -0,0 +1,534 @@ +/* + * This file has been donated to Jam. + */ + +/* + * Craig W. McPheeters, Alias|Wavefront. + * + * hcache.c hcache.h - handle caching of #includes in source files. + * + * Create a cache of files scanned for headers. When starting jam, look for the + * cache file and load it if present. When finished the binding phase, create a + * new header cache. The cache contains files, their timestamps and the header + * files found in their scan. During the binding phase of jam, look in the + * header cache first for the headers contained in a file. If the cache is + * present and valid, use its contents. This results in dramatic speedups with + * large projects (e.g. 3min -> 1min startup for one project.) + * + * External routines: + * hcache_init() - read and parse the local .jamdeps file. + * hcache_done() - write a new .jamdeps file. + * hcache() - return list of headers on target. Use cache or do a scan. + * + * The dependency file format is an ASCII file with 1 line per target. Each line + * has the following fields: + * @boundname@ timestamp_sec timestamp_nsec @file@ @file@ @file@ ... + */ + +#include "config.h" + +#ifdef OPT_HEADER_CACHE_EXT + +#include "jam.h" +#include "hcache.h" + +#include "hash.h" +#include "headers.h" +#include "lists.h" +#include "modules.h" +#include "object.h" +#include "parse.h" +#include "regexp.h" +#include "rules.h" +#include "search.h" +#include "timestamp.h" +#include "variable.h" +#include "output.h" + +#include +#include + +typedef struct hcachedata HCACHEDATA ; + +struct hcachedata +{ + OBJECT * boundname; + timestamp time; + LIST * includes; + LIST * hdrscan; /* the HDRSCAN value for this target */ + int age; /* if too old, we will remove it from cache */ + HCACHEDATA * next; +}; + + +static struct hash * hcachehash = 0; +static HCACHEDATA * hcachelist = 0; + +static int queries = 0; +static int hits = 0; + +#define CACHE_FILE_VERSION "version 5" +#define CACHE_RECORD_HEADER "header" +#define CACHE_RECORD_END "end" + + +/* + * Return the name of the header cache file. May return NULL. + * + * The user sets this by setting the HCACHEFILE variable in a Jamfile. We cache + * the result so the user can not change the cache file during header scanning. + */ + +static const char * cache_name( void ) +{ + static OBJECT * name = 0; + if ( !name ) + { + LIST * const hcachevar = var_get( root_module(), constant_HCACHEFILE ); + + if ( !list_empty( hcachevar ) ) + { + TARGET * const t = bindtarget( list_front( hcachevar ) ); + + pushsettings( root_module(), t->settings ); + /* Do not expect the cache file to be generated, so pass 0 as the + * third argument to search. Expect the location to be specified via + * LOCATE, so pass 0 as the fourth argument. + */ + object_free( t->boundname ); + t->boundname = search( t->name, &t->time, 0, 0 ); + popsettings( root_module(), t->settings ); + + name = object_copy( t->boundname ); + } + } + return name ? object_str( name ) : 0; +} + + +/* + * Return the maximum age a cache entry can have before it is purged from the + * cache. + */ + +static int cache_maxage( void ) +{ + int age = 100; + LIST * const var = var_get( root_module(), constant_HCACHEMAXAGE ); + if ( !list_empty( var ) ) + { + age = atoi( object_str( list_front( var ) ) ); + if ( age < 0 ) + age = 0; + } + return age; +} + + +/* + * Read a netstring. The caveat is that the string can not contain ASCII 0. The + * returned value is as returned by object_new(). + */ + +OBJECT * read_netstring( FILE * f ) +{ + unsigned long len; + static char * buf = NULL; + static unsigned long buf_len = 0; + + if ( fscanf( f, " %9lu", &len ) != 1 ) + return NULL; + if ( fgetc( f ) != (int)'\t' ) + return NULL; + + if ( len > 1024 * 64 ) + return NULL; /* sanity check */ + + if ( len > buf_len ) + { + unsigned long new_len = buf_len * 2; + if ( new_len < len ) + new_len = len; + buf = (char *)BJAM_REALLOC( buf, new_len + 1 ); + if ( buf ) + buf_len = new_len; + } + + if ( !buf ) + return NULL; + + if ( fread( buf, 1, len, f ) != len ) + return NULL; + if ( fgetc( f ) != (int)'\n' ) + return NULL; + + buf[ len ] = 0; + return object_new( buf ); +} + + +/* + * Write a netstring. + */ + +void write_netstring( FILE * f, char const * s ) +{ + if ( !s ) + s = ""; + fprintf( f, "%lu\t%s\n", (long unsigned)strlen( s ), s ); +} + + +void hcache_init() +{ + FILE * f; + OBJECT * version = 0; + int header_count = 0; + const char * hcachename; + + if ( hcachehash ) + return; + + hcachehash = hashinit( sizeof( HCACHEDATA ), "hcache" ); + + if ( !( hcachename = cache_name() ) ) + return; + + if ( !( f = fopen( hcachename, "rb" ) ) ) + { + if ( errno != ENOENT ) + err_printf( "[errno %d] failed to read hcache file '%s': %s", + errno, hcachename, strerror(errno) ); + return; + } + + version = read_netstring( f ); + + if ( !version || strcmp( object_str( version ), CACHE_FILE_VERSION ) ) + goto bail; + + while ( 1 ) + { + HCACHEDATA cachedata; + HCACHEDATA * c; + OBJECT * record_type = 0; + OBJECT * time_secs_str = 0; + OBJECT * time_nsecs_str = 0; + OBJECT * age_str = 0; + OBJECT * includes_count_str = 0; + OBJECT * hdrscan_count_str = 0; + int i; + int count; + LIST * l; + int found; + + cachedata.boundname = 0; + cachedata.includes = 0; + cachedata.hdrscan = 0; + + record_type = read_netstring( f ); + if ( !record_type ) + { + err_printf( "invalid %s\n", hcachename ); + goto cleanup; + } + if ( !strcmp( object_str( record_type ), CACHE_RECORD_END ) ) + { + object_free( record_type ); + break; + } + if ( strcmp( object_str( record_type ), CACHE_RECORD_HEADER ) ) + { + err_printf( "invalid %s with record separator <%s>\n", + hcachename, record_type ? object_str( record_type ) : "" ); + goto cleanup; + } + + cachedata.boundname = read_netstring( f ); + time_secs_str = read_netstring( f ); + time_nsecs_str = read_netstring( f ); + age_str = read_netstring( f ); + includes_count_str = read_netstring( f ); + + if ( !cachedata.boundname || !time_secs_str || !time_nsecs_str || + !age_str || !includes_count_str ) + { + err_printf( "invalid %s\n", hcachename ); + goto cleanup; + } + + timestamp_init( &cachedata.time, atoi( object_str( time_secs_str ) ), + atoi( object_str( time_nsecs_str ) ) ); + cachedata.age = atoi( object_str( age_str ) ) + 1; + + count = atoi( object_str( includes_count_str ) ); + for ( l = L0, i = 0; i < count; ++i ) + { + OBJECT * const s = read_netstring( f ); + if ( !s ) + { + err_printf( "invalid %s\n", hcachename ); + list_free( l ); + goto cleanup; + } + l = list_push_back( l, s ); + } + cachedata.includes = l; + + hdrscan_count_str = read_netstring( f ); + if ( !hdrscan_count_str ) + { + err_printf( "invalid %s\n", hcachename ); + goto cleanup; + } + + count = atoi( object_str( hdrscan_count_str ) ); + for ( l = L0, i = 0; i < count; ++i ) + { + OBJECT * const s = read_netstring( f ); + if ( !s ) + { + err_printf( "invalid %s\n", hcachename ); + list_free( l ); + goto cleanup; + } + l = list_push_back( l, s ); + } + cachedata.hdrscan = l; + + c = (HCACHEDATA *)hash_insert( hcachehash, cachedata.boundname, &found ) + ; + if ( !found ) + { + c->boundname = cachedata.boundname; + c->includes = cachedata.includes; + c->hdrscan = cachedata.hdrscan; + c->age = cachedata.age; + timestamp_copy( &c->time, &cachedata.time ); + } + else + { + err_printf( "can not insert header cache item, bailing on %s" + "\n", hcachename ); + goto cleanup; + } + + c->next = hcachelist; + hcachelist = c; + + ++header_count; + + object_free( record_type ); + object_free( time_secs_str ); + object_free( time_nsecs_str ); + object_free( age_str ); + object_free( includes_count_str ); + object_free( hdrscan_count_str ); + continue; + +cleanup: + + if ( record_type ) object_free( record_type ); + if ( time_secs_str ) object_free( time_secs_str ); + if ( time_nsecs_str ) object_free( time_nsecs_str ); + if ( age_str ) object_free( age_str ); + if ( includes_count_str ) object_free( includes_count_str ); + if ( hdrscan_count_str ) object_free( hdrscan_count_str ); + + if ( cachedata.boundname ) object_free( cachedata.boundname ); + if ( cachedata.includes ) list_free( cachedata.includes ); + if ( cachedata.hdrscan ) list_free( cachedata.hdrscan ); + + goto bail; + } + + if ( DEBUG_HEADER ) + out_printf( "hcache read from file %s\n", hcachename ); + +bail: + if ( version ) + object_free( version ); + fclose( f ); +} + + +void hcache_done() +{ + FILE * f; + HCACHEDATA * c; + int header_count = 0; + const char * hcachename; + int maxage; + + if ( !hcachehash ) + return; + + if ( !( hcachename = cache_name() ) ) + goto cleanup; + + if ( !( f = fopen( hcachename, "wb" ) ) ) + { + err_printf( "[errno %d] failed to write hcache file '%s': %s", + errno, hcachename, strerror(errno) ); + goto cleanup; + } + + maxage = cache_maxage(); + + /* Print out the version. */ + write_netstring( f, CACHE_FILE_VERSION ); + + c = hcachelist; + for ( c = hcachelist; c; c = c->next ) + { + LISTITER iter; + LISTITER end; + char time_secs_str[ 30 ]; + char time_nsecs_str[ 30 ]; + char age_str[ 30 ]; + char includes_count_str[ 30 ]; + char hdrscan_count_str[ 30 ]; + + if ( maxage == 0 ) + c->age = 0; + else if ( c->age > maxage ) + continue; + + sprintf( includes_count_str, "%lu", (long unsigned)list_length( + c->includes ) ); + sprintf( hdrscan_count_str, "%lu", (long unsigned)list_length( + c->hdrscan ) ); + sprintf( time_secs_str, "%lu", (long unsigned)c->time.secs ); + sprintf( time_nsecs_str, "%lu", (long unsigned)c->time.nsecs ); + sprintf( age_str, "%lu", (long unsigned)c->age ); + + write_netstring( f, CACHE_RECORD_HEADER ); + write_netstring( f, object_str( c->boundname ) ); + write_netstring( f, time_secs_str ); + write_netstring( f, time_nsecs_str ); + write_netstring( f, age_str ); + write_netstring( f, includes_count_str ); + for ( iter = list_begin( c->includes ), end = list_end( c->includes ); + iter != end; iter = list_next( iter ) ) + write_netstring( f, object_str( list_item( iter ) ) ); + write_netstring( f, hdrscan_count_str ); + for ( iter = list_begin( c->hdrscan ), end = list_end( c->hdrscan ); + iter != end; iter = list_next( iter ) ) + write_netstring( f, object_str( list_item( iter ) ) ); + fputs( "\n", f ); + ++header_count; + } + write_netstring( f, CACHE_RECORD_END ); + + if ( DEBUG_HEADER ) + out_printf( "hcache written to %s. %d dependencies, %.0f%% hit rate\n", + hcachename, header_count, queries ? 100.0 * hits / queries : 0 ); + + fclose ( f ); + +cleanup: + for ( c = hcachelist; c; c = c->next ) + { + list_free( c->includes ); + list_free( c->hdrscan ); + object_free( c->boundname ); + } + + hcachelist = 0; + if ( hcachehash ) + hashdone( hcachehash ); + hcachehash = 0; +} + + +LIST * hcache( TARGET * t, int rec, regexp * re[], LIST * hdrscan ) +{ + HCACHEDATA * c; + + ++queries; + + if ( ( c = (HCACHEDATA *)hash_find( hcachehash, t->boundname ) ) ) + { + if ( !timestamp_cmp( &c->time, &t->time ) ) + { + LIST * const l1 = hdrscan; + LIST * const l2 = c->hdrscan; + LISTITER iter1 = list_begin( l1 ); + LISTITER const end1 = list_end( l1 ); + LISTITER iter2 = list_begin( l2 ); + LISTITER const end2 = list_end( l2 ); + while ( iter1 != end1 && iter2 != end2 ) + { + if ( !object_equal( list_item( iter1 ), list_item( iter2 ) ) ) + iter1 = end1; + else + { + iter1 = list_next( iter1 ); + iter2 = list_next( iter2 ); + } + } + if ( iter1 != end1 || iter2 != end2 ) + { + if ( DEBUG_HEADER ) + { + out_printf( "HDRSCAN out of date in cache for %s\n", + object_str( t->boundname ) ); + out_printf(" real : "); + list_print( hdrscan ); + out_printf( "\n cached: " ); + list_print( c->hdrscan ); + out_printf( "\n" ); + } + + list_free( c->includes ); + list_free( c->hdrscan ); + c->includes = L0; + c->hdrscan = L0; + } + else + { + if ( DEBUG_HEADER ) + out_printf( "using header cache for %s\n", object_str( + t->boundname ) ); + c->age = 0; + ++hits; + return list_copy( c->includes ); + } + } + else + { + if ( DEBUG_HEADER ) + out_printf ("header cache out of date for %s\n", object_str( + t->boundname ) ); + list_free( c->includes ); + list_free( c->hdrscan ); + c->includes = L0; + c->hdrscan = L0; + } + } + else + { + int found; + c = (HCACHEDATA *)hash_insert( hcachehash, t->boundname, &found ); + if ( !found ) + { + c->boundname = object_copy( t->boundname ); + c->next = hcachelist; + hcachelist = c; + } + } + + /* 'c' points at the cache entry. Its out of date. */ + { + LIST * const l = headers1( L0, t->boundname, rec, re ); + + timestamp_copy( &c->time, &t->time ); + c->age = 0; + c->includes = list_copy( l ); + c->hdrscan = list_copy( hdrscan ); + + return l; + } +} + +#endif /* OPT_HEADER_CACHE_EXT */ diff --git a/src/boost/tools/build/src/engine/hcache.h b/src/boost/tools/build/src/engine/hcache.h new file mode 100644 index 000000000..95267c267 --- /dev/null +++ b/src/boost/tools/build/src/engine/hcache.h @@ -0,0 +1,20 @@ +/* + * This file is not part of Jam + */ + +/* + * hcache.h - handle #includes in source files + */ +#ifndef HCACHE_H +#define HCACHE_H + +#include "config.h" +#include "lists.h" +#include "regexp.h" +#include "rules.h" + +void hcache_init( void ); +void hcache_done( void ); +LIST * hcache( TARGET * t, int rec, regexp * re[], LIST * hdrscan ); + +#endif diff --git a/src/boost/tools/build/src/engine/hdrmacro.cpp b/src/boost/tools/build/src/engine/hdrmacro.cpp new file mode 100644 index 000000000..946a5fb44 --- /dev/null +++ b/src/boost/tools/build/src/engine/hdrmacro.cpp @@ -0,0 +1,146 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * hdrmacro.c - handle header files that define macros used in #include + * statements. + * + * we look for lines like "#define MACRO <....>" or '#define MACRO " "' in + * the target file. When found, we then phony up a rule invocation like: + * + * $(HDRRULE) : ; + * + * External routines: + * headers1() - scan a target for "#include MACRO" lines and try to resolve + * them when needed + * + * Internal routines: + * headers1() - using regexp, scan a file and build include LIST + */ + +#include "jam.h" +#include "hdrmacro.h" + +#include "compile.h" +#include "hash.h" +#include "lists.h" +#include "object.h" +#include "parse.h" +#include "rules.h" +#include "jam_strings.h" +#include "subst.h" +#include "variable.h" +#include "output.h" + +#include +#include + +/* this type is used to store a dictionary of file header macros */ +typedef struct header_macro +{ + OBJECT * symbol; + OBJECT * filename; /* we could maybe use a LIST here ?? */ +} HEADER_MACRO; + +static struct hash * header_macros_hash = 0; + + +/* + * headers() - scan a target for include files and call HDRRULE + */ + +#define MAXINC 10 + +void macro_headers( TARGET * t ) +{ + static regexp * re = 0; + FILE * f; + char buf[ 1024 ]; + + if ( DEBUG_HEADER ) + out_printf( "macro header scan for %s\n", object_str( t->name ) ); + + /* This regexp is used to detect lines of the form + * "#define MACRO <....>" or "#define MACRO "....." + * in the header macro files. + */ + if ( !re ) + { + OBJECT * const re_str = object_new( + "^[ ]*#[ ]*define[ ]*([A-Za-z][A-Za-z0-9_]*)[ ]*" + "[<\"]([^\">]*)[\">].*$" ); + re = regex_compile( re_str ); + object_free( re_str ); + } + + if ( !( f = fopen( object_str( t->boundname ), "r" ) ) ) + { + err_printf( "[errno %d] failed to scan include file '%s': %s", + errno, object_str( t->boundname ), strerror(errno) ); + return; + } + + while ( fgets( buf, sizeof( buf ), f ) ) + { + HEADER_MACRO var; + HEADER_MACRO * v = &var; + + if ( regexec( re, buf ) && re->startp[ 1 ] ) + { + OBJECT * symbol; + int found; + /* we detected a line that looks like "#define MACRO filename */ + ( (char *)re->endp[ 1 ] )[ 0 ] = '\0'; + ( (char *)re->endp[ 2 ] )[ 0 ] = '\0'; + + if ( DEBUG_HEADER ) + out_printf( "macro '%s' used to define filename '%s' in '%s'\n", + re->startp[ 1 ], re->startp[ 2 ], object_str( t->boundname ) + ); + + /* add macro definition to hash table */ + if ( !header_macros_hash ) + header_macros_hash = hashinit( sizeof( HEADER_MACRO ), + "hdrmacros" ); + + symbol = object_new( re->startp[ 1 ] ); + v = (HEADER_MACRO *)hash_insert( header_macros_hash, symbol, &found + ); + if ( !found ) + { + v->symbol = symbol; + v->filename = object_new( re->startp[ 2 ] ); /* never freed */ + } + else + object_free( symbol ); + /* XXXX: FOR NOW, WE IGNORE MULTIPLE MACRO DEFINITIONS !! */ + /* WE MIGHT AS WELL USE A LIST TO STORE THEM.. */ + } + } + + fclose( f ); +} + + +OBJECT * macro_header_get( OBJECT * macro_name ) +{ + HEADER_MACRO * v; + if ( header_macros_hash && ( v = (HEADER_MACRO *)hash_find( + header_macros_hash, macro_name ) ) ) + { + if ( DEBUG_HEADER ) + out_printf( "### macro '%s' evaluated to '%s'\n", object_str( macro_name + ), object_str( v->filename ) ); + return v->filename; + } + return 0; +} diff --git a/src/boost/tools/build/src/engine/hdrmacro.h b/src/boost/tools/build/src/engine/hdrmacro.h new file mode 100644 index 000000000..1489aef9c --- /dev/null +++ b/src/boost/tools/build/src/engine/hdrmacro.h @@ -0,0 +1,22 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * hdrmacro.h - parses header files for #define MACRO or + * #define MACRO "filename" definitions + */ + +#ifndef HDRMACRO_SW20111118_H +#define HDRMACRO_SW20111118_H + +#include "config.h" +#include "object.h" +#include "rules.h" + +void macro_headers( TARGET * ); +OBJECT * macro_header_get( OBJECT * macro_name ); + +#endif diff --git a/src/boost/tools/build/src/engine/headers.cpp b/src/boost/tools/build/src/engine/headers.cpp new file mode 100644 index 000000000..79f393ad7 --- /dev/null +++ b/src/boost/tools/build/src/engine/headers.cpp @@ -0,0 +1,207 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * headers.c - handle #includes in source files + * + * Using regular expressions provided as the variable $(HDRSCAN), headers() + * searches a file for #include files and phonies up a rule invocation: + * $(HDRRULE) : ; + * + * External routines: + * headers() - scan a target for include files and call HDRRULE + * + * Internal routines: + * headers1() - using regexp, scan a file and build include LIST + */ + +#include "jam.h" +#include "headers.h" + +#include "compile.h" +#include "hdrmacro.h" +#include "lists.h" +#include "modules.h" +#include "object.h" +#include "parse.h" +#include "rules.h" +#include "subst.h" +#include "variable.h" +#include "output.h" + +#ifdef OPT_HEADER_CACHE_EXT +# include "hcache.h" +#endif + +#include +#include + +#ifndef OPT_HEADER_CACHE_EXT +static LIST * headers1( LIST *, OBJECT * file, int rec, regexp * re[] ); +#endif + + +/* + * headers() - scan a target for include files and call HDRRULE + */ + +#define MAXINC 10 + +void headers( TARGET * t ) +{ + LIST * hdrscan; + LIST * hdrrule; + #ifndef OPT_HEADER_CACHE_EXT + LIST * headlist = L0; + #endif + regexp * re[ MAXINC ]; + int rec = 0; + LISTITER iter; + LISTITER end; + + hdrscan = var_get( root_module(), constant_HDRSCAN ); + if ( list_empty( hdrscan ) ) + return; + + hdrrule = var_get( root_module(), constant_HDRRULE ); + if ( list_empty( hdrrule ) ) + return; + + if ( DEBUG_HEADER ) + out_printf( "header scan %s\n", object_str( t->name ) ); + + /* Compile all regular expressions in HDRSCAN */ + iter = list_begin( hdrscan ); + end = list_end( hdrscan ); + for ( ; ( rec < MAXINC ) && iter != end; iter = list_next( iter ) ) + { + re[ rec++ ] = regex_compile( list_item( iter ) ); + } + + /* Doctor up call to HDRRULE rule */ + /* Call headers1() to get LIST of included files. */ + { + FRAME frame[ 1 ]; + frame_init( frame ); + lol_add( frame->args, list_new( object_copy( t->name ) ) ); +#ifdef OPT_HEADER_CACHE_EXT + lol_add( frame->args, hcache( t, rec, re, hdrscan ) ); +#else + lol_add( frame->args, headers1( headlist, t->boundname, rec, re ) ); +#endif + + if ( lol_get( frame->args, 1 ) ) + { + OBJECT * rulename = list_front( hdrrule ); + /* The third argument to HDRRULE is the bound name of $(<). */ + lol_add( frame->args, list_new( object_copy( t->boundname ) ) ); + list_free( evaluate_rule( bindrule( rulename, frame->module ), rulename, frame ) ); + } + + /* Clean up. */ + frame_free( frame ); + } +} + + +/* + * headers1() - using regexp, scan a file and build include LIST. + */ + +#ifndef OPT_HEADER_CACHE_EXT +static +#endif +LIST * headers1( LIST * l, OBJECT * file, int rec, regexp * re[] ) +{ + FILE * f; + char buf[ 1024 ]; + int i; + static regexp * re_macros = 0; + +#ifdef OPT_IMPROVED_PATIENCE_EXT + static int count = 0; + ++count; + if ( ( ( count == 100 ) || !( count % 1000 ) ) && DEBUG_MAKE ) + { + out_printf( "...patience...\n" ); + out_flush(); + } +#endif + + /* The following regexp is used to detect cases where a file is included + * through a line like "#include MACRO". + */ + if ( re_macros == 0 ) + { + OBJECT * const re_str = object_new( + "#[ \t]*include[ \t]*([A-Za-z][A-Za-z0-9_]*).*$" ); + re_macros = regex_compile( re_str ); + object_free( re_str ); + } + + if ( !( f = fopen( object_str( file ), "r" ) ) ) + { + /* No source files will be generated when -n flag is passed */ + if ( !globs.noexec || errno != ENOENT ) + err_printf( "[errno %d] failed to scan file '%s': %s", + errno, object_str( file ), strerror(errno) ); + return l; + } + + while ( fgets( buf, sizeof( buf ), f ) ) + { + for ( i = 0; i < rec; ++i ) + if ( regexec( re[ i ], buf ) && re[ i ]->startp[ 1 ] ) + { + ( (char *)re[ i ]->endp[ 1 ] )[ 0 ] = '\0'; + if ( DEBUG_HEADER ) + out_printf( "header found: %s\n", re[ i ]->startp[ 1 ] ); + l = list_push_back( l, object_new( re[ i ]->startp[ 1 ] ) ); + } + + /* Special treatment for #include MACRO. */ + if ( regexec( re_macros, buf ) && re_macros->startp[ 1 ] ) + { + OBJECT * header_filename; + OBJECT * macro_name; + + ( (char *)re_macros->endp[ 1 ] )[ 0 ] = '\0'; + + if ( DEBUG_HEADER ) + out_printf( "macro header found: %s", re_macros->startp[ 1 ] ); + + macro_name = object_new( re_macros->startp[ 1 ] ); + header_filename = macro_header_get( macro_name ); + object_free( macro_name ); + if ( header_filename ) + { + if ( DEBUG_HEADER ) + out_printf( " resolved to '%s'\n", object_str( header_filename ) + ); + l = list_push_back( l, object_copy( header_filename ) ); + } + else + { + if ( DEBUG_HEADER ) + out_printf( " ignored !!\n" ); + } + } + } + + fclose( f ); + return l; +} + + +void regerror( char const * s ) +{ + out_printf( "re error %s\n", s ); +} diff --git a/src/boost/tools/build/src/engine/headers.h b/src/boost/tools/build/src/engine/headers.h new file mode 100644 index 000000000..a875c2d87 --- /dev/null +++ b/src/boost/tools/build/src/engine/headers.h @@ -0,0 +1,26 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * headers.h - handle #includes in source files + */ + +#ifndef HEADERS_SW20111118_H +#define HEADERS_SW20111118_H + +#include "config.h" +#include "object.h" +#include "rules.h" +#include "regexp.h" + +void headers( TARGET * t ); + +#ifdef OPT_HEADER_CACHE_EXT +struct regexp; +LIST * headers1( LIST *l, OBJECT * file, int rec, struct regexp *re[] ); +#endif + +#endif diff --git a/src/boost/tools/build/src/engine/jam.cpp b/src/boost/tools/build/src/engine/jam.cpp new file mode 100644 index 000000000..5c3baff7c --- /dev/null +++ b/src/boost/tools/build/src/engine/jam.cpp @@ -0,0 +1,723 @@ +/* + * /+\ + * +\ Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * \+/ + * + * This file is part of jam. + * + * License is hereby granted to use this software and distribute it freely, as + * long as this copyright notice is retained and modifications are clearly + * marked. + * + * ALL WARRANTIES ARE HEREBY DISCLAIMED. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2018 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * jam.c - make redux + * + * See Jam.html for usage information. + * + * These comments document the code. + * + * The top half of the code is structured such: + * + * jam + * / | \ + * +---+ | \ + * / | \ + * jamgram option \ + * / | \ \ + * / | \ \ + * / | \ | + * scan | compile make + * | | / | \ / | \ + * | | / | \ / | \ + * | | / | \ / | \ + * jambase parse | rules search make1 + * | | | \ + * | | | \ + * | | | \ + * builtins timestamp command execute + * | + * | + * | + * filesys + * + * + * The support routines are called by all of the above, but themselves are + * layered thus: + * + * variable|expand + * / | | + * / | | + * / | | + * lists | pathsys + * \ | + * \ hash + * \ | + * \ | + * \ | + * \ | + * \ | + * object + * + * Roughly, the modules are: + * + * builtins.c - jam's built-in rules + * command.c - maintain lists of commands + * compile.c - compile parsed jam statements + * exec*.c - execute a shell script on a specific OS + * file*.c - scan directories and archives on a specific OS + * hash.c - simple in-memory hashing routines + * hdrmacro.c - handle header file parsing for filename macro definitions + * headers.c - handle #includes in source files + * jamgram.y - jam grammar + * lists.c - maintain lists of strings + * make.c - bring a target up to date, once rules are in place + * make1.c - execute command to bring targets up to date + * object.c - string manipulation routines + * option.c - command line option processing + * parse.c - make and destroy parse trees as driven by the parser + * path*.c - manipulate file names on a specific OS + * hash.c - simple in-memory hashing routines + * regexp.c - Henry Spencer's regexp + * rules.c - access to RULEs, TARGETs, and ACTIONs + * scan.c - the jam yacc scanner + * search.c - find a target along $(SEARCH) or $(LOCATE) + * timestamp.c - get the timestamp of a file or archive member + * variable.c - handle jam multi-element variables + */ + + +#include "jam.h" + +#include "patchlevel.h" + +/* Keep JAMVERSYM in sync with VERSION. */ +/* It can be accessed as $(JAMVERSION) in the Jamfile. */ +#define JAM_STRINGIZE(X) JAM_DO_STRINGIZE(X) +#define JAM_DO_STRINGIZE(X) #X +#define VERSION_MAJOR_SYM JAM_STRINGIZE(VERSION_MAJOR) +#define VERSION_MINOR_SYM JAM_STRINGIZE(VERSION_MINOR) +#define VERSION_PATCH_SYM JAM_STRINGIZE(VERSION_PATCH) +#define VERSION VERSION_MAJOR_SYM "." VERSION_MINOR_SYM +#define JAMVERSYM "JAMVERSION=" VERSION + +#include "builtins.h" +#include "class.h" +#include "compile.h" +#include "constants.h" +#include "debugger.h" +#include "filesys.h" +#include "function.h" +#include "hcache.h" +#include "lists.h" +#include "make.h" +#include "object.h" +#include "option.h" +#include "output.h" +#include "parse.h" +#include "cwd.h" +#include "rules.h" +#include "scan.h" +#include "search.h" +#include "startup.h" +#include "jam_strings.h" +#include "timestamp.h" +#include "variable.h" +#include "execcmd.h" +#include "sysinfo.h" + +#include +#include + +/* Macintosh is "special" */ +#ifdef OS_MAC +# include +#endif + +/* And UNIX for this. */ +#ifdef unix +# include +# include +#endif + +struct globs globs = +{ + 0, /* noexec */ + 1, /* jobs */ + 0, /* quitquick */ + 0, /* newestfirst */ + 0, /* pipes action stdout and stderr merged to action output */ +#ifdef OS_MAC + { 0, 0 }, /* debug - suppress tracing output */ +#else + { 0, 1 }, /* debug ... */ +#endif + 0, /* output commands, not run them */ + 0, /* action timeout */ + 0 /* maximum buffer size zero is all output */ +}; + +/* Symbols to be defined as true for use in Jambase. */ +static const char * othersyms[] = { OSMAJOR, OSMINOR, OSPLAT, JAMVERSYM, 0 }; + + +/* on Win32-LCC */ +#if defined( OS_NT ) && defined( __LCC__ ) +# define use_environ _environ +#endif + +#if defined( __MWERKS__) +# define use_environ _environ + extern char * * _environ; +#endif + +#ifndef use_environ +# define use_environ environ +# if !defined( __WATCOM__ ) && !defined( OS_OS2 ) && !defined( OS_NT ) + extern char **environ; +# endif +#endif + +#if YYDEBUG != 0 + extern int yydebug; +#endif + +#ifndef NDEBUG +static void run_unit_tests() +{ +# if defined( USE_EXECNT ) + extern void execnt_unit_test(); + execnt_unit_test(); +# endif + string_unit_test(); +} +#endif + +int anyhow = 0; + +#ifdef HAVE_PYTHON + extern PyObject * bjam_call ( PyObject * self, PyObject * args ); + extern PyObject * bjam_import_rule ( PyObject * self, PyObject * args ); + extern PyObject * bjam_define_action( PyObject * self, PyObject * args ); + extern PyObject * bjam_variable ( PyObject * self, PyObject * args ); + extern PyObject * bjam_backtrace ( PyObject * self, PyObject * args ); + extern PyObject * bjam_caller ( PyObject * self, PyObject * args ); + int python_optimize = 1; /* Set Python optimzation on by default */ +#endif + +void regex_done(); + +char const * saved_argv0; + +static void usage( const char * progname ) +{ + err_printf("\nusage: %s [ options ] targets...\n\n", progname); + + err_printf("-a Build all targets, even if they are current.\n"); + err_printf("-dx Set the debug level to x (0-13,console,mi).\n"); + err_printf("-fx Read x instead of bootstrap.\n"); + /* err_printf( "-g Build from newest sources first.\n" ); */ + err_printf("-jx Run up to x shell commands concurrently.\n"); + err_printf("-lx Limit actions to x number of seconds after which they are stopped.\n"); + err_printf("-mx Maximum target output saved (kb), default is to save all output.\n"); + err_printf("-n Don't actually execute the updating actions.\n"); + err_printf("-ox Mirror all output to file x.\n"); + err_printf("-px x=0, pipes action stdout and stderr merged into action output.\n"); + err_printf("-q Quit quickly as soon as a target fails.\n"); + err_printf("-sx=y Set variable x=y, overriding environment.\n"); + err_printf("-tx Rebuild x, even if it is up-to-date.\n"); + err_printf("-v Print the version of jam and exit.\n"); +#ifdef HAVE_PYTHON + err_printf("-z Disable Python Optimization and enable asserts\n"); +#endif + err_printf("--x Option is ignored.\n\n"); + + b2::clean_exit( EXITBAD ); +} + +int guarded_main( int argc, char * * argv ) +{ + int n; + char * s; + struct bjam_option optv[ N_OPTS ]; + int status = 0; + int arg_c = argc; + char * * arg_v = argv; + char const * progname = argv[ 0 ]; + module_t * environ_module; + int is_debugger; + b2::system_info sys_info; + + saved_argv0 = argv[ 0 ]; + last_update_now_status = 0; + +#ifdef JAM_DEBUGGER + + is_debugger = 0; + + if ( getoptions( argc - 1, argv + 1, "-:l:m:d:j:p:f:gs:t:ano:qv", optv ) < 0 ) + usage( progname ); + + if ( ( s = getoptval( optv, 'd', 0 ) ) ) + { + if ( strcmp( s, "mi" ) == 0 ) + { + debug_interface = DEBUG_INTERFACE_MI; + is_debugger = 1; + } + else if ( strcmp( s, "console" ) == 0 ) + { + debug_interface = DEBUG_INTERFACE_CONSOLE; + is_debugger = 1; + } + } + +#if NT + + if ( argc >= 3 ) + { + /* Check whether this instance is being run by the debugger. */ + size_t opt_len = strlen( debugger_opt ); + if ( strncmp( argv[ 1 ], debugger_opt, opt_len ) == 0 && + strncmp( argv[ 2 ], debugger_opt, opt_len ) == 0 ) + { + debug_init_handles( argv[ 1 ] + opt_len, argv[ 2 ] + opt_len ); + /* Fix up argc/argv to hide the internal options */ + arg_c = argc = (argc - 2); + argv[ 2 ] = argv[ 0 ]; + arg_v = argv = (argv + 2); + debug_interface = DEBUG_INTERFACE_CHILD; + } + } + + if ( is_debugger ) + { + return debugger(); + } + +#else + + if ( is_debugger ) + { + if ( setjmp( debug_child_data.jmp ) != 0 ) + { + arg_c = argc = debug_child_data.argc; + arg_v = argv = (char * *)debug_child_data.argv; + debug_interface = DEBUG_INTERFACE_CHILD; + } + else + { + return debugger(); + } + } + +#endif + +#endif + + --argc; + ++argv; + + #ifdef HAVE_PYTHON + #define OPTSTRING "-:l:m:d:j:p:f:gs:t:ano:qvz" + #else + #define OPTSTRING "-:l:m:d:j:p:f:gs:t:ano:qv" + #endif + + if ( getoptions( argc, argv, OPTSTRING, optv ) < 0 ) + { + usage( progname ); + } + + /* Set default parallel jobs to match cpu threads. This can be overridden + the usual way with -jX or PARALLELISM env var. */ + globs.jobs = sys_info.cpu_thread_count(); + + /* Version info. */ + if ( ( s = getoptval( optv, 'v', 0 ) ) ) + { + out_printf( "B2 Version %s. %s.\n", VERSION, OSMINOR ); + out_printf( " Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.\n" ); + out_printf( " Copyright 2001 David Turner.\n" ); + out_printf( " Copyright 2001-2004 David Abrahams.\n" ); + out_printf( " Copyright 2002-2019 Rene Rivera.\n" ); + out_printf( " Copyright 2003-2015 Vladimir Prus.\n" ); + out_printf( "\n DEFAULTS: jobs = %i\n", globs.jobs); + return EXITOK; + } + + /* Pick up interesting options. */ + if ( ( s = getoptval( optv, 'n', 0 ) ) ) + { + ++globs.noexec; + globs.debug[ 2 ] = 1; + } + + if ( ( s = getoptval( optv, 'p', 0 ) ) ) + { + /* Undocumented -p3 (acts like both -p1 -p2) means separate pipe action + * stdout and stderr. + */ + globs.pipe_action = atoi( s ); + if ( globs.pipe_action < 0 || 3 < globs.pipe_action ) + { + err_printf( "Invalid pipe descriptor '%d', valid values are -p[0..3]." + "\n", globs.pipe_action ); + b2::clean_exit( EXITBAD ); + } + } + + if ( ( s = getoptval( optv, 'q', 0 ) ) ) + globs.quitquick = 1; + + if ( ( s = getoptval( optv, 'a', 0 ) ) ) + anyhow++; + + if ( ( s = getoptval( optv, 'j', 0 ) ) ) + { + globs.jobs = atoi( s ); + if ( globs.jobs < 1 ) + { + err_printf( "Invalid value for the '-j' option.\n" ); + b2::clean_exit( EXITBAD ); + } + } + + if ( ( s = getoptval( optv, 'g', 0 ) ) ) + globs.newestfirst = 1; + + if ( ( s = getoptval( optv, 'l', 0 ) ) ) + globs.timeout = atoi( s ); + + if ( ( s = getoptval( optv, 'm', 0 ) ) ) + globs.max_buf = atoi( s ) * 1024; /* convert to kb */ + + #ifdef HAVE_PYTHON + if ( ( s = getoptval( optv, 'z', 0 ) ) ) + python_optimize = 0; /* disable python optimization */ + #endif + + /* Turn on/off debugging */ + for ( n = 0; ( s = getoptval( optv, 'd', n ) ); ++n ) + { + int i; + + /* First -d, turn off defaults. */ + if ( !n ) + for ( i = 0; i < DEBUG_MAX; ++i ) + globs.debug[i] = 0; + + i = atoi( s ); + + if ( ( i < 0 ) || ( i >= DEBUG_MAX ) ) + { + out_printf( "Invalid debug level '%s'.\n", s ); + continue; + } + + /* n turns on levels 1-n. */ + /* +n turns on level n. */ + if ( *s == '+' ) + globs.debug[ i ] = 1; + else while ( i ) + globs.debug[ i-- ] = 1; + } + + /* If an output file is specified, set globs.out to that. */ + if ( ( s = getoptval( optv, 'o', 0 ) ) ) + { + if ( !( globs.out = fopen( s, "w" ) ) ) + { + err_printf( "[errno %d] failed to write output file '%s': %s", + errno, s, strerror(errno) ); + b2::clean_exit( EXITBAD ); + } + /* ++globs.noexec; */ + } + + { + PROFILE_ENTER( MAIN ); + +#ifdef HAVE_PYTHON + { + PROFILE_ENTER( MAIN_PYTHON ); + Py_OptimizeFlag = python_optimize; + Py_Initialize(); + { + static PyMethodDef BjamMethods[] = { + {"call", bjam_call, METH_VARARGS, + "Call the specified bjam rule."}, + {"import_rule", bjam_import_rule, METH_VARARGS, + "Imports Python callable to bjam."}, + {"define_action", bjam_define_action, METH_VARARGS, + "Defines a command line action."}, + {"variable", bjam_variable, METH_VARARGS, + "Obtains a variable from bjam's global module."}, + {"backtrace", bjam_backtrace, METH_VARARGS, + "Returns bjam backtrace from the last call into Python."}, + {"caller", bjam_caller, METH_VARARGS, + "Returns the module from which the last call into Python is made."}, + {NULL, NULL, 0, NULL} + }; + + Py_InitModule( "bjam", BjamMethods ); + } + PROFILE_EXIT( MAIN_PYTHON ); + } +#endif + +#ifndef NDEBUG + run_unit_tests(); +#endif +#if YYDEBUG != 0 + if ( DEBUG_PARSE ) + yydebug = 1; +#endif + + /* Set JAMDATE. */ + { + timestamp current; + timestamp_current( ¤t ); + var_set( root_module(), constant_JAMDATE, list_new( outf_time( + ¤t ) ), VAR_SET ); + } + + /* Set JAM_VERSION. */ + var_set( root_module(), constant_JAM_VERSION, + list_push_back( list_push_back( list_new( + object_new( VERSION_MAJOR_SYM ) ), + object_new( VERSION_MINOR_SYM ) ), + object_new( VERSION_PATCH_SYM ) ), + VAR_SET ); + + /* Set JAMUNAME. */ +#ifdef unix + { + struct utsname u; + + if ( uname( &u ) >= 0 ) + { + var_set( root_module(), constant_JAMUNAME, + list_push_back( + list_push_back( + list_push_back( + list_push_back( + list_new( + object_new( u.sysname ) ), + object_new( u.nodename ) ), + object_new( u.release ) ), + object_new( u.version ) ), + object_new( u.machine ) ), VAR_SET ); + } + } +#endif /* unix */ + + /* Set JAM_TIMESTAMP_RESOLUTION. */ + { + timestamp fmt_resolution[ 1 ]; + file_supported_fmt_resolution( fmt_resolution ); + var_set( root_module(), constant_JAM_TIMESTAMP_RESOLUTION, list_new( + object_new( timestamp_timestr( fmt_resolution ) ) ), VAR_SET ); + } + + /* Load up environment variables. */ + + /* First into the global module, with splitting, for backward + * compatibility. + */ + var_defines( root_module(), use_environ, 1 ); + + environ_module = bindmodule( constant_ENVIRON ); + /* Then into .ENVIRON, without splitting. */ + var_defines( environ_module, use_environ, 0 ); + + /* + * Jam defined variables OS & OSPLAT. We load them after environment, so + * that setting OS in environment does not change Jam's notion of the + * current platform. + */ + var_defines( root_module(), othersyms, 1 ); + + /* Load up variables set on command line. */ + for ( n = 0; ( s = getoptval( optv, 's', n ) ); ++n ) + { + char * symv[ 2 ]; + symv[ 0 ] = s; + symv[ 1 ] = 0; + var_defines( root_module(), symv, 1 ); + var_defines( environ_module, symv, 0 ); + } + + /* Set the ARGV to reflect the complete list of arguments of invocation. + */ + for ( n = 0; n < arg_c; ++n ) + var_set( root_module(), constant_ARGV, list_new( object_new( + arg_v[ n ] ) ), VAR_APPEND ); + + /* Initialize built-in rules. */ + load_builtins(); + b2::startup::load_builtins(); + + /* Add the targets in the command line to the update list. */ + for ( n = 1; n < arg_c; ++n ) + { + if ( arg_v[ n ][ 0 ] == '-' ) + { + const char * f = "-:l:d:j:f:gs:t:ano:qv"; + for ( ; *f; ++f ) if ( *f == arg_v[ n ][ 1 ] ) break; + if ( f[0] && f[1] && ( f[ 1 ] == ':' ) && ( arg_v[ n ][ 2 ] == '\0' ) ) ++n; + } + else + { + OBJECT * const target = object_new( arg_v[ n ] ); + mark_target_for_updating( target ); + object_free( target ); + } + } + + /* The build system may set the PARALLELISM variable to override -j + * options. + */ + { + LIST * const p = var_get( root_module(), constant_PARALLELISM ); + if ( !list_empty( p ) ) + { + int const j = atoi( object_str( list_front( p ) ) ); + if ( j < 1 ) + out_printf( "Invalid value of PARALLELISM: %s.\n", + object_str( list_front( p ) ) ); + else + globs.jobs = j; + } + } + + /* KEEP_GOING overrides -q option. */ + { + LIST * const p = var_get( root_module(), constant_KEEP_GOING ); + if ( !list_empty( p ) ) + globs.quitquick = atoi( object_str( list_front( p ) ) ) ? 0 : 1; + } + + + if ( list_empty( targets_to_update() ) ) + mark_target_for_updating( constant_all ); + + /* Parse ruleset. */ + { + FRAME frame[ 1 ]; + frame_init( frame ); + for ( n = 0; ( s = getoptval( optv, 'f', n ) ); ++n ) + { + OBJECT * const filename = object_new( s ); + parse_file( filename, frame ); + object_free( filename ); + } + + if ( !n ) + status = b2::startup::bootstrap(frame) ? 0 : 13; + } + + /* FIXME: What shall we do if builtin_update_now, + * the sole place setting last_update_now_status, + * failed earlier? + */ + + if ( status == 0 ) + status = yyanyerrors(); + if ( status == 0 ) + { + /* Manually touch -t targets. */ + for ( n = 0; ( s = getoptval( optv, 't', n ) ); ++n ) + { + OBJECT * const target = object_new( s ); + touch_target( target ); + object_free( target ); + } + + /* Now make target. */ + { + PROFILE_ENTER( MAIN_MAKE ); + LIST * const targets = targets_to_update(); + if ( !list_empty( targets ) ) + status |= make( targets, anyhow ); + else + status = last_update_now_status; + PROFILE_EXIT( MAIN_MAKE ); + } + } + + PROFILE_EXIT( MAIN ); + } + + return status ? EXITBAD : EXITOK; +} + +int main( int argc, char * * argv ) +{ + BJAM_MEM_INIT(); + +#ifdef OS_MAC + InitGraf( &qd.thePort ); +#endif + + cwd_init(); + constants_init(); + + int result = EXIT_SUCCESS; + try + { + result = guarded_main( argc, argv ); + } + catch ( b2::exit_result exit_code ) + { + result = (int)exit_code; + } + + if ( DEBUG_PROFILE ) + profile_dump(); + +#ifdef OPT_HEADER_CACHE_EXT + hcache_done(); +#endif + + clear_targets_to_update(); + + /* Widely scattered cleanup. */ + property_set_done(); + exec_done(); + file_done(); + rules_done(); + timestamp_done(); + search_done(); + class_done(); + modules_done(); + regex_done(); + cwd_done(); + path_done(); + function_done(); + list_done(); + constants_done(); + object_done(); + + /* Close log out. */ + if ( globs.out ) + fclose( globs.out ); + +#ifdef HAVE_PYTHON + Py_Finalize(); +#endif + + BJAM_MEM_CLOSE(); + + return result; +} diff --git a/src/boost/tools/build/src/engine/jam.h b/src/boost/tools/build/src/engine/jam.h new file mode 100644 index 000000000..34a6fbeaa --- /dev/null +++ b/src/boost/tools/build/src/engine/jam.h @@ -0,0 +1,533 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * jam.h - includes and globals for jam + */ + +#ifndef JAM_H_VP_2003_08_01 +#define JAM_H_VP_2003_08_01 + +#include "config.h" + +#ifdef HAVE_PYTHON +#include +#endif + +/* Assume popen support is available unless known otherwise. */ +#define HAVE_POPEN 1 + +/* + * VMS, OPENVMS + */ + +#ifdef VMS + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define OSMINOR "OS=VMS" +#define OSMAJOR "VMS=true" +#define OS_VMS +#define MAXLINE 1024 /* longest 'together' actions */ +#define PATH_DELIM '/' /* use CRTL POSIX-style handling */ +#define SPLITPATH ',' +#define EXITOK EXIT_SUCCESS +#define EXITBAD EXIT_FAILURE +#define DOWNSHIFT_PATHS + +/* This may be inaccurate. */ +#ifndef __DECC +#define OSPLAT "OSPLAT=VAX" +#endif + +#define glob jam_glob /* use jam's glob, not CRTL's */ + +#endif + +/* + * Windows NT + */ + +#ifdef NT + +#include +#include +#include +#ifndef __MWERKS__ + #include +#endif +#include +#include +#include +#include +#include + +#define OSMAJOR "NT=true" +#define OSMINOR "OS=NT" +#define OS_NT +#define SPLITPATH ';' +#define MAXLINE (undefined__see_execnt_c) /* max chars per command line */ +#define USE_EXECNT +#define USE_PATHNT +#define PATH_DELIM '\\' + +/* AS400 cross-compile from NT. */ + +#ifdef AS400 + #undef OSMINOR + #undef OSMAJOR + #define OSMAJOR "AS400=true" + #define OSMINOR "OS=AS400" + #define OS_AS400 +#endif + +/* Metrowerks Standard Library on Windows. */ + +#ifdef __MSL__ + #undef HAVE_POPEN +#endif + +#endif /* #ifdef NT */ + + +/* + * Windows MingW32 + */ + +#ifdef MINGW + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define OSMAJOR "MINGW=true" +#define OSMINOR "OS=MINGW" +#define OS_NT +#define SPLITPATH ';' +#define MAXLINE 996 /* max chars per command line */ +#define USE_EXECUNIX +#define USE_PATHNT +#define PATH_DELIM '\\' + +#endif /* #ifdef MINGW */ + + +/* + * God fearing UNIX. + */ + +#ifndef OSMINOR + +#define OSMAJOR "UNIX=true" +#define USE_EXECUNIX +#define USE_FILEUNIX +#define USE_PATHUNIX +#define PATH_DELIM '/' + +#ifdef _AIX + #define unix + #define MAXLINE 23552 /* 24k - 1k, max chars per command line */ + #define OSMINOR "OS=AIX" + #define OS_AIX + #define NO_VFORK +#endif +#ifdef AMIGA + #define OSMINOR "OS=AMIGA" + #define OS_AMIGA +#endif +#ifdef __BEOS__ + #define unix + #define OSMINOR "OS=BEOS" + #define OS_BEOS + #define NO_VFORK +#endif +#ifdef __bsdi__ + #define OSMINOR "OS=BSDI" + #define OS_BSDI +#endif +#if defined (COHERENT) && defined (_I386) + #define OSMINOR "OS=COHERENT" + #define OS_COHERENT + #define NO_VFORK +#endif +#if defined(__cygwin__) || defined(__CYGWIN__) + #define OSMINOR "OS=CYGWIN" + #define OS_CYGWIN +#endif +#if defined(__FreeBSD__) && !defined(__DragonFly__) + #define OSMINOR "OS=FREEBSD" + #define OS_FREEBSD +#endif +#ifdef __DragonFly__ + #define OSMINOR "OS=DRAGONFLYBSD" + #define OS_DRAGONFLYBSD +#endif +#ifdef __DGUX__ + #define OSMINOR "OS=DGUX" + #define OS_DGUX +#endif +#ifdef __GNU__ + #define OSMINOR "OS=HURD" + #define OS_HURD +#endif +#ifdef __hpux + #define OSMINOR "OS=HPUX" + #define OS_HPUX +#endif +#ifdef __HAIKU__ + #define unix + #define OSMINOR "OS=HAIKU" + #define OS_HAIKU +#endif +#ifdef __OPENNT + #define unix + #define OSMINOR "OS=INTERIX" + #define OS_INTERIX + #define NO_VFORK +#endif +#ifdef __sgi + #define OSMINOR "OS=IRIX" + #define OS_IRIX + #define NO_VFORK +#endif +#ifdef __ISC + #define OSMINOR "OS=ISC" + #define OS_ISC + #define NO_VFORK +#endif +#if defined(linux) || defined(__linux) || \ + defined(__linux__) || defined(__gnu_linux__) + #define OSMINOR "OS=LINUX" + #define OS_LINUX +#endif +#ifdef __Lynx__ + #define OSMINOR "OS=LYNX" + #define OS_LYNX + #define NO_VFORK + #define unix +#endif +#ifdef __MACHTEN__ + #define OSMINOR "OS=MACHTEN" + #define OS_MACHTEN +#endif +#ifdef mpeix + #define unix + #define OSMINOR "OS=MPEIX" + #define OS_MPEIX + #define NO_VFORK +#endif +#ifdef __MVS__ + #define unix + #define OSMINOR "OS=MVS" + #define OS_MVS +#endif +#ifdef _ATT4 + #define OSMINOR "OS=NCR" + #define OS_NCR +#endif +#ifdef __NetBSD__ + #define unix + #define OSMINOR "OS=NETBSD" + #define OS_NETBSD + #define NO_VFORK +#endif +#ifdef __QNX__ + #define unix + #ifdef __QNXNTO__ + #define OSMINOR "OS=QNXNTO" + #define OS_QNXNTO + #else + #define OSMINOR "OS=QNX" + #define OS_QNX + #define NO_VFORK + #define MAXLINE 996 /* max chars per command line */ + #endif +#endif +#ifdef NeXT + #ifdef __APPLE__ + #define OSMINOR "OS=RHAPSODY" + #define OS_RHAPSODY + #else + #define OSMINOR "OS=NEXT" + #define OS_NEXT + #endif +#endif +#ifdef __APPLE__ + #define unix + #define OSMINOR "OS=MACOSX" + #define OS_MACOSX +#endif +#ifdef __osf__ + #ifndef unix + #define unix + #endif + #define OSMINOR "OS=OSF" + #define OS_OSF +#endif +#ifdef _SEQUENT_ + #define OSMINOR "OS=PTX" + #define OS_PTX +#endif +#ifdef M_XENIX + #define OSMINOR "OS=SCO" + #define OS_SCO + #define NO_VFORK +#endif +#ifdef sinix + #define unix + #define OSMINOR "OS=SINIX" + #define OS_SINIX +#endif +#ifdef sun + #if defined(__svr4__) || defined(__SVR4) + #define OSMINOR "OS=SOLARIS" + #define OS_SOLARIS + #else + #define OSMINOR "OS=SUNOS" + #define OS_SUNOS + #endif +#endif +#ifdef ultrix + #define OSMINOR "OS=ULTRIX" + #define OS_ULTRIX +#endif +#ifdef _UNICOS + #define OSMINOR "OS=UNICOS" + #define OS_UNICOS +#endif +#if defined(__USLC__) && !defined(M_XENIX) + #define OSMINOR "OS=UNIXWARE" + #define OS_UNIXWARE +#endif +#ifdef __OpenBSD__ + #define OSMINOR "OS=OPENBSD" + #define OS_OPENBSD + #ifndef unix + #define unix + #endif +#endif +#if defined (__FreeBSD_kernel__) && !defined(__FreeBSD__) + #define OSMINOR "OS=KFREEBSD" + #define OS_KFREEBSD +#endif +#ifndef OSMINOR + #define OSMINOR "OS=UNKNOWN" +#endif + +/* All the UNIX includes */ + +#include + +#ifndef OS_MPEIX + #include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#ifndef OS_QNX + #include +#endif + +#ifndef OS_ULTRIX + #include +#endif + +#if !defined( OS_BSDI ) && \ + !defined( OS_FREEBSD ) && \ + !defined( OS_DRAGONFLYBSD ) && \ + !defined( OS_NEXT ) && \ + !defined( OS_MACHTEN ) && \ + !defined( OS_MACOSX ) && \ + !defined( OS_RHAPSODY ) && \ + !defined( OS_MVS ) && \ + !defined( OS_OPENBSD ) + #include +#endif + +#endif /* #ifndef OSMINOR */ + + +/* + * OSPLAT definitions - suppressed when it is a one-of-a-kind. + */ + +#if defined( _M_PPC ) || \ + defined( PPC ) || \ + defined( ppc ) || \ + defined( __powerpc__ ) || \ + defined( __ppc__ ) + #define OSPLAT "OSPLAT=PPC" +#endif + +#if defined( _ALPHA_ ) || \ + defined( __alpha__ ) + #define OSPLAT "OSPLAT=AXP" +#endif + +#if defined( _i386_ ) || \ + defined( __i386__ ) || \ + defined( __i386 ) || \ + defined( _M_IX86 ) + #define OSPLAT "OSPLAT=X86" +#endif + +#if defined( __ia64__ ) || \ + defined( __IA64__ ) || \ + defined( __ia64 ) + #define OSPLAT "OSPLAT=IA64" +#endif + +#if defined( __x86_64__ ) || \ + defined( __amd64__ ) || \ + defined( _M_AMD64 ) + #define OSPLAT "OSPLAT=X86_64" +#endif + +#if defined( __sparc__ ) || \ + defined( __sparc ) + #define OSPLAT "OSPLAT=SPARC" +#endif + +#ifdef __mips__ + #if _MIPS_SIM == _MIPS_SIM_ABI64 + #define OSPLAT "OSPLAT=MIPS64" + #elif _MIPS_SIM == _MIPS_SIM_ABI32 + #define OSPLAT "OSPLAT=MIPS32" + #endif +#endif + +#if defined( __arm__ ) || \ + defined( __aarch64__ ) + #define OSPLAT "OSPLAT=ARM" +#endif + +#ifdef __s390__ + #define OSPLAT "OSPLAT=390" +#endif + +#ifdef __hppa + #define OSPLAT "OSPLAT=PARISC" +#endif + +#ifndef OSPLAT + #define OSPLAT "" +#endif + + +/* + * Jam implementation misc. + */ + +#ifndef MAXLINE + #define MAXLINE 102400 /* max chars per command line */ +#endif + +#ifndef EXITOK + #define EXITOK 0 + #define EXITBAD 1 +#endif + +#ifndef SPLITPATH + #define SPLITPATH ':' +#endif + +/* You probably do not need to muck with these. */ + +#define MAXSYM 1024 /* longest symbol in the environment */ +#define MAXJPATH 1024 /* longest filename */ + +#define MAXARGC 32 /* words in $(JAMSHELL) */ + +/* Jam private definitions below. */ + +#define DEBUG_MAX 14 + + +struct globs +{ + int noexec; + int jobs; + int quitquick; + int newestfirst; /* build newest sources first */ + int pipe_action; + char debug[ DEBUG_MAX ]; + FILE * out; /* mirror output here */ + long timeout; /* number of seconds to limit actions to, + * default 0 for no limit. + */ + int dart; /* output build and test results formatted for + * Dart + */ + int max_buf; /* maximum amount of output saved from target + * (kb) + */ +}; + +extern struct globs globs; + +#define DEBUG_MAKE ( globs.debug[ 1 ] ) /* show actions when executed */ +#define DEBUG_MAKEQ ( globs.debug[ 2 ] ) /* show even quiet actions */ +#define DEBUG_EXEC ( globs.debug[ 2 ] ) /* show text of actons */ +#define DEBUG_MAKEPROG ( globs.debug[ 3 ] ) /* show make0 progress */ +#define DEBUG_BIND ( globs.debug[ 3 ] ) /* show when files bound */ + +#define DEBUG_EXECCMD ( globs.debug[ 4 ] ) /* show execcmds()'s work */ + +#define DEBUG_COMPILE ( globs.debug[ 5 ] ) /* show rule invocations */ + +#define DEBUG_HEADER ( globs.debug[ 6 ] ) /* show result of header scan */ +#define DEBUG_BINDSCAN ( globs.debug[ 6 ] ) /* show result of dir scan */ +#define DEBUG_SEARCH ( globs.debug[ 6 ] ) /* show binding attempts */ + +#define DEBUG_VARSET ( globs.debug[ 7 ] ) /* show variable settings */ +#define DEBUG_VARGET ( globs.debug[ 8 ] ) /* show variable fetches */ +#define DEBUG_VAREXP ( globs.debug[ 8 ] ) /* show variable expansions */ +#define DEBUG_IF ( globs.debug[ 8 ] ) /* show 'if' calculations */ +#define DEBUG_LISTS ( globs.debug[ 9 ] ) /* show list manipulation */ +#define DEBUG_SCAN ( globs.debug[ 9 ] ) /* show scanner tokens */ +#define DEBUG_MEM ( globs.debug[ 9 ] ) /* show memory use */ + +#define DEBUG_PROFILE ( globs.debug[ 10 ] ) /* dump rule execution times */ +#define DEBUG_PARSE ( globs.debug[ 11 ] ) /* debug parsing */ +#define DEBUG_GRAPH ( globs.debug[ 12 ] ) /* debug dependencies */ +#define DEBUG_FATE ( globs.debug[ 13 ] ) /* show fate changes in make0() */ + +/* Everyone gets the memory definitions. */ +#include "mem.h" + +/* They also get the profile functions. */ +#include "debug.h" + +#endif diff --git a/src/boost/tools/build/src/engine/jam_strings.cpp b/src/boost/tools/build/src/engine/jam_strings.cpp new file mode 100644 index 000000000..814a5679c --- /dev/null +++ b/src/boost/tools/build/src/engine/jam_strings.cpp @@ -0,0 +1,240 @@ +/* Copyright David Abrahams 2004. Distributed under the Boost */ +/* Software License, Version 1.0. (See accompanying */ +/* file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) */ + +#include "jam.h" +#include "jam_strings.h" + +#include +#include +#include + + +#ifndef NDEBUG +# define JAM_STRING_MAGIC ((char)0xcf) +# define JAM_STRING_MAGIC_SIZE 4 +static void assert_invariants( string * self ) +{ + int i; + + if ( self->value == 0 ) + { + assert( self->size == 0 ); + assert( self->capacity == 0 ); + assert( self->opt[ 0 ] == 0 ); + return; + } + + assert( self->size < self->capacity ); + assert( ( self->capacity <= int32_t(sizeof( self->opt )) ) == ( self->value == self->opt ) ); + assert( self->value[ self->size ] == 0 ); + /* String objects modified manually after construction to contain embedded + * '\0' characters are considered structurally valid. + */ + assert( strlen( self->value ) <= size_t(self->size) ); + + for ( i = 0; i < 4; ++i ) + { + assert( self->magic[ i ] == JAM_STRING_MAGIC ); + assert( self->value[ self->capacity + i ] == JAM_STRING_MAGIC ); + } +} +#else +# define JAM_STRING_MAGIC_SIZE 0 +# define assert_invariants(x) do {} while (0) +#endif + + +void string_new( string * s ) +{ + s->value = s->opt; + s->size = 0; + s->capacity = sizeof( s->opt ); + s->opt[ 0 ] = 0; +#ifndef NDEBUG + memset( s->magic, JAM_STRING_MAGIC, sizeof( s->magic ) ); +#endif + assert_invariants( s ); +} + + +void string_free( string * s ) +{ + assert_invariants( s ); + if ( s->value != s->opt ) + BJAM_FREE( s->value ); + string_new( s ); +} + + +static void string_reserve_internal( string * self, int32_t capacity ) +{ + if ( self->value == self->opt ) + { + self->value = (char *)BJAM_MALLOC_ATOMIC( size_t(capacity) + + JAM_STRING_MAGIC_SIZE ); + self->value[ 0 ] = 0; + size_t opt_size = sizeof(self->opt); // Workaround sizeof in strncat warning. + strncat( self->value, self->opt, opt_size ); + assert( strlen( self->value ) <= size_t(self->capacity) && "Regression test" ); + } + else + { + self->value = (char *)BJAM_REALLOC( self->value, size_t(capacity) + + JAM_STRING_MAGIC_SIZE ); + } +#ifndef NDEBUG + memcpy( self->value + capacity, self->magic, JAM_STRING_MAGIC_SIZE ); +#endif + self->capacity = capacity; +} + + +void string_reserve( string * self, int32_t capacity ) +{ + assert_invariants( self ); + if ( capacity <= self->capacity ) + return; + string_reserve_internal( self, capacity ); + assert_invariants( self ); +} + + +static void maybe_reserve( string * self, int32_t new_size ) +{ + int32_t capacity = self->capacity; + if ( capacity <= new_size ) + { + int32_t new_capacity = capacity; + while ( new_capacity <= new_size ) + new_capacity <<= 1; + string_reserve_internal( self, new_capacity ); + } +} + + +void string_append( string * self, char const * rhs ) +{ + int32_t rhs_size = int32_t(strlen( rhs )); + int32_t new_size = self->size + rhs_size; + assert_invariants( self ); + + maybe_reserve( self, new_size ); + + memcpy( self->value + self->size, rhs, size_t(rhs_size) + 1 ); + self->size = new_size; + + assert_invariants( self ); +} + + +void string_append_range( string * self, char const * start, char const * finish ) +{ + int32_t rhs_size = int32_t(finish - start); + int32_t new_size = self->size + rhs_size; + assert_invariants( self ); + + maybe_reserve( self, new_size ); + + if ( start != finish ) + memcpy( self->value + self->size, start, size_t(rhs_size) ); + self->size = new_size; + self->value[ new_size ] = 0; + + assert_invariants( self ); +} + + +void string_copy( string * s, char const * rhs ) +{ + string_new( s ); + string_append( s, rhs ); +} + +void string_truncate( string * self, int32_t n ) +{ + assert_invariants( self ); + assert( n <= self->capacity ); + self->value[ self->size = n ] = 0; + assert_invariants( self ); +} + + +void string_pop_back( string * self ) +{ + string_truncate( self, self->size - 1 ); +} + + +void string_push_back( string * self, char x ) +{ + string_append_range( self, &x, &x + 1 ); +} + + +char string_back( string * self ) +{ + assert_invariants( self ); + return self->value[ self->size - 1 ]; +} + +void string_rtrim( string * self ) +{ + char *p; + assert_invariants( self ); + p = self->value + self->size - 1; + for ( ; p >= self->value && ( *p == '\0' || isspace( *p ) ); *p-- = 0 ); +} + +#ifndef NDEBUG +void string_unit_test() +{ + { + string s[ 1 ]; + unsigned long i; + unsigned long const limit = sizeof( s->opt ) * 2 + 2; + string_new( s ); + assert( s->value == s->opt ); + for ( i = 0; i < limit; ++i ) + { + string_push_back( s, (char)( i + 1 ) ); + assert( s->size == int32_t(i + 1) ); + } + assert( s->size == int32_t(limit) ); + assert( s->value != s->opt ); + for ( i = 0; i < limit; ++i ) + assert( s->value[ i ] == (char)( i + 1 ) ); + string_free( s ); + } + + { + const char * const original = " \n\t\v Foo \r\n\v \tBar\n\n\r\r\t\n\v\t \t"; + string copy[ 1 ]; + string_copy( copy, original ); + assert( !strcmp( copy->value, original ) ); + assert( copy->size == int32_t(strlen( original )) ); + string_free( copy ); + } + + { + const char * const foo = "Foo "; + string foo_copy[ 1 ]; + string_copy( foo_copy, foo ); + string_rtrim( foo_copy ); + assert( !strcmp( foo_copy->value, "Foo" ) ); + + string_rtrim( foo_copy ); + assert( !strcmp( foo_copy->value, "Foo" ) ); + } + { + const char * const bar = "Bar\0\0\0"; + string bar_copy[ 1 ]; + string_copy( bar_copy, bar ); + string_rtrim( bar_copy ); + assert( !strcmp( bar_copy->value, "Bar" ) ); + + string_rtrim( bar_copy ); + assert( !strcmp( bar_copy->value, "Bar" ) ); + } +} +#endif diff --git a/src/boost/tools/build/src/engine/jam_strings.h b/src/boost/tools/build/src/engine/jam_strings.h new file mode 100644 index 000000000..9f7fd43f0 --- /dev/null +++ b/src/boost/tools/build/src/engine/jam_strings.h @@ -0,0 +1,38 @@ +/* + * Copyright 2004. David Abrahams + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef JAM_STRINGS_DWA20011024_H +#define JAM_STRINGS_DWA20011024_H + +#include "config.h" +#include + +typedef struct string +{ + char * value; + int32_t size; + int32_t capacity; + char opt[ 32 ]; +#ifndef NDEBUG + char magic[ 4 ]; +#endif +} string; + +void string_new( string * ); +void string_copy( string *, char const * ); +void string_free( string * ); +void string_append( string *, char const * ); +void string_append_range( string *, char const *, char const * ); +void string_push_back( string * s, char x ); +void string_reserve( string *, int32_t ); +void string_truncate( string *, int32_t ); +void string_pop_back( string * ); +char string_back( string * ); +void string_rtrim( string * ); +void string_unit_test(); + +#endif diff --git a/src/boost/tools/build/src/engine/jamgram.cpp b/src/boost/tools/build/src/engine/jamgram.cpp new file mode 100644 index 000000000..0cda88047 --- /dev/null +++ b/src/boost/tools/build/src/engine/jamgram.cpp @@ -0,0 +1,2287 @@ +/* A Bison parser, made by GNU Bison 3.8.2. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. + + 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 3 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, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output, and Bison version. */ +#define YYBISON 30802 + +/* Bison version string. */ +#define YYBISON_VERSION "3.8.2" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* First part of user prologue. */ +#line 98 "src/engine/jamgram.y" + +#include "jam.h" + +#include "lists.h" +#include "parse.h" +#include "scan.h" +#include "compile.h" +#include "object.h" +#include "rules.h" + +# define YYINITDEPTH 5000 /* for C++ parsing */ +# define YYMAXDEPTH 10000 /* for OSF and other less endowed yaccs */ + +# define F0 -1 +# define P0 (PARSE *)0 +# define S0 (OBJECT *)0 + +# define pappend( l,r ) parse_make( PARSE_APPEND,l,r,P0,S0,S0,0 ) +# define peval( c,l,r ) parse_make( PARSE_EVAL,l,r,P0,S0,S0,c ) +# define pfor( s,l,r,x ) parse_make( PARSE_FOREACH,l,r,P0,s,S0,x ) +# define pif( l,r,t ) parse_make( PARSE_IF,l,r,t,S0,S0,0 ) +# define pincl( l ) parse_make( PARSE_INCLUDE,l,P0,P0,S0,S0,0 ) +# define plist( s ) parse_make( PARSE_LIST,P0,P0,P0,s,S0,0 ) +# define plocal( l,r,t ) parse_make( PARSE_LOCAL,l,r,t,S0,S0,0 ) +# define pmodule( l,r ) parse_make( PARSE_MODULE,l,r,P0,S0,S0,0 ) +# define pclass( l,r ) parse_make( PARSE_CLASS,l,r,P0,S0,S0,0 ) +# define pnull() parse_make( PARSE_NULL,P0,P0,P0,S0,S0,0 ) +# define pon( l,r ) parse_make( PARSE_ON,l,r,P0,S0,S0,0 ) +# define prule( s,p ) parse_make( PARSE_RULE,p,P0,P0,s,S0,0 ) +# define prules( l,r ) parse_make( PARSE_RULES,l,r,P0,S0,S0,0 ) +# define pset( l,r,a ) parse_make( PARSE_SET,l,r,P0,S0,S0,a ) +# define pset1( l,r,t,a ) parse_make( PARSE_SETTINGS,l,r,t,S0,S0,a ) +# define psetc( s,p,a,l ) parse_make( PARSE_SETCOMP,p,a,P0,s,S0,l ) +# define psete( s,l,s1,f ) parse_make( PARSE_SETEXEC,l,P0,P0,s,s1,f ) +# define pswitch( l,r ) parse_make( PARSE_SWITCH,l,r,P0,S0,S0,0 ) +# define pwhile( l,r ) parse_make( PARSE_WHILE,l,r,P0,S0,S0,0 ) +# define preturn( l ) parse_make( PARSE_RETURN,l,P0,P0,S0,S0,0 ) +# define pbreak() parse_make( PARSE_BREAK,P0,P0,P0,S0,S0,0 ) +# define pcontinue() parse_make( PARSE_CONTINUE,P0,P0,P0,S0,S0,0 ) + +# define pnode( l,r ) parse_make( F0,l,r,P0,S0,S0,0 ) +# define psnode( s,l ) parse_make( F0,l,P0,P0,s,S0,0 ) + + +#line 116 "src/engine/jamgram.cpp" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +#include "jamgram.hpp" +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL__BANG_t = 3, /* _BANG_t */ + YYSYMBOL__BANG_EQUALS_t = 4, /* _BANG_EQUALS_t */ + YYSYMBOL__AMPER_t = 5, /* _AMPER_t */ + YYSYMBOL__AMPERAMPER_t = 6, /* _AMPERAMPER_t */ + YYSYMBOL__LPAREN_t = 7, /* _LPAREN_t */ + YYSYMBOL__RPAREN_t = 8, /* _RPAREN_t */ + YYSYMBOL__PLUS_EQUALS_t = 9, /* _PLUS_EQUALS_t */ + YYSYMBOL__COLON_t = 10, /* _COLON_t */ + YYSYMBOL__SEMIC_t = 11, /* _SEMIC_t */ + YYSYMBOL__LANGLE_t = 12, /* _LANGLE_t */ + YYSYMBOL__LANGLE_EQUALS_t = 13, /* _LANGLE_EQUALS_t */ + YYSYMBOL__EQUALS_t = 14, /* _EQUALS_t */ + YYSYMBOL__RANGLE_t = 15, /* _RANGLE_t */ + YYSYMBOL__RANGLE_EQUALS_t = 16, /* _RANGLE_EQUALS_t */ + YYSYMBOL__QUESTION_EQUALS_t = 17, /* _QUESTION_EQUALS_t */ + YYSYMBOL__LBRACKET_t = 18, /* _LBRACKET_t */ + YYSYMBOL__RBRACKET_t = 19, /* _RBRACKET_t */ + YYSYMBOL_ACTIONS_t = 20, /* ACTIONS_t */ + YYSYMBOL_BIND_t = 21, /* BIND_t */ + YYSYMBOL_BREAK_t = 22, /* BREAK_t */ + YYSYMBOL_CASE_t = 23, /* CASE_t */ + YYSYMBOL_CLASS_t = 24, /* CLASS_t */ + YYSYMBOL_CONTINUE_t = 25, /* CONTINUE_t */ + YYSYMBOL_DEFAULT_t = 26, /* DEFAULT_t */ + YYSYMBOL_ELSE_t = 27, /* ELSE_t */ + YYSYMBOL_EXISTING_t = 28, /* EXISTING_t */ + YYSYMBOL_FOR_t = 29, /* FOR_t */ + YYSYMBOL_IF_t = 30, /* IF_t */ + YYSYMBOL_IGNORE_t = 31, /* IGNORE_t */ + YYSYMBOL_IN_t = 32, /* IN_t */ + YYSYMBOL_INCLUDE_t = 33, /* INCLUDE_t */ + YYSYMBOL_LOCAL_t = 34, /* LOCAL_t */ + YYSYMBOL_MODULE_t = 35, /* MODULE_t */ + YYSYMBOL_ON_t = 36, /* ON_t */ + YYSYMBOL_PIECEMEAL_t = 37, /* PIECEMEAL_t */ + YYSYMBOL_QUIETLY_t = 38, /* QUIETLY_t */ + YYSYMBOL_RETURN_t = 39, /* RETURN_t */ + YYSYMBOL_RULE_t = 40, /* RULE_t */ + YYSYMBOL_SWITCH_t = 41, /* SWITCH_t */ + YYSYMBOL_TOGETHER_t = 42, /* TOGETHER_t */ + YYSYMBOL_UPDATED_t = 43, /* UPDATED_t */ + YYSYMBOL_WHILE_t = 44, /* WHILE_t */ + YYSYMBOL__LBRACE_t = 45, /* _LBRACE_t */ + YYSYMBOL__BAR_t = 46, /* _BAR_t */ + YYSYMBOL__BARBAR_t = 47, /* _BARBAR_t */ + YYSYMBOL__RBRACE_t = 48, /* _RBRACE_t */ + YYSYMBOL_ARG = 49, /* ARG */ + YYSYMBOL_STRING = 50, /* STRING */ + YYSYMBOL_YYACCEPT = 51, /* $accept */ + YYSYMBOL_run = 52, /* run */ + YYSYMBOL_block = 53, /* block */ + YYSYMBOL_rules = 54, /* rules */ + YYSYMBOL_55_1 = 55, /* $@1 */ + YYSYMBOL_56_2 = 56, /* $@2 */ + YYSYMBOL_null = 57, /* null */ + YYSYMBOL_assign_list_opt = 58, /* assign_list_opt */ + YYSYMBOL_59_3 = 59, /* $@3 */ + YYSYMBOL_arglist_opt = 60, /* arglist_opt */ + YYSYMBOL_local_opt = 61, /* local_opt */ + YYSYMBOL_else_opt = 62, /* else_opt */ + YYSYMBOL_rule = 63, /* rule */ + YYSYMBOL_64_4 = 64, /* $@4 */ + YYSYMBOL_65_5 = 65, /* $@5 */ + YYSYMBOL_66_6 = 66, /* $@6 */ + YYSYMBOL_67_7 = 67, /* $@7 */ + YYSYMBOL_68_8 = 68, /* $@8 */ + YYSYMBOL_69_9 = 69, /* $@9 */ + YYSYMBOL_70_10 = 70, /* $@10 */ + YYSYMBOL_71_11 = 71, /* $@11 */ + YYSYMBOL_72_12 = 72, /* $@12 */ + YYSYMBOL_73_13 = 73, /* $@13 */ + YYSYMBOL_74_14 = 74, /* $@14 */ + YYSYMBOL_75_15 = 75, /* $@15 */ + YYSYMBOL_76_16 = 76, /* $@16 */ + YYSYMBOL_77_17 = 77, /* $@17 */ + YYSYMBOL_78_18 = 78, /* $@18 */ + YYSYMBOL_79_19 = 79, /* $@19 */ + YYSYMBOL_80_20 = 80, /* $@20 */ + YYSYMBOL_81_21 = 81, /* $@21 */ + YYSYMBOL_82_22 = 82, /* $@22 */ + YYSYMBOL_83_23 = 83, /* $@23 */ + YYSYMBOL_84_24 = 84, /* $@24 */ + YYSYMBOL_85_25 = 85, /* $@25 */ + YYSYMBOL_86_26 = 86, /* $@26 */ + YYSYMBOL_assign = 87, /* assign */ + YYSYMBOL_expr = 88, /* expr */ + YYSYMBOL_89_27 = 89, /* $@27 */ + YYSYMBOL_90_28 = 90, /* $@28 */ + YYSYMBOL_91_29 = 91, /* $@29 */ + YYSYMBOL_92_30 = 92, /* $@30 */ + YYSYMBOL_93_31 = 93, /* $@31 */ + YYSYMBOL_94_32 = 94, /* $@32 */ + YYSYMBOL_95_33 = 95, /* $@33 */ + YYSYMBOL_96_34 = 96, /* $@34 */ + YYSYMBOL_97_35 = 97, /* $@35 */ + YYSYMBOL_98_36 = 98, /* $@36 */ + YYSYMBOL_99_37 = 99, /* $@37 */ + YYSYMBOL_100_38 = 100, /* $@38 */ + YYSYMBOL_101_39 = 101, /* $@39 */ + YYSYMBOL_cases = 102, /* cases */ + YYSYMBOL_case = 103, /* case */ + YYSYMBOL_104_40 = 104, /* $@40 */ + YYSYMBOL_105_41 = 105, /* $@41 */ + YYSYMBOL_lol = 106, /* lol */ + YYSYMBOL_list = 107, /* list */ + YYSYMBOL_listp = 108, /* listp */ + YYSYMBOL_arg = 109, /* arg */ + YYSYMBOL_110_42 = 110, /* @42 */ + YYSYMBOL_func = 111, /* func */ + YYSYMBOL_112_43 = 112, /* $@43 */ + YYSYMBOL_113_44 = 113, /* $@44 */ + YYSYMBOL_114_45 = 114, /* $@45 */ + YYSYMBOL_eflags = 115, /* eflags */ + YYSYMBOL_eflag = 116, /* eflag */ + YYSYMBOL_bindlist = 117, /* bindlist */ + YYSYMBOL_118_46 = 118 /* $@46 */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + + + + +#ifdef short +# undef short +#endif + +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif +#endif + +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; +#else +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; +#else +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif +#endif + +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_uint8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if !defined yyoverflow + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* !defined yyoverflow */ + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yy_state_t yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 42 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 242 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 51 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 68 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 121 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 207 + +/* YYMAXUTOK -- Last valid token kind. */ +#define YYMAXUTOK 305 + + +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex. */ +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50 +}; + +#if YYDEBUG +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int16 yyrline[] = +{ + 0, 145, 145, 147, 158, 160, 164, 166, 168, 168, + 168, 173, 176, 176, 178, 182, 185, 188, 191, 194, + 197, 199, 201, 201, 203, 203, 205, 205, 207, 207, + 207, 209, 209, 211, 213, 215, 215, 215, 217, 217, + 217, 219, 219, 219, 221, 221, 221, 223, 223, 223, + 225, 225, 225, 227, 227, 227, 227, 229, 232, 234, + 231, 243, 245, 247, 249, 256, 258, 258, 260, 260, + 262, 262, 264, 264, 266, 266, 268, 268, 270, 270, + 272, 272, 274, 274, 276, 276, 278, 278, 280, 280, + 282, 282, 294, 295, 299, 299, 299, 308, 310, 320, + 325, 326, 330, 332, 332, 341, 341, 343, 343, 345, + 345, 356, 357, 361, 363, 365, 367, 369, 371, 381, + 382, 382 +}; +#endif + +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "_BANG_t", + "_BANG_EQUALS_t", "_AMPER_t", "_AMPERAMPER_t", "_LPAREN_t", "_RPAREN_t", + "_PLUS_EQUALS_t", "_COLON_t", "_SEMIC_t", "_LANGLE_t", + "_LANGLE_EQUALS_t", "_EQUALS_t", "_RANGLE_t", "_RANGLE_EQUALS_t", + "_QUESTION_EQUALS_t", "_LBRACKET_t", "_RBRACKET_t", "ACTIONS_t", + "BIND_t", "BREAK_t", "CASE_t", "CLASS_t", "CONTINUE_t", "DEFAULT_t", + "ELSE_t", "EXISTING_t", "FOR_t", "IF_t", "IGNORE_t", "IN_t", "INCLUDE_t", + "LOCAL_t", "MODULE_t", "ON_t", "PIECEMEAL_t", "QUIETLY_t", "RETURN_t", + "RULE_t", "SWITCH_t", "TOGETHER_t", "UPDATED_t", "WHILE_t", "_LBRACE_t", + "_BAR_t", "_BARBAR_t", "_RBRACE_t", "ARG", "STRING", "$accept", "run", + "block", "rules", "$@1", "$@2", "null", "assign_list_opt", "$@3", + "arglist_opt", "local_opt", "else_opt", "rule", "$@4", "$@5", "$@6", + "$@7", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14", "$@15", + "$@16", "$@17", "$@18", "$@19", "$@20", "$@21", "$@22", "$@23", "$@24", + "$@25", "$@26", "assign", "expr", "$@27", "$@28", "$@29", "$@30", "$@31", + "$@32", "$@33", "$@34", "$@35", "$@36", "$@37", "$@38", "$@39", "cases", + "case", "$@40", "$@41", "lol", "list", "listp", "arg", "@42", "func", + "$@43", "$@44", "$@45", "eflags", "eflag", "bindlist", "$@46", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} +#endif + +#define YYPACT_NINF (-119) + +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) + +#define YYTABLE_NINF (-25) + +#define yytable_value_is_error(Yyn) \ + 0 + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + 140, -119, -119, 1, -119, 2, -18, -119, -119, -23, + -119, -9, -119, -119, -119, 140, 12, 31, -119, 4, + 140, 77, -17, 186, -119, -119, -119, -119, -7, 3, + -119, -119, -119, -119, 177, -119, -119, 3, -5, -119, + -119, -119, -119, -119, -119, -119, -119, -119, 33, -119, + -119, -9, -119, 29, -119, -119, -119, -119, -119, -119, + 35, -119, 14, 50, -9, 34, -119, -119, 23, 39, + 52, 53, 40, -119, 66, 45, 94, -119, 67, 30, + -119, -119, -119, 16, -119, -119, -119, 47, -119, -119, + -119, -119, 3, 3, -119, -119, -119, -119, -119, -119, + -119, -119, -119, -119, -119, -119, -119, -119, -119, 84, + -119, -119, -119, 51, -119, -119, 32, 105, -119, -119, + -119, -119, -119, 140, -119, -119, -119, 68, 3, 3, + 3, 3, 3, 3, 3, 3, 140, 3, 3, -119, + -119, -119, 140, 95, 140, 110, -119, -119, -119, -119, + -119, 69, 73, 87, -119, 89, 139, 139, -119, -119, + 89, -119, -119, 90, 226, 226, -119, -119, 140, 91, + -119, 97, 95, 98, -119, -119, -119, -119, -119, -119, + -119, -119, 108, -119, -119, 88, -119, -119, -119, 141, + 177, 145, 102, 140, 177, -119, 149, -119, -119, -119, + -119, 115, -119, -119, -119, 140, -119 +}; + +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_int8 yydefact[] = +{ + 2, 103, 111, 0, 47, 0, 18, 41, 22, 8, + 44, 0, 31, 38, 50, 11, 102, 0, 3, 0, + 6, 0, 0, 0, 33, 100, 34, 17, 0, 0, + 100, 100, 100, 102, 18, 100, 100, 0, 0, 5, + 4, 100, 1, 53, 7, 62, 61, 63, 0, 28, + 26, 0, 105, 0, 118, 115, 117, 116, 114, 113, + 119, 112, 0, 97, 99, 0, 88, 90, 0, 65, + 0, 11, 0, 57, 0, 0, 51, 21, 0, 0, + 64, 100, 100, 0, 100, 104, 120, 0, 48, 100, + 101, 35, 0, 0, 68, 78, 80, 70, 72, 66, + 74, 76, 42, 82, 84, 86, 23, 12, 14, 0, + 45, 32, 39, 0, 25, 54, 0, 0, 109, 107, + 106, 100, 58, 11, 98, 100, 89, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 0, 0, 100, + 100, 9, 11, 92, 11, 16, 29, 27, 100, 100, + 121, 0, 0, 0, 91, 69, 79, 81, 71, 73, + 67, 75, 77, 0, 83, 85, 87, 13, 11, 0, + 94, 0, 92, 0, 100, 55, 100, 110, 108, 59, + 49, 36, 20, 10, 46, 0, 40, 93, 52, 0, + 18, 0, 0, 11, 18, 43, 0, 15, 56, 30, + 60, 0, 19, 95, 37, 11, 96 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -119, -119, -118, 25, -119, -119, 96, -119, -119, -119, + 160, -119, -33, -119, -119, -119, -119, -119, -119, -119, + -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, + -119, -119, -119, -119, -119, -119, 55, -4, -119, -119, + -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, + -119, 5, -119, -119, -119, -27, -28, -119, 0, -119, + -119, -119, -119, -119, -119, -119, -119, -119 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_uint8 yydefgoto[] = +{ + 0, 17, 38, 39, 31, 168, 40, 109, 140, 175, + 19, 195, 20, 30, 41, 82, 81, 176, 35, 125, + 193, 36, 143, 29, 136, 32, 142, 25, 123, 37, + 113, 79, 145, 190, 151, 192, 50, 68, 133, 128, + 131, 132, 134, 135, 129, 130, 137, 138, 139, 92, + 93, 171, 172, 185, 205, 62, 63, 64, 69, 22, + 53, 84, 149, 148, 23, 61, 87, 121 +}; + +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = +{ + 21, 73, 70, 71, 72, 152, 66, 74, 75, 1, + 67, 34, 24, 26, 78, 21, 27, -17, 163, 51, + 21, 1, -24, -24, 169, 18, 173, 94, 95, 96, + -24, 42, 52, 76, 21, 97, 98, 99, 100, 101, + 33, 45, 65, 77, 43, 44, 46, 80, 85, 47, + 183, 83, 33, 116, 117, 118, 86, 120, 48, 88, + 89, -24, 124, 106, 90, 119, 91, 107, 102, 103, + 104, 105, 94, 95, 96, 201, 154, 111, 114, 115, + 97, 98, 99, 100, 101, 110, 45, 206, 126, 127, + 112, 46, 122, 150, 47, 141, 144, 153, 94, 95, + 96, 97, 98, 48, 100, 101, 97, 98, 99, 100, + 101, 166, 167, 49, 103, 104, 147, 174, 170, 179, + 177, 180, 178, 21, 155, 156, 157, 158, 159, 160, + 161, 162, 181, 164, 165, 194, 21, 196, 182, 184, + 103, 104, 21, 94, 21, 186, 188, 189, 191, 197, + 200, 97, 98, 99, 100, 101, 199, 198, 1, 203, + 2, 202, 3, 204, 4, 5, 28, 108, 21, 6, + 7, 146, 0, 8, 9, 10, 11, 187, 0, 12, + -18, 13, 0, 0, 14, 15, 0, 0, 0, 16, + 21, 0, 0, 21, 21, 1, 0, 2, 0, 3, + 0, 4, 5, 0, 0, 21, 6, 7, 0, 0, + 8, 27, 10, 11, 54, 0, 12, 55, 13, 0, + 0, 14, 15, 56, 57, 0, 16, 0, 58, 59, + 94, 95, 96, 0, 0, 60, 0, 0, 97, 98, + 99, 100, 101 +}; + +static const yytype_int16 yycheck[] = +{ + 0, 34, 30, 31, 32, 123, 3, 35, 36, 18, + 7, 11, 11, 11, 41, 15, 34, 40, 136, 36, + 20, 18, 10, 11, 142, 0, 144, 4, 5, 6, + 18, 0, 49, 37, 34, 12, 13, 14, 15, 16, + 49, 9, 49, 48, 40, 20, 14, 14, 19, 17, + 168, 51, 49, 81, 82, 39, 21, 84, 26, 45, + 10, 49, 89, 11, 64, 49, 32, 14, 45, 46, + 47, 32, 4, 5, 6, 193, 8, 11, 11, 49, + 12, 13, 14, 15, 16, 45, 9, 205, 92, 93, + 45, 14, 45, 121, 17, 11, 45, 125, 4, 5, + 6, 12, 13, 26, 15, 16, 12, 13, 14, 15, + 16, 139, 140, 36, 46, 47, 11, 7, 23, 50, + 148, 48, 149, 123, 128, 129, 130, 131, 132, 133, + 134, 135, 45, 137, 138, 27, 136, 49, 48, 48, + 46, 47, 142, 4, 144, 48, 48, 174, 176, 8, + 48, 12, 13, 14, 15, 16, 11, 190, 18, 10, + 20, 194, 22, 48, 24, 25, 6, 71, 168, 29, + 30, 116, -1, 33, 34, 35, 36, 172, -1, 39, + 40, 41, -1, -1, 44, 45, -1, -1, -1, 49, + 190, -1, -1, 193, 194, 18, -1, 20, -1, 22, + -1, 24, 25, -1, -1, 205, 29, 30, -1, -1, + 33, 34, 35, 36, 28, -1, 39, 31, 41, -1, + -1, 44, 45, 37, 38, -1, 49, -1, 42, 43, + 4, 5, 6, -1, -1, 49, -1, -1, 12, 13, + 14, 15, 16 +}; + +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ +static const yytype_int8 yystos[] = +{ + 0, 18, 20, 22, 24, 25, 29, 30, 33, 34, + 35, 36, 39, 41, 44, 45, 49, 52, 54, 61, + 63, 109, 110, 115, 11, 78, 11, 34, 61, 74, + 64, 55, 76, 49, 109, 69, 72, 80, 53, 54, + 57, 65, 0, 40, 54, 9, 14, 17, 26, 36, + 87, 36, 49, 111, 28, 31, 37, 38, 42, 43, + 49, 116, 106, 107, 108, 49, 3, 7, 88, 109, + 107, 107, 107, 63, 107, 107, 88, 48, 106, 82, + 14, 67, 66, 109, 112, 19, 21, 117, 45, 10, + 109, 32, 100, 101, 4, 5, 6, 12, 13, 14, + 15, 16, 45, 46, 47, 32, 11, 14, 57, 58, + 45, 11, 45, 81, 11, 49, 107, 107, 39, 49, + 106, 118, 45, 79, 106, 70, 88, 88, 90, 95, + 96, 91, 92, 89, 93, 94, 75, 97, 98, 99, + 59, 11, 77, 73, 45, 83, 87, 11, 114, 113, + 107, 85, 53, 107, 8, 88, 88, 88, 88, 88, + 88, 88, 88, 53, 88, 88, 107, 107, 56, 53, + 23, 102, 103, 53, 7, 60, 68, 107, 106, 50, + 48, 45, 48, 53, 48, 104, 48, 102, 48, 106, + 84, 107, 86, 71, 27, 62, 49, 8, 63, 11, + 48, 53, 63, 10, 48, 105, 53 +}; + +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ +static const yytype_int8 yyr1[] = +{ + 0, 51, 52, 52, 53, 53, 54, 54, 55, 56, + 54, 57, 59, 58, 58, 60, 60, 61, 61, 62, + 62, 63, 64, 63, 65, 63, 66, 63, 67, 68, + 63, 69, 63, 63, 63, 70, 71, 63, 72, 73, + 63, 74, 75, 63, 76, 77, 63, 78, 79, 63, + 80, 81, 63, 82, 83, 84, 63, 63, 85, 86, + 63, 87, 87, 87, 87, 88, 89, 88, 90, 88, + 91, 88, 92, 88, 93, 88, 94, 88, 95, 88, + 96, 88, 97, 88, 98, 88, 99, 88, 100, 88, + 101, 88, 102, 102, 104, 105, 103, 106, 106, 107, + 108, 108, 109, 110, 109, 112, 111, 113, 111, 114, + 111, 115, 115, 116, 116, 116, 116, 116, 116, 117, + 118, 117 +}; + +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ +static const yytype_int8 yyr2[] = +{ + 0, 2, 0, 1, 1, 1, 1, 2, 0, 0, + 7, 0, 0, 3, 1, 3, 0, 1, 0, 2, + 0, 3, 0, 4, 0, 4, 0, 5, 0, 0, + 8, 0, 4, 2, 2, 0, 0, 10, 0, 0, + 7, 0, 0, 8, 0, 0, 7, 0, 0, 7, + 0, 0, 7, 0, 0, 0, 8, 3, 0, 0, + 9, 1, 1, 1, 2, 1, 0, 4, 0, 4, + 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, + 0, 4, 0, 4, 0, 4, 0, 4, 0, 3, + 0, 4, 0, 2, 0, 0, 6, 1, 3, 1, + 0, 2, 1, 0, 4, 0, 3, 0, 5, 0, + 5, 0, 2, 1, 1, 1, 1, 1, 1, 0, + 0, 3 +}; + + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) + +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +{ + FILE *yyoutput = yyo; + YY_USE (yyoutput); + if (!yyvaluep) + return; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ + +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + + yy_symbol_value_print (yyo, yykind, yyvaluep); + YYFPRINTF (yyo, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) +{ + int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + + + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) +{ + YY_USE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/* Lookahead token kind. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (void) +{ + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; + + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + int yyn; + /* The return value of yyparse. */ + int yyresult; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yychar = YYEMPTY; /* Cause a token to be read. */ + + goto yysetstate; + + +/*------------------------------------------------------------. +| yynewstate -- push a new state, which is found in yystate. | +`------------------------------------------------------------*/ +yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + +/*--------------------------------------------------------------------. +| yysetstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); + + if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + YYNOMEM; +#else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + YYNOMEM; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + YYNOMEM; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (); + } + + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + /* Discard the shifted token. */ + yychar = YYEMPTY; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 3: /* run: rules */ +#line 148 "src/engine/jamgram.y" + { parse_save( yyvsp[0].parse ); } +#line 1384 "src/engine/jamgram.cpp" + break; + + case 4: /* block: null */ +#line 159 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1390 "src/engine/jamgram.cpp" + break; + + case 5: /* block: rules */ +#line 161 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1396 "src/engine/jamgram.cpp" + break; + + case 6: /* rules: rule */ +#line 165 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1402 "src/engine/jamgram.cpp" + break; + + case 7: /* rules: rule rules */ +#line 167 "src/engine/jamgram.y" + { yyval.parse = prules( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 1408 "src/engine/jamgram.cpp" + break; + + case 8: /* $@1: %empty */ +#line 168 "src/engine/jamgram.y" + { yymode( SCAN_ASSIGN ); } +#line 1414 "src/engine/jamgram.cpp" + break; + + case 9: /* $@2: %empty */ +#line 168 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1420 "src/engine/jamgram.cpp" + break; + + case 10: /* rules: LOCAL_t $@1 list assign_list_opt _SEMIC_t $@2 block */ +#line 169 "src/engine/jamgram.y" + { yyval.parse = plocal( yyvsp[-4].parse, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1426 "src/engine/jamgram.cpp" + break; + + case 11: /* null: %empty */ +#line 173 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 1432 "src/engine/jamgram.cpp" + break; + + case 12: /* $@3: %empty */ +#line 176 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1438 "src/engine/jamgram.cpp" + break; + + case 13: /* assign_list_opt: _EQUALS_t $@3 list */ +#line 177 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_SET; } +#line 1444 "src/engine/jamgram.cpp" + break; + + case 14: /* assign_list_opt: null */ +#line 179 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_APPEND; } +#line 1450 "src/engine/jamgram.cpp" + break; + + case 15: /* arglist_opt: _LPAREN_t lol _RPAREN_t */ +#line 183 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; } +#line 1456 "src/engine/jamgram.cpp" + break; + + case 16: /* arglist_opt: %empty */ +#line 185 "src/engine/jamgram.y" + { yyval.parse = P0; } +#line 1462 "src/engine/jamgram.cpp" + break; + + case 17: /* local_opt: LOCAL_t */ +#line 189 "src/engine/jamgram.y" + { yyval.number = 1; } +#line 1468 "src/engine/jamgram.cpp" + break; + + case 18: /* local_opt: %empty */ +#line 191 "src/engine/jamgram.y" + { yyval.number = 0; } +#line 1474 "src/engine/jamgram.cpp" + break; + + case 19: /* else_opt: ELSE_t rule */ +#line 195 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1480 "src/engine/jamgram.cpp" + break; + + case 20: /* else_opt: %empty */ +#line 197 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 1486 "src/engine/jamgram.cpp" + break; + + case 21: /* rule: _LBRACE_t block _RBRACE_t */ +#line 200 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; } +#line 1492 "src/engine/jamgram.cpp" + break; + + case 22: /* $@4: %empty */ +#line 201 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1498 "src/engine/jamgram.cpp" + break; + + case 23: /* rule: INCLUDE_t $@4 list _SEMIC_t */ +#line 202 "src/engine/jamgram.y" + { yyval.parse = pincl( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } +#line 1504 "src/engine/jamgram.cpp" + break; + + case 24: /* $@5: %empty */ +#line 203 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1510 "src/engine/jamgram.cpp" + break; + + case 25: /* rule: ARG $@5 lol _SEMIC_t */ +#line 204 "src/engine/jamgram.y" + { yyval.parse = prule( yyvsp[-3].string, yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } +#line 1516 "src/engine/jamgram.cpp" + break; + + case 26: /* $@6: %empty */ +#line 205 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1522 "src/engine/jamgram.cpp" + break; + + case 27: /* rule: arg assign $@6 list _SEMIC_t */ +#line 206 "src/engine/jamgram.y" + { yyval.parse = pset( yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); } +#line 1528 "src/engine/jamgram.cpp" + break; + + case 28: /* $@7: %empty */ +#line 207 "src/engine/jamgram.y" + { yymode( SCAN_ASSIGN ); } +#line 1534 "src/engine/jamgram.cpp" + break; + + case 29: /* $@8: %empty */ +#line 207 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1540 "src/engine/jamgram.cpp" + break; + + case 30: /* rule: arg ON_t $@7 list assign $@8 list _SEMIC_t */ +#line 208 "src/engine/jamgram.y" + { yyval.parse = pset1( yyvsp[-7].parse, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-3].number ); yymode( SCAN_NORMAL ); } +#line 1546 "src/engine/jamgram.cpp" + break; + + case 31: /* $@9: %empty */ +#line 209 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1552 "src/engine/jamgram.cpp" + break; + + case 32: /* rule: RETURN_t $@9 list _SEMIC_t */ +#line 210 "src/engine/jamgram.y" + { yyval.parse = preturn( yyvsp[-1].parse ); yymode( SCAN_NORMAL ); } +#line 1558 "src/engine/jamgram.cpp" + break; + + case 33: /* rule: BREAK_t _SEMIC_t */ +#line 212 "src/engine/jamgram.y" + { yyval.parse = pbreak(); } +#line 1564 "src/engine/jamgram.cpp" + break; + + case 34: /* rule: CONTINUE_t _SEMIC_t */ +#line 214 "src/engine/jamgram.y" + { yyval.parse = pcontinue(); } +#line 1570 "src/engine/jamgram.cpp" + break; + + case 35: /* $@10: %empty */ +#line 215 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1576 "src/engine/jamgram.cpp" + break; + + case 36: /* $@11: %empty */ +#line 215 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1582 "src/engine/jamgram.cpp" + break; + + case 37: /* rule: FOR_t local_opt ARG IN_t $@10 list _LBRACE_t $@11 block _RBRACE_t */ +#line 216 "src/engine/jamgram.y" + { yyval.parse = pfor( yyvsp[-7].string, yyvsp[-4].parse, yyvsp[-1].parse, yyvsp[-8].number ); } +#line 1588 "src/engine/jamgram.cpp" + break; + + case 38: /* $@12: %empty */ +#line 217 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1594 "src/engine/jamgram.cpp" + break; + + case 39: /* $@13: %empty */ +#line 217 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1600 "src/engine/jamgram.cpp" + break; + + case 40: /* rule: SWITCH_t $@12 list _LBRACE_t $@13 cases _RBRACE_t */ +#line 218 "src/engine/jamgram.y" + { yyval.parse = pswitch( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1606 "src/engine/jamgram.cpp" + break; + + case 41: /* $@14: %empty */ +#line 219 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1612 "src/engine/jamgram.cpp" + break; + + case 42: /* $@15: %empty */ +#line 219 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1618 "src/engine/jamgram.cpp" + break; + + case 43: /* rule: IF_t $@14 expr _LBRACE_t $@15 block _RBRACE_t else_opt */ +#line 220 "src/engine/jamgram.y" + { yyval.parse = pif( yyvsp[-5].parse, yyvsp[-2].parse, yyvsp[0].parse ); } +#line 1624 "src/engine/jamgram.cpp" + break; + + case 44: /* $@16: %empty */ +#line 221 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1630 "src/engine/jamgram.cpp" + break; + + case 45: /* $@17: %empty */ +#line 221 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1636 "src/engine/jamgram.cpp" + break; + + case 46: /* rule: MODULE_t $@16 list _LBRACE_t $@17 block _RBRACE_t */ +#line 222 "src/engine/jamgram.y" + { yyval.parse = pmodule( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1642 "src/engine/jamgram.cpp" + break; + + case 47: /* $@18: %empty */ +#line 223 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1648 "src/engine/jamgram.cpp" + break; + + case 48: /* $@19: %empty */ +#line 223 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1654 "src/engine/jamgram.cpp" + break; + + case 49: /* rule: CLASS_t $@18 lol _LBRACE_t $@19 block _RBRACE_t */ +#line 224 "src/engine/jamgram.y" + { yyval.parse = pclass( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1660 "src/engine/jamgram.cpp" + break; + + case 50: /* $@20: %empty */ +#line 225 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1666 "src/engine/jamgram.cpp" + break; + + case 51: /* $@21: %empty */ +#line 225 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1672 "src/engine/jamgram.cpp" + break; + + case 52: /* rule: WHILE_t $@20 expr $@21 _LBRACE_t block _RBRACE_t */ +#line 226 "src/engine/jamgram.y" + { yyval.parse = pwhile( yyvsp[-4].parse, yyvsp[-1].parse ); } +#line 1678 "src/engine/jamgram.cpp" + break; + + case 53: /* $@22: %empty */ +#line 227 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1684 "src/engine/jamgram.cpp" + break; + + case 54: /* $@23: %empty */ +#line 227 "src/engine/jamgram.y" + { yymode( SCAN_PARAMS ); } +#line 1690 "src/engine/jamgram.cpp" + break; + + case 55: /* $@24: %empty */ +#line 227 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1696 "src/engine/jamgram.cpp" + break; + + case 56: /* rule: local_opt RULE_t $@22 ARG $@23 arglist_opt $@24 rule */ +#line 228 "src/engine/jamgram.y" + { yyval.parse = psetc( yyvsp[-4].string, yyvsp[0].parse, yyvsp[-2].parse, yyvsp[-7].number ); } +#line 1702 "src/engine/jamgram.cpp" + break; + + case 57: /* rule: ON_t arg rule */ +#line 230 "src/engine/jamgram.y" + { yyval.parse = pon( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 1708 "src/engine/jamgram.cpp" + break; + + case 58: /* $@25: %empty */ +#line 232 "src/engine/jamgram.y" + { yymode( SCAN_STRING ); } +#line 1714 "src/engine/jamgram.cpp" + break; + + case 59: /* $@26: %empty */ +#line 234 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1720 "src/engine/jamgram.cpp" + break; + + case 60: /* rule: ACTIONS_t eflags ARG bindlist _LBRACE_t $@25 STRING $@26 _RBRACE_t */ +#line 236 "src/engine/jamgram.y" + { yyval.parse = psete( yyvsp[-6].string,yyvsp[-5].parse,yyvsp[-2].string,yyvsp[-7].number ); } +#line 1726 "src/engine/jamgram.cpp" + break; + + case 61: /* assign: _EQUALS_t */ +#line 244 "src/engine/jamgram.y" + { yyval.number = ASSIGN_SET; } +#line 1732 "src/engine/jamgram.cpp" + break; + + case 62: /* assign: _PLUS_EQUALS_t */ +#line 246 "src/engine/jamgram.y" + { yyval.number = ASSIGN_APPEND; } +#line 1738 "src/engine/jamgram.cpp" + break; + + case 63: /* assign: _QUESTION_EQUALS_t */ +#line 248 "src/engine/jamgram.y" + { yyval.number = ASSIGN_DEFAULT; } +#line 1744 "src/engine/jamgram.cpp" + break; + + case 64: /* assign: DEFAULT_t _EQUALS_t */ +#line 250 "src/engine/jamgram.y" + { yyval.number = ASSIGN_DEFAULT; } +#line 1750 "src/engine/jamgram.cpp" + break; + + case 65: /* expr: arg */ +#line 257 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_EXISTS, yyvsp[0].parse, pnull() ); yymode( SCAN_COND ); } +#line 1756 "src/engine/jamgram.cpp" + break; + + case 66: /* $@27: %empty */ +#line 258 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1762 "src/engine/jamgram.cpp" + break; + + case 67: /* expr: expr _EQUALS_t $@27 expr */ +#line 259 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_EQUALS, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1768 "src/engine/jamgram.cpp" + break; + + case 68: /* $@28: %empty */ +#line 260 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1774 "src/engine/jamgram.cpp" + break; + + case 69: /* expr: expr _BANG_EQUALS_t $@28 expr */ +#line 261 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_NOTEQ, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1780 "src/engine/jamgram.cpp" + break; + + case 70: /* $@29: %empty */ +#line 262 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1786 "src/engine/jamgram.cpp" + break; + + case 71: /* expr: expr _LANGLE_t $@29 expr */ +#line 263 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_LESS, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1792 "src/engine/jamgram.cpp" + break; + + case 72: /* $@30: %empty */ +#line 264 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1798 "src/engine/jamgram.cpp" + break; + + case 73: /* expr: expr _LANGLE_EQUALS_t $@30 expr */ +#line 265 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_LESSEQ, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1804 "src/engine/jamgram.cpp" + break; + + case 74: /* $@31: %empty */ +#line 266 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1810 "src/engine/jamgram.cpp" + break; + + case 75: /* expr: expr _RANGLE_t $@31 expr */ +#line 267 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_MORE, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1816 "src/engine/jamgram.cpp" + break; + + case 76: /* $@32: %empty */ +#line 268 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1822 "src/engine/jamgram.cpp" + break; + + case 77: /* expr: expr _RANGLE_EQUALS_t $@32 expr */ +#line 269 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_MOREEQ, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1828 "src/engine/jamgram.cpp" + break; + + case 78: /* $@33: %empty */ +#line 270 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1834 "src/engine/jamgram.cpp" + break; + + case 79: /* expr: expr _AMPER_t $@33 expr */ +#line 271 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1840 "src/engine/jamgram.cpp" + break; + + case 80: /* $@34: %empty */ +#line 272 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1846 "src/engine/jamgram.cpp" + break; + + case 81: /* expr: expr _AMPERAMPER_t $@34 expr */ +#line 273 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_AND, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1852 "src/engine/jamgram.cpp" + break; + + case 82: /* $@35: %empty */ +#line 274 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1858 "src/engine/jamgram.cpp" + break; + + case 83: /* expr: expr _BAR_t $@35 expr */ +#line 275 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1864 "src/engine/jamgram.cpp" + break; + + case 84: /* $@36: %empty */ +#line 276 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1870 "src/engine/jamgram.cpp" + break; + + case 85: /* expr: expr _BARBAR_t $@36 expr */ +#line 277 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_OR, yyvsp[-3].parse, yyvsp[0].parse ); } +#line 1876 "src/engine/jamgram.cpp" + break; + + case 86: /* $@37: %empty */ +#line 278 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1882 "src/engine/jamgram.cpp" + break; + + case 87: /* expr: arg IN_t $@37 list */ +#line 279 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_IN, yyvsp[-3].parse, yyvsp[0].parse ); yymode( SCAN_COND ); } +#line 1888 "src/engine/jamgram.cpp" + break; + + case 88: /* $@38: %empty */ +#line 280 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1894 "src/engine/jamgram.cpp" + break; + + case 89: /* expr: _BANG_t $@38 expr */ +#line 281 "src/engine/jamgram.y" + { yyval.parse = peval( EXPR_NOT, yyvsp[0].parse, pnull() ); } +#line 1900 "src/engine/jamgram.cpp" + break; + + case 90: /* $@39: %empty */ +#line 282 "src/engine/jamgram.y" + { yymode( SCAN_CONDB ); } +#line 1906 "src/engine/jamgram.cpp" + break; + + case 91: /* expr: _LPAREN_t $@39 expr _RPAREN_t */ +#line 283 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; } +#line 1912 "src/engine/jamgram.cpp" + break; + + case 92: /* cases: %empty */ +#line 294 "src/engine/jamgram.y" + { yyval.parse = P0; } +#line 1918 "src/engine/jamgram.cpp" + break; + + case 93: /* cases: case cases */ +#line 296 "src/engine/jamgram.y" + { yyval.parse = pnode( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 1924 "src/engine/jamgram.cpp" + break; + + case 94: /* $@40: %empty */ +#line 299 "src/engine/jamgram.y" + { yymode( SCAN_CASE ); } +#line 1930 "src/engine/jamgram.cpp" + break; + + case 95: /* $@41: %empty */ +#line 299 "src/engine/jamgram.y" + { yymode( SCAN_NORMAL ); } +#line 1936 "src/engine/jamgram.cpp" + break; + + case 96: /* case: CASE_t $@40 ARG _COLON_t $@41 block */ +#line 300 "src/engine/jamgram.y" + { yyval.parse = psnode( yyvsp[-3].string, yyvsp[0].parse ); } +#line 1942 "src/engine/jamgram.cpp" + break; + + case 97: /* lol: list */ +#line 309 "src/engine/jamgram.y" + { yyval.parse = pnode( P0, yyvsp[0].parse ); } +#line 1948 "src/engine/jamgram.cpp" + break; + + case 98: /* lol: list _COLON_t lol */ +#line 311 "src/engine/jamgram.y" + { yyval.parse = pnode( yyvsp[0].parse, yyvsp[-2].parse ); } +#line 1954 "src/engine/jamgram.cpp" + break; + + case 99: /* list: listp */ +#line 321 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 1960 "src/engine/jamgram.cpp" + break; + + case 100: /* listp: %empty */ +#line 325 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 1966 "src/engine/jamgram.cpp" + break; + + case 101: /* listp: listp arg */ +#line 327 "src/engine/jamgram.y" + { yyval.parse = pappend( yyvsp[-1].parse, yyvsp[0].parse ); } +#line 1972 "src/engine/jamgram.cpp" + break; + + case 102: /* arg: ARG */ +#line 331 "src/engine/jamgram.y" + { yyval.parse = plist( yyvsp[0].string ); } +#line 1978 "src/engine/jamgram.cpp" + break; + + case 103: /* @42: %empty */ +#line 332 "src/engine/jamgram.y" + { yyval.number = yymode( SCAN_CALL ); } +#line 1984 "src/engine/jamgram.cpp" + break; + + case 104: /* arg: _LBRACKET_t @42 func _RBRACKET_t */ +#line 333 "src/engine/jamgram.y" + { yyval.parse = yyvsp[-1].parse; yymode( yyvsp[-2].number ); } +#line 1990 "src/engine/jamgram.cpp" + break; + + case 105: /* $@43: %empty */ +#line 341 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 1996 "src/engine/jamgram.cpp" + break; + + case 106: /* func: ARG $@43 lol */ +#line 342 "src/engine/jamgram.y" + { yyval.parse = prule( yyvsp[-2].string, yyvsp[0].parse ); } +#line 2002 "src/engine/jamgram.cpp" + break; + + case 107: /* $@44: %empty */ +#line 343 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2008 "src/engine/jamgram.cpp" + break; + + case 108: /* func: ON_t arg ARG $@44 lol */ +#line 344 "src/engine/jamgram.y" + { yyval.parse = pon( yyvsp[-3].parse, prule( yyvsp[-2].string, yyvsp[0].parse ) ); } +#line 2014 "src/engine/jamgram.cpp" + break; + + case 109: /* $@45: %empty */ +#line 345 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2020 "src/engine/jamgram.cpp" + break; + + case 110: /* func: ON_t arg RETURN_t $@45 list */ +#line 346 "src/engine/jamgram.y" + { yyval.parse = pon( yyvsp[-3].parse, yyvsp[0].parse ); } +#line 2026 "src/engine/jamgram.cpp" + break; + + case 111: /* eflags: %empty */ +#line 356 "src/engine/jamgram.y" + { yyval.number = 0; } +#line 2032 "src/engine/jamgram.cpp" + break; + + case 112: /* eflags: eflags eflag */ +#line 358 "src/engine/jamgram.y" + { yyval.number = yyvsp[-1].number | yyvsp[0].number; } +#line 2038 "src/engine/jamgram.cpp" + break; + + case 113: /* eflag: UPDATED_t */ +#line 362 "src/engine/jamgram.y" + { yyval.number = EXEC_UPDATED; } +#line 2044 "src/engine/jamgram.cpp" + break; + + case 114: /* eflag: TOGETHER_t */ +#line 364 "src/engine/jamgram.y" + { yyval.number = EXEC_TOGETHER; } +#line 2050 "src/engine/jamgram.cpp" + break; + + case 115: /* eflag: IGNORE_t */ +#line 366 "src/engine/jamgram.y" + { yyval.number = EXEC_IGNORE; } +#line 2056 "src/engine/jamgram.cpp" + break; + + case 116: /* eflag: QUIETLY_t */ +#line 368 "src/engine/jamgram.y" + { yyval.number = EXEC_QUIETLY; } +#line 2062 "src/engine/jamgram.cpp" + break; + + case 117: /* eflag: PIECEMEAL_t */ +#line 370 "src/engine/jamgram.y" + { yyval.number = EXEC_PIECEMEAL; } +#line 2068 "src/engine/jamgram.cpp" + break; + + case 118: /* eflag: EXISTING_t */ +#line 372 "src/engine/jamgram.y" + { yyval.number = EXEC_EXISTING; } +#line 2074 "src/engine/jamgram.cpp" + break; + + case 119: /* bindlist: %empty */ +#line 381 "src/engine/jamgram.y" + { yyval.parse = pnull(); } +#line 2080 "src/engine/jamgram.cpp" + break; + + case 120: /* $@46: %empty */ +#line 382 "src/engine/jamgram.y" + { yymode( SCAN_PUNCT ); } +#line 2086 "src/engine/jamgram.cpp" + break; + + case 121: /* bindlist: BIND_t $@46 list */ +#line 383 "src/engine/jamgram.y" + { yyval.parse = yyvsp[0].parse; } +#line 2092 "src/engine/jamgram.cpp" + break; + + +#line 2096 "src/engine/jamgram.cpp" + + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; + yyerror (YY_("syntax error")); + } + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; + ++yynerrs; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + /* Pop stack until we find a state that shifts the error token. */ + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturnlab; + + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturnlab; + + +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + goto yyreturnlab; + + +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + + return yyresult; +} + diff --git a/src/boost/tools/build/src/engine/jamgram.hpp b/src/boost/tools/build/src/engine/jamgram.hpp new file mode 100644 index 000000000..f836468c6 --- /dev/null +++ b/src/boost/tools/build/src/engine/jamgram.hpp @@ -0,0 +1,176 @@ +/* A Bison parser, made by GNU Bison 3.8.2. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. + + 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 3 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, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +#ifndef YY_YY_SRC_ENGINE_JAMGRAM_HPP_INCLUDED +# define YY_YY_SRC_ENGINE_JAMGRAM_HPP_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token kinds. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + _BANG_t = 258, /* _BANG_t */ + _BANG_EQUALS_t = 259, /* _BANG_EQUALS_t */ + _AMPER_t = 260, /* _AMPER_t */ + _AMPERAMPER_t = 261, /* _AMPERAMPER_t */ + _LPAREN_t = 262, /* _LPAREN_t */ + _RPAREN_t = 263, /* _RPAREN_t */ + _PLUS_EQUALS_t = 264, /* _PLUS_EQUALS_t */ + _COLON_t = 265, /* _COLON_t */ + _SEMIC_t = 266, /* _SEMIC_t */ + _LANGLE_t = 267, /* _LANGLE_t */ + _LANGLE_EQUALS_t = 268, /* _LANGLE_EQUALS_t */ + _EQUALS_t = 269, /* _EQUALS_t */ + _RANGLE_t = 270, /* _RANGLE_t */ + _RANGLE_EQUALS_t = 271, /* _RANGLE_EQUALS_t */ + _QUESTION_EQUALS_t = 272, /* _QUESTION_EQUALS_t */ + _LBRACKET_t = 273, /* _LBRACKET_t */ + _RBRACKET_t = 274, /* _RBRACKET_t */ + ACTIONS_t = 275, /* ACTIONS_t */ + BIND_t = 276, /* BIND_t */ + BREAK_t = 277, /* BREAK_t */ + CASE_t = 278, /* CASE_t */ + CLASS_t = 279, /* CLASS_t */ + CONTINUE_t = 280, /* CONTINUE_t */ + DEFAULT_t = 281, /* DEFAULT_t */ + ELSE_t = 282, /* ELSE_t */ + EXISTING_t = 283, /* EXISTING_t */ + FOR_t = 284, /* FOR_t */ + IF_t = 285, /* IF_t */ + IGNORE_t = 286, /* IGNORE_t */ + IN_t = 287, /* IN_t */ + INCLUDE_t = 288, /* INCLUDE_t */ + LOCAL_t = 289, /* LOCAL_t */ + MODULE_t = 290, /* MODULE_t */ + ON_t = 291, /* ON_t */ + PIECEMEAL_t = 292, /* PIECEMEAL_t */ + QUIETLY_t = 293, /* QUIETLY_t */ + RETURN_t = 294, /* RETURN_t */ + RULE_t = 295, /* RULE_t */ + SWITCH_t = 296, /* SWITCH_t */ + TOGETHER_t = 297, /* TOGETHER_t */ + UPDATED_t = 298, /* UPDATED_t */ + WHILE_t = 299, /* WHILE_t */ + _LBRACE_t = 300, /* _LBRACE_t */ + _BAR_t = 301, /* _BAR_t */ + _BARBAR_t = 302, /* _BARBAR_t */ + _RBRACE_t = 303, /* _RBRACE_t */ + ARG = 304, /* ARG */ + STRING = 305 /* STRING */ + }; + typedef enum yytokentype yytoken_kind_t; +#endif +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 +#define _BANG_t 258 +#define _BANG_EQUALS_t 259 +#define _AMPER_t 260 +#define _AMPERAMPER_t 261 +#define _LPAREN_t 262 +#define _RPAREN_t 263 +#define _PLUS_EQUALS_t 264 +#define _COLON_t 265 +#define _SEMIC_t 266 +#define _LANGLE_t 267 +#define _LANGLE_EQUALS_t 268 +#define _EQUALS_t 269 +#define _RANGLE_t 270 +#define _RANGLE_EQUALS_t 271 +#define _QUESTION_EQUALS_t 272 +#define _LBRACKET_t 273 +#define _RBRACKET_t 274 +#define ACTIONS_t 275 +#define BIND_t 276 +#define BREAK_t 277 +#define CASE_t 278 +#define CLASS_t 279 +#define CONTINUE_t 280 +#define DEFAULT_t 281 +#define ELSE_t 282 +#define EXISTING_t 283 +#define FOR_t 284 +#define IF_t 285 +#define IGNORE_t 286 +#define IN_t 287 +#define INCLUDE_t 288 +#define LOCAL_t 289 +#define MODULE_t 290 +#define ON_t 291 +#define PIECEMEAL_t 292 +#define QUIETLY_t 293 +#define RETURN_t 294 +#define RULE_t 295 +#define SWITCH_t 296 +#define TOGETHER_t 297 +#define UPDATED_t 298 +#define WHILE_t 299 +#define _LBRACE_t 300 +#define _BAR_t 301 +#define _BARBAR_t 302 +#define _RBRACE_t 303 +#define ARG 304 +#define STRING 305 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + + +int yyparse (void); + + +#endif /* !YY_YY_SRC_ENGINE_JAMGRAM_HPP_INCLUDED */ diff --git a/src/boost/tools/build/src/engine/jamgram.y b/src/boost/tools/build/src/engine/jamgram.y new file mode 100644 index 000000000..4e5839381 --- /dev/null +++ b/src/boost/tools/build/src/engine/jamgram.y @@ -0,0 +1,386 @@ +%token _BANG_t +%token _BANG_EQUALS_t +%token _AMPER_t +%token _AMPERAMPER_t +%token _LPAREN_t +%token _RPAREN_t +%token _PLUS_EQUALS_t +%token _COLON_t +%token _SEMIC_t +%token _LANGLE_t +%token _LANGLE_EQUALS_t +%token _EQUALS_t +%token _RANGLE_t +%token _RANGLE_EQUALS_t +%token _QUESTION_EQUALS_t +%token _LBRACKET_t +%token _RBRACKET_t +%token ACTIONS_t +%token BIND_t +%token BREAK_t +%token CASE_t +%token CLASS_t +%token CONTINUE_t +%token DEFAULT_t +%token ELSE_t +%token EXISTING_t +%token FOR_t +%token IF_t +%token IGNORE_t +%token IN_t +%token INCLUDE_t +%token LOCAL_t +%token MODULE_t +%token ON_t +%token PIECEMEAL_t +%token QUIETLY_t +%token RETURN_t +%token RULE_t +%token SWITCH_t +%token TOGETHER_t +%token UPDATED_t +%token WHILE_t +%token _LBRACE_t +%token _BAR_t +%token _BARBAR_t +%token _RBRACE_t +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + */ + +/* + * jamgram.yy - jam grammar + * + * 04/13/94 (seiwald) - added shorthand L0 for null list pointer + * 06/01/94 (seiwald) - new 'actions existing' does existing sources + * 08/23/94 (seiwald) - Support for '+=' (append to variable) + * 08/31/94 (seiwald) - Allow ?= as alias for "default =". + * 09/15/94 (seiwald) - if conditionals take only single arguments, so + * that 'if foo == bar' gives syntax error (use =). + * 02/11/95 (seiwald) - when scanning arguments to rules, only treat + * punctuation keywords as keywords. All arg lists + * are terminated with punctuation keywords. + * + * 09/11/00 (seiwald) - Support for function calls: + * + * Rules now return lists (LIST *), rather than void. + * + * New "[ rule ]" syntax evals rule into a LIST. + * + * Lists are now generated by compile_list() and + * compile_append(), and any other rule that indirectly + * makes a list, rather than being built directly here, + * so that lists values can contain rule evaluations. + * + * New 'return' rule sets the return value, though + * other statements also may have return values. + * + * 'run' production split from 'block' production so + * that empty blocks can be handled separately. + */ + +%token ARG STRING + +%left _BARBAR_t _BAR_t +%left _AMPERAMPER_t _AMPER_t +%left _EQUALS_t _BANG_EQUALS_t IN_t +%left _LANGLE_t _LANGLE_EQUALS_t _RANGLE_t _RANGLE_EQUALS_t +%left _BANG_t + +%{ +#include "jam.h" + +#include "lists.h" +#include "parse.h" +#include "scan.h" +#include "compile.h" +#include "object.h" +#include "rules.h" + +# define YYINITDEPTH 5000 /* for C++ parsing */ +# define YYMAXDEPTH 10000 /* for OSF and other less endowed yaccs */ + +# define F0 -1 +# define P0 (PARSE *)0 +# define S0 (OBJECT *)0 + +# define pappend( l,r ) parse_make( PARSE_APPEND,l,r,P0,S0,S0,0 ) +# define peval( c,l,r ) parse_make( PARSE_EVAL,l,r,P0,S0,S0,c ) +# define pfor( s,l,r,x ) parse_make( PARSE_FOREACH,l,r,P0,s,S0,x ) +# define pif( l,r,t ) parse_make( PARSE_IF,l,r,t,S0,S0,0 ) +# define pincl( l ) parse_make( PARSE_INCLUDE,l,P0,P0,S0,S0,0 ) +# define plist( s ) parse_make( PARSE_LIST,P0,P0,P0,s,S0,0 ) +# define plocal( l,r,t ) parse_make( PARSE_LOCAL,l,r,t,S0,S0,0 ) +# define pmodule( l,r ) parse_make( PARSE_MODULE,l,r,P0,S0,S0,0 ) +# define pclass( l,r ) parse_make( PARSE_CLASS,l,r,P0,S0,S0,0 ) +# define pnull() parse_make( PARSE_NULL,P0,P0,P0,S0,S0,0 ) +# define pon( l,r ) parse_make( PARSE_ON,l,r,P0,S0,S0,0 ) +# define prule( s,p ) parse_make( PARSE_RULE,p,P0,P0,s,S0,0 ) +# define prules( l,r ) parse_make( PARSE_RULES,l,r,P0,S0,S0,0 ) +# define pset( l,r,a ) parse_make( PARSE_SET,l,r,P0,S0,S0,a ) +# define pset1( l,r,t,a ) parse_make( PARSE_SETTINGS,l,r,t,S0,S0,a ) +# define psetc( s,p,a,l ) parse_make( PARSE_SETCOMP,p,a,P0,s,S0,l ) +# define psete( s,l,s1,f ) parse_make( PARSE_SETEXEC,l,P0,P0,s,s1,f ) +# define pswitch( l,r ) parse_make( PARSE_SWITCH,l,r,P0,S0,S0,0 ) +# define pwhile( l,r ) parse_make( PARSE_WHILE,l,r,P0,S0,S0,0 ) +# define preturn( l ) parse_make( PARSE_RETURN,l,P0,P0,S0,S0,0 ) +# define pbreak() parse_make( PARSE_BREAK,P0,P0,P0,S0,S0,0 ) +# define pcontinue() parse_make( PARSE_CONTINUE,P0,P0,P0,S0,S0,0 ) + +# define pnode( l,r ) parse_make( F0,l,r,P0,S0,S0,0 ) +# define psnode( s,l ) parse_make( F0,l,P0,P0,s,S0,0 ) + +%} + +%% + +run : /* empty */ + /* do nothing */ + | rules + { parse_save( $1.parse ); } + ; + +/* + * block - zero or more rules + * rules - one or more rules + * rule - any one of jam's rules + * right-recursive so rules execute in order. + */ + +block : null + { $$.parse = $1.parse; } + | rules + { $$.parse = $1.parse; } + ; + +rules : rule + { $$.parse = $1.parse; } + | rule rules + { $$.parse = prules( $1.parse, $2.parse ); } + | LOCAL_t { yymode( SCAN_ASSIGN ); } list assign_list_opt _SEMIC_t { yymode( SCAN_NORMAL ); } block + { $$.parse = plocal( $3.parse, $4.parse, $7.parse ); } + ; + +null : /* empty */ + { $$.parse = pnull(); } + ; + +assign_list_opt : _EQUALS_t { yymode( SCAN_PUNCT ); } list + { $$.parse = $3.parse; $$.number = ASSIGN_SET; } + | null + { $$.parse = $1.parse; $$.number = ASSIGN_APPEND; } + ; + +arglist_opt : _LPAREN_t lol _RPAREN_t + { $$.parse = $2.parse; } + | + { $$.parse = P0; } + ; + +local_opt : LOCAL_t + { $$.number = 1; } + | /* empty */ + { $$.number = 0; } + ; + +else_opt : ELSE_t rule + { $$.parse = $2.parse; } + | /* empty */ + { $$.parse = pnull(); } + +rule : _LBRACE_t block _RBRACE_t + { $$.parse = $2.parse; } + | INCLUDE_t { yymode( SCAN_PUNCT ); } list _SEMIC_t + { $$.parse = pincl( $3.parse ); yymode( SCAN_NORMAL ); } + | ARG { yymode( SCAN_PUNCT ); } lol _SEMIC_t + { $$.parse = prule( $1.string, $3.parse ); yymode( SCAN_NORMAL ); } + | arg assign { yymode( SCAN_PUNCT ); } list _SEMIC_t + { $$.parse = pset( $1.parse, $4.parse, $2.number ); yymode( SCAN_NORMAL ); } + | arg ON_t { yymode( SCAN_ASSIGN ); } list assign { yymode( SCAN_PUNCT ); } list _SEMIC_t + { $$.parse = pset1( $1.parse, $4.parse, $7.parse, $5.number ); yymode( SCAN_NORMAL ); } + | RETURN_t { yymode( SCAN_PUNCT ); } list _SEMIC_t + { $$.parse = preturn( $3.parse ); yymode( SCAN_NORMAL ); } + | BREAK_t _SEMIC_t + { $$.parse = pbreak(); } + | CONTINUE_t _SEMIC_t + { $$.parse = pcontinue(); } + | FOR_t local_opt ARG IN_t { yymode( SCAN_PUNCT ); } list _LBRACE_t { yymode( SCAN_NORMAL ); } block _RBRACE_t + { $$.parse = pfor( $3.string, $6.parse, $9.parse, $2.number ); } + | SWITCH_t { yymode( SCAN_PUNCT ); } list _LBRACE_t { yymode( SCAN_NORMAL ); } cases _RBRACE_t + { $$.parse = pswitch( $3.parse, $6.parse ); } + | IF_t { yymode( SCAN_CONDB ); } expr _LBRACE_t { yymode( SCAN_NORMAL ); } block _RBRACE_t else_opt + { $$.parse = pif( $3.parse, $6.parse, $8.parse ); } + | MODULE_t { yymode( SCAN_PUNCT ); } list _LBRACE_t { yymode( SCAN_NORMAL ); } block _RBRACE_t + { $$.parse = pmodule( $3.parse, $6.parse ); } + | CLASS_t { yymode( SCAN_PUNCT ); } lol _LBRACE_t { yymode( SCAN_NORMAL ); } block _RBRACE_t + { $$.parse = pclass( $3.parse, $6.parse ); } + | WHILE_t { yymode( SCAN_CONDB ); } expr { yymode( SCAN_NORMAL ); } _LBRACE_t block _RBRACE_t + { $$.parse = pwhile( $3.parse, $6.parse ); } + | local_opt RULE_t { yymode( SCAN_PUNCT ); } ARG { yymode( SCAN_PARAMS ); } arglist_opt { yymode( SCAN_NORMAL ); } rule + { $$.parse = psetc( $4.string, $8.parse, $6.parse, $1.number ); } + | ON_t arg rule + { $$.parse = pon( $2.parse, $3.parse ); } + | ACTIONS_t eflags ARG bindlist _LBRACE_t + { yymode( SCAN_STRING ); } + STRING + { yymode( SCAN_NORMAL ); } + _RBRACE_t + { $$.parse = psete( $3.string,$4.parse,$7.string,$2.number ); } + ; + +/* + * assign - = or += + */ + +assign : _EQUALS_t + { $$.number = ASSIGN_SET; } + | _PLUS_EQUALS_t + { $$.number = ASSIGN_APPEND; } + | _QUESTION_EQUALS_t + { $$.number = ASSIGN_DEFAULT; } + | DEFAULT_t _EQUALS_t + { $$.number = ASSIGN_DEFAULT; } + ; + +/* + * expr - an expression for if + */ +expr : arg + { $$.parse = peval( EXPR_EXISTS, $1.parse, pnull() ); yymode( SCAN_COND ); } + | expr _EQUALS_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_EQUALS, $1.parse, $4.parse ); } + | expr _BANG_EQUALS_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_NOTEQ, $1.parse, $4.parse ); } + | expr _LANGLE_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_LESS, $1.parse, $4.parse ); } + | expr _LANGLE_EQUALS_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_LESSEQ, $1.parse, $4.parse ); } + | expr _RANGLE_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_MORE, $1.parse, $4.parse ); } + | expr _RANGLE_EQUALS_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_MOREEQ, $1.parse, $4.parse ); } + | expr _AMPER_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_AND, $1.parse, $4.parse ); } + | expr _AMPERAMPER_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_AND, $1.parse, $4.parse ); } + | expr _BAR_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_OR, $1.parse, $4.parse ); } + | expr _BARBAR_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_OR, $1.parse, $4.parse ); } + | arg IN_t { yymode( SCAN_PUNCT ); } list + { $$.parse = peval( EXPR_IN, $1.parse, $4.parse ); yymode( SCAN_COND ); } + | _BANG_t { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_NOT, $3.parse, pnull() ); } + | _LPAREN_t { yymode( SCAN_CONDB ); } expr _RPAREN_t + { $$.parse = $3.parse; } + ; + + +/* + * cases - action elements inside a 'switch' + * case - a single action element inside a 'switch' + * right-recursive rule so cases can be examined in order. + */ + +cases : /* empty */ + { $$.parse = P0; } + | case cases + { $$.parse = pnode( $1.parse, $2.parse ); } + ; + +case : CASE_t { yymode( SCAN_CASE ); } ARG _COLON_t { yymode( SCAN_NORMAL ); } block + { $$.parse = psnode( $3.string, $6.parse ); } + ; + +/* + * lol - list of lists + * right-recursive rule so that lists can be added in order. + */ + +lol : list + { $$.parse = pnode( P0, $1.parse ); } + | list _COLON_t lol + { $$.parse = pnode( $3.parse, $1.parse ); } + ; + +/* + * list - zero or more args in a LIST + * listp - list (in puncutation only mode) + * arg - one ARG or function call + */ + +list : listp + { $$.parse = $1.parse; } + ; + +listp : /* empty */ + { $$.parse = pnull(); } + | listp arg + { $$.parse = pappend( $1.parse, $2.parse ); } + ; + +arg : ARG + { $$.parse = plist( $1.string ); } + | _LBRACKET_t { $$.number = yymode( SCAN_CALL ); } func _RBRACKET_t + { $$.parse = $3.parse; yymode( $2.number ); } + ; + +/* + * func - a function call (inside []) + * This needs to be split cleanly out of 'rule' + */ + +func : ARG { yymode( SCAN_PUNCT ); } lol + { $$.parse = prule( $1.string, $3.parse ); } + | ON_t arg ARG { yymode( SCAN_PUNCT ); } lol + { $$.parse = pon( $2.parse, prule( $3.string, $5.parse ) ); } + | ON_t arg RETURN_t { yymode( SCAN_PUNCT ); } list + { $$.parse = pon( $2.parse, $5.parse ); } + ; + + +/* + * eflags - zero or more modifiers to 'executes' + * eflag - a single modifier to 'executes' + */ + +eflags : /* empty */ + { $$.number = 0; } + | eflags eflag + { $$.number = $1.number | $2.number; } + ; + +eflag : UPDATED_t + { $$.number = EXEC_UPDATED; } + | TOGETHER_t + { $$.number = EXEC_TOGETHER; } + | IGNORE_t + { $$.number = EXEC_IGNORE; } + | QUIETLY_t + { $$.number = EXEC_QUIETLY; } + | PIECEMEAL_t + { $$.number = EXEC_PIECEMEAL; } + | EXISTING_t + { $$.number = EXEC_EXISTING; } + ; + + +/* + * bindlist - list of variable to bind for an action + */ + +bindlist : /* empty */ + { $$.parse = pnull(); } + | BIND_t { yymode( SCAN_PUNCT ); } list + { $$.parse = $3.parse; } + ; + + diff --git a/src/boost/tools/build/src/engine/jamgram.yy b/src/boost/tools/build/src/engine/jamgram.yy new file mode 100644 index 000000000..d6158f771 --- /dev/null +++ b/src/boost/tools/build/src/engine/jamgram.yy @@ -0,0 +1,340 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + */ + +/* + * jamgram.yy - jam grammar + * + * 04/13/94 (seiwald) - added shorthand L0 for null list pointer + * 06/01/94 (seiwald) - new 'actions existing' does existing sources + * 08/23/94 (seiwald) - Support for '+=' (append to variable) + * 08/31/94 (seiwald) - Allow ?= as alias for "default =". + * 09/15/94 (seiwald) - if conditionals take only single arguments, so + * that 'if foo == bar' gives syntax error (use =). + * 02/11/95 (seiwald) - when scanning arguments to rules, only treat + * punctuation keywords as keywords. All arg lists + * are terminated with punctuation keywords. + * + * 09/11/00 (seiwald) - Support for function calls: + * + * Rules now return lists (LIST *), rather than void. + * + * New "[ rule ]" syntax evals rule into a LIST. + * + * Lists are now generated by compile_list() and + * compile_append(), and any other rule that indirectly + * makes a list, rather than being built directly here, + * so that lists values can contain rule evaluations. + * + * New 'return' rule sets the return value, though + * other statements also may have return values. + * + * 'run' production split from 'block' production so + * that empty blocks can be handled separately. + */ + +%token ARG STRING + +%left `||` `|` +%left `&&` `&` +%left `=` `!=` `in` +%left `<` `<=` `>` `>=` +%left `!` + +%{ +#include "jam.h" + +#include "lists.h" +#include "parse.h" +#include "scan.h" +#include "compile.h" +#include "object.h" +#include "rules.h" + +# define YYINITDEPTH 5000 /* for C++ parsing */ +# define YYMAXDEPTH 10000 /* for OSF and other less endowed yaccs */ + +# define F0 -1 +# define P0 (PARSE *)0 +# define S0 (OBJECT *)0 + +# define pappend( l,r ) parse_make( PARSE_APPEND,l,r,P0,S0,S0,0 ) +# define peval( c,l,r ) parse_make( PARSE_EVAL,l,r,P0,S0,S0,c ) +# define pfor( s,l,r,x ) parse_make( PARSE_FOREACH,l,r,P0,s,S0,x ) +# define pif( l,r,t ) parse_make( PARSE_IF,l,r,t,S0,S0,0 ) +# define pincl( l ) parse_make( PARSE_INCLUDE,l,P0,P0,S0,S0,0 ) +# define plist( s ) parse_make( PARSE_LIST,P0,P0,P0,s,S0,0 ) +# define plocal( l,r,t ) parse_make( PARSE_LOCAL,l,r,t,S0,S0,0 ) +# define pmodule( l,r ) parse_make( PARSE_MODULE,l,r,P0,S0,S0,0 ) +# define pclass( l,r ) parse_make( PARSE_CLASS,l,r,P0,S0,S0,0 ) +# define pnull() parse_make( PARSE_NULL,P0,P0,P0,S0,S0,0 ) +# define pon( l,r ) parse_make( PARSE_ON,l,r,P0,S0,S0,0 ) +# define prule( s,p ) parse_make( PARSE_RULE,p,P0,P0,s,S0,0 ) +# define prules( l,r ) parse_make( PARSE_RULES,l,r,P0,S0,S0,0 ) +# define pset( l,r,a ) parse_make( PARSE_SET,l,r,P0,S0,S0,a ) +# define pset1( l,r,t,a ) parse_make( PARSE_SETTINGS,l,r,t,S0,S0,a ) +# define psetc( s,p,a,l ) parse_make( PARSE_SETCOMP,p,a,P0,s,S0,l ) +# define psete( s,l,s1,f ) parse_make( PARSE_SETEXEC,l,P0,P0,s,s1,f ) +# define pswitch( l,r ) parse_make( PARSE_SWITCH,l,r,P0,S0,S0,0 ) +# define pwhile( l,r ) parse_make( PARSE_WHILE,l,r,P0,S0,S0,0 ) +# define preturn( l ) parse_make( PARSE_RETURN,l,P0,P0,S0,S0,0 ) +# define pbreak() parse_make( PARSE_BREAK,P0,P0,P0,S0,S0,0 ) +# define pcontinue() parse_make( PARSE_CONTINUE,P0,P0,P0,S0,S0,0 ) + +# define pnode( l,r ) parse_make( F0,l,r,P0,S0,S0,0 ) +# define psnode( s,l ) parse_make( F0,l,P0,P0,s,S0,0 ) + +%} + +%% + +run : /* empty */ + /* do nothing */ + | rules + { parse_save( $1.parse ); } + ; + +/* + * block - zero or more rules + * rules - one or more rules + * rule - any one of jam's rules + * right-recursive so rules execute in order. + */ + +block : null + { $$.parse = $1.parse; } + | rules + { $$.parse = $1.parse; } + ; + +rules : rule + { $$.parse = $1.parse; } + | rule rules + { $$.parse = prules( $1.parse, $2.parse ); } + | `local` { yymode( SCAN_ASSIGN ); } list assign_list_opt `;` { yymode( SCAN_NORMAL ); } block + { $$.parse = plocal( $3.parse, $4.parse, $7.parse ); } + ; + +null : /* empty */ + { $$.parse = pnull(); } + ; + +assign_list_opt : `=` { yymode( SCAN_PUNCT ); } list + { $$.parse = $3.parse; $$.number = ASSIGN_SET; } + | null + { $$.parse = $1.parse; $$.number = ASSIGN_APPEND; } + ; + +arglist_opt : `(` lol `)` + { $$.parse = $2.parse; } + | + { $$.parse = P0; } + ; + +local_opt : `local` + { $$.number = 1; } + | /* empty */ + { $$.number = 0; } + ; + +else_opt : `else` rule + { $$.parse = $2.parse; } + | /* empty */ + { $$.parse = pnull(); } + +rule : `{` block `}` + { $$.parse = $2.parse; } + | `include` { yymode( SCAN_PUNCT ); } list `;` + { $$.parse = pincl( $3.parse ); yymode( SCAN_NORMAL ); } + | ARG { yymode( SCAN_PUNCT ); } lol `;` + { $$.parse = prule( $1.string, $3.parse ); yymode( SCAN_NORMAL ); } + | arg assign { yymode( SCAN_PUNCT ); } list `;` + { $$.parse = pset( $1.parse, $4.parse, $2.number ); yymode( SCAN_NORMAL ); } + | arg `on` { yymode( SCAN_ASSIGN ); } list assign { yymode( SCAN_PUNCT ); } list `;` + { $$.parse = pset1( $1.parse, $4.parse, $7.parse, $5.number ); yymode( SCAN_NORMAL ); } + | `return` { yymode( SCAN_PUNCT ); } list `;` + { $$.parse = preturn( $3.parse ); yymode( SCAN_NORMAL ); } + | `break` `;` + { $$.parse = pbreak(); } + | `continue` `;` + { $$.parse = pcontinue(); } + | `for` local_opt ARG `in` { yymode( SCAN_PUNCT ); } list `{` { yymode( SCAN_NORMAL ); } block `}` + { $$.parse = pfor( $3.string, $6.parse, $9.parse, $2.number ); } + | `switch` { yymode( SCAN_PUNCT ); } list `{` { yymode( SCAN_NORMAL ); } cases `}` + { $$.parse = pswitch( $3.parse, $6.parse ); } + | `if` { yymode( SCAN_CONDB ); } expr `{` { yymode( SCAN_NORMAL ); } block `}` else_opt + { $$.parse = pif( $3.parse, $6.parse, $8.parse ); } + | `module` { yymode( SCAN_PUNCT ); } list `{` { yymode( SCAN_NORMAL ); } block `}` + { $$.parse = pmodule( $3.parse, $6.parse ); } + | `class` { yymode( SCAN_PUNCT ); } lol `{` { yymode( SCAN_NORMAL ); } block `}` + { $$.parse = pclass( $3.parse, $6.parse ); } + | `while` { yymode( SCAN_CONDB ); } expr { yymode( SCAN_NORMAL ); } `{` block `}` + { $$.parse = pwhile( $3.parse, $6.parse ); } + | local_opt `rule` { yymode( SCAN_PUNCT ); } ARG { yymode( SCAN_PARAMS ); } arglist_opt { yymode( SCAN_NORMAL ); } rule + { $$.parse = psetc( $4.string, $8.parse, $6.parse, $1.number ); } + | `on` arg rule + { $$.parse = pon( $2.parse, $3.parse ); } + | `actions` eflags ARG bindlist `{` + { yymode( SCAN_STRING ); } + STRING + { yymode( SCAN_NORMAL ); } + `}` + { $$.parse = psete( $3.string,$4.parse,$7.string,$2.number ); } + ; + +/* + * assign - = or += + */ + +assign : `=` + { $$.number = ASSIGN_SET; } + | `+=` + { $$.number = ASSIGN_APPEND; } + | `?=` + { $$.number = ASSIGN_DEFAULT; } + | `default` `=` + { $$.number = ASSIGN_DEFAULT; } + ; + +/* + * expr - an expression for if + */ +expr : arg + { $$.parse = peval( EXPR_EXISTS, $1.parse, pnull() ); yymode( SCAN_COND ); } + | expr `=` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_EQUALS, $1.parse, $4.parse ); } + | expr `!=` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_NOTEQ, $1.parse, $4.parse ); } + | expr `<` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_LESS, $1.parse, $4.parse ); } + | expr `<=` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_LESSEQ, $1.parse, $4.parse ); } + | expr `>` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_MORE, $1.parse, $4.parse ); } + | expr `>=` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_MOREEQ, $1.parse, $4.parse ); } + | expr `&` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_AND, $1.parse, $4.parse ); } + | expr `&&` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_AND, $1.parse, $4.parse ); } + | expr `|` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_OR, $1.parse, $4.parse ); } + | expr `||` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_OR, $1.parse, $4.parse ); } + | arg `in` { yymode( SCAN_PUNCT ); } list + { $$.parse = peval( EXPR_IN, $1.parse, $4.parse ); yymode( SCAN_COND ); } + | `!` { yymode( SCAN_CONDB ); } expr + { $$.parse = peval( EXPR_NOT, $3.parse, pnull() ); } + | `(` { yymode( SCAN_CONDB ); } expr `)` + { $$.parse = $3.parse; } + ; + + +/* + * cases - action elements inside a 'switch' + * case - a single action element inside a 'switch' + * right-recursive rule so cases can be examined in order. + */ + +cases : /* empty */ + { $$.parse = P0; } + | case cases + { $$.parse = pnode( $1.parse, $2.parse ); } + ; + +case : `case` { yymode( SCAN_CASE ); } ARG `:` { yymode( SCAN_NORMAL ); } block + { $$.parse = psnode( $3.string, $6.parse ); } + ; + +/* + * lol - list of lists + * right-recursive rule so that lists can be added in order. + */ + +lol : list + { $$.parse = pnode( P0, $1.parse ); } + | list `:` lol + { $$.parse = pnode( $3.parse, $1.parse ); } + ; + +/* + * list - zero or more args in a LIST + * listp - list (in puncutation only mode) + * arg - one ARG or function call + */ + +list : listp + { $$.parse = $1.parse; } + ; + +listp : /* empty */ + { $$.parse = pnull(); } + | listp arg + { $$.parse = pappend( $1.parse, $2.parse ); } + ; + +arg : ARG + { $$.parse = plist( $1.string ); } + | `[` { $$.number = yymode( SCAN_CALL ); } func `]` + { $$.parse = $3.parse; yymode( $2.number ); } + ; + +/* + * func - a function call (inside []) + * This needs to be split cleanly out of 'rule' + */ + +func : ARG { yymode( SCAN_PUNCT ); } lol + { $$.parse = prule( $1.string, $3.parse ); } + | `on` arg ARG { yymode( SCAN_PUNCT ); } lol + { $$.parse = pon( $2.parse, prule( $3.string, $5.parse ) ); } + | `on` arg `return` { yymode( SCAN_PUNCT ); } list + { $$.parse = pon( $2.parse, $5.parse ); } + ; + + +/* + * eflags - zero or more modifiers to 'executes' + * eflag - a single modifier to 'executes' + */ + +eflags : /* empty */ + { $$.number = 0; } + | eflags eflag + { $$.number = $1.number | $2.number; } + ; + +eflag : `updated` + { $$.number = EXEC_UPDATED; } + | `together` + { $$.number = EXEC_TOGETHER; } + | `ignore` + { $$.number = EXEC_IGNORE; } + | `quietly` + { $$.number = EXEC_QUIETLY; } + | `piecemeal` + { $$.number = EXEC_PIECEMEAL; } + | `existing` + { $$.number = EXEC_EXISTING; } + ; + + +/* + * bindlist - list of variable to bind for an action + */ + +bindlist : /* empty */ + { $$.parse = pnull(); } + | `bind` { yymode( SCAN_PUNCT ); } list + { $$.parse = $3.parse; } + ; + + diff --git a/src/boost/tools/build/src/engine/jamgramtab.h b/src/boost/tools/build/src/engine/jamgramtab.h new file mode 100644 index 000000000..38a810871 --- /dev/null +++ b/src/boost/tools/build/src/engine/jamgramtab.h @@ -0,0 +1,46 @@ + { "!", _BANG_t }, + { "!=", _BANG_EQUALS_t }, + { "&", _AMPER_t }, + { "&&", _AMPERAMPER_t }, + { "(", _LPAREN_t }, + { ")", _RPAREN_t }, + { "+=", _PLUS_EQUALS_t }, + { ":", _COLON_t }, + { ";", _SEMIC_t }, + { "<", _LANGLE_t }, + { "<=", _LANGLE_EQUALS_t }, + { "=", _EQUALS_t }, + { ">", _RANGLE_t }, + { ">=", _RANGLE_EQUALS_t }, + { "?=", _QUESTION_EQUALS_t }, + { "[", _LBRACKET_t }, + { "]", _RBRACKET_t }, + { "actions", ACTIONS_t }, + { "bind", BIND_t }, + { "break", BREAK_t }, + { "case", CASE_t }, + { "class", CLASS_t }, + { "continue", CONTINUE_t }, + { "default", DEFAULT_t }, + { "else", ELSE_t }, + { "existing", EXISTING_t }, + { "for", FOR_t }, + { "if", IF_t }, + { "ignore", IGNORE_t }, + { "in", IN_t }, + { "include", INCLUDE_t }, + { "local", LOCAL_t }, + { "module", MODULE_t }, + { "on", ON_t }, + { "piecemeal", PIECEMEAL_t }, + { "quietly", QUIETLY_t }, + { "return", RETURN_t }, + { "rule", RULE_t }, + { "switch", SWITCH_t }, + { "together", TOGETHER_t }, + { "updated", UPDATED_t }, + { "while", WHILE_t }, + { "{", _LBRACE_t }, + { "|", _BAR_t }, + { "||", _BARBAR_t }, + { "}", _RBRACE_t }, diff --git a/src/boost/tools/build/src/engine/lists.cpp b/src/boost/tools/build/src/engine/lists.cpp new file mode 100644 index 000000000..abdbeda48 --- /dev/null +++ b/src/boost/tools/build/src/engine/lists.cpp @@ -0,0 +1,455 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * lists.c - maintain lists of objects + */ + +#include "jam.h" +#include "lists.h" +#include "mem.h" +#include "output.h" +#include "startup.h" + +#include + +static int32_t get_bucket( int32_t size ) +{ + int32_t bucket = 0; + while ( size > ( int32_t(1) << bucket ) ) ++bucket; + return bucket; +} + +static LIST * list_alloc( int32_t size ) +{ + int32_t bucket = get_bucket( size ); + return b2::jam::ctor_ptr( BJAM_CALLOC( + 1, sizeof( LIST ) + ( size_t( 1 ) << bucket ) * sizeof( OBJECT * ) ) ); +} + +static void list_dealloc( LIST * l ) +{ + int32_t size = list_length( l ); + LIST * node = l; + + if ( size == 0 ) return; + + b2::jam::free_ptr( node ); +} + +/* + * list_append() - append a list onto another one, returning total + */ + +LIST * list_append( LIST * l, LIST * nl ) +{ + if ( list_empty( l ) ) + return nl; + if ( !list_empty( nl ) ) + { + int32_t l_size = list_length( l ); + int32_t nl_size = list_length( nl ); + int32_t size = l_size + nl_size; + int32_t bucket = get_bucket( size ); + + /* Do we need to reallocate? */ + if ( l_size <= ( int32_t(1) << ( bucket - 1 ) ) ) + { + LIST * result = list_alloc( size ); + memcpy( list_begin( result ), list_begin( l ), l_size * sizeof( + OBJECT * ) ); + list_dealloc( l ); + l = result; + } + + l->impl.size = size; + memcpy( list_begin( l ) + l_size, list_begin( nl ), nl_size * sizeof( + OBJECT * ) ); + list_dealloc( nl ); + } + return l; +} + +LISTITER list_begin( LIST * l ) +{ + return l ? (LISTITER)( (char *)l + sizeof( LIST ) ) : 0; +} + +LISTITER list_end( LIST * l ) +{ + return l ? list_begin( l ) + l->impl.size : 0; +} + +LIST * list_new( OBJECT * value ) +{ + LIST * const head = list_alloc( 1 ) ; + head->impl.size = 1; + list_begin( head )[ 0 ] = value; + return head; +} + +/* + * list_push_back() - tack a string onto the end of a list of strings + */ + +LIST * list_push_back( LIST * head, OBJECT * value ) +{ + int32_t size = list_length( head ); + + if ( DEBUG_LISTS ) + out_printf( "list > %s <\n", object_str( value ) ); + + /* If the size is a power of 2, reallocate. */ + if ( size == 0 ) + { + head = list_alloc( 1 ); + } + else if ( ( ( size - 1 ) & size ) == 0 ) + { + LIST * l = list_alloc( size + 1 ); + memcpy( l, head, sizeof( LIST ) + size * sizeof( OBJECT * ) ); + list_dealloc( head ); + head = l; + } + + list_begin( head )[ size ] = value; + head->impl.size = size + 1; + + return head; +} + + +/* + * list_copy() - copy a whole list of strings (nl) onto end of another (l). + */ + +LIST * list_copy( LIST * l ) +{ + int32_t size = list_length( l ); + int32_t i; + LIST * result; + + if ( size == 0 ) return L0; + + result = list_alloc( size ); + result->impl.size = size; + for ( i = 0; i < size; ++i ) + list_begin( result )[ i ] = object_copy( list_begin( l )[ i ] ); + return result; +} + + +LIST * list_copy_range( LIST * l, LISTITER first, LISTITER last ) +{ + if ( first == last ) + return L0; + else + { + int32_t size = int32_t( last - first ); + LIST * result = list_alloc( size ); + LISTITER dest = list_begin( result ); + result->impl.size = size; + for ( ; first != last; ++first, ++dest ) + *dest = object_copy( *first ); + return result; + } +} + + +/* + * list_sublist() - copy a subset of a list of strings. + */ + +LIST * list_sublist( LIST * l, int32_t start, int32_t count ) +{ + int32_t end = start + count; + int32_t size = list_length( l ); + if ( start >= size ) return L0; + if ( end > size ) end = size; + return list_copy_range( l, list_begin( l ) + start, list_begin( l ) + end ); +} + + +static int32_t str_ptr_compare( void const * va, void const * vb ) +{ + OBJECT * a = *( (OBJECT * *)va ); + OBJECT * b = *( (OBJECT * *)vb ); + return strcmp( object_str( a ), object_str( b ) ); +} + + +LIST * list_sort( LIST * l ) +{ + int32_t len; + LIST * result; + + if ( !l ) + return L0; + + len = list_length( l ); + result = list_copy( l ); + + qsort( list_begin( result ), len, sizeof( OBJECT * ), str_ptr_compare ); + + return result; +} + + +/* + * list_free() - free a list of strings + */ + +void list_free( LIST * head ) +{ + if ( !list_empty( head ) ) + { + LISTITER iter = list_begin( head ); + LISTITER const end = list_end( head ); + for ( ; iter != end; iter = list_next( iter ) ) + object_free( list_item( iter ) ); + list_dealloc( head ); + } +} + + +/* + * list_pop_front() - remove the front element from a list of strings + */ + +LIST * list_pop_front( LIST * l ) +{ + int32_t size = list_length( l ); + assert( size ); + --size; + object_free( list_front( l ) ); + + if ( size == 0 ) + { + list_dealloc( l ); + return L0; + } + + if ( ( ( size - 1 ) & size ) == 0 ) + { + LIST * const nl = list_alloc( size ); + nl->impl.size = size; + memcpy( list_begin( nl ), list_begin( l ) + 1, size * sizeof( OBJECT * ) + ); + list_dealloc( l ); + return nl; + } + + l->impl.size = size; + memmove( list_begin( l ), list_begin( l ) + 1, size * sizeof( OBJECT * ) ); + return l; +} + +LIST * list_reverse( LIST * l ) +{ + int32_t size = list_length( l ); + if ( size == 0 ) return L0; + { + LIST * const result = list_alloc( size ); + int32_t i; + result->impl.size = size; + for ( i = 0; i < size; ++i ) + list_begin( result )[ i ] = object_copy( list_begin( l )[ size - i - + 1 ] ); + return result; + } +} + +int32_t list_cmp( LIST * t, LIST * s ) +{ + int32_t status = 0; + LISTITER t_it = list_begin( t ); + LISTITER const t_end = list_end( t ); + LISTITER s_it = list_begin( s ); + LISTITER const s_end = list_end( s ); + + while ( !status && ( t_it != t_end || s_it != s_end ) ) + { + char const * st = t_it != t_end ? object_str( list_item( t_it ) ) : ""; + char const * ss = s_it != s_end ? object_str( list_item( s_it ) ) : ""; + + status = strcmp( st, ss ); + + t_it = t_it != t_end ? list_next( t_it ) : t_it; + s_it = s_it != s_end ? list_next( s_it ) : s_it; + } + + return status; +} + +int32_t list_is_sublist( LIST * sub, LIST * l ) +{ + LISTITER iter = list_begin( sub ); + LISTITER const end = list_end( sub ); + for ( ; iter != end; iter = list_next( iter ) ) + if ( !list_in( l, list_item( iter ) ) ) + return 0; + return 1; +} + +/* + * list_print() - print a list of strings to stdout + */ + +void list_print( LIST * l ) +{ + LISTITER iter = list_begin( l ), end = list_end( l ); + if ( iter != end ) + { + out_printf( "%s", object_str( list_item( iter ) ) ); + iter = list_next( iter ); + for ( ; iter != end; iter = list_next( iter ) ) + out_printf( " %s", object_str( list_item( iter ) ) ); + } +} + + +/* + * list_length() - return the number of items in the list + */ + +int32_t list_length( LIST * l ) +{ + return l ? l->impl.size : 0; +} + + +int32_t list_in( LIST * l, OBJECT * value ) +{ + LISTITER iter = list_begin( l ); + LISTITER end = list_end( l ); + for ( ; iter != end; iter = list_next( iter ) ) + if ( object_equal( list_item( iter ), value ) ) + return 1; + return 0; +} + + +LIST * list_unique( LIST * sorted_list ) +{ + LIST * result = L0; + OBJECT * last_added = 0; + + LISTITER iter = list_begin( sorted_list ), end = list_end( sorted_list ); + for ( ; iter != end; iter = list_next( iter ) ) + { + if ( !last_added || !object_equal( list_item( iter ), last_added ) ) + { + result = list_push_back( result, object_copy( list_item( iter ) ) ); + last_added = list_item( iter ); + } + } + return result; +} + +void list_done() +{ +} + + +/* + * lol_init() - initialize a LOL (list of lists). + */ + +void lol_init( LOL * lol ) +{ + lol->count = 0; +} + + +/* + * lol_add() - append a LIST onto an LOL. + */ + +void lol_add( LOL * lol, LIST * l ) +{ + if ( lol->count < LOL_MAX ) + { + lol->list[ lol->count++ ] = l; + return; + } + + err_printf( "lol_add failed due to reached limit of %d elements\n", LOL_MAX ); + b2::clean_exit( EXITBAD ); +} + + +/* + * lol_free() - free the LOL and its LISTs. + */ + +void lol_free( LOL * lol ) +{ + int32_t i; + for ( i = 0; i < lol->count; ++i ) + list_free( lol->list[ i ] ); + lol->count = 0; +} + + +/* + * lol_get() - return one of the LISTs in the LOL. + */ + +LIST * lol_get( LOL * lol, int32_t i ) +{ + return i < lol->count ? lol->list[ i ] : L0; +} + + +/* + * lol_print() - debug print LISTS separated by ":". + */ + +void lol_print( LOL * lol ) +{ + int32_t i; + for ( i = 0; i < lol->count; ++i ) + { + if ( i ) + out_printf( " : " ); + list_print( lol->list[ i ] ); + } +} + +#ifdef HAVE_PYTHON + +PyObject * list_to_python( LIST * l ) +{ + PyObject * result = PyList_New( 0 ); + LISTITER iter = list_begin( l ); + LISTITER const end = list_end( l ); + for ( ; iter != end; iter = list_next( iter ) ) + { + PyObject * s = PyString_FromString( object_str( list_item( iter ) ) ); + PyList_Append( result, s ); + Py_DECREF( s ); + } + + return result; +} + +LIST * list_from_python( PyObject * l ) +{ + LIST * result = L0; + + Py_ssize_t n = PySequence_Size( l ); + Py_ssize_t i; + for ( i = 0; i < n; ++i ) + { + PyObject * v = PySequence_GetItem( l, i ); + result = list_push_back( result, object_new( PyString_AsString( v ) ) ); + Py_DECREF( v ); + } + + return result; +} + +#endif diff --git a/src/boost/tools/build/src/engine/lists.h b/src/boost/tools/build/src/engine/lists.h new file mode 100644 index 000000000..15b1f6f4e --- /dev/null +++ b/src/boost/tools/build/src/engine/lists.h @@ -0,0 +1,182 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * lists.h - the LIST structure and routines to manipulate them + * + * The whole of jam relies on lists of objects as a datatype. This module, in + * conjunction with object.c, handles these relatively efficiently. + * + * Structures defined: + * + * LIST - list of OBJECTs + * LOL - list of LISTs + * + * External routines: + * + * list_append() - append a list onto another one, returning total + * list_new() - tack an object onto the end of a list of objects + * list_copy() - copy a whole list of objects + * list_sublist() - copy a subset of a list of objects + * list_free() - free a list of objects + * list_print() - print a list of objects to stdout + * list_length() - return the number of items in the list + * + * lol_init() - initialize a LOL (list of lists) + * lol_add() - append a LIST onto an LOL + * lol_free() - free the LOL and its LISTs + * lol_get() - return one of the LISTs in the LOL + * lol_print() - debug print LISTS separated by ":" + */ + +#ifndef LISTS_DWA20011022_H +#define LISTS_DWA20011022_H + +#include "config.h" +#include "object.h" + +#ifdef HAVE_PYTHON +# include +#endif + +/* + * LIST - list of strings + */ + +struct LIST { + union { + int32_t size; + struct LIST * next; + OBJECT * align; + } impl; + + LIST() + { + this->impl.next = nullptr; + } +}; + +typedef LIST * list_ptr; +typedef OBJECT * * LISTITER; + +/* + * LOL - list of LISTs + */ + +#define LOL_MAX 19 +typedef struct _lol { + int32_t count; + LIST * list[ LOL_MAX ]; +} LOL; + +LIST * list_new( OBJECT * value ); +LIST * list_append( LIST * destination, LIST * source ); +LIST * list_copy( LIST * ); +LIST * list_copy_range( LIST * destination, LISTITER first, LISTITER last ); +void list_free( LIST * head ); +LIST * list_push_back( LIST * head, OBJECT * value ); +void list_print( LIST * ); +int32_t list_length( LIST * ); +LIST * list_sublist( LIST *, int32_t start, int32_t count ); +LIST * list_pop_front( LIST * ); +LIST * list_sort( LIST * ); +LIST * list_unique( LIST * sorted_list ); +int32_t list_in( LIST *, OBJECT * value ); +LIST * list_reverse( LIST * ); +int32_t list_cmp( LIST * lhs, LIST * rhs ); +int32_t list_is_sublist( LIST * sub, LIST * l ); +void list_done(); + +LISTITER list_begin( LIST * ); +LISTITER list_end( LIST * ); +#define list_next( it ) ((it) + 1) +#define list_item( it ) (*(it)) +#define list_empty( l ) ((l) == L0) +#define list_front( l ) list_item( list_begin( l ) ) + +#define L0 ((LIST *)0) + +void lol_add( LOL *, LIST * ); +void lol_init( LOL * ); +void lol_free( LOL * ); +LIST * lol_get( LOL *, int i ); +void lol_print( LOL * ); +void lol_build( LOL *, char const * * elements ); + +#ifdef HAVE_PYTHON +PyObject * list_to_python( LIST * ); +LIST * list_from_python( PyObject * ); +#endif + +namespace b2 { namespace jam { + struct list + { + struct iterator + { + inline explicit iterator(LISTITER i) : list_i(i) {} + + inline iterator operator++() + { + list_i = list_next(list_i); + return *this; + } + inline iterator operator++(int) + { + iterator result{*this}; + list_i = list_next(list_i); + return result; + } + inline bool operator==(iterator other) const { return list_i == other.list_i; } + inline bool operator!=(iterator other) const { return list_i != other.list_i; } + inline OBJECT *& operator*() const { return list_item(list_i); } + inline OBJECT ** operator->() const { return &list_item(list_i); } + + private: + + LISTITER list_i; + }; + + friend struct iterator; + + inline list(const list &other) + : list_obj(list_copy(other.list_obj)) {} + inline explicit list(const object &o) + : list_obj(list_new(object_copy(o))) {} + inline explicit list(LIST *l) + : list_obj(list_copy(l)) {} + + inline ~list() { if (list_obj) list_free(list_obj); } + inline LIST* release() + { + LIST* r = list_obj; + list_obj = nullptr; + return r; + } + + inline iterator begin() { return iterator(list_begin(list_obj)); } + inline iterator end() { return iterator(list_end(list_obj)); } + inline bool empty() const { return list_empty(list_obj) || length() == 0; } + inline int32_t length() const { return list_length(list_obj); } + inline list &append(const list &other) + { + list_obj = list_append(list_obj, list_copy(other.list_obj)); + return *this; + } + + private: + + LIST *list_obj = nullptr; + }; +}} + +#endif diff --git a/src/boost/tools/build/src/engine/make.cpp b/src/boost/tools/build/src/engine/make.cpp new file mode 100644 index 000000000..5d3764035 --- /dev/null +++ b/src/boost/tools/build/src/engine/make.cpp @@ -0,0 +1,931 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * make.c - bring a target up to date, once rules are in place. + * + * This modules controls the execution of rules to bring a target and its + * dependencies up to date. It is invoked after the targets, rules, et. al. + * described in rules.h are created by the interpreting jam files. + * + * This file contains the main make() entry point and the first pass make0(). + * The second pass, make1(), which actually does the command execution, is in + * make1.c. + * + * External routines: + * make() - make a target, given its name + * + * Internal routines: + * make0() - bind and scan everything to make a TARGET + * make0sort() - reorder TARGETS chain by their time (newest to oldest) + */ + +#include "jam.h" +#include "make.h" + +#include "command.h" +#ifdef OPT_HEADER_CACHE_EXT +# include "hcache.h" +#endif +#include "headers.h" +#include "lists.h" +#include "object.h" +#include "parse.h" +#include "rules.h" +#include "search.h" +#include "timestamp.h" +#include "variable.h" +#include "execcmd.h" +#include "output.h" + +#include + +#ifndef max +# define max(a,b) ((a)>(b)?(a):(b)) +#endif + +static targets_uptr make0sort( targets_uptr c ); + +#ifdef OPT_GRAPH_DEBUG_EXT + static void dependGraphOutput( TARGET * t, int32_t depth ); +#endif + +static char const * target_fate[] = +{ + "init", /* T_FATE_INIT */ + "making", /* T_FATE_MAKING */ + "stable", /* T_FATE_STABLE */ + "newer", /* T_FATE_NEWER */ + "temp", /* T_FATE_ISTMP */ + "touched", /* T_FATE_TOUCHED */ + "rebuild", /* T_FATE_REBUILD */ + "missing", /* T_FATE_MISSING */ + "needtmp", /* T_FATE_NEEDTMP */ + "old", /* T_FATE_OUTDATED */ + "update", /* T_FATE_UPDATE */ + "nofind", /* T_FATE_CANTFIND */ + "nomake" /* T_FATE_CANTMAKE */ +}; + +static char const * target_bind[] = +{ + "unbound", + "missing", + "parents", + "exists", +}; + +#define spaces(x) ( ((const char *)" ") + ( x > 20 ? 0 : 20-x ) ) + + +/* + * make() - make a target, given its name. + */ + +int32_t make( LIST * targets, int32_t anyhow ) +{ + COUNTS counts[ 1 ]; + int32_t status = 0; /* 1 if anything fails */ + +#ifdef OPT_HEADER_CACHE_EXT + hcache_init(); +#endif + + memset( (char *)counts, 0, sizeof( *counts ) ); + + /* Make sure that the tables are set up correctly. + */ + exec_init(); + + /* First bind all targets with LOCATE_TARGET setting. This is needed to + * correctly handle dependencies to generated headers. + */ + bind_explicitly_located_targets(); + + { + LISTITER iter, end; + PROFILE_ENTER( MAKE_MAKE0 ); + for ( iter = list_begin( targets ), end = list_end( targets ); iter != end; iter = list_next( iter ) ) + { + TARGET * t = bindtarget( list_item( iter ) ); + if ( t->fate == T_FATE_INIT ) + make0( t, 0, 0, counts, anyhow, 0 ); + } + PROFILE_EXIT( MAKE_MAKE0 ); + } + +#ifdef OPT_GRAPH_DEBUG_EXT + if ( DEBUG_GRAPH ) + { + LISTITER iter, end; + for ( iter = list_begin( targets ), end = list_end( targets ); iter != end; iter = list_next( iter ) ) + dependGraphOutput( bindtarget( list_item( iter ) ), 0 ); + } +#endif + + if ( DEBUG_MAKE ) + { + if ( counts->targets ) + out_printf( "...found %d target%s...\n", counts->targets, + counts->targets > 1 ? "s" : "" ); + if ( counts->temp ) + out_printf( "...using %d temp target%s...\n", counts->temp, + counts->temp > 1 ? "s" : "" ); + if ( counts->updating ) + out_printf( "...updating %d target%s...\n", counts->updating, + counts->updating > 1 ? "s" : "" ); + if ( counts->cantfind ) + out_printf( "...can't find %d target%s...\n", counts->cantfind, + counts->cantfind > 1 ? "s" : "" ); + if ( counts->cantmake ) + out_printf( "...can't make %d target%s...\n", counts->cantmake, + counts->cantmake > 1 ? "s" : "" ); + } + + status = counts->cantfind || counts->cantmake; + + { + PROFILE_ENTER( MAKE_MAKE1 ); + status |= make1( targets ); + PROFILE_EXIT( MAKE_MAKE1 ); + } + + return status; +} + + +/* Force any dependants of t that have already at least begun being visited by + * make0() to be updated. + */ + +static void force_rebuilds( TARGET * t ); + +static void update_dependants( TARGET * t ) +{ + targets_ptr q; + + for ( q = t->dependants.get(); q; q = q->next.get() ) + { + TARGET * p = q->target; + char fate0 = p->fate; + + /* If we have already at least begun visiting it and we are not already + * rebuilding it for other reasons. + */ + if ( ( fate0 != T_FATE_INIT ) && ( fate0 < T_FATE_BUILD ) ) + { + p->fate = T_FATE_UPDATE; + + if ( DEBUG_FATE ) + { + out_printf( "fate change %s from %s to %s (as dependent of %s)\n", + object_str( p->name ), target_fate[ (int32_t) fate0 ], target_fate[ (int32_t) p->fate ], object_str( t->name ) ); + } + + /* If we are done visiting it, go back and make sure its dependants + * get rebuilt. + */ + if ( fate0 > T_FATE_MAKING ) + update_dependants( p ); + } + } + /* Make sure that rebuilds can be chained. */ + force_rebuilds( t ); +} + + +/* + * Make sure that all of t's rebuilds get rebuilt. + */ + +static void force_rebuilds( TARGET * t ) +{ + targets_ptr d; + for ( d = t->rebuilds.get(); d; d = d->next.get() ) + { + TARGET * r = d->target; + + /* If it is not already being rebuilt for other reasons. */ + if ( r->fate < T_FATE_BUILD ) + { + if ( DEBUG_FATE ) + out_printf( "fate change %s from %s to %s (by rebuild)\n", + object_str( r->name ), target_fate[ (int32_t) r->fate ], target_fate[ T_FATE_REBUILD ] ); + + /* Force rebuild it. */ + r->fate = T_FATE_REBUILD; + + /* And make sure its dependants are updated too. */ + update_dependants( r ); + } + } +} + + +int32_t make0rescan( TARGET * t, TARGET * rescanning ) +{ + int32_t result = 0; + targets_ptr c; + + /* Check whether we have already found a cycle. */ + if ( target_scc( t ) == rescanning ) + return 1; + + /* If we have already visited this node, ignore it. */ + if ( t->rescanning == rescanning ) + return 0; + + /* If t is already updated, ignore it. */ + if ( t->scc_root == NULL && t->progress > T_MAKE_ACTIVE ) + return 0; + + t->rescanning = rescanning; + for ( c = t->depends.get(); c; c = c->next.get() ) + { + TARGET * dependency = c->target; + /* Always start at the root of each new strongly connected component. */ + if ( target_scc( dependency ) != target_scc( t ) ) + dependency = target_scc( dependency ); + result |= make0rescan( dependency, rescanning ); + + /* Make sure that we pick up the new include node. */ + if ( c->target->includes == rescanning ) + result = 1; + } + if ( result && t->scc_root == NULL ) + { + t->scc_root = rescanning; + targetentry( rescanning->depends, t ); + } + return result; +} + + +/* + * make0() - bind and scan everything to make a TARGET. + * + * Recursively binds a target, searches for #included headers, calls itself on + * those headers and any dependencies. + */ + +void make0 +( + TARGET * t, + TARGET * p, /* parent */ + int32_t depth, /* for display purposes */ + COUNTS * counts, /* for reporting */ + int32_t anyhow, + TARGET * rescanning +) /* forcibly touch all (real) targets */ +{ + targets_ptr c; + TARGET * ptime = t; + TARGET * located_target = 0; + timestamp last; + timestamp leaf; + timestamp hlast; + int32_t fate; + char const * flag = ""; + SETTINGS * s; + +#ifdef OPT_GRAPH_DEBUG_EXT + int32_t savedFate; + int32_t oldTimeStamp; +#endif + + if ( DEBUG_MAKEPROG ) + out_printf( "make\t--\t%s%s\n", spaces( depth ), object_str( t->name ) ); + + /* + * Step 1: Initialize. + */ + + if ( DEBUG_MAKEPROG ) + out_printf( "make\t--\t%s%s\n", spaces( depth ), object_str( t->name ) ); + + t->fate = T_FATE_MAKING; + t->depth = depth; + + /* + * Step 2: Under the influence of "on target" variables, bind the target and + * search for headers. + */ + + /* Step 2a: Set "on target" variables. */ + s = copysettings( t->settings ); + pushsettings( root_module(), s ); + + /* Step 2b: Find and timestamp the target file (if it is a file). */ + if ( ( t->binding == T_BIND_UNBOUND ) && !( t->flags & T_FLAG_NOTFILE ) ) + { + OBJECT * another_target; + object_free( t->boundname ); + t->boundname = search( t->name, &t->time, &another_target, + t->flags & T_FLAG_ISFILE ); + /* If it was detected that this target refers to an already existing and + * bound target, we add a dependency so that every target depending on + * us will depend on that other target as well. + */ + if ( another_target ) + located_target = bindtarget( another_target ); + + t->binding = timestamp_empty( &t->time ) + ? T_BIND_MISSING + : T_BIND_EXISTS; + } + + /* INTERNAL, NOTFILE header nodes have the time of their parents. */ + if ( p && ( t->flags & T_FLAG_INTERNAL ) ) + ptime = p; + + /* If temp file does not exist but parent does, use parent. */ + if ( p && ( t->flags & T_FLAG_TEMP ) && + ( t->binding == T_BIND_MISSING ) && + ( p->binding != T_BIND_MISSING ) ) + { + t->binding = T_BIND_PARENTS; + ptime = p; + } + +#ifdef OPT_SEMAPHORE + { + LIST * var = var_get( root_module(), constant_JAM_SEMAPHORE ); + if ( !list_empty( var ) ) + { + TARGET * const semaphore = bindtarget( list_front( var ) ); + semaphore->progress = T_MAKE_SEMAPHORE; + t->semaphore = semaphore; + } + } +#endif + + /* Step 2c: If its a file, search for headers. */ + if ( t->binding == T_BIND_EXISTS ) + headers( t ); + + /* Step 2d: reset "on target" variables. */ + popsettings( root_module(), s ); + freesettings( s ); + + /* + * Pause for a little progress reporting. + */ + + if ( DEBUG_BIND ) + { + if ( !object_equal( t->name, t->boundname ) ) + out_printf( "bind\t--\t%s%s: %s\n", spaces( depth ), + object_str( t->name ), object_str( t->boundname ) ); + + switch ( t->binding ) + { + case T_BIND_UNBOUND: + case T_BIND_MISSING: + case T_BIND_PARENTS: + out_printf( "time\t--\t%s%s: %s\n", spaces( depth ), + object_str( t->name ), target_bind[ (int32_t)t->binding ] ); + break; + + case T_BIND_EXISTS: + out_printf( "time\t--\t%s%s: %s\n", spaces( depth ), + object_str( t->name ), timestamp_str( &t->time ) ); + break; + } + } + + /* + * Step 3: Recursively make0() dependencies & headers. + */ + + /* Step 3a: Recursively make0() dependencies. */ + for ( c = t->depends.get(); c; c = c->next.get() ) + { + int32_t const internal = t->flags & T_FLAG_INTERNAL; + + /* Warn about circular deps, except for includes, which include each + * other alot. + */ + if ( c->target->fate == T_FATE_INIT ) + make0( c->target, ptime, depth + 1, counts, anyhow, rescanning ); + else if ( c->target->fate == T_FATE_MAKING && !internal ) + out_printf( "warning: %s depends on itself\n", object_str( + c->target->name ) ); + else if ( c->target->fate != T_FATE_MAKING && rescanning ) + make0rescan( c->target, rescanning ); + if ( rescanning && c->target->includes && c->target->includes->fate != + T_FATE_MAKING ) + make0rescan( target_scc( c->target->includes ), rescanning ); + } + + if ( located_target ) + { + if ( located_target->fate == T_FATE_INIT ) + make0( located_target, ptime, depth + 1, counts, anyhow, rescanning + ); + else if ( located_target->fate != T_FATE_MAKING && rescanning ) + make0rescan( located_target, rescanning ); + } + + /* Step 3b: Recursively make0() internal includes node. */ + if ( t->includes ) + make0( t->includes, p, depth + 1, counts, anyhow, rescanning ); + + /* Step 3c: Add dependencies' includes to our direct dependencies. */ + { + targets_uptr incs; + for ( c = t->depends.get(); c; c = c->next.get() ) + if ( c->target->includes ) + targetentry( incs, c->target->includes ); + t->depends = targetchain( std::move(t->depends), std::move(incs) ); + } + + if ( located_target ) + targetentry( t->depends, located_target ); + + /* Step 3d: Detect cycles. */ + { + int32_t cycle_depth = depth; + for ( c = t->depends.get(); c; c = c->next.get() ) + { + TARGET * scc_root = target_scc( c->target ); + if ( scc_root->fate == T_FATE_MAKING && + ( !scc_root->includes || + scc_root->includes->fate != T_FATE_MAKING ) ) + { + if ( scc_root->depth < cycle_depth ) + { + cycle_depth = scc_root->depth; + t->scc_root = scc_root; + } + } + } + } + + /* + * Step 4: Compute time & fate. + */ + + /* Step 4a: Pick up dependencies' time and fate. */ + timestamp_clear( &last ); + timestamp_clear( &leaf ); + fate = T_FATE_STABLE; + for ( c = t->depends.get(); c; c = c->next.get() ) + { + /* If we are in a different strongly connected component, pull + * timestamps from the root. + */ + if ( c->target->scc_root ) + { + TARGET * const scc_root = target_scc( c->target ); + if ( scc_root != t->scc_root ) + { + timestamp_max( &c->target->leaf, &c->target->leaf, + &scc_root->leaf ); + timestamp_max( &c->target->time, &c->target->time, + &scc_root->time ); + c->target->fate = max( c->target->fate, scc_root->fate ); + } + } + + /* If LEAVES has been applied, we only heed the timestamps of the leaf + * source nodes. + */ + timestamp_max( &leaf, &leaf, &c->target->leaf ); + if ( t->flags & T_FLAG_LEAVES ) + { + timestamp_copy( &last, &leaf ); + continue; + } + timestamp_max( &last, &last, &c->target->time ); + fate = max( fate, c->target->fate ); + +#ifdef OPT_GRAPH_DEBUG_EXT + if ( DEBUG_FATE ) + if ( fate < c->target->fate ) + out_printf( "fate change %s from %s to %s by dependency %s\n", + object_str( t->name ), target_fate[ (int32_t)fate ], + target_fate[ (int32_t)c->target->fate ], object_str( + c->target->name ) ); +#endif + } + + /* Step 4b: Pick up included headers time. */ + + /* + * If a header is newer than a temp source that includes it, the temp source + * will need building. + */ + if ( t->includes ) + timestamp_copy( &hlast, &t->includes->time ); + else + timestamp_clear( &hlast ); + + /* Step 4c: handle NOUPDATE oddity. + * + * If a NOUPDATE file exists, mark it as having eternally old dependencies. + * Do not inherit our fate from our dependencies. Decide fate based only on + * other flags and our binding (done later). + */ + if ( t->flags & T_FLAG_NOUPDATE ) + { +#ifdef OPT_GRAPH_DEBUG_EXT + if ( DEBUG_FATE ) + if ( fate != T_FATE_STABLE ) + out_printf( "fate change %s back to stable, NOUPDATE.\n", + object_str( t->name ) ); +#endif + + timestamp_clear( &last ); + timestamp_clear( &t->time ); + + /* Do not inherit our fate from our dependencies. Decide fate based only + * upon other flags and our binding (done later). + */ + fate = T_FATE_STABLE; + } + + /* Step 4d: Determine fate: rebuild target or what? */ + + /* + In English: + If can not find or make child, can not make target. + If children changed, make target. + If target missing, make it. + If children newer, make target. + If temp's children newer than parent, make temp. + If temp's headers newer than parent, make temp. + If deliberately touched, make it. + If up-to-date temp file present, use it. + If target newer than non-notfile parent, mark target newer. + Otherwise, stable! + + Note this block runs from least to most stable: as we make it further + down the list, the target's fate gets more stable. + */ + +#ifdef OPT_GRAPH_DEBUG_EXT + savedFate = fate; + oldTimeStamp = 0; +#endif + + if ( fate >= T_FATE_BROKEN ) + { + fate = T_FATE_CANTMAKE; + } + else if ( fate >= T_FATE_SPOIL ) + { + fate = T_FATE_UPDATE; + } + else if ( t->binding == T_BIND_MISSING ) + { + fate = T_FATE_MISSING; + } + else if ( t->binding == T_BIND_EXISTS && timestamp_cmp( &last, &t->time ) > + 0 ) + { +#ifdef OPT_GRAPH_DEBUG_EXT + oldTimeStamp = 1; +#endif + fate = T_FATE_OUTDATED; + } + else if ( t->binding == T_BIND_PARENTS && timestamp_cmp( &last, &p->time ) > + 0 ) + { +#ifdef OPT_GRAPH_DEBUG_EXT + oldTimeStamp = 1; +#endif + fate = T_FATE_NEEDTMP; + } + else if ( t->binding == T_BIND_PARENTS && timestamp_cmp( &hlast, &p->time ) + > 0 ) + { + fate = T_FATE_NEEDTMP; + } + else if ( t->flags & T_FLAG_TOUCHED ) + { + fate = T_FATE_TOUCHED; + } + else if ( anyhow && !( t->flags & T_FLAG_NOUPDATE ) ) + { + fate = T_FATE_TOUCHED; + } + else if ( t->binding == T_BIND_EXISTS && ( t->flags & T_FLAG_TEMP ) ) + { + fate = T_FATE_ISTMP; + } + else if ( t->binding == T_BIND_EXISTS && p && p->binding != T_BIND_UNBOUND + && timestamp_cmp( &t->time, &p->time ) > 0 ) + { +#ifdef OPT_GRAPH_DEBUG_EXT + oldTimeStamp = 1; +#endif + fate = T_FATE_NEWER; + } + else + { + fate = T_FATE_STABLE; + } +#ifdef OPT_GRAPH_DEBUG_EXT + if ( DEBUG_FATE && ( fate != savedFate ) ) + { + if ( savedFate == T_FATE_STABLE ) + out_printf( "fate change %s set to %s%s\n", object_str( t->name ), + target_fate[ fate ], oldTimeStamp ? " (by timestamp)" : "" ); + else + out_printf( "fate change %s from %s to %s%s\n", object_str( t->name ), + target_fate[ savedFate ], target_fate[ fate ], oldTimeStamp ? + " (by timestamp)" : "" ); + } +#endif + + /* Step 4e: Handle missing files. */ + /* If it is missing and there are no actions to create it, boom. */ + /* If we can not make a target we do not care about it, okay. */ + /* We could insist that there are updating actions for all missing */ + /* files, but if they have dependencies we just pretend it is a NOTFILE. */ + + if ( ( fate == T_FATE_MISSING ) && !t->actions && !t->depends ) + { + if ( t->flags & T_FLAG_NOCARE ) + { +#ifdef OPT_GRAPH_DEBUG_EXT + if ( DEBUG_FATE ) + out_printf( "fate change %s to STABLE from %s, " + "no actions, no dependencies and do not care\n", + object_str( t->name ), target_fate[ fate ] ); +#endif + fate = T_FATE_STABLE; + } + else + { + out_printf( "don't know how to make %s\n", object_str( t->name ) ); + fate = T_FATE_CANTFIND; + } + } + + /* Step 4f: Propagate dependencies' time & fate. */ + /* Set leaf time to be our time only if this is a leaf. */ + + timestamp_max( &t->time, &t->time, &last ); + timestamp_copy( &t->leaf, timestamp_empty( &leaf ) ? &t->time : &leaf ); + /* This target's fate may have been updated by virtue of following some + * target's rebuilds list, so only allow it to be increased to the fate we + * have calculated. Otherwise, grab its new fate. + */ + if ( fate > t->fate ) + t->fate = fate; + else + fate = t->fate; + + /* + * Step 4g: If this target needs to be built, make0 all targets + * that are updated by the same actions used to update this target. + * These have already been marked as REBUILDS, and make1 has + * special handling for them. We just need to make sure that + * they get make0ed. + */ + if ( ( fate >= T_FATE_BUILD ) && ( fate < T_FATE_BROKEN ) ) + { + ACTIONS * a; + targets_ptr c; + for ( a = t->actions; a; a = a->next ) + { + for ( c = a->action->targets.get(); c; c = c->next.get() ) + { + if ( c->target->fate == T_FATE_INIT ) + { + make0( c->target, ptime, depth + 1, counts, anyhow, rescanning ); + } + } + } + } + + /* Step 4h: If this target needs to be built, force rebuild everything in + * its rebuilds list. + */ + if ( ( fate >= T_FATE_BUILD ) && ( fate < T_FATE_BROKEN ) ) + force_rebuilds( t ); + + /* + * Step 5: Sort dependencies by their update time. + */ + + if ( globs.newestfirst ) + t->depends = make0sort( std::move(t->depends) ); + + /* + * Step 6: A little harmless tabulating for tracing purposes. + */ + + /* Do not count or report internal includes nodes. */ + if ( t->flags & T_FLAG_INTERNAL ) + return; + + if ( counts ) + { +#ifdef OPT_IMPROVED_PATIENCE_EXT + ++counts->targets; +#else + if ( !( ++counts->targets % 1000 ) && DEBUG_MAKE ) + { + out_printf( "...patience...\n" ); + out_flush(); + } +#endif + + if ( fate == T_FATE_ISTMP ) + ++counts->temp; + else if ( fate == T_FATE_CANTFIND ) + ++counts->cantfind; + else if ( ( fate == T_FATE_CANTMAKE ) && t->actions ) + ++counts->cantmake; + else if ( ( fate >= T_FATE_BUILD ) && ( fate < T_FATE_BROKEN ) && + t->actions ) + ++counts->updating; + } + + if ( !( t->flags & T_FLAG_NOTFILE ) && ( fate >= T_FATE_SPOIL ) ) + flag = "+"; + else if ( t->binding == T_BIND_EXISTS && p && timestamp_cmp( &t->time, + &p->time ) > 0 ) + flag = "*"; + + if ( DEBUG_MAKEPROG ) + out_printf( "made%s\t%s\t%s%s\n", flag, target_fate[ (int32_t)t->fate ], + spaces( depth ), object_str( t->name ) ); +} + + +#ifdef OPT_GRAPH_DEBUG_EXT + +static char const * target_name( TARGET * t ) +{ + static char buf[ 1000 ]; + if ( t->flags & T_FLAG_INTERNAL ) + { + sprintf( buf, "%s (internal node)", object_str( t->name ) ); + return buf; + } + return object_str( t->name ); +} + + +/* + * dependGraphOutput() - output the DG after make0 has run. + */ + +static void dependGraphOutput( TARGET * t, int32_t depth ) +{ + targets_ptr c; + + if ( ( t->flags & T_FLAG_VISITED ) || !t->name || !t->boundname ) + return; + + t->flags |= T_FLAG_VISITED; + + switch ( t->fate ) + { + case T_FATE_TOUCHED: + case T_FATE_MISSING: + case T_FATE_OUTDATED: + case T_FATE_UPDATE: + out_printf( "->%s%2d Name: %s\n", spaces( depth ), depth, target_name( t + ) ); + break; + default: + out_printf( " %s%2d Name: %s\n", spaces( depth ), depth, target_name( t + ) ); + break; + } + + if ( !object_equal( t->name, t->boundname ) ) + out_printf( " %s Loc: %s\n", spaces( depth ), object_str( t->boundname ) + ); + + switch ( t->fate ) + { + case T_FATE_STABLE: + out_printf( " %s : Stable\n", spaces( depth ) ); + break; + case T_FATE_NEWER: + out_printf( " %s : Newer\n", spaces( depth ) ); + break; + case T_FATE_ISTMP: + out_printf( " %s : Up to date temp file\n", spaces( depth ) ); + break; + case T_FATE_NEEDTMP: + out_printf( " %s : Temporary file, to be updated\n", spaces( depth ) + ); + break; + case T_FATE_TOUCHED: + out_printf( " %s : Been touched, updating it\n", spaces( depth ) ); + break; + case T_FATE_MISSING: + out_printf( " %s : Missing, creating it\n", spaces( depth ) ); + break; + case T_FATE_OUTDATED: + out_printf( " %s : Outdated, updating it\n", spaces( depth ) ); + break; + case T_FATE_REBUILD: + out_printf( " %s : Rebuild, updating it\n", spaces( depth ) ); + break; + case T_FATE_UPDATE: + out_printf( " %s : Updating it\n", spaces( depth ) ); + break; + case T_FATE_CANTFIND: + out_printf( " %s : Can not find it\n", spaces( depth ) ); + break; + case T_FATE_CANTMAKE: + out_printf( " %s : Can make it\n", spaces( depth ) ); + break; + } + + if ( t->flags & ~T_FLAG_VISITED ) + { + out_printf( " %s : ", spaces( depth ) ); + if ( t->flags & T_FLAG_TEMP ) out_printf( "TEMPORARY " ); + if ( t->flags & T_FLAG_NOCARE ) out_printf( "NOCARE " ); + if ( t->flags & T_FLAG_NOTFILE ) out_printf( "NOTFILE " ); + if ( t->flags & T_FLAG_TOUCHED ) out_printf( "TOUCHED " ); + if ( t->flags & T_FLAG_LEAVES ) out_printf( "LEAVES " ); + if ( t->flags & T_FLAG_NOUPDATE ) out_printf( "NOUPDATE " ); + out_printf( "\n" ); + } + + for ( c = t->depends.get(); c; c = c->next.get() ) + { + out_printf( " %s : Depends on %s (%s)", spaces( depth ), + target_name( c->target ), target_fate[ (int32_t)c->target->fate ] ); + if ( !timestamp_cmp( &c->target->time, &t->time ) ) + out_printf( " (max time)"); + out_printf( "\n" ); + } + + for ( c = t->depends.get(); c; c = c->next.get() ) + dependGraphOutput( c->target, depth + 1 ); +} +#endif + + +/* + * make0sort() - reorder TARGETS chain by their time (newest to oldest). + * + * This sorts in-place by swapping the target pointers in the chain in a + * rather terrible n-square/2 algorithm. + */ + +static targets_uptr make0sort( targets_uptr chain ) +{ + PROFILE_ENTER( MAKE_MAKE0SORT ); + + // The current tail we put the next newest item. + for ( targets_ptr front = chain.get(); front ; front = front->next.get() ) + { + // Find the maximum time, i.e. most recent in the rest of the chain. + targets_ptr newest = front->next.get(); + for ( targets_ptr rest = newest; rest ; rest = rest->next.get()) + { + if ( timestamp_cmp( &newest->target->time, &rest->target->time ) > 0 ) + newest = rest; + } + // Sort it to the front if needed. + if ( front != newest ) + std::swap( front->target, newest->target ); + } + + PROFILE_EXIT( MAKE_MAKE0SORT ); + return chain; +} + + +static LIST * targets_to_update_ = L0; + + +void mark_target_for_updating( OBJECT * target ) +{ + targets_to_update_ = list_push_back( targets_to_update_, object_copy( + target ) ); +} + + +LIST * targets_to_update() +{ + return targets_to_update_; +} + + +void clear_targets_to_update() +{ + list_free( targets_to_update_ ); + targets_to_update_ = L0; +} diff --git a/src/boost/tools/build/src/engine/make.h b/src/boost/tools/build/src/engine/make.h new file mode 100644 index 000000000..5fcdb7a2e --- /dev/null +++ b/src/boost/tools/build/src/engine/make.h @@ -0,0 +1,45 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * make.h - bring a target up to date, once rules are in place + */ + +#ifndef MAKE_SW20111118_H +#define MAKE_SW20111118_H + +#include "config.h" +#include "lists.h" +#include "object.h" +#include "rules.h" + +int32_t make( LIST * targets, int32_t anyhow ); +int32_t make1( LIST * t ); + +typedef struct { + int32_t temp; + int32_t updating; + int32_t cantfind; + int32_t cantmake; + int32_t targets; + int32_t made; +} COUNTS ; + + +void make0( TARGET * t, TARGET * p, int32_t depth, COUNTS * counts, int32_t anyhow, + TARGET * rescanning ); + + +/* Specifies that the target should be updated. */ +void mark_target_for_updating( OBJECT * target ); + +/* Returns targets previously passed to mark_target_for_updating(). */ +LIST * targets_to_update(); + +/* Clears/unmarks all targets currently marked for update. */ +void clear_targets_to_update(); + +#endif diff --git a/src/boost/tools/build/src/engine/make1.cpp b/src/boost/tools/build/src/engine/make1.cpp new file mode 100644 index 000000000..332b91cc5 --- /dev/null +++ b/src/boost/tools/build/src/engine/make1.cpp @@ -0,0 +1,1515 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * make1.c - execute commands to bring targets up to date + * + * This module contains make1(), the entry point called by make() to recursively + * descend the dependency graph executing update actions as marked by make0(). + * + * External routines: + * make1() - execute commands to update a TARGET and all of its dependencies + * + * Internal routines, the recursive/asynchronous command executors: + * make1a() - recursively schedules dependency builds and then goes to + * MAKE1B + * make1b() - if nothing is blocking this target's build, proceed to + * MAKE1C + * make1c() - launch target's next command, or go to parents' MAKE1B + * if none + * make1c_closure() - handle command execution completion and go to MAKE1C + * + * Internal support routines: + * make1cmds() - turn ACTIONS into CMDs, grouping, splitting, etc. + * make1list() - turn a list of targets into a LIST, for $(<) and $(>) + * make1settings() - for vars with bound values, build up replacement lists + * make1bind() - bind targets that weren't bound in dependency analysis + */ + +#include "jam.h" +#include "make.h" + +#include "command.h" +#include "compile.h" +#include "execcmd.h" +#include "headers.h" +#include "lists.h" +#include "object.h" +#include "output.h" +#include "parse.h" +#include "rules.h" +#include "search.h" +#include "variable.h" +#include "output.h" +#include "startup.h" + +#include +#include + +#if !defined( NT ) || defined( __GNUC__ ) + #include /* for unlink */ +#endif + +static CMD * make1cmds ( TARGET * ); +static LIST * make1list ( LIST *, const targets_uptr &, int32_t flags ); +static SETTINGS * make1settings ( struct module_t *, LIST * vars ); +static void make1bind ( TARGET * ); +static void push_cmds( CMDLIST * cmds, int32_t status ); +static int32_t cmd_sem_lock( TARGET * t ); +static void cmd_sem_unlock( TARGET * t ); + +static bool targets_contains( const targets_uptr & l, TARGET * t ); +static bool targets_equal( const targets_uptr & l1, const targets_uptr & l2 ); + +/* Ugly static - it is too hard to carry it through the callbacks. */ + +static struct +{ + int32_t failed; + int32_t skipped; + int32_t total; + int32_t made; +} counts[ 1 ]; + +/* Target state. */ +#define T_STATE_MAKE1A 0 /* make1a() should be called */ +#define T_STATE_MAKE1B 1 /* make1b() should be called */ +#define T_STATE_MAKE1C 2 /* make1c() should be called */ + +typedef struct _state state; +struct _state +{ + state * prev; /* previous state on stack */ + TARGET * t; /* current target */ + TARGET * parent; /* parent argument necessary for MAKE1A */ + int32_t curstate; /* current state */ +}; + +static void make1a( state * const ); +static void make1b( state * const ); +static void make1c( state const * const ); + +static void make1c_closure( void * const closure, int32_t status, + timing_info const * const, char const * const cmd_stdout, + char const * const cmd_stderr, int32_t const cmd_exit_reason ); + +typedef struct _stack +{ + state * stack; +} stack; + +static stack state_stack = { NULL }; + +static state * state_freelist = NULL; + +/* Currently running command counter. */ +static int32_t cmdsrunning; + + +static state * alloc_state() +{ + if ( state_freelist ) + { + state * const pState = state_freelist; + state_freelist = pState->prev; + memset( pState, 0, sizeof( state ) ); + return pState; + } + return (state *)BJAM_MALLOC( sizeof( state ) ); +} + + +static void free_state( state * const pState ) +{ + pState->prev = state_freelist; + state_freelist = pState; +} + + +static void clear_state_freelist() +{ + while ( state_freelist ) + { + state * const pState = state_freelist; + state_freelist = state_freelist->prev; + BJAM_FREE( pState ); + } +} + + +static state * current_state( stack * const pStack ) +{ + return pStack->stack; +} + + +static void pop_state( stack * const pStack ) +{ + if ( pStack->stack ) + { + state * const pState = pStack->stack->prev; + free_state( pStack->stack ); + pStack->stack = pState; + } +} + + +static state * push_state( stack * const pStack, TARGET * const t, + TARGET * const parent, int32_t const curstate ) +{ + state * const pState = alloc_state(); + pState->t = t; + pState->parent = parent; + pState->prev = pStack->stack; + pState->curstate = curstate; + return pStack->stack = pState; +} + + +/* + * Pushes a stack onto another stack, effectively reversing the order. + */ + +static void push_stack_on_stack( stack * const pDest, stack * const pSrc ) +{ + while ( pSrc->stack ) + { + state * const pState = pSrc->stack; + pSrc->stack = pState->prev; + pState->prev = pDest->stack; + pDest->stack = pState; + } +} + + +/* + * make1() - execute commands to update a list of targets and all of their dependencies + */ + +static int32_t intr = 0; +static int32_t quit = 0; + +int32_t make1( LIST * targets ) +{ + state * pState; + int32_t status = 0; + + memset( (char *)counts, 0, sizeof( *counts ) ); + + { + LISTITER iter, end; + stack temp_stack = { NULL }; + for ( iter = list_begin( targets ), end = list_end( targets ); + iter != end; iter = list_next( iter ) ) + push_state( &temp_stack, bindtarget( list_item( iter ) ), NULL, T_STATE_MAKE1A ); + push_stack_on_stack( &state_stack, &temp_stack ); + } + + /* Clear any state left over from the past */ + quit = 0; + + /* Recursively make the target and its dependencies. */ + + while ( 1 ) + { + while ( ( pState = current_state( &state_stack ) ) ) + { + if ( quit ) + pop_state( &state_stack ); + + switch ( pState->curstate ) + { + case T_STATE_MAKE1A: make1a( pState ); break; + case T_STATE_MAKE1B: make1b( pState ); break; + case T_STATE_MAKE1C: make1c( pState ); break; + default: + assert( !"make1(): Invalid state detected." ); + } + } + if ( !cmdsrunning ) + break; + /* Wait for outstanding commands to finish running. */ + exec_wait(); + } + + clear_state_freelist(); + + /* Talk about it. */ + if ( counts->failed ) + out_printf( "...failed updating %d target%s...\n", counts->failed, + counts->failed > 1 ? "s" : "" ); + if ( DEBUG_MAKE && counts->skipped ) + out_printf( "...skipped %d target%s...\n", counts->skipped, + counts->skipped > 1 ? "s" : "" ); + if ( DEBUG_MAKE && counts->made ) + out_printf( "...updated %d target%s...\n", counts->made, + counts->made > 1 ? "s" : "" ); + + /* If we were interrupted, exit now that all child processes + have finished. */ + if ( intr ) + b2::clean_exit( EXITBAD ); + + { + LISTITER iter, end; + for ( iter = list_begin( targets ), end = list_end( targets ); + iter != end; iter = list_next( iter ) ) + { + /* Check that the target was updated and that the + update succeeded. */ + TARGET * t = bindtarget( list_item( iter ) ); + if (t->progress == T_MAKE_DONE) + { + if (t->status != EXEC_CMD_OK) + status = 1; + } + else if ( ! ( t->progress == T_MAKE_NOEXEC_DONE && globs.noexec ) ) + { + status = 1; + } + } + } + return status; +} + + +/* + * make1a() - recursively schedules dependency builds and then goes to MAKE1B + * + * Called to start processing a specified target. Does nothing if the target is + * already being processed or otherwise starts processing all of its + * dependencies. + */ + +static void make1a( state * const pState ) +{ + TARGET * t = pState->t; + TARGET * const scc_root = target_scc( t ); + + if ( !pState->parent || target_scc( pState->parent ) != scc_root ) + pState->t = t = scc_root; + + /* If the parent is the first to try to build this target or this target is + * in the MAKE1C quagmire, arrange for the parent to be notified when this + * target has been built. + */ + if ( pState->parent && t->progress <= T_MAKE_RUNNING ) + { + TARGET * const parent_scc = target_scc( pState->parent ); + if ( t != parent_scc ) + { + targetentry( t->parents, parent_scc ); + ++parent_scc->asynccnt; + } + } + + /* If the target has been previously updated with -n in effect, and we are + * now ignoring -n, update it for real. E.g. if the UPDATE_NOW rule was + * called for it twice - first with the -n option and then without. + */ + if ( !globs.noexec && t->progress == T_MAKE_NOEXEC_DONE ) + t->progress = T_MAKE_INIT; + + /* If this target is already being processed then do nothing. There is no + * need to start processing the same target all over again. + */ + if ( t->progress != T_MAKE_INIT ) + { + pop_state( &state_stack ); + return; + } + + /* Guard against circular dependencies. */ + t->progress = T_MAKE_ONSTACK; + + /* 'asynccnt' counts the dependencies preventing this target from proceeding + * to MAKE1C for actual building. We start off with a count of 1 to prevent + * anything from happening until we can notify all dependencies that they + * are needed. This 1 is then accounted for when we enter MAKE1B ourselves, + * below. Without this if a dependency gets built before we finish + * processing all of our other dependencies our build might be triggered + * prematurely. + */ + t->asynccnt = 1; + + /* Push dependency build requests (to be executed in the natural order). */ + { + stack temp_stack = { NULL }; + targets_ptr c; + for ( c = t->depends.get(); c && !quit; c = c->next.get() ) + push_state( &temp_stack, c->target, t, T_STATE_MAKE1A ); + push_stack_on_stack( &state_stack, &temp_stack ); + } + + t->progress = T_MAKE_ACTIVE; + + /* Once all of our dependencies have started getting processed we can move + * onto MAKE1B. + */ + /* Implementation note: + * In theory this would be done by popping this state before pushing + * dependency target build requests but as a slight optimization we simply + * modify our current state and leave it on the stack instead. + */ + pState->curstate = T_STATE_MAKE1B; +} + + +/* + * make1b() - if nothing is blocking this target's build, proceed to MAKE1C + * + * Called after something stops blocking this target's build, e.g. that all of + * its dependencies have started being processed, one of its dependencies has + * been built or a semaphore this target has been waiting for is free again. + */ + +static void make1b( state * const pState ) +{ + TARGET * const t = pState->t; + TARGET * failed = 0; + char const * failed_name = "dependencies"; + + pop_state( &state_stack ); + + /* If any dependencies are still outstanding, wait until they signal their + * completion by pushing this same state for their parent targets. + */ + if ( --t->asynccnt ) + { + return; + } + + /* Now ready to build target 't', if dependencies built OK. */ + + /* Collect status from dependencies. If -n was passed then act as though all + * dependencies built correctly (the only way they can fail is if UPDATE_NOW + * was called). If the dependencies can not be found or we got an interrupt, + * we can not get here. + */ + if ( !globs.noexec ) + { + targets_ptr c; + for ( c = t->depends.get(); c; c = c->next.get() ) + if ( c->target->status > t->status && !( c->target->flags & + T_FLAG_NOCARE ) ) + { + failed = c->target; + t->status = c->target->status; + } + } + + /* If an internal header node failed to build, we want to output the target + * that it failed on. + */ + if ( failed ) + failed_name = failed->flags & T_FLAG_INTERNAL + ? failed->failed + : object_str( failed->name ); + t->failed = failed_name; + + /* If actions for building any of the dependencies have failed, bail. + * Otherwise, execute all actions to make the current target. + */ + if ( ( t->status == EXEC_CMD_FAIL ) && t->actions ) + { + ++counts->skipped; + if ( ( t->flags & ( T_FLAG_RMOLD | T_FLAG_NOTFILE ) ) == T_FLAG_RMOLD ) + { + if ( !unlink( object_str( t->boundname ) ) ) + out_printf( "...removing outdated %s\n", object_str( t->boundname ) + ); + } + else + out_printf( "...skipped %s for lack of %s...\n", object_str( t->name ), + failed_name ); + } + + if ( t->status == EXEC_CMD_OK ) + switch ( t->fate ) + { + case T_FATE_STABLE: + case T_FATE_NEWER: + break; + + case T_FATE_CANTFIND: + case T_FATE_CANTMAKE: + t->status = EXEC_CMD_FAIL; + break; + + case T_FATE_ISTMP: + if ( DEBUG_MAKE ) + out_printf( "...using %s...\n", object_str( t->name ) ); + break; + + case T_FATE_TOUCHED: + case T_FATE_MISSING: + case T_FATE_NEEDTMP: + case T_FATE_OUTDATED: + case T_FATE_UPDATE: + case T_FATE_REBUILD: + /* Prepare commands for executing actions scheduled for this target. + * Commands have their embedded variables automatically expanded, + * including making use of any "on target" variables. + */ + if ( t->actions ) + { + ++counts->total; + if ( DEBUG_MAKE && !( counts->total % 100 ) ) + out_printf( "...on %dth target...\n", counts->total ); + + t->cmds = (char *)make1cmds( t ); + /* Update the target's "progress" so MAKE1C processing counts it + * among its successes/failures. + */ + t->progress = T_MAKE_RUNNING; + } + break; + + /* All valid fates should have been accounted for by now. */ + default: + err_printf( "ERROR: %s has bad fate %d", object_str( t->name ), + t->fate ); + b2::clean_exit( b2::exit_result::failure ); + } + + /* Proceed to MAKE1C to begin executing the chain of commands prepared for + * building the target. If we are not going to build the target (e.g. due to + * dependency failures or no commands needing to be run) the chain will be + * empty and MAKE1C processing will directly signal the target's completion. + */ + + if ( t->cmds == NULL || --( ( CMD * )t->cmds )->asynccnt == 0 ) + push_state( &state_stack, t, NULL, T_STATE_MAKE1C ); + else if ( DEBUG_EXECCMD ) + { + CMD * cmd = ( CMD * )t->cmds; + out_printf( "Delaying %s %s: %d targets not ready\n", object_str( cmd->rule->name ), object_str( t->boundname ), cmd->asynccnt ); + } +} + + +/* + * make1c() - launch target's next command, or go to parents' MAKE1B if none + * + * If there are (more) commands to run to build this target (and we have not hit + * an error running earlier comands) we launch the command using exec_cmd(). + * Command execution signals its completion in exec_wait() by calling our + * make1c_closure() callback. + * + * If there are no more commands to run, we collect the status from all the + * actions and report our completion to all the parents. + */ + +static void make1c( state const * const pState ) +{ + TARGET * const t = pState->t; + CMD * const cmd = (CMD *)t->cmds; + int32_t exec_flags = 0; + + if ( cmd ) + { + /* Pop state first in case something below (e.g. exec_cmd(), exec_wait() + * or make1c_closure()) pushes a new state. Note that we must not access + * the popped state data after this as the same stack node might have + * been reused internally for some newly pushed state. + */ + pop_state( &state_stack ); + + if ( cmd->status != EXEC_CMD_OK ) + { + t->cmds = NULL; + push_cmds( cmd->next, cmd->status ); + cmd_free( cmd ); + return; + } + +#ifdef OPT_SEMAPHORE + if ( ! cmd_sem_lock( t ) ) + { + return; + } +#endif + + /* Increment the jobs running counter. */ + ++cmdsrunning; + + if ( ( globs.jobs == 1 ) && ( DEBUG_MAKEQ || + ( DEBUG_MAKE && !( cmd->rule->actions->flags & RULE_QUIETLY ) ) ) ) + { + OBJECT * action = cmd->rule->name; + OBJECT * target = list_front( lol_get( (LOL *)&cmd->args, 0 ) ); + + out_printf( "%s %s\n", object_str( action ), object_str( target ) ); + + /* Print out the command executed if given -d+2. */ + if ( DEBUG_EXEC ) + { + out_puts( cmd->buf->value ); + out_putc( '\n' ); + } + + /* We only need to flush the streams if there's likely to + * be a wait before it finishes. + */ + if ( ! globs.noexec && ! cmd->noop ) + { + out_flush(); + err_flush(); + } + } + else + { + exec_flags |= EXEC_CMD_QUIET; + } + + /* Execute the actual build command or fake it if no-op. */ + if ( globs.noexec || cmd->noop ) + { + timing_info time_info = { 0 }; + timestamp_current( &time_info.start ); + timestamp_copy( &time_info.end, &time_info.start ); + make1c_closure( t, EXEC_CMD_OK, &time_info, "", "", EXIT_OK ); + } + else + { + exec_cmd( cmd->buf, exec_flags, make1c_closure, t, cmd->shell ); + + /* Wait until under the concurrent command count limit. */ + /* FIXME: This wait could be skipped here and moved to just before + * trying to execute a command that would cross the command count + * limit. Note though that this might affect the order in which + * unrelated targets get built and would thus require that all + * affected Boost Build tests be updated. + */ + assert( 0 < globs.jobs ); + while ( cmdsrunning >= globs.jobs ) + exec_wait(); + } + } + else + { + /* Tally success/failure for those we tried to update. */ + if ( t->progress == T_MAKE_RUNNING ) + { + /* Invert OK/FAIL target status when FAIL_EXPECTED has been applied. */ + if ( t->flags & T_FLAG_FAIL_EXPECTED && !globs.noexec ) + { + switch ( t->status ) + { + case EXEC_CMD_FAIL: t->status = EXEC_CMD_OK; break; + case EXEC_CMD_OK: t->status = EXEC_CMD_FAIL; break; + } + + /* Printing failure has to be delayed until the last + * action is completed for FAIL_EXPECTED targets. + * Do it here. + */ + if ( t->status == EXEC_CMD_FAIL ) + { + out_printf( "...failed %s ", object_str( t->actions->action->rule->name ) ); + out_printf( "%s", object_str( t->boundname ) ); + out_printf( "...\n" ); + } + + /* Handle -q */ + if ( t->status == EXEC_CMD_FAIL && globs.quitquick ) + ++quit; + + /* Delete the target on failure. */ + if ( !( t->flags & ( T_FLAG_PRECIOUS | T_FLAG_NOTFILE ) ) && + !unlink( object_str( t->boundname ) ) ) + out_printf( "...removing %s\n", object_str( t->boundname ) ); + } + switch ( t->status ) + { + case EXEC_CMD_OK: ++counts->made; break; + case EXEC_CMD_FAIL: ++counts->failed; break; + } + } + + /* Tell parents their dependency has been built. */ + { + targets_ptr c; + stack temp_stack = { NULL }; + TARGET * additional_includes = NULL; + + t->progress = globs.noexec ? T_MAKE_NOEXEC_DONE : T_MAKE_DONE; + + /* Target has been updated so rescan it for dependencies. */ + if ( t->fate >= T_FATE_MISSING && t->status == EXEC_CMD_OK && + !( t->flags & T_FLAG_INTERNAL ) ) + { + TARGET * saved_includes; + SETTINGS * s; + + /* Clean current includes. */ + saved_includes = t->includes; + t->includes = 0; + + s = copysettings( t->settings ); + pushsettings( root_module(), s ); + headers( t ); + popsettings( root_module(), s ); + freesettings( s ); + + if ( t->includes ) + { + /* Tricky. The parents have already been processed, but they + * have not seen the internal node, because it was just + * created. We need to: + * - push MAKE1A states that would have been pushed by the + * parents here + * - make sure all unprocessed parents will pick up the + * new includes + * - make sure processing the additional MAKE1A states is + * done before processing the MAKE1B state for our + * current target (which would mean this target has + * already been built), otherwise the parent would be + * considered built before the additional MAKE1A state + * processing even got a chance to start. + */ + make0( t->includes, t->parents->target, 0, 0, 0, t->includes + ); + /* Link the old includes on to make sure that it gets + * cleaned up correctly. + */ + t->includes->includes = saved_includes; + for ( c = t->dependants.get(); c; c = c->next.get() ) + targetentry( c->target->depends, t->includes ); + /* Will be processed below. */ + additional_includes = t->includes; + } + else + { + t->includes = saved_includes; + } + } + + if ( additional_includes ) + for ( c = t->parents.get(); c; c = c->next.get() ) + push_state( &temp_stack, additional_includes, c->target, + T_STATE_MAKE1A ); + + if ( t->scc_root ) + { + TARGET * const scc_root = target_scc( t ); + assert( scc_root->progress < T_MAKE_DONE ); + for ( c = t->parents.get(); c; c = c->next.get() ) + { + if ( target_scc( c->target ) == scc_root ) + push_state( &temp_stack, c->target, NULL, T_STATE_MAKE1B + ); + else + targetentry( scc_root->parents, c->target ); + } + } + else + { + for ( c = t->parents.get(); c; c = c->next.get() ) + push_state( &temp_stack, c->target, NULL, T_STATE_MAKE1B ); + } + + /* Must pop state before pushing any more. */ + pop_state( &state_stack ); + + /* Using stacks reverses the order of execution. Reverse it back. */ + push_stack_on_stack( &state_stack, &temp_stack ); + } + } +} + + +/* + * call_timing_rule() - Look up the __TIMING_RULE__ variable on the given + * target, and if non-empty, invoke the rule it names, passing the given + * timing_info. + */ + +static void call_timing_rule( TARGET * target, timing_info const * const time ) +{ + LIST * timing_rule; + + pushsettings( root_module(), target->settings ); + timing_rule = var_get( root_module(), constant_TIMING_RULE ); + popsettings( root_module(), target->settings ); + + if ( !list_empty( timing_rule ) ) + { + /* rule timing-rule ( args * : target : start end user system clock ) */ + + /* Prepare the argument list. */ + FRAME frame[ 1 ]; + OBJECT * rulename = list_front( timing_rule ); + frame_init( frame ); + + /* args * :: $(__TIMING_RULE__[2-]) */ + lol_add( frame->args, list_copy_range( timing_rule, list_next( + list_begin( timing_rule ) ), list_end( timing_rule ) ) ); + + /* target :: the name of the target */ + lol_add( frame->args, list_new( object_copy( target->name ) ) ); + + /* start end user system clock :: info about the action command */ + lol_add( frame->args, list_push_back( list_push_back( list_push_back( list_push_back( list_new( + outf_time( &time->start ) ), + outf_time( &time->end ) ), + outf_double( time->user ) ), + outf_double( time->system ) ), + outf_double( timestamp_delta_seconds(&time->start, &time->end) ) ) + ); + + /* Call the rule. */ + evaluate_rule( bindrule( rulename , root_module() ), rulename, frame ); + + /* Clean up. */ + frame_free( frame ); + } +} + + +/* + * call_action_rule() - Look up the __ACTION_RULE__ variable on the given + * target, and if non-empty, invoke the rule it names, passing the given info, + * timing_info, executed command and command output. + */ + +static void call_action_rule +( + TARGET * target, + int32_t status, + timing_info const * time, + char const * executed_command, + char const * command_output +) +{ + LIST * action_rule; + + pushsettings( root_module(), target->settings ); + action_rule = var_get( root_module(), constant_ACTION_RULE ); + popsettings( root_module(), target->settings ); + + if ( !list_empty( action_rule ) ) + { + /* rule action-rule ( + args * : + target : + command status start end user system : + output ? ) */ + + /* Prepare the argument list. */ + FRAME frame[ 1 ]; + OBJECT * rulename = list_front( action_rule ); + frame_init( frame ); + + /* args * :: $(__ACTION_RULE__[2-]) */ + lol_add( frame->args, list_copy_range( action_rule, list_next( + list_begin( action_rule ) ), list_end( action_rule ) ) ); + + /* target :: the name of the target */ + lol_add( frame->args, list_new( object_copy( target->name ) ) ); + + /* command status start end user system :: info about the action command + */ + lol_add( frame->args, + list_push_back( list_push_back( list_push_back( list_push_back( list_push_back( list_new( + object_new( executed_command ) ), + outf_int( status ) ), + outf_time( &time->start ) ), + outf_time( &time->end ) ), + outf_double( time->user ) ), + outf_double( time->system ) ) ); + + /* output ? :: the output of the action command */ + if ( command_output ) + { + OBJECT * command_output_obj = object_new( command_output ); + char * output_i = (char*)object_str(command_output_obj); + /* Clean the output of control characters. */ + for (; *output_i; ++output_i) + { + if (iscntrl(*output_i) && !isspace(*output_i)) *output_i = '?'; + } + lol_add( frame->args, list_new( command_output_obj ) ); + } + else + lol_add( frame->args, L0 ); + + /* Call the rule. */ + evaluate_rule( bindrule( rulename, root_module() ), rulename, frame ); + + /* Clean up. */ + frame_free( frame ); + } +} + + +/* + * make1c_closure() - handle command execution completion and go to MAKE1C. + * + * Internal function passed as a notification callback for when a command + * finishes getting executed by the OS or called directly when faking that a + * command had been executed by the OS. + * + * Now all we need to do is fiddle with the command exit status and push a new + * MAKE1C state to execute the next command scheduled for building this target + * or close up the target's build process in case there are no more commands + * scheduled for it. On interrupts, we bail heavily. + */ + +static void make1c_closure +( + void * const closure, + int32_t status_orig, + timing_info const * const time, + char const * const cmd_stdout, + char const * const cmd_stderr, + int32_t const cmd_exit_reason +) +{ + TARGET * const t = (TARGET *)closure; + CMD * const cmd = (CMD *)t->cmds; + char const * rule_name = 0; + char const * target_name = 0; + + assert( cmd ); + + --cmdsrunning; + + /* Calculate the target's status from the cmd execution result. */ + { + /* Store the target's status. */ + t->status = status_orig; + + /* Ignore failures for actions marked as 'ignore'. */ + if ( t->status == EXEC_CMD_FAIL && cmd->rule->actions->flags & + RULE_IGNORE ) + t->status = EXEC_CMD_OK; + } + + if ( DEBUG_MAKEQ || + ( DEBUG_MAKE && !( cmd->rule->actions->flags & RULE_QUIETLY ) ) ) + { + rule_name = object_str( cmd->rule->name ); + target_name = object_str( list_front( lol_get( (LOL *)&cmd->args, 0 ) ) + ); + } + + if ( rule_name == NULL || globs.jobs > 1 ) + out_action( rule_name, target_name, cmd->buf->value, cmd_stdout, + cmd_stderr, cmd_exit_reason ); + + /* If the process expired, make user aware with an explicit message, but do + * this only for non-quiet actions. + */ + if ( cmd_exit_reason == EXIT_TIMEOUT && target_name ) + out_printf( "%ld second time limit exceeded\n", globs.timeout ); + + out_flush(); + err_flush(); + + if ( !globs.noexec ) + { + call_timing_rule( t, time ); + if ( DEBUG_EXECCMD ) + out_printf( "%f sec system; %f sec user; %f sec clock\n", + time->system, time->user, + timestamp_delta_seconds(&time->start, &time->end) ); + + /* Assume -p0 is in effect, i.e. cmd_stdout contains merged output. */ + call_action_rule( t, status_orig, time, cmd->buf->value, cmd_stdout ); + } + + /* Print command text on failure. */ + if ( t->status == EXEC_CMD_FAIL && DEBUG_MAKE && + ! ( t->flags & T_FLAG_FAIL_EXPECTED ) ) + { + if ( !DEBUG_EXEC ) + out_printf( "%s\n", cmd->buf->value ); + + out_printf( "...failed %s ", object_str( cmd->rule->name ) ); + list_print( lol_get( (LOL *)&cmd->args, 0 ) ); + out_printf( "...\n" ); + } + + /* On interrupt, set quit so _everything_ fails. Do the same for failed + * commands if we were asked to stop the build in case of any errors. + */ + if ( t->status == EXEC_CMD_INTR ) + { + ++intr; + ++quit; + } + if ( t->status == EXEC_CMD_FAIL && globs.quitquick && + ! ( t->flags & T_FLAG_FAIL_EXPECTED ) ) + ++quit; + + /* If the command was not successful remove all of its targets not marked as + * "precious". + */ + if ( t->status != EXEC_CMD_OK ) + { + LIST * const targets = lol_get( (LOL *)&cmd->args, 0 ); + LISTITER iter = list_begin( targets ); + LISTITER const end = list_end( targets ); + for ( ; iter != end; iter = list_next( iter ) ) + { + char const * const filename = object_str( list_item( iter ) ); + TARGET const * const t = bindtarget( list_item( iter ) ); + if ( !( t->flags & T_FLAG_PRECIOUS ) && !unlink( filename ) ) + out_printf( "...removing %s\n", filename ); + } + } + +#ifdef OPT_SEMAPHORE + /* Release any semaphores used by this action. */ + cmd_sem_unlock( t ); +#endif + + /* Free this command and push the MAKE1C state to execute the next one + * scheduled for building this same target. + */ + t->cmds = NULL; + push_cmds( cmd->next, t->status ); + cmd_free( cmd ); +} + +/* push the next MAKE1C state after a command is run. */ +static void push_cmds( CMDLIST * cmds, int32_t status ) +{ + CMDLIST * cmd_iter; + for( cmd_iter = cmds; cmd_iter; cmd_iter = cmd_iter->next ) + { + if ( cmd_iter->iscmd ) + { + CMD * next_cmd = cmd_iter->impl.cmd; + /* Propagate the command status. */ + if ( next_cmd->status < status ) + next_cmd->status = status; + if ( --next_cmd->asynccnt == 0 ) + { + /* Select the first target associated with the action. + * This is safe because sibling CMDs cannot have targets + * in common. + */ + TARGET * first_target = bindtarget( list_front( lol_get( &next_cmd->args, 0 ) ) ); + first_target->cmds = (char *)next_cmd; + push_state( &state_stack, first_target, NULL, T_STATE_MAKE1C ); + } + else if ( DEBUG_EXECCMD ) + { + TARGET * first_target = bindtarget( list_front( lol_get( &next_cmd->args, 0 ) ) ); + out_printf( "Delaying %s %s: %d targets not ready\n", object_str( next_cmd->rule->name ), object_str( first_target->boundname ), next_cmd->asynccnt ); + } + } + else + { + /* This is a target that we're finished updating */ + TARGET * updated_target = cmd_iter->impl.t; + if ( updated_target->status < status ) + updated_target->status = status; + updated_target->cmds = NULL; + push_state( &state_stack, updated_target, NULL, T_STATE_MAKE1C ); + } + } +} + + +/* + * swap_settings() - replace the settings from the current module and target + * with those from the new module and target + */ + +static void swap_settings +( + module_t * * current_module, + TARGET * * current_target, + module_t * new_module, + TARGET * new_target +) +{ + if ( ( new_target == *current_target ) && + ( new_module == *current_module ) ) + return; + + if ( *current_target ) + popsettings( *current_module, (*current_target)->settings ); + + if ( new_target ) + pushsettings( new_module, new_target->settings ); + + *current_module = new_module; + *current_target = new_target; +} + + +/* + * make1cmds() - turn ACTIONS into CMDs, grouping, splitting, etc. + * + * Essentially copies a chain of ACTIONs to a chain of CMDs, grouping + * RULE_TOGETHER actions, splitting RULE_PIECEMEAL actions, and handling + * RULE_NEWSRCS actions. The result is a chain of CMDs which has already had all + * of its embedded variable references expanded and can now be executed using + * exec_cmd(). + */ + +static CMD * make1cmds( TARGET * t ) +{ + CMD * cmds = 0; + CMD * last_cmd = 0; + LIST * shell = L0; + module_t * settings_module = 0; + TARGET * settings_target = 0; + ACTIONS * a0 = 0; + int32_t const running_flag = globs.noexec ? A_RUNNING_NOEXEC : A_RUNNING; + + /* Step through actions. + */ + for ( a0 = t->actions; a0; a0 = a0->next ) + { + RULE * rule = a0->action->rule; + rule_actions_ptr actions = rule->actions; + SETTINGS * boundvars; + LIST * nt; + LIST * ns; + ACTIONS * a1; + + /* Only do rules with commands to execute. + */ + if ( !actions ) + continue; + + if ( a0->action->running >= running_flag ) + { + CMD * first; + /* If this action was skipped either because it was + * combined with another action by RULE_TOGETHER, or + * because all of its sources were filtered out, + * then we don't have anything to do here. + */ + if ( a0->action->first_cmd == NULL ) + continue; + /* This action has already been processed for another target. + * Just set up the dependency graph correctly and move on. + */ + first = (CMD *)a0->action->first_cmd; + if( cmds ) + { + last_cmd->next = cmdlist_append_cmd( last_cmd->next, first ); + } + else + { + cmds = first; + } + last_cmd = (CMD *)a0->action->last_cmd; + continue; + } + + a0->action->running = running_flag; + + /* Make LISTS of targets and sources. If `execute together` has been + * specified for this rule, tack on sources from each instance of this + * rule for this target. + */ + nt = make1list( L0, a0->action->targets, 0 ); + ns = make1list( L0, a0->action->sources, actions->flags ); + if ( actions->flags & RULE_TOGETHER ) + for ( a1 = a0->next; a1; a1 = a1->next ) + if ( a1->action->rule == rule && + a1->action->running < running_flag && + targets_equal( a0->action->targets, a1->action->targets ) ) + { + ns = make1list( ns, a1->action->sources, actions->flags ); + a1->action->running = running_flag; + } + + /* If doing only updated (or existing) sources, but none have been + * updated (or exist), skip this action. + */ + if ( list_empty( ns ) && + ( actions->flags & ( RULE_NEWSRCS | RULE_EXISTING ) ) ) + { + list_free( nt ); + continue; + } + + swap_settings( &settings_module, &settings_target, rule->module, t ); + if ( list_empty( shell ) ) + { + /* shell is per-target */ + shell = var_get( rule->module, constant_JAMSHELL ); + } + + /* If we had 'actions xxx bind vars' we bind the vars now. */ + boundvars = make1settings( rule->module, actions->bindlist ); + pushsettings( rule->module, boundvars ); + + /* + * Build command, starting with all source args. + * + * For actions that allow PIECEMEAL commands, if the constructed command + * string is too long, we retry constructing it with a reduced number of + * source arguments presented. + * + * While reducing slowly takes a bit of compute time to get things just + * right, it is worth it to get as close to maximum allowed command + * string length as possible, because launching the commands we are + * executing is likely to be much more compute intensive. + * + * Note that we loop through at least once, for sourceless actions. + */ + { + int32_t const length = list_length( ns ); + int32_t start = 0; + int32_t chunk = length; + int32_t cmd_count = 0; + targets_uptr semaphores; + targets_ptr targets_iter; + int32_t unique_targets; + do + { + CMD * cmd; + int32_t cmd_check_result; + int32_t cmd_error_length; + int32_t cmd_error_max_length; + int32_t retry = 0; + int32_t accept_command = 0; + + /* Build cmd: cmd_new() takes ownership of its lists. */ + cmd = cmd_new( rule, list_copy( nt ), list_sublist( ns, start, + chunk ), list_copy( shell ) ); + + cmd_check_result = exec_check( cmd->buf, &cmd->shell, + &cmd_error_length, &cmd_error_max_length ); + + if ( cmd_check_result == EXEC_CHECK_OK ) + { + accept_command = 1; + } + else if ( cmd_check_result == EXEC_CHECK_NOOP ) + { + accept_command = 1; + cmd->noop = 1; + } + else if ( ( actions->flags & RULE_PIECEMEAL ) && ( chunk > 1 ) ) + { + /* Too long but splittable. Reduce chunk size slowly and + * retry. + */ + assert( cmd_check_result == EXEC_CHECK_TOO_LONG || + cmd_check_result == EXEC_CHECK_LINE_TOO_LONG ); + chunk = chunk * 9 / 10; + retry = 1; + } + else + { + /* Too long and not splittable. */ + char const * const error_message = cmd_check_result == + EXEC_CHECK_TOO_LONG + ? "is too long" + : "contains a line that is too long"; + assert( cmd_check_result == EXEC_CHECK_TOO_LONG || + cmd_check_result == EXEC_CHECK_LINE_TOO_LONG ); + out_printf( + "%s action %s (%d, max %d):\n", + object_str( rule->name ), error_message, + cmd_error_length, cmd_error_max_length ); + + /* Tell the user what did not fit. */ + out_puts( cmd->buf->value ); + b2::clean_exit( EXITBAD ); + } + + assert( !retry || !accept_command ); + + if ( accept_command ) + { + /* Chain it up. */ + if ( cmds ) + { + last_cmd->next = cmdlist_append_cmd( last_cmd->next, cmd ); + last_cmd = cmd; + } + else + { + cmds = last_cmd = cmd; + } + + if ( cmd_count++ == 0 ) + { + a0->action->first_cmd = cmd; + } + } + else + { + cmd_free( cmd ); + } + + if ( !retry ) + start += chunk; + } + while ( start < length ); + + /* Record the end of the actions cmds */ + a0->action->last_cmd = last_cmd; + + unique_targets = 0; + for ( targets_iter = a0->action->targets.get(); targets_iter; targets_iter = targets_iter->next.get() ) + { + if ( targets_contains( targets_iter->next, targets_iter->target ) ) + continue; + /* Add all targets produced by the action to the update list. */ + push_state( &state_stack, targets_iter->target, NULL, T_STATE_MAKE1A ); + ++unique_targets; + } + /* We need to wait until all the targets agree that + * it's okay to run this action. + */ + ( ( CMD * )a0->action->first_cmd )->asynccnt = unique_targets; + +#if OPT_SEMAPHORE + /* Collect semaphores */ + for ( targets_iter = a0->action->targets.get(); targets_iter; targets_iter = targets_iter->next.get() ) + { + TARGET * sem = targets_iter->target->semaphore; + if ( sem ) + { + if ( ! targets_contains( semaphores, sem ) ) + targetentry( semaphores, sem ); + } + } + ( ( CMD * )a0->action->first_cmd )->lock = semaphores.get(); + ( ( CMD * )a0->action->last_cmd )->unlock = std::move(semaphores); +#endif + } + + /* These were always copied when used. */ + list_free( nt ); + list_free( ns ); + + /* Free variables with values bound by 'actions xxx bind vars'. */ + popsettings( rule->module, boundvars ); + freesettings( boundvars ); + } + + if ( cmds ) + { + last_cmd->next = cmdlist_append_target( last_cmd->next, t ); + } + + swap_settings( &settings_module, &settings_target, 0, 0 ); + return cmds; +} + + +/* + * make1list() - turn a list of targets into a LIST, for $(<) and $(>) + */ + +static LIST * make1list( LIST * l, const targets_uptr & ts, int32_t flags ) +{ + targets_ptr targets = ts.get(); + for ( ; targets; targets = targets->next.get() ) + { + TARGET * t = targets->target; + + if ( t->binding == T_BIND_UNBOUND ) + make1bind( t ); + + if ( ( flags & RULE_EXISTING ) && ( flags & RULE_NEWSRCS ) ) + { + if ( ( t->binding != T_BIND_EXISTS ) && + ( t->fate <= T_FATE_STABLE ) ) + continue; + } + else if ( flags & RULE_EXISTING ) + { + if ( t->binding != T_BIND_EXISTS ) + continue; + } + else if ( flags & RULE_NEWSRCS ) + { + if ( t->fate <= T_FATE_STABLE ) + continue; + } + + /* Prohibit duplicates for RULE_TOGETHER. */ + if ( flags & RULE_TOGETHER ) + { + LISTITER iter = list_begin( l ); + LISTITER const end = list_end( l ); + for ( ; iter != end; iter = list_next( iter ) ) + if ( object_equal( list_item( iter ), t->boundname ) ) + break; + if ( iter != end ) + continue; + } + + /* Build new list. */ + l = list_push_back( l, object_copy( t->boundname ) ); + } + + return l; +} + + +/* + * make1settings() - for vars with bound values, build up replacement lists + */ + +static SETTINGS * make1settings( struct module_t * module, LIST * vars ) +{ + SETTINGS * settings = 0; + + LISTITER vars_iter = list_begin( vars ); + LISTITER const vars_end = list_end( vars ); + for ( ; vars_iter != vars_end; vars_iter = list_next( vars_iter ) ) + { + LIST * const l = var_get( module, list_item( vars_iter ) ); + LIST * nl = L0; + LISTITER iter = list_begin( l ); + LISTITER const end = list_end( l ); + + for ( ; iter != end; iter = list_next( iter ) ) + { + TARGET * const t = bindtarget( list_item( iter ) ); + + /* Make sure the target is bound. */ + if ( t->binding == T_BIND_UNBOUND ) + make1bind( t ); + + /* Build a new list. */ + nl = list_push_back( nl, object_copy( t->boundname ) ); + } + + /* Add to settings chain. */ + settings = addsettings( settings, VAR_SET, list_item( vars_iter ), nl ); + } + + return settings; +} + + +/* + * make1bind() - bind targets that were not bound during dependency analysis + * + * Spot the kludge! If a target is not in the dependency tree, it did not get + * bound by make0(), so we have to do it here. Ugly. + */ + +static void make1bind( TARGET * t ) +{ + if ( t->flags & T_FLAG_NOTFILE ) + return; + + pushsettings( root_module(), t->settings ); + object_free( t->boundname ); + t->boundname = search( t->name, &t->time, 0, t->flags & T_FLAG_ISFILE ); + t->binding = timestamp_empty( &t->time ) ? T_BIND_MISSING : T_BIND_EXISTS; + popsettings( root_module(), t->settings ); +} + + +static bool targets_contains( const targets_uptr & ts, TARGET * t ) +{ + targets_ptr l = ts.get(); + for ( ; l; l = l->next.get() ) + { + if ( t == l->target ) + { + return true; + } + } + return false; +} + +static bool targets_equal( const targets_uptr & ts1, const targets_uptr & ts2 ) +{ + targets_ptr l1 = ts1.get(); + targets_ptr l2 = ts2.get(); + for ( ; l1 && l2; l1 = l1->next.get(), l2 = l2->next.get() ) + { + if ( l1->target != l2->target ) + return false; + } + return !l1 && !l2; +} + + +#ifdef OPT_SEMAPHORE + +static int32_t cmd_sem_lock( TARGET * t ) +{ + CMD * cmd = (CMD *)t->cmds; + targets_ptr iter; + /* Check whether all the semaphores required for updating + * this target are free. + */ + for ( iter = cmd->lock; iter; iter = iter->next.get() ) + { + if ( iter->target->asynccnt > 0 ) + { + if ( DEBUG_EXECCMD ) + out_printf( "SEM: %s is busy, delaying launch of %s\n", + object_str( iter->target->name ), object_str( t->name ) ); + targetentry( iter->target->parents, t ); + return 0; + } + } + /* Lock the semaphores. */ + for ( iter = cmd->lock; iter; iter = iter->next.get() ) + { + ++iter->target->asynccnt; + if ( DEBUG_EXECCMD ) + out_printf( "SEM: %s now used by %s\n", object_str( iter->target->name + ), object_str( t->name ) ); + } + /* A cmd only needs to be locked around its execution. + * clearing cmd->lock here makes it safe to call cmd_sem_lock + * twice. + */ + cmd->lock = NULL; + return 1; +} + +static void cmd_sem_unlock( TARGET * t ) +{ + CMD * cmd = ( CMD * )t->cmds; + targets_ptr iter; + /* Release the semaphores. */ + for ( iter = cmd->unlock.get(); iter; iter = iter->next.get() ) + { + if ( DEBUG_EXECCMD ) + out_printf( "SEM: %s is now free\n", object_str( + iter->target->name ) ); + --iter->target->asynccnt; + assert( iter->target->asynccnt <= 0 ); + } + for ( iter = cmd->unlock.get(); iter; iter = iter->next.get() ) + { + /* Find a waiting target that's ready */ + while ( iter->target->parents ) + { + TARGET * t1 = iter->target->parents->target; + + iter->target->parents = targets_pop(std::move(iter->target->parents)); + + if ( cmd_sem_lock( t1 ) ) + { + push_state( &state_stack, t1, NULL, T_STATE_MAKE1C ); + break; + } + } + } +} + +#endif diff --git a/src/boost/tools/build/src/engine/md5.cpp b/src/boost/tools/build/src/engine/md5.cpp new file mode 100644 index 000000000..2c53be85e --- /dev/null +++ b/src/boost/tools/build/src/engine/md5.cpp @@ -0,0 +1,381 @@ +/* + Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.c is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order + either statically or dynamically; added missing #include + in library. + 2002-03-11 lpd Corrected argument list for main(), and added int return + type, in test program and T value program. + 2002-02-21 lpd Added missing #include in test program. + 2000-07-03 lpd Patched to eliminate warnings about "constant is + unsigned in ANSI C, signed in traditional"; made test program + self-checking. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). + 1999-05-03 lpd Original version. + */ + +#include "md5.h" +#include + +#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ +#ifdef ARCH_IS_BIG_ENDIAN +# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) +#else +# define BYTE_ORDER 0 +#endif + +#define T_MASK ((md5_word_t)~0) +#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) +#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) +#define T3 0x242070db +#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) +#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) +#define T6 0x4787c62a +#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) +#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) +#define T9 0x698098d8 +#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) +#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) +#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) +#define T13 0x6b901122 +#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) +#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) +#define T16 0x49b40821 +#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) +#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) +#define T19 0x265e5a51 +#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) +#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) +#define T22 0x02441453 +#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) +#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) +#define T25 0x21e1cde6 +#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) +#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) +#define T28 0x455a14ed +#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) +#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) +#define T31 0x676f02d9 +#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) +#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) +#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) +#define T35 0x6d9d6122 +#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) +#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) +#define T38 0x4bdecfa9 +#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) +#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) +#define T41 0x289b7ec6 +#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) +#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) +#define T44 0x04881d05 +#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) +#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) +#define T47 0x1fa27cf8 +#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) +#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) +#define T50 0x432aff97 +#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) +#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) +#define T53 0x655b59c3 +#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) +#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) +#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) +#define T57 0x6fa87e4f +#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) +#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) +#define T60 0x4e0811a1 +#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) +#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) +#define T63 0x2ad7d2bb +#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) + + +static void +md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) +{ + md5_word_t + a = pms->abcd[0], b = pms->abcd[1], + c = pms->abcd[2], d = pms->abcd[3]; + md5_word_t t; +#if BYTE_ORDER > 0 + /* Define storage only for big-endian CPUs. */ + md5_word_t X[16]; +#else + /* Define storage for little-endian or both types of CPUs. */ + md5_word_t xbuf[16]; + const md5_word_t *X; +#endif + + { +#if BYTE_ORDER == 0 + /* + * Determine dynamically whether this is a big-endian or + * little-endian machine, since we can use a more efficient + * algorithm on the latter. + */ + static const int w = 1; + + if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ +#endif +#if BYTE_ORDER <= 0 /* little-endian */ + { + /* + * On little-endian machines, we can process properly aligned + * data without copying it. + */ + if (!((data - (const md5_byte_t *)0) & 3)) { + /* data are properly aligned */ + X = (const md5_word_t *)data; + } else { + /* not aligned */ + memcpy(xbuf, data, 64); + X = xbuf; + } + } +#endif +#if BYTE_ORDER == 0 + else /* dynamic big-endian */ +#endif +#if BYTE_ORDER >= 0 /* big-endian */ + { + /* + * On big-endian machines, we must arrange the bytes in the + * right order. + */ + const md5_byte_t *xp = data; + int i; + +# if BYTE_ORDER == 0 + X = xbuf; /* (dynamic only) */ +# else +# define xbuf X /* (static only) */ +# endif + for (i = 0; i < 16; ++i, xp += 4) + xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); + } +#endif + } + +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) + + /* Round 1. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ +#define F(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + F(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 7, T1); + SET(d, a, b, c, 1, 12, T2); + SET(c, d, a, b, 2, 17, T3); + SET(b, c, d, a, 3, 22, T4); + SET(a, b, c, d, 4, 7, T5); + SET(d, a, b, c, 5, 12, T6); + SET(c, d, a, b, 6, 17, T7); + SET(b, c, d, a, 7, 22, T8); + SET(a, b, c, d, 8, 7, T9); + SET(d, a, b, c, 9, 12, T10); + SET(c, d, a, b, 10, 17, T11); + SET(b, c, d, a, 11, 22, T12); + SET(a, b, c, d, 12, 7, T13); + SET(d, a, b, c, 13, 12, T14); + SET(c, d, a, b, 14, 17, T15); + SET(b, c, d, a, 15, 22, T16); +#undef SET + + /* Round 2. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ +#define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + G(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 1, 5, T17); + SET(d, a, b, c, 6, 9, T18); + SET(c, d, a, b, 11, 14, T19); + SET(b, c, d, a, 0, 20, T20); + SET(a, b, c, d, 5, 5, T21); + SET(d, a, b, c, 10, 9, T22); + SET(c, d, a, b, 15, 14, T23); + SET(b, c, d, a, 4, 20, T24); + SET(a, b, c, d, 9, 5, T25); + SET(d, a, b, c, 14, 9, T26); + SET(c, d, a, b, 3, 14, T27); + SET(b, c, d, a, 8, 20, T28); + SET(a, b, c, d, 13, 5, T29); + SET(d, a, b, c, 2, 9, T30); + SET(c, d, a, b, 7, 14, T31); + SET(b, c, d, a, 12, 20, T32); +#undef SET + + /* Round 3. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + H(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 5, 4, T33); + SET(d, a, b, c, 8, 11, T34); + SET(c, d, a, b, 11, 16, T35); + SET(b, c, d, a, 14, 23, T36); + SET(a, b, c, d, 1, 4, T37); + SET(d, a, b, c, 4, 11, T38); + SET(c, d, a, b, 7, 16, T39); + SET(b, c, d, a, 10, 23, T40); + SET(a, b, c, d, 13, 4, T41); + SET(d, a, b, c, 0, 11, T42); + SET(c, d, a, b, 3, 16, T43); + SET(b, c, d, a, 6, 23, T44); + SET(a, b, c, d, 9, 4, T45); + SET(d, a, b, c, 12, 11, T46); + SET(c, d, a, b, 15, 16, T47); + SET(b, c, d, a, 2, 23, T48); +#undef SET + + /* Round 4. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ +#define I(x, y, z) ((y) ^ ((x) | ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + I(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 6, T49); + SET(d, a, b, c, 7, 10, T50); + SET(c, d, a, b, 14, 15, T51); + SET(b, c, d, a, 5, 21, T52); + SET(a, b, c, d, 12, 6, T53); + SET(d, a, b, c, 3, 10, T54); + SET(c, d, a, b, 10, 15, T55); + SET(b, c, d, a, 1, 21, T56); + SET(a, b, c, d, 8, 6, T57); + SET(d, a, b, c, 15, 10, T58); + SET(c, d, a, b, 6, 15, T59); + SET(b, c, d, a, 13, 21, T60); + SET(a, b, c, d, 4, 6, T61); + SET(d, a, b, c, 11, 10, T62); + SET(c, d, a, b, 2, 15, T63); + SET(b, c, d, a, 9, 21, T64); +#undef SET + + /* Then perform the following additions. (That is increment each + of the four registers by the value it had before this block + was started.) */ + pms->abcd[0] += a; + pms->abcd[1] += b; + pms->abcd[2] += c; + pms->abcd[3] += d; +} + +void +md5_init(md5_state_t *pms) +{ + pms->count[0] = pms->count[1] = 0; + pms->abcd[0] = 0x67452301; + pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; + pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; + pms->abcd[3] = 0x10325476; +} + +void +md5_append(md5_state_t *pms, const md5_byte_t *data, size_t nbytes) +{ + const md5_byte_t *p = data; + size_t left = nbytes; + size_t offset = (pms->count[0] >> 3) & 63; + md5_word_t nbits = (md5_word_t)(nbytes << 3); + + if (nbytes <= 0) + return; + + /* Update the message length. */ + pms->count[1] += md5_word_t(nbytes >> 29); + pms->count[0] += nbits; + if (pms->count[0] < nbits) + pms->count[1]++; + + /* Process an initial partial block. */ + if (offset) { + size_t copy = (offset + nbytes > 64 ? 64 - offset : nbytes); + + memcpy(pms->buf + offset, p, copy); + if (offset + copy < 64) + return; + p += copy; + left -= copy; + md5_process(pms, pms->buf); + } + + /* Process full blocks. */ + for (; left >= 64; p += 64, left -= 64) + md5_process(pms, p); + + /* Process a final partial block. */ + if (left) + memcpy(pms->buf, p, left); +} + +void +md5_finish(md5_state_t *pms, md5_byte_t digest[16]) +{ + static const md5_byte_t pad[64] = { + 0x80, 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, 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 + }; + md5_byte_t data[8]; + int i; + + /* Save the length before padding. */ + for (i = 0; i < 8; ++i) + data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); + /* Pad to 56 bytes mod 64. */ + md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); + /* Append the length. */ + md5_append(pms, data, 8); + for (i = 0; i < 16; ++i) + digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); +} diff --git a/src/boost/tools/build/src/engine/md5.h b/src/boost/tools/build/src/engine/md5.h new file mode 100644 index 000000000..cbfde5976 --- /dev/null +++ b/src/boost/tools/build/src/engine/md5.h @@ -0,0 +1,93 @@ +/* + Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321, whose + text is available at + http://www.ietf.org/rfc/rfc1321.txt + The code is derived from the text of the RFC, including the test suite + (section A.5) but excluding the rest of Appendix A. It does not include + any code or documentation that is identified in the RFC as being + copyrighted. + + The original and principal author of md5.h is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 2002-04-13 lpd Removed support for non-ANSI compilers; removed + references to Ghostscript; clarified derivation from RFC 1321; + now handles byte order either statically or dynamically. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); + added conditionalization for C++ compilation from Martin + Purschke . + 1999-05-03 lpd Original version. + */ + +#ifndef md5_INCLUDED +# define md5_INCLUDED + +#include + +/* + * This package supports both compile-time and run-time determination of CPU + * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be + * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is + * defined as non-zero, the code will be compiled to run only on big-endian + * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to + * run on either big- or little-endian CPUs, but will run slightly less + * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. + */ + +typedef unsigned char md5_byte_t; /* 8-bit byte */ +typedef unsigned int md5_word_t; /* 32-bit word */ + +/* Define the state of the MD5 Algorithm. */ +typedef struct md5_state_s { + md5_word_t count[2]; /* message length in bits, lsw first */ + md5_word_t abcd[4]; /* digest buffer */ + md5_byte_t buf[64]; /* accumulate block */ +} md5_state_t; + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Initialize the algorithm. */ +void md5_init(md5_state_t *pms); + +/* Append a string to the message. */ +void md5_append(md5_state_t *pms, const md5_byte_t *data, size_t nbytes); + +/* Finish the message and return the digest. */ +void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + +#endif /* md5_INCLUDED */ diff --git a/src/boost/tools/build/src/engine/mem.cpp b/src/boost/tools/build/src/engine/mem.cpp new file mode 100644 index 000000000..ee353253a --- /dev/null +++ b/src/boost/tools/build/src/engine/mem.cpp @@ -0,0 +1,8 @@ +/* +Copyright Rene Rivera 2006. +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or copy at +https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#include "jam.h" diff --git a/src/boost/tools/build/src/engine/mem.h b/src/boost/tools/build/src/engine/mem.h new file mode 100644 index 000000000..41868cc58 --- /dev/null +++ b/src/boost/tools/build/src/engine/mem.h @@ -0,0 +1,170 @@ +/* + * Copyright 2006-2022 René Ferdinand Rivera Morell + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef BJAM_MEM_H +#define BJAM_MEM_H + +#include "config.h" + +#include +#include + +#define bjam_malloc_x(s) std::malloc(s) +#define bjam_calloc_x(n, s) std::calloc(n, s) +#define bjam_realloc_x(p, s) std::realloc(p, s) +#define bjam_free_x(p) std::free(p) + +#ifndef bjam_malloc_atomic_x +#define bjam_malloc_atomic_x(s) bjam_malloc_x(s) +#endif +#ifndef bjam_calloc_atomic_x +#define bjam_calloc_atomic_x(n, s) bjam_calloc_x(n, s) +#endif +#ifndef bjam_mem_init_x +#define bjam_mem_init_x() +#endif +#ifndef bjam_mem_close_x +#define bjam_mem_close_x() +#endif +#ifndef bjam_malloc_raw_x +#define bjam_malloc_raw_x(s) bjam_malloc_x(s) +#endif +#ifndef bjam_calloc_raw_x +#define bjam_calloc_raw_x(n, s) bjam_calloc_x(n, s) +#endif +#ifndef bjam_realloc_raw_x +#define bjam_realloc_raw_x(p, s) bjam_realloc_x(p, s) +#endif +#ifndef bjam_free_raw_x +#define bjam_free_raw_x(p) bjam_free_x(p) +#endif + +#ifdef OPT_DEBUG_PROFILE +/* Profile tracing of memory allocations. */ +#include "debug.h" + +#define BJAM_MALLOC(s) (profile_memory(s), bjam_malloc_x(s)) +#define BJAM_MALLOC_ATOMIC(s) (profile_memory(s), bjam_malloc_atomic_x(s)) +#define BJAM_CALLOC(n, s) (profile_memory(n * s), bjam_calloc_x(n, s)) +#define BJAM_CALLOC_ATOMIC(n, s) (profile_memory(n * s), bjam_calloc_atomic_x(n, s)) +#define BJAM_REALLOC(p, s) (profile_memory(s), bjam_realloc_x(p, s)) + +#define BJAM_MALLOC_RAW(s) (profile_memory(s), bjam_malloc_raw_x(s)) +#define BJAM_CALLOC_RAW(n, s) (profile_memory(n * s), bjam_calloc_raw_x(n, s)) +#define BJAM_REALLOC_RAW(p, s) (profile_memory(s), bjam_realloc_raw_x(p, s)) +#else +/* No mem tracing. */ +#define BJAM_MALLOC(s) bjam_malloc_x(s) +#define BJAM_MALLOC_ATOMIC(s) bjam_malloc_atomic_x(s) +#define BJAM_CALLOC(n, s) bjam_calloc_x(n, s) +#define BJAM_CALLOC_ATOMIC(n, s) bjam_calloc_atomic_x(n, s) +#define BJAM_REALLOC(p, s) bjam_realloc_x(p, s) + +#define BJAM_MALLOC_RAW(s) bjam_malloc_raw_x(s) +#define BJAM_CALLOC_RAW(n, s) bjam_calloc_raw_x(n, s) +#define BJAM_REALLOC_RAW(p, s) bjam_realloc_raw_x(p, s) +#endif + +#define BJAM_MEM_INIT() bjam_mem_init_x() +#define BJAM_MEM_CLOSE() bjam_mem_close_x() + +#define BJAM_FREE(p) bjam_free_x(p) +#define BJAM_FREE_RAW(p) bjam_free_raw_x(p) + +namespace b2 { +namespace jam { + + template + T* ctor_ptr(void* p, Args&&... args) + { + std::memset(p, 0, sizeof(T)); + return new (p) T(std::forward(args)...); + } + + template + void dtor_ptr(T* p) + { + p->~T(); + } + + template + T* make_ptr(Args&&... args) + { + return ctor_ptr(BJAM_MALLOC(sizeof(T))); + } + + template + void free_ptr(T* p) + { + dtor_ptr(p); + BJAM_FREE(p); + } + + template + struct unique_jptr_deleter { + void operator()(T* p) const + { + p->~T(); + BJAM_FREE(p); + } + }; + + template + using unique_jptr = std::unique_ptr>; + + template + unique_jptr make_unique_jptr(Args&&... args) + { + return unique_jptr(make_ptr(std::forward(args)...)); + } + + template + struct unique_jptr_free { + using free_f = void (*)(T*); + + explicit unique_jptr_free(free_f f) + : free_function(f) + { + } + + unique_jptr_free(unique_jptr_free&& p) + : free_function(std::move(p.free_function)) + { + p.free_function = nullptr; + } + + void operator()(T* p) const + { + // if (free_function) + if (p) + (*free_function)(p); + } + + private: + free_f free_function = nullptr; + }; + + template + using unique_bare_jptr = std::unique_ptr>; + + template + unique_bare_jptr make_unique_bare_jptr(T* p, F f) + { + return unique_bare_jptr(p, unique_jptr_free(f)); + } + + template + unique_bare_jptr make_unique_bare_jptr(T* p, F enter_f, G exit_f) + { + enter_f(p); + return unique_bare_jptr(p, unique_jptr_free(exit_f)); + } + +} +} + +#endif diff --git a/src/boost/tools/build/src/engine/modules.cpp b/src/boost/tools/build/src/engine/modules.cpp new file mode 100644 index 000000000..250c03724 --- /dev/null +++ b/src/boost/tools/build/src/engine/modules.cpp @@ -0,0 +1,434 @@ +/* + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "jam.h" +#include "modules.h" + +#include "hash.h" +#include "lists.h" +#include "native.h" +#include "object.h" +#include "parse.h" +#include "rules.h" +#include "jam_strings.h" +#include "variable.h" + +#include +#include + +static struct hash * module_hash = 0; +static module_t root; + + +module_t * bindmodule( OBJECT * name ) +{ + if ( !name ) + return &root; + + { + PROFILE_ENTER( BINDMODULE ); + + module_t * m; + int found; + + if ( !module_hash ) + module_hash = hashinit( sizeof( module_t ), "modules" ); + + m = (module_t *)hash_insert( module_hash, name, &found ); + if ( !found ) + { + m->name = object_copy( name ); + m->variables = 0; + m->variable_indices = 0; + m->num_fixed_variables = 0; + m->fixed_variables = 0; + m->rules = 0; + m->imported_modules = 0; + m->class_module = 0; + m->native_rules = 0; + m->user_module = 0; + } + + PROFILE_EXIT( BINDMODULE ); + + return m; + } +} + + +/* + * demand_rules() - Get the module's "rules" hash on demand. + */ +struct hash * demand_rules( module_t * m ) +{ + if ( !m->rules ) + m->rules = hashinit( sizeof( RULE ), "rules" ); + return m->rules; +} + + +/* + * delete_module() - wipe out the module's rules and variables. + */ + +static void delete_rule_( void * xrule, void * data ) +{ + rule_free( (RULE *)xrule ); +} + + +static void delete_native_rule( void * xrule, void * data ) +{ + native_rule_t * rule = (native_rule_t *)xrule; + object_free( rule->name ); + if ( rule->procedure ) + function_free( rule->procedure ); +} + + +static void delete_imported_modules( void * xmodule_name, void * data ) +{ + object_free( *(OBJECT * *)xmodule_name ); +} + + +static void free_fixed_variable( void * xvar, void * data ); + +void delete_module( module_t * m ) +{ + /* Clear out all the rules. */ + if ( m->rules ) + { + hashenumerate( m->rules, delete_rule_, (void *)0 ); + hash_free( m->rules ); + m->rules = 0; + } + + if ( m->native_rules ) + { + hashenumerate( m->native_rules, delete_native_rule, (void *)0 ); + hash_free( m->native_rules ); + m->native_rules = 0; + } + + if ( m->variables ) + { + var_done( m ); + m->variables = 0; + } + + if ( m->fixed_variables ) + { + int i; + for ( i = 0; i < m->num_fixed_variables; ++i ) + { + list_free( m->fixed_variables[ i ] ); + } + BJAM_FREE( m->fixed_variables ); + m->fixed_variables = 0; + } + + if ( m->variable_indices ) + { + hashenumerate( m->variable_indices, &free_fixed_variable, (void *)0 ); + hash_free( m->variable_indices ); + m->variable_indices = 0; + } + + if ( m->imported_modules ) + { + hashenumerate( m->imported_modules, delete_imported_modules, (void *)0 ); + hash_free( m->imported_modules ); + m->imported_modules = 0; + } +} + + +struct module_stats +{ + OBJECT * module_name; + struct hashstats rules_stats[ 1 ]; + struct hashstats variables_stats[ 1 ]; + struct hashstats variable_indices_stats[ 1 ]; + struct hashstats imported_modules_stats[ 1 ]; +}; + + +static void module_stat( struct hash * hp, OBJECT * module, const char * name ) +{ + if ( hp ) + { + struct hashstats stats[ 1 ]; + string id[ 1 ]; + hashstats_init( stats ); + string_new( id ); + string_append( id, object_str( module ) ); + string_push_back( id, ' ' ); + string_append( id, name ); + + hashstats_add( stats, hp ); + hashstats_print( stats, id->value ); + + string_free( id ); + } +} + + +static void class_module_stat( struct hashstats * stats, OBJECT * module, const char * name ) +{ + if ( stats->item_size ) + { + string id[ 1 ]; + string_new( id ); + string_append( id, object_str( module ) ); + string_append( id, " object " ); + string_append( id, name ); + + hashstats_print( stats, id->value ); + + string_free( id ); + } +} + + +static void stat_module( void * xmodule, void * data ) +{ + module_t *m = (module_t *)xmodule; + + if ( DEBUG_MEM || DEBUG_PROFILE ) + { + struct hash * class_info = (struct hash *)data; + if ( m->class_module ) + { + int found; + struct module_stats * ms = (struct module_stats *)hash_insert( class_info, m->class_module->name, &found ); + if ( !found ) + { + ms->module_name = m->class_module->name; + hashstats_init( ms->rules_stats ); + hashstats_init( ms->variables_stats ); + hashstats_init( ms->variable_indices_stats ); + hashstats_init( ms->imported_modules_stats ); + } + + hashstats_add( ms->rules_stats, m->rules ); + hashstats_add( ms->variables_stats, m->variables ); + hashstats_add( ms->variable_indices_stats, m->variable_indices ); + hashstats_add( ms->imported_modules_stats, m->imported_modules ); + } + else + { + module_stat( m->rules, m->name, "rules" ); + module_stat( m->variables, m->name, "variables" ); + module_stat( m->variable_indices, m->name, "fixed variables" ); + module_stat( m->imported_modules, m->name, "imported modules" ); + } + } + + delete_module( m ); + object_free( m->name ); +} + +static void print_class_stats( void * xstats, void * data ) +{ + struct module_stats * stats = (struct module_stats *)xstats; + class_module_stat( stats->rules_stats, stats->module_name, "rules" ); + class_module_stat( stats->variables_stats, stats->module_name, "variables" ); + class_module_stat( stats->variable_indices_stats, stats->module_name, "fixed variables" ); + class_module_stat( stats->imported_modules_stats, stats->module_name, "imported modules" ); +} + + +static void delete_module_( void * xmodule, void * data ) +{ + module_t *m = (module_t *)xmodule; + + delete_module( m ); + object_free( m->name ); +} + + +void modules_done() +{ + if ( module_hash ) + { + if ( DEBUG_MEM || DEBUG_PROFILE ) + { + struct hash * class_hash = hashinit( sizeof( struct module_stats ), "object info" ); + hashenumerate( module_hash, stat_module, (void *)class_hash ); + hashenumerate( class_hash, print_class_stats, (void *)0 ); + hash_free( class_hash ); + } + hashenumerate( module_hash, delete_module_, (void *)0 ); + hashdone( module_hash ); + } + module_hash = 0; + delete_module( &root ); +} + +module_t * root_module() +{ + return &root; +} + + +void import_module( LIST * module_names, module_t * target_module ) +{ + PROFILE_ENTER( IMPORT_MODULE ); + + struct hash * h; + LISTITER iter; + LISTITER end; + + if ( !target_module->imported_modules ) + target_module->imported_modules = hashinit( sizeof( char * ), "imported" + ); + h = target_module->imported_modules; + + iter = list_begin( module_names ); + end = list_end( module_names ); + for ( ; iter != end; iter = list_next( iter ) ) + { + int found; + OBJECT * const s = list_item( iter ); + OBJECT * * const ss = (OBJECT * *)hash_insert( h, s, &found ); + if ( !found ) + *ss = object_copy( s ); + } + + PROFILE_EXIT( IMPORT_MODULE ); +} + + +static void add_module_name( void * r_, void * result_ ) +{ + OBJECT * * const r = (OBJECT * *)r_; + LIST * * const result = (LIST * *)result_; + *result = list_push_back( *result, object_copy( *r ) ); +} + + +LIST * imported_modules( module_t * module ) +{ + LIST * result = L0; + if ( module->imported_modules ) + hashenumerate( module->imported_modules, add_module_name, &result ); + return result; +} + + +FUNCTION * function_bind_variables( FUNCTION *, module_t *, int * counter ); +FUNCTION * function_unbind_variables( FUNCTION * ); + +struct fixed_variable +{ + OBJECT * key; + int n; +}; + +struct bind_vars_t +{ + module_t * module; + int counter; +}; + + +static void free_fixed_variable( void * xvar, void * data ) +{ + object_free( ( (struct fixed_variable *)xvar )->key ); +} + + +static void bind_variables_for_rule( void * xrule, void * xdata ) +{ + RULE * rule = (RULE *)xrule; + struct bind_vars_t * data = (struct bind_vars_t *)xdata; + if ( rule->procedure && rule->module == data->module ) + rule->procedure = function_bind_variables( rule->procedure, + data->module, &data->counter ); +} + + +void module_bind_variables( struct module_t * m ) +{ + if ( m != root_module() && m->rules ) + { + struct bind_vars_t data; + data.module = m; + data.counter = m->num_fixed_variables; + hashenumerate( m->rules, &bind_variables_for_rule, &data ); + module_set_fixed_variables( m, data.counter ); + } +} + + +int module_add_fixed_var( struct module_t * m, OBJECT * name, int * counter ) +{ + struct fixed_variable * v; + int found; + + assert( !m->class_module ); + + if ( !m->variable_indices ) + m->variable_indices = hashinit( sizeof( struct fixed_variable ), "variable index table" ); + + v = (struct fixed_variable *)hash_insert( m->variable_indices, name, &found ); + if ( !found ) + { + v->key = object_copy( name ); + v->n = (*counter)++; + } + + return v->n; +} + + +LIST * var_get_and_clear_raw( module_t * m, OBJECT * name ); + +static void load_fixed_variable( void * xvar, void * data ) +{ + struct fixed_variable * var = (struct fixed_variable *)xvar; + struct module_t * m = (struct module_t *)data; + if ( var->n >= m->num_fixed_variables ) + m->fixed_variables[ var->n ] = var_get_and_clear_raw( m, var->key ); +} + + +void module_set_fixed_variables( struct module_t * m, int n_variables ) +{ + /* Reallocate */ + struct hash * variable_indices; + LIST * * fixed_variables = (LIST * *)BJAM_MALLOC( n_variables * sizeof( LIST * ) ); + if ( m->fixed_variables ) + { + memcpy( fixed_variables, m->fixed_variables, m->num_fixed_variables * sizeof( LIST * ) ); + BJAM_FREE( m->fixed_variables ); + } + m->fixed_variables = fixed_variables; + variable_indices = m->class_module + ? m->class_module->variable_indices + : m->variable_indices; + if ( variable_indices ) + hashenumerate( variable_indices, &load_fixed_variable, m ); + m->num_fixed_variables = n_variables; +} + + +int module_get_fixed_var( struct module_t * m_, OBJECT * name ) +{ + struct fixed_variable * v; + struct module_t * m = m_; + + if ( m->class_module ) + m = m->class_module; + + if ( !m->variable_indices ) + return -1; + + v = (struct fixed_variable *)hash_find( m->variable_indices, name ); + return v && v->n < m_->num_fixed_variables ? v->n : -1; +} diff --git a/src/boost/tools/build/src/engine/modules.h b/src/boost/tools/build/src/engine/modules.h new file mode 100644 index 000000000..3a07b11c3 --- /dev/null +++ b/src/boost/tools/build/src/engine/modules.h @@ -0,0 +1,57 @@ +/* + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ +#ifndef MODULES_DWA10182001_H +#define MODULES_DWA10182001_H + +#include "config.h" +#include "lists.h" +#include "object.h" + +typedef struct module_t module_t ; + +typedef module_t * module_ptr; + +struct module_t +{ + OBJECT * name; + struct hash * rules; + struct hash * variables; + struct hash * variable_indices; + int num_fixed_variables; + LIST * * fixed_variables; + struct hash * imported_modules; + module_t * class_module; + struct hash * native_rules; + int user_module; +}; + +module_t * bindmodule( OBJECT * name ); +module_t * root_module(); +void delete_module( module_t * ); + +void import_module( LIST * module_names, module_t * target_module ); +LIST * imported_modules( module_t * ); + +struct hash * demand_rules( module_t * ); + +void module_bind_variables( module_t * ); + +/* + * After calling module_add_fixed_var, module_set_fixed_variables must be called + * before accessing any variables in the module. + */ +int module_add_fixed_var( module_t *, OBJECT * name, int * n ); +void module_set_fixed_variables( module_t *, int n ); + +/* + * Returns the index of the variable or -1 if none exists. + */ +int module_get_fixed_var( module_t *, OBJECT * name ); + +void modules_done(); + +#endif diff --git a/src/boost/tools/build/src/engine/modules/order.cpp b/src/boost/tools/build/src/engine/modules/order.cpp new file mode 100644 index 000000000..527359e17 --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/order.cpp @@ -0,0 +1,159 @@ +/* Copyright 2004. Vladimir Prus + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "../lists.h" +#include "../mem.h" +#include "../native.h" +#include "../object.h" +#include "../jam_strings.h" +#include "../variable.h" + + +/* Use quite klugy approach: when we add order dependency from 'a' to 'b', just + * append 'b' to of value of variable 'a'. + */ +LIST * add_pair( FRAME * frame, int32_t flags ) +{ + LIST * arg = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( arg ); + LISTITER const end = list_end( arg ); + var_set( frame->module, list_item( iter ), list_copy_range( arg, list_next( + iter ), end ), VAR_APPEND ); + return L0; +} + + +/* Given a list and a value, returns position of that value in the list, or -1 + * if not found. + */ +int32_t list_index( LIST * list, OBJECT * value ) +{ + int32_t result = 0; + LISTITER iter = list_begin( list ); + LISTITER const end = list_end( list ); + for ( ; iter != end; iter = list_next( iter ), ++result ) + if ( object_equal( list_item( iter ), value ) ) + return result; + return -1; +} + +enum colors { white, gray, black }; + + +/* Main routine for topological sort. Calls itself recursively on all adjacent + * vertices which were not yet visited. After that, 'current_vertex' is added to + * '*result_ptr'. + */ +void do_ts( int32_t * * graph, int32_t current_vertex, int32_t * colors, int32_t * * result_ptr + ) +{ + int32_t i; + + colors[ current_vertex ] = gray; + for ( i = 0; graph[ current_vertex ][ i ] != -1; ++i ) + { + int32_t adjacent_vertex = graph[ current_vertex ][ i ]; + if ( colors[ adjacent_vertex ] == white ) + do_ts( graph, adjacent_vertex, colors, result_ptr ); + /* The vertex is either black, in which case we do not have to do + * anything, or gray, in which case we have a loop. If we have a loop, + * it is not clear what useful diagnostic we can emit, so we emit + * nothing. + */ + } + colors[ current_vertex ] = black; + **result_ptr = current_vertex; + ( *result_ptr )++; +} + + +static void topological_sort( int32_t * * graph, int32_t num_vertices, int32_t * result ) +{ + int32_t i; + int32_t * colors = ( int32_t * )BJAM_CALLOC( num_vertices, sizeof( int32_t ) ); + for ( i = 0; i < num_vertices; ++i ) + colors[ i ] = white; + + for ( i = num_vertices - 1; i >= 0; --i ) + if ( colors[ i ] == white ) + do_ts( graph, i, colors, &result ); + + BJAM_FREE( colors ); +} + + +LIST * order( FRAME * frame, int32_t flags ) +{ + LIST * arg = lol_get( frame->args, 0 ); + LIST * result = L0; + int32_t src; + LISTITER iter = list_begin( arg ); + LISTITER const end = list_end( arg ); + + /* We need to create a graph of order dependencies between the passed + * objects. We assume there are no duplicates passed to 'add_pair'. + */ + int32_t length = list_length( arg ); + int32_t * * graph = ( int32_t * * )BJAM_CALLOC( length, sizeof( int32_t * ) ); + int32_t * order = ( int32_t * )BJAM_MALLOC( ( length + 1 ) * sizeof( int32_t ) ); + + for ( src = 0; iter != end; iter = list_next( iter ), ++src ) + { + /* For all objects this one depends upon, add elements to 'graph'. */ + LIST * dependencies = var_get( frame->module, list_item( iter ) ); + int32_t index = 0; + LISTITER dep_iter = list_begin( dependencies ); + LISTITER const dep_end = list_end( dependencies ); + + graph[ src ] = ( int32_t * )BJAM_CALLOC( list_length( dependencies ) + 1, + sizeof( int32_t ) ); + for ( ; dep_iter != dep_end; dep_iter = list_next( dep_iter ) ) + { + int32_t const dst = list_index( arg, list_item( dep_iter ) ); + if ( dst != -1 ) + graph[ src ][ index++ ] = dst; + } + graph[ src ][ index ] = -1; + } + + topological_sort( graph, length, order ); + + { + int32_t index = length - 1; + for ( ; index >= 0; --index ) + { + int32_t i; + LISTITER iter = list_begin( arg ); + for ( i = 0; i < order[ index ]; ++i, iter = list_next( iter ) ); + result = list_push_back( result, object_copy( list_item( iter ) ) ); + } + } + + /* Clean up */ + { + int32_t i; + for ( i = 0; i < length; ++i ) + BJAM_FREE( graph[ i ] ); + BJAM_FREE( graph ); + BJAM_FREE( order ); + } + + return result; +} + + +void init_order() +{ + { + char const * args[] = { "first", "second", 0 }; + declare_native_rule( "class@order", "add-pair", args, add_pair, 1 ); + } + + { + char const * args[] = { "objects", "*", 0 }; + declare_native_rule( "class@order", "order", args, order, 1 ); + } +} diff --git a/src/boost/tools/build/src/engine/modules/path.cpp b/src/boost/tools/build/src/engine/modules/path.cpp new file mode 100644 index 000000000..35d753d5e --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/path.cpp @@ -0,0 +1,25 @@ +/* Copyright Vladimir Prus 2003. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "../constants.h" +#include "../frames.h" +#include "../lists.h" +#include "../native.h" +#include "../filesys.h" + + +LIST * path_exists( FRAME * frame, int flags ) +{ + return file_query( list_front( lol_get( frame->args, 0 ) ) ) ? + list_new( object_copy( constant_true ) ) : L0; +} + + +void init_path() +{ + char const * args[] = { "location", 0 }; + declare_native_rule( "path", "exists", args, path_exists, 1 ); +} diff --git a/src/boost/tools/build/src/engine/modules/property-set.cpp b/src/boost/tools/build/src/engine/modules/property-set.cpp new file mode 100644 index 000000000..b5a11abcf --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/property-set.cpp @@ -0,0 +1,334 @@ +/* + * Copyright 2013 Steven Watanabe + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "../object.h" +#include "../lists.h" +#include "../modules.h" +#include "../rules.h" +#include "../variable.h" +#include "../native.h" +#include "../compile.h" +#include "../mem.h" +#include "../constants.h" +#include "string.h" + +struct ps_map_entry +{ + struct ps_map_entry * next; + LIST * key; + OBJECT * value; +}; + +struct ps_map +{ + struct ps_map_entry * * table; + int32_t table_size; + int32_t num_elems; +}; + +static unsigned list_hash(LIST * key) +{ + unsigned int hash = 0; + LISTITER iter = list_begin( key ), end = list_end( key ); + for ( ; iter != end; ++iter ) + { + hash = hash * 2147059363 + object_hash( list_item( iter ) ); + } + return hash; +} + +static int list_equal( LIST * lhs, LIST * rhs ) +{ + LISTITER lhs_iter, lhs_end, rhs_iter; + if ( list_length( lhs ) != list_length( rhs ) ) + { + return 0; + } + lhs_iter = list_begin( lhs ); + lhs_end = list_end( lhs ); + rhs_iter = list_begin( rhs ); + for ( ; lhs_iter != lhs_end; ++lhs_iter, ++rhs_iter ) + { + if ( ! object_equal( list_item( lhs_iter ), list_item( rhs_iter ) ) ) + { + return 0; + } + } + return 1; +} + +static void ps_map_init( struct ps_map * map ) +{ + int32_t i; + map->table_size = 2; + map->num_elems = 0; + map->table = (struct ps_map_entry * *)BJAM_MALLOC( size_t(map->table_size) * sizeof( struct ps_map_entry * ) ); + for ( i = 0; i < map->table_size; ++i ) + { + map->table[ i ] = NULL; + } +} + +static void ps_map_destroy( struct ps_map * map ) +{ + int32_t i; + for ( i = 0; i < map->table_size; ++i ) + { + struct ps_map_entry * pos; + for ( pos = map->table[ i ]; pos; ) + { + struct ps_map_entry * tmp = pos->next; + object_free( pos->value ); + BJAM_FREE( pos ); + pos = tmp; + } + } + BJAM_FREE( map->table ); +} + +static void ps_map_rehash( struct ps_map * map ) +{ + struct ps_map old = *map; + int32_t i; + map->table = (struct ps_map_entry * *)BJAM_MALLOC( size_t(map->table_size) * 2 * sizeof( struct ps_map_entry * ) ); + map->table_size *= 2; + for ( i = 0; i < map->table_size; ++i ) + { + map->table[ i ] = NULL; + } + for ( i = 0; i < old.table_size; ++i ) + { + struct ps_map_entry * pos; + for ( pos = old.table[ i ]; pos; ) + { + struct ps_map_entry * tmp = pos->next; + + unsigned hash_val = list_hash( pos->key ); + unsigned bucket = hash_val % map->table_size; + pos->next = map->table[ bucket ]; + map->table[ bucket ] = pos; + + pos = tmp; + } + } + BJAM_FREE( old.table ); +} + +static struct ps_map_entry * ps_map_insert(struct ps_map * map, LIST * key) +{ + unsigned hash_val = list_hash( key ); + unsigned bucket = hash_val % map->table_size; + struct ps_map_entry * pos; + for ( pos = map->table[bucket]; pos ; pos = pos->next ) + { + if ( list_equal( pos->key, key ) ) + return pos; + } + + if ( map->num_elems >= map->table_size ) + { + ps_map_rehash( map ); + bucket = hash_val % map->table_size; + } + pos = (struct ps_map_entry *)BJAM_MALLOC( sizeof( struct ps_map_entry ) ); + pos->next = map->table[bucket]; + pos->key = key; + pos->value = 0; + map->table[bucket] = pos; + ++map->num_elems; + return pos; +} + +static struct ps_map all_property_sets; + +LIST * property_set_create( FRAME * frame, int flags ) +{ + LIST * properties = lol_get( frame->args, 0 ); + LIST * sorted = list_sort( properties ); + LIST * unique = list_unique( sorted ); + struct ps_map_entry * pos = ps_map_insert( &all_property_sets, unique ); + list_free( sorted ); + if ( pos->value ) + { + list_free( unique ); + return list_new( object_copy( pos->value ) ); + } + else + { + OBJECT * rulename = object_new( "new" ); + OBJECT * varname = object_new( "self.raw" ); + LIST * val = call_rule( rulename, frame, + list_new( object_new( "property-set" ) ), 0 ); + LISTITER iter, end; + object_free( rulename ); + pos->value = object_copy( list_front( val ) ); + var_set( bindmodule( pos->value ), varname, unique, VAR_SET ); + object_free( varname ); + + for ( iter = list_begin( unique ), end = list_end( unique ); iter != end; ++iter ) + { + const char * str = object_str( list_item( iter ) ); + if ( str[ 0 ] != '<' || ! strchr( str, '>' ) ) + { + string message[ 1 ]; + string_new( message ); + string_append( message, "Invalid property: '" ); + string_append( message, str ); + string_append( message, "'" ); + LIST * imports = list_new( object_new( "errors" ) ); + import_module( imports, frame->module ); + rulename = object_new( "errors.error" ); + call_rule( rulename, frame, + list_new( object_new( message->value ) ), 0 ); + /* unreachable */ + string_free( message ); + object_free( list_front( imports ) ); + list_free( imports ); + object_free( rulename ); + } + } + + return val; + } +} + +/* binary search for the property value */ +LIST * property_set_get( FRAME * frame, int flags ) +{ + OBJECT * varname = object_new( "self.raw" ); + LIST * props = var_get( frame->module, varname ); + const char * name = object_str( list_front( lol_get( frame->args, 0 ) ) ); + size_t name_len = strlen( name ); + LISTITER begin, end; + LIST * result = L0; + object_free( varname ); + + /* Assumes random access */ + begin = list_begin( props ), end = list_end( props ); + + while ( 1 ) + { + ptrdiff_t diff = (end - begin); + LISTITER mid = begin + diff / 2; + int res; + if ( diff == 0 ) + { + return L0; + } + res = strncmp( object_str( list_item( mid ) ), name, name_len ); + if ( res < 0 ) + { + begin = mid + 1; + } + else if ( res > 0 ) + { + end = mid; + } + else /* We've found the property */ + { + /* Find the beginning of the group */ + LISTITER tmp = mid; + while ( tmp > begin ) + { + --tmp; + res = strncmp( object_str( list_item( tmp ) ), name, name_len ); + if ( res != 0 ) + { + ++tmp; + break; + } + } + begin = tmp; + /* Find the end of the group */ + tmp = mid + 1; + while ( tmp < end ) + { + res = strncmp( object_str( list_item( tmp ) ), name, name_len ); + if ( res != 0 ) break; + ++tmp; + } + end = tmp; + break; + } + } + + for ( ; begin != end; ++begin ) + { + result = list_push_back( result, + object_new( object_str( list_item( begin ) ) + name_len ) ); + } + + return result; +} + +/* binary search for the property value */ +LIST * property_set_contains_features( FRAME * frame, int flags ) +{ + OBJECT * varname = object_new( "self.raw" ); + LIST * props = var_get( frame->module, varname ); + LIST * features = lol_get( frame->args, 0 ); + LISTITER features_iter = list_begin( features ); + LISTITER features_end = list_end( features ) ; + object_free( varname ); + + for ( ; features_iter != features_end; ++features_iter ) + { + const char * name = object_str( list_item( features_iter ) ); + size_t name_len = strlen( name ); + LISTITER begin, end; + /* Assumes random access */ + begin = list_begin( props ), end = list_end( props ); + + while ( 1 ) + { + ptrdiff_t diff = (end - begin); + LISTITER mid = begin + diff / 2; + int res; + if ( diff == 0 ) + { + /* The feature is missing */ + return L0; + } + res = strncmp( object_str( list_item( mid ) ), name, name_len ); + if ( res < 0 ) + { + begin = mid + 1; + } + else if ( res > 0 ) + { + end = mid; + } + else /* We've found the property */ + { + break; + } + } + } + return list_new( object_copy( constant_true ) ); +} + +void init_property_set() +{ + { + char const * args[] = { "raw-properties", "*", 0 }; + declare_native_rule( "property-set", "create", args, property_set_create, 1 ); + } + { + char const * args[] = { "feature", 0 }; + declare_native_rule( "class@property-set", "get", args, property_set_get, 1 ); + } + { + char const * args[] = { "features", "*", 0 }; + declare_native_rule( "class@property-set", "contains-features", args, property_set_contains_features, 1 ); + } + ps_map_init( &all_property_sets ); +} + +void property_set_done() +{ + ps_map_destroy( &all_property_sets ); +} diff --git a/src/boost/tools/build/src/engine/modules/readme.txt b/src/boost/tools/build/src/engine/modules/readme.txt new file mode 100644 index 000000000..2a08ba10e --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/readme.txt @@ -0,0 +1,3 @@ + +This directory constains sources which declare native +rules for B2 modules. \ No newline at end of file diff --git a/src/boost/tools/build/src/engine/modules/regex.cpp b/src/boost/tools/build/src/engine/modules/regex.cpp new file mode 100644 index 000000000..95fe19d14 --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/regex.cpp @@ -0,0 +1,233 @@ +/* + * Copyright 2003. Vladimir Prus + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "../mem.h" +#include "../native.h" +#include "../jam_strings.h" +#include "../subst.h" + +/* +rule split ( string separator ) +{ + local result ; + local s = $(string) ; + + local match = 1 ; + while $(match) + { + match = [ MATCH ^(.*)($(separator))(.*) : $(s) ] ; + if $(match) + { + match += "" ; # in case 3rd item was empty - works around MATCH bug + result = $(match[3]) $(result) ; + s = $(match[1]) ; + } + } + return $(s) $(result) ; +} +*/ + +LIST * regex_split( FRAME * frame, int flags ) +{ + LIST * args = lol_get( frame->args, 0 ); + OBJECT * s; + OBJECT * separator; + regexp * re; + const char * pos, * prev; + LIST * result = L0; + LISTITER iter = list_begin( args ); + s = list_item( iter ); + separator = list_item( list_next( iter ) ); + + re = regex_compile( separator ); + + prev = pos = object_str( s ); + while ( regexec( re, pos ) ) + { + result = list_push_back( result, object_new_range( prev, int32_t(re->startp[ 0 ] - prev) ) ); + prev = re->endp[ 0 ]; + /* Handle empty matches */ + if ( *pos == '\0' ) + break; + else if ( pos == re->endp[ 0 ] ) + pos++; + else + pos = re->endp[ 0 ]; + } + + result = list_push_back( result, object_new( pos ) ); + + return result; +} + +/* +rule replace ( + string # The string to modify. + match # The characters to replace. + replacement # The string to replace with. + ) +{ + local result = "" ; + local parts = 1 ; + while $(parts) + { + parts = [ MATCH ^(.*)($(match))(.*) : $(string) ] ; + if $(parts) + { + parts += "" ; + result = "$(replacement)$(parts[3])$(result)" ; + string = $(parts[1]) ; + } + } + string ?= "" ; + result = "$(string)$(result)" ; + return $(result) ; +} +*/ + +LIST * regex_replace( FRAME * frame, int flags ) +{ + LIST * args = lol_get( frame->args, 0 ); + OBJECT * s; + OBJECT * match; + OBJECT * replacement; + regexp * re; + const char * pos; + string buf[ 1 ]; + LIST * result; + LISTITER iter = list_begin( args ); + s = list_item( iter ); + iter = list_next( iter ); + match = list_item( iter ); + iter = list_next( iter ); + replacement = list_item(iter ); + + re = regex_compile( match ); + + string_new( buf ); + + pos = object_str( s ); + while ( regexec( re, pos ) ) + { + string_append_range( buf, pos, re->startp[ 0 ] ); + string_append( buf, object_str( replacement ) ); + /* Handle empty matches */ + if ( *pos == '\0' ) + break; + else if ( pos == re->endp[ 0 ] ) + string_push_back( buf, *pos++ ); + else + pos = re->endp[ 0 ]; + } + string_append( buf, pos ); + + result = list_new( object_new( buf->value ) ); + + string_free( buf ); + + return result; +} + +/* +rule transform ( list * : pattern : indices * ) +{ + indices ?= 1 ; + local result ; + for local e in $(list) + { + local m = [ MATCH $(pattern) : $(e) ] ; + if $(m) + { + result += $(m[$(indices)]) ; + } + } + return $(result) ; +} +*/ + +LIST * regex_transform( FRAME * frame, int flags ) +{ + LIST * const l = lol_get( frame->args, 0 ); + LIST * const pattern = lol_get( frame->args, 1 ); + LIST * const indices_list = lol_get( frame->args, 2 ); + int * indices = 0; + int size; + LIST * result = L0; + + if ( !list_empty( indices_list ) ) + { + int * p; + LISTITER iter = list_begin( indices_list ); + LISTITER const end = list_end( indices_list ); + size = list_length( indices_list ); + indices = (int *)BJAM_MALLOC( size * sizeof( int ) ); + for ( p = indices; iter != end; iter = list_next( iter ) ) + *p++ = atoi( object_str( list_item( iter ) ) ); + } + else + { + size = 1; + indices = (int *)BJAM_MALLOC( sizeof( int ) ); + *indices = 1; + } + + { + /* Result is cached and intentionally never freed */ + regexp * const re = regex_compile( list_front( pattern ) ); + + LISTITER iter = list_begin( l ); + LISTITER const end = list_end( l ); + + string buf[ 1 ]; + string_new( buf ); + + for ( ; iter != end; iter = list_next( iter ) ) + { + if ( regexec( re, object_str( list_item( iter ) ) ) ) + { + int i = 0; + for ( ; i < size; ++i ) + { + int const index = indices[ i ]; + /* Skip empty submatches. Not sure it is right in all cases, + * but surely is right for the case for which this routine + * is optimized -- header scanning. + */ + if ( re->startp[ index ] != re->endp[ index ] ) + { + string_append_range( buf, re->startp[ index ], + re->endp[ index ] ); + result = list_push_back( result, object_new( buf->value + ) ); + string_truncate( buf, 0 ); + } + } + } + } + string_free( buf ); + } + + BJAM_FREE( indices ); + return result; +} + + +void init_regex() +{ + { + char const * args[] = { "string", "separator", 0 }; + declare_native_rule( "regex", "split", args, regex_split, 1 ); + } + { + char const * args[] = { "string", "match", "replacement", 0 }; + declare_native_rule( "regex", "replace", args, regex_replace, 1 ); + } + { + char const * args[] = { "list", "*", ":", "pattern", ":", "indices", "*", 0 }; + declare_native_rule( "regex", "transform", args, regex_transform, 2 ); + } +} diff --git a/src/boost/tools/build/src/engine/modules/sequence.cpp b/src/boost/tools/build/src/engine/modules/sequence.cpp new file mode 100644 index 000000000..acf20b827 --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/sequence.cpp @@ -0,0 +1,96 @@ +/* + * Copyright Vladimir Prus 2003. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "../native.h" +#include "../object.h" +#include "../lists.h" +#include "../compile.h" + +#include + + +#ifndef max +# define max(a,b) ((a)>(b)?(a):(b)) +#endif + + +LIST * sequence_select_highest_ranked( FRAME * frame, int flags ) +{ + /* Returns all of 'elements' for which corresponding element in parallel */ + /* list 'rank' is equal to the maximum value in 'rank'. */ + + LIST * const elements = lol_get( frame->args, 0 ); + LIST * const rank = lol_get( frame->args, 1 ); + + LIST * result = L0; + int highest_rank = -1; + + { + LISTITER iter = list_begin( rank ); + LISTITER const end = list_end( rank ); + for ( ; iter != end; iter = list_next( iter ) ) + { + int const current = atoi( object_str( list_item( iter ) ) ); + highest_rank = max( highest_rank, current ); + } + } + + { + LISTITER iter = list_begin( rank ); + LISTITER const end = list_end( rank ); + LISTITER elements_iter = list_begin( elements ); + for ( ; iter != end; iter = list_next( iter ), elements_iter = + list_next( elements_iter ) ) + if ( atoi( object_str( list_item( iter ) ) ) == highest_rank ) + result = list_push_back( result, object_copy( list_item( + elements_iter ) ) ); + } + + return result; +} + +LIST * sequence_transform( FRAME * frame, int flags ) +{ + LIST * function = lol_get( frame->args, 0 ); + LIST * sequence = lol_get( frame->args, 1 ); + LIST * result = L0; + OBJECT * function_name = list_front( function ); + LISTITER args_begin = list_next( list_begin( function ) ), args_end = list_end( function ); + LISTITER iter = list_begin( sequence ), end = list_end( sequence ); + RULE * rule = bindrule( function_name, frame->prev->module ); + + for ( ; iter != end; iter = list_next( iter ) ) + { + FRAME inner[ 1 ]; + + frame_init( inner ); + inner->prev = frame; + inner->prev_user = frame->prev_user; + inner->module = frame->prev->module; + + lol_add( inner->args, list_push_back( list_copy_range( function, args_begin, args_end ), object_copy( list_item( iter ) ) ) ); + result = list_append( result, evaluate_rule( rule, function_name, inner ) ); + + frame_free( inner ); + } + + return result; +} + +void init_sequence() +{ + { + char const * args[] = { "elements", "*", ":", "rank", "*", 0 }; + declare_native_rule( "sequence", "select-highest-ranked", args, + sequence_select_highest_ranked, 1 ); + } + { + char const * args[] = { "function", "+", ":", "sequence", "*", 0 }; + declare_native_rule( "sequence", "transform", args, + sequence_transform, 1 ); + } +} diff --git a/src/boost/tools/build/src/engine/modules/set.cpp b/src/boost/tools/build/src/engine/modules/set.cpp new file mode 100644 index 000000000..325f81220 --- /dev/null +++ b/src/boost/tools/build/src/engine/modules/set.cpp @@ -0,0 +1,43 @@ +/* Copyright Vladimir Prus 2003. Distributed under the Boost */ +/* Software License, Version 1.0. (See accompanying */ +/* file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) */ + +#include "../native.h" +#include "../object.h" + +/* + local result = ; + local element ; + for element in $(B) + { + if ! ( $(element) in $(A) ) + { + result += $(element) ; + } + } + return $(result) ; +*/ +LIST *set_difference( FRAME *frame, int flags ) +{ + + LIST* b = lol_get( frame->args, 0 ); + LIST* a = lol_get( frame->args, 1 ); + + LIST* result = L0; + LISTITER iter = list_begin( b ), end = list_end( b ); + for( ; iter != end; iter = list_next( iter ) ) + { + if (!list_in(a, list_item(iter))) + result = list_push_back(result, object_copy(list_item(iter))); + } + return result; +} + +void init_set() +{ + { + const char* args[] = { "B", "*", ":", "A", "*", 0 }; + declare_native_rule("set", "difference", args, set_difference, 1); + } + +} diff --git a/src/boost/tools/build/src/engine/native.cpp b/src/boost/tools/build/src/engine/native.cpp new file mode 100644 index 000000000..157d19185 --- /dev/null +++ b/src/boost/tools/build/src/engine/native.cpp @@ -0,0 +1,34 @@ +/* Copyright 2003. Vladimir Prus + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "native.h" + +#include "hash.h" + +#include + + +void declare_native_rule( char const * module, char const * rule, + char const * * args, LIST * (*f)( FRAME *, int32_t ), int32_t version ) +{ + OBJECT * const module_obj = module ? object_new( module ) : 0 ; + module_t * m = bindmodule( module_obj ); + if ( module_obj ) + object_free( module_obj ); + if ( !m->native_rules ) + m->native_rules = hashinit( sizeof( native_rule_t ), "native rules" ); + + { + OBJECT * const name = object_new( rule ); + int32_t found; + native_rule_t * const np = (native_rule_t *)hash_insert( + m->native_rules, name, &found ); + np->name = name; + assert( !found ); + np->procedure = function_builtin( f, 0, args ); + np->version = version; + } +} diff --git a/src/boost/tools/build/src/engine/native.h b/src/boost/tools/build/src/engine/native.h new file mode 100644 index 000000000..d31c48a0a --- /dev/null +++ b/src/boost/tools/build/src/engine/native.h @@ -0,0 +1,35 @@ +/* Copyright 2003. David Abrahams + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef NATIVE_H_VP_2003_12_09 +#define NATIVE_H_VP_2003_12_09 + +#include "config.h" +#include "function.h" +#include "frames.h" +#include "lists.h" +#include "object.h" + +typedef struct native_rule_t +{ + OBJECT * name; + FUNCTION * procedure; + + /* Version of the interface that the native rule provides. It is possible + * that we want to change the set parameter for existing native rule. In + * that case, version number should be incremented so B2 can check + * for the version it relies on. + * + * Versions are numbered from 1. + */ + int32_t version; +} native_rule_t; +/* MSVC debugger gets confused unless the native_rule_t typedef is provided. */ + +void declare_native_rule( char const * module, char const * rule, + char const * * args, LIST * (*f)( FRAME *, int32_t ), int32_t version ); + +#endif diff --git a/src/boost/tools/build/src/engine/object.cpp b/src/boost/tools/build/src/engine/object.cpp new file mode 100644 index 000000000..fc625e6f5 --- /dev/null +++ b/src/boost/tools/build/src/engine/object.cpp @@ -0,0 +1,404 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * Copyright 2011 Steven Watanabe + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * object.c - object manipulation routines + * + * External functions: + * object_new() - create an object from a string + * object_new_range() - create an object from a string of given length + * object_copy() - return a copy of an object + * object_free() - free an object + * object_str() - get the string value of an object + * object_done() - free string tables + * + * This implementation builds a hash table of all strings, so that multiple + * calls of object_new() on the same string allocate memory for the string once. + * Strings are never actually freed. + */ + +#include "jam.h" +#include "object.h" +#include "output.h" + +#include +#include +#include + + +#define OBJECT_MAGIC 0xa762e0e3u + +#ifndef object_copy + +struct hash_header +{ +#ifndef NDEBUG + unsigned int magic; +#endif + unsigned int hash; + struct hash_item * next; +}; + +#endif + +struct hash_item +{ + struct hash_header header; + char data[ 1 ]; +}; + +#define ALLOC_ALIGNMENT (sizeof(struct hash_item) - sizeof(struct hash_header)) + +typedef struct string_set +{ + int32_t num; + int32_t size; + struct hash_item * * data; +} string_set; + +#if !defined(BJAM_NO_MEM_CACHE) || (BJAM_NO_MEM_CACHE == 0) +static string_set strhash; +#endif +static int32_t strtotal = 0; +static int32_t strcount_in = 0; +static int32_t strcount_out = 0; + + +/* + * Immortal string allocator implementation speeds string allocation and cuts + * down on internal fragmentation. + */ + +#define STRING_BLOCK 4096 +typedef struct strblock +{ + struct strblock * next; + char data[ STRING_BLOCK ]; +} strblock; + +static strblock * strblock_chain = 0; + +#if !defined(BJAM_NO_MEM_CACHE) || (BJAM_NO_MEM_CACHE == 0) +/* Storage remaining in the current strblock */ +static char * storage_start = 0; +static char * storage_finish = 0; + + +/* + * allocate() - Allocate n bytes of immortal string storage. + */ + +static char * allocate( int32_t n ) +{ +#ifdef BJAM_NEWSTR_NO_ALLOCATE + return (char *)BJAM_MALLOC( n ); +#else + /* See if we can grab storage from an existing block. */ + int32_t remaining = int32_t(storage_finish - storage_start); + n = ( ( n + ALLOC_ALIGNMENT - 1 ) / ALLOC_ALIGNMENT ) * ALLOC_ALIGNMENT; + if ( remaining >= n ) + { + char * result = storage_start; + storage_start += n; + return result; + } + else /* Must allocate a new block. */ + { + strblock * new_block; + int32_t nalloc = n; + if ( nalloc < STRING_BLOCK ) + nalloc = STRING_BLOCK; + + /* Allocate a new block and link into the chain. */ + new_block = (strblock *)BJAM_MALLOC( offsetof( strblock, data[ 0 ] ) + + size_t(nalloc) * sizeof( new_block->data[ 0 ] ) ); + if ( new_block == 0 ) + return 0; + new_block->next = strblock_chain; + strblock_chain = new_block; + + /* Take future allocations out of the larger remaining space. */ + if ( remaining < nalloc - n ) + { + storage_start = new_block->data + n; + storage_finish = new_block->data + nalloc; + } + return new_block->data; + } +#endif +} +#endif + + +static unsigned int hash_keyval( char const * key, int32_t size ) +{ + unsigned int const magic = 2147059363; + unsigned int hash = 0; + + unsigned int i; + for ( i = 0; i < size / sizeof( unsigned int ); ++i ) + { + unsigned int val; + memcpy( &val, key, sizeof( unsigned int ) ); + hash = hash * magic + val; + key += sizeof( unsigned int ); + } + + { + unsigned int val = 0; + memcpy( &val, key, size % sizeof( unsigned int ) ); + hash = hash * magic + val; + } + + return hash + ( hash >> 17 ); +} + + +#if !defined(BJAM_NO_MEM_CACHE) || (BJAM_NO_MEM_CACHE == 0) +static void string_set_init( string_set * set ) +{ + set->size = 0; + set->num = 4; + set->data = (struct hash_item * *)BJAM_MALLOC( set->num * sizeof( struct hash_item * ) ); + memset( set->data, 0, set->num * sizeof( struct hash_item * ) ); +} + + +static void string_set_done( string_set * set ) +{ + BJAM_FREE( set->data ); +} + + +static void string_set_resize( string_set * set ) +{ + string_set new_set; + new_set.num = set->num * 2; + new_set.size = set->size; + new_set.data = (struct hash_item * *)BJAM_MALLOC( sizeof( struct hash_item * + ) * new_set.num ); + memset( new_set.data, 0, sizeof( struct hash_item * ) * new_set.num ); + for ( int32_t i = 0; i < set->num; ++i ) + { + while ( set->data[ i ] ) + { + struct hash_item * temp = set->data[ i ]; + unsigned pos = temp->header.hash % new_set.num; + set->data[ i ] = temp->header.next; + temp->header.next = new_set.data[ pos ]; + new_set.data[ pos ] = temp; + } + } + BJAM_FREE( set->data ); + *set = new_set; +} + + +static char const * string_set_insert( string_set * set, char const * string, + int32_t const size ) +{ + unsigned hash = hash_keyval( string, size ); + unsigned pos = hash % set->num; + + struct hash_item * result; + + for ( result = set->data[ pos ]; result; result = result->header.next ) + if ( !strncmp( result->data, string, size ) && !result->data[ size ] ) + return result->data; + + if ( set->size >= set->num ) + { + string_set_resize( set ); + pos = hash % set->num; + } + + result = (struct hash_item *)allocate( sizeof( struct hash_header ) + size + + 1 ); + result->header.hash = hash; + result->header.next = set->data[ pos ]; +#ifndef NDEBUG + result->header.magic = OBJECT_MAGIC; +#endif + memcpy( result->data, string, size ); + result->data[ size ] = '\0'; + assert( hash_keyval( result->data, size ) == result->header.hash ); + set->data[ pos ] = result; + strtotal += size + 1; + ++set->size; + + return result->data; +} +#endif + + +/* + * object_new_range() - create an object from a string of given length + */ + +OBJECT * object_new_range( char const * const string, int32_t size ) +{ + ++strcount_in; + +#ifdef BJAM_NO_MEM_CACHE + { + struct hash_item * const m = (struct hash_item *)BJAM_MALLOC( sizeof( + struct hash_header ) + size + 1 ); + strtotal += size + 1; + memcpy( m->data, string, size ); + m->data[ size ] = '\0'; +#ifndef NDEBUG + m->header.magic = OBJECT_MAGIC; +#endif + return (OBJECT *)m->data; + } +#else + if ( !strhash.data ) + string_set_init( &strhash ); + return (OBJECT *)string_set_insert( &strhash, string, size ); +#endif +} + + +/* + * object_new() - create an object from a string + */ + +OBJECT * object_new( char const * const string ) +{ + return object_new_range( string, int32_t(strlen( string )) ); +} + + +#ifndef object_copy + +static struct hash_item * object_get_item( OBJECT * obj ) +{ + return (struct hash_item *)( (char *)obj - offsetof( struct hash_item, data + ) ); +} + + +static void object_validate( OBJECT * obj ) +{ + assert( obj ); + assert( object_get_item( obj )->header.magic == OBJECT_MAGIC ); +} + + +/* + * object_copy() - return a copy of an object + */ + +OBJECT * object_copy( OBJECT * obj ) +{ + object_validate( obj ); +#ifdef BJAM_NO_MEM_CACHE + return object_new( object_str( obj ) ); +#else + ++strcount_in; + return obj; +#endif +} + + +/* + * object_free() - free an object + */ + +void object_free( OBJECT * obj ) +{ + object_validate( obj ); +#ifdef BJAM_NO_MEM_CACHE + BJAM_FREE( object_get_item( obj ) ); +#endif + ++strcount_out; +} + + +/* + * object_str() - return the OBJECT's internal C string + */ + +char const * object_str( OBJECT * obj ) +{ + object_validate( obj ); + return (char const *)obj; +} + + +/* + * object_equal() - compare two objects + */ + +int object_equal( OBJECT * lhs, OBJECT * rhs ) +{ + object_validate( lhs ); + object_validate( rhs ); +#ifdef BJAM_NO_MEM_CACHE + return !strcmp( object_str( lhs ), object_str( rhs ) ); +#else + assert( ( lhs == rhs ) == !strcmp( object_str( lhs ), object_str( rhs ) ) ); + return lhs == rhs; +#endif +} + + +/* + * object_hash() - returns the hash value of an object + */ + +unsigned int object_hash( OBJECT * obj ) +{ + object_validate( obj ); +#ifdef BJAM_NO_MEM_CACHE + return hash_keyval( object_str( obj ), strlen( object_str( obj ) ) ); +#else + return object_get_item( obj )->header.hash; +#endif +} + +#endif + +/* + * object_done() - free string tables. + */ + +void object_done() +{ +#ifdef BJAM_NEWSTR_NO_ALLOCATE + unsigned i; + for ( i = 0; i < strhash.num; ++i ) + { + while ( strhash.data[ i ] ) + { + struct hash_item * item = strhash.data[ i ]; + strhash.data[ i ] = item->header.next; + BJAM_FREE( item ); + } + } +#else + /* Reclaim string blocks. */ + while ( strblock_chain ) + { + strblock * const n = strblock_chain->next; + BJAM_FREE( strblock_chain ); + strblock_chain = n; + } +#endif + +#if !defined(BJAM_NO_MEM_CACHE) || (BJAM_NO_MEM_CACHE == 0) + string_set_done( &strhash ); +#endif + + if ( DEBUG_MEM ) + { + out_printf( "%dK in strings\n", strtotal / 1024 ); + if ( strcount_in != strcount_out ) + out_printf( "--- %d strings of %d dangling\n", strcount_in - + strcount_out, strcount_in ); + } +} diff --git a/src/boost/tools/build/src/engine/object.h b/src/boost/tools/build/src/engine/object.h new file mode 100644 index 000000000..53df10892 --- /dev/null +++ b/src/boost/tools/build/src/engine/object.h @@ -0,0 +1,80 @@ +/* + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2011 Steven Watanabe + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * object.h - object manipulation routines + */ + +#ifndef BOOST_JAM_OBJECT_H +#define BOOST_JAM_OBJECT_H + +#include "config.h" +#include +#include + +typedef struct _object OBJECT; + +typedef OBJECT * object_ptr; + +OBJECT * object_new( char const * const ); +OBJECT * object_new_range( char const * const, int32_t size ); +void object_done( void ); + +#if defined(NDEBUG) && !defined(BJAM_NO_MEM_CACHE) + +struct hash_header +{ + unsigned int hash; + struct hash_item * next; +}; + +#define object_str( obj ) ((char const *)(obj)) +#define object_copy( obj ) (obj) +#define object_free( obj ) ((void)0) +#define object_equal( lhs, rhs ) ((lhs) == (rhs)) +#define object_hash( obj ) (((struct hash_header *)((char *)(obj) - sizeof(struct hash_header)))->hash) + +#else + +char const * object_str ( OBJECT * ); +OBJECT * object_copy ( OBJECT * ); +void object_free ( OBJECT * ); +int object_equal( OBJECT *, OBJECT * ); +unsigned int object_hash ( OBJECT * ); + +#endif + +namespace b2 { namespace jam { + + struct object + { + inline object(const object &o) + : obj(object_copy(o.obj)) {} + + inline explicit object(OBJECT *o) + : obj(object_copy(o)) {} + inline explicit object(const char * val) + : obj(object_new(val)) {} + inline explicit object(const std::string &val) + : obj(object_new(val.c_str())) {} + + inline ~object() { if (obj) object_free(obj); } + inline OBJECT * release() { OBJECT *r = obj; obj = nullptr; return r; } + + inline operator OBJECT*() const { return obj; } + inline operator std::string() const { return object_str(obj); } + + inline bool operator==(OBJECT *o) const { return std::strcmp(object_str(obj), object_str(o)) == 0; } + + private: + + OBJECT * obj = nullptr; + }; + +}} + +#endif diff --git a/src/boost/tools/build/src/engine/option.cpp b/src/boost/tools/build/src/engine/option.cpp new file mode 100644 index 000000000..fa9246b02 --- /dev/null +++ b/src/boost/tools/build/src/engine/option.cpp @@ -0,0 +1,94 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +# include "jam.h" +# include "option.h" + +/* + * option.c - command line option processing + * + * {o >o + * \<>) "Process command line options as defined in . + * Return the number of argv[] elements used up by options, + * or -1 if an invalid option flag was given or an argument + * was supplied for an option that does not require one." + */ + +int getoptions( int argc, char * * argv, const char * opts, bjam_option * optv ) +{ + int i; + int optc = N_OPTS; + + memset( (char *)optv, '\0', sizeof( *optv ) * N_OPTS ); + + for ( i = 0; i < argc; ++i ) + { + char *arg; + + if ( ( argv[ i ][ 0 ] != '-' ) || + ( ( argv[ i ][ 1 ] != '-' ) && !isalpha( argv[ i ][ 1 ] ) ) ) + continue; + + if ( !optc-- ) + { + printf( "too many options (%d max)\n", N_OPTS ); + return -1; + } + + for ( arg = &argv[ i ][ 1 ]; *arg; ++arg ) + { + const char * f; + + for ( f = opts; *f; ++f ) + if ( *f == *arg ) + break; + + if ( !*f ) + { + printf( "Invalid option: -%c\n", *arg ); + return -1; + } + + optv->flag = *f; + + if ( f[ 1 ] != ':' ) + { + optv++->val = (char *)"true"; + } + else if ( arg[ 1 ] ) + { + optv++->val = &arg[1]; + break; + } + else if ( ++i < argc ) + { + optv++->val = argv[ i ]; + break; + } + else + { + printf( "option: -%c needs argument\n", *f ); + return -1; + } + } + } + + return i; +} + + +/* + * Name: getoptval() - find an option given its character. + */ + +char * getoptval( bjam_option * optv, char opt, int subopt ) +{ + int i; + for ( i = 0; i < N_OPTS; ++i, ++optv ) + if ( ( optv->flag == opt ) && !subopt-- ) + return optv->val; + return 0; +} diff --git a/src/boost/tools/build/src/engine/option.h b/src/boost/tools/build/src/engine/option.h new file mode 100644 index 000000000..df3063105 --- /dev/null +++ b/src/boost/tools/build/src/engine/option.h @@ -0,0 +1,25 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * option.h - command line option processing + * + * {o >o + * \ -) "Command line option." + */ + +#include "config.h" + +typedef struct bjam_option +{ + char flag; /* filled in by getoption() */ + char * val; /* set to random address if true */ +} bjam_option; + +#define N_OPTS 256 + +int getoptions( int argc, char * * argv, const char * opts, bjam_option * optv ); +char * getoptval( bjam_option * optv, char opt, int subopt ); diff --git a/src/boost/tools/build/src/engine/output.cpp b/src/boost/tools/build/src/engine/output.cpp new file mode 100644 index 000000000..196082c78 --- /dev/null +++ b/src/boost/tools/build/src/engine/output.cpp @@ -0,0 +1,192 @@ +/* + Copyright 2007 Rene Rivera + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#include "jam.h" +#include "output.h" + +#include +#include +#include + +#include +#include + + +#define bjam_out (stdout) +#define bjam_err (stderr) + +static void out_( char const * data, FILE * const io ) +{ + while ( *data ) + { + size_t const len = strcspn( data, "\r" ); + data += fwrite( data, 1, len, io ); + if ( *data == '\r' ) ++data; + } +} + + +void out_flush() +{ + fflush( bjam_out ); + if ( globs.out ) fflush( globs.out ); +} +void err_flush() +{ + fflush( bjam_err ); + if ( globs.out ) fflush( globs.out ); +} +void out_puts(char const * const s) +{ + fputs( s, bjam_out ); + if ( globs.out ) fputs( s, globs.out ); +} +void err_puts(char const * const s) +{ + fputs( s, bjam_err ); + if ( globs.out ) fputs( s, globs.out ); +} +void out_putc(const char c) +{ + fputc( c, bjam_out ); + if ( globs.out ) fputc( c, globs.out ); +} +void err_putc(const char c) +{ + fputc( c, bjam_err ); + if ( globs.out ) fputc( c, globs.out ); +} +void out_data(char const * const s) +{ + out_( s, bjam_out ); + if ( globs.out ) out_( s, globs.out ); +} +void err_data(char const * const s) +{ + out_( s, bjam_err ); + if ( globs.out ) out_( s, globs.out ); +} +void out_printf(char const * const f, ...) +{ + { + va_list args; + va_start( args, f ); + vfprintf( bjam_out, f, args ); + va_end( args ); + } + if ( globs.out ) + { + va_list args; + va_start( args, f ); + vfprintf( globs.out, f, args ); + va_end( args ); + } +} +void err_printf(char const * const f, ...) +{ + { + va_list args; + va_start( args, f ); + vfprintf( bjam_err, f, args ); + va_end( args ); + } + if ( globs.out ) + { + va_list args; + va_start( args, f ); + vfprintf( globs.out, f, args ); + va_end( args ); + } +} + + +void out_action +( + char const * const action, + char const * const target, + char const * const command, + char const * const out_d, + char const * const err_d, + int const exit_reason +) +{ + /* Print out the action + target line, if the action is quiet the action + * should be null. + */ + if ( action ) + out_printf( "%s %s\n", action, target ); + + /* Print out the command executed if given -d+2. */ + if ( DEBUG_EXEC ) + { + out_puts( command ); + out_putc( '\n' ); + } + + /* Print out the command output, if requested, or if the program failed, but + * only output for non-quiet actions. + */ + if ( action || exit_reason != EXIT_OK ) + { + if ( out_d && + ( ( globs.pipe_action & 1 /* STDOUT_FILENO */ ) || + ( globs.pipe_action == 0 ) ) ) + out_data( out_d ); + if ( err_d && ( globs.pipe_action & 2 /* STDERR_FILENO */ ) ) + err_data( err_d ); + } +} + + +void errno_puts(char const * const s) +{ + const auto e = errno; + err_printf("[errno %d] %s (%s)\n", e, s, strerror(e)); +} + + +void errno_printf(char const * const f, ...) +{ + const auto e = errno; + std::string s = "[errno "+std::to_string(e)+"] "; + { + va_list args; + va_start( args, f ); + int l = vsnprintf( nullptr, 0, f, args ); + va_end( args ); + va_start( args, f ); + std::unique_ptr r(new char[l+1]); + vsnprintf( r.get(), l+1, f, args ); + va_end( args ); + s += r.get(); + } + s += " ("; + s += strerror(e); + s += ")"; + err_puts(s.c_str()); +} + + +OBJECT * outf_int( int const value ) +{ + char buffer[ 50 ]; + sprintf( buffer, "%i", value ); + return object_new( buffer ); +} + + +OBJECT * outf_double( double const value ) +{ + char buffer[ 50 ]; + sprintf( buffer, "%f", value ); + return object_new( buffer ); +} + + +OBJECT * outf_time( timestamp const * const time ) +{ + return object_new( timestamp_str( time ) ); +} diff --git a/src/boost/tools/build/src/engine/output.h b/src/boost/tools/build/src/engine/output.h new file mode 100644 index 000000000..b81a8d5c4 --- /dev/null +++ b/src/boost/tools/build/src/engine/output.h @@ -0,0 +1,46 @@ +/* + Copyright 2007 Rene Rivera + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#ifndef BJAM_OUTPUT_H +#define BJAM_OUTPUT_H + +#include "config.h" +#include "object.h" +#include "timestamp.h" + +#define EXIT_OK 0 +#define EXIT_FAIL 1 +#define EXIT_TIMEOUT 2 + +void out_action( + char const * const action, + char const * const target, + char const * const command, + char const * const out_data, + char const * const err_data, + int const exit_reason +); + +void out_flush(); +void err_flush(); +void out_puts(char const * const s); +void err_puts(char const * const s); +void out_putc(const char c); +void err_putc(const char c); +void out_data(char const * const s); +void err_data(char const * const s); +void out_printf(char const * const f, ...); +void err_printf(char const * const f, ...); + +// Output current errno value & description along with given string. +void errno_puts(char const * const s); +void errno_printf(char const * const f, ...); + +OBJECT * outf_int( int const value ); +OBJECT * outf_double( double const value ); +OBJECT * outf_time( timestamp const * const value ); + +#endif diff --git a/src/boost/tools/build/src/engine/parse.cpp b/src/boost/tools/build/src/engine/parse.cpp new file mode 100644 index 000000000..d1588ab75 --- /dev/null +++ b/src/boost/tools/build/src/engine/parse.cpp @@ -0,0 +1,147 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "jam.h" +#include "lists.h" +#include "parse.h" +#include "scan.h" +#include "object.h" +#include "modules.h" +#include "frames.h" +#include "function.h" +#include "mem.h" + +/* + * parse.c - make and destroy parse trees as driven by the parser + * + * 09/07/00 (seiwald) - ref count on PARSE to avoid freeing when used, + * as per Matt Armstrong. + * 09/11/00 (seiwald) - structure reworked to reflect that (*func)() + * returns a LIST *. + */ + +static PARSE * yypsave; + +static void parse_impl( FRAME * frame ) +{ + + /* Now parse each block of rules and execute it. Execute it outside of the + * parser so that recursive calls to yyrun() work (no recursive yyparse's). + */ + + for ( ; ; ) + { + PARSE * p; + + /* Filled by yyparse() calling parse_save(). */ + yypsave = 0; + + /* If parse error or empty parse, outta here. */ + if ( yyparse() || !( p = yypsave ) ) + break; + + /* Run the parse tree. */ + auto func = b2::jam::make_unique_bare_jptr( function_compile( p ), function_free ); + parse_free( p ); + list_free( function_run( func.get(), frame, stack_global() ) ); + } + + yyfdone(); +} + + +void parse_file( OBJECT * f, FRAME * frame ) +{ + /* Suspend scan of current file and push this new file in the stream. */ + yyfparse( f ); + + parse_impl( frame ); +} + + +void parse_string( OBJECT * name, const char * * lines, FRAME * frame ) +{ + yysparse( name, lines ); + parse_impl( frame ); +} + + +void parse_save( PARSE * p ) +{ + yypsave = p; +} + + +PARSE * parse_make( + int type, + PARSE * left, + PARSE * right, + PARSE * third, + OBJECT * string, + OBJECT * string1, + int num ) +{ + PARSE * p = (PARSE *)BJAM_MALLOC( sizeof( PARSE ) ); + + p->type = type; + p->left = left; + p->right = right; + p->third = third; + p->string = string; + p->string1 = string1; + p->num = num; + p->refs = 1; + p->rulename = 0; + + if ( left ) + { + p->file = object_copy( left->file ); + p->line = left->line; + } + else + { + yyinput_last_read_token( &p->file, &p->line ); + p->file = object_copy( p->file ); + } + + return p; +} + + +void parse_refer( PARSE * p ) +{ + ++p->refs; +} + + +void parse_free( PARSE * p ) +{ + if ( --p->refs ) + return; + + if ( p->string ) + object_free( p->string ); + if ( p->string1 ) + object_free( p->string1 ); + if ( p->left ) + parse_free( p->left ); + if ( p->right ) + parse_free( p->right ); + if ( p->third ) + parse_free( p->third ); + if ( p->rulename ) + object_free( p->rulename ); + if ( p->file ) + object_free( p->file ); + + BJAM_FREE( (char *)p ); +} diff --git a/src/boost/tools/build/src/engine/parse.h b/src/boost/tools/build/src/engine/parse.h new file mode 100644 index 000000000..c99782e79 --- /dev/null +++ b/src/boost/tools/build/src/engine/parse.h @@ -0,0 +1,81 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * parse.h - make and destroy parse trees as driven by the parser. + */ + +#ifndef PARSE_DWA20011020_H +#define PARSE_DWA20011020_H + +#include "config.h" +#include "frames.h" +#include "lists.h" +#include "modules.h" + + +#define PARSE_APPEND 0 +#define PARSE_FOREACH 1 +#define PARSE_IF 2 +#define PARSE_EVAL 3 +#define PARSE_INCLUDE 4 +#define PARSE_LIST 5 +#define PARSE_LOCAL 6 +#define PARSE_MODULE 7 +#define PARSE_CLASS 8 +#define PARSE_NULL 9 +#define PARSE_ON 10 +#define PARSE_RULE 11 +#define PARSE_RULES 12 +#define PARSE_SET 13 +#define PARSE_SETCOMP 14 +#define PARSE_SETEXEC 15 +#define PARSE_SETTINGS 16 +#define PARSE_SWITCH 17 +#define PARSE_WHILE 18 +#define PARSE_RETURN 19 +#define PARSE_BREAK 20 +#define PARSE_CONTINUE 21 + + +/* + * Parse tree node. + */ + +typedef struct _PARSE PARSE; + +struct _PARSE { + int type; + PARSE * left; + PARSE * right; + PARSE * third; + OBJECT * string; + OBJECT * string1; + int num; + int refs; + OBJECT * rulename; + OBJECT * file; + int line; +}; + +void parse_file( OBJECT *, FRAME * ); +void parse_string( OBJECT * name, const char * * lines, FRAME * frame ); +void parse_save( PARSE * ); + +PARSE * parse_make( int type, PARSE * left, PARSE * right, PARSE * third, + OBJECT * string, OBJECT * string1, int num ); + +void parse_refer( PARSE * ); +void parse_free( PARSE * ); +LIST * parse_evaluate( PARSE *, FRAME * ); + +#endif diff --git a/src/boost/tools/build/src/engine/patchlevel.h b/src/boost/tools/build/src/engine/patchlevel.h new file mode 100644 index 000000000..455f7a12d --- /dev/null +++ b/src/boost/tools/build/src/engine/patchlevel.h @@ -0,0 +1,16 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ +/* +This file is ALSO: +Copyright 2018-2022 Rene Rivera +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + + +#define VERSION_MAJOR 4 +#define VERSION_MINOR 8 +#define VERSION_PATCH 2 diff --git a/src/boost/tools/build/src/engine/pathnt.cpp b/src/boost/tools/build/src/engine/pathnt.cpp new file mode 100644 index 000000000..2e23a1617 --- /dev/null +++ b/src/boost/tools/build/src/engine/pathnt.cpp @@ -0,0 +1,413 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * pathnt.c - NT specific path manipulation support + */ + +#include "jam.h" +#ifdef USE_PATHNT + +#include "pathsys.h" +#include "hash.h" + +#define WIN32_LEAN_AND_MEAN +#include + +#ifdef OS_CYGWIN +# include +# include +# ifdef CYGWIN_VERSION_CYGWIN_CONV +# include +# endif +# include +#endif + +#include +#include + + +/* The definition of this in winnt.h is not ANSI-C compatible. */ +#undef INVALID_FILE_ATTRIBUTES +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) + + +typedef struct path_key_entry +{ + OBJECT * path; + OBJECT * key; + int exists; +} path_key_entry; + +static struct hash * path_key_cache; + + +/* + * path_get_process_id_() + */ + +unsigned long path_get_process_id_( void ) +{ + return GetCurrentProcessId(); +} + + +/* + * path_get_temp_path_() + */ + +void path_get_temp_path_( string * buffer ) +{ + DWORD pathLength = GetTempPathA( 0, NULL ); + string_reserve( buffer, pathLength ); + pathLength = GetTempPathA( pathLength, buffer->value ); + buffer->value[ pathLength - 1 ] = '\0'; + buffer->size = pathLength - 1; +} + + +/* + * canonicWindowsPath() - convert a given path into its canonic/long format + * + * Appends the canonic path to the end of the given 'string' object. + * + * FIXME: This function is still work-in-progress as it originally did not + * necessarily return the canonic path format (could return slightly different + * results for certain equivalent path strings) and could accept paths pointing + * to non-existing file system entities as well. + * + * Caches results internally, automatically caching any parent paths it has to + * convert to their canonic format in the process. + * + * Prerequisites: + * - path given in normalized form, i.e. all of its folder separators have + * already been converted into '\\' + * - path_key_cache path/key mapping cache object already initialized + */ + +static int canonicWindowsPath( char const * const path, int32_t path_length, + string * const out ) +{ + char const * last_element; + int32_t saved_size; + char const * p; + int missing_parent; + + /* This is only called via path_key(), which initializes the cache. */ + assert( path_key_cache ); + + if ( !path_length ) + return 1; + + if ( path_length == 1 && path[ 0 ] == '\\' ) + { + string_push_back( out, '\\' ); + return 1; + } + + if ( path[ 1 ] == ':' && + ( path_length == 2 || + ( path_length == 3 && path[ 2 ] == '\\' ) ) ) + { + string_push_back( out, toupper( path[ 0 ] ) ); + string_push_back( out, ':' ); + string_push_back( out, '\\' ); + return 1; + } + + /* Find last '\\'. */ + for ( p = path + path_length - 1; p >= path && *p != '\\'; --p ); + last_element = p + 1; + + /* Special case '\' && 'D:\' - include trailing '\'. */ + if ( p == path || + (p == path + 2 && path[ 1 ] == ':') ) + ++p; + + missing_parent = 0; + + if ( p >= path ) + { + char const * const dir = path; + const int32_t dir_length = int32_t(p - path); + OBJECT * const dir_obj = object_new_range( dir, dir_length ); + int found; + path_key_entry * const result = (path_key_entry *)hash_insert( + path_key_cache, dir_obj, &found ); + if ( !found ) + { + result->path = dir_obj; + if ( canonicWindowsPath( dir, dir_length, out ) ) + result->exists = 1; + else + result->exists = 0; + result->key = object_new( out->value ); + } + else + { + object_free( dir_obj ); + string_append( out, object_str( result->key ) ); + } + if ( !result->exists ) + missing_parent = 1; + } + + if ( out->size && out->value[ out->size - 1 ] != '\\' ) + string_push_back( out, '\\' ); + + saved_size = out->size; + string_append_range( out, last_element, path + path_length ); + + if ( !missing_parent ) + { + char const * const n = last_element; + int32_t n_length = int32_t(path + path_length - n); + if ( !( n_length == 1 && n[ 0 ] == '.' ) + && !( n_length == 2 && n[ 0 ] == '.' && n[ 1 ] == '.' ) ) + { + WIN32_FIND_DATAA fd; + HANDLE const hf = FindFirstFileA( out->value, &fd ); + if ( hf != INVALID_HANDLE_VALUE ) + { + string_truncate( out, saved_size ); + string_append( out, fd.cFileName ); + FindClose( hf ); + return 1; + } + } + else + { + return 1; + } + } + return 0; +} + + +/* + * normalize_path() - 'normalizes' the given path for the path-key mapping + * + * The resulting string has nothing to do with 'normalized paths' as used in + * Boost Jam build scripts and the built-in NORMALIZE_PATH rule. It is intended + * to be used solely as an intermediate step when mapping an arbitrary path to + * its canonical representation. + * + * When choosing the intermediate string the important things are for it to be + * inexpensive to calculate and any two paths having different canonical + * representations also need to have different calculated intermediate string + * representations. Any implemented additional rules serve only to simplify + * constructing the canonical path representation from the calculated + * intermediate string. + * + * Implemented returned path rules: + * - use backslashes as path separators + * - lowercase only (since all Windows file systems are case insensitive) + * - trim trailing path separator except in case of a root path, i.e. 'X:\' + */ + +static void normalize_path( string * path ) +{ + char * s; + for ( s = path->value; s < path->value + path->size; ++s ) + *s = *s == '/' ? '\\' : tolower( *s ); + /* Strip trailing "/". */ + if ( path->size && path->size != 3 && path->value[ path->size - 1 ] == '\\' + ) + string_pop_back( path ); +} + + +static path_key_entry * path_key( OBJECT * const path, + int const known_to_be_canonic ) +{ + path_key_entry * result; + int found; + + if ( !path_key_cache ) + path_key_cache = hashinit( sizeof( path_key_entry ), "path to key" ); + + result = (path_key_entry *)hash_insert( path_key_cache, path, &found ); + if ( !found ) + { + OBJECT * normalized; + int32_t normalized_size; + path_key_entry * nresult; + result->path = path; + { + string buf[ 1 ]; + string_copy( buf, object_str( path ) ); + normalize_path( buf ); + normalized = object_new( buf->value ); + normalized_size = buf->size; + string_free( buf ); + } + nresult = (path_key_entry *)hash_insert( path_key_cache, normalized, + &found ); + if ( !found || nresult == result ) + { + nresult->path = normalized; + if ( known_to_be_canonic ) + { + nresult->key = object_copy( path ); + nresult->exists = 1; + } + else + { + string canonic_path[ 1 ]; + string_new( canonic_path ); + if ( canonicWindowsPath( object_str( normalized ), normalized_size, + canonic_path ) ) + nresult->exists = 1; + else + nresult->exists = 0; + nresult->key = object_new( canonic_path->value ); + string_free( canonic_path ); + } + } + else + object_free( normalized ); + if ( nresult != result ) + { + result->path = object_copy( path ); + result->key = object_copy( nresult->key ); + result->exists = nresult->exists; + } + } + + return result; +} + + +/* + * translate_path_cyg2win() - conversion of a cygwin to a Windows path. + * + * FIXME: skip grist + */ + +#ifdef OS_CYGWIN +static int translate_path_cyg2win( string * path ) +{ + int translated = 0; + +#ifdef CYGWIN_VERSION_CYGWIN_CONV + /* Use new Cygwin API added with Cygwin 1.7. Old one had no error + * handling and has been deprecated. + */ + char * dynamicBuffer = 0; + char buffer[ MAX_PATH + 1001 ]; + char const * result = buffer; + cygwin_conv_path_t const conv_type = CCP_POSIX_TO_WIN_A | CCP_RELATIVE; + ssize_t const apiResult = cygwin_conv_path( conv_type, path->value, + buffer, sizeof( buffer ) / sizeof( *buffer ) ); + assert( apiResult == 0 || apiResult == -1 ); + assert( apiResult || strlen( result ) < sizeof( buffer ) / sizeof( + *buffer ) ); + if ( apiResult ) + { + result = 0; + if ( errno == ENOSPC ) + { + ssize_t const size = cygwin_conv_path( conv_type, path->value, + NULL, 0 ); + assert( size >= -1 ); + if ( size > 0 ) + { + dynamicBuffer = (char *)BJAM_MALLOC_ATOMIC( size ); + if ( dynamicBuffer ) + { + ssize_t const apiResult = cygwin_conv_path( conv_type, + path->value, dynamicBuffer, size ); + assert( apiResult == 0 || apiResult == -1 ); + if ( !apiResult ) + { + result = dynamicBuffer; + assert( strlen( result ) < size ); + } + } + } + } + } +#else /* CYGWIN_VERSION_CYGWIN_CONV */ + /* Use old Cygwin API deprecated with Cygwin 1.7. */ + char result[ MAX_PATH + 1 ]; + cygwin_conv_to_win32_path( path->value, result ); + assert( strlen( result ) <= MAX_PATH ); +#endif /* CYGWIN_VERSION_CYGWIN_CONV */ + + if ( result ) + { + string_truncate( path, 0 ); + string_append( path, result ); + translated = 1; + } + +#ifdef CYGWIN_VERSION_CYGWIN_CONV + if ( dynamicBuffer ) + BJAM_FREE( dynamicBuffer ); +#endif + + return translated; +} +#endif /* OS_CYGWIN */ + + +/* + * path_translate_to_os_() + */ + +int path_translate_to_os_( char const * f, string * file ) +{ + int translated = 0; + + /* by default, pass on the original path */ + string_copy( file, f ); + +#ifdef OS_CYGWIN + translated = translate_path_cyg2win( file ); +#endif + + return translated; +} + + +void path_register_key( OBJECT * canonic_path ) +{ + path_key( canonic_path, 1 ); +} + + +OBJECT * path_as_key( OBJECT * path ) +{ + return object_copy( path_key( path, 0 )->key ); +} + + +static void free_path_key_entry( void * xentry, void * const data ) +{ + path_key_entry * const entry = (path_key_entry *)xentry; + if (entry->path) object_free( entry->path ); + if (entry->key) object_free( entry->key ); +} + + +void path_done( void ) +{ + if ( path_key_cache ) + { + hashenumerate( path_key_cache, &free_path_key_entry, 0 ); + hashdone( path_key_cache ); + } +} + +#endif // USE_PATHNT diff --git a/src/boost/tools/build/src/engine/pathsys.cpp b/src/boost/tools/build/src/engine/pathsys.cpp new file mode 100644 index 000000000..d9a8fcd81 --- /dev/null +++ b/src/boost/tools/build/src/engine/pathsys.cpp @@ -0,0 +1,469 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * pathsys.c - platform independent path manipulation support + * + * External routines: + * path_build() - build a filename given dir/base/suffix/member + * path_parent() - make a PATHNAME point to its parent dir + * path_parse() - split a file name into dir/base/suffix/member + * path_tmpdir() - returns the system dependent temporary folder path + * path_tmpfile() - returns a new temporary path + * path_tmpnam() - returns a new temporary name + * + * File_parse() and path_build() just manipulate a string and a structure; + * they do not make system calls. + */ + +#include "jam.h" + +#include "cwd.h" +#include "filesys.h" +#include "pathsys.h" + +#include +#include + +#include + + +/* Internal OS specific implementation details - have names ending with an + * underscore and are expected to be implemented in an OS specific pathXXX.c + * module. + */ +unsigned long path_get_process_id_( void ); +void path_get_temp_path_( string * buffer ); +int path_translate_to_os_( char const * f, string * file ); + + +/* + * path_parse() - split a file name into dir/base/suffix/member + */ + +void path_parse( char const * file, PATHNAME * f ) +{ + char const * p; + char const * q; + char const * end; + + memset( (char *)f, 0, sizeof( *f ) ); + + /* Look for ''. */ + + if ( ( file[ 0 ] == '<' ) && ( p = strchr( file, '>' ) ) ) + { + f->f_grist.ptr = file; + f->f_grist.len = int32_t(p - file); + file = p + 1; + } + + /* Look for 'dir/'. */ + + p = strrchr( file, '/' ); + +#if PATH_DELIM == '\\' + /* On NT, look for dir\ as well */ + { + char const * p1 = strrchr( p ? p + 1 : file, '\\' ); + if ( p1 ) p = p1; + } +#endif + + if ( p ) + { + f->f_dir.ptr = file; + f->f_dir.len = int32_t(p - file); + + /* Special case for / - dirname is /, not "" */ + if ( !f->f_dir.len ) + ++f->f_dir.len; + +#if PATH_DELIM == '\\' + /* Special case for D:/ - dirname is D:/, not "D:" */ + if ( f->f_dir.len == 2 && file[ 1 ] == ':' ) + ++f->f_dir.len; +#endif + + file = p + 1; + } + + end = file + strlen( file ); + + /* Look for '(member)'. */ + if ( ( p = strchr( file, '(' ) ) && ( end[ -1 ] == ')' ) ) + { + f->f_member.ptr = p + 1; + f->f_member.len = int32_t(end - p - 2); + end = p; + } + + /* Look for '.suffix'. This would be memrchr(). */ + p = 0; + for ( q = file; ( q = (char *)memchr( q, '.', end - q ) ); ++q ) + p = q; + if ( p ) + { + f->f_suffix.ptr = p; + f->f_suffix.len = int32_t(end - p); + end = p; + } + + /* Leaves base. */ + f->f_base.ptr = file; + f->f_base.len = int32_t(end - file); +} + + +/* + * is_path_delim() - true iff c is a path delimiter + */ + +static int is_path_delim( char const c ) +{ + return c == PATH_DELIM +#if PATH_DELIM == '\\' + || c == '/' +#endif + ; +} + + +/* + * as_path_delim() - convert c to a path delimiter if it is not one already + */ + +static char as_path_delim( char const c ) +{ + return is_path_delim( c ) ? c : PATH_DELIM; +} + + +/* + * path_build() - build a filename given dir/base/suffix/member + * + * To avoid changing slash direction on NT when reconstituting paths, instead of + * unconditionally appending PATH_DELIM we check the past-the-end character of + * the previous path element. If it is a path delimiter, we append that, and + * only append PATH_DELIM as a last resort. This heuristic is based on the fact + * that PATHNAME objects are usually the result of calling path_parse, which + * leaves the original slashes in the past-the-end position. Correctness depends + * on the assumption that all strings are zero terminated, so a past-the-end + * character will always be available. + * + * As an attendant patch, we had to ensure that backslashes are used explicitly + * in 'timestamp.c'. + */ + +void path_build( PATHNAME * f, string * file ) +{ + int check_f; + int check_f_pos; + + file_build1( f, file ); + + /* Do not prepend root if it is '.' or the directory is rooted. */ + check_f = (f->f_root.len + && !( f->f_root.len == 1 && f->f_root.ptr[ 0 ] == '.') + && !( f->f_dir.len && f->f_dir.ptr[ 0 ] == '/' )); +#if PATH_DELIM == '\\' + check_f = (check_f + && !( f->f_dir.len && f->f_dir.ptr[ 0 ] == '\\' ) + && !( f->f_dir.len && f->f_dir.ptr[ 1 ] == ':' )); +#endif + if (check_f) + { + string_append_range( file, f->f_root.ptr, f->f_root.ptr + f->f_root.len + ); + /* If 'root' already ends with a path delimiter, do not add another one. + */ + if ( !is_path_delim( f->f_root.ptr[ f->f_root.len - 1 ] ) ) + string_push_back( file, as_path_delim( f->f_root.ptr[ f->f_root.len + ] ) ); + } + + if ( f->f_dir.len ) + string_append_range( file, f->f_dir.ptr, f->f_dir.ptr + f->f_dir.len ); + + /* Put path separator between dir and file. */ + /* Special case for root dir: do not add another path separator. */ + check_f_pos = (f->f_dir.len && ( f->f_base.len || f->f_suffix.len )); +#if PATH_DELIM == '\\' + check_f_pos = (check_f_pos && !( f->f_dir.len == 3 && f->f_dir.ptr[ 1 ] == ':' )); +#endif + check_f_pos = (check_f_pos && !( f->f_dir.len == 1 && is_path_delim( f->f_dir.ptr[ 0 ]))); + if (check_f_pos) + string_push_back( file, as_path_delim( f->f_dir.ptr[ f->f_dir.len ] ) ); + + if ( f->f_base.len ) + string_append_range( file, f->f_base.ptr, f->f_base.ptr + f->f_base.len + ); + + if ( f->f_suffix.len ) + string_append_range( file, f->f_suffix.ptr, f->f_suffix.ptr + + f->f_suffix.len ); + + if ( f->f_member.len ) + { + string_push_back( file, '(' ); + string_append_range( file, f->f_member.ptr, f->f_member.ptr + + f->f_member.len ); + string_push_back( file, ')' ); + } +} + + +/* + * path_parent() - make a PATHNAME point to its parent dir + */ + +void path_parent( PATHNAME * f ) +{ + f->f_base.ptr = f->f_suffix.ptr = f->f_member.ptr = ""; + f->f_base.len = f->f_suffix.len = f->f_member.len = 0; +} + + +/* + * path_tmpdir() - returns the system dependent temporary folder path + * + * Returned value is stored inside a static buffer and should not be modified. + * Returned value does *not* include a trailing path separator. + */ + +string const * path_tmpdir() +{ + static string buffer[ 1 ]; + static int have_result; + if ( !have_result ) + { + string_new( buffer ); + path_get_temp_path_( buffer ); + have_result = 1; + } + return buffer; +} + + +/* + * path_tmpnam() - returns a new temporary name + */ + +OBJECT * path_tmpnam( void ) +{ + char name_buffer[ 64 ]; + unsigned long const pid = path_get_process_id_(); + static unsigned long t; + if ( !t ) t = time( 0 ) & 0xffff; + t += 1; + sprintf( name_buffer, "jam%lx%lx.000", pid, t ); + return object_new( name_buffer ); +} + + +/* + * path_tmpfile() - returns a new temporary path + */ + +OBJECT * path_tmpfile( void ) +{ + OBJECT * result; + OBJECT * tmpnam; + + string file_path[ 1 ]; + string_copy( file_path, path_tmpdir()->value ); + string_push_back( file_path, PATH_DELIM ); + tmpnam = path_tmpnam(); + string_append( file_path, object_str( tmpnam ) ); + object_free( tmpnam ); + result = object_new( file_path->value ); + string_free( file_path ); + + return result; +} + + +/* + * path_translate_to_os() - translate filename to OS-native path + * + */ + +int path_translate_to_os( char const * f, string * file ) +{ + return path_translate_to_os_( f, file ); +} + + +std::string b2::paths::normalize(const std::string &p) +{ + // We root the path as a sentinel. But we need to remember that we did so + // to un-root afterwards. + std::string result{"/"}; + bool is_rooted = p[0] == '/' || p[0] == '\\'; + result += p; + + // Convert \ into /. On Windows, paths using / and \ are equivalent, and we + // want this function to obtain a canonic representation. + std::replace(result.begin(), result.end(), '\\', '/'); + + int32_t ellipsis = 0; + for (auto end_pos = result.length(); end_pos > 0; ) + { + auto path_pos = result.rfind('/', end_pos-1); + if (path_pos == std::string::npos) break; + if (path_pos == end_pos-1) + { + /* Found a trailing or duplicate '/'. Remove it. */ + result.erase(path_pos, 1); + } + else if ((end_pos-path_pos == 2) && result[path_pos+1] == '.') + { + /* Found '/.'. Remove them all. */ + result.erase(path_pos, 2); + } + else if ((end_pos-path_pos == 3) && result[path_pos+1] == '.' && result[path_pos+2] == '.') + { + /* Found '/..'. Remove them all. */ + result.erase(path_pos, 3); + ellipsis += 1; + } + else if (ellipsis > 0) + { + /* An elided parent path. Remove it. */ + result.erase(path_pos, end_pos-path_pos); + ellipsis -= 1; + } + end_pos = path_pos; + } + + // Now we know that we need to add exactly ellipsis '..' path elements to the + // front and that our string is either empty or has a '/' as its first + // significant character. If we have any ellipsis remaining then the passed + // path must not have been rooted or else it is invalid we return empty. + if (ellipsis > 0) + { + if (is_rooted) return ""; + do result.insert(0, "/.."); while (--ellipsis > 0); + } + + // If we reduced to nothing we return a valid path depending on wether + // the input was rooted or not. + if (result.empty()) return is_rooted ? "/" : "."; + // Return the result without the sentinel if it's not rooted. + if (!is_rooted) return result.substr(1); + + return result; +} + + +/* + * executable_path() + */ + +#if defined(_WIN32) +# define WIN32_LEAN_AND_MEAN +# include +char * executable_path( char const * argv0 ) +{ + char buf[ 1024 ]; + DWORD const ret = GetModuleFileNameA( NULL, buf, sizeof( buf ) ); + return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf ); +} +#elif defined(__APPLE__) /* Not tested */ +# include +char *executable_path( char const * argv0 ) +{ + char buf[ 1024 ]; + uint32_t size = sizeof( buf ); + return _NSGetExecutablePath( buf, &size ) ? NULL : strdup( buf ); +} +#elif defined(sun) || defined(__sun) /* Not tested */ +# include +char * executable_path( char const * argv0 ) +{ + const char * execname = getexecname(); + return execname ? strdup( execname ) : NULL; +} +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +# include +char * executable_path( char const * argv0 ) +{ + int mib[ 4 ] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; + char buf[ 1024 ]; + size_t size = sizeof( buf ); + sysctl( mib, 4, buf, &size, NULL, 0 ); + return ( !size || size == sizeof( buf ) ) ? NULL : strndup( buf, size ); +} +#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) +# include +char * executable_path( char const * argv0 ) +{ + char buf[ 1024 ]; + ssize_t const ret = readlink( "/proc/self/exe", buf, sizeof( buf ) ); + return ( !ret || ret == sizeof( buf ) ) ? NULL : strndup( buf, ret ); +} +#elif defined(OS_VMS) +# include +char * executable_path( char const * argv0 ) +{ + char * vms_path = NULL; + char * posix_path = NULL; + char * p; + + /* On VMS argv[0] shows absolute path to the image file. + * So, just remove VMS file version and translate path to POSIX-style. + */ + vms_path = strdup( argv0 ); + if ( vms_path && ( p = strchr( vms_path, ';') ) ) *p = '\0'; + posix_path = decc$translate_vms( vms_path ); + if ( vms_path ) free( vms_path ); + + return posix_path > 0 ? strdup( posix_path ) : NULL; +} +#else +char * executable_path( char const * argv0 ) +{ + char * result = nullptr; + /* If argv0 is an absolute path, assume it is the right absolute path. */ + if (!result && b2::paths::is_rooted(argv0)) + result = strdup( argv0 ); + // If argv0 is a relative path, we can compute the absolute one from the + // current working dir. + if (!result && b2::paths::is_relative(argv0)) + { + auto p = b2::paths::normalize(b2::cwd_str()+"/"+argv0); + result = strdup( p.c_str() ); + } + // If it's a bare basename, search the PATH for a match. + if (!result) + { + std::string path_env = getenv( "PATH" ); + std::string::size_type i = 0; + while (i != std::string::npos) + { + std::string::size_type e = path_env.find_first_of(':', i); + std::string p = e == std::string::npos + ? path_env.substr(i) + : path_env.substr(i, e-i); + if (b2::filesys::is_file(p+"/"+argv0)) + { + result = strdup( (p+"/"+argv0).c_str() ); + break; + } + i = e == std::string::npos ? e : e+1; + } + } + return result; +} +#endif diff --git a/src/boost/tools/build/src/engine/pathsys.h b/src/boost/tools/build/src/engine/pathsys.h new file mode 100644 index 000000000..03ac403fa --- /dev/null +++ b/src/boost/tools/build/src/engine/pathsys.h @@ -0,0 +1,123 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* +Copyright 2020 René Ferdinand Rivera Morell +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + + +/* + * pathsys.h - PATHNAME struct + */ + +/* + * PATHNAME - a name of a file, broken into dir/base/suffix(member) + * + * - salt to distinguish between targets that would otherwise have the + * same name - it never appears in the bound name of a target. + * + * (member) - archive member name: the syntax is arbitrary, but must agree in + * path_parse(), path_build(). + */ + +#ifndef PATHSYS_VP_20020211_H +#define PATHSYS_VP_20020211_H + +#include "config.h" +#include "object.h" +#include "jam_strings.h" + +#include + + +typedef struct _pathpart +{ + char const * ptr; + int32_t len; +} PATHPART; + +typedef struct _pathname +{ + PATHPART part[ 6 ]; + +#define f_grist part[ 0 ] +#define f_root part[ 1 ] +#define f_dir part[ 2 ] +#define f_base part[ 3 ] +#define f_suffix part[ 4 ] +#define f_member part[ 5 ] +} PATHNAME; + + +void path_build( PATHNAME *, string * file ); +void path_parse( char const * file, PATHNAME * ); +void path_parent( PATHNAME * ); +int path_translate_to_os( char const *, string * file ); + +/* Given a path, returns an object containing an equivalent path in canonical + * format that can be used as a unique key for that path. Equivalent paths such + * as a/b, A\B, and a\B on NT all yield the same key. + */ +OBJECT * path_as_key( OBJECT * path ); + +/* Called as an optimization when we know we have a path that is already in its + * canonical/long/key form. Avoids the need for some subsequent path_as_key() + * call to do a potentially expensive path conversion requiring access to the + * actual underlying file system. + */ +void path_register_key( OBJECT * canonic_path ); + +/* Returns a static pointer to the system dependent path to the temporary + * directory. NOTE: Does *not* include a trailing path separator. + */ +string const * path_tmpdir( void ); + +/* Returns a new temporary name. */ +OBJECT * path_tmpnam( void ); + +/* Returns a new temporary path. */ +OBJECT * path_tmpfile( void ); + +/* Give the first argument to 'main', return a full path to our executable. + * Returns null in the unlikely case it cannot be determined. Caller is + * responsible for freeing the string. + * + * Implemented in jam.c + */ +char * executable_path( char const * argv0 ); + +void path_done( void ); + +namespace b2 +{ + namespace paths + { + inline bool is_rooted(const std::string &p) + { + #if NT + return + (p.size() >= 1 && (p[0] == '/' || p[0] == '\\')) || + (p.size() >= 3 && p[1] == ':' && (p[2] == '/' || p[2] == '\\')); + #else + return + (p.size() >= 1 && (p[0] == '/' || p[0] == '\\')); + #endif + } + inline bool is_relative(const std::string &p) + { + return + (p.size() >= 3 && ( + (p[0] == '.' && p[1] == '.' && (p[2] == '/' || p[2] == '\\')) || + (p[0] == '.' && (p[1] == '/' || p[1] == '\\')) + )); + } + std::string normalize(const std::string &p); + } +} + +#endif diff --git a/src/boost/tools/build/src/engine/pathunix.cpp b/src/boost/tools/build/src/engine/pathunix.cpp new file mode 100644 index 000000000..1e7d1e5af --- /dev/null +++ b/src/boost/tools/build/src/engine/pathunix.cpp @@ -0,0 +1,91 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * pathunix.c - UNIX specific path manipulation support + */ + +#include "jam.h" +#ifdef USE_PATHUNIX + +#include "pathsys.h" + +#include +#include /* needed for getpid() */ + + +/* + * path_get_process_id_() + */ + +unsigned long path_get_process_id_( void ) +{ + return getpid(); +} + + +/* + * path_get_temp_path_() + */ + +void path_get_temp_path_( string * buffer ) +{ + char const * t = getenv( "TMPDIR" ); + string_append( buffer, t ? t : "/tmp" ); +} + + +/* + * path_translate_to_os_() + */ + +int path_translate_to_os_( char const * f, string * file ) +{ + int translated = 0; + + /* by default, pass on the original path */ + string_copy( file, f ); + + return translated; +} + + +/* + * path_register_key() + */ + +void path_register_key( OBJECT * path ) +{ +} + + +/* + * path_as_key() + */ + +OBJECT * path_as_key( OBJECT * path ) +{ + return object_copy( path ); +} + + +/* + * path_done() + */ + +void path_done( void ) +{ +} + +#endif // USE_PATHUNIX diff --git a/src/boost/tools/build/src/engine/pathvms.cpp b/src/boost/tools/build/src/engine/pathvms.cpp new file mode 100644 index 000000000..76a1241ab --- /dev/null +++ b/src/boost/tools/build/src/engine/pathvms.cpp @@ -0,0 +1,254 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Rene Rivera. + * Copyright 2015 Artur Shepilko. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + + +/* + * pathvms.c - VMS-specific path manipulation support + * + * This implementation is based on POSIX-style path manipulation. + * + * VMS CTRL directly supports both POSIX- and native VMS-style path expressions, + * with the POSIX-to-VMS path translation performed internally by the same + * set of functions. For the most part such processing is transparent, with + * few differences mainly related to file-versions (in POSIX mode only the recent + * version is visible). + * + * This should allow us to some extent re-use pathunix.c implementation. + * + * Thus in jam-files the path references can also remain POSIX/UNIX-like on all + * levels EXCEPT in actions scope, where the path references must be translated + * to the native VMS-style. This approach is somewhat similar to jam CYGWIN + * handling. + * + * + * External routines: + * path_register_key() + * path_as_key() + * path_done() + * + * External routines called only via routines in pathsys.c: + * path_get_process_id_() + * path_get_temp_path_() + * path_translate_to_os_() + */ + + +#include "jam.h" + +#ifdef OS_VMS + +#include "pathsys.h" + +#include +#include +#include /* needed for getpid() */ +#include /* needed for decc$to_vms() */ + + +/* + * path_get_process_id_() + */ + +unsigned long path_get_process_id_( void ) +{ + return getpid(); +} + + +/* + * path_get_temp_path_() + */ + +void path_get_temp_path_( string * buffer ) +{ + char const * t = getenv( "TMPDIR" ); + string_append( buffer, t ? t : "/tmp" ); +} + + +/* + * translate_path_posix2vms() + * + * POSIX-to-VMS file specification translation: + * + * Translation is performed with decc$to_vms() CTRL routine (default decc$features) + * Some limitations apply: + * -- ODS-2 compliant file specs only (no spaces, punctuation chars etc.) + * + * -- wild-cards are not allowed + * In general decc$to_vms() can expand the wildcard for existing files, + * yet it cannot retain wild-cards in translated spec. Use GLOB for this. + * + * -- rooted path must refer to an existing/defined device or root-dir + * (e.g. /defconcealed/dir/file.ext or /existingrootdir/dir/file.ext ) + * + * -- POSIX dir/no-type-file path ambiguity (e.g. dir/newsubdir vs. dir/newfile + * is handled as follows: + * + * 1) first try as directory: + * -- if translated (may be a dir): means the file-path has no .type/suffix + * -- if not translated, then it may be a file (has .type) OR invalid spec + * 2) then try as file: + * -- if translated and also is a dir -- check if such file exists (stat) + * -- if not translated, but is a dir -- return as dir + * + * NOTE: on VMS it's possible to have both a file and a dir of the same name + * appear in the same directory. In such case _directory_ intent is assumed. + * + * It's preferable to avoid such naming ambiguity in this context, so + * append an empty .type to specify a no-type file (eg. "filename.") + * + */ + + +static string * m_vmsfilespec = NULL; + +/* + * copy_vmsfilespec() - decc$to_vms action routine for matched filenames + */ + +static int copy_vmsfilespec( char * f, int type ) +{ + assert ( NULL != m_vmsfilespec && "Must be bound to a valid object" ); + + string_copy( m_vmsfilespec, f ); + + /* 0:Exit on first match (1:Process all) */ + return 0; +} + + +static int translate_path_posix2vms( string * path ) +{ + int translated = 0; + + string as_dir[ 1 ]; + string as_file[ 1 ]; + int dir_count; + int file_count; + + unsigned char is_dir; + unsigned char is_file; + unsigned char is_ambiguous; + + string_new( as_dir ); + string_new( as_file ); + + + m_vmsfilespec = as_dir; + + /* MATCH 0:do not allow wildcards, 0:allow directories (2:dir only) */ + dir_count = decc$to_vms( path->value, copy_vmsfilespec, 0, 2 ); + + + m_vmsfilespec = as_file; + + /* MATCH 0:do not allow wildcards, 0:allow directories (2:dir only) */ + file_count = decc$to_vms( path->value, copy_vmsfilespec, 0, 0 ); + + m_vmsfilespec = NULL; + + + translated = ( file_count || dir_count ); + + if ( file_count && dir_count ) + { + struct stat statbuf; + + /* use as_file only when exists AND as_dir does not exist + * otherwise use as_dir + */ + if ( stat(as_dir->value, &statbuf ) < 0 + && stat(as_file->value, &statbuf ) > 0 + && ( statbuf.st_mode & S_IFREG ) ) + { + string_truncate( path, 0 ); + string_append( path, as_file->value ); + } + else + { + string_truncate( path, 0 ); + string_append( path, as_dir->value ); + } + } + else if ( file_count ) + { + string_truncate( path, 0 ); + string_append( path, as_file->value ); + } + else if ( dir_count ) + { + string_truncate( path, 0 ); + string_append( path, as_dir->value ); + } + else + { + /* error: unable to translate path to native format */ + translated = 0; + } + + string_free( as_dir ); + string_free( as_file ); + + return translated; +} + + +/* + * path_translate_to_os_() + */ + +int path_translate_to_os_( char const * f, string * file ) +{ + int translated = 0; + + /* by default, pass on the original path */ + string_copy( file, f ); + + translated = translate_path_posix2vms( file ); + + return translated; +} + + +/* + * path_register_key() + */ + +void path_register_key( OBJECT * path ) +{ +} + + +/* + * path_as_key() + */ + +OBJECT * path_as_key( OBJECT * path ) +{ + return object_copy( path ); +} + + +/* + * path_done() + */ + +void path_done( void ) +{ +} + +#endif + diff --git a/src/boost/tools/build/src/engine/regexp.cpp b/src/boost/tools/build/src/engine/regexp.cpp new file mode 100644 index 000000000..dacae6252 --- /dev/null +++ b/src/boost/tools/build/src/engine/regexp.cpp @@ -0,0 +1,1330 @@ +/* + * regcomp and regexec -- regsub and regerror are elsewhere + * + * Copyright (c) 1986 by University of Toronto. + * Written by Henry Spencer. Not derived from licensed software. + * + * Permission is granted to anyone to use this software for any + * purpose on any computer system, and to redistribute it freely, + * subject to the following restrictions: + * + * 1. The author is not responsible for the consequences of use of + * this software, no matter how awful, even if they arise + * from defects in it. + * + * 2. The origin of this software must not be misrepresented, either + * by explicit claim or by omission. + * + * 3. Altered versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore, + *** hoptoad!gnu, on 27 Dec 1986, to add \n as an alternative to | + *** to assist in implementing egrep. + *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore, + *** hoptoad!gnu, on 27 Dec 1986, to add \< and \> for word-matching + *** as in BSD grep and ex. + *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore, + *** hoptoad!gnu, on 28 Dec 1986, to optimize characters quoted with \. + *** THIS IS AN ALTERED VERSION. It was altered by James A. Woods, + *** ames!jaw, on 19 June 1987, to quash a regcomp() redundancy. + *** THIS IS AN ALTERED VERSION. It was altered by Christopher Seiwald + *** seiwald@vix.com, on 28 August 1993, for use in jam. Regmagic.h + *** was moved into regexp.h, and the include of regexp.h now uses "'s + *** to avoid conflicting with the system regexp.h. Const, bless its + *** soul, was removed so it can compile everywhere. The declaration + *** of strchr() was in conflict on AIX, so it was removed (as it is + *** happily defined in string.h). + *** THIS IS AN ALTERED VERSION. It was altered by Christopher Seiwald + *** seiwald@perforce.com, on 20 January 2000, to use function prototypes. + * + * Beware that some of this code is subtly aware of the way operator precedence + * is structured in regular expressions. Serious changes in regular-expression + * syntax might require a total rethink. + */ + + +#include "jam.h" +#include "regexp.h" +#include "output.h" + +#include +#include +#ifndef ultrix +# include +#endif +#include + + +/* + * The "internal use only" fields in regexp.h are present to pass info from + * compile to execute that permits the execute phase to run lots faster on + * simple cases. They are: + : + * regstart char that must begin a match; '\0' if none obvious. + * reganch is the match anchored (at beginning-of-line only)? + * regmust string (pointer into program) that match must include, or NULL. + * regmlen length of regmust string. + * + * Regstart and reganch permit very fast decisions on suitable starting points + * for a match, cutting down the work a lot. Regmust permits fast rejection of + * lines that cannot possibly match. The regmust tests are costly enough that + * regcomp() supplies a regmust only if the r.e. contains something potentially + * expensive (at present, the only such thing detected is * or + at the start of + * the r.e., which can involve a lot of backup). Regmlen is supplied because the + * test in regexec() needs it and regcomp() is computing it anyway. + */ + +/* + * Structure for regexp "program". This is essentially a linear encoding of a + * nondeterministic finite-state machine (aka syntax charts or "railroad normal + * form" in parsing technology). Each node is an opcode plus a "next" pointer, + * possibly plus an operand. "Next" pointers of all nodes except BRANCH + * implement concatenation; a "next" pointer with a BRANCH on both ends of it is + * connecting two alternatives. [Here we have one of the subtle syntax + * dependencies: an individual BRANCH, as opposed to a collection of them, is + * never concatenated with anything because of operator precedence.] The operand + * of some types of node is a literal string; for others, it is a node leading + * into a sub-FSM. In particular, the operand of a BRANCH node is the first node + * of the branch. [NB this is *not* a tree structure: the tail of the branch + * connects to the thing following the set of BRANCHes.] The opcodes are: + */ + +/* definition number opnd? meaning */ +#define END 0 /* no End of program. */ +#define BOL 1 /* no Match "" at beginning of line. */ +#define EOL 2 /* no Match "" at end of line. */ +#define ANY 3 /* no Match any one character. */ +#define ANYOF 4 /* str Match any character in this string. */ +#define ANYBUT 5 /* str Match any character not in this string. */ +#define BRANCH 6 /* node Match this alternative, or the next... */ +#define BACK 7 /* no Match "", "next" ptr points backward. */ +#define EXACTLY 8 /* str Match this string. */ +#define NOTHING 9 /* no Match empty string. */ +#define STAR 10 /* node Match this (simple) thing 0 or more times. */ +#define PLUS 11 /* node Match this (simple) thing 1 or more times. */ +#define WORDA 12 /* no Match "" at wordchar, where prev is nonword */ +#define WORDZ 13 /* no Match "" at nonwordchar, where prev is word */ +#define OPEN 20 /* no Mark this point in input as start of #n. */ + /* OPEN+1 is number 1, etc. */ +#define CLOSE 30 /* no Analogous to OPEN. */ + + +/* + * Opcode notes: + * + * BRANCH The set of branches constituting a single choice are hooked + * together with their "next" pointers, since precedence prevents + * anything being concatenated to any individual branch. The + * "next" pointer of the last BRANCH in a choice points to the + * thing following the whole choice. This is also where the + * final "next" pointer of each individual branch points; each + * branch starts with the operand node of a BRANCH node. + * + * BACK Normal "next" pointers all implicitly point forward; BACK + * exists to make loop structures possible. + * + * STAR,PLUS '?', and complex '*' and '+', are implemented as circular + * BRANCH structures using BACK. Simple cases (one character + * per match) are implemented with STAR and PLUS for speed + * and to minimize recursive plunges. + * + * OPEN,CLOSE ...are numbered at compile time. + */ + +/* + * A node is one char of opcode followed by two chars of "next" pointer. + * "Next" pointers are stored as two 8-bit pieces, high order first. The + * value is a positive offset from the opcode of the node containing it. + * An operand, if any, simply follows the node. (Note that much of the + * code generation knows about this implicit relationship.) + * + * Using two bytes for the "next" pointer is vast overkill for most things, + * but allows patterns to get big without disasters. + */ +#define OP(p) (*(p)) +#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) +#define OPERAND(p) ((p) + 3) + +/* + * See regmagic.h for one further detail of program structure. + */ + + +/* + * Utility definitions. + */ +#ifndef CHARBITS +#define UCHARAT(p) ((int32_t)*(const unsigned char *)(p)) +#else +#define UCHARAT(p) ((int32_t)*(p)&CHARBITS) +#endif + +#define FAIL(m) { regerror(m); return(NULL); } +#define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') + +/* + * Flags to be passed up and down. + */ +#define HASWIDTH 01 /* Known never to match null string. */ +#define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */ +#define SPSTART 04 /* Starts with * or +. */ +#define WORST 0 /* Worst case. */ + +/* + * Global work variables for regcomp(). + */ +static char *regparse; /* Input-scan pointer. */ +static int32_t regnpar; /* () count. */ +static char regdummy; +static char *regcode; /* Code-emit pointer; ®dummy = don't. */ +static int32_t regsize; /* Code size. */ + +/* + * Forward declarations for regcomp()'s friends. + */ +#ifndef STATIC +#define STATIC static +#endif +STATIC char *reg( int32_t paren, int32_t *flagp ); +STATIC char *regbranch( int32_t *flagp ); +STATIC char *regpiece( int32_t *flagp ); +STATIC char *regatom( int32_t *flagp ); +STATIC char *regnode( int32_t op ); +STATIC char *regnext( char *p ); +STATIC void regc( int32_t b ); +STATIC void reginsert( char op, char *opnd ); +STATIC void regtail( char *p, char *val ); +STATIC void regoptail( char *p, char *val ); +#ifdef STRCSPN +STATIC int32_t strcspn(); +#endif + +/* + - regcomp - compile a regular expression into internal code + * + * We can't allocate space until we know how big the compiled form will be, + * but we can't compile it (and thus know how big it is) until we've got a + * place to put the code. So we cheat: we compile it twice, once with code + * generation turned off and size counting turned on, and once "for real". + * This also means that we don't allocate space until we are sure that the + * thing really will compile successfully, and we never have to move the + * code and thus invalidate pointers into it. (Note that it has to be in + * one piece because free() must be able to free it all.) + * + * Beware that the optimization-preparation code in here knows about some + * of the structure of the compiled regexp. + */ +regexp * +regcomp( const char *exp ) +{ + regexp *r; + char *scan; + char *longest; + int32_t len; + int32_t flags; + + if (exp == NULL) + FAIL("NULL argument"); + + /* First pass: determine size, legality. */ +#ifdef notdef + if (exp[0] == '.' && exp[1] == '*') exp += 2; /* aid grep */ +#endif + regparse = (char *)exp; + regnpar = 1; + regsize = 0; + regcode = ®dummy; + regc(MAGIC); + if (reg(0, &flags) == NULL) + return(NULL); + + /* Small enough for pointer-storage convention? */ + if (regsize >= 32767L) /* Probably could be 65535L. */ + FAIL("regexp too big"); + + /* Allocate space. */ + r = (regexp *)BJAM_MALLOC(sizeof(regexp) + regsize); + if (r == NULL) + FAIL("out of space"); + + /* Second pass: emit code. */ + regparse = (char *)exp; + regnpar = 1; + regcode = r->program; + regc(MAGIC); + if (reg(0, &flags) == NULL) + return(NULL); + + /* Dig out information for optimizations. */ + r->regstart = '\0'; /* Worst-case defaults. */ + r->reganch = 0; + r->regmust = NULL; + r->regmlen = 0; + scan = r->program+1; /* First BRANCH. */ + if (OP(regnext(scan)) == END) { /* Only one top-level choice. */ + scan = OPERAND(scan); + + /* Starting-point info. */ + if (OP(scan) == EXACTLY) + r->regstart = *OPERAND(scan); + else if (OP(scan) == BOL) + r->reganch++; + + /* + * If there's something expensive in the r.e., find the + * longest literal string that must appear and make it the + * regmust. Resolve ties in favor of later strings, since + * the regstart check works with the beginning of the r.e. + * and avoiding duplication strengthens checking. Not a + * strong reason, but sufficient in the absence of others. + */ + if (flags&SPSTART) { + longest = NULL; + len = 0; + for (; scan != NULL; scan = regnext(scan)) + if (OP(scan) == EXACTLY && static_cast(strlen(OPERAND(scan))) >= len) { + longest = OPERAND(scan); + len = static_cast(strlen(OPERAND(scan))); + } + r->regmust = longest; + r->regmlen = len; + } + } + + return(r); +} + +/* + - reg - regular expression, i.e. main body or parenthesized thing + * + * Caller must absorb opening parenthesis. + * + * Combining parenthesis handling with the base level of regular expression + * is a trifle forced, but the need to tie the tails of the branches to what + * follows makes it hard to avoid. + */ +static char * +reg( + int32_t paren, /* Parenthesized? */ + int32_t *flagp ) +{ + char *ret; + char *br; + char *ender; + int32_t parno = 0; + int32_t flags; + + *flagp = HASWIDTH; /* Tentatively. */ + + /* Make an OPEN node, if parenthesized. */ + if (paren) { + if (regnpar >= NSUBEXP) + FAIL("too many ()"); + parno = regnpar; + regnpar++; + ret = regnode(OPEN+parno); + } else + ret = NULL; + + /* Pick up the branches, linking them together. */ + br = regbranch(&flags); + if (br == NULL) + return(NULL); + if (ret != NULL) + regtail(ret, br); /* OPEN -> first. */ + else + ret = br; + if (!(flags&HASWIDTH)) + *flagp &= ~HASWIDTH; + *flagp |= flags&SPSTART; + while (*regparse == '|' || *regparse == '\n') { + regparse++; + br = regbranch(&flags); + if (br == NULL) + return(NULL); + regtail(ret, br); /* BRANCH -> BRANCH. */ + if (!(flags&HASWIDTH)) + *flagp &= ~HASWIDTH; + *flagp |= flags&SPSTART; + } + + /* Make a closing node, and hook it on the end. */ + ender = regnode((paren) ? CLOSE+parno : END); + regtail(ret, ender); + + /* Hook the tails of the branches to the closing node. */ + for (br = ret; br != NULL; br = regnext(br)) + regoptail(br, ender); + + /* Check for proper termination. */ + if (paren && *regparse++ != ')') { + FAIL("unmatched ()"); + } else if (!paren && *regparse != '\0') { + if (*regparse == ')') { + FAIL("unmatched ()"); + } else + FAIL("junk on end"); /* "Can't happen". */ + /* NOTREACHED */ + } + + return(ret); +} + +/* + - regbranch - one alternative of an | operator + * + * Implements the concatenation operator. + */ +static char * +regbranch( int32_t *flagp ) +{ + char *ret; + char *chain; + char *latest; + int32_t flags; + + *flagp = WORST; /* Tentatively. */ + + ret = regnode(BRANCH); + chain = NULL; + while (*regparse != '\0' && *regparse != ')' && + *regparse != '\n' && *regparse != '|') { + latest = regpiece(&flags); + if (latest == NULL) + return(NULL); + *flagp |= flags&HASWIDTH; + if (chain == NULL) /* First piece. */ + *flagp |= flags&SPSTART; + else + regtail(chain, latest); + chain = latest; + } + if (chain == NULL) /* Loop ran zero times. */ + (void) regnode(NOTHING); + + return(ret); +} + +/* + - regpiece - something followed by possible [*+?] + * + * Note that the branching code sequences used for ? and the general cases + * of * and + are somewhat optimized: they use the same NOTHING node as + * both the endmarker for their branch list and the body of the last branch. + * It might seem that this node could be dispensed with entirely, but the + * endmarker role is not redundant. + */ +static char * +regpiece( int32_t *flagp ) +{ + char *ret; + char op; + char *next; + int32_t flags; + + ret = regatom(&flags); + if (ret == NULL) + return(NULL); + + op = *regparse; + if (!ISMULT(op)) { + *flagp = flags; + return(ret); + } + + if (!(flags&HASWIDTH) && op != '?') + FAIL("*+ operand could be empty"); + *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH); + + if (op == '*' && (flags&SIMPLE)) + reginsert(STAR, ret); + else if (op == '*') { + /* Emit x* as (x&|), where & means "self". */ + reginsert(BRANCH, ret); /* Either x */ + regoptail(ret, regnode(BACK)); /* and loop */ + regoptail(ret, ret); /* back */ + regtail(ret, regnode(BRANCH)); /* or */ + regtail(ret, regnode(NOTHING)); /* null. */ + } else if (op == '+' && (flags&SIMPLE)) + reginsert(PLUS, ret); + else if (op == '+') { + /* Emit x+ as x(&|), where & means "self". */ + next = regnode(BRANCH); /* Either */ + regtail(ret, next); + regtail(regnode(BACK), ret); /* loop back */ + regtail(next, regnode(BRANCH)); /* or */ + regtail(ret, regnode(NOTHING)); /* null. */ + } else if (op == '?') { + /* Emit x? as (x|) */ + reginsert(BRANCH, ret); /* Either x */ + regtail(ret, regnode(BRANCH)); /* or */ + next = regnode(NOTHING); /* null. */ + regtail(ret, next); + regoptail(ret, next); + } + regparse++; + if (ISMULT(*regparse)) + FAIL("nested *?+"); + + return(ret); +} + +/* + - regatom - the lowest level + * + * Optimization: gobbles an entire sequence of ordinary characters so that + * it can turn them into a single node, which is smaller to store and + * faster to run. Backslashed characters are exceptions, each becoming a + * separate node; the code is simpler that way and it's not worth fixing. + */ +static char * +regatom( int32_t *flagp ) +{ + char *ret; + int32_t flags; + + *flagp = WORST; /* Tentatively. */ + + switch (*regparse++) { + /* FIXME: these chars only have meaning at beg/end of pat? */ + case '^': + ret = regnode(BOL); + break; + case '$': + ret = regnode(EOL); + break; + case '.': + ret = regnode(ANY); + *flagp |= HASWIDTH|SIMPLE; + break; + case '[': { + int32_t classr; + int32_t classend; + + if (*regparse == '^') { /* Complement of range. */ + ret = regnode(ANYBUT); + regparse++; + } else + ret = regnode(ANYOF); + if (*regparse == ']' || *regparse == '-') + regc(*regparse++); + while (*regparse != '\0' && *regparse != ']') { + if (*regparse == '-') { + regparse++; + if (*regparse == ']' || *regparse == '\0') + regc('-'); + else { + classr = UCHARAT(regparse-2)+1; + classend = UCHARAT(regparse); + if (classr > classend+1) + FAIL("invalid [] range"); + for (; classr <= classend; classr++) + regc(classr); + regparse++; + } + } else + regc(*regparse++); + } + regc('\0'); + if (*regparse != ']') + FAIL("unmatched []"); + regparse++; + *flagp |= HASWIDTH|SIMPLE; + } + break; + case '(': + ret = reg(1, &flags); + if (ret == NULL) + return(NULL); + *flagp |= flags&(HASWIDTH|SPSTART); + break; + case '\0': + case '|': + case '\n': + case ')': + FAIL("internal urp"); /* Supposed to be caught earlier. */ + break; + case '?': + case '+': + case '*': + FAIL("?+* follows nothing"); + break; + case '\\': + switch (*regparse++) { + case '\0': + FAIL("trailing \\"); + break; + case '<': + ret = regnode(WORDA); + break; + case '>': + ret = regnode(WORDZ); + break; + /* FIXME: Someday handle \1, \2, ... */ + default: + /* Handle general quoted chars in exact-match routine */ + goto de_fault; + } + break; + de_fault: + default: + /* + * Encode a string of characters to be matched exactly. + * + * This is a bit tricky due to quoted chars and due to + * '*', '+', and '?' taking the SINGLE char previous + * as their operand. + * + * On entry, the char at regparse[-1] is going to go + * into the string, no matter what it is. (It could be + * following a \ if we are entered from the '\' case.) + * + * Basic idea is to pick up a good char in ch and + * examine the next char. If it's *+? then we twiddle. + * If it's \ then we frozzle. If it's other magic char + * we push ch and terminate the string. If none of the + * above, we push ch on the string and go around again. + * + * regprev is used to remember where "the current char" + * starts in the string, if due to a *+? we need to back + * up and put the current char in a separate, 1-char, string. + * When regprev is NULL, ch is the only char in the + * string; this is used in *+? handling, and in setting + * flags |= SIMPLE at the end. + */ + { + char *regprev; + char ch; + + regparse--; /* Look at cur char */ + ret = regnode(EXACTLY); + for ( regprev = 0 ; ; ) { + ch = *regparse++; /* Get current char */ + switch (*regparse) { /* look at next one */ + + default: + regc(ch); /* Add cur to string */ + break; + + case '.': case '[': case '(': + case ')': case '|': case '\n': + case '$': case '^': + case '\0': + /* FIXME, $ and ^ should not always be magic */ + magic: + regc(ch); /* dump cur char */ + goto done; /* and we are done */ + + case '?': case '+': case '*': + if (!regprev) /* If just ch in str, */ + goto magic; /* use it */ + /* End mult-char string one early */ + regparse = regprev; /* Back up parse */ + goto done; + + case '\\': + regc(ch); /* Cur char OK */ + switch (regparse[1]){ /* Look after \ */ + case '\0': + case '<': + case '>': + /* FIXME: Someday handle \1, \2, ... */ + goto done; /* Not quoted */ + default: + /* Backup point is \, scan * point is after it. */ + regprev = regparse; + regparse++; + continue; /* NOT break; */ + } + } + regprev = regparse; /* Set backup point */ + } + done: + regc('\0'); + *flagp |= HASWIDTH; + if (!regprev) /* One char? */ + *flagp |= SIMPLE; + } + break; + } + + return(ret); +} + +/* + - regnode - emit a node + */ +static char * /* Location. */ +regnode( int32_t op ) +{ + char *ret; + char *ptr; + + ret = regcode; + if (ret == ®dummy) { + regsize += 3; + return(ret); + } + + ptr = ret; + *ptr++ = op; + *ptr++ = '\0'; /* Null "next" pointer. */ + *ptr++ = '\0'; + regcode = ptr; + + return(ret); +} + +/* + - regc - emit (if appropriate) a byte of code + */ +static void +regc( int32_t b ) +{ + if (regcode != ®dummy) + *regcode++ = b; + else + regsize++; +} + +/* + - reginsert - insert an operator in front of already-emitted operand + * + * Means relocating the operand. + */ +static void +reginsert( + char op, + char *opnd ) +{ + char *src; + char *dst; + char *place; + + if (regcode == ®dummy) { + regsize += 3; + return; + } + + src = regcode; + regcode += 3; + dst = regcode; + while (src > opnd) + *--dst = *--src; + + place = opnd; /* Op node, where operand used to be. */ + *place++ = op; + *place++ = '\0'; + *place++ = '\0'; +} + +/* + - regtail - set the next-pointer at the end of a node chain + */ +static void +regtail( + char *p, + char *val ) +{ + char *scan; + char *temp; + size_t offset; + + if (p == ®dummy) + return; + + /* Find last node. */ + scan = p; + for (;;) { + temp = regnext(scan); + if (temp == NULL) + break; + scan = temp; + } + + if (OP(scan) == BACK) + offset = scan - val; + else + offset = val - scan; + *(scan+1) = (offset>>8)&0377; + *(scan+2) = offset&0377; +} + +/* + - regoptail - regtail on operand of first argument; nop if operandless + */ + +static void +regoptail( + char *p, + char *val ) +{ + /* "Operandless" and "op != BRANCH" are synonymous in practice. */ + if (p == NULL || p == ®dummy || OP(p) != BRANCH) + return; + regtail(OPERAND(p), val); +} + +/* + * regexec and friends + */ + +/* + * Global work variables for regexec(). + */ +static const char *reginput; /* String-input pointer. */ +static const char *regbol; /* Beginning of input, for ^ check. */ +static const char **regstartp; /* Pointer to startp array. */ +static const char **regendp; /* Ditto for endp. */ + +/* + * Forwards. + */ +STATIC int32_t regtry( regexp *prog, const char *string ); +STATIC int32_t regmatch( char *prog ); +STATIC int32_t regrepeat( char *p ); + +#ifdef DEBUG +int32_t regnarrate = 0; +void regdump(); +STATIC char *regprop(); +#endif + +/* + - regexec - match a regexp against a string + */ +int32_t +regexec( + regexp *prog, + const char *string ) +{ + char *s; + + /* Be paranoid... */ + if (prog == NULL || string == NULL) { + regerror("NULL parameter"); + return(0); + } + + /* Check validity of program. */ + if (UCHARAT(prog->program) != MAGIC) { + regerror("corrupted program"); + return(0); + } + + /* If there is a "must appear" string, look for it. */ + if ( prog->regmust != NULL ) + { + s = (char *)string; + while ( ( s = strchr( s, prog->regmust[ 0 ] ) ) != NULL ) + { + if ( !strncmp( s, prog->regmust, prog->regmlen ) ) + break; /* Found it. */ + ++s; + } + if ( s == NULL ) /* Not present. */ + return 0; + } + + /* Mark beginning of line for ^ . */ + regbol = (char *)string; + + /* Simplest case: anchored match need be tried only once. */ + if ( prog->reganch ) + return regtry( prog, string ); + + /* Messy cases: unanchored match. */ + s = (char *)string; + if (prog->regstart != '\0') + /* We know what char it must start with. */ + while ((s = strchr(s, prog->regstart)) != NULL) { + if (regtry(prog, s)) + return(1); + s++; + } + else + /* We do not -- general case. */ + do { + if ( regtry( prog, s ) ) + return( 1 ); + } while ( *s++ != '\0' ); + + /* Failure. */ + return 0; +} + + +/* + * regtry() - try match at specific point. + */ + +static int32_t /* 0 failure, 1 success */ +regtry( + regexp *prog, + const char *string ) +{ + int32_t i; + const char * * sp; + const char * * ep; + + reginput = string; + regstartp = prog->startp; + regendp = prog->endp; + + sp = prog->startp; + ep = prog->endp; + for ( i = NSUBEXP; i > 0; --i ) + { + *sp++ = NULL; + *ep++ = NULL; + } + if ( regmatch( prog->program + 1 ) ) + { + prog->startp[ 0 ] = string; + prog->endp[ 0 ] = reginput; + return 1; + } + else + return 0; +} + + +/* + * regmatch() - main matching routine. + * + * Conceptually the strategy is simple: check to see whether the current node + * matches, call self recursively to see whether the rest matches, and then act + * accordingly. In practice we make some effort to avoid recursion, in + * particular by going through "ordinary" nodes (that do not need to know + * whether the rest of the match failed) by a loop instead of by recursion. + */ + +static int32_t /* 0 failure, 1 success */ +regmatch( char * prog ) +{ + char * scan; /* Current node. */ + char * next; /* Next node. */ + + scan = prog; +#ifdef DEBUG + if (scan != NULL && regnarrate) + err_printf("%s(\n", regprop(scan)); +#endif + while (scan != NULL) { +#ifdef DEBUG + if (regnarrate) + err_printf("%s...\n", regprop(scan)); +#endif + next = regnext(scan); + + switch (OP(scan)) { + case BOL: + if (reginput != regbol) + return(0); + break; + case EOL: + if (*reginput != '\0') + return(0); + break; + case WORDA: + /* Must be looking at a letter, digit, or _ */ + if ((!isalnum(*reginput)) && *reginput != '_') + return(0); + /* Prev must be BOL or nonword */ + if (reginput > regbol && + (isalnum(reginput[-1]) || reginput[-1] == '_')) + return(0); + break; + case WORDZ: + /* Must be looking at non letter, digit, or _ */ + if (isalnum(*reginput) || *reginput == '_') + return(0); + /* We don't care what the previous char was */ + break; + case ANY: + if (*reginput == '\0') + return(0); + reginput++; + break; + case EXACTLY: { + size_t len; + char *opnd; + + opnd = OPERAND(scan); + /* Inline the first character, for speed. */ + if (*opnd != *reginput) + return(0); + len = strlen(opnd); + if (len > 1 && strncmp(opnd, reginput, len) != 0) + return(0); + reginput += len; + } + break; + case ANYOF: + if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL) + return(0); + reginput++; + break; + case ANYBUT: + if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL) + return(0); + reginput++; + break; + case NOTHING: + break; + case BACK: + break; + case OPEN+1: + case OPEN+2: + case OPEN+3: + case OPEN+4: + case OPEN+5: + case OPEN+6: + case OPEN+7: + case OPEN+8: + case OPEN+9: { + int32_t no; + const char *save; + + no = OP(scan) - OPEN; + save = reginput; + + if (regmatch(next)) { + /* + * Don't set startp if some later + * invocation of the same parentheses + * already has. + */ + if (regstartp[no] == NULL) + regstartp[no] = save; + return(1); + } else + return(0); + } + break; + case CLOSE+1: + case CLOSE+2: + case CLOSE+3: + case CLOSE+4: + case CLOSE+5: + case CLOSE+6: + case CLOSE+7: + case CLOSE+8: + case CLOSE+9: { + int32_t no; + const char *save; + + no = OP(scan) - CLOSE; + save = reginput; + + if (regmatch(next)) { + /* + * Don't set endp if some later + * invocation of the same parentheses + * already has. + */ + if (regendp[no] == NULL) + regendp[no] = save; + return(1); + } else + return(0); + } + break; + case BRANCH: { + const char *save; + + if (OP(next) != BRANCH) /* No choice. */ + next = OPERAND(scan); /* Avoid recursion. */ + else { + do { + save = reginput; + if (regmatch(OPERAND(scan))) + return(1); + reginput = save; + scan = regnext(scan); + } while (scan != NULL && OP(scan) == BRANCH); + return(0); + /* NOTREACHED */ + } + } + break; + case STAR: + case PLUS: { + char nextch; + int32_t no; + const char *save; + int32_t min; + + /* + * Lookahead to avoid useless match attempts + * when we know what character comes next. + */ + nextch = '\0'; + if (OP(next) == EXACTLY) + nextch = *OPERAND(next); + min = (OP(scan) == STAR) ? 0 : 1; + save = reginput; + no = regrepeat(OPERAND(scan)); + while (no >= min) { + /* If it could work, try it. */ + if (nextch == '\0' || *reginput == nextch) + if (regmatch(next)) + return(1); + /* Couldn't or didn't -- back up. */ + no--; + reginput = save + no; + } + return(0); + } + break; + case END: + return(1); /* Success! */ + break; + default: + regerror("memory corruption"); + return(0); + break; + } + + scan = next; + } + + /* + * We get here only if there's trouble -- normally "case END" is + * the terminating point. + */ + regerror("corrupted pointers"); + return(0); +} + +/* + - regrepeat - repeatedly match something simple, report how many + */ +static int32_t +regrepeat( char *p ) +{ + int32_t count = 0; + const char *scan; + char *opnd; + + scan = reginput; + opnd = OPERAND(p); + switch (OP(p)) { + case ANY: + count = int32_t(strlen(scan)); + scan += count; + break; + case EXACTLY: + while (*opnd == *scan) { + count++; + scan++; + } + break; + case ANYOF: + while (*scan != '\0' && strchr(opnd, *scan) != NULL) { + count++; + scan++; + } + break; + case ANYBUT: + while (*scan != '\0' && strchr(opnd, *scan) == NULL) { + count++; + scan++; + } + break; + default: /* Oh dear. Called inappropriately. */ + regerror("internal foulup"); + count = 0; /* Best compromise. */ + break; + } + reginput = scan; + + return(count); +} + +/* + - regnext - dig the "next" pointer out of a node + */ +static char * +regnext( char *p ) +{ + int32_t offset; + + if (p == ®dummy) + return(NULL); + + offset = NEXT(p); + if (offset == 0) + return(NULL); + + if (OP(p) == BACK) + return(p-offset); + else + return(p+offset); +} + +#ifdef DEBUG + +STATIC char *regprop(); + +/* + - regdump - dump a regexp onto stdout in vaguely comprehensible form + */ +void +regdump( regexp *r ) +{ + char *s; + char op = EXACTLY; /* Arbitrary non-END op. */ + char *next; + + + s = r->program + 1; + while (op != END) { /* While that wasn't END last time... */ + op = OP(s); + out_printf("%2d%s", s-r->program, regprop(s)); /* Where, what. */ + next = regnext(s); + if (next == NULL) /* Next ptr. */ + out_printf("(0)"); + else + out_printf("(%d)", (s-r->program)+(next-s)); + s += 3; + if (op == ANYOF || op == ANYBUT || op == EXACTLY) { + /* Literal string, where present. */ + while (*s != '\0') { + out_putc(*s); + s++; + } + s++; + } + out_putc('\n'); + } + + /* Header fields of interest. */ + if (r->regstart != '\0') + out_printf("start `%c' ", r->regstart); + if (r->reganch) + out_printf("anchored "); + if (r->regmust != NULL) + out_printf("must have \"%s\"", r->regmust); + out_printf("\n"); +} + +/* + - regprop - printable representation of opcode + */ +static char * +regprop( char *op ) +{ + char *p; + static char buf[50]; + + (void) strcpy(buf, ":"); + + switch (OP(op)) { + case BOL: + p = "BOL"; + break; + case EOL: + p = "EOL"; + break; + case ANY: + p = "ANY"; + break; + case ANYOF: + p = "ANYOF"; + break; + case ANYBUT: + p = "ANYBUT"; + break; + case BRANCH: + p = "BRANCH"; + break; + case EXACTLY: + p = "EXACTLY"; + break; + case NOTHING: + p = "NOTHING"; + break; + case BACK: + p = "BACK"; + break; + case END: + p = "END"; + break; + case OPEN+1: + case OPEN+2: + case OPEN+3: + case OPEN+4: + case OPEN+5: + case OPEN+6: + case OPEN+7: + case OPEN+8: + case OPEN+9: + sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); + p = NULL; + break; + case CLOSE+1: + case CLOSE+2: + case CLOSE+3: + case CLOSE+4: + case CLOSE+5: + case CLOSE+6: + case CLOSE+7: + case CLOSE+8: + case CLOSE+9: + sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); + p = NULL; + break; + case STAR: + p = "STAR"; + break; + case PLUS: + p = "PLUS"; + break; + case WORDA: + p = "WORDA"; + break; + case WORDZ: + p = "WORDZ"; + break; + default: + regerror("corrupted opcode"); + break; + } + if (p != NULL) + (void) strcat(buf, p); + return(buf); +} +#endif + +/* + * The following is provided for those people who do not have strcspn() in + * their C libraries. They should get off their butts and do something + * about it; at least one public-domain implementation of those (highly + * useful) string routines has been published on Usenet. + */ +#ifdef STRCSPN +/* + * strcspn - find length of initial segment of s1 consisting entirely + * of characters not from s2 + */ + +static int32_t +strcspn( + char *s1, + char *s2 ) +{ + char *scan1; + char *scan2; + int32_t count; + + count = 0; + for (scan1 = s1; *scan1 != '\0'; scan1++) { + for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */ + if (*scan1 == *scan2++) + return(count); + count++; + } + return(count); +} +#endif diff --git a/src/boost/tools/build/src/engine/regexp.h b/src/boost/tools/build/src/engine/regexp.h new file mode 100644 index 000000000..bbac95eeb --- /dev/null +++ b/src/boost/tools/build/src/engine/regexp.h @@ -0,0 +1,36 @@ +/* + * Definitions etc. for regexp(3) routines. + * + * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], + * not the System V one. + */ +#ifndef REGEXP_DWA20011023_H +#define REGEXP_DWA20011023_H + +#include "config.h" + +#define NSUBEXP 10 +typedef struct regexp { + char const * startp[ NSUBEXP ]; + char const * endp[ NSUBEXP ]; + char regstart; /* Internal use only. */ + char reganch; /* Internal use only. */ + char * regmust; /* Internal use only. */ + int32_t regmlen; /* Internal use only. */ + char program[ 1 ]; /* Unwarranted chumminess with compiler. */ +} regexp; + + +regexp * regcomp( char const * exp ); +int32_t regexec( regexp * prog, char const * string ); +void regerror( char const * s ); + + +/* + * The first byte of the regexp internal "program" is actually this magic + * number; the start node begins in the second byte. + */ +#define MAGIC 0234 + +#endif + diff --git a/src/boost/tools/build/src/engine/rules.cpp b/src/boost/tools/build/src/engine/rules.cpp new file mode 100644 index 000000000..a4e2ad107 --- /dev/null +++ b/src/boost/tools/build/src/engine/rules.cpp @@ -0,0 +1,735 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * rules.c - access to RULEs, TARGETs, and ACTIONs + * + * External routines: + * bindrule() - return pointer to RULE, creating it if necessary. + * bindtarget() - return pointer to TARGET, creating it if necessary. + * touch_target() - mark a target to simulate being new. + * targetlist() - turn list of target names into a TARGET chain. + * targetentry() - add a TARGET to a chain of TARGETS. + * actionlist() - append to an ACTION chain. + * addsettings() - add a deferred "set" command to a target. + * pushsettings() - set all target specific variables. + * popsettings() - reset target specific variables to their pre-push values. + * freesettings() - delete a settings list. + * rules_done() - free RULE and TARGET tables. + */ + +#include "jam.h" +#include "rules.h" + +#include "hash.h" +#include "lists.h" +#include "object.h" +#include "output.h" +#include "parse.h" +#include "pathsys.h" +#include "search.h" +#include "variable.h" + + +static void set_rule_actions( rule_ptr, rule_actions_ptr ); +static void set_rule_body ( rule_ptr, function_ptr ); + +static struct hash * targethash = 0; + + +/* + * get_target_includes() - lazy creates a target's internal includes node + * + * The newly created node is not entered into the hash table as there should + * never be a need to bind them directly from a target names. If you want to + * access an internal includes node by name, first access the actual target and + * then read the internal includes node from there. + */ + +static target_ptr get_target_includes( target_ptr const t ) +{ + if ( !t->includes ) + { + target_ptr const i = b2::jam::make_ptr<_target>(); + i->name = object_copy( t->name ); + i->boundname = object_copy( i->name ); + i->flags |= T_FLAG_NOTFILE | T_FLAG_INTERNAL; + t->includes = i; + } + return t->includes; +} + + +/* + * target_include() - adds a target to the given targe's 'included' list + * target_include_many() - adds targets to the given target's 'included' list + * + * Included targets are modeled as dependencies of the including target's + * internal include node. + */ + +void target_include( target_ptr const including, target_ptr const included ) +{ + target_ptr const internal = get_target_includes( including ); + targetentry( internal->depends, included ); +} + +void target_include_many( target_ptr const including, list_ptr const included_names + ) +{ + target_ptr const internal = get_target_includes( including ); + targetlist( internal->depends, included_names ); +} + + +/* + * enter_rule() - return pointer to RULE, creating it if necessary in + * target_module. + */ + +static rule_ptr enter_rule( object_ptr rulename, module_ptr target_module ) +{ + int found; + rule_ptr const r = (rule_ptr)hash_insert( demand_rules( target_module ), + rulename, &found ); + if ( !found ) + { + r->name = object_copy( rulename ); + r->procedure = 0; + r->module = 0; + r->actions = 0; + r->exported = 0; + r->module = target_module; + } + return r; +} + + +/* + * define_rule() - return pointer to RULE, creating it if necessary in + * target_module. Prepare it to accept a body or action originating in + * src_module. + */ + +static rule_ptr define_rule( module_ptr src_module, object_ptr rulename, + module_ptr target_module ) +{ + rule_ptr const r = enter_rule( rulename, target_module ); + if ( r->module != src_module ) + { + /* If the rule was imported from elsewhere, clear it now. */ + set_rule_body( r, 0 ); + set_rule_actions( r, 0 ); + /* r will be executed in the source module. */ + r->module = src_module; + } + return r; +} + + +void rule_free( rule_ptr r ) +{ + object_free( r->name ); + r->name = 0; + if ( r->procedure ) + function_free( r->procedure ); + r->procedure = 0; + if ( r->actions ) + actions_free( r->actions ); + r->actions = 0; +} + + +/* + * bindtarget() - return pointer to TARGET, creating it if necessary. + */ + +target_ptr bindtarget( object_ptr const target_name ) +{ + int found; + target_ptr t; + + if ( !targethash ) + targethash = hashinit( sizeof( TARGET ), "targets" ); + + t = (target_ptr)hash_insert( targethash, target_name, &found ); + if ( !found ) + { + b2::jam::ctor_ptr<_target>(t); + t->name = object_copy( target_name ); + t->boundname = object_copy( t->name ); /* default for T_FLAG_NOTFILE */ + } + + return t; +} + + +static void bind_explicitly_located_target( target_ptr t, void * ) +{ + if ( !( t->flags & T_FLAG_NOTFILE ) ) + { + /* Check if there is a setting for LOCATE. */ + settings_ptr s = t->settings; + for ( ; s ; s = s->next ) + { + if ( object_equal( s->symbol, constant_LOCATE ) && ! list_empty( s->value ) ) + { + set_explicit_binding( t->name, list_front( s->value ) ); + break; + } + } + } +} + + +void bind_explicitly_located_targets() +{ + if ( targethash ) + hash_enumerate( targethash, bind_explicitly_located_target ); +} + + +/* + * touch_target() - mark a target to simulate being new. + */ + +void touch_target( object_ptr const t ) +{ + bindtarget( t )->flags |= T_FLAG_TOUCHED; +} + + +/* + * target_scc() - returns the root of a strongly connected component that this + * target is a part of. + */ + +target_ptr target_scc( target_ptr t ) +{ + target_ptr result = t; + while ( result->scc_root ) + result = result->scc_root; + while ( t->scc_root ) + { + target_ptr const tmp = t->scc_root; + t->scc_root = result; + t = tmp; + } + return result; +} + + +/* + * targetlist() - turn list of target names into a TARGET chain. + * + * Inputs: + * chain existing TARGETS to append to + * targets list of target names + */ + +void targetlist( targets_uptr& chain, list_ptr target_names ) +{ + LISTITER iter = list_begin( target_names ); + LISTITER const end = list_end( target_names ); + for ( ; iter != end; iter = list_next( iter ) ) + targetentry( chain, bindtarget( list_item( iter ) ) ); +} + + +/* + * targetentry() - add a TARGET to a chain of TARGETS. + * + * Inputs: + * chain existing TARGETS to append to + * target new target to append + */ + +void targetentry( targets_uptr& chain, target_ptr target ) +{ + auto c = b2::jam::make_unique_jptr(); + c->target = target; + + targets_ptr tail = c.get(); + if ( !chain ) chain.reset(c.release()); + else chain->tail->next.reset(c.release()); + chain->tail = tail; +} + + +/* + * targetchain() - append two TARGET chains. + * + * Inputs: + * chain existing TARGETS to append to + * target new target to append + */ + +targets_uptr targetchain( targets_uptr chain, targets_uptr targets ) +{ + if ( !targets ) return chain; + if ( !chain ) return targets; + + targets_ptr tail = targets->tail; + chain->tail->next = std::move(targets); + chain->tail = tail; + return chain; +} + +/* + * targets_pop() - removes the first TARGET from the chain. + */ + +targets_uptr targets_pop(targets_uptr chain) +{ + targets_uptr result; + if ( chain && chain->next ) + { + chain->next->tail = chain->tail; + result = std::move( chain->next ); + } + return result; +} + +/* + * action_free - decrement the ACTIONs reference count and (maybe) free it. + */ + +void action_free( action_ptr action ) +{ + if ( --action->refs == 0 ) + { + b2::jam::free_ptr(action); + } +} + + +/* + * actionlist() - append to an ACTION chain. + */ + +actions_ptr actionlist( actions_ptr chain, action_ptr action ) +{ + actions_ptr const actions = (actions_ptr)BJAM_MALLOC( sizeof( ACTIONS ) ); + actions->action = action; + ++action->refs; + if ( !chain ) chain = actions; + else chain->tail->next = actions; + chain->tail = actions; + actions->next = 0; + return chain; +} + +static settings_ptr settings_freelist; + + +/* + * addsettings() - add a deferred "set" command to a target. + * + * Adds a variable setting (varname=list) onto a chain of settings for a + * particular target. 'flag' controls the relationship between new and old + * values in the same way as in var_set() function (see variable.c). Returns the + * head of the settings chain. + */ + +settings_ptr addsettings( settings_ptr head, int flag, object_ptr symbol, + list_ptr value ) +{ + settings_ptr v; + + /* Look for previous settings. */ + for ( v = head; v; v = v->next ) + if ( object_equal( v->symbol, symbol ) ) + break; + + /* If not previously set, alloc a new. */ + /* If appending, do so. */ + /* Else free old and set new. */ + if ( !v ) + { + v = settings_freelist; + if ( v ) + settings_freelist = v->next; + else + v = (settings_ptr)BJAM_MALLOC( sizeof( *v ) ); + + v->symbol = object_copy( symbol ); + v->value = value; + v->next = head; + head = v; + } + else if ( flag == VAR_APPEND ) + { + v->value = list_append( v->value, value ); + } + else if ( flag != VAR_DEFAULT ) + { + list_free( v->value ); + v->value = value; + } + else + list_free( value ); + + /* Return (new) head of list. */ + return head; +} + + +/* + * pushsettings() - set all target specific variables. + */ + +void pushsettings( module_ptr module, settings_ptr v ) +{ + for ( ; v; v = v->next ) + v->value = var_swap( module, v->symbol, v->value ); +} + + +/* + * popsettings() - reset target specific variables to their pre-push values. + */ + +void popsettings( module_ptr module, settings_ptr v ) +{ + pushsettings( module, v ); /* just swap again */ +} + + +/* + * copysettings() - duplicate a settings list, returning the new copy. + */ + +settings_ptr copysettings( settings_ptr head ) +{ + settings_ptr copy = 0; + settings_ptr v; + for ( v = head; v; v = v->next ) + copy = addsettings( copy, VAR_SET, v->symbol, list_copy( v->value ) ); + return copy; +} + + +/* + * freeactions() - delete an action list. + */ + +void freeactions( actions_ptr chain ) +{ + while ( chain ) + { + actions_ptr const n = chain->next; + action_free( chain->action ); + BJAM_FREE( chain ); + chain = n; + } +} + + +/* + * freesettings() - delete a settings list. + */ + +void freesettings( settings_ptr v ) +{ + while ( v ) + { + settings_ptr const n = v->next; + object_free( v->symbol ); + list_free( v->value ); + v->next = settings_freelist; + settings_freelist = v; + v = n; + } +} + + +static void freetarget( target_ptr const t, void * ) +{ + if ( t->name ) object_free ( t->name ); + if ( t->boundname ) object_free ( t->boundname ); + if ( t->settings ) freesettings( t->settings ); + if ( t->depends ) t->depends.reset(); + if ( t->dependants ) t->dependants.reset(); + if ( t->parents ) t->parents.reset(); + if ( t->actions ) freeactions ( t->actions ); + if ( t->includes ) + { + freetarget( t->includes, (void *)0 ); + BJAM_FREE( t->includes ); + } + t->~_target(); +} + + +/* + * rules_done() - free RULE and TARGET tables. + */ + +void rules_done() +{ + if ( targethash ) + { + hash_enumerate( targethash, freetarget ); + hashdone( targethash ); + } + while ( settings_freelist ) + { + settings_ptr const n = settings_freelist->next; + BJAM_FREE( settings_freelist ); + settings_freelist = n; + } +} + + +/* + * actions_refer() - add a new reference to the given actions. + */ + +void actions_refer( rule_actions_ptr a ) +{ + ++a->reference_count; +} + + +/* + * actions_free() - release a reference to given actions. + */ + +void actions_free( rule_actions_ptr a ) +{ + if ( --a->reference_count <= 0 ) + { + function_free( a->command ); + list_free( a->bindlist ); + BJAM_FREE( a ); + } +} + + +/* + * set_rule_body() - set the argument list and procedure of the given rule. + */ + +static void set_rule_body( rule_ptr rule, function_ptr procedure ) +{ + if ( procedure ) + function_refer( procedure ); + if ( rule->procedure ) + function_free( rule->procedure ); + rule->procedure = procedure; +} + + +/* + * global_name() - given a rule, return the name for a corresponding rule in the + * global module. + */ + +static object_ptr global_rule_name( rule_ptr r ) +{ + if ( r->module == root_module() ) + return object_copy( r->name ); + + { + char name[ 4096 ] = ""; + if ( r->module->name ) + { + strncat( name, object_str( r->module->name ), sizeof( name ) - 1 ); + strncat( name, ".", sizeof( name ) - 1 ); + } + strncat( name, object_str( r->name ), sizeof( name ) - 1 ); + return object_new( name ); + } +} + + +/* + * global_rule() - given a rule, produce a corresponding entry in the global + * module. + */ + +static rule_ptr global_rule( rule_ptr r ) +{ + if ( r->module == root_module() ) + return r; + + { + object_ptr const name = global_rule_name( r ); + rule_ptr const result = define_rule( r->module, name, root_module() ); + object_free( name ); + return result; + } +} + + +/* + * new_rule_body() - make a new rule named rulename in the given module, with + * the given argument list and procedure. If exported is true, the rule is + * exported to the global module as modulename.rulename. + */ + +rule_ptr new_rule_body( module_ptr m, object_ptr rulename, function_ptr procedure, + int exported ) +{ + rule_ptr const local = define_rule( m, rulename, m ); + local->exported = exported; + set_rule_body( local, procedure ); + + /* Mark the procedure with the global rule name, regardless of whether the + * rule is exported. That gives us something reasonably identifiable that we + * can use, e.g. in profiling output. Only do this once, since this could be + * called multiple times with the same procedure. + */ + if ( !function_rulename( procedure ) ) + function_set_rulename( procedure, global_rule_name( local ) ); + + return local; +} + + +static void set_rule_actions( rule_ptr rule, rule_actions_ptr actions ) +{ + if ( actions ) + actions_refer( actions ); + if ( rule->actions ) + actions_free( rule->actions ); + rule->actions = actions; +} + + +static rule_actions_ptr actions_new( function_ptr command, list_ptr bindlist, + int flags ) +{ + rule_actions_ptr const result = (rule_actions_ptr)BJAM_MALLOC( sizeof( + rule_actions ) ); + function_refer( command ); + result->command = command; + result->bindlist = bindlist; + result->flags = flags; + result->reference_count = 0; + return result; +} + + +rule_ptr new_rule_actions( module_ptr m, object_ptr rulename, function_ptr command, + list_ptr bindlist, int flags ) +{ + rule_ptr const local = define_rule( m, rulename, m ); + rule_ptr const global = global_rule( local ); + set_rule_actions( local, actions_new( command, bindlist, flags ) ); + set_rule_actions( global, local->actions ); + return local; +} + + +/* + * Looks for a rule in the specified module, and returns it, if found. First + * checks if the rule is present in the module's rule table. Second, if the + * rule's name is in the form name1.name2 and name1 is in the list of imported + * modules, look in module 'name1' for rule 'name2'. + */ + +rule_ptr lookup_rule( object_ptr rulename, module_ptr m, int local_only ) +{ + rule_ptr r; + rule_ptr result = 0; + module_ptr original_module = m; + + if ( m->class_module ) + m = m->class_module; + + if ( m->rules && ( r = (rule_ptr)hash_find( m->rules, rulename ) ) ) + result = r; + else if ( !local_only && m->imported_modules ) + { + /* Try splitting the name into module and rule. */ + const char * p = strchr( object_str( rulename ), '.' ) ; + if ( p ) + { + /* Now, r->name keeps the module name, and p + 1 keeps the rule + * name. + */ + object_ptr rule_part = object_new( p + 1 ); + object_ptr module_part; + { + string buf[ 1 ]; + string_new( buf ); + string_append_range( buf, object_str( rulename ), p ); + module_part = object_new( buf->value ); + string_free( buf ); + } + if ( hash_find( m->imported_modules, module_part ) ) + result = lookup_rule( rule_part, bindmodule( module_part ), 1 ); + object_free( module_part ); + object_free( rule_part ); + } + } + + if ( result ) + { + if ( local_only && !result->exported ) + result = 0; + else if ( original_module != m ) + { + /* Lookup started in class module. We have found a rule in class + * module, which is marked for execution in that module, or in some + * instance. Mark it for execution in the instance where we started + * the lookup. + */ + int const execute_in_class = result->module == m; + int const execute_in_some_instance = + result->module->class_module == m; + if ( execute_in_class || execute_in_some_instance ) + result->module = original_module; + } + } + + return result; +} + + +rule_ptr bindrule( object_ptr rulename, module_ptr m ) +{ + rule_ptr result = lookup_rule( rulename, m, 0 ); + if ( !result ) + result = lookup_rule( rulename, root_module(), 0 ); + /* We have only one caller, 'evaluate_rule', which will complain about + * calling an undefined rule. We could issue the error here, but we do not + * have the necessary information, such as frame. + */ + if ( !result ) + result = enter_rule( rulename, m ); + return result; +} + + +rule_ptr import_rule( rule_ptr source, module_ptr m, object_ptr name ) +{ + rule_ptr const dest = define_rule( source->module, name, m ); + set_rule_body( dest, source->procedure ); + set_rule_actions( dest, source->actions ); + return dest; +} + + +void rule_localize( rule_ptr rule, module_ptr m ) +{ + rule->module = m; + if ( rule->procedure ) + { + function_ptr procedure = function_unbind_variables( rule->procedure ); + function_refer( procedure ); + function_free( rule->procedure ); + rule->procedure = procedure; + } +} diff --git a/src/boost/tools/build/src/engine/rules.h b/src/boost/tools/build/src/engine/rules.h new file mode 100644 index 000000000..41e84c011 --- /dev/null +++ b/src/boost/tools/build/src/engine/rules.h @@ -0,0 +1,294 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2022 René Ferdinand Rivera Morell + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * rules.h - targets, rules, and related information + * + * This file describes the structures holding the targets, rules, and related + * information accumulated by interpreting the statements of the jam files. + * + * The following are defined: + * + * RULE - a generic jam rule, the product of RULE and ACTIONS. + * ACTIONS - a chain of ACTIONs. + * ACTION - a RULE instance with targets and sources. + * SETTINGS - variables to set when executing a TARGET's ACTIONS. + * TARGETS - a chain of TARGETs. + * TARGET - an entity (e.g. a file) that can be built. + */ + +#ifndef RULES_DWA_20011020_H +#define RULES_DWA_20011020_H + +#include "config.h" +#include "function.h" +#include "mem.h" +#include "modules.h" +#include "timestamp.h" +#include + +typedef struct _rule RULE; +typedef struct _target TARGET; +typedef struct _targets TARGETS; +typedef struct _action ACTION; +typedef struct _actions ACTIONS; +typedef struct _settings SETTINGS; + +typedef RULE* rule_ptr; +typedef TARGET* target_ptr; +typedef TARGETS* targets_ptr; +typedef ACTION* action_ptr; +typedef ACTIONS* actions_ptr; +typedef SETTINGS* settings_ptr; + +typedef RULE& rule_ref; +typedef TARGET& target_ref; +typedef TARGETS& targets_ref; +typedef ACTION& action_ref; +typedef ACTIONS& actions_ref; +typedef SETTINGS& settings_ref; + +using rule_uptr = b2::jam::unique_jptr<_rule>; +using target_uptr = b2::jam::unique_jptr<_target>; +using targets_uptr = b2::jam::unique_jptr<_targets>; +using action_uptr = b2::jam::unique_jptr<_action>; +using actions_uptr = b2::jam::unique_jptr<_actions>; +using settings_uptr = b2::jam::unique_jptr<_settings>; + +/* RULE - a generic jam rule, the product of RULE and ACTIONS. */ + +/* Build actions corresponding to a rule. */ +struct rule_actions { + int reference_count; + function_ptr command; /* command string from ACTIONS */ + list_ptr bindlist; + int flags; /* modifiers on ACTIONS */ +}; + +#define RULE_NEWSRCS 0x01 /* $(>) is updated sources only */ +#define RULE_TOGETHER 0x02 /* combine actions on single target */ +#define RULE_IGNORE 0x04 /* ignore return status of executes */ +#define RULE_QUIETLY 0x08 /* do not mention it unless verbose */ +#define RULE_PIECEMEAL 0x10 /* split exec so each $(>) is small */ +#define RULE_EXISTING 0x20 /* $(>) is pre-existing sources only */ + +typedef struct rule_actions* rule_actions_ptr; + +struct _rule { + object_ptr name; + function_ptr procedure; + rule_actions_ptr actions; /* build actions, or NULL for no actions */ + module_ptr module; /* module in which this rule is executed */ + int exported; /* nonzero if this rule is supposed to appear in + * the global module and be automatically + * imported into other modules + */ +}; + +/* ACTIONS - a chain of ACTIONs. */ +struct _actions { + actions_ptr next; + actions_ptr tail; /* valid only for head */ + action_ptr action; +}; + +/* ACTION - a RULE instance with targets and sources. */ +struct _action { + rule_ptr rule; + targets_uptr targets; + targets_uptr sources; /* aka $(>) */ + char running; /* has been started */ +#define A_INIT 0 +#define A_RUNNING_NOEXEC 1 +#define A_RUNNING 2 + int refs; + + /* WARNING: These variables are used to pass state required by make1cmds and + * are not valid anywhere else. + */ + void* first_cmd; /* Pointer to the first CMD created by this action */ + void* last_cmd; /* Pointer to the last CMD created by this action */ +}; + +/* SETTINGS - variables to set when executing a TARGET's ACTIONS. */ +struct _settings { + settings_ptr next; + object_ptr symbol; /* symbol name for var_set() */ + list_ptr value; /* symbol value for var_set() */ +}; + +/* TARGETS - a chain of TARGETs. */ +struct _targets { + targets_uptr next = nullptr; + targets_ptr tail = nullptr; /* valid only for head */ + target_ptr target = nullptr; + + ~_targets() + { + targets_uptr sink = std::move(next); + while ( sink ) sink = std::move(sink->next); + } +}; + +/* TARGET - an entity (e.g. a file) that can be built. */ +struct _target { + object_ptr name; + object_ptr boundname; /* if search() relocates target */ + actions_ptr actions; /* rules to execute, if any */ + settings_ptr settings; /* variables to define */ + + targets_uptr depends; /* dependencies */ + targets_uptr dependants; /* the inverse of dependencies */ + targets_uptr rebuilds; /* targets that should be force-rebuilt + * whenever this one is + */ + target_ptr includes; /* internal includes node */ + + timestamp time; /* update time */ + timestamp leaf; /* update time of leaf sources */ + + short flags; /* status info */ + +#define T_FLAG_TEMP 0x0001 /* TEMPORARY applied */ +#define T_FLAG_NOCARE 0x0002 /* NOCARE applied */ +#define T_FLAG_NOTFILE 0x0004 /* NOTFILE applied */ +#define T_FLAG_TOUCHED 0x0008 /* ALWAYS applied or -t target */ +#define T_FLAG_LEAVES 0x0010 /* LEAVES applied */ +#define T_FLAG_NOUPDATE 0x0020 /* NOUPDATE applied */ +#define T_FLAG_VISITED 0x0040 /* CWM: Used in debugging */ + +/* This flag has been added to support a new built-in rule named "RMBAD". It is + * used to force removal of outdated targets whose dependencies fail to build. + */ +#define T_FLAG_RMOLD 0x0080 /* RMBAD applied */ + +/* This flag was added to support a new built-in rule named "FAIL_EXPECTED" used + * to indicate that the result of running a given action should be inverted, + * i.e. ok <=> fail. Useful for launching certain test runs from a Jamfile. + */ +#define T_FLAG_FAIL_EXPECTED 0x0100 /* FAIL_EXPECTED applied */ + +#define T_FLAG_INTERNAL 0x0200 /* internal INCLUDES node */ + +/* Indicates that the target must be a file. Prevents matching non-files, like + * directories, when a target is searched. + */ +#define T_FLAG_ISFILE 0x0400 + +#define T_FLAG_PRECIOUS 0x0800 + + char binding; /* how target relates to a real file or + * folder + */ + +#define T_BIND_UNBOUND 0 /* a disembodied name */ +#define T_BIND_MISSING 1 /* could not find real file */ +#define T_BIND_PARENTS 2 /* using parent's timestamp */ +#define T_BIND_EXISTS 3 /* real file, timestamp valid */ + + char fate; /* make0()'s diagnosis */ + +#define T_FATE_INIT 0 /* nothing done to target */ +#define T_FATE_MAKING 1 /* make0(target) on stack */ + +#define T_FATE_STABLE 2 /* target did not need updating */ +#define T_FATE_NEWER 3 /* target newer than parent */ + +#define T_FATE_SPOIL 4 /* >= SPOIL rebuilds parents */ +#define T_FATE_ISTMP 4 /* unneeded temp target oddly present */ + +#define T_FATE_BUILD 5 /* >= BUILD rebuilds target */ +#define T_FATE_TOUCHED 5 /* manually touched with -t */ +#define T_FATE_REBUILD 6 +#define T_FATE_MISSING 7 /* is missing, needs updating */ +#define T_FATE_NEEDTMP 8 /* missing temp that must be rebuild */ +#define T_FATE_OUTDATED 9 /* is out of date, needs updating */ +#define T_FATE_UPDATE 10 /* deps updated, needs updating */ + +#define T_FATE_BROKEN 11 /* >= BROKEN ruins parents */ +#define T_FATE_CANTFIND 11 /* no rules to make missing target */ +#define T_FATE_CANTMAKE 12 /* can not find dependencies */ + + char progress; /* tracks make1() progress */ + +#define T_MAKE_INIT 0 /* make1(target) not yet called */ +#define T_MAKE_ONSTACK 1 /* make1(target) on stack */ +#define T_MAKE_ACTIVE 2 /* make1(target) in make1b() */ +#define T_MAKE_RUNNING 3 /* make1(target) running commands */ +#define T_MAKE_DONE 4 /* make1(target) done */ +#define T_MAKE_NOEXEC_DONE 5 /* make1(target) done with -n in effect */ + +#ifdef OPT_SEMAPHORE +#define T_MAKE_SEMAPHORE 5 /* Special target type for semaphores */ +#endif + + char status; /* exec_cmd() result */ + +#ifdef OPT_SEMAPHORE + target_ptr semaphore; /* used in serialization */ +#endif + + int asynccnt; /* child deps outstanding */ + targets_uptr parents; /* used by make1() for completion */ + target_ptr scc_root; /* used by make to resolve cyclic includes + */ + target_ptr rescanning; /* used by make0 to mark visited targets + * when rescanning + */ + int depth; /* The depth of the target in the make0 + * stack. + */ + char* cmds; /* type-punned command list */ + + char const* failed; +}; + +/* Action related functions. */ +void action_free(action_ptr); +actions_ptr actionlist(actions_ptr, action_ptr); +void freeactions(actions_ptr); +settings_ptr addsettings(settings_ptr, int flag, object_ptr symbol, list_ptr value); +void pushsettings(module_ptr, settings_ptr); +void popsettings(module_ptr, settings_ptr); +settings_ptr copysettings(settings_ptr); +void freesettings(settings_ptr); +void actions_refer(rule_actions_ptr); +void actions_free(rule_actions_ptr); + +/* Rule related functions. */ +rule_ptr bindrule(object_ptr rulename, module_ptr); +rule_ptr import_rule(rule_ptr source, module_ptr, object_ptr name); +void rule_localize(rule_ptr rule, module_ptr module); +rule_ptr new_rule_body(module_ptr, object_ptr rulename, function_ptr func, int exprt); +rule_ptr new_rule_actions(module_ptr, object_ptr rulename, function_ptr command, list_ptr bindlist, int flags); +void rule_free(rule_ptr); + +/* Target related functions. */ +void bind_explicitly_located_targets(); +target_ptr bindtarget(object_ptr const); +targets_uptr targetchain(targets_uptr, targets_uptr); +void targetentry(targets_uptr&, target_ptr); +void target_include(target_ptr const including, + target_ptr const included); +void target_include_many(target_ptr const including, + list_ptr const included_names); +void targetlist(targets_uptr&, list_ptr target_names); +void touch_target(object_ptr const); +void clear_includes(target_ptr); +target_ptr target_scc(target_ptr); +targets_uptr targets_pop(targets_uptr); + +/* Final module cleanup. */ +void rules_done(); + +#endif diff --git a/src/boost/tools/build/src/engine/scan.cpp b/src/boost/tools/build/src/engine/scan.cpp new file mode 100644 index 000000000..67948a095 --- /dev/null +++ b/src/boost/tools/build/src/engine/scan.cpp @@ -0,0 +1,738 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * scan.c - the jam yacc scanner + * + */ + +#include "jam.h" +#include "scan.h" +#include "output.h" + +#include "constants.h" +#include "jamgram.hpp" + + +struct keyword +{ + const char * word; + int type; +} keywords[] = +{ +#include "jamgramtab.h" + { 0, 0 } +}; + +typedef struct include include; +struct include +{ + include * next; /* next serial include file */ + char * string; /* pointer into current line */ + char * * strings; /* for yyfparse() -- text to parse */ + LISTITER pos; /* for yysparse() -- text to parse */ + LIST * list; /* for yysparse() -- text to parse */ + FILE * file; /* for yyfparse() -- file being read */ + OBJECT * fname; /* for yyfparse() -- file name */ + int line; /* line counter for error messages */ + char buf[ 512 ]; /* for yyfparse() -- line buffer */ +}; + +static include * incp = 0; /* current file; head of chain */ + +static int scanmode = SCAN_NORMAL; +static int anyerrors = 0; + + +static char * symdump( YYSTYPE * ); + +#define BIGGEST_TOKEN 10240 /* no single token can be larger */ + + +/* + * Set parser mode: normal, string, or keyword. + */ + +int yymode( int n ) +{ + int result = scanmode; + scanmode = n; + return result; +} + + +void yyerror( char const * s ) +{ + /* We use yylval instead of incp to access the error location information as + * the incp pointer will already be reset to 0 in case the error occurred at + * EOF. + * + * The two may differ only if ran into an unexpected EOF or we get an error + * while reading a lexical token spanning multiple lines, e.g. a multi-line + * string literal or action body, in which case yylval location information + * will hold the information about where the token started while incp will + * hold the information about where reading it broke. + */ + out_printf( "%s:%d: %s at %s\n", object_str( yylval.file ), yylval.line, s, + symdump( &yylval ) ); + ++anyerrors; +} + + +int yyanyerrors() +{ + return anyerrors != 0; +} + + +void yyfparse( OBJECT * s ) +{ + include * i = (include *)BJAM_MALLOC( sizeof( *i ) ); + + /* Push this onto the incp chain. */ + i->string = (char*)""; + i->strings = 0; + i->file = 0; + i->fname = object_copy( s ); + i->line = 0; + i->next = incp; + incp = i; +} + + +void yysparse( OBJECT * name, const char * * lines ) +{ + yyfparse( name ); + incp->strings = (char * *)lines; +} + + +/* + * yyfdone() - cleanup after we're done parsing a file. + */ +void yyfdone( void ) +{ + include * const i = incp; + incp = i->next; + + /* Close file, free name. */ + if(i->file && (i->file != stdin)) + fclose(i->file); + object_free(i->fname); + BJAM_FREE((char *)i); +} + + +/* + * yyline() - read new line and return first character. + * + * Fabricates a continuous stream of characters across include files, returning + * EOF at the bitter end. + */ + +int yyline() +{ + include * const i = incp; + + if ( !incp ) + return EOF; + + /* Once we start reading from the input stream, we reset the include + * insertion point so that the next include file becomes the head of the + * list. + */ + + /* If there is more data in this line, return it. */ + if ( *i->string ) + return *i->string++; + + /* If we are reading from an internal string list, go to the next string. */ + if ( i->strings ) + { + if ( *i->strings ) + { + ++i->line; + i->string = *(i->strings++); + return *i->string++; + } + } + else + { + /* If necessary, open the file. */ + if ( !i->file ) + { + FILE * f = stdin; + if ( strcmp( object_str( i->fname ), "-" ) && !( f = fopen( object_str( i->fname ), "r" ) ) ) + errno_puts( object_str( i->fname ) ); + i->file = f; + } + + /* If there is another line in this file, start it. */ + if ( i->file && fgets( i->buf, sizeof( i->buf ), i->file ) ) + { + ++i->line; + i->string = i->buf; + return *i->string++; + } + } + + /* This include is done. Return EOF so yyparse() returns to + * parse_file(). + */ + + return EOF; +} + +/* This allows us to get an extra character of lookahead. + * There are a few places where we need to look ahead two + * characters and yyprev only guarantees a single character + * of putback. + */ +int yypeek() +{ + if ( *incp->string ) + { + return *incp->string; + } + else if ( incp->strings ) + { + if ( *incp->strings ) + return **incp->strings; + } + else if ( incp->file ) + { + /* Don't bother opening the file. yypeek is + * only used in special cases and never at the + * beginning of a file. + */ + int ch = fgetc( incp->file ); + if ( ch != EOF ) + ungetc( ch, incp->file ); + return ch; + } + return EOF; +} + +/* + * yylex() - set yylval to current token; return its type. + * + * Macros to move things along: + * + * yychar() - return and advance character; invalid after EOF. + * yyprev() - back up one character; invalid before yychar(). + * + * yychar() returns a continuous stream of characters, until it hits the EOF of + * the current include file. + */ + +#define yychar() ( *incp->string ? *incp->string++ : yyline() ) +#define yyprev() ( incp->string-- ) + +static int use_new_scanner = 0; + +#define yystartkeyword() if(use_new_scanner) break; else token_warning() +#define yyendkeyword() if(use_new_scanner) break; else if ( 1 ) { expect_whitespace = 1; continue; } else (void)0 + +void do_token_warning() +{ + out_printf( "%s:%d: %s %s\n", object_str( yylval.file ), yylval.line, "Unescaped special character in", + symdump( &yylval ) ); +} + +#define token_warning() has_token_warning = 1 + +int yylex() +{ + int c; + char buf[ BIGGEST_TOKEN ]; + char * b = buf; + + if ( !incp ) + goto eof; + + /* Get first character (whitespace or of token). */ + c = yychar(); + + if ( scanmode == SCAN_STRING ) + { + /* If scanning for a string (action's {}'s), look for the closing brace. + * We handle matching braces, if they match. + */ + + int nest = 1; + + while ( ( c != EOF ) && ( b < buf + sizeof( buf ) ) ) + { + if ( c == '{' ) + ++nest; + + if ( ( c == '}' ) && !--nest ) + break; + + *b++ = c; + + c = yychar(); + + /* Turn trailing "\r\n" sequences into plain "\n" for Cygwin. */ + if ( ( c == '\n' ) && ( b[ -1 ] == '\r' ) ) + --b; + } + + /* We ate the ending brace -- regurgitate it. */ + if ( c != EOF ) + yyprev(); + + /* Check for obvious errors. */ + if ( b == buf + sizeof( buf ) ) + { + yyerror( "action block too big" ); + goto eof; + } + + if ( nest ) + { + yyerror( "unmatched {} in action block" ); + goto eof; + } + + *b = 0; + yylval.type = STRING; + yylval.string = object_new( buf ); + yylval.file = incp->fname; + yylval.line = incp->line; + } + else + { + char * b = buf; + struct keyword * k; + int inquote = 0; + int notkeyword; + int hastoken = 0; + int hasquote = 0; + int ingrist = 0; + int invarexpand = 0; + int expect_whitespace = 0; + int has_token_warning = 0; + + /* Eat white space. */ + for ( ; ; ) + { + /* Skip past white space. */ + while ( ( c != EOF ) && isspace( c ) ) + c = yychar(); + + /* Not a comment? */ + if ( c != '#' ) + break; + + c = yychar(); + if ( ( c != EOF ) && c == '|' ) + { + /* Swallow up block comment. */ + int c0 = yychar(); + int c1 = yychar(); + while ( ! ( c0 == '|' && c1 == '#' ) && ( c0 != EOF && c1 != EOF ) ) + { + c0 = c1; + c1 = yychar(); + } + c = yychar(); + } + else + { + /* Swallow up comment line. */ + while ( ( c != EOF ) && ( c != '\n' ) ) c = yychar(); + } + } + + /* c now points to the first character of a token. */ + if ( c == EOF ) + goto eof; + + yylval.file = incp->fname; + yylval.line = incp->line; + + /* While scanning the word, disqualify it for (expensive) keyword lookup + * when we can: $anything, "anything", \anything + */ + notkeyword = c == '$'; + + /* Look for white space to delimit word. "'s get stripped but preserve + * white space. \ protects next character. + */ + while + ( + ( c != EOF ) && + ( b < buf + sizeof( buf ) ) && + ( inquote || invarexpand || !isspace( c ) ) + ) + { + if ( expect_whitespace || ( isspace( c ) && ! inquote ) ) + { + token_warning(); + expect_whitespace = 0; + } + if ( !inquote && !invarexpand ) + { + if ( scanmode == SCAN_COND || scanmode == SCAN_CONDB ) + { + if ( hastoken && ( c == '=' || c == '<' || c == '>' || c == '!' || c == '(' || c == ')' || c == '&' || c == '|' ) ) + { + /* Don't treat > as special if we started with a grist. */ + if ( ! ( scanmode == SCAN_CONDB && ingrist == 1 && c == '>' ) ) + { + yystartkeyword(); + } + } + else if ( c == '=' || c == '(' || c == ')' ) + { + *b++ = c; + c = yychar(); + yyendkeyword(); + } + else if ( c == '!' || ( scanmode == SCAN_COND && ( c == '<' || c == '>' ) ) ) + { + *b++ = c; + if ( ( c = yychar() ) == '=' ) + { + *b++ = c; + c = yychar(); + } + yyendkeyword(); + } + else if ( c == '&' || c == '|' ) + { + *b++ = c; + if ( yychar() == c ) + { + *b++ = c; + c = yychar(); + } + yyendkeyword(); + } + } + else if ( scanmode == SCAN_PARAMS ) + { + if ( c == '*' || c == '+' || c == '?' || c == '(' || c == ')' ) + { + if ( !hastoken ) + { + *b++ = c; + c = yychar(); + yyendkeyword(); + } + else + { + yystartkeyword(); + } + } + } + else if ( scanmode == SCAN_XASSIGN && ! hastoken ) + { + if ( c == '=' ) + { + *b++ = c; + c = yychar(); + yyendkeyword(); + } + else if ( c == '+' || c == '?' ) + { + if ( yypeek() == '=' ) + { + *b++ = c; + *b++ = yychar(); + c = yychar(); + yyendkeyword(); + } + } + } + else if ( scanmode == SCAN_NORMAL || scanmode == SCAN_ASSIGN ) + { + if ( c == '=' ) + { + if ( !hastoken ) + { + *b++ = c; + c = yychar(); + yyendkeyword(); + } + else + { + yystartkeyword(); + } + } + else if ( c == '+' || c == '?' ) + { + if ( yypeek() == '=' ) + { + if ( hastoken ) + { + yystartkeyword(); + } + else + { + *b++ = c; + *b++ = yychar(); + c = yychar(); + yyendkeyword(); + } + } + } + } + if ( scanmode != SCAN_CASE && ( c == ';' || c == '{' || c == '}' || + ( scanmode != SCAN_PARAMS && ( c == '[' || c == ']' ) ) ) ) + { + if ( ! hastoken ) + { + *b++ = c; + c = yychar(); + yyendkeyword(); + } + else + { + yystartkeyword(); + } + } + else if ( c == ':' ) + { + if ( ! hastoken ) + { + *b++ = c; + c = yychar(); + yyendkeyword(); + break; + } + else if ( hasquote ) + { + /* Special rules for ':' do not apply after we quote anything. */ + yystartkeyword(); + } + else if ( ingrist == 0 ) + { + int next = yychar(); + int is_win_path = 0; + int is_conditional = 0; + if ( next == '\\' ) + { + if( yypeek() == '\\' ) + { + is_win_path = 1; + } + } + else if ( next == '/' ) + { + is_win_path = 1; + } + yyprev(); + if ( is_win_path ) + { + /* Accept windows paths iff they are at the start or immediately follow a grist. */ + if ( b > buf && isalpha( b[ -1 ] ) && ( b == buf + 1 || b[ -2 ] == '>' ) ) + { + is_win_path = 1; + } + else + { + is_win_path = 0; + } + } + if ( next == '<' ) + { + /* Accept conditionals only for tokens that start with "<" or "!<" */ + if ( ( (b > buf) && (buf[ 0 ] == '<') ) || + ( (b > (buf + 1)) && (buf[ 0 ] == '!') && (buf[ 1 ] == '<') )) + { + is_conditional = 1; + } + } + if ( !is_conditional && !is_win_path ) + { + yystartkeyword(); + } + } + } + } + hastoken = 1; + if ( c == '"' ) + { + /* begin or end " */ + inquote = !inquote; + hasquote = 1; + notkeyword = 1; + } + else if ( c != '\\' ) + { + if ( !invarexpand && c == '<' ) + { + if ( ingrist == 0 ) ingrist = 1; + else ingrist = -1; + } + else if ( !invarexpand && c == '>' ) + { + if ( ingrist == 1 ) ingrist = 0; + else ingrist = -1; + } + else if ( c == '$' ) + { + if ( ( c = yychar() ) == EOF ) + { + *b++ = '$'; + break; + } + else if ( c == '(' ) + { + /* inside $(), we only care about quotes */ + *b++ = '$'; + c = '('; + ++invarexpand; + } + else + { + c = '$'; + yyprev(); + } + } + else if ( c == '@' ) + { + if ( ( c = yychar() ) == EOF ) + { + *b++ = '@'; + break; + } + else if ( c == '(' ) + { + /* inside @(), we only care about quotes */ + *b++ = '@'; + c = '('; + ++invarexpand; + } + else + { + c = '@'; + yyprev(); + } + } + else if ( invarexpand && c == '(' ) + { + ++invarexpand; + } + else if ( invarexpand && c == ')' ) + { + --invarexpand; + } + /* normal char */ + *b++ = c; + } + else if ( ( c = yychar() ) != EOF ) + { + /* \c */ + if (c == 'n') + c = '\n'; + else if (c == 'r') + c = '\r'; + else if (c == 't') + c = '\t'; + *b++ = c; + notkeyword = 1; + } + else + { + /* \EOF */ + break; + } + + c = yychar(); + } + + /* Automatically switch modes after reading the token. */ + if ( scanmode == SCAN_CONDB ) + scanmode = SCAN_COND; + + /* Check obvious errors. */ + if ( b == buf + sizeof( buf ) ) + { + yyerror( "string too big" ); + goto eof; + } + + if ( inquote ) + { + yyerror( "unmatched \" in string" ); + goto eof; + } + + /* We looked ahead a character - back up. */ + if ( c != EOF ) + yyprev(); + + /* Scan token table. Do not scan if it is obviously not a keyword or if + * it is an alphabetic when were looking for punctuation. + */ + + *b = 0; + yylval.type = ARG; + + if ( !notkeyword && !( isalpha( *buf ) && ( scanmode == SCAN_PUNCT || scanmode == SCAN_PARAMS || scanmode == SCAN_ASSIGN ) ) ) + for ( k = keywords; k->word; ++k ) + if ( ( *buf == *k->word ) && !strcmp( k->word, buf ) ) + { + yylval.type = k->type; + yylval.keyword = k->word; /* used by symdump */ + break; + } + + if ( yylval.type == ARG ) + yylval.string = object_new( buf ); + + if ( scanmode == SCAN_NORMAL && yylval.type == ARG ) + scanmode = SCAN_XASSIGN; + + if ( has_token_warning ) + do_token_warning(); + } + + if ( DEBUG_SCAN ) + out_printf( "scan %s\n", symdump( &yylval ) ); + + return yylval.type; + +eof: + /* We do not reset yylval.file & yylval.line here so unexpected EOF error + * messages would include correct error location information. + */ + yylval.type = EOF; + return yylval.type; +} + + +static char * symdump( YYSTYPE * s ) +{ + static char buf[ BIGGEST_TOKEN + 20 ]; + switch ( s->type ) + { + case EOF : sprintf( buf, "EOF" ); break; + case 0 : sprintf( buf, "unknown symbol %s", object_str( s->string ) ); break; + case ARG : sprintf( buf, "argument %s" , object_str( s->string ) ); break; + case STRING: sprintf( buf, "string \"%s\"" , object_str( s->string ) ); break; + default : sprintf( buf, "keyword %s" , s->keyword ); break; + } + return buf; +} + + +/* + * Get information about the current file and line, for those epsilon + * transitions that produce a parse. + */ + +void yyinput_last_read_token( OBJECT * * name, int * line ) +{ + /* TODO: Consider whether and when we might want to report where the last + * read token ended, e.g. EOF errors inside string literals. + */ + *name = yylval.file; + *line = yylval.line; +} diff --git a/src/boost/tools/build/src/engine/scan.h b/src/boost/tools/build/src/engine/scan.h new file mode 100644 index 000000000..2ad736ad6 --- /dev/null +++ b/src/boost/tools/build/src/engine/scan.h @@ -0,0 +1,71 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * scan.h - the jam yacc scanner + * + * External functions: + * yyerror( char *s ) - print a parsing error message. + * yyfparse( char *s ) - scan include file s. + * yylex() - parse the next token, returning its type. + * yymode() - adjust lexicon of scanner. + * yyparse() - declaration for yacc parser. + * yyanyerrors() - indicate if any parsing errors occurred. + * + * The yymode() function is for the parser to adjust the lexicon of the scanner. + * Aside from normal keyword scanning, there is a mode to handle action strings + * (look only for the closing }) and a mode to ignore most keywords when looking + * for a punctuation keyword. This allows non-punctuation keywords to be used in + * lists without quoting. + */ + +#include "config.h" +#include "lists.h" +#include "object.h" +#include "parse.h" + + +/* + * YYSTYPE - value of a lexical token + */ + +#define YYSTYPE YYSYMBOL + +typedef struct _YYSTYPE +{ + int type; + OBJECT * string; + PARSE * parse; + LIST * list; + int number; + OBJECT * file; + int line; + char const * keyword; +} YYSTYPE; + +extern YYSTYPE yylval; + +int yymode( int n ); +void yyerror( char const * s ); +int yyanyerrors(); +void yyfparse( OBJECT * s ); +void yyfdone( void ); +void yysparse( OBJECT * name, const char * * lines ); +int yyline(); +int yylex(); +int yyparse(); +void yyinput_last_read_token( OBJECT * * name, int * line ); + +#define SCAN_NORMAL 0 /* normal parsing */ +#define SCAN_STRING 1 /* look only for matching } */ +#define SCAN_PUNCT 2 /* only punctuation keywords */ +#define SCAN_COND 3 /* look for operators that can appear in conditions. */ +#define SCAN_PARAMS 4 /* The parameters of a rule "()*?+" */ +#define SCAN_CALL 5 /* Inside a rule call. [].*/ +#define SCAN_CASE 6 /* A case statement. We only recognize ':' as special. */ +#define SCAN_CONDB 7 /* The beginning of a condition (ignores leading comparison operators, so that if in $(y) works.)*/ +#define SCAN_ASSIGN 8 /* The list may be terminated by an assignment operator. */ +#define SCAN_XASSIGN 9 /* The next token might be an assignment, but to token afterwards cannot. */ diff --git a/src/boost/tools/build/src/engine/search.cpp b/src/boost/tools/build/src/engine/search.cpp new file mode 100644 index 000000000..8b916e102 --- /dev/null +++ b/src/boost/tools/build/src/engine/search.cpp @@ -0,0 +1,275 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "jam.h" +#include "search.h" + +#include "compile.h" +#include "filesys.h" +#include "hash.h" +#include "lists.h" +#include "object.h" +#include "pathsys.h" +#include "jam_strings.h" +#include "timestamp.h" +#include "variable.h" +#include "output.h" + +#include + + +typedef struct _binding +{ + OBJECT * binding; + OBJECT * target; +} BINDING; + +static struct hash * explicit_bindings = 0; + + +void call_bind_rule( OBJECT * target_, OBJECT * boundname_ ) +{ + LIST * const bind_rule = var_get( root_module(), constant_BINDRULE ); + if ( !list_empty( bind_rule ) ) + { + OBJECT * target = object_copy( target_ ); + OBJECT * boundname = object_copy( boundname_ ); + if ( boundname && target ) + { + /* Prepare the argument list. */ + FRAME frame[ 1 ]; + frame_init( frame ); + + /* First argument is the target name. */ + lol_add( frame->args, list_new( target ) ); + + lol_add( frame->args, list_new( boundname ) ); + if ( lol_get( frame->args, 1 ) ) + { + OBJECT * rulename = list_front( bind_rule ); + list_free( evaluate_rule( bindrule( rulename, root_module() ), rulename, frame ) ); + } + + /* Clean up */ + frame_free( frame ); + } + else + { + if ( boundname ) + object_free( boundname ); + if ( target ) + object_free( target ); + } + } +} + +/* Records the binding of a target with an explicit LOCATE. */ +void set_explicit_binding( OBJECT * target, OBJECT * locate ) +{ + OBJECT * boundname; + OBJECT * key; + PATHNAME f[ 1 ]; + string buf[ 1 ]; + int found; + BINDING * ba; + + if ( !explicit_bindings ) + explicit_bindings = hashinit( sizeof( BINDING ), "explicitly specified " + "locations" ); + + string_new( buf ); + + /* Parse the filename. */ + path_parse( object_str( target ), f ); + + /* Ignore the grist. */ + f->f_grist.ptr = 0; + f->f_grist.len = 0; + + /* Root the target path at the given location. */ + f->f_root.ptr = object_str( locate ); + f->f_root.len = int32_t(strlen( object_str( locate ) )); + + path_build( f, buf ); + boundname = object_new( buf->value ); + if ( DEBUG_SEARCH ) + out_printf( "explicit locate %s: %s\n", object_str( target ), buf->value ); + string_free( buf ); + key = path_as_key( boundname ); + object_free( boundname ); + + ba = (BINDING *)hash_insert( explicit_bindings, key, &found ); + if ( !found ) + { + ba->binding = key; + ba->target = target; + } + else + object_free( key ); +} + +/* + * search.c - find a target along $(SEARCH) or $(LOCATE). + * + * First, check if LOCATE is set. If so, use it to determine the location of + * target and return, regardless of whether anything exists at that location. + * + * Second, examine all directories in SEARCH. If the file exists there or there + * is another target with the same name already placed at this location via the + * LOCATE setting, stop and return the location. In case of a previous target, + * return its name via the 'another_target' argument. + * + * This behaviour allows handling dependencies on generated files. + * + * If caller does not expect that the target is generated, 0 can be passed as + * 'another_target'. + */ + +OBJECT * search( OBJECT * target, timestamp * const time, + OBJECT * * another_target, int const file ) +{ + PATHNAME f[ 1 ]; + LIST * varlist; + string buf[ 1 ]; + int found = 0; + OBJECT * boundname = 0; + + if ( another_target ) + *another_target = 0; + + if ( !explicit_bindings ) + explicit_bindings = hashinit( sizeof( BINDING ), "explicitly specified " + "locations" ); + + string_new( buf ); + + /* Parse the filename. */ + path_parse( object_str( target ), f ); + + f->f_grist.ptr = 0; + f->f_grist.len = 0; + + varlist = var_get( root_module(), constant_LOCATE ); + if ( !list_empty( varlist ) ) + { + OBJECT * key; + f->f_root.ptr = object_str( list_front( varlist ) ); + f->f_root.len = int32_t(strlen( object_str( list_front( varlist ) ) )); + + path_build( f, buf ); + + if ( DEBUG_SEARCH ) + out_printf( "locate %s: %s\n", object_str( target ), buf->value ); + + key = object_new( buf->value ); + timestamp_from_path( time, key ); + object_free( key ); + found = 1; + } + else if ( varlist = var_get( root_module(), constant_SEARCH ), + !list_empty( varlist ) ) + { + LISTITER iter = list_begin( varlist ); + LISTITER const end = list_end( varlist ); + for ( ; iter != end; iter = list_next( iter ) ) + { + BINDING * ba; + file_info_t * ff; + OBJECT * key; + OBJECT * test_path; + + f->f_root.ptr = object_str( list_item( iter ) ); + f->f_root.len = int32_t(strlen( object_str( list_item( iter ) ) )); + + string_truncate( buf, 0 ); + path_build( f, buf ); + + if ( DEBUG_SEARCH ) + out_printf( "search %s: %s\n", object_str( target ), buf->value ); + + test_path = object_new( buf->value ); + key = path_as_key( test_path ); + object_free( test_path ); + ff = file_query( key ); + timestamp_from_path( time, key ); + + if ( ( ba = (BINDING *)hash_find( explicit_bindings, key ) ) ) + { + if ( DEBUG_SEARCH ) + out_printf(" search %s: found explicitly located target %s\n", + object_str( target ), object_str( ba->target ) ); + if ( another_target ) + *another_target = ba->target; + found = 1; + object_free( key ); + break; + } + else if ( ff ) + { + if ( !file || ff->is_file ) + { + found = 1; + object_free( key ); + break; + } + } + object_free( key ); + } + } + + if ( !found ) + { + /* Look for the obvious. */ + /* This is a questionable move. Should we look in the obvious place if + * SEARCH is set? + */ + OBJECT * key; + + f->f_root.ptr = 0; + f->f_root.len = 0; + + string_truncate( buf, 0 ); + path_build( f, buf ); + + if ( DEBUG_SEARCH ) + out_printf( "search %s: %s\n", object_str( target ), buf->value ); + + key = object_new( buf->value ); + timestamp_from_path( time, key ); + object_free( key ); + } + + boundname = object_new( buf->value ); + string_free( buf ); + + /* Prepare a call to BINDRULE if the variable is set. */ + call_bind_rule( target, boundname ); + + return boundname; +} + + +static void free_binding( void * xbinding, void * data ) +{ + object_free( ( (BINDING *)xbinding )->binding ); +} + + +void search_done( void ) +{ + if ( explicit_bindings ) + { + hashenumerate( explicit_bindings, free_binding, 0 ); + hashdone( explicit_bindings ); + } +} diff --git a/src/boost/tools/build/src/engine/search.h b/src/boost/tools/build/src/engine/search.h new file mode 100644 index 000000000..80d69fa79 --- /dev/null +++ b/src/boost/tools/build/src/engine/search.h @@ -0,0 +1,23 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * search.h - find a target along $(SEARCH) or $(LOCATE) + */ + +#ifndef SEARCH_SW20111118_H +#define SEARCH_SW20111118_H + +#include "config.h" +#include "object.h" +#include "timestamp.h" + +void set_explicit_binding( OBJECT * target, OBJECT * locate ); +OBJECT * search( OBJECT * target, timestamp * const time, + OBJECT * * another_target, int const file ); +void search_done( void ); + +#endif diff --git a/src/boost/tools/build/src/engine/startup.cpp b/src/boost/tools/build/src/engine/startup.cpp new file mode 100644 index 000000000..6e9414ba2 --- /dev/null +++ b/src/boost/tools/build/src/engine/startup.cpp @@ -0,0 +1,270 @@ +/* +Copyright 2020 René Ferdinand Rivera Morell +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#include "startup.h" +#include "rules.h" +#include "frames.h" +#include "object.h" +#include "pathsys.h" +#include "cwd.h" +#include "filesys.h" +#include "output.h" +#include "variable.h" + +#include +#include +#include + +namespace +{ + void bind_builtin( + char const *name_, LIST *(*f)(FRAME *, int flags), + int flags, char const **args) + { + FUNCTION *func; + OBJECT *name = object_new(name_); + func = function_builtin(f, flags, args); + new_rule_body(root_module(), name, func, 1); + function_free(func); + object_free(name); + } +} // namespace + +void b2::startup::load_builtins() +{ + { + char const *args[] = {"dir", "?", 0}; + bind_builtin("boost-build", builtin_boost_build, 0, args); + } +} + +LIST *b2::startup::builtin_boost_build(FRAME *frame, int flags) +{ + b2::jam::list dir_arg{lol_get(frame->args, 0)}; + std::string dir; + if (!dir_arg.empty()) dir = b2::jam::object(*dir_arg.begin()); + + b2::jam::variable dot_bootstrap_file{".bootstrap-file"}; + if (dot_bootstrap_file) + { + err_printf( + "Error: Illegal attempt to re-bootstrap the build system by invoking\n" + "\n" + " 'boost-build '%s' ;\n" + "\n" + "Please consult the documentation at " + "'https://www.bfgroup.xyz/b2/'.\n\n", + dir.c_str()); + return L0; + } + + // # Add the given directory to the path so we can find the build system. If + // # dir is empty, has no effect. + b2::jam::variable dot_boost_build_file{".boost-build-file"}; + b2::jam::list dot_boost_build_file_val{static_cast(dot_boost_build_file)}; + std::string boost_build_jam = b2::jam::object{*dot_boost_build_file_val.begin()}; + std::string boost_build_dir; + if (b2::paths::is_rooted(dir)) + boost_build_dir = dir; + else + boost_build_dir = b2::paths::normalize( + std::string{boost_build_jam}+"/../"+dir); + b2::jam::list search_path{b2::jam::object{boost_build_dir}}; + b2::jam::variable BOOST_BUILD_PATH{"BOOST_BUILD_PATH"}; + search_path.append(BOOST_BUILD_PATH); + + // We set the global, and env, BOOST_BUILD_PATH so that the loading of the + // build system finds the initial set of modules needed for starting it up. + BOOST_BUILD_PATH = search_path; + + // The code that loads the rest of B2, in particular the site-config.jam + // and user-config.jam configuration files uses os.environ, so we need to + // update the value there. + b2::jam::variable dot_ENVIRON__BOOST_BUILD_PATH{".ENVIRON", "BOOST_BUILD_PATH"}; + dot_ENVIRON__BOOST_BUILD_PATH = search_path; + + // # Try to find the build system bootstrap file 'bootstrap.jam'. + std::string bootstrap_file; + for (auto path: search_path) + { + std::string file = b2::jam::object{path}; + file = b2::paths::normalize(file+"/bootstrap.jam"); + if (b2::filesys::is_file(file)) + { + bootstrap_file = file; + break; + } + } + + // # There is no bootstrap.jam we can find, exit with an error. + if (bootstrap_file.empty()) + { + err_printf( + "Unable to load B2: could not find build system.\n" + "-----------------------------------------------\n" + "%s attempted to load the build system by invoking\n" + "\n" + " 'boost-build %s ;'\n" + "\n" + "but we were unable to find 'bootstrap.jam' in the specified directory " + "or in BOOST_BUILD_PATH:\n", + boost_build_jam.c_str(), dir.c_str()); + for (auto path: search_path) + { + std::string file = b2::jam::object{path}; + err_printf(" %s\n", file.c_str()); + } + err_puts( + "Please consult the documentation at " + "'https://www.bfgroup.xyz/b2/'.\n\n"); + return L0; + } + + // Set the bootstrap=file var as it's used by the build system to refer to + // the rest of the build system files. + dot_bootstrap_file = b2::jam::list{b2::jam::object{bootstrap_file}}; + + // Show where we found it, if asked. + b2::jam::variable dot_OPTION__debug_configuration{".OPTION", "debug-configration"}; + if (dot_OPTION__debug_configuration) + { + out_printf("notice: loading B2 from %s\n", bootstrap_file.c_str()); + } + + // # Load the build system, now that we know where to start from. + parse_file(b2::jam::object{bootstrap_file}, frame); + + return L0; +} + +extern char const *saved_argv0; + +bool b2::startup::bootstrap(FRAME *frame) +{ + b2::jam::list ARGV = b2::jam::variable{"ARGV"}; + b2::jam::object opt_debug_configuration{"--debug-configuration"}; + b2::jam::variable dot_OPTION__debug_configuration{".OPTION", "debug-configration"}; + for (auto arg: ARGV) + { + if (opt_debug_configuration == arg) + { + dot_OPTION__debug_configuration = b2::jam::list{b2::jam::object{"true"}}; + break; + } + } + + char *b2_exe_path_pchar = executable_path(saved_argv0); + const std::string b2_exe_path{b2_exe_path_pchar}; + if (b2_exe_path_pchar) + { + std::free(b2_exe_path_pchar); + } + const std::string boost_build_jam{"boost-build.jam"}; + std::string b2_file_path; + + // Attempt to find the `boost-build.jam` boot file in work directory tree. + if (b2_file_path.empty()) + { + std::string work_dir{b2::paths::normalize(b2::cwd_str()) + "/"}; + while (b2_file_path.empty() && !work_dir.empty()) + { + if (b2::filesys::is_file(work_dir + boost_build_jam)) + b2_file_path = work_dir + boost_build_jam; + else if (work_dir.length() == 1 && work_dir[0] == '/') + work_dir.clear(); + else + { + auto parent_pos = work_dir.rfind('/', work_dir.length() - 2); + if (parent_pos != std::string::npos) + work_dir.erase(parent_pos + 1); + else + work_dir.clear(); + } + } + } + + // Check relative to the executable for portable install location. + if (b2_file_path.empty()) + { + const std::string path{ + b2::paths::normalize( + b2_exe_path + "/../.b2/kernel/" + boost_build_jam)}; + if (b2::filesys::is_file(path)) + b2_file_path = path; + } + + // Check relative to the executable for portable install location. + if (b2_file_path.empty()) + { + const std::string path{ + b2::paths::normalize( + b2_exe_path + "/../../share/boost-build/src/kernel/" + boost_build_jam)}; + if (b2::filesys::is_file(path)) + b2_file_path = path; + } + + // Check the BOOST_BUILD_PATH (and BOOST_ROOT) paths. + if (b2_file_path.empty()) + { + b2::jam::list BOOST_BUILD_PATH = b2::jam::variable{"BOOST_BUILD_PATH"}; + // For back-compat with Boost we also search in the BOOST_ROOT location. + BOOST_BUILD_PATH.append(b2::jam::list(b2::jam::variable{"BOOST_ROOT"})); + for (auto search_path: BOOST_BUILD_PATH) + { + std::string path = b2::jam::object{search_path}; + path = b2::paths::normalize(path+"/"+boost_build_jam); + if (b2::filesys::is_file(path)) + { + b2_file_path = path; + break; + } + } + } + + // Indicate a load failure when we can't find the build file. + if (b2_file_path.empty()) + { + const char * not_found_error = + "Unable to load B2: could not find 'boost-build.jam'\n" + "---------------------------------------------------\n" + "Attempted search from '%s' up to the root " + "at '%s'\n" + "Please consult the documentation at " + "'https://www.bfgroup.xyz/b2/'.\n\n"; + err_printf(not_found_error, b2::cwd_str().c_str(), b2_exe_path.c_str()); + return false; + } + + // Show where we found it, if asked. + if (dot_OPTION__debug_configuration) + { + out_printf("notice: found boost-build.jam at %s\n", b2_file_path.c_str()); + } + + // Load the build system bootstrap file we found. But check we did that. + b2::jam::variable dot_boost_build_file{".boost-build-file"}; + dot_boost_build_file = b2_file_path; + b2::jam::object b2_file_path_sym{b2_file_path}; + parse_file(b2_file_path_sym, frame); + b2::jam::list dot_dot_bootstrap_file_val = b2::jam::variable{".bootstrap-file"}; + if (dot_dot_bootstrap_file_val.empty()) + { + err_printf( + "Unable to load B2\n" + "-----------------\n" + "'%s' was found by searching from %s up to the root.\n" + "\n" + "However, it failed to call the 'boost-build' rule to indicate " + "the location of the build system.\n" + "\n" + "Please consult the documentation at " + "'https://www.bfgroup.xyz/b2/'.\n\n", + b2_file_path.c_str(), b2::cwd_str().c_str()); + return false; + } + + return true; +} diff --git a/src/boost/tools/build/src/engine/startup.h b/src/boost/tools/build/src/engine/startup.h new file mode 100644 index 000000000..01c7d43ee --- /dev/null +++ b/src/boost/tools/build/src/engine/startup.h @@ -0,0 +1,46 @@ +/* +Copyright 2020-2022 René Ferdinand Rivera Morell +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#ifndef B2_STARTUP_H +#define B2_STARTUP_H + +#include "config.h" +#include "frames.h" +#include + +namespace b2 { +namespace startup { + void load_builtins(); + LIST* builtin_boost_build(FRAME* frame, int flags); + bool bootstrap(FRAME* frame); +} + +enum class exit_result : int { +#ifdef EXIT_SUCCESS + success = EXIT_SUCCESS, +#else + success = 0, +#endif +#ifdef EXIT_FAILURE + failure = EXIT_FAILURE +#else + failure = 1 +#endif +}; + +inline void clean_exit(int exit_code) +{ + throw(exit_result) exit_code; +} + +inline void clean_exit(exit_result exit_code) +{ + throw exit_code; +} + +} // namespace b2 + +#endif diff --git a/src/boost/tools/build/src/engine/subst.cpp b/src/boost/tools/build/src/engine/subst.cpp new file mode 100644 index 000000000..a5fcee08c --- /dev/null +++ b/src/boost/tools/build/src/engine/subst.cpp @@ -0,0 +1,116 @@ +#include "jam.h" +#include "subst.h" + +#include "builtins.h" +#include "frames.h" +#include "hash.h" +#include "lists.h" + +#include + + +typedef struct regex_entry +{ + OBJECT * pattern; + regexp * regex; +} regex_entry; + +static struct hash * regex_hash; + + +regexp * regex_compile( OBJECT * pattern ) +{ + int found; + regex_entry * e ; + + if ( !regex_hash ) + regex_hash = hashinit( sizeof( regex_entry ), "regex" ); + + e = (regex_entry *)hash_insert( regex_hash, pattern, &found ); + if ( !found ) + { + e->pattern = object_copy( pattern ); + e->regex = regcomp( (char *)pattern ); + } + + return e->regex; +} + + +LIST * builtin_subst( FRAME * frame, int flags ) +{ + LIST * result = L0; + LIST * const arg1 = lol_get( frame->args, 0 ); + LISTITER iter = list_begin( arg1 ); + LISTITER const end = list_end( arg1 ); + + if ( iter != end && list_next( iter ) != end && list_next( list_next( iter ) + ) != end ) + { + char const * const source = object_str( list_item( iter ) ); + OBJECT * const pattern = list_item( list_next( iter ) ); + regexp * const repat = regex_compile( pattern ); + + if ( regexec( repat, (char *)source) ) + { + LISTITER subst = list_next( iter ); + + while ( ( subst = list_next( subst ) ) != end ) + { +#define BUFLEN 4096 + char buf[ BUFLEN + 1 ]; + char const * in = object_str( list_item( subst ) ); + char * out = buf; + + for ( ; *in && out < buf + BUFLEN; ++in ) + { + if ( *in == '\\' || *in == '$' ) + { + ++in; + if ( *in == 0 ) + break; + if ( *in >= '0' && *in <= '9' ) + { + unsigned int const n = *in - '0'; + size_t const srclen = repat->endp[ n ] - + repat->startp[ n ]; + size_t const remaining = buf + BUFLEN - out; + size_t const len = srclen < remaining + ? srclen + : remaining; + memcpy( out, repat->startp[ n ], len ); + out += len; + continue; + } + /* fall through and copy the next character */ + } + *out++ = *in; + } + *out = 0; + + result = list_push_back( result, object_new( buf ) ); +#undef BUFLEN + } + } + } + + return result; +} + + +static void free_regex( void * xregex, void * data ) +{ + regex_entry * const regex = (regex_entry *)xregex; + object_free( regex->pattern ); + BJAM_FREE( regex->regex ); +} + + +void regex_done() +{ + if ( regex_hash ) + { + hashenumerate( regex_hash, free_regex, (void *)0 ); + hashdone( regex_hash ); + } +} diff --git a/src/boost/tools/build/src/engine/subst.h b/src/boost/tools/build/src/engine/subst.h new file mode 100644 index 000000000..e5281b445 --- /dev/null +++ b/src/boost/tools/build/src/engine/subst.h @@ -0,0 +1,15 @@ +/* Copyright 2001-2004 David Abrahams. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef SUBST_JG20120722_H +#define SUBST_JG20120722_H + +#include "config.h" +#include "object.h" +#include "regexp.h" + +regexp * regex_compile( OBJECT * pattern ); + +#endif diff --git a/src/boost/tools/build/src/engine/sysinfo.cpp b/src/boost/tools/build/src/engine/sysinfo.cpp new file mode 100644 index 000000000..4aa4183da --- /dev/null +++ b/src/boost/tools/build/src/engine/sysinfo.cpp @@ -0,0 +1,168 @@ +/* Copyright 2019 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#include "sysinfo.h" +#include "jam.h" +#include "output.h" + +#include + +#if defined(OS_MACOSX) +#include +#include +#endif + +#if !defined(OS_NT) +#include +#else +#include +#endif + +#if defined(OS_LINUX) || defined(__GLIBC__) +// Need to define this in case it's not as that's the only way to get the +// sched_* APIs. +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include +#endif + + +b2::system_info::system_info() +{ +} + +namespace +{ + unsigned int macosx_physicalcpu() + { + #if defined(OS_MACOSX) + int out_hw_ncpu = 0; + size_t len_hw_ncpu = sizeof(out_hw_ncpu); + int result = ::sysctlbyname( + "hw.physicalcpu", &out_hw_ncpu, &len_hw_ncpu, nullptr, 0); + if (result == 0) return out_hw_ncpu; + #endif + return 0; + } + + unsigned int macosx_logicalcpu() + { + #if defined(OS_MACOSX) + int out_hw_ncpu = 0; + size_t len_hw_ncpu = sizeof(out_hw_ncpu); + int result = ::sysctlbyname( + "hw.logicalcpu", &out_hw_ncpu, &len_hw_ncpu, nullptr, 0); + if (result == 0) return out_hw_ncpu; + #endif + return 0; + } + + unsigned int sched_affinity_cpu_count() + { + #if defined(CPU_COUNT_S) + ::cpu_set_t cpu_set; + if (::sched_getaffinity(0, sizeof(cpu_set_t), &cpu_set) == 0) + { + return CPU_COUNT_S(sizeof(cpu_set_t), &cpu_set); + } + #endif + return 0; + } + + unsigned int sysconf_nprocs_configured() + { + #if defined(_SC_NPROCESSORS_ONLN) + return ::sysconf(_SC_NPROCESSORS_CONF); + #else + return 0; + #endif + } + + unsigned int sysconf_nprocs_online() + { + #if defined(_SC_NPROCESSORS_ONLN) + return ::sysconf(_SC_NPROCESSORS_ONLN); + #else + return 0; + #endif + } + + unsigned int std_thread_hardware_concurrency() + { + // [2020-08-19] Mingw-w64 (e.g. i686-w64-mingw-32-g++ from Cygwin, + // g++-mingw-w64-i686-win32) does not have std::thread etc. But we + // should still allow building the engine with this (important) toolset: + // - It is free, lightweight, standards-conforming. + // - It might be the only C++11 toolset for Windows XP. + // (Please see http://www.crouchingtigerhiddenfruitbat.org/Cygwin/timemachine.html !) + // - It is powerful enough even without std::thread etc. For example, it + // can build-and-use Boost.Thread. + // - The only thing currently used from std::thread is this call to + // hardware_concurrency ! + #if ! defined (_WIN32) + return std::thread::hardware_concurrency(); + #else + return 0; + #endif + } + + unsigned int win32_logicalcpu() + { + #if defined (_WIN32) + SYSTEM_INFO si; + GetSystemInfo (&si); + return si.dwNumberOfProcessors; + #else + return 0; + #endif + } +} + +unsigned int b2::system_info::cpu_core_count() +{ + if (cpu_core_count_ == 0) + { + cpu_thread_count_ = macosx_physicalcpu(); + } + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = sysconf_nprocs_configured(); + } + if (cpu_core_count_ <= 0) + { + cpu_core_count_ = 1; + } + return cpu_core_count_; +} + +unsigned int b2::system_info::cpu_thread_count() +{ + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = macosx_logicalcpu(); + } + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = sched_affinity_cpu_count(); + } + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = sysconf_nprocs_online(); + } + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = std_thread_hardware_concurrency(); + } + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = win32_logicalcpu(); + } + if (cpu_thread_count_ == 0) + { + cpu_thread_count_ = cpu_core_count(); + } + return cpu_thread_count_; +} diff --git a/src/boost/tools/build/src/engine/sysinfo.h b/src/boost/tools/build/src/engine/sysinfo.h new file mode 100644 index 000000000..897a53a65 --- /dev/null +++ b/src/boost/tools/build/src/engine/sysinfo.h @@ -0,0 +1,46 @@ +/* Copyright 2019 Rene Rivera + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +#ifndef B2_SYSINFO_H +#define B2_SYSINFO_H + +# include "config.h" + +namespace b2 +{ + /* + Provides information about the system, hardware and software, we are + running in. + */ + class system_info + { + public: + + system_info(); + + /* + Returns the number of physical CPU cores if available. Otherwise + returns 1. + + Currently implemented for: OS_MACOSX. + */ + unsigned int cpu_core_count(); + + /* + Returns the number of logical CPU threads is available. Otherwise + returns `spu_core_count()`. + + Currently implemented for: OS_MACOSX. + */ + unsigned int cpu_thread_count(); + + private: + + unsigned int cpu_core_count_ = 0; + unsigned int cpu_thread_count_ = 0; + }; +} + +#endif diff --git a/src/boost/tools/build/src/engine/timestamp.cpp b/src/boost/tools/build/src/engine/timestamp.cpp new file mode 100644 index 000000000..4603ba99e --- /dev/null +++ b/src/boost/tools/build/src/engine/timestamp.cpp @@ -0,0 +1,231 @@ +/* + * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2020 Nikita Kniazev. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * timestamp.c - get the timestamp of a file or archive member + * + * External routines: + * timestamp_from_path() - return timestamp for a path, if present + * timestamp_done() - free timestamp tables + * + * Internal routines: + * free_timestamps() - worker function for freeing timestamp table contents + */ + +#include "jam.h" +#include "timestamp.h" + +#include "filesys.h" +#include "hash.h" +#include "object.h" +#include "pathsys.h" +#include "jam_strings.h" +#include "output.h" + + +/* + * BINDING - all known files + */ + +typedef struct _binding +{ + OBJECT * name; + short flags; + +#define BIND_SCANNED 0x01 /* if directory or arch, has been scanned */ + + short progress; + +#define BIND_INIT 0 /* never seen */ +#define BIND_NOENTRY 1 /* timestamp requested but file never found */ +#define BIND_SPOTTED 2 /* file found but not timed yet */ +#define BIND_MISSING 3 /* file found but can not get timestamp */ +#define BIND_FOUND 4 /* file found and time stamped */ + + /* update time - cleared if the there is nothing to bind */ + timestamp time; +} BINDING; + +static struct hash * bindhash = 0; + + +#ifdef OS_NT +/* + * timestamp_from_filetime() - Windows FILETIME --> timestamp conversion + * + * Lifted shamelessly from the CPython implementation. + */ + +void timestamp_from_filetime( timestamp * const t, FILETIME const * const ft ) +{ + /* Seconds between 1.1.1601 and 1.1.1970 */ + static __int64 const secs_between_epochs = 11644473600; + + /* We can not simply cast and dereference a FILETIME, since it might not be + * aligned properly. __int64 type variables are expected to be aligned to an + * 8 byte boundary while FILETIME structures may be aligned to any 4 byte + * boundary. Using an incorrectly aligned __int64 variable may cause a + * performance penalty on some platforms or even exceptions on others + * (documented on MSDN). + */ + __int64 in; + memcpy( &in, ft, sizeof( in ) ); + + /* FILETIME resolution: 100ns. */ + timestamp_init( t, (time_t)( ( in / 10000000 ) - secs_between_epochs ), + (int)( in % 10000000 ) * 100 ); +} +#endif /* OS_NT */ + + +void timestamp_clear( timestamp * const time ) +{ + time->secs = time->nsecs = 0; +} + + +int timestamp_cmp( timestamp const * const lhs, timestamp const * const rhs ) +{ + return int( + lhs->secs == rhs->secs + ? lhs->nsecs - rhs->nsecs + : lhs->secs - rhs->secs ); +} + + +void timestamp_copy( timestamp * const target, timestamp const * const source ) +{ + target->secs = source->secs; + target->nsecs = source->nsecs; +} + + +void timestamp_current( timestamp * const t ) +{ +#ifdef OS_NT + /* GetSystemTimeAsFileTime()'s resolution seems to be about 15 ms on Windows + * XP and under a millisecond on Windows 7. + */ + FILETIME ft; + GetSystemTimeAsFileTime( &ft ); + timestamp_from_filetime( t, &ft ); +#elif defined(_POSIX_TIMERS) && defined(CLOCK_REALTIME) && \ + (!defined(__GLIBC__) || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17)) + /* Some older versions of XCode define _POSIX_TIMERS, but don't actually + * have clock_gettime. Check CLOCK_REALTIME as well. Prior to glibc 2.17, + * clock_gettime requires -lrt. This is a non-critical feature, so + * we just disable it to keep bootstrapping simple. + */ + struct timespec ts; + clock_gettime( CLOCK_REALTIME, &ts ); + timestamp_init( t, ts.tv_sec, ts.tv_nsec ); +#else /* OS_NT */ + timestamp_init( t, time( 0 ), 0 ); +#endif /* OS_NT */ +} + + +int timestamp_empty( timestamp const * const time ) +{ + return !time->secs && !time->nsecs; +} + + +/* + * timestamp_from_path() - return timestamp for a path, if present + */ + +void timestamp_from_path( timestamp * const time, OBJECT * const path ) +{ + PROFILE_ENTER( timestamp ); + + if ( file_time( path, time ) < 0 ) + timestamp_clear( time ); + + PROFILE_EXIT( timestamp ); +} + + +void timestamp_init( timestamp * const time, time_t const secs, int const nsecs + ) +{ + time->secs = secs; + time->nsecs = nsecs; +} + + +void timestamp_max( timestamp * const max, timestamp const * const lhs, + timestamp const * const rhs ) +{ + if ( timestamp_cmp( lhs, rhs ) > 0 ) + timestamp_copy( max, lhs ); + else + timestamp_copy( max, rhs ); +} + + +static char const * timestamp_formatstr( timestamp const * const time, + char const * const format ) +{ + static char result1[ 500 ]; + static char result2[ 500 ]; + strftime( result1, sizeof( result1 ) / sizeof( *result1 ), format, gmtime( + &time->secs ) ); + sprintf( result2, result1, time->nsecs ); + return result2; +} + + +char const * timestamp_str( timestamp const * const time ) +{ + return timestamp_formatstr( time, "%Y-%m-%d %H:%M:%S.%%09d +0000" ); +} + + +char const * timestamp_timestr( timestamp const * const time ) +{ + return timestamp_formatstr( time, "%H:%M:%S.%%09d" ); +} + + +/* + * free_timestamps() - worker function for freeing timestamp table contents + */ + +static void free_timestamps( void * xbinding, void * data ) +{ + object_free( ( (BINDING *)xbinding )->name ); +} + + +/* + * timestamp_done() - free timestamp tables + */ + +void timestamp_done() +{ + if ( bindhash ) + { + hashenumerate( bindhash, free_timestamps, 0 ); + hashdone( bindhash ); + } +} + +/* + * timestamp_delta_seconds() - seconds from time a to b. + */ +double timestamp_delta_seconds( timestamp const * const a , timestamp const * const b ) +{ + return difftime(b->secs, a->secs) + (b->nsecs - a->nsecs) * 1.0E-9; +} diff --git a/src/boost/tools/build/src/engine/timestamp.h b/src/boost/tools/build/src/engine/timestamp.h new file mode 100644 index 000000000..2a05d2b1c --- /dev/null +++ b/src/boost/tools/build/src/engine/timestamp.h @@ -0,0 +1,48 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * timestamp.h - get the timestamp of a file or archive member + */ + +#ifndef TIMESTAMP_H_SW_2011_11_18 +#define TIMESTAMP_H_SW_2011_11_18 + +#include "config.h" +#include "object.h" + +#ifdef OS_NT +# include +#endif + +#include + +typedef struct timestamp +{ + time_t secs; + int nsecs; +} timestamp; + +void timestamp_clear( timestamp * const ); +int timestamp_cmp( timestamp const * const lhs, timestamp const * const rhs ); +void timestamp_copy( timestamp * const target, timestamp const * const source ); +void timestamp_current( timestamp * const ); +int timestamp_empty( timestamp const * const ); +void timestamp_from_path( timestamp * const, OBJECT * const path ); +void timestamp_init( timestamp * const, time_t const secs, int const nsecs ); +void timestamp_max( timestamp * const max, timestamp const * const lhs, + timestamp const * const rhs ); +char const * timestamp_str( timestamp const * const ); +char const * timestamp_timestr( timestamp const * const ); + +#ifdef OS_NT +void timestamp_from_filetime( timestamp * const, FILETIME const * const ); +#endif + +void timestamp_done(); +double timestamp_delta_seconds( timestamp const * const, timestamp const * const ); + +#endif diff --git a/src/boost/tools/build/src/engine/variable.cpp b/src/boost/tools/build/src/engine/variable.cpp new file mode 100644 index 000000000..3408b102d --- /dev/null +++ b/src/boost/tools/build/src/engine/variable.cpp @@ -0,0 +1,393 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* This file is ALSO: + * Copyright 2001-2004 David Abrahams. + * Copyright 2005 Reece H. Dunn. + * Copyright 2005 Rene Rivera. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE.txt or copy at + * https://www.bfgroup.xyz/b2/LICENSE.txt) + */ + +/* + * variable.c - handle Jam multi-element variables. + * + * External routines: + * + * var_defines() - load a bunch of variable=value settings + * var_get() - get value of a user defined symbol + * var_set() - set a variable in jam's user defined symbol table. + * var_swap() - swap a variable's value with the given one + * var_done() - free variable tables + * + * Internal routines: + * + * var_enter() - make new var symbol table entry, returning var ptr + * var_dump() - dump a variable to stdout + */ + +#include "jam.h" +#include "variable.h" + +#include "filesys.h" +#include "hash.h" +#include "modules.h" +#include "parse.h" +#include "pathsys.h" +#include "jam_strings.h" +#include "output.h" + +#include +#include + + +/* + * VARIABLE - a user defined multi-value variable + */ + +typedef struct _variable VARIABLE ; + +struct _variable +{ + OBJECT * symbol; + LIST * value; +}; + +static LIST * * var_enter( struct module_t *, OBJECT * symbol ); +static void var_dump( OBJECT * symbol, LIST * value, const char * what ); + + +/* + * var_defines() - load a bunch of variable=value settings + * + * If preprocess is false, take the value verbatim. + * + * Otherwise, if the variable value is enclosed in quotes, strip the quotes. + * Otherwise, if variable name ends in PATH, split value at :'s. + * Otherwise, split the value at blanks. + */ + +void var_defines( struct module_t * module, const char * const * e, int preprocess ) +{ + string buf[ 1 ]; + + string_new( buf ); + + for ( ; *e; ++e ) + { + const char * val; + + if ( ( val = strchr( *e, '=' ) ) +#if defined( OS_MAC ) + /* On the mac (MPW), the var=val is actually var\0val */ + /* Think different. */ + || ( val = *e + strlen( *e ) ) +#endif + ) + { + LIST * l = L0; + int32_t const len = int32_t(strlen( val + 1 )); + int const quoted = ( val[ 1 ] == '"' ) && ( val[ len ] == '"' ) && + ( len > 1 ); + + if ( quoted && preprocess ) + { + string_append_range( buf, val + 2, val + len ); + l = list_push_back( l, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + else + { + const char * p; + const char * pp; + char split = +#if defined( OPT_NO_EXTERNAL_VARIABLE_SPLIT ) + '\0' +#elif defined( OS_MAC ) + ',' +#else + ' ' +#endif + ; + + /* Split *PATH at :'s, not spaces. */ + if ( val - 4 >= *e ) + { + if ( !strncmp( val - 4, "PATH", 4 ) || + !strncmp( val - 4, "Path", 4 ) || + !strncmp( val - 4, "path", 4 ) ) + split = SPLITPATH; + } + + /* Do the split. */ + for + ( + pp = val + 1; + preprocess && ( ( p = strchr( pp, split ) ) != 0 ); + pp = p + 1 + ) + { + string_append_range( buf, pp, p ); + l = list_push_back( l, object_new( buf->value ) ); + string_truncate( buf, 0 ); + } + + l = list_push_back( l, object_new( pp ) ); + } + + /* Get name. */ + string_append_range( buf, *e, val ); + { + OBJECT * const varname = object_new( buf->value ); + var_set( module, varname, l, VAR_SET ); + object_free( varname ); + } + string_truncate( buf, 0 ); + } + } + string_free( buf ); +} + + +/* Last returned variable value saved so we may clear it in var_done(). */ +static LIST * saved_var = L0; + + +/* + * var_get() - get value of a user defined symbol + * + * Returns NULL if symbol unset. + */ + +LIST * var_get( struct module_t * module, OBJECT * symbol ) +{ + LIST * result = L0; +#ifdef OPT_AT_FILES + /* Some "fixed" variables... */ + if ( object_equal( symbol, constant_TMPDIR ) ) + { + list_free( saved_var ); + result = saved_var = list_new( object_new( path_tmpdir()->value ) ); + } + else if ( object_equal( symbol, constant_TMPNAME ) ) + { + list_free( saved_var ); + result = saved_var = list_new( path_tmpnam() ); + } + else if ( object_equal( symbol, constant_TMPFILE ) ) + { + list_free( saved_var ); + result = saved_var = list_new( path_tmpfile() ); + } + else if ( object_equal( symbol, constant_STDOUT ) ) + { + list_free( saved_var ); + result = saved_var = list_new( object_copy( constant_STDOUT ) ); + } + else if ( object_equal( symbol, constant_STDERR ) ) + { + list_free( saved_var ); + result = saved_var = list_new( object_copy( constant_STDERR ) ); + } + else +#endif + { + VARIABLE * v; + int n; + + if ( ( n = module_get_fixed_var( module, symbol ) ) != -1 ) + { + if ( DEBUG_VARGET ) + var_dump( symbol, module->fixed_variables[ n ], "get" ); + result = module->fixed_variables[ n ]; + } + else if ( module->variables && ( v = (VARIABLE *)hash_find( + module->variables, symbol ) ) ) + { + if ( DEBUG_VARGET ) + var_dump( v->symbol, v->value, "get" ); + result = v->value; + } + +#ifdef OS_VMS + else if ( ( module->name && object_equal( module->name, constant_ENVIRON ) ) + || root_module() == module ) + { + /* On VMS, when a variable from root or ENVIRON module is not found, + * explicitly request it from the process. + * By design, process variables (and logicals) are not made available + * to C main(), and thus will not get loaded in bulk to root/ENVRON. + * So we get around it by getting any such variable on first request. + */ + const char * val = getenv( object_str( symbol ) ); + + if ( val ) + { + struct module_t * environ_module = module; + char * environ[ 2 ] = { 0 }; /* NULL-terminated */ + string buf[ 1 ]; + + if ( root_module() == module ) + { + environ_module = bindmodule( constant_ENVIRON ); + } + + string_copy( buf, object_str( symbol ) ); + string_append( buf, "=" ); + string_append( buf, val ); + + environ[ 0 ] = buf->value; + + /* Load variable to global module, with splitting, for backward + * compatibility. Then to .ENVIRON, without splitting. + */ + var_defines( root_module(), environ, 1 ); + var_defines( environ_module, environ, 0 ); + string_free( buf ); + + if ( module->variables && ( v = (VARIABLE *)hash_find( + module->variables, symbol ) ) ) + { + if ( DEBUG_VARGET ) + var_dump( v->symbol, v->value, "get" ); + result = v->value; + } + } + } +#endif + } + return result; +} + + +LIST * var_get_and_clear_raw( module_t * module, OBJECT * symbol ) +{ + LIST * result = L0; + VARIABLE * v; + + if ( module->variables && ( v = (VARIABLE *)hash_find( module->variables, + symbol ) ) ) + { + result = v->value; + v->value = L0; + } + + return result; +} + + +/* + * var_set() - set a variable in Jam's user defined symbol table + * + * 'flag' controls the relationship between new and old values of the variable: + * SET replaces the old with the new; APPEND appends the new to the old; DEFAULT + * only uses the new if the variable was previously unset. + * + * Copies symbol. Takes ownership of value. + */ + +void var_set( struct module_t * module, OBJECT * symbol, LIST * value, int flag + ) +{ + LIST * * v = var_enter( module, symbol ); + + if ( DEBUG_VARSET ) + var_dump( symbol, value, "set" ); + + switch ( flag ) + { + case VAR_SET: /* Replace value */ + list_free( *v ); + *v = value; + break; + + case VAR_APPEND: /* Append value */ + *v = list_append( *v, value ); + break; + + case VAR_DEFAULT: /* Set only if unset */ + if ( list_empty( *v ) ) + *v = value; + else + list_free( value ); + break; + } +} + + +/* + * var_swap() - swap a variable's value with the given one + */ + +LIST * var_swap( struct module_t * module, OBJECT * symbol, LIST * value ) +{ + LIST * * v = var_enter( module, symbol ); + LIST * oldvalue = *v; + if ( DEBUG_VARSET ) + var_dump( symbol, value, "set" ); + *v = value; + return oldvalue; +} + + +/* + * var_enter() - make new var symbol table entry, returning var ptr + */ + +static LIST * * var_enter( struct module_t * module, OBJECT * symbol ) +{ + int found; + VARIABLE * v; + int n; + + if ( ( n = module_get_fixed_var( module, symbol ) ) != -1 ) + return &module->fixed_variables[ n ]; + + if ( !module->variables ) + module->variables = hashinit( sizeof( VARIABLE ), "variables" ); + + v = (VARIABLE *)hash_insert( module->variables, symbol, &found ); + if ( !found ) + { + v->symbol = object_copy( symbol ); + v->value = L0; + } + + return &v->value; +} + + +/* + * var_dump() - dump a variable to stdout + */ + +static void var_dump( OBJECT * symbol, LIST * value, const char * what ) +{ + out_printf( "%s %s = ", what, object_str( symbol ) ); + list_print( value ); + out_printf( "\n" ); +} + + +/* + * var_done() - free variable tables + */ + +static void delete_var_( void * xvar, void * data ) +{ + VARIABLE * const v = (VARIABLE *)xvar; + object_free( v->symbol ); + list_free( v->value ); +} + +void var_done( struct module_t * module ) +{ + list_free( saved_var ); + saved_var = L0; + hashenumerate( module->variables, delete_var_, 0 ); + hash_free( module->variables ); +} diff --git a/src/boost/tools/build/src/engine/variable.h b/src/boost/tools/build/src/engine/variable.h new file mode 100644 index 000000000..97e906300 --- /dev/null +++ b/src/boost/tools/build/src/engine/variable.h @@ -0,0 +1,111 @@ +/* + * Copyright 1993, 2000 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * variable.h - handle jam multi-element variables + */ + +#ifndef VARIABLE_SW20111119_H +#define VARIABLE_SW20111119_H + +#include "config.h" +#include "lists.h" +#include "object.h" +#include "modules.h" + +#include + + +struct module_t; + +void var_defines( struct module_t *, const char * const * e, int preprocess ); +LIST * var_get( struct module_t *, OBJECT * symbol ); +void var_set( struct module_t *, OBJECT * symbol, LIST * value, int flag ); +LIST * var_swap( struct module_t *, OBJECT * symbol, LIST * value ); +void var_done( struct module_t * ); + +/* + * Defines for var_set(). + */ + +#define VAR_SET 0 /* override previous value */ +#define VAR_APPEND 1 /* append to previous value */ +#define VAR_DEFAULT 2 /* set only if no previous value */ + +namespace b2 { namespace jam { + struct variable + { + inline variable(const variable &v) + : var_module(v.var_module), var_symbol(object_copy(v.var_symbol)) {} + inline variable(struct module_t *m, const char *v) + : var_module(m), var_symbol(object_new(v)) {} + inline variable(const char *m, const char *v) + { + OBJECT * module_sym = object_new(m); + var_module = bindmodule(module_sym); + var_symbol = object_new(v); + object_free(module_sym); + } + inline variable(const std::string &m, const std::string &v) + : variable(m.c_str(), v.c_str()) {} + inline explicit variable(const char *v) : variable(root_module(), v) {} + inline explicit variable(const std::string &v) : variable(v.c_str()) {} + inline ~variable() + { + if (var_symbol) object_free(var_symbol); + } + + inline operator list() const { return list{var_get(var_module, var_symbol)}; } + + inline variable & operator=(list && v) + { + var_set(var_module, var_symbol, v.release(), VAR_SET); + return *this; + } + inline variable & operator=(const list & v) { return *this = list{v}; } + inline variable & operator=(const char *v) { return *this = list{object{v}}; } + inline variable & operator=(const std::string &v) { return *this = list{object{v}}; } + + inline variable & operator+=(list & v) + { + var_set(var_module, var_symbol, v.release(), VAR_APPEND); + return *this; + } + inline variable & operator+=(list && v) + { + var_set(var_module, var_symbol, v.release(), VAR_APPEND); + return *this; + } + inline variable & operator+=(const char *v) { return *this += list{object{v}}; } + inline variable & operator+=(const std::string &v) { return *this += list{object{v}}; } + + inline variable & operator|=(list & v) + { + var_set(var_module, var_symbol, v.release(), VAR_DEFAULT); + return *this; + } + inline variable & operator|=(list && v) + { + var_set(var_module, var_symbol, v.release(), VAR_DEFAULT); + return *this; + } + inline variable & operator|=(const char *v) { return *this |= list{object{v}}; } + inline variable & operator|=(const std::string &v) { return *this |= list{object{v}}; } + + inline operator bool() const + { + LIST * l = var_get(var_module, var_symbol); + return (!list_empty(l)) && (list_length(l) > 0); + } + + private: + + struct module_t * var_module = nullptr; + OBJECT * var_symbol = nullptr; + }; +}} + +#endif diff --git a/src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd b/src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd new file mode 100644 index 000000000..cc758e82e --- /dev/null +++ b/src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd @@ -0,0 +1,73 @@ +:: Copyright 2020 - Rene Ferdinand Rivera Morell +:: Copyright 2017 - Refael Ackermann +:: Copyright 2019 - Thomas Kent +:: Distributed under MIT style license +:: See accompanying file LICENSE at https://github.com/node4good/windows-autoconf +:: Forked from version: 1.15.4 + +@if not defined DEBUG_HELPER @ECHO OFF +setlocal +set "InstallerPath=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer" +if not exist "%InstallerPath%" set "InstallerPath=%ProgramFiles%\Microsoft Visual Studio\Installer" +if not exist "%InstallerPath%" goto :no-vswhere +:: Manipulate %Path% for easier " handeling +set Path=%Path%;%InstallerPath% +where vswhere 2> nul > nul +if errorlevel 1 goto :no-vswhere +set VSWHERE_REQ=-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 +set VSWHERE_PRP=-property installationPath + +REM Visual Studio Unknown Version, Beyond 2022 +set VSWHERE_LMT=-version "[18.0,19.0)" +set VSWHERE_PRERELEASE=-prerelease +SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% %VSWHERE_PRERELEASE% +for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do ( + endlocal + echo Found with vswhere %%i + @rem comment out setting VCINSTALLDIR for Boost.build + @rem set "VCINSTALLDIR=%%i\VC\" + set "VSUNKCOMNTOOLS=%%i\Common7\Tools\" + exit /B 0 +) + +REM Visual Studio 2022 +set VSWHERE_LMT=-version "[17.0,18.0)" +set VSWHERE_PRERELEASE=-prerelease +SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% %VSWHERE_PRERELEASE% +for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do ( + endlocal + echo Found with vswhere %%i + @rem comment out setting VCINSTALLDIR for Boost.build + @rem set "VCINSTALLDIR=%%i\VC\" + set "VS170COMNTOOLS=%%i\Common7\Tools\" + exit /B 0 +) + +REM Visual Studio 2019 (16.X, toolset 14.2) +set VSWHERE_LMT=-version "[16.0,17.0)" +SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% %VSWHERE_PRERELEASE% +for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do ( + endlocal + echo Found with vswhere %%i + @rem comment out setting VCINSTALLDIR for Boost.build + @rem set "VCINSTALLDIR=%%i\VC\" + set "VS160COMNTOOLS=%%i\Common7\Tools\" + exit /B 0 +) + +REM Visual Studio 2017 (15.X, toolset 14.1) +set VSWHERE_LMT=-version "[15.0,16.0)" +SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% +for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do ( + endlocal + echo Found with vswhere %%i + @rem comment out setting VCINSTALLDIR for Boost.build + @rem set "VCINSTALLDIR=%%i\VC\" + set "VS150COMNTOOLS=%%i\Common7\Tools\" + exit /B 0 +) + +:no-vswhere +endlocal +echo could not find "vswhere" +exit /B 1 diff --git a/src/boost/tools/build/src/engine/w32_getreg.cpp b/src/boost/tools/build/src/engine/w32_getreg.cpp new file mode 100644 index 000000000..4cbc9dd01 --- /dev/null +++ b/src/boost/tools/build/src/engine/w32_getreg.cpp @@ -0,0 +1,201 @@ +/* +Copyright Paul Lin 2003. Copyright 2006 Bojan Resnik. +Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +# include "jam.h" + +# if defined( OS_NT ) || defined( OS_CYGWIN ) + +# include "lists.h" +# include "object.h" +# include "parse.h" +# include "frames.h" +# include "jam_strings.h" + +# define WIN32_LEAN_AND_MEAN +# include + +# define MAX_REGISTRY_DATA_LENGTH 4096 +# define MAX_REGISTRY_KEYNAME_LENGTH 256 +# define MAX_REGISTRY_VALUENAME_LENGTH 16384 + +typedef struct +{ + LPCSTR name; + HKEY value; +} KeyMap; + +static const KeyMap dlRootKeys[] = { + { "HKLM", HKEY_LOCAL_MACHINE }, + { "HKCU", HKEY_CURRENT_USER }, + { "HKCR", HKEY_CLASSES_ROOT }, + { "HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE }, + { "HKEY_CURRENT_USER", HKEY_CURRENT_USER }, + { "HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT }, + { 0, 0 } +}; + +static HKEY get_key(char const** path) +{ + const KeyMap *p; + + for (p = dlRootKeys; p->name; ++p) + { + size_t n = strlen(p->name); + if (!strncmp(*path,p->name,n)) + { + if ((*path)[n] == '\\' || (*path)[n] == 0) + { + *path += n + 1; + break; + } + } + } + + return p->value; +} + +LIST * builtin_system_registry( FRAME * frame, int flags ) +{ + char const* path = object_str( list_front( lol_get(frame->args, 0) ) ); + LIST* result = L0; + HKEY key = get_key(&path); + + if ( + key != 0 + && ERROR_SUCCESS == RegOpenKeyExA(key, path, 0, KEY_QUERY_VALUE, &key) + ) + { + DWORD type; + BYTE data[MAX_REGISTRY_DATA_LENGTH]; + DWORD len = sizeof(data); + LIST * const field = lol_get(frame->args, 1); + + if ( ERROR_SUCCESS == + RegQueryValueExA(key, field ? object_str( list_front( field ) ) : 0, 0, &type, data, &len) ) + { + switch (type) + { + + case REG_EXPAND_SZ: + { + DWORD len; + string expanded[1]; + string_new(expanded); + + while ( + (len = ExpandEnvironmentStringsA( + (LPCSTR)data, expanded->value, (DWORD)expanded->capacity)) + > DWORD(expanded->capacity) + ) + string_reserve(expanded, len); + + expanded->size = len - 1; + + result = list_push_back( result, object_new(expanded->value) ); + string_free( expanded ); + } + break; + + case REG_MULTI_SZ: + { + char* s; + + for (s = (char*)data; *s; s += strlen(s) + 1) + result = list_push_back( result, object_new(s) ); + + } + break; + + case REG_DWORD: + { + char buf[100]; + sprintf( buf, "%lu", *(PDWORD)data ); + result = list_push_back( result, object_new(buf) ); + } + break; + + case REG_SZ: + result = list_push_back( result, object_new( (const char *)data ) ); + break; + } + } + RegCloseKey(key); + } + return result; +} + +static LIST* get_subkey_names(HKEY key, char const* path) +{ + LIST* result = 0; + + if ( ERROR_SUCCESS == + RegOpenKeyExA(key, path, 0, KEY_ENUMERATE_SUB_KEYS, &key) + ) + { + char name[MAX_REGISTRY_KEYNAME_LENGTH]; + DWORD name_size = sizeof(name); + DWORD index; + FILETIME last_write_time; + + for ( index = 0; + ERROR_SUCCESS == RegEnumKeyExA( + key, index, name, &name_size, 0, 0, 0, &last_write_time); + ++index, + name_size = sizeof(name) + ) + { + name[name_size] = 0; + result = list_append(result, list_new(object_new(name))); + } + + RegCloseKey(key); + } + + return result; +} + +static LIST* get_value_names(HKEY key, char const* path) +{ + LIST* result = 0; + + if ( ERROR_SUCCESS == RegOpenKeyExA(key, path, 0, KEY_QUERY_VALUE, &key) ) + { + char name[MAX_REGISTRY_VALUENAME_LENGTH]; + DWORD name_size = sizeof(name); + DWORD index; + + for ( index = 0; + ERROR_SUCCESS == RegEnumValueA( + key, index, name, &name_size, 0, 0, 0, 0); + ++index, + name_size = sizeof(name) + ) + { + name[name_size] = 0; + result = list_append(result, list_new(object_new(name))); + } + + RegCloseKey(key); + } + + return result; +} + +LIST * builtin_system_registry_names( FRAME * frame, int flags ) +{ + char const* path = object_str( list_front( lol_get(frame->args, 0) ) ); + char const* result_type = object_str( list_front( lol_get(frame->args, 1) ) ); + + HKEY key = get_key(&path); + + if ( !strcmp(result_type, "subkeys") ) + return get_subkey_names(key, path); + if ( !strcmp(result_type, "values") ) + return get_value_names(key, path); + return 0; +} + +# endif diff --git a/src/boost/tools/build/src/engine/yyacc.cpp b/src/boost/tools/build/src/engine/yyacc.cpp new file mode 100644 index 000000000..14213d6c7 --- /dev/null +++ b/src/boost/tools/build/src/engine/yyacc.cpp @@ -0,0 +1,219 @@ +/* Copyright 2002, 2020 Rene Rivera. +** Distributed under the Boost Software License, Version 1.0. +** (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) +*/ + +#include +#include +#include +#include +#include +#include + +/* +# yyacc - yacc wrapper +# +# Allows tokens to be written as `literal` and then automatically +# substituted with #defined tokens. +# +# Usage: +# yyacc file.y filetab.h file.yy +# +# inputs: +# file.yy yacc grammar with ` literals +# +# outputs: +# file.y yacc grammar +# filetab.h array of string <-> token mappings +# +# 3-13-93 +# Documented and p moved in sed command (for some reason, +# s/x/y/p doesn't work). +# 10-12-93 +# Take basename as second argument. +# 12-31-96 +# reversed order of args to be compatible with GenFile rule +# 11-20-2002 +# Reimplemented as a C program for portability. (Rene Rivera) +# 05-xx-2020 +# Reimplement yet again, in C++. (Rene Rivera) +*/ + +static const std::string usage[] = { + "yyacc " + }; + +void print_usage() +{ + for (auto u: usage) + { + std::printf("%s\n", u.c_str()); + } +} + +std::string tokenize_string(std::string s) +{ + std::string result = s; + if (s == ":") result = "_colon"; + else if (s == "!") result = "_bang"; + else if (s == "!=") result = "_bang_equals"; + else if (s == "&&") result = "_amperamper"; + else if (s == "&") result = "_amper"; + else if (s == "+") result = "_plus"; + else if (s == "+=") result = "_plus_equals"; + else if (s == "||") result = "_barbar"; + else if (s == "|") result = "_bar"; + else if (s == ";") result = "_semic"; + else if (s == "-") result = "_minus"; + else if (s == "<") result = "_langle"; + else if (s == "<=") result = "_langle_equals"; + else if (s == ">") result = "_rangle"; + else if (s == ">=") result = "_rangle_equals"; + else if (s == ".") result = "_period"; + else if (s == "?") result = "_question"; + else if (s == "?=") result = "_question_equals"; + else if (s == "=") result = "_equals"; + else if (s == ",") result = "_comma"; + else if (s == "[") result = "_lbracket"; + else if (s == "]") result = "_rbracket"; + else if (s == "{") result = "_lbrace"; + else if (s == "}") result = "_rbrace"; + else if (s == "(") result = "_lparen"; + else if (s == ")") result = "_rparen"; + + std::transform( + result.begin(), result.end(), result.begin(), + [](unsigned char c){ return std::toupper(c); }); + return result+"_t"; +} + +struct literal +{ + std::string string; + std::string token; + + bool operator<(const literal & x) const + { + return this->string < x.string; + } +}; + +int main(int argc, char ** argv) +{ + int result = 0; + if (argc != 4) + { + print_usage(); + result = 1; + } + else + { + FILE * token_output_f = 0; + FILE * grammar_output_f = 0; + FILE * grammar_source_f = 0; + + grammar_source_f = fopen(argv[3],"r"); + if (grammar_source_f == 0) { result = 1; } + if (result == 0) + { + std::set literals; + char l[2048]; + while (1) + { + if (fgets(l,2048,grammar_source_f) != 0) + { + char * c = l; + while (1) + { + char * c1 = std::strchr(c,'`'); + if (c1 != 0) + { + char * c2 = std::strchr(c1+1,'`'); + if (c2 != 0) + { + auto l = std::string(c1+1,c2-c1-1); + literals.insert({ l, tokenize_string(l) }); + c = c2+1; + } + else + break; + } + else + break; + } + } + else + { + break; + } + } + token_output_f = std::fopen(argv[2],"w"); + if (token_output_f != 0) + { + for (const literal & l: literals) + { + std::fprintf(token_output_f," { \"%s\", %s },\n",l.string.c_str(), l.token.c_str()); + } + std::fclose(token_output_f); + } + else + result = 1; + if (result == 0) + { + grammar_output_f = std::fopen(argv[1],"w"); + if (grammar_output_f != 0) + { + for (const literal & l: literals) + { + fprintf(grammar_output_f,"%%token %s\n",l.token.c_str()); + } + rewind(grammar_source_f); + while (1) + { + if (fgets(l,2048,grammar_source_f) != 0) + { + char * c = l; + while (1) + { + char * c1 = strchr(c,'`'); + if (c1 != 0) + { + char * c2 = strchr(c1+1,'`'); + if (c2 != 0) + { + auto replacement = literals.find({std::string(c1+1,c2-c1-1), ""}); + *c1 = 0; + std::fprintf(grammar_output_f,"%s%s",c,replacement->token.c_str()); + c = c2+1; + } + else + { + std::fprintf(grammar_output_f,"%s",c); + break; + } + } + else + { + std::fprintf(grammar_output_f,"%s",c); + break; + } + } + } + else + { + break; + } + } + std::fclose(grammar_output_f); + } + else + result = 1; + } + } + if (result != 0) + { + perror("yyacc"); + } + } + return result; +} diff --git a/src/boost/tools/build/src/exceptions.py b/src/boost/tools/build/src/exceptions.py new file mode 100644 index 000000000..de5ab7aff --- /dev/null +++ b/src/boost/tools/build/src/exceptions.py @@ -0,0 +1,55 @@ +# Copyright Pedro Ferreira 2005. Distributed under the Boost +# Software License, Version 1.0. (See accompanying +# file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + + +class BaseBoostBuildException(Exception): + """A base Exception class for all other Boost.Build exceptions to inherit from.""" + + +class UserError(BaseBoostBuildException): + pass + + +class FeatureConflict(BaseBoostBuildException): + pass + + +class InvalidSource(BaseBoostBuildException): + pass + + +class InvalidFeature(BaseBoostBuildException): + pass + + +class InvalidProperty(BaseBoostBuildException): + pass + + +class InvalidValue(BaseBoostBuildException): + pass + + +class InvalidAttribute(BaseBoostBuildException): + pass + + +class AlreadyDefined(BaseBoostBuildException): + pass + + +class IllegalOperation(BaseBoostBuildException): + pass + + +class Recursion(BaseBoostBuildException): + pass + + +class NoBestMatchingAlternative(BaseBoostBuildException): + pass + + +class NoAction(BaseBoostBuildException): + pass diff --git a/src/boost/tools/build/src/kernel/boost-build.jam b/src/boost/tools/build/src/kernel/boost-build.jam new file mode 100644 index 000000000..cb6fece7d --- /dev/null +++ b/src/boost/tools/build/src/kernel/boost-build.jam @@ -0,0 +1,5 @@ +# Copyright 2003 Dave Abrahams +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +boost-build . ; diff --git a/src/boost/tools/build/src/kernel/bootstrap.jam b/src/boost/tools/build/src/kernel/bootstrap.jam new file mode 100644 index 000000000..ee8f20390 --- /dev/null +++ b/src/boost/tools/build/src/kernel/bootstrap.jam @@ -0,0 +1,265 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2005, 2006 Rene Rivera +# Copyright 2003, 2005, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# First of all, check the jam version. +if $(JAM_VERSION:J="") < 030112 +{ + ECHO "error: Boost.Jam version 3.1.12 or later required" ; + EXIT ; +} + +local required-rules = GLOB-RECURSIVELY HAS_NATIVE_RULE ; +for local r in $(required-rules) +{ + if ! $(r) in [ RULENAMES ] + { + ECHO "error: builtin rule '$(r)' is not present" ; + ECHO "error: your version of bjam is likely out of date" ; + ECHO "error: please get a fresh version from SVN." ; + EXIT ; + } +} + +local native = regex transform 2 ; +while $(native) +{ + if ! [ HAS_NATIVE_RULE $(native[1]) : $(native[2]) : $(native[3]) ] + { + ECHO "error: missing native rule '$(native[1]).$(native[2])'" ; + ECHO "error: or interface version of that rule is too low" ; + ECHO "error: your version of bjam is likely out of date" ; + ECHO "error: please get a fresh version from SVN." ; + EXIT ; + } + native = $(native[4-]) ; +} + + +# Check that the builtin .ENVIRON module is present. We do not have a builtin to +# check that a module is present, so we assume that the PATH environment +# variable is always set and verify that the .ENVIRON module has a non-empty +# value of that variable. +module .ENVIRON +{ + local p = $(PATH) $(Path) $(path) ; + if ! $(p) + { + ECHO "error: no builtin module .ENVIRON is found" ; + ECHO "error: your version of bjam is likely out of date" ; + ECHO "error: please get a fresh version from SVN." ; + EXIT ; + } +} + +# Check that @() functionality is present. Similarly to modules, we do not have +# a way to test this directly. Instead we check that $(TMPNAME) functionality is +# present which was added at roughly the same time (more precisely, it was added +# just before). +{ + if ! $(TMPNAME) + { + ECHO "error: no @() functionality found" ; + ECHO "error: your version of b2 is likely out of date" ; + ECHO "error: please get a fresh version from SVN." ; + EXIT ; + } +} + +# Make sure that \n escape is available. +if "\n" = "n" +{ + if $(OS) = CYGWIN + { + ECHO "warning: escape sequences are not supported" ; + ECHO "warning: this will cause major misbehaviour on cygwin" ; + ECHO "warning: your version of b2 is likely out of date" ; + ECHO "warning: please get a fresh version from SVN." ; + } +} + + +# Bootstrap the module system. Then bring the import rule into the global module. +# +SEARCH on modules.jam = $(.bootstrap-file:D) ; +module modules { include modules.jam ; } +IMPORT modules : import : : import ; + +{ + # Add module subdirectories to the BOOST_BUILD_PATH, which allows us to make + # incremental refactoring steps by moving modules to appropriate + # subdirectories, thereby achieving some physical separation of different + # layers without changing all of our code to specify subdirectories in + # import statements or use an extra level of qualification on imported + # names. + + local subdirs = + kernel # only the most-intrinsic modules: modules, errors + util # low-level substrate: string/number handling, etc. + build # essential elements of the build system architecture + tools # toolsets for handling specific build jobs and targets. + contrib # user contributed (unreviewed) modules + . # build-system.jam lives here + ; + local whereami = [ NORMALIZE_PATH $(.bootstrap-file:DT) ] ; + BOOST_BUILD_PATH += $(whereami:D)/$(subdirs) ; + + modules.poke .ENVIRON : BOOST_BUILD_PATH : $(BOOST_BUILD_PATH) ; + + modules.poke : EXTRA_PYTHONPATH : $(whereami) ; +} + +# Reload the modules, to clean up things. The modules module can tolerate being +# imported twice. +# +import modules ; + +# Process option plugins first to allow them to prevent loading the rest of the +# build system. +# +import option ; +local dont-build = [ option.process ] ; + +# Should we skip building, i.e. loading the build system, according to the +# options processed? +# +if ! $(dont-build) +{ + if ! --python in $(ARGV) + { + # Allow users to override the build system file from the command-line + # (mostly for testing). + local build-system = [ MATCH --build-system=(.*) : $(ARGV) ] ; + build-system ?= build-system ; + + # Use last element in case of multiple command-line options. + import $(build-system[-1]) ; + } + else + { + + # Define additional interface exposed to Python code. Python code will + # also have access to select bjam builtins in the 'bjam' module, but + # some things are easier to define outside C. + module python_interface + { + rule load ( module-name : location ) + { + USER_MODULE $(module-name) ; + # Make all rules in the loaded module available in the global + # namespace, so that we do not have to bother specifying the + # "correct" module when calling from Python. + module $(module-name) + { + __name__ = $(1) ; + include $(2) ; + local rules = [ RULENAMES $(1) ] ; + IMPORT $(1) : $(rules) : $(1) : $(1).$(rules) ; + } + } + + rule peek ( module-name ? : variables + ) + { + module $(<) + { + return $($(>)) ; + } + } + + rule set-variable ( module-name : name : value * ) + { + module $(<) + { + $(>) = $(3) ; + } + } + + rule set-top-level-targets ( targets * ) + { + DEPENDS all : $(targets) ; + } + + rule call-in-module ( m : rulename : * ) + { + module $(m) + { + return [ $(2) $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) + : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) + : $(17) : $(18) : $(19) ] ; + } + } + + + rule set-update-action ( action : targets * : sources * : + properties * ) + { + $(action) $(targets) : $(sources) : $(properties) ; + } + + rule set-update-action-in-module ( m : action : targets * : + sources * : properties * ) + { + module $(m) + { + $(2) $(3) : $(4) : $(5) ; + } + } + + rule set-target-variable ( targets + : variable : value * : append ? + ) + { + if $(append) + { + $(variable) on $(targets) += $(value) ; + } + else + { + $(variable) on $(targets) = $(value) ; + } + } + + rule get-target-variable ( targets + : variable ) + { + return [ on $(targets) return $($(variable)) ] ; + } + + rule import-rules-from-parent ( parent-module : this-module : + user-rules * ) + { + IMPORT $(parent-module) : $(user-rules) : $(this-module) : + $(user-rules) ; + EXPORT $(this-module) : $(user-rules) ; + } + + rule mark-included ( targets * : includes * ) + { + NOCARE $(includes) ; + INCLUDES $(targets) : $(includes) ; + ISFILE $(includes) ; + } + } + + PYTHON_IMPORT_RULE bootstrap : bootstrap : PyBB : bootstrap ; + modules.poke PyBB : root : [ NORMALIZE_PATH $(.bootstrap-file:DT)/.. ] ; + + module PyBB + { + local ok = [ bootstrap $(root) ] ; + if ! $(ok) + { + EXIT ; + } + } + + + #PYTHON_IMPORT_RULE boost.build.build_system : main : PyBB : main ; + + #module PyBB + #{ + # main ; + #} + } +} diff --git a/src/boost/tools/build/src/kernel/bootstrap.py b/src/boost/tools/build/src/kernel/bootstrap.py new file mode 100644 index 000000000..1215ae795 --- /dev/null +++ b/src/boost/tools/build/src/kernel/bootstrap.py @@ -0,0 +1,25 @@ +# Copyright 2009 Vladimir Prus +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +import imp +import sys + +def bootstrap(root_path): + """Performs python-side bootstrapping of Boost.Build/Python. + + This function arranges for 'b2.whatever' package names to work, while also + allowing to put python files alongside corresponding jam modules. + """ + + m = imp.new_module("b2") + # Note that: + # 1. If __path__ is not list of strings, nothing will work + # 2. root_path is already list of strings. + m.__path__ = root_path + sys.modules["b2"] = m + + import b2.build_system + return b2.build_system.main() + diff --git a/src/boost/tools/build/src/kernel/class.jam b/src/boost/tools/build/src/kernel/class.jam new file mode 100644 index 000000000..ea84fe1d5 --- /dev/null +++ b/src/boost/tools/build/src/kernel/class.jam @@ -0,0 +1,420 @@ +# Copyright 2001, 2002, 2003 Dave Abrahams +# Copyright 2002, 2005 Rene Rivera +# Copyright 2002, 2003 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Polymorphic class system built on top of core Jam facilities. +# +# Classes are defined by 'class' keywords: +# +# class myclass +# { +# rule __init__ ( arg1 ) # constructor +# { +# self.attribute = $(arg1) ; +# } +# +# rule method1 ( ) # method +# { +# return [ method2 ] ; +# } +# +# rule method2 ( ) # method +# { +# return $(self.attribute) ; +# } +# } +# +# The __init__ rule is the constructor, and sets member variables. +# +# New instances are created by invoking [ new ]: +# +# local x = [ new myclass foo ] ; # x is a new myclass object +# assert.result foo : [ $(x).method1 ] ; # $(x).method1 returns "foo" +# +# Derived class are created by mentioning base classes in the declaration:: +# +# class derived : myclass +# { +# rule __init__ ( arg ) +# { +# myclass.__init__ $(arg) ; # call base __init__ +# +# } +# +# rule method2 ( ) # method override +# { +# return $(self.attribute)XXX ; +# } +# } +# +# All methods operate virtually, replacing behavior in the base classes. For +# example:: +# +# local y = [ new derived foo ] ; # y is a new derived object +# assert.result fooXXX : [ $(y).method1 ] ; # $(y).method1 returns "foo" +# +# Each class instance is its own core Jam module. All instance attributes and +# methods are accessible without additional qualification from within the class +# instance. All rules imported in class declaration, or visible in base classes +# are also visible. Base methods are available in qualified form: +# base-name.method-name. By convention, attribute names are prefixed with +# "self.". + +import modules ; +import numbers ; + + +rule xinit ( instance : class ) +{ + module $(instance) + { + __class__ = $(2) ; + __name__ = $(1) ; + } +} + + +rule new ( class args * : * ) +{ + .next-instance ?= 1 ; + local id = object($(class))@$(.next-instance) ; + + INSTANCE $(id) : class@$(class) ; + xinit $(id) : $(class) ; + IMPORT_MODULE $(id) ; + $(id).__init__ $(args) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : + $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : + $(18) : $(19) ; + + # Bump the next unique object name. + .next-instance = [ numbers.increment $(.next-instance) ] ; + + # Return the name of the new instance. + return $(id) ; +} + + +rule bases ( class ) +{ + module class@$(class) + { + return $(__bases__) ; + } +} + + +rule is-derived ( class : bases + ) +{ + local stack = $(class) ; + local visited found ; + while ! $(found) && $(stack) + { + local top = $(stack[1]) ; + stack = $(stack[2-]) ; + if ! ( $(top) in $(visited) ) + { + visited += $(top) ; + stack += [ bases $(top) ] ; + + if $(bases) in $(visited) + { + found = true ; + } + } + } + return $(found) ; +} + + +# Returns true if the 'value' is a class instance. +# +rule is-instance ( value ) +{ + return [ MATCH "^(object\\()[^@]+\\)@.*" : $(value) ] ; +} + + +# Check if the given value is of the given type. +# +rule is-a ( + instance # The value to check. + : type # The type to test for. +) +{ + if [ is-instance $(instance) ] + { + return [ class.is-derived [ modules.peek $(instance) : __class__ ] : $(type) ] ; + } +} + + +local rule typecheck ( x ) +{ + local class-name = [ MATCH "^\\[(.*)\\]$" : [ BACKTRACE 1 ] ] ; + if ! [ is-a $(x) : $(class-name) ] + { + return "Expected an instance of "$(class-name)" but got \""$(x)"\" for argument" ; + } +} + + +rule __test__ ( ) +{ + import assert ; + import "class" : new ; + import errors : try catch ; + + # This will be the construction function for a class called 'myclass'. + # + class myclass + { + import assert ; + + rule __init__ ( x_ * : y_ * ) + { + # Set some instance variables. + x = $(x_) ; + y = $(y_) ; + foo += 10 ; + } + + rule set-x ( newx * ) + { + x = $(newx) ; + } + + rule get-x ( ) + { + return $(x) ; + } + + rule set-y ( newy * ) + { + y = $(newy) ; + } + + rule get-y ( ) + { + return $(y) ; + } + + rule f ( ) + { + return [ g $(x) ] ; + } + + rule g ( args * ) + { + if $(x) in $(y) + { + return $(x) ; + } + else if $(y) in $(x) + { + return $(y) ; + } + else + { + return ; + } + } + + rule get-class ( ) + { + return $(__class__) ; + } + + rule get-instance ( ) + { + return $(__name__) ; + } + + rule invariant ( ) + { + assert.equal 1 : 1 ; + } + + rule get-foo ( ) + { + return $(foo) ; + } + } # class myclass ; + + class derived1 : myclass + { + rule __init__ ( z_ ) + { + myclass.__init__ $(z_) : X ; + z = $(z_) ; + } + + # Override g. + # + rule g ( args * ) + { + return derived1.g ; + } + + rule h ( ) + { + return derived1.h ; + } + + rule get-z ( ) + { + return $(z) ; + } + + # Check that 'assert.equal' visible in base class is visible here. + # + rule invariant2 ( ) + { + assert.equal 2 : 2 ; + } + + # Check that 'assert.variable-not-empty' visible in base class is + # visible here. + # + rule invariant3 ( ) + { + local v = 10 ; + assert.variable-not-empty v ; + } + } # class derived1 : myclass ; + + class derived2 : myclass + { + rule __init__ ( ) + { + myclass.__init__ 1 : 2 ; + } + + # Override g. + # + rule g ( args * ) + { + return derived2.g ; + } + + # Test the ability to call base class functions with qualification. + # + rule get-x ( ) + { + return [ myclass.get-x ] ; + } + } # class derived2 : myclass ; + + class derived2a : derived2 + { + rule __init__ + { + derived2.__init__ ; + } + } # class derived2a : derived2 ; + + local rule expect_derived2 ( [derived2] x ) { } + + local a = [ new myclass 3 4 5 : 4 5 ] ; + local b = [ new derived1 4 ] ; + local b2 = [ new derived1 4 ] ; + local c = [ new derived2 ] ; + local d = [ new derived2 ] ; + local e = [ new derived2a ] ; + + expect_derived2 $(d) ; + expect_derived2 $(e) ; + + # Argument checking is set up to call exit(1) directly on failure, and we + # can not hijack that with try, so we should better not do this test by + # default. We could fix this by having errors look up and invoke the EXIT + # rule instead; EXIT can be hijacked (;-) + if --fail-typecheck in [ modules.peek : ARGV ] + { + try ; + { + expect_derived2 $(a) ; + } + catch + "Expected an instance of derived2 but got" instead + ; + } + + #try ; + #{ + # new bad_subclass ; + #} + #catch + # bad_subclass.bad_subclass failed to call base class constructor + # myclass.__init__ + # ; + + #try ; + #{ + # class bad_subclass ; + #} + #catch bad_subclass has already been declared ; + + assert.result 3 4 5 : $(a).get-x ; + assert.result 4 5 : $(a).get-y ; + assert.result 4 : $(b).get-x ; + assert.result X : $(b).get-y ; + assert.result 4 : $(b).get-z ; + assert.result 1 : $(c).get-x ; + assert.result 2 : $(c).get-y ; + assert.result 4 5 : $(a).f ; + assert.result derived1.g : $(b).f ; + assert.result derived2.g : $(c).f ; + assert.result derived2.g : $(d).f ; + + assert.result 10 : $(b).get-foo ; + + $(a).invariant ; + $(b).invariant2 ; + $(b).invariant3 ; + + # Check that the __class__ attribute is getting properly set. + assert.result myclass : $(a).get-class ; + assert.result derived1 : $(b).get-class ; + assert.result $(a) : $(a).get-instance ; + + $(a).set-x a.x ; + $(b).set-x b.x ; + $(c).set-x c.x ; + $(d).set-x d.x ; + assert.result a.x : $(a).get-x ; + assert.result b.x : $(b).get-x ; + assert.result c.x : $(c).get-x ; + assert.result d.x : $(d).get-x ; + + class derived3 : derived1 derived2 + { + rule __init__ ( ) + { + } + } + + assert.result : bases myclass ; + assert.result myclass : bases derived1 ; + assert.result myclass : bases derived2 ; + assert.result derived1 derived2 : bases derived3 ; + + assert.true is-derived derived1 : myclass ; + assert.true is-derived derived2 : myclass ; + assert.true is-derived derived3 : derived1 ; + assert.true is-derived derived3 : derived2 ; + assert.true is-derived derived3 : derived1 derived2 myclass ; + assert.true is-derived derived3 : myclass ; + + assert.false is-derived myclass : derived1 ; + + assert.true is-instance $(a) ; + assert.false is-instance bar ; + + assert.true is-a $(a) : myclass ; + assert.true is-a $(c) : derived2 ; + assert.true is-a $(d) : myclass ; + assert.false is-a literal : myclass ; +} diff --git a/src/boost/tools/build/src/kernel/errors.jam b/src/boost/tools/build/src/kernel/errors.jam new file mode 100644 index 000000000..5b01d6f17 --- /dev/null +++ b/src/boost/tools/build/src/kernel/errors.jam @@ -0,0 +1,287 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2004 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Print a stack backtrace leading to this rule's caller. Each argument +# represents a line of output to be printed after the first line of the +# backtrace. +# +rule backtrace ( skip-frames prefix messages * : * ) +{ + local frame-skips = 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 ; + local drop-elements = $(frame-skips[$(skip-frames)]) ; + if ! ( $(skip-frames) in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ) + { + ECHO "warning: backtrace doesn't support skipping $(skip-frames) " + "frames; using 1 instead." ; + drop-elements = 5 ; + } + + local args = $(.args) ; + if $(.user-modules-only) + { + local bt = [ nearest-user-location ] ; + if $(bt) + { + ECHO $(prefix) at $(bt) ; + } + for local n in $(args) + { + if $($(n))-is-defined + { + ECHO $(prefix) $($(n)) ; + } + } + } + else + { + # Get the whole backtrace, then drop the initial quadruples + # corresponding to the frames that must be skipped. + local bt = [ BACKTRACE ] ; + bt = $(bt[$(drop-elements)-]) ; + + while $(bt) + { + local m = [ MATCH ^(.+)\\.$ : $(bt[3]) ] ; + ECHO "$(bt[1]):$(bt[2]):" "in" $(bt[4]) "from module" $(m) ; + + # The first time through, print each argument on a separate line. + for local n in $(args) + { + if $($(n))-is-defined + { + ECHO $(prefix) $($(n)) ; + } + } + args = ; # Kill args so that this never happens again. + + # Move on to the next quadruple. + bt = $(bt[5-]) ; + } + } +} + +.args ?= messages 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; +.disabled ?= ; +.last-error-$(.args) ?= ; + + +# try-catch -- +# +# This is not really an exception-handling mechanism, but it does allow us to +# perform some error-checking on our error-checking. Errors are suppressed after +# a try, and the first one is recorded. Use catch to check that the error +# message matched expectations. + +# Begin looking for error messages. +# +rule try ( ) +{ + .disabled += true ; + .last-error-$(.args) = ; +} + + +# Stop looking for error messages; generate an error if an argument of messages +# is not found in the corresponding argument in the error call. +# +rule catch ( messages * : * ) +{ + .disabled = $(.disabled[2-]) ; # Pop the stack. + + import sequence ; + + if ! $(.last-error-$(.args))-is-defined + { + error-skip-frames 3 expected an error, but none occurred ; + } + else + { + for local n in $(.args) + { + if ! $($(n)) in $(.last-error-$(n)) + { + local v = [ sequence.join $($(n)) : " " ] ; + v ?= "" ; + local joined = [ sequence.join $(.last-error-$(n)) : " " ] ; + + .last-error-$(.args) = ; + error-skip-frames 3 expected \"$(v)\" in argument $(n) of error + : got \"$(joined)\" instead ; + } + } + } +} + + +rule error-skip-frames ( skip-frames messages * : * ) +{ + if ! $(.disabled) + { + backtrace $(skip-frames) "error:" $(messages) : $(2) : $(3) : $(4) : $(5) + : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) + : $(15) : $(16) : $(17) : $(18) : $(19) ; + EXIT ; + } + else if ! $(.last-error-$(.args)) + { + for local n in $(.args) + { + # Add an extra empty string so that we always have something in the + # event of an error. + .last-error-$(n) = $($(n)) "" ; + } + } +} + +if --no-error-backtrace in [ modules.peek : ARGV ] +{ + .no-error-backtrace = true ; +} + + +# Print an error message with a stack backtrace and exit. +# +rule error ( messages * : * ) +{ + if $(.no-error-backtrace) + { + local first-printed ; + # Print each argument on a separate line. + for local n in $(.args) + { + if $($(n))-is-defined + { + if ! $(first-printed) + { + ECHO "error:" $($(n)) ; + first-printed = true ; + } + else + { + ECHO $($(n)) ; + } + } + } + EXIT ; + } + else + { + error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : + $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) + : $(17) : $(18) : $(19) ; + } +} + + +# Same as 'error', but the generated backtrace will include only user files. +# +rule user-error ( messages * : * ) +{ + .user-modules-only = 1 ; + error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : + $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : + $(18) : $(19) ; +} + + +# Print a warning message with a stack backtrace and exit. +# +rule warning +{ + backtrace 2 "warning:" $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : + $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : + $(18) : $(19) ; +} + + +# Convert an arbitrary argument list into a list with ":" separators and quoted +# elements representing the same information. This is mostly useful for +# formatting descriptions of arguments with which a rule was called when +# reporting an error. +# +rule lol->list ( * ) +{ + local result ; + local remaining = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; + while $($(remaining)) + { + local n = $(remaining[1]) ; + remaining = $(remaining[2-]) ; + + if $(n) != 1 + { + result += ":" ; + } + result += \"$($(n))\" ; + } + return $(result) ; +} + + +# Return the file:line for the nearest entry in backtrace which correspond to a +# user module. +# +rule nearest-user-location ( ) +{ + local bt = [ BACKTRACE ] ; + + local result ; + while $(bt) && ! $(result) + { + local m = [ MATCH ^(.+)\\.$ : $(bt[3]) ] ; + local user-modules = "([Jj]amroot(.jam|.v2|)|([Jj]amfile(.jam|.v2|)|user-config.jam|site-config.jam|project-config.jam|project-root.jam)" ; + + if [ MATCH $(user-modules) : $(bt[1]:D=) ] + { + result = "$(bt[1]):$(bt[2])" ; + } + bt = $(bt[5-]) ; + } + return $(result) ; +} + + +# If optimized rule is available in Jam, use it. +if NEAREST_USER_LOCATION in [ RULENAMES ] +{ + rule nearest-user-location ( ) + { + local r = [ NEAREST_USER_LOCATION ] ; + return "$(r[1]):$(r[2])" ; + } +} + + +rule __test__ ( ) +{ + # Show that we can correctly catch an expected error. + try ; + { + error an error occurred : somewhere ; + } + catch an error occurred : somewhere ; + + # Show that unexpected errors generate real errors. + try ; + { + try ; + { + error an error occurred : somewhere ; + } + catch an error occurred : nowhere ; + } + catch expected \"nowhere\" in argument 2 ; + + # Show that not catching an error where one was expected is an error. + try ; + { + try ; + { + } + catch ; + } + catch expected an error, but none occurred ; +} diff --git a/src/boost/tools/build/src/kernel/modules.jam b/src/boost/tools/build/src/kernel/modules.jam new file mode 100644 index 000000000..f7fb2c0ba --- /dev/null +++ b/src/boost/tools/build/src/kernel/modules.jam @@ -0,0 +1,364 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.bfgroup.xyz/b2/LICENSE.txt) + +# Essentially an include guard; ensures that no module is loaded multiple times. +.loaded ?= ; + +# A list of modules currently being loaded for error reporting of circular +# dependencies. +.loading ?= ; + +# A list of modules needing to be tested using their __test__ rule. +.untested ?= ; + +# A list of modules which have been tested using their __test__ rule. +.tested ?= ; + + +# Runs internal Boost Build unit tests for the specified module. The module's +# __test__ rule is executed in its own module to eliminate any inadvertent +# effects of testing module dependencies (such as assert) on the module itself. +# +local rule run-module-test ( m ) +{ + local tested-modules = [ modules.peek modules : .tested ] ; + + if ( ! $(m) in $(tested-modules) ) # Avoid recursive test invocations. + && ( ( --debug in $(argv) ) || ( "--debug-module=$(m)" in $(argv) ) ) + { + modules.poke modules : .tested : $(tested-modules) $(m) ; + + if ! ( __test__ in [ RULENAMES $(m) ] ) + { + local argv = [ peek : ARGV ] ; + if ! ( --quiet in $(argv) ) && ( --debug-tests in $(argv) ) + { + ECHO "warning:" no __test__ rule defined in module $(m) ; + } + } + else + { + if ! ( --quiet in $(argv) ) + { + ECHO testing module $(m)... ; + } + + local test-module = __test-$(m)__ ; + IMPORT $(m) : [ RULENAMES $(m) ] : $(test-module) : [ RULENAMES $(m) + ] ; + IMPORT $(m) : __test__ : $(test-module) : __test__ : LOCALIZE ; + module $(test-module) + { + __test__ ; + } + } + } +} + + +# Return the binding of the given module. +# +rule binding ( module ) +{ + return $($(module).__binding__) ; +} + + +# Sets the module-local value of a variable. This is the most reliable way to +# set a module-local variable in a different module; it eliminates issues of +# name shadowing due to dynamic scoping. +# +rule poke ( module-name ? : variables + : value * ) +{ + module $(<) + { + $(>) = $(3) ; + } +} + + +# Returns the module-local value of a variable. This is the most reliable way to +# examine a module-local variable in a different module; it eliminates issues of +# name shadowing due to dynamic scoping. +# +rule peek ( module-name ? : variables + ) +{ + module $(<) + { + return $($(>)) ; + } +} + + +# Call the given rule locally in the given module. Use this for rules accepting +# rule names as arguments, so that the passed rule may be invoked in the context +# of the rule's caller (for example, if the rule accesses module globals or is a +# local rule). Note that rules called this way may accept at most 18 parameters. +# +rule call-in ( module-name ? : rule-name args * : * ) +{ + module $(module-name) + { + return [ $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : + $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) ] ; + } +} + + +# Given a possibly qualified rule name and arguments, remove any initial module +# qualification from the rule and invoke it in that module. If there is no +# module qualification, the rule is invoked in the global module. Note that +# rules called this way may accept at most 18 parameters. +# +rule call-locally ( qualified-rule-name args * : * ) +{ + local module-rule = [ MATCH (.*)\\.(.*) : $(qualified-rule-name) ] ; + local rule-name = $(module-rule[2]) ; + rule-name ?= $(qualified-rule-name) ; + # We pass only 18 parameters here since Boost Jam allows at most 19 rule + # parameter positions and the call-in rule already uses up the initial + # position for the module name. + return [ call-in $(module-rule[1]) : $(rule-name) $(args) : $(2) : $(3) : + $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) + $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] ; +} + + +# Load the indicated module if it is not already loaded. +# +rule load ( + module-name # Name of module to load. Rules will be defined in this + # module. + : filename ? # (partial) path to file; Defaults to $(module-name).jam. + : search * # Directories in which to search for filename. Defaults to + # $(BOOST_BUILD_PATH). +) +{ + # Avoid loading modules twice. + if ! ( $(module-name) in $(.loaded) ) + { + filename ?= $(module-name).jam ; + + # Mark the module loaded so we do not try to load it recursively. + .loaded += $(module-name:B) ; + + # Suppress tests if any module loads are already in progress. + local suppress-test = $(.loading[1]) ; + + # Push this module on the loading stack. + .loading += $(module-name) ; + + # Remember that it is untested. + .untested += $(module-name) ; + + # Insert the new module's __name__ and __file__ globals. + poke $(module-name) : __name__ : $(module-name) ; + poke $(module-name) : __file__ : $(filename) ; + + module $(module-name) + { + # Add some grist so that the module will have a unique target name. + local module-target = $(__file__:G=module@) ; + + local search = $(3) ; + search ?= [ modules.peek : BOOST_BUILD_PATH ] ; + SEARCH on $(module-target) = $(search) ; + BINDRULE on $(module-target) = modules.record-binding ; + + include $(module-target) ; + + # Allow the module to see its own names with full qualification. + local rules = [ RULENAMES $(__name__) ] ; + IMPORT $(__name__) : $(rules) : $(__name__) : $(__name__).$(rules) ; + } + + if $(module-name) != modules && ! [ binding $(module-name) ] + { + import errors ; + errors.error "Could not find module" $(module-name) in $(search) ; + } + + # Pop the loading stack. Must happen before testing or we will run into + # a circular loading dependency. + .loading = $(.loading[1--2]) ; + + # Run any pending tests if this is an outer load. + if ! $(suppress-test) + { + local argv = [ peek : ARGV ] ; + for local m in $(.untested) + { + run-module-test $(m) ; + } + .untested = ; + } + } + else if $(module-name) in $(.loading) + { + import errors ; + errors.error loading \"$(module-name)\" + : circular module loading "dependency:" + : $(.loading)" ->" $(module-name) ; + } +} + + +# This helper is used by load (above) to record the binding (path) of each +# loaded module. +# +rule record-binding ( module-target : binding ) +{ + $(.loading[-1]).__binding__ = $(binding) ; +} + + +# Transform each path in the list, with all backslashes converted to forward +# slashes and all detectable redundancy removed. Something like this is probably +# needed in path.jam, but I am not sure of that, I do not understand it, and I +# am not ready to move all of path.jam into the kernel. +# +local rule normalize-raw-paths ( paths * ) +{ + local result ; + for p in $(paths:T) + { + result += [ NORMALIZE_PATH $(p) ] ; + } + return $(result) ; +} + + +.cwd = [ PWD ] ; + + +# Load the indicated module and import rule names into the current module. Any +# members of rules-opt will be available without qualification in the caller's +# module. Any members of rename-opt will be taken as the names of the rules in +# the caller's module, in place of the names they have in the imported module. +# If rules-opt = '*', all rules from the indicated module are imported into the +# caller's module. If rename-opt is supplied, it must have the same number of +# elements as rules-opt. +# +rule import ( module-names + : rules-opt * : rename-opt * ) +{ + if ( $(rules-opt) = * || ! $(rules-opt) ) && $(rename-opt) + { + import errors ; + errors.error "Rule aliasing is only available for explicit imports." ; + } + + if $(module-names[2]) && ( $(rules-opt) || $(rename-opt) ) + { + import errors ; + errors.error "When loading multiple modules, no specific rules or" + "renaming is allowed" ; + } + + local caller = [ CALLER_MODULE ] ; + + # Import each specified module + for local m in $(module-names) + { + local module-name = $(m:B) ; + if ! $(module-name) in $(.loaded) + { + # If the importing module is not already in the BOOST_BUILD_PATH, + # prepend it to the path. We do not want to invert the search order + # of modules that are already there. + + local caller-location ; + if $(caller) + { + caller-location = [ binding $(caller) ] ; + caller-location = $(caller-location:D) ; + caller-location = [ normalize-raw-paths + $(caller-location:R=$(.cwd)) ] ; + } + + local search = [ peek : BOOST_BUILD_PATH ] ; + search = [ normalize-raw-paths $(search:R=$(.cwd)) ] ; + + if $(caller-location) && ! $(caller-location) in $(search) + { + search = $(caller-location) $(search) ; + } + + if $(m:D) + { + search = $(caller-location)/$(m:D) $(search)/$(m:D) $(search) ; + } + + load $(module-name) : : $(search) ; + } + + IMPORT_MODULE $(module-name) : $(caller) ; + + if $(rules-opt) + { + local source-names ; + if $(rules-opt) = * + { + local all-rules = [ RULENAMES $(module-name) ] ; + source-names = $(all-rules) ; + } + else + { + source-names = $(rules-opt) ; + } + local target-names = $(rename-opt) ; + target-names ?= $(source-names) ; + IMPORT $(module-name) : $(source-names) : $(caller) : $(target-names) ; + } + } +} + + +# Define exported copies in $(target-module) of all rules exported from +# $(source-module). Also make them available in the global module with +# qualification, so that it is just as though the rules were defined originally +# in $(target-module). +# +rule clone-rules ( source-module target-module ) +{ + local r = [ RULENAMES $(source-module) ] ; + IMPORT $(source-module) : $(r) : $(target-module) : $(r) : LOCALIZE ; + EXPORT $(target-module) : $(r) ; + IMPORT $(target-module) : $(r) : : $(target-module).$(r) ; +} + + +# These rules need to be available in all modules to implement module loading +# itself and other fundamental operations. +local globalize = peek poke record-binding ; +IMPORT modules : $(globalize) : : modules.$(globalize) ; + + +rule __test__ ( ) +{ + import assert ; + import modules : normalize-raw-paths ; + + module modules.__test__ + { + foo = bar ; + } + + assert.result bar : peek modules.__test__ : foo ; + + poke modules.__test__ : foo : bar baz ; + assert.result bar baz : peek modules.__test__ : foo ; + + assert.result c:/foo/bar : normalize-raw-paths c:/x/../foo/./xx/yy/../../bar ; + assert.result . : normalize-raw-paths . ; + assert.result .. : normalize-raw-paths .. ; + assert.result ../.. : normalize-raw-paths ../.. ; + assert.result .. : normalize-raw-paths ./.. ; + assert.result / / : normalize-raw-paths / \\ ; + assert.result a : normalize-raw-paths a ; + assert.result a : normalize-raw-paths a/ ; + assert.result /a : normalize-raw-paths /a/ ; + assert.result / : normalize-raw-paths /a/.. ; +} diff --git a/src/boost/tools/build/src/manager.py b/src/boost/tools/build/src/manager.py new file mode 100644 index 000000000..6f4508567 --- /dev/null +++ b/src/boost/tools/build/src/manager.py @@ -0,0 +1,110 @@ +# Copyright Pedro Ferreira 2005. Distributed under the Boost +# Software License, Version 1.0. (See accompanying +# file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) + +import bjam + +# To simplify implementation of tools level, we'll +# have a global variable keeping the current manager. +the_manager = None +def get_manager(): + return the_manager + +class Manager: + """ This class is a facade to the Boost.Build system. + It serves as the root to access all data structures in use. + """ + + def __init__ (self, engine, global_build_dir): + """ Constructor. + engine: the build engine that will actually construct the targets. + """ + from build.virtual_target import VirtualTargetRegistry + from build.targets import TargetRegistry + from build.project import ProjectRegistry + from build.scanner import ScannerRegistry + from build.errors import Errors + from b2.util.logger import NullLogger + from build import build_request, property_set, feature + + self.engine_ = engine + self.virtual_targets_ = VirtualTargetRegistry (self) + self.projects_ = ProjectRegistry (self, global_build_dir) + self.targets_ = TargetRegistry () + self.logger_ = NullLogger () + self.scanners_ = ScannerRegistry (self) + self.argv_ = bjam.variable("ARGV") + self.boost_build_path_ = bjam.variable("BOOST_BUILD_PATH") + self.errors_ = Errors() + self.command_line_free_features_ = property_set.empty() + + global the_manager + the_manager = self + + def scanners (self): + return self.scanners_ + + def engine (self): + return self.engine_ + + def virtual_targets (self): + return self.virtual_targets_ + + def targets (self): + return self.targets_ + + def projects (self): + return self.projects_ + + def argv (self): + return self.argv_ + + def logger (self): + return self.logger_ + + def set_logger (self, logger): + self.logger_ = logger + + def errors (self): + return self.errors_ + + def getenv(self, name): + return bjam.variable(name) + + def boost_build_path(self): + return self.boost_build_path_ + + def command_line_free_features(self): + return self.command_line_free_features_ + + def set_command_line_free_features(self, v): + self.command_line_free_features_ = v + + def construct (self, properties = [], targets = []): + """ Constructs the dependency graph. + properties: the build properties. + targets: the targets to consider. If none is specified, uses all. + """ + if not targets: + for name, project in self.projects ().projects (): + targets.append (project.target ()) + + property_groups = build_request.expand_no_defaults (properties) + + virtual_targets = [] + build_prop_sets = [] + for p in property_groups: + build_prop_sets.append (property_set.create (feature.split (p))) + + if not build_prop_sets: + build_prop_sets = [property_set.empty ()] + + for build_properties in build_prop_sets: + for target in targets: + result = target.generate (build_properties) + virtual_targets.extend (result.targets ()) + + actual_targets = [] + for virtual_target in virtual_targets: + actual_targets.extend (virtual_target.actualize ()) + diff --git a/src/boost/tools/build/src/options/help.jam b/src/boost/tools/build/src/options/help.jam new file mode 100644 index 000000000..9683d1a7c --- /dev/null +++ b/src/boost/tools/build/src/options/help.jam @@ -0,0 +1,222 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2003, 2006 Rene Rivera +# Copyright 2003, 2006 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) + +# This module is the plug-in handler for the --help and --help-.* +# command-line options +import modules ; +import assert ; +import doc : do-scan set-option set-output set-output-file print-help-usage print-help-top ; +import sequence ; +import set ; +import project ; +import print ; +import os ; +import version ; +import path ; + +# List of possible modules, but which really aren't. +# +.not-modules = + boost-build bootstrap site-config test user-config + -tools allyourbase boost-base features python stlport testing unit-tests ; + +# The help system options are parsed here and handed off to the doc +# module to translate into documentation requests and actions. The +# understood options are: +# +# --help-disable-
    \n"; + std::cout << "\n

    library + << "\">" << itr->library << "

    \n
    ";
    +        }
    +        if ( current.library != itr->library
    +          || current.rel_path != itr->rel_path )
    +        {
    +          std::cout << "\n";
    +          std::cout << itr->rel_path;
    +          first_sep = true;
    +        }
    +        if ( current.library != itr->library
    +          || current.rel_path != itr->rel_path
    +          || current.msg != itr->msg )
    +        {
    +          std::string sep;
    +          if (first_sep)
    +            if (itr->line_number) sep = ":
        "; + else sep = ": "; + else + if (itr->line_number) sep = "
        "; + else sep = ", "; + + // print the message + if (itr->line_number) + std::cout << sep << "(line " << itr->line_number << ") " << html_encode(itr->msg); + else std::cout << sep << html_encode(itr->msg); + + first_sep = false; + } + current.library = itr->library; + current.rel_path = itr->rel_path; + current.msg = itr->msg; + first = false; + } + std::cout << "
    \n"; + } + } + + +// worst_offenders_count_helper --------------------------------------------------// + + void worst_offenders_count_helper( const string & current_library, int err_count ) + { + lib_error_count lec; + lec.library = current_library; + lec.error_count = err_count; + libs.push_back( lec ); + } +// worst_offenders_count -----------------------------------------------------// + + void worst_offenders_count() + { + if ( msgs.empty() ) + { + return; + } + string current_library( msgs.begin()->library ); + int err_count = 0; + for ( error_msg_vector::iterator itr ( msgs.begin() ); + itr != msgs.end(); ++itr ) + { + if ( current_library != itr->library ) + { + worst_offenders_count_helper( current_library, err_count ); + current_library = itr->library; + err_count = 0; + } + ++err_count; + } + worst_offenders_count_helper( current_library, err_count ); + } + +// display_worst_offenders -------------------------------------------------// + + void display_worst_offenders() + { + if (display_mode == display_brief) + return; + if (display_format == display_text) + { + std::cout << "Worst Offenders:\n"; + } + else + { + std::cout << + "

    Worst Offenders

    \n" + "
    \n" + ; + } + + int display_count = 0; + int last_error_count = 0; + for ( lib_error_count_vector::iterator itr ( libs.begin() ); + itr != libs.end() + && (display_count < max_offenders + || itr->error_count == last_error_count); + ++itr, ++display_count ) + { + if (display_format == display_text) + { + std::cout << itr->library << " " << itr->error_count << "\n"; + } + else + { + std::cout + << " library + << "\">" << itr->library + << " (" + << itr->error_count << ")
    \n"; + } + last_error_count = itr->error_count; + } + + if (display_format == display_text) + std::cout << "\n"; + else + std::cout << "
    \n"; + } + + + const char * options() + { + return + " Output Options:\n\n" + " -brief\n" + " -text\n" + " -version-string \n" + "\n" + " Checks:\n\n" + " -license\n" + " -copyright\n" + " -crlf\n" + " -end\n" + " -link\n" + " -path_name\n" + " -tab\n" + " -ascii\n" + " -apple_macro\n" + " -assert_macro\n" + " -deprecated_macro\n" + " -minmax\n" + " -unnamed\n" + " -version-string \n" + " default is all checks on; otherwise options specify desired checks" + "\n"; + } + + const char * doctype_declaration() + { + return + "" + ; + } + + std::string validator_link(const std::string & text) + { + return + // with link to validation service + "" + + text + + "" + ; + } + +} // unnamed namespace + +namespace boost +{ + namespace inspect + { + +// line_break --------------------------------------------------------------// + + const char * line_break() + { + return display_format ? "\n" : "
    \n"; + } + +// search_root_path --------------------------------------------------------// + + path search_root_path() + { + return search_root; + } + +// register_signature ------------------------------------------------------// + + void inspector::register_signature( const string & signature ) + { + m_signatures.insert( signature ); + content_signatures.insert( signature ); + } + +// error -------------------------------------------------------------------// + + void inspector::error( const string & library_name, + const path & full_path, const string & msg, int line_number ) + { + ++error_count; + error_msg err_msg; + err_msg.library = library_name; + err_msg.rel_path = relative_to( full_path, search_root_path() ); + err_msg.msg = msg; + err_msg.line_number = line_number; + msgs.push_back( err_msg ); + +// std::cout << library_name << ": " +// << full_path.string() << ": " +// << msg << '\n'; + + } + + source_inspector::source_inspector() + { + // C/C++ source code... + register_signature( ".c" ); + register_signature( ".cpp" ); + register_signature( ".css" ); + register_signature( ".cxx" ); + register_signature( ".h" ); + register_signature( ".hpp" ); + register_signature( ".hxx" ); + register_signature( ".inc" ); + register_signature( ".ipp" ); + + // Boost.Build BJam source code... + register_signature( "Jamfile" ); + register_signature( ".jam" ); + register_signature( ".v2" ); + + // Other scripts; Python, shell, autoconfig, etc. + register_signature( "configure.in" ); + register_signature( "GNUmakefile" ); + register_signature( "Makefile" ); + register_signature( ".bat" ); + register_signature( ".mak" ); + register_signature( ".pl" ); + register_signature( ".py" ); + register_signature( ".sh" ); + + // Hypertext, Boost.Book, and other text... + register_signature( "news" ); + register_signature( "readme" ); + register_signature( "todo" ); + register_signature( "NEWS" ); + register_signature( "README" ); + register_signature( "TODO" ); + register_signature( ".boostbook" ); + register_signature( ".htm" ); + register_signature( ".html" ); + register_signature( ".rst" ); + register_signature( ".sgml" ); + register_signature( ".shtml" ); + register_signature( ".txt" ); + register_signature( ".xml" ); + register_signature( ".xsd" ); + register_signature( ".xsl" ); + register_signature( ".qbk" ); + } + + hypertext_inspector::hypertext_inspector() + { + register_signature( ".htm" ); + register_signature( ".html" ); + register_signature( ".shtml" ); + } + +// impute_library ----------------------------------------------------------// + + // may return an empty string [gps] + string impute_library( const path & full_dir_path ) + { + path relative( relative_to( full_dir_path, search_root_path() ) ); + if ( relative.empty() ) return "boost-root"; + string first( (*relative.begin()).string() ); + string second = // borland 5.61 requires op= + ++relative.begin() == relative.end() + ? string() : (*++relative.begin()).string(); + + if ( first == "boost" ) + return second; + + return (( first == "libs" || first == "tools" ) && !second.empty()) + ? second : first; + } + + } // namespace inspect +} // namespace boost + +// cpp_main() --------------------------------------------------------------// + +#if !INSPECT_USE_BOOST_TEST +int main( int argc_param, char * argv_param[] ) +#else +int cpp_main( int argc_param, char * argv_param[] ) +#endif +{ + // for the moment, let's be on the safe side + // and ensure we don't modify anything being pointed to; + // then we'll do some cleanup here + int argc = argc_param; + const char* const * argv = &argv_param[0]; + + if ( argc > 1 && (std::strcmp( argv[1], "-help" ) == 0 + || std::strcmp( argv[1], "--help" ) == 0 ) ) + { + std::clog << "Usage: inspect [search-root] [options...]\n\n" + " search-root default is the current directory (i.e. '.')\n\n" + << options() << '\n'; + return 0; + } + + bool options_not_set = true; + bool license_ck = false; + bool copyright_ck = false; + bool crlf_ck = false; + bool end_ck = false; + bool link_ck = false; + bool path_name_ck = false; + bool tab_ck = false; + bool ascii_ck = false; + bool apple_ck = false; + bool assert_ck = false; + bool deprecated_ck = false; + bool minmax_ck = false; + bool unnamed_ck = false; + const char* version_string = 0; + + if ( argc > 1 && *argv[1] != '-' ) + { + search_root = fs::canonical(fs::absolute(argv[1], fs::initial_path())); + --argc; ++argv; + } + + bool invalid_options = false; + for(; argc > 1; --argc, ++argv ) + { + if ( std::strcmp( argv[1], "-license" ) == 0 ) { + options_not_set = false; + license_ck = true; + } + else if ( std::strcmp( argv[1], "-copyright" ) == 0 ) { + options_not_set = false; + copyright_ck = true; + } + else if ( std::strcmp( argv[1], "-crlf" ) == 0 ) { + options_not_set = false; + crlf_ck = true; + } + else if ( std::strcmp( argv[1], "-end" ) == 0 ) { + options_not_set = false; + end_ck = true; + } + else if ( std::strcmp( argv[1], "-link" ) == 0 ) { + options_not_set = false; + link_ck = true; + } + else if ( std::strcmp( argv[1], "-path_name" ) == 0 ) { + options_not_set = false; + path_name_ck = true; + } + else if ( std::strcmp( argv[1], "-tab" ) == 0 ) { + options_not_set = false; + tab_ck = true; + } + else if ( std::strcmp( argv[1], "-ascii" ) == 0 ) { + options_not_set = false; + ascii_ck = true; + } + else if ( std::strcmp( argv[1], "-apple_macro" ) == 0 ) { + options_not_set = false; + apple_ck = true; + } + else if ( std::strcmp( argv[1], "-assert_macro" ) == 0 ) { + options_not_set = false; + assert_ck = true; + } + else if ( std::strcmp( argv[1], "-deprecated_macro" ) == 0 ) { + options_not_set = false; + deprecated_ck = true; + } + else if ( std::strcmp( argv[1], "-minmax" ) == 0 ) { + options_not_set = false; + minmax_ck = true; + } + else if ( std::strcmp( argv[1], "-unnamed" ) == 0 ) { + options_not_set = false; + unnamed_ck = true; + } + else if ( argc > 1 && std::strcmp( argv[1], "-text" ) == 0 ) + { + display_format = display_text; + } + else if ( argc > 1 && std::strcmp( argv[1], "-brief" ) == 0 ) + { + display_mode = display_brief; + } + else if ( std::strcmp( argv[1], "-version-string" ) == 0 ) { + if (argc == 2 || argv[2][0] == '-') { + std::cerr << "Missing value for -version-string.\n"; + invalid_options = true; + } + else { + --argc, ++argv; + version_string = argv[1]; + } + } + else + { + std::cerr << "unknown option: " << argv[1] << '\n'; + invalid_options = true; + } + } + if ( invalid_options ) { + std::cerr << "\nvalid options are:\n" + << options(); + return 2; + } + + if (options_not_set) { + license_ck = true; + copyright_ck = true; + crlf_ck = true; + end_ck = true; + link_ck = true; + path_name_ck = true; + tab_ck = true; + ascii_ck = true; + apple_ck = true; + assert_ck = true; + deprecated_ck = true; + minmax_ck = true; + unnamed_ck = true; + } + + string inspector_keys; + + { // begin reporting block + + // since this is in its own block; reporting will happen + // automatically, from each registered inspector, when + // leaving, due to destruction of the inspector_list object + inspector_list inspectors; + + if ( license_ck ) + inspectors.push_back( inspector_element( new boost::inspect::license_check ) ); + if ( copyright_ck ) + inspectors.push_back( inspector_element( new boost::inspect::copyright_check ) ); + if ( crlf_ck ) + inspectors.push_back( inspector_element( new boost::inspect::crlf_check ) ); + if ( end_ck ) + inspectors.push_back( inspector_element( new boost::inspect::end_check ) ); + if ( link_ck ) + inspectors.push_back( inspector_element( new boost::inspect::link_check ) ); + if ( path_name_ck ) + inspectors.push_back( inspector_element( new boost::inspect::file_name_check ) ); + if ( tab_ck ) + inspectors.push_back( inspector_element( new boost::inspect::tab_check ) ); + if ( ascii_ck ) + inspectors.push_back( inspector_element( new boost::inspect::ascii_check ) ); + if ( apple_ck ) + inspectors.push_back( inspector_element( new boost::inspect::apple_macro_check ) ); + if ( assert_ck ) + inspectors.push_back( inspector_element( new boost::inspect::assert_macro_check ) ); + if ( deprecated_ck ) + inspectors.push_back( inspector_element( new boost::inspect::deprecated_macro_check ) ); + if ( minmax_ck ) + inspectors.push_back( inspector_element( new boost::inspect::minmax_check ) ); + if ( unnamed_ck ) + inspectors.push_back( inspector_element( new boost::inspect::unnamed_namespace_check ) ); + + visit_all( search_root.leaf().string(), + search_root, inspectors ); + + // close + for ( inspector_list::iterator itr = inspectors.begin(); + itr != inspectors.end(); ++itr ) + { + itr->inspector->close(); + } + + string run_date ( "n/a" ); + boost::time_string( run_date ); + + if (display_format == display_text) + { + std::cout + << + "Boost Inspection Report\n" + "Run Date: " << run_date << "\n" + "\n" + ; + + if (version_string) { + std::cout + << "The files checked were from " + << version_string + << ".\n\n"; + } + + std::cout + << "Totals:\n" + << " " << file_count << " files scanned\n" + << " " << directory_count << " directories scanned (including root)\n" + << " " << error_count << " problems reported\n" + << '\n' + ; + } + else + { + // + std::cout << doctype_declaration() << '\n'; + + std::cout + << "\n" + "\n" + "\n" + "Boost Inspection Report\n" + "\n" + + "\n" + // we should not use a table, of course [gps] + "\n" + "\n" + "\n" + "\n" + "\n" + "
    \"Boost" + "\n" + "

    Boost Inspection Report

    \n" + "Run Date: " << run_date << "\n" + //"  / " << validator_link( "validate me" ) << " /\n" + "
    \n" + + "

    This report is generated by an inspection\n" + "program that checks files for the problems noted below.

    \n" + ; + if (version_string) { + std::cout + << "

    The files checked were from " + << html_encode(version_string) + << ".

    \n"; + } + + + std::cout + << "

    Totals

    \n" + << file_count << " files scanned
    \n" + << directory_count << " directories scanned (including root)
    \n" + << error_count << " problems reported\n

    "; + } + + for ( inspector_list::iterator itr = inspectors.begin(); + itr != inspectors.end(); ++itr ) + { + + inspector_keys += static_cast(" ") + + itr->inspector->name() + + ' ' + itr->inspector->desc() + + line_break() + ; + } + + if (display_format == display_text) + std::cout << "\nProblem counts:\n"; + else + std::cout << "\n

    Problem counts

    \n

    \n" ; + + } // end of block: starts reporting + + if (display_format == display_text) + std::cout << "\n" ; + else + std::cout << "

    \n"; + + std::sort( msgs.begin(), msgs.end() ); + + worst_offenders_count(); + std::stable_sort( libs.begin(), libs.end() ); + + if ( !libs.empty() && display_mode != display_brief) + display_worst_offenders(); + + if ( !msgs.empty() ) + { + display_summary(); + + if (display_format == display_text) + { + std::cout << "Details:\n" << inspector_keys; + std::cout << "\nDirectories with a file named \"" << boost_no_inspect << "\" will not be inspected.\n" + "Files containing \"" << boost_no_inspect << "\" will not be inspected.\n"; + } + else + { + std::cout << "

    Details

    \n" << inspector_keys; + std::cout << "\n

    Directories with a file named \"" << boost_no_inspect << "\" will not be inspected.
    \n" + "Files containing \"" << boost_no_inspect << "\" will not be inspected.

    \n"; + } + display_details(); + } + + if (display_format == display_text) + { + std::cout << "\n\n" ; + } + else + { + std::cout + << "\n" + "\n"; + } + + return error_count ? 1 : 0; +} diff --git a/src/boost/tools/inspect/inspector.hpp b/src/boost/tools/inspect/inspector.hpp new file mode 100644 index 000000000..408a4f868 --- /dev/null +++ b/src/boost/tools/inspect/inspector.hpp @@ -0,0 +1,108 @@ +// inspector header --------------------------------------------------------// + +// Copyright Beman Dawes 2002. +// Copyright Rene Rivera 2004. +// Copyright Gennaro Prota 2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_INSPECTOR_HPP +#define BOOST_INSPECTOR_HPP + +#include +#include +#include +#include +#include "boost/filesystem/path.hpp" + +using std::string; +using boost::filesystem::path; + +namespace boost +{ + namespace inspect + { + typedef std::set< string > string_set; + + const char * line_break(); + + path search_root_path(); + + class inspector + { + protected: + inspector() {} + + public: + virtual ~inspector() {} + + virtual const char * name() const = 0; // example: "tab-check" + virtual const char * desc() const = 0; // example: "verify no tabs" + + // always called: + virtual void inspect( + const string & /*library_name*/, // "filesystem" + const path & /*full_path*/ ) {} // "c:/foo/boost/filesystem/path.hpp" + + // called only for registered leaf() signatures: + virtual void inspect( + const string & library_name, // "filesystem" + const path & full_path, // "c:/foo/boost/filesystem/path.hpp" + const string & contents ) // contents of file + = 0 + ; + + // called after all paths visited, but still in time to call error(): + virtual void close() {} + + // callback used by constructor to register leaf() signature. + // Signature can be a full file name (Jamfile) or partial (.cpp) + void register_signature( const string & signature ); + const string_set & signatures() const { return m_signatures; } + + // report error callback (from inspect(), close() ): + void error( + const string & library_name, + const path & full_path, + const string & msg, + int line_number =0 ); // 0 if not available or not applicable + + private: + string_set m_signatures; + }; + + // for inspection of source code of one form or other + class source_inspector : public inspector + { + public: + // registers the basic set of known source signatures + source_inspector(); + }; + + // for inspection of hypertext, specifically html + class hypertext_inspector : public inspector + { + public: + // registers the set of known html source signatures + hypertext_inspector(); + }; + + inline string relative_to( const path & src_arg, const path & base_arg ) + { + path base( base_arg ); + base.normalize(); + string::size_type pos( base.string().size() ); + path src( src_arg.string().substr(pos) ); + src.normalize(); + return src.string().substr(1); + } + + string impute_library( const path & full_dir_path ); + + } +} + +#endif // BOOST_INSPECTOR_HPP + diff --git a/src/boost/tools/inspect/license_check.cpp b/src/boost/tools/inspect/license_check.cpp new file mode 100644 index 000000000..86d1d20e7 --- /dev/null +++ b/src/boost/tools/inspect/license_check.cpp @@ -0,0 +1,48 @@ +// license_check implementation --------------------------------------------// + +// Copyright Beman Dawes 2002-2003. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "boost/regex.hpp" +#include "license_check.hpp" + +namespace +{ + boost::regex license_regex( + //~ The next two lines change the regex so that it detects when the license + //~ doesn't follow the prefered statement. Disabled because it currently + //~ generates a large number of issues. + //~ "Distributed[\\s\\W]+" + //~ "under[\\s\\W]+the[\\s\\W]+" + "boost[\\s\\W]+software[\\s\\W]+license", + boost::regbase::normal | boost::regbase::icase); + +} // unnamed namespace + +namespace boost +{ + namespace inspect + { + license_check::license_check() : m_files_with_errors(0) + { + } + + void license_check::inspect( + const string & library_name, + const path & full_path, // example: c:/foo/boost/filesystem/path.hpp + const string & contents ) // contents of file to be inspected + { + if (contents.find( "boostinspect:" "nolicense" ) != string::npos) return; + + if ( !boost::regex_search( contents, license_regex ) ) + { + ++m_files_with_errors; + error( library_name, full_path, name() ); + } + } + } // namespace inspect +} // namespace boost + + diff --git a/src/boost/tools/inspect/license_check.hpp b/src/boost/tools/inspect/license_check.hpp new file mode 100644 index 000000000..831202363 --- /dev/null +++ b/src/boost/tools/inspect/license_check.hpp @@ -0,0 +1,40 @@ +// license_check header ----------------------------------------------------// + +// Copyright Beman Dawes 2002, 2003. +// Copyright Rene Rivera 2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_LICENSE_CHECK_HPP +#define BOOST_LICENSE_CHECK_HPP + +#include "inspector.hpp" + +namespace boost +{ + namespace inspect + { + class license_check : public source_inspector + { + long m_files_with_errors; + public: + + license_check(); + virtual const char * name() const { return "*Lic*"; } + virtual const char * desc() const { return "missing Boost license info, or wrong reference text"; } + + virtual void inspect( + const std::string & library_name, + const path & full_path, + const std::string & contents ); + + virtual ~license_check() + { std::cout << " " + << m_files_with_errors << " files missing Boost license info or having wrong reference text" << line_break(); } + }; + } +} + +#endif // BOOST_LICENSE_CHECK_HPP diff --git a/src/boost/tools/inspect/link_check.cpp b/src/boost/tools/inspect/link_check.cpp new file mode 100644 index 000000000..182af3bf7 --- /dev/null +++ b/src/boost/tools/inspect/link_check.cpp @@ -0,0 +1,487 @@ +// link_check implementation -----------------------------------------------// + +// Copyright Beman Dawes 2002. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "link_check.hpp" +#include "boost/regex.hpp" +#include "boost/filesystem/operations.hpp" +#include +#include +#include + +// #include + +namespace fs = boost::filesystem; + +namespace +{ + boost::regex html_bookmark_regex( + "<([^\\s<>]*)\\s*[^<>]*\\s+(NAME|ID)\\s*=\\s*(['\"])(.*?)\\3" + "|", + boost::regbase::normal | boost::regbase::icase); + boost::regex html_url_regex( + "<([^\\s<>]*)\\s*[^<>]*\\s+(?:HREF|SRC)" // HREF or SRC + "\\s*=\\s*(['\"])\\s*(.*?)\\s*\\2" + "|", + boost::regbase::normal | boost::regbase::icase); + boost::regex css_url_regex( + "(\\@import\\s*[\"']|url\\s*\\(\\s*[\"']?)([^\"')]*)" + "|/\\*.*?\\*/", + boost::regbase::normal | boost::regbase::icase); + + // Regular expression for parsing URLS from: + // http://tools.ietf.org/html/rfc3986#appendix-B + boost::regex url_decompose_regex( + "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$", + boost::regbase::normal); + + typedef std::set bookmark_set; + bookmark_set bookmarks; + bookmark_set bookmarks_lowercase; // duplicate check needs case insensitive + + // Decode html escapsed ampersands, returns an empty string if there's an error. + std::string decode_ampersands(std::string const& url_path) { + std::string::size_type pos = 0, next; + std::string result; + result.reserve(url_path.length()); + + while((next = url_path.find('&', pos)) != std::string::npos) { + result.append(url_path, pos, next - pos); + pos = next; + if(url_path.substr(pos, 5) == "&") { + result += '&'; pos += 5; + } + else { + result += '&'; pos += 1; + } + break; + } + + result.append(url_path, pos, url_path.length()); + + return result; + } + + // Decode percent encoded characters, returns an empty string if there's an error. + std::string decode_percents(std::string const& url_path) { + std::string::size_type pos = 0, next; + std::string result; + result.reserve(url_path.length()); + + while((next = url_path.find('%', pos)) != std::string::npos) { + result.append(url_path, pos, next - pos); + pos = next; + switch(url_path[pos]) { + case '%': { + if(url_path.length() - next < 3) return ""; + char hex[3] = { url_path[next + 1], url_path[next + 2], '\0' }; + char* end_ptr; + result += (char) std::strtol(hex, &end_ptr, 16); + if(*end_ptr) return ""; + pos = next + 3; + break; + } + } + } + + result.append(url_path, pos, url_path.length()); + + return result; + } + + bool is_css(const path & p) { + return p.extension() == ".css"; + } + +} // unnamed namespace + +namespace boost +{ + namespace inspect + { + +// link_check constructor --------------------------------------------------// + + link_check::link_check() + : m_broken_errors(0), m_unlinked_errors(0), m_invalid_errors(0), + m_bookmark_errors(0), m_duplicate_bookmark_errors(0) + { + // HTML signatures are already registered by the base class, + // 'hypertext_inspector' + register_signature(".css"); + } + +// inspect (all) -----------------------------------------------------------// + + void link_check::inspect( + const string & /*library_name*/, + const path & full_path ) + { + // keep track of paths already encountered to reduce disk activity + if ( !fs::is_directory( full_path ) ) + m_paths[ relative_to( full_path, search_root_path() ) ] |= m_present; + } + +// inspect ( .htm, .html, .shtml, .css ) -----------------------------------// + + void link_check::inspect( + const string & library_name, + const path & full_path, // example: c:/foo/boost/filesystem/path.hpp + const string & contents ) // contents of file to be inspected + { + if (contents.find( "boostinspect:" "nounlinked" ) != string::npos) + m_paths[ relative_to( full_path, search_root_path() ) ] |= m_nounlinked_errors; + + bool no_link_errors = + (contents.find( "boostinspect:" "nolink" ) != string::npos); + + // build bookmarks databases + bookmarks.clear(); + bookmarks_lowercase.clear(); + string::const_iterator a_start( contents.begin() ); + string::const_iterator a_end( contents.end() ); + boost::match_results< string::const_iterator > a_what; + boost::match_flag_type a_flags = boost::match_default; + + if(!is_css(full_path)) + { + string previous_id; + + while( boost::regex_search( a_start, a_end, a_what, html_bookmark_regex, a_flags) ) + { + // a_what[0] contains the whole string iterators. + // a_what[1] contains the tag iterators. + // a_what[2] contains the attribute name. + // a_what[4] contains the bookmark iterators. + + if (a_what[4].matched) + { + string tag( a_what[1].first, a_what[1].second ); + boost::algorithm::to_lower(tag); + string attribute( a_what[2].first, a_what[2].second ); + boost::algorithm::to_lower(attribute); + string bookmark( a_what[4].first, a_what[4].second ); + + bool name_following_id = ( attribute == "name" && previous_id == bookmark ); + if ( tag != "meta" && attribute == "id" ) previous_id = bookmark; + else previous_id.clear(); + + if ( tag != "meta" && !name_following_id ) + { + bookmarks.insert( bookmark ); +// std::cout << "******************* " << bookmark << '\n'; + + // w3.org recommends case-insensitive checking for duplicate bookmarks + // since some browsers do a case-insensitive match. + string bookmark_lowercase( bookmark ); + boost::algorithm::to_lower(bookmark_lowercase); + + std::pair result + = bookmarks_lowercase.insert( bookmark_lowercase ); + if (!result.second) + { + ++m_duplicate_bookmark_errors; + int ln = std::count( contents.begin(), a_what[3].first, '\n' ) + 1; + error( library_name, full_path, "Duplicate bookmark: " + bookmark, ln ); + } + } + } + + a_start = a_what[0].second; // update search position + a_flags |= boost::match_prev_avail; // update flags + a_flags |= boost::match_not_bob; + } + } + + // process urls + string::const_iterator start( contents.begin() ); + string::const_iterator end( contents.end() ); + boost::match_results< string::const_iterator > what; + boost::match_flag_type flags = boost::match_default; + + if(!is_css(full_path)) + { + while( boost::regex_search( start, end, what, html_url_regex, flags) ) + { + // what[0] contains the whole string iterators. + // what[1] contains the element type iterators. + // what[3] contains the URL iterators. + + if(what[3].matched) + { + string type( what[1].first, what[1].second ); + boost::algorithm::to_lower(type); + + // TODO: Complain if 'link' tags use external stylesheets. + do_url( string( what[3].first, what[3].second ), + library_name, full_path, no_link_errors, + type == "a" || type == "link", contents.begin(), what[3].first ); + } + + start = what[0].second; // update search position + flags |= boost::match_prev_avail; // update flags + flags |= boost::match_not_bob; + } + } + + while( boost::regex_search( start, end, what, css_url_regex, flags) ) + { + // what[0] contains the whole string iterators. + // what[2] contains the URL iterators. + + if(what[2].matched) + { + do_url( string( what[2].first, what[2].second ), + library_name, full_path, no_link_errors, false, + contents.begin(), what[3].first ); + } + + start = what[0].second; // update search position + flags |= boost::match_prev_avail; // update flags + flags |= boost::match_not_bob; + } + } + +// do_url ------------------------------------------------------------------// + + void link_check::do_url( const string & url, const string & library_name, + const path & source_path, bool no_link_errors, bool allow_external_content, + std::string::const_iterator contents_begin, std::string::const_iterator url_start ) + // precondition: source_path.is_complete() + { + if(!no_link_errors && url.empty()) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "Empty URL.", ln ); + return; + } + + // Decode ampersand encoded characters. + string decoded_url = is_css(source_path) ? url : decode_ampersands(url); + if(decoded_url.empty()) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid URL (invalid ampersand encodings): " + url, ln ); + } + return; + } + + boost::smatch m; + if(!boost::regex_match(decoded_url, m, url_decompose_regex)) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "Invalid URL: " + decoded_url, ln ); + } + return; + } + + bool scheme_matched = m[2].matched, + authority_matched = m[4].matched, + //query_matched = m[7].matched, + fragment_matched = m[9].matched; + + std::string scheme(m[2]), + authority(m[4]), + url_path(m[5]), + //query(m[7]), + fragment(m[9]); + + // Check for external content + if(!allow_external_content && (authority_matched || scheme_matched)) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "External content: " + decoded_url, ln ); + } + } + + // Protocol checks + if(scheme_matched) { + if(scheme == "http" || scheme == "https") { + // All http links should have a hostname. Generally if they don't + // it's by mistake. If they shouldn't, then a protocol isn't + // required. + if(!authority_matched) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "No hostname: " + decoded_url, ln ); + } + } + + return; + } + else if(scheme == "file") { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid URL (hardwired file): " + decoded_url, ln ); + } + } + else if(scheme == "mailto" || scheme == "ftp" || scheme == "news" || scheme == "javascript") { + if ( !no_link_errors && is_css(source_path) ) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid protocol for css: " + decoded_url, ln ); + } + } + else { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "Unknown protocol: '" + scheme + "' in url: " + decoded_url, ln ); + } + } + + return; + } + + // Hostname without protocol. + if(authority_matched) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid URL (hostname without protocol): " + decoded_url, ln ); + } + } + + // Check the fragment identifier + if ( fragment_matched ) { + if ( is_css(source_path) ) { + if ( !no_link_errors ) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Fragment link in CSS: " + decoded_url, ln ); + } + } + else { + if ( !no_link_errors && fragment.find( '#' ) != string::npos ) + { + ++m_bookmark_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "Invalid bookmark: " + decoded_url, ln ); + } + else if ( !no_link_errors && url_path.empty() && !fragment.empty() + // w3.org recommends case-sensitive broken bookmark checking + // since some browsers do a case-sensitive match. + && bookmarks.find(decode_percents(fragment)) == bookmarks.end() ) + { + ++m_broken_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "Unknown bookmark: " + decoded_url, ln ); + } + } + + // No more to do if it's just a fragment identifier + if(url_path.empty()) return; + } + + // Detect characters banned by RFC2396: + if ( !no_link_errors && decoded_url.find_first_of( " <>\"{}|\\^[]'" ) != string::npos ) + { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid character in URL: " + decoded_url, ln ); + } + + // Check that we actually have a path. + if(url_path.empty()) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid URL (empty path in relative url): " + decoded_url, ln ); + } + } + + // Decode percent encoded characters. + string decoded_path = decode_percents(url_path); + if(decoded_path.empty()) { + if(!no_link_errors) { + ++m_invalid_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, + "Invalid URL (invalid character encodings): " + decoded_url, ln ); + } + return; + } + + // strip url of references to current dir + if ( decoded_path[0]=='.' && decoded_path[1]=='/' ) decoded_path.erase( 0, 2 ); + + // url is relative source_path.branch() + // convert to target_path, which is_complete() + path target_path; + try { target_path = source_path.branch_path() /= path( decoded_path ); } + catch ( const fs::filesystem_error & ) + { + if(!no_link_errors) { + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + ++m_invalid_errors; + error( library_name, source_path, + "Invalid URL (error resolving path): " + decoded_url, ln ); + } + return; + } + + // create a m_paths entry if necessary + std::pair< const string, int > entry( + relative_to( target_path, search_root_path() ), 0 ); + m_path_map::iterator itr( m_paths.find( entry.first ) ); + if ( itr == m_paths.end() ) + { + if ( fs::exists( target_path ) ) entry.second = m_present; + itr = m_paths.insert( entry ).first; + } + + // itr now points to the m_paths entry + itr->second |= m_linked_to; + + // if target isn't present, the link is broken + if ( !no_link_errors && (itr->second & m_present) == 0 ) + { + ++m_broken_errors; + int ln = std::count( contents_begin, url_start, '\n' ) + 1; + error( library_name, source_path, "Broken link: " + decoded_url, ln ); + } + } + +// close -------------------------------------------------------------------// + + void link_check::close() + { + for ( m_path_map::const_iterator itr = m_paths.begin(); + itr != m_paths.end(); ++itr ) + { +// std::clog << itr->first << " " << itr->second << "\n"; + if ( (itr->second & m_linked_to) != m_linked_to + && (itr->second & m_nounlinked_errors) != m_nounlinked_errors + && (itr->first.rfind( ".html" ) == itr->first.size()-5 + || itr->first.rfind( ".htm" ) == itr->first.size()-4 + || itr->first.rfind( ".css" ) == itr->first.size()-4) + // because they may be redirectors, it is OK if these are unlinked: + && itr->first.rfind( "index.html" ) == string::npos + && itr->first.rfind( "index.htm" ) == string::npos ) + { + ++m_unlinked_errors; + path full_path( search_root_path() / path(itr->first) ); + error( impute_library( full_path ), full_path, "Unlinked file" ); + } + } + } + + } // namespace inspect +} // namespace boost + diff --git a/src/boost/tools/inspect/link_check.hpp b/src/boost/tools/inspect/link_check.hpp new file mode 100644 index 000000000..726cd91f4 --- /dev/null +++ b/src/boost/tools/inspect/link_check.hpp @@ -0,0 +1,72 @@ +// link_check header -------------------------------------------------------// + +// Copyright Beman Dawes 2002 +// Copyright Rene Rivera 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_LINK_CHECK_HPP +#define BOOST_LINK_CHECK_HPP + +#include + +#include "inspector.hpp" + +namespace boost +{ + namespace inspect + { + const int m_linked_to = 1; + const int m_present = 2; + const int m_nounlinked_errors = 4; + + class link_check : public hypertext_inspector + { + long m_broken_errors; + long m_unlinked_errors; + long m_invalid_errors; + long m_bookmark_errors; + long m_duplicate_bookmark_errors; + + typedef std::map< string, int > m_path_map; + m_path_map m_paths; // first() is relative to search_root_path() + + void do_url( const string & url, const string & library_name, + const path & full_source_path, bool no_link_errors, + bool allow_external_links, + std::string::const_iterator contents_begin, std::string::const_iterator url_start); + public: + + link_check(); + virtual const char * name() const { return "*LINK*"; } + virtual const char * desc() const + { return "invalid bookmarks, duplicate bookmarks," + " invalid urls, broken links, unlinked files"; } + + virtual void inspect( + const std::string & library_name, + const path & full_path ); + + virtual void inspect( + const std::string & library_name, + const path & full_path, + const std::string & contents ); + + virtual void close(); + + virtual ~link_check() + { + std::cout << " " << m_bookmark_errors + << " bookmarks with invalid characters" << line_break(); + std::cout << " " << m_duplicate_bookmark_errors + << " duplicate bookmarks" << line_break(); + std::cout << " " << m_invalid_errors << " invalid urls" << line_break(); + std::cout << " " << m_broken_errors << " broken links" << line_break(); + std::cout << " " << m_unlinked_errors << " unlinked files" << line_break(); + } + }; + } +} + +#endif // BOOST_LINK_CHECK_HPP diff --git a/src/boost/tools/inspect/link_check_test.html b/src/boost/tools/inspect/link_check_test.html new file mode 100644 index 000000000..2d1e9845e --- /dev/null +++ b/src/boost/tools/inspect/link_check_test.html @@ -0,0 +1,24 @@ + + + + + + + +valid link + + + + +

    valid bookmark link

    +

    valid relative link

    +

    broken relative link with bookmark

    +

    broken bookmark link

    +

    bookmark

    +

    second bookmark

    +

    duplicate second bookmark

    +

     

    + + + + \ No newline at end of file diff --git a/src/boost/tools/inspect/minmax_check.cpp b/src/boost/tools/inspect/minmax_check.cpp new file mode 100644 index 000000000..00cc44bca --- /dev/null +++ b/src/boost/tools/inspect/minmax_check.cpp @@ -0,0 +1,102 @@ +// minmax_check implementation --------------------------------------------// + +// Copyright Beman Dawes 2002. +// Copyright Gennaro Prota 2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#include + +#include "minmax_check.hpp" +#include "boost/regex.hpp" +#include "boost/lexical_cast.hpp" + +namespace +{ + boost::regex minmax_regex( + "(" + "^\\s*#\\s*undef\\s*" // # undef + "\\b(min|max)\\b" // followed by min or max, whole word + ")" + "|" // or (ignored) + "(" + "//[^\\n]*" // single line comments (//) + "|" + "/\\*.*?\\*/" // multi line comments (/**/) + "|" + "\"(?:\\\\\\\\|\\\\\"|[^\"])*\"" // string literals + ")" + "|" // or + "(" + "\\b(min|max)\\b" // min or max, whole word + "\\s*\\(" // followed by 0 or more spaces and an opening paren + ")" + , boost::regex::normal); + +} // unnamed namespace + +namespace boost +{ + namespace inspect + { + + // minmax_check constructor -------------------------------------------// + + minmax_check::minmax_check() + : m_errors(0) + { + // C/C++ source code... + register_signature( ".c" ); + register_signature( ".cpp" ); + register_signature( ".cxx" ); + register_signature( ".h" ); + register_signature( ".hpp" ); + register_signature( ".hxx" ); + register_signature( ".inc" ); + register_signature( ".ipp" ); + } + + // inspect ( C++ source files ) ---------------------------------------// + + void minmax_check::inspect( + const string & library_name, + const path & full_path, // example: c:/foo/boost/filesystem/path.hpp + const string & contents) // contents of file to be inspected + { + if (contents.find( "boostinspect:" "nominmax" ) != string::npos) return; + + boost::sregex_iterator cur(contents.begin(), contents.end(), minmax_regex), end; + + for( ; cur != end; ++cur /*, ++m_errors*/ ) + { + + if(!(*cur)[3].matched) + { + string::const_iterator it = contents.begin(); + string::const_iterator match_it = (*cur)[0].first; + + string::const_iterator line_start = it; + + string::size_type line_number = 1; + for ( ; it != match_it; ++it) { + if (string::traits_type::eq(*it, '\n')) { + ++line_number; + line_start = it + 1; // could be end() + } + } + + ++m_errors; + error( library_name, full_path, string(name()) + + " violation of Boost min/max guidelines on line " + + boost::lexical_cast( line_number ) ); + } + + } + } + + } // namespace inspect +} // namespace boost + diff --git a/src/boost/tools/inspect/minmax_check.hpp b/src/boost/tools/inspect/minmax_check.hpp new file mode 100644 index 000000000..03ff923ea --- /dev/null +++ b/src/boost/tools/inspect/minmax_check.hpp @@ -0,0 +1,45 @@ +// minmax_check header -------------------------------------------------------// + +// Copyright Beman Dawes 2002 +// Copyright Rene Rivera 2004. +// Copyright Gennaro Prota 2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MINMAX_CHECK_HPP +#define BOOST_MINMAX_CHECK_HPP + +#include "inspector.hpp" + +namespace boost +{ + namespace inspect + { + class minmax_check : public inspector + { + long m_errors; + + public: + + minmax_check(); + virtual const char * name() const { return "*M*"; } + virtual const char * desc() const { return "uses of min or max that" + " have not been protected from the min/max macros," + " or unallowed #undef-s"; } + + virtual void inspect( + const std::string & library_name, + const path & full_path, + const std::string & contents); + + virtual ~minmax_check() + { + std::cout << " " << m_errors << " violations of the Boost min/max guidelines" << line_break(); + } + }; + } +} + +#endif // BOOST_MINMAX_CHECK_HPP diff --git a/src/boost/tools/inspect/path_name_check.cpp b/src/boost/tools/inspect/path_name_check.cpp new file mode 100644 index 000000000..0714e20c0 --- /dev/null +++ b/src/boost/tools/inspect/path_name_check.cpp @@ -0,0 +1,110 @@ +// path_name_check implementation ------------------------------------------// + +// Copyright Beman Dawes 2002. +// Copyright Gennaro Prota 2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "path_name_check.hpp" + +#include "boost/filesystem/operations.hpp" +#include "boost/lexical_cast.hpp" + +#include +#include +#include +#include + +using std::string; + +namespace +{ + const char allowable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-."; + const char initial_char[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; +} + +namespace boost +{ + namespace inspect + { + + + file_name_check::file_name_check() : m_name_errors(0) {} + + void file_name_check::inspect( + const string & library_name, + const path & full_path ) + { + string::size_type pos; + + // called for each file and directory, so only the leaf need be tested + string const leaf( full_path.leaf().string() ); + + // includes only allowable characters + if ( (pos = leaf.find_first_not_of( allowable )) != string::npos ) + { + ++m_name_errors; + error( library_name, full_path, string(name()) + + " file or directory name contains unacceptable character '" + + leaf[pos] + "'" ); + } + + // allowable initial character + if ( std::strchr( initial_char, leaf[0] ) == 0 ) + { + ++m_name_errors; + error( library_name, full_path, string(name()) + + " file or directory name begins with an unacceptable character" ); + } + + // rules for dot characters differ slightly for directories and files + if ( filesystem::is_directory( full_path ) ) + { + if ( std::strchr( leaf.c_str(), '.' ) ) + { + ++m_name_errors; + error( library_name, full_path, string(name()) + + " directory name contains a dot character ('.')" ); + } + } + //else // not a directory + //{ + // // includes at most one dot character + // const char * first_dot = std::strchr( leaf.c_str(), '.' ); + // if ( first_dot && std::strchr( first_dot+1, '.' ) ) + // { + // ++m_name_errors; + // error( library_name, full_path, string(name()) + // + " file name with more than one dot character ('.')" ); + // } + //} + + // the path, including a presumed root, does not exceed the maximum size + path const relative_path( relative_to( full_path, search_root_path() ) ); + const unsigned max_relative_path = 207; // ISO 9660:1999 sets this limit + const string generic_root( "boost_X_XX_X/" ); + if ( relative_path.string().size() > + ( max_relative_path - generic_root.size() ) ) + { + ++m_name_errors; + error( library_name, full_path, + string(name()) + + " path will exceed " + + boost::lexical_cast(max_relative_path) + + " characters in a directory tree with a root in the form " + + generic_root + ", and this exceeds ISO 9660:1999 limit of 207" ) + ; + } + + } + + file_name_check::~file_name_check() + { + std::cout << " " << m_name_errors << " " << desc() << line_break(); + } + + + } // namespace inspect +} // namespace boost diff --git a/src/boost/tools/inspect/path_name_check.hpp b/src/boost/tools/inspect/path_name_check.hpp new file mode 100644 index 000000000..ec1218ace --- /dev/null +++ b/src/boost/tools/inspect/path_name_check.hpp @@ -0,0 +1,48 @@ +// long_name_check header --------------------------------------------------// +// (main class renamed to: file_name_check) - gps + +// Copyright Beman Dawes 2002. +// Copyright Gennaro Prota 2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_FILE_NAME_CHECK_HPP +#define BOOST_FILE_NAME_CHECK_HPP + +#include "inspector.hpp" + +namespace boost +{ + namespace inspect + { + class file_name_check : public inspector + { + long m_name_errors; + + public: + + file_name_check(); + virtual ~file_name_check(); + + virtual const char * name() const { return "*N*"; } + virtual const char * desc() const { return "file and directory name issues"; } + + virtual void inspect( + const string & library_name, + const path & full_path ); + + virtual void inspect( + const string &, // "filesystem" + const path &, // "c:/foo/boost/filesystem/path.hpp" + const string &) + { /* empty */ } + + + + }; + } +} + +#endif // BOOST_FILE_NAME_CHECK_HPP diff --git a/src/boost/tools/inspect/tab_check.cpp b/src/boost/tools/inspect/tab_check.cpp new file mode 100644 index 000000000..e84d088da --- /dev/null +++ b/src/boost/tools/inspect/tab_check.cpp @@ -0,0 +1,44 @@ +// tab_check implementation ------------------------------------------------// + +// Copyright Beman Dawes 2002. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "tab_check.hpp" + +namespace boost +{ + namespace inspect + { + tab_check::tab_check() : m_files_with_errors(0) + { + register_signature( ".c" ); + register_signature( ".cpp" ); + register_signature( ".cxx" ); + register_signature( ".h" ); + register_signature( ".hpp" ); + register_signature( ".hxx" ); + register_signature( ".ipp" ); + register_signature( "Jamfile" ); + register_signature( ".py" ); + } + + void tab_check::inspect( + const string & library_name, + const path & full_path, // example: c:/foo/boost/filesystem/path.hpp + const string & contents ) // contents of file to be inspected + { + if (contents.find( "boostinspect:" "notab" ) != string::npos) return; + + if ( contents.find( '\t' ) != string::npos ) + { + ++m_files_with_errors; + error( library_name, full_path, name() ); + } + } + } // namespace inspect +} // namespace boost + + diff --git a/src/boost/tools/inspect/tab_check.hpp b/src/boost/tools/inspect/tab_check.hpp new file mode 100644 index 000000000..fb7f617ba --- /dev/null +++ b/src/boost/tools/inspect/tab_check.hpp @@ -0,0 +1,37 @@ +// tab_check header --------------------------------------------------------// + +// Copyright Beman Dawes 2002. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TAB_CHECK_HPP +#define BOOST_TAB_CHECK_HPP + +#include "inspector.hpp" + +namespace boost +{ + namespace inspect + { + class tab_check : public inspector + { + long m_files_with_errors; + public: + + tab_check(); + virtual const char * name() const { return "*Tabs*"; } + virtual const char * desc() const { return "tabs in file"; } + + virtual void inspect( + const std::string & library_name, + const path & full_path, + const std::string & contents ); + + virtual ~tab_check() + { std::cout << " " << m_files_with_errors << " files with tabs" << line_break(); } + }; + } +} + +#endif // BOOST_TAB_CHECK_HPP diff --git a/src/boost/tools/inspect/time_string.hpp b/src/boost/tools/inspect/time_string.hpp new file mode 100644 index 000000000..72ca43968 --- /dev/null +++ b/src/boost/tools/inspect/time_string.hpp @@ -0,0 +1,55 @@ +// ---- time_string: thin wrapper around std::strftime -------- // +// +// Copyright Gennaro Prota 2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ------------------------------------------------------------------ +// +// $Id$ + +#ifndef BOOST_TIME_STRING_HPP_GP_20060731 +#define BOOST_TIME_STRING_HPP_GP_20060731 + +#include +#include + +#include + +namespace boost { + +// Many of the boost tools just need a quick way to obtain +// a formatted "run date" string or similar. This is one. +// +// In case of failure false is returned and result is +// unchanged. +// +inline +bool time_string(std::string & result + , const std::string & format = "%X UTC, %A %d %B %Y") +{ + // give up qualifying names and using std::size_t, + // to avoid including "config.hpp" + using namespace std; + + const int sz = 256; + char buffer [ sz ] = { 0 }; + const time_t no_cal_time ( -1 ); + time_t tod; + + const bool ok = + time ( &tod ) != no_cal_time + && strftime( buffer, sz, format.c_str(), gmtime( &tod ) ) != 0 + ; + + if (ok) + result = buffer; + + return ok; +} + +} + +#endif // include guard diff --git a/src/boost/tools/inspect/unnamed_namespace_check.cpp b/src/boost/tools/inspect/unnamed_namespace_check.cpp new file mode 100644 index 000000000..92431a171 --- /dev/null +++ b/src/boost/tools/inspect/unnamed_namespace_check.cpp @@ -0,0 +1,62 @@ +// unnamed_namespace_check -----------------------------------------// + +// Copyright Gennaro Prota 2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "boost/regex.hpp" +#include "boost/lexical_cast.hpp" +#include "unnamed_namespace_check.hpp" + + +namespace +{ + + boost::regex unnamed_namespace_regex( + "\\ 0: + x, subs = pat.subn(repl, txt, count) + self.body[i] = x + count -= subs + + def wrap(self, s1, s2): + self.append_raw(self._make_line(s2)) + self.prepend_raw(self._make_line(s1, offset = -s1.count('\n'))) + + def replace_emphasis(self, s, index = 0): + """replace the index'th emphasized text with s""" + e = self.emphasized[index] + self.body[e[0]:e[1]] = [s] + del self.emphasized[index] + + elipsis = re.compile('^([ \t]*)([.][.][.][ \t]*)$', re.MULTILINE) + + def __str__(self): + # Comment out any remaining emphasized sections + b = [self.elipsis.sub(r'\1// \2', s) for s in self.body] + emph = self.emphasized + emph.reverse() + for e in emph: + b.insert(e[1], ' */') + b.insert(e[0], '/* ') + emph.reverse() + + # Add initial #line + b.insert( + self._number_of_prefixes, + self._line_directive(self.node.line, self.node.source) + ) + + # Add trailing newline to avoid warnings + b.append('\n') + return ''.join(b) + + def __repr__(self): + return "Example: " + repr(str(self)) + + def raw(self): + return ''.join(self.body) + + def _make_line(self, s, offset = 0): + c = _caller(2)[1::-1] + offset -= s.count('\n') + return '\n%s%s\n' % (self._line_directive(offset = offset, *c), s.strip('\n')) + + def _line_directive(self, line, source, offset = None): + if self.line_hash is None: + return '\n' + + if offset is None: + offset = self.line_offset + + if line is None or line <= -offset: + line = 1 + else: + line += offset + + if source is None: + return '%sline %d\n' % (self.line_hash, line) + else: + return '%sline %d "%s"\n' % (self.line_hash, line, source) + + +def syscmd( + cmd + , expect_error = False + , input = None + , max_output_lines = None + ): + + # On windows close() returns the exit code, on *nix it doesn't so + # we need to use popen2.Popen4 instead. + if sys.platform == 'win32': + stdin, stdout_stderr = os.popen4(cmd) + if input: stdin.write(input) + stdin.close() + + out = stdout_stderr.read() + status = stdout_stderr.close() + else: + import popen2 + process = popen2.Popen4(cmd) + if input: process.tochild.write(input) + out = process.fromchild.read() + status = process.wait() + + if max_output_lines is not None: + out = '\n'.join(out.split('\n')[:max_output_lines]) + + if expect_error: + status = not status + + if status: + print + print '========== offending command ===========' + print cmd + print '------------ stdout/stderr -------------' + print expect_error and 'Error expected, but none seen' or out + elif expect_error > 1: + print + print '------ Output of Expected Error --------' + print out + print '----------------------------------------' + + sys.stdout.flush() + + return (status,out) + + +def expand_vars(path): + if os.name == 'nt': + re_env = re.compile(r'%\w+%') + return re_env.sub( + lambda m: os.environ.get( m.group(0)[1:-1] ) + , path + ) + else: + return os.path.expandvars(path) + +def remove_directory_and_contents(path): + for root, dirs, files in os.walk(path, topdown=False): + for name in files: + os.remove(os.path.join(root, name)) + for name in dirs: + os.rmdir(os.path.join(root, name)) + os.rmdir(path) + +class BuildResult: + def __init__(self, path): + self.path = path + + def __repr__(self): + return self.path + + def __del__(self): + remove_directory_and_contents(self.path) + +class CPlusPlusTranslator(litre.LitreTranslator): + + _exposed_attrs = ['compile', 'test', 'ignore', 'match_stdout', 'stack', 'config' + , 'example', 'prefix', 'preprocessors', 'litre_directory', + 'litre_translator', 'includes', 'build', 'jam_prefix', + 'run_python'] + + last_run_output = '' + + """Attributes that will be made available to litre code""" + + def __init__(self, document, config): + litre.LitreTranslator.__init__(self, document, config) + self.in_literal = False + self.in_table = True + self.preprocessors = [] + self.stack = [] + self.example = None + self.prefix = [] + self.includes = config.includes + self.litre_directory = os.path.split(__file__)[0] + self.config = config + self.litre_translator = self + self.line_offset = 0 + self.last_source = None + self.jam_prefix = [] + + self.globals = { 'test_literals_in_tables' : False } + for m in self._exposed_attrs: + self.globals[m] = getattr(self, m) + + self.examples = {} + self.current_section = None + + # + # Stuff for use by docutils writer framework + # + def visit_emphasis(self, node): + if self.in_literal: + self.example.begin_emphasis() + + def depart_emphasis(self, node): + if self.in_literal: + self.example.end_emphasis() + + def visit_section(self, node): + self.current_section = node['ids'][0] + + def visit_literal_block(self, node): + if node.source is None: + node.source = self.last_source + self.last_source = node.source + + # create a new example + self.example = Example(node, self.current_section, line_offset = self.line_offset, line_hash = self.config.line_hash) + + self.stack.append(self.example) + + self.in_literal = True + + def depart_literal_block(self, node): + self.in_literal = False + + def visit_literal(self, node): + if self.in_table and self.globals['test_literals_in_tables']: + self.visit_literal_block(node) + else: + litre.LitreTranslator.visit_literal(self,node) + + def depart_literal(self, node): + if self.in_table and self.globals['test_literals_in_tables']: + self.depart_literal_block(node) + else: + litre.LitreTranslator.depart_literal(self,node) + + def visit_table(self,node): + self.in_table = True + litre.LitreTranslator.visit_table(self,node) + + def depart_table(self,node): + self.in_table = False + litre.LitreTranslator.depart_table(self,node) + + def visit_Text(self, node): + if self.in_literal: + self.example.append_raw(node.astext()) + + def depart_document(self, node): + self.write_examples() + + # + # Private stuff + # + + def handled(self, n = 1): + r = self.stack[-n:] + del self.stack[-n:] + return r + + def _execute(self, code): + """Override of litre._execute; sets up variable context before + evaluating code + """ + self.globals['example'] = self.example + eval(code, self.globals) + + # + # Stuff for use by embedded python code + # + + def match_stdout(self, expected = None): + + if expected is None: + expected = self.example.raw() + self.handled() + + if not re.search(expected, self.last_run_output, re.MULTILINE): + #if self.last_run_output.strip('\n') != expected.strip('\n'): + print 'output failed to match example' + print '-------- Actual Output -------------' + print repr(self.last_run_output) + print '-------- Expected Output -----------' + print repr(expected) + print '------------------------------------' + sys.stdout.flush() + + def ignore(self, n = 1): + if n == 'all': + n = len(self.stack) + return self.handled(n) + + def wrap(self, n, s1, s2): + self.stack[-1].append(s2) + self.stack[-n].prepend(s1) + + + def compile( + self + , howmany = 1 + , pop = -1 + , expect_error = False + , extension = '.o' + , options = ['-c'] + , built_handler = lambda built_file: None + , source_file = None + , source_suffix = '.cpp' + # C-style comments by default; handles C++ and YACC + , make_comment = lambda text: '/*\n%s\n*/' % text + , built_file = None + , command = None + ): + """ + Compile examples on the stack, whose topmost item is the last example + seen but not yet handled so far. + + :howmany: How many of the topmost examples on the stack to compile. + You can pass a number, or 'all' to indicate that all examples should + be compiled. + + :pop: How many of the topmost examples to discard. By default, all of + the examples that are compiled are discarded. + + :expect_error: Whether a compilation error is to be expected. Any value + > 1 will cause the expected diagnostic's text to be dumped for + diagnostic purposes. It's common to expect an error but see a + completely unrelated one because of bugs in the example (you can get + this behavior for all examples by setting show_expected_error_output + in your config). + + :extension: The extension of the file to build (set to .exe for + run) + + :options: Compiler flags + + :built_file: A path to use for the built file. By default, a temp + filename is conjured up + + :built_handler: A function that's called with the name of the built file + upon success. + + :source_file: The full name of the source file to write + + :source_suffix: If source_file is None, the suffix to use for the source file + + :make_comment: A function that transforms text into an appropriate comment. + + :command: A function that is passed (includes, opts, target, source), where + opts is a string representing compiler options, target is the name of + the file to build, and source is the name of the file into which the + example code is written. By default, the function formats + litre.config.compiler with its argument tuple. + """ + + # Grab one example by default + if howmany == 'all': + howmany = len(self.stack) + + source = '\n'.join( + self.prefix + + [str(x) for x in self.stack[-howmany:]] + ) + + source = reduce(lambda s, f: f(s), self.preprocessors, source) + + if pop: + if pop < 0: + pop = howmany + del self.stack[-pop:] + + if len(self.stack): + self.example = self.stack[-1] + + cpp = self._source_file_path(source_file, source_suffix) + + if built_file is None: + built_file = self._output_file_path(source_file, extension) + + opts = ' '.join(options) + + includes = ' '.join(['-I%s' % d for d in self.includes]) + if not command: + command = self.config.compiler + + if type(command) == str: + command = lambda i, o, t, s, c = command: c % (i, o, t, s) + + cmd = command(includes, opts, expand_vars(built_file), expand_vars(cpp)) + + if expect_error and self.config.show_expected_error_output: + expect_error += 1 + + + comment_cmd = command(includes, opts, built_file, os.path.basename(cpp)) + comment = make_comment(config.comment_text(comment_cmd, expect_error)) + + self._write_source(cpp, '\n'.join([comment, source])) + + #print 'wrote in', cpp + #print 'trying command', cmd + + status, output = syscmd(cmd, expect_error) + + if status or expect_error > 1: + print + if expect_error and expect_error < 2: + print 'Compilation failure expected, but none seen' + print '------------ begin offending source ------------' + print open(cpp).read() + print '------------ end offending source ------------' + + if self.config.save_cpp: + print 'saved in', repr(cpp) + else: + self._remove_source(cpp) + + sys.stdout.flush() + else: + print '.', + sys.stdout.flush() + built_handler(built_file) + + self._remove_source(cpp) + + try: + self._unlink(built_file) + except: + if not expect_error: + print 'failed to unlink', built_file + + return status + + def test( + self + , rule = 'run' + , howmany = 1 + , pop = -1 + , expect_error = False + , requirements = '' + , input = '' + ): + + # Grab one example by default + if howmany == 'all': + howmany = len(self.stack) + + source = '\n'.join( + self.prefix + + [str(x) for x in self.stack[-howmany:]] + ) + + source = reduce(lambda s, f: f(s), self.preprocessors, source) + + id = self.example.section + if not id: + id = 'top-level' + + if not self.examples.has_key(self.example.section): + self.examples[id] = [(rule, source)] + else: + self.examples[id].append((rule, source)) + + if pop: + if pop < 0: + pop = howmany + del self.stack[-pop:] + + if len(self.stack): + self.example = self.stack[-1] + + def write_examples(self): + jam = open(os.path.join(self.config.dump_dir, 'Jamfile.v2'), 'w') + + jam.write(''' +import testing ; + +''') + + for id,examples in self.examples.items(): + for i in range(len(examples)): + cpp = '%s%d.cpp' % (id, i) + + jam.write('%s %s ;\n' % (examples[i][0], cpp)) + + outfile = os.path.join(self.config.dump_dir, cpp) + print cpp, + try: + if open(outfile, 'r').read() == examples[i][1]: + print ' .. skip' + continue + except: + pass + + open(outfile, 'w').write(examples[i][1]) + print ' .. written' + + jam.close() + + def build( + self + , howmany = 1 + , pop = -1 + , source_file = 'example.cpp' + , expect_error = False + , target_rule = 'obj' + , requirements = '' + , input = '' + , output = 'example_output' + ): + + # Grab one example by default + if howmany == 'all': + howmany = len(self.stack) + + source = '\n'.join( + self.prefix + + [str(x) for x in self.stack[-howmany:]] + ) + + source = reduce(lambda s, f: f(s), self.preprocessors, source) + + if pop: + if pop < 0: + pop = howmany + del self.stack[-pop:] + + if len(self.stack): + self.example = self.stack[-1] + + dir = tempfile.mkdtemp() + cpp = os.path.join(dir, source_file) + self._write_source(cpp, source) + self._write_jamfile( + dir + , target_rule = target_rule + , requirements = requirements + , input = input + , output = output + ) + + cmd = 'bjam' + if self.config.bjam_options: + cmd += ' %s' % self.config.bjam_options + + os.chdir(dir) + status, output = syscmd(cmd, expect_error) + + if status or expect_error > 1: + print + if expect_error and expect_error < 2: + print 'Compilation failure expected, but none seen' + print '------------ begin offending source ------------' + print open(cpp).read() + print '------------ begin offending Jamfile -----------' + print open(os.path.join(dir, 'Jamroot')).read() + print '------------ end offending Jamfile -------------' + + sys.stdout.flush() + else: + print '.', + sys.stdout.flush() + + if status: return None + else: return BuildResult(dir) + + def _write_jamfile(self, path, target_rule, requirements, input, output): + jamfile = open(os.path.join(path, 'Jamroot'), 'w') + contents = r""" +import modules ; + +BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ; +use-project /boost : $(BOOST_ROOT) ; + +%s + +%s %s + : example.cpp %s + : . + %s + %s + ; + """ % ( + '\n'.join(self.jam_prefix) + , target_rule + , output + , input + , ' '.join(['%s' % d for d in self.includes]) + , requirements + ) + + jamfile.write(contents) + + def run_python( + self + , howmany = 1 + , pop = -1 + , module_path = [] + , expect_error = False + ): + # Grab one example by default + if howmany == 'all': + howmany = len(self.stack) + + if module_path == None: module_path = [] + + if isinstance(module_path, BuildResult) or type(module_path) == str: + module_path = [module_path] + + module_path = map(lambda p: str(p), module_path) + + source = '\n'.join( + self.prefix + + [str(x) for x in self.stack[-howmany:]] + ) + + if pop: + if pop < 0: + pop = howmany + del self.stack[-pop:] + + if len(self.stack): + self.example = self.stack[-1] + + r = re.compile(r'^(>>>|\.\.\.) (.*)$', re.MULTILINE) + source = r.sub(r'\2', source) + py = self._source_file_path(source_file = None, source_suffix = 'py') + open(py, 'w').write(source) + + old_path = os.getenv('PYTHONPATH') + if old_path == None: + pythonpath = ':'.join(module_path) + old_path = '' + else: + pythonpath = old_path + ':%s' % ':'.join(module_path) + + os.putenv('PYTHONPATH', pythonpath) + status, output = syscmd('python %s' % py) + + if status or expect_error > 1: + print + if expect_error and expect_error < 2: + print 'Compilation failure expected, but none seen' + print '------------ begin offending source ------------' + print open(py).read() + print '------------ end offending Jamfile -------------' + + sys.stdout.flush() + else: + print '.', + sys.stdout.flush() + + self.last_run_output = output + os.putenv('PYTHONPATH', old_path) + self._unlink(py) + + def _write_source(self, filename, contents): + open(filename,'w').write(contents) + + def _remove_source(self, source_path): + os.unlink(source_path) + + def _source_file_path(self, source_file, source_suffix): + if source_file is None: + cpp = tempfile.mktemp(suffix=source_suffix) + else: + cpp = os.path.join(tempfile.gettempdir(), source_file) + return cpp + + def _output_file_path(self, source_file, extension): + return tempfile.mktemp(suffix=extension) + + def _unlink(self, file): + file = expand_vars(file) + if os.path.exists(file): + os.unlink(file) + + def _launch(self, exe, stdin = None): + status, output = syscmd(exe, input = stdin) + self.last_run_output = output + + def run_(self, howmany = 1, stdin = None, **kw): + new_kw = { 'options':[], 'extension':'.exe' } + new_kw.update(kw) + + self.compile( + howmany + , built_handler = lambda exe: self._launch(exe, stdin = stdin) + , **new_kw + ) + + def astext(self): + return "" + return '\n\n ---------------- Unhandled Fragment ------------ \n\n'.join( + [''] # generates a leading announcement + + [ unicode(s) for s in self.stack] + ) + +class DumpTranslator(CPlusPlusTranslator): + example_index = 1 + + def _source_file_path(self, source_file, source_suffix): + if source_file is None: + source_file = 'example%s%s' % (self.example_index, source_suffix) + self.example_index += 1 + + cpp = os.path.join(config.dump_dir, source_file) + return cpp + + def _output_file_path(self, source_file, extension): + chapter = os.path.basename(config.dump_dir) + return '%%TEMP%%\metaprogram-%s-example%s%s' \ + % ( chapter, self.example_index - 1, extension) + + def _remove_source(self, source_path): + pass + + +class WorkaroundTranslator(DumpTranslator): + """Translator used to test/dump workaround examples for vc6 and vc7. Just + like a DumpTranslator except that we leave existing files alone. + + Warning: not sensitive to changes in .rst source!! If you change the actual + examples in source files you will have to move the example files out of the + way and regenerate them, then re-incorporate the workarounds. + """ + def _write_source(self, filename, contents): + if not os.path.exists(filename): + DumpTranslator._write_source(self, filename, contents) + +class Config: + save_cpp = False + line_hash = '#' + show_expected_error_output = False + max_output_lines = None + +class Writer(litre.Writer): + translator = CPlusPlusTranslator + + def __init__( + self + , config + ): + litre.Writer.__init__(self) + self._config = Config() + defaults = Config.__dict__ + + # update config elements + self._config.__dict__.update(config.__dict__) +# dict([i for i in config.__dict__.items() +# if i[0] in config.__all__])) + diff --git a/src/boost/tools/litre/litre.py b/src/boost/tools/litre/litre.py new file mode 100644 index 000000000..c0ac67e28 --- /dev/null +++ b/src/boost/tools/litre/litre.py @@ -0,0 +1,61 @@ +from docutils import writers +from docutils import nodes + +class LitreTranslator(nodes.GenericNodeVisitor): + + def __init__(self, document, config): + nodes.GenericNodeVisitor.__init__(self,document) + self._config = config + + def default_visit(self, node): + pass + # print '**visiting:', repr(node) + + def default_departure(self, node): + pass + # print '**departing:', repr(node) + + def visit_raw(self, node): + if node.has_key('format'): + key = node['format'].lower() + if key == 'litre': + # This is probably very evil ;-) + #if node.has_key('source'): + # node.file = node.attributes['source'] + + self._handle_code(node, node.astext()) + + raise nodes.SkipNode + + def visit_comment(self, node): + code = node.astext() + if code[0] == '@': + self._handle_code(node, code[1:].strip()) + + def _handle_code(self, node, code): + start_line = node.line or 0 + start_line -= code.count('\n') + 2 # docutils bug workaround? + try: + self._execute(compile( start_line*'\n' + code, str(node.source), 'exec')) + except: + print '\n------- begin offending Python source -------' + print code + print '------- end offending Python source -------' + raise + + def _execute(self, code): + """Override this to set up local variable context for code before + invoking it + """ + eval(code) + +class Writer(writers.Writer): + translator = LitreTranslator + _config = None + + def translate(self): + visitor = self.translator(self.document, self._config) + self.document.walkabout(visitor) + self.output = visitor.astext() + + diff --git a/src/boost/tools/litre/tool.py b/src/boost/tools/litre/tool.py new file mode 100644 index 000000000..1533fc33d --- /dev/null +++ b/src/boost/tools/litre/tool.py @@ -0,0 +1,67 @@ +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + + +# try to import a litre_config.py file. +try: + import litre_config as config +except: + class config: pass + +import sys +try: # if the user has set up docutils_root in his config, add it to the PYTHONPATH. + sys.path += ['%s/docutils' % config.docutils_root + , '%s/docutils/extras' % config.docutils_root] +except: pass + +import docutils.writers +import cplusplus +import os + +from docutils.core import publish_cmdline, default_description + +description = ('Literate programming from ReStructuredText ' + 'sources. ' + default_description) + +def _pop_option(prefix): + found = None + for opt in sys.argv: + if opt.startswith(prefix): + sys.argv = [ x for x in sys.argv if x != opt ] + found = opt + if prefix.endswith('='): + found = opt[len(prefix):] + return found + + +dump_dir = _pop_option('--dump_dir=') +max_output_lines = _pop_option('--max_output_lines=') + +if dump_dir: + + cplusplus.Writer.translator = cplusplus.DumpTranslator + if _pop_option('--workaround'): + cplusplus.Writer.translator = cplusplus.WorkaroundTranslator + config.includes.insert(0, os.path.join(os.path.split(dump_dir)[0], 'patches')) + + config.dump_dir = os.path.abspath(dump_dir) + if _pop_option('--cleanup_source'): + config.line_hash = None + + if not os.path.exists(config.dump_dir): + os.makedirs(config.dump_dir) + +if max_output_lines: + config.max_output_lines = int(max_output_lines) + +config.bjam_options = _pop_option('--bjam=') + +config.includes = [] + +publish_cmdline( + writer=cplusplus.Writer(config), + description=description + ) diff --git a/src/boost/tools/make-cputime-page.pl b/src/boost/tools/make-cputime-page.pl new file mode 100644 index 000000000..e6969be59 --- /dev/null +++ b/src/boost/tools/make-cputime-page.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl -w + +# Copyright 2004 Aleksey Gurtovoy +# Copyright 2001 Jens Maurer +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +use strict; + +my $filename; +my $compiler; +my $time = 0; +my $ct = 0; +my $first = 2; + +print "\n\n\nCompile Times\n\n\n"; +print "\n"; +print ""; +print "

    \n"; +print "Compile time for each successful regression test in seconds.\n"; +print "

    \n"; + +print "\n"; +print "\n"; + +while(<>) { + if(/^\*\*\* (.*) \*\*\*$/) { + $filename = $1; + $first = ($first == 0 ? 0 : $first-1); + if($first == 0) { + print "\n\n\n\n"; + } + } elsif(/^\*\* (.*)/) { + $compiler = $1; + if($first) { + print "\n"; + } else { + $ct = 1; + } + } elsif($ct && /^CPU time: ([.0-9]*) s user, ([.0-9]*) s system/) { + $time = $1 + $2; + } elsif($ct && /^Pass$/) { + printf "\n", $time; + $ct = 0; + } elsif($ct && /^Fail$/) { + print "\n"; + $ct = 0; + } +} + +print "\n"; +print "
    Test
    $filename$compiler%.02f-
    \n"; +print "\n\n"; + diff --git a/src/boost/tools/quickbook/Jamfile.v2 b/src/boost/tools/quickbook/Jamfile.v2 new file mode 100644 index 000000000..678b68c3c --- /dev/null +++ b/src/boost/tools/quickbook/Jamfile.v2 @@ -0,0 +1,57 @@ +#============================================================================== +# Copyright (c) 2002 2004 2006 Joel de Guzman +# Copyright (c) 2004 Eric Niebler +# Copyright (c) 2015 Rene Rivera +# http://spirit.sourceforge.net/ +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +#============================================================================== + +project quickbook + : requirements + gcc:300 + darwin:300 + gcc:-g0 + darwin:-g0 + msvc:/wd4709 + all + BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE + : default-build + 0x + ; + +import boostcpp ; +import path ; +import option ; + +local DIST_DIR = [ option.get distdir ] ; +if $(DIST_DIR) { + DIST_DIR = [ path.root [ path.make $(DIST_DIR) ] [ path.pwd ] ] ; +} else { + DIST_DIR = [ path.join $(BOOST_ROOT) dist ] ; +} +local DIST_BIN = [ path.join $(DIST_DIR) bin ] ; + +# Install quickbook by default. + +install dist-bin + : + src//quickbook + : + EXE + $(DIST_BIN) + : + release + ; + +# Target for quickbook toolset's auto build. + +alias quickbook + : src//quickbook + : release + ; + +explicit quickbook + ; diff --git a/src/boost/tools/quickbook/_clang-format b/src/boost/tools/quickbook/_clang-format new file mode 100644 index 000000000..555e3b72f --- /dev/null +++ b/src/boost/tools/quickbook/_clang-format @@ -0,0 +1,57 @@ + +# Copyright 2017 Daniel James. +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# Using clang format 4.0 +# http://llvm.org/releases/4.0.0/tools/clang/docs/ClangFormatStyleOptions.html + +BasedOnStyle: LLVM + +# Basic settings +ColumnLimit: 80 +NamespaceIndentation: All +ContinuationIndentWidth: 4 +IndentWidth: 4 +UseTab: Never +Language: Cpp +Standard: Cpp03 + +# Code layout +AlignAfterOpenBracket: AlwaysBreak +AlignTrailingComments: true +AllowShortBlocksOnASingleLine: true +AllowShortFunctionsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true +BinPackParameters: false +BreakBeforeBraces: Custom +ConstructorInitializerAllOnOneLineOrOnePerLine: true +BreakConstructorInitializersBeforeComma: true +BraceWrapping: + AfterNamespace: true + AfterClass: true + AfterStruct: true + AfterUnion: true + AfterEnum: true + AfterFunction: true + AfterControlStatement: false + BeforeCatch: false + BeforeElse: true +PointerAlignment: Left + +PenaltyReturnTypeOnItsOwnLine: 1000 + +# Include order + +IncludeCategories: + - Regex: '^$' + Priority: 10 + - Regex: '^$' + Priority: 30 + - Regex: '^<.*>$' + Priority: 20 + - Regex: '^".*"$' + Priority: 40 + +# Boost specific stuff +ForEachMacros: [ BOOST_FOREACH, QUICKBOOK_FOR ] diff --git a/src/boost/tools/quickbook/build/Jamfile.v2 b/src/boost/tools/quickbook/build/Jamfile.v2 new file mode 100644 index 000000000..6873ef424 --- /dev/null +++ b/src/boost/tools/quickbook/build/Jamfile.v2 @@ -0,0 +1,9 @@ +#============================================================================== +# Copyright (c) 2017 Daniel James +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +#============================================================================== + +alias dist-bin : ..//dist-bin ; diff --git a/src/boost/tools/quickbook/build/publish-docs b/src/boost/tools/quickbook/build/publish-docs new file mode 100755 index 000000000..ab134474d --- /dev/null +++ b/src/boost/tools/quickbook/build/publish-docs @@ -0,0 +1,65 @@ +#============================================================================== +# Copyright (c) 2017 Daniel James +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +#============================================================================== + +#!/usr/bin/env bash +set -e + +# Change to the quickbook root directory +cd $(dirname $0) +cd .. + +# Git settings +remote=git@github.com:boostorg/quickbook.git +branch=gh-pages + +main() { + git fetch "$remote" "$branch:$branch" + b2 -aq doc//fully-standalone + write_fast_import gh-pages | git fast-import --date-format=now --quiet + git push "$remote" "$branch" +} + +write_fast_import() { + committer="$(git config user.name) <$(git config user.email)>" + commit_message="Rebuild documentation" + branch=$1 + + # Start commit + echo "commit refs/heads/${branch}" + echo "committer ${committer} now" + echo "data ${#commit_message}" + echo $commit_message + echo "from ${branch}" + echo "merge HEAD" + + # Delete everything and rebuild tree from scratch. + echo "deleteall" + + # Copy all files from HEAD + git ls-tree -r HEAD | + while read mode type hash path ; do + echo "M $mode $hash $path" + done + + # Preserve index.html from the github pages branch + git ls-tree $branch -- index.html | + while read mode type hash path ; do + echo "M $mode $hash $path" + done + + # Check in documentation + find doc/html -type f | while read path; do + size=$(wc -c "$path") + echo "M 100644 inline $path" + echo "data $size" + cat "$path" + echo + done +} + +main \ No newline at end of file diff --git a/src/boost/tools/quickbook/build/warning-check b/src/boost/tools/quickbook/build/warning-check new file mode 100755 index 000000000..064d49932 --- /dev/null +++ b/src/boost/tools/quickbook/build/warning-check @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +cd $(dirname $0)/../src + +tmpfile=$(tempfile) + +CXX=${CXX:-g++} +BOOST_ROOT=${BOOST_ROOT:-../../..} + +failure=0 + +for filename in *.cpp +do + set -x + if ! $CXX -c -O0 --std=c++11 -isystem $BOOST_ROOT $filename -o $tmpfile \ + -pedantic -Wstrict-aliasing -fstrict-aliasing \ + -Werror -Wall -Wextra \ + -Wunused-parameter -Wshadow \ + -Wfloat-equal \ + -Wsign-promo -Wconversion -Wno-sign-conversion + then + failure=1 + fi + + set +x +done + +rm $tmpfile +exit $failure diff --git a/src/boost/tools/quickbook/examples/simple-boostbook/Jamfile.v2 b/src/boost/tools/quickbook/examples/simple-boostbook/Jamfile.v2 new file mode 100644 index 000000000..4b511c112 --- /dev/null +++ b/src/boost/tools/quickbook/examples/simple-boostbook/Jamfile.v2 @@ -0,0 +1,10 @@ + +# Copyright 2013-2018 Daniel James. +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +using boostbook ; + +boostbook simple : simple.xml : + boost.root=../../../../.. + ; diff --git a/src/boost/tools/quickbook/examples/simple-boostbook/simple.xml b/src/boost/tools/quickbook/examples/simple-boostbook/simple.xml new file mode 100644 index 000000000..6064d5d1e --- /dev/null +++ b/src/boost/tools/quickbook/examples/simple-boostbook/simple.xml @@ -0,0 +1,13 @@ + + + + +

    + Simple Example + Interesting stuff goes here. +
    diff --git a/src/boost/tools/quickbook/examples/simple-quickbook/Jamfile.v2 b/src/boost/tools/quickbook/examples/simple-quickbook/Jamfile.v2 new file mode 100644 index 000000000..8af6ba878 --- /dev/null +++ b/src/boost/tools/quickbook/examples/simple-quickbook/Jamfile.v2 @@ -0,0 +1,13 @@ + +# Copyright 2013-2018 Daniel James. +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +using boostbook ; +using quickbook ; + +xml simple-boostbook : simple.qbk ; + +boostbook simple : simple-boostbook : + boost.root=../../../../.. + ; diff --git a/src/boost/tools/quickbook/examples/simple-quickbook/simple.qbk b/src/boost/tools/quickbook/examples/simple-quickbook/simple.qbk new file mode 100644 index 000000000..df93471a2 --- /dev/null +++ b/src/boost/tools/quickbook/examples/simple-quickbook/simple.qbk @@ -0,0 +1,13 @@ +[/ + Copyright 2013-2018 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[article Simple Example + [quickbook 1.6] +] + +Interesting stuff goes here. diff --git a/src/boost/tools/quickbook/examples/standalone-quickbook/Jamfile.v2 b/src/boost/tools/quickbook/examples/standalone-quickbook/Jamfile.v2 new file mode 100644 index 000000000..28b20b43f --- /dev/null +++ b/src/boost/tools/quickbook/examples/standalone-quickbook/Jamfile.v2 @@ -0,0 +1,21 @@ + +# Copyright 2013-2018 Daniel James. +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +using boostbook ; +using quickbook ; + +xml simple-boostbook : simple.qbk ; + +boostbook simple : simple-boostbook : + css + images + ; + +install css : [ glob $(BOOST_ROOT)/doc/src/*.css ] + : html ; +install images : [ glob $(BOOST_ROOT)/doc/src/images/*.png ] + : html/images ; +explicit css ; +explicit images ; diff --git a/src/boost/tools/quickbook/examples/standalone-quickbook/Jamroot.jam b/src/boost/tools/quickbook/examples/standalone-quickbook/Jamroot.jam new file mode 100644 index 000000000..055b03e52 --- /dev/null +++ b/src/boost/tools/quickbook/examples/standalone-quickbook/Jamroot.jam @@ -0,0 +1,45 @@ +# +# Copyright (c) 2006 João Abecasis +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +## +## IMPORTANT NOTE: This file MUST NOT be copied over a boost installation +## + +path-constant top : . ; + +import modules ; +import path ; + +local boost-root = [ modules.peek : BOOST_ROOT ] ; + +if ! $(boost-root) +{ + local boost-search-dirs = [ modules.peek : BOOST_BUILD_PATH ] ; + + for local dir in $(boost-search-dirs) + { + if [ path.glob $(dir)/../../../ : boost/version.hpp ] + { + boost-root += $(dir)/../../../ ; + } + } + + if $(boost-root) + { + boost-root = [ path.make $(boost-root[1]) ] ; + } + else + { + ECHO "Warning: couldn't find BOOST_ROOT in" $(boost-root) ; + } +} + +path-constant BOOST_ROOT : $(boost-root) ; +modules.poke : QUICKBOOK_ROOT : $(top) ; + +use-project /boost : $(BOOST_ROOT) ; diff --git a/src/boost/tools/quickbook/examples/standalone-quickbook/simple.qbk b/src/boost/tools/quickbook/examples/standalone-quickbook/simple.qbk new file mode 100644 index 000000000..df93471a2 --- /dev/null +++ b/src/boost/tools/quickbook/examples/standalone-quickbook/simple.qbk @@ -0,0 +1,13 @@ +[/ + Copyright 2013-2018 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[article Simple Example + [quickbook 1.6] +] + +Interesting stuff goes here. diff --git a/src/boost/tools/quickbook/extra/katepart/install.sh b/src/boost/tools/quickbook/extra/katepart/install.sh new file mode 100644 index 000000000..c6bfeeadf --- /dev/null +++ b/src/boost/tools/quickbook/extra/katepart/install.sh @@ -0,0 +1,24 @@ +#! /usr/bin/env bash + +# boost::hs installer +# +# Copyright 2006 Matias Capeletto +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# This script install the .xml kate syntax files in KDE + +echo "Installing boost::hs" +echo "A few xml files will be copy to the place KDE store katepart sources." +echo "Files to install" + +ls syntax/*.xml -1 + +echo "Installing..." + +cp syntax/*.xml /usr/share/apps/katepart/syntax + +echo "Done!" +echo "" + diff --git a/src/boost/tools/quickbook/extra/katepart/katepart.qbk b/src/boost/tools/quickbook/extra/katepart/katepart.qbk new file mode 100644 index 000000000..5af40afa7 --- /dev/null +++ b/src/boost/tools/quickbook/extra/katepart/katepart.qbk @@ -0,0 +1,125 @@ +[/ + Boost.hs + + Copyright 2007 Matias Capeletto + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[section KDE Support] + +[heading boost::hs::quickbook] + +boost::hs::quickbook is a syntax highlighting designed to work with Katepart. +It can be used in KWrite, Kate, Konqueror and KDevelop, and supports all the +constructs of Quickbook 1.4 including tables, list, templates and macros. + +[variablelist +[[.qbk loaded in a text editor][ +[$../../tools/quickbook/doc/html/images/extra/katepart/table.text.editor.png] +]] +[[.qbk loaded with boost::hs support][ +[$../../tools/quickbook/doc/html/images/extra/katepart/table.boost.hs.png] +]] +] + +[*html generated from this .qbk file] + +[table Code examples +[[Name][Code][Description]] +[[for loop ][` for(int k=0; k<10; k++) v+=k; ` ][Sums some numbers. ]] +[[while loop ][` { int k; while( k < 10 ) { v+=k; k++ } } `][Same effect. ]] +[[infinite loop][` while( true ) { v+=1; } ` ][Not a good example.]] +] + +[heading Code Folding ] + +boost::hs goes far beyond simple coloring. One useful thing +you can get the editor to do is to mark regions. They appear in a small grey line +and each region can be folded or unfolded independently. + +[heading Auto Comment / Uncomment ] + +Another important feature is the possibility to auto-comment or uncomment some +piece of code (/Tools - Comment/). +Commented regions can be uncommented simple calling the /uncomment/ command +while being in it. + +[heading Styles reference ] + +[table +[[ Name ][ Style ][ Description ]] + +[[*plain text* ][normal black ] +[Plain text at each level. ]] + +[[*formatted text* ][formatted black ] +[ Bold, italic, underline and mixes. Teletype, replaceable, strikeout. ]] + +[[*structure* ][light blue ] +[All quickbook structures characters (\[, \], \[block-type, simple +formating boundaries, lists keywords (\*, \#) ]] + +[[*macros* ][red ] +[Names in macro definitions, macros insertion if it is used the \_\_xxx\_\_ +proposed sintaxis. ]] + +[[*templates* ][red ] +[Names in template definitions ]] + +[[*anchors* ][red ] +[All the keywords that are used to link quickbooks together. ]] + +[[*comments* ][italic light gray ] +[Inside the commentaries. ]] + +[[*tables* ][HTML like ] +[Reveal the structure, bold title, higlighted HTML like columns titles. ]] + +[[*variable lists* ][HTML like ] +[Reveal the structure, bold title, bold HTML like items names. ]] + +[[*c++ code* ][cpp Kate syntax ] +[Code blocks and inline code. ]] + +[[*paths* ][green ] +[Image, files and web paths ]] + +[[*IDE specific* ][dark blue ] +[IDE commands ]] +] + +[heading About boost::hs] + +[$../../tools/quickbook/doc/html/images/extra/katepart/boost.hs.logo.png] + +boost::hs::quickbook is a component of boost::hs, a syntax highlighting +for C++, doxygen, Boost.Build jamfiles and QuickBook. +boost::hs has his own page [@http://tinyurl.com/2l7u33 here]. + +[note +boost::hs::cpp support QuickBook code import comments style! +] + +[heading Installing boost::hs] + +There exist an ongoing effort to push boost::hs upstream to the KatePart +project. In a few months KDE may have native Quickbook support! +For the moment you must download and install it. + +You can download boost::hs from +[@http://matias.capeletto.googlepages.com/boost_hs.zip here]. + +[note +A copy of boost::hs::quickbook and boost::hs::cpp is available in `boost/tools/quickbook/extra/katepart`. +] + +In order to install it you must copy the content in the folder +[*katepart\/syntax\/] to the appropriate katepart syntax folder in your +machine. In general this folder will be in +[*\/usr\/share\/apps\/katepart\/syntax]. A bash script named ['install.sh] +is included that copy the files to this folder. + +[endsect] diff --git a/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml new file mode 100644 index 000000000..7c2b5fcc7 --- /dev/null +++ b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml @@ -0,0 +1,3020 @@ + + + + + + + + + + + + any_cast + + + + ptr_list_of + list_of + map_list_of + tuple_list_of + ref_list_of + cref_list_of + make_list_inserter + + + + bind + mem_fn + + + + polymorphic_cast + polymorphic_downcast + lexical_cast + + + + at + value_at + has_key + at_key + value_at_key + at_c + value_at_c + + advance_c + next + equal_to + advance + distance + deref + value_of + prior + begin + end + size + empty + front + back + + is_sequence + is_view + value_of + tag_of + category_of + + as_list + as_vector + as_set + as_map + + make_list + make_cons + make_vector + make_set + make_map + + tuple_open + tuple_close + tuple_delimiter + + fold + accumulate + for_each + + any + all + none + find + find_if + count + count_if + + filter + filter_if + transform + replace + replace_if + remove + remove_if + reverse + clear + erase + erase_key + insert + insert_range + join + zip + pop_back + pop_front + push_back + push_front + + tuple_size + tuple_element + get + tag_of + + + + hash_combine + hash_range + hash_value + + + + get + project + + + + get_pointer + + + + put + + + + unwrap_reference + + + + init_unit_test_suite + + + + distance + advance + swap + + + + + + + + + + + any + + + + compressed_pair + + + + cons + single_view + filter_view + iterator_range + joint_view + zip_view + transform_view + reverse_view + list_tie + vector_tie + + + + hash + + + + counting_iterator + filter_iterator + function_output_iterator + dereferenced iterator + indirect_iterator + permutation_iterator + reverse_iterator + shared_container_iterator + transform_iterator + zip_iterator + + + + iterator_facade + iterator_adaptor + iterator_adaptor_ + + + + nth_index + index + nth_index_iterator + nth_index_const_iterator + index_iterator + index_const_iterator + + sequenced + ordered_unique + ordered_non_unique + hashed_unique + hashed_non_unique + identity + member + member_offset + + const_mem_fun + mem_fun + const_mem_fun_explicit + mem_fun_explicit + + composite_key + composite_key_result + composite_key_equal_to + composite_key_result_equal_to + composite_key_compare + composite_key_result_less + composite_key_result_greater + composite_key_hash + composite_key_result_hash + + indexed_by + tag + + + + optional + + + + ref + cref + reference_wrapper + + + + set_of + multiset_of + unordered_set_of + unordered_multiset_of + list_of + vector_of + set_of_relation + multiset_of_relation + unordered_set_of_relation + unordered_multiset_of_relation + list_of_relation + vector_of_relation + + + + function + + + + + + + + + + ignore + + + + iterator_core_access + + + + execution_monitor + execution_exception + execution_aborted + + + + + + + + + + call_traits + + + + function_requires + IntegerConcept + SignedIntegerConcept + UnsignedIntegerConcept + ConvertibleConcept + AssignableConcept + SGIAssignableConcept + DefaultConstructibleConcept + CopyConstructibleConcept + EqualityComparableConcept + LessThanComparableConcept + ComparableConcept + InputIteratorConcept + OutputIteratorConcept + ForwardIteratorConcept + Mutable_ForwardIteratorConcept + BidirectionalIteratorConcept + Mutable_BidirectionalIteratorConcept + RandomAccessIteratorConcept + Mutable_RandomAccessIteratorConcept + GeneratorConcept + UnaryFunctionConcept + BinaryFunctionConcept + UnaryPredicateConcept + BinaryPredicateConcept + Const_BinaryPredicateConcept + AdaptableGeneratorConcept + AdaptableUnaryFunctionConcept + AdaptableBinaryFunctionConcept + AdaptablePredicateConcept + AdaptableBinaryPredicateConcept + ContainerConcept + Mutable_ContainerConcept + ForwardContainerConcept + Mutable_ForwardContainerConcept + ReversibleContainerConcept + Mutable_ReversibleContainerConcept + RandomAccessContainerConcept + Mutable_RandomAccessContainerConcept + SequenceConcept + FrontInsertionSequenceConcept + BackInsertionSequenceConcept + AssociativeContainerConcept + UniqueAssociativeContainerConcept + MultipleAssociativeContainerConcept + SimpleAssociativeContainerConcept + PairAssociativeContainerConcept + SortedAssociativeContainerConcept + null_archetype + default_constructible_archetype + assignable_archetype + copy_constructible_archetype + equality_comparable_archetype + convertible_to_archetype + trivial_iterator_archetype + mutable_trivial_iterator_archetype + input_iterator_archetype + forward_iterator_archetype + bidirectional_iterator_archetype + random_access_iterator_archetype + unary_function_archetype + binary_function_archetype + predicate_archetype + binary_predicate_archetype + + + + ReadableIteratorConcept + WritableIteratorConcept + SwappableIteratorConcept + LvalueIteratorConcept + IncrementableIteratorConcept + SinglePassIteratorConcept + ForwardTraversalConcept + BidirectionalTraversalConcept + RandomAccessTraversalConcept + InteroperableIteratorConcept + + + + enable_if + disable_if + lazy_enable_if + lazy_disable_if + enable_if_c + disable_if_c + lazy_enable_if_c + lazy_disable_if_c + + + + indirect_reference + pointee + + + + empty_sequence + filter_view + iterator_range + joint_view + single_view + transform_view + zip_view + + at + at_c + back + begin + clear + empty + end + erase + erase_key + front + has_key + insert + insert_range + is_sequence + order + pop_back + pop_front + push_back + push_front + sequence_tag + size + + advance + distance + next + prior + deref + iterator_category + + back_inserter + front_inserter + inserter + + fold + iter_fold + reverse_fold + reverse_iter_fold + accumulate + + find + find_if + contains + count + count_if + lower_bound + upper_bound + min_element + max_element + equal + + copy + copy_if + transform + replace + replace_if + remove + remove_if + unique + partition + stable_partition + sort + reverse + reverse_copy + reverse_copy_if + reverse_transform + reverse_replace + reverse_replace_if + reverse_remove + reverse_remove_if + reverse_unique + reverse_partition + reverse_stable_partition + + if_ + if_c + eval_if + eval_if_c + + apply + apply_wrap + unpack_args + + _ + _1 + _2 + _3 + _4 + _5 + + bind + quote + arg + protect + + plus + minus + times + divides + modulus + negate + + less + less_equal + greater + greater_equal + equal_to + not_equal_to + + and_ + or_ + not_ + + bitand_ + bitor_ + bitxor_ + shift_left + shift_right + + identity + always + inherit + inherit_linearly + numeric_cast + min + max + sizeof_ + + bool_ + int_ + long_ + size_t + integral_c + + pair + empty_base + void_ + + + + less_than_comparable + less_than_comparable1 + less_than_comparable2 + + equality_comparable + equality_comparable1 + + equality_comparable2 + + addable + addable1 + + addable2 + + subtractable + subtractable1 + + subtractable2 + + subtractable2_left + + multipliable + multipliable1 + multipliable2 + + dividable + dividable1 + dividable2 + + dividable2_left + + modable + modable1 + modable2 + + modable2_left + + orable + orable1 + orable2 + + andable + andable1 + andable2 + + xorable + xorable1 + xorable2 + + incrementable + decrementable + + left_shiftable + left_shiftable1 + left_shiftable2 + + right_shiftable + right_shiftable1 + right_shiftable2 + + equivalent + equivalent1 + equivalent2 + + partially_ordered + partially_ordered1 + partially_ordered2 + + totally_ordered + totally_ordered1 + totally_ordered2 + + additive + additive1 + additive2 + + multiplicative + multiplicative1 + multiplicative2 + + integer_multiplicative + integer_multiplicative1 + integer_multiplicative2 + + arithmetic + arithmetic1 + arithmetic2 + + integer_arithmetic + integer_arithmetic1 + integer_arithmetic2 + + bitwise + bitwise1 + bitwise2 + + unit_steppable + + shiftable + shiftable1 + shiftable2 + + ring_operators + ring_operators1 + ring_operators2 + + ordered_ring_operators + ordered_ring_operators1 + ordered_ring_operators2 + + field_operators + field_operators1 + field_operators2 + + ordered_field_operators + ordered_field_operators1 + + ordered_field_operators2 + + euclidian_ring_operators + euclidian_ring_operators1 + euclidian_ring_operators2 + + ordered_euclidian_ring_operators + ordered_euclidian_ring_operators1 + ordered_euclidian_ring_operators2 + + operators + operators2 + + dereferenceable + indexable + + input_iteratable + output_iteratable + forward_iteratable + bidirectional_iteratable + random_access_iteratable + + input_iterator_helper + output_iterator_helper + forward_iterator_helper + bidirectional_iterator_helper + random_access_iterator_helper + + + + property_traits + + + + + is_reference_wrapper + + + + add_const + add_cv + add_pointer + add_reference + add_volatile + aligned_storage + alignment_of + extent + function_traits + has_nothrow_assign + has_nothrow_constructor + has_nothrow_copy + has_trivial_assign + has_trivial_constructor + has_trivial_copy + has_trivial_destructor + has_virtual_destructor + integral_constant + is_abstract + is_arithmetic + is_array + is_base_of + is_class + is_compound + is_const + is_convertible + is_empty + is_enum + is_floating_point + is_function + is_fundamental + is_integral + is_member_function_pointer + is_member_object_pointer + is_member_pointer + is_object + is_pod + is_pointer + is_polymorphic + is_same + is_scalar + is_stateless + is_reference + is_union + is_void + is_volatile + rank + remove_all_extents + remove_const + remove_cv + remove_extent + remove_pointer + remove_reference + remove_volatile + type_with_alignment + + + + + + base_from_member + checked_delete + checked_array_delete + next + prior + noncopyable + addressof + result_of + + + + + + + + + + + bad_any_cast + + + + assignment_exception + + + + + + + + + + array + + + + dynamic_bitset + + + + tuple + + + + range_c + vector_c + list_c + set_c + + + + multi_index_container + + + + bimap + + + + identity_property_map + iterator_property_map + associative_property_map + const_associative_property_map + vector_property_map + + + + + + + + + + + BOOST_CLASS_REQUIRE + + + + FUSION_MAX_VECTOR_SIZE + FUSION_MAX_LIST_SIZE + FUSION_MAX_SET_SIZE + FUSION_MAX_MAP_SIZE + + + + BOOST_MPL_ASSERT + BOOST_MPL_ASSERT_MSG + BOOST_MPL_ASSERT_NOT + BOOST_MPL_ASSERT_RELATION + + BOOST_MPL_HAS_XXX_TRAIT_DEF + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF + + BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + BOOST_MPL_CFG_NO_HAS_XXX + BOOST_MPL_LIMIT_METAFUNCTION_ARITY + BOOST_MPL_LIMIT_VECTOR_SIZE + BOOST_MPL_LIMIT_LIST_SIZE + BOOST_MPL_LIMIT_SET_SIZE + BOOST_MPL_LIMIT_MAP_SIZE + BOOST_MPL_LIMIT_UNROLLING + + BOOST_MPL_AUX_LAMBDA_SUPPORT + + + + BOOST_MULTI_INDEX_MEMBER + BOOST_MULTI_INDEX_CONST_MEM_FUN + BOOST_MULTI_INDEX_MEM_FUN + + + + BOOST_STATIC_ASSERT + + + + BOOST_TEST_CATCH_SYSTEM_ERRORS + BOOST_PRG_MON_CONFIRM + BOOST_TEST_DONT_PRINT_LOG_VALUE + + BOOST_CHECK + BOOST_CHECK_PRED + BOOST_CHECK_MSG + BOOST_CHECK_EQUAL + BOOST_CHECK_CLOSE + BOOST_CHECK_SMALL + BOOST_CHECK_BITWISE_EQUAL + + BOOST_WARN + BOOST_WARN_PRED + BOOST_WARN_MSG + BOOST_WARN_EQUAL + BOOST_WARN_CLOSE + BOOST_WARN_SMALL + BOOST_WARN_BITWISE_EQUAL + + BOOST_REQUIRE + BOOST_REQUIRE_PRED + BOOST_REQUIRE_MSG + BOOST_REQUIRE_EQUAL + BOOST_REQUIRE_CLOSE + BOOST_REQUIRE_SMALL + BOOST_REQUIRE_BITWISE_EQUAL + + BOOST_PASS + BOOST_PASS_PRED + BOOST_PASS_MSG + BOOST_PASS_EQUAL + BOOST_PASS_CLOSE + BOOST_PASS_SMALL + BOOST_PASS_BITWISE_EQUAL + + BOOST_MSG_ONLY + BOOST_SET_CHECKPOINT + BOOST_CHECK_PRED_WITH_ARGS + BOOST_CHECK_EQUAL_COLL + + BOOST_ERROR + BOOST_FAIL + + + + + + + advance_c + next + equal_to + advance + distance + deref + value_of + prior + begin + end + size + empty + front + back + + + + + + + + + + + dereference + equal + increment + decrement + advance + distance_to + begin + end + size + max_size + empty + swap + rbegin + rend + front + insert + erase + clear + resize + push_front + pop_front + push_back + pop_back + erase + clear + find + count + equal_range + key_comp + lower_bound + upper_bound + equal_range + get_allocator + hash_function + key_eq + bucket_count + max_bucket_count + bucket_size + bucket + load_factor + max_load_factor + at + + + + + + + + + + + cpp_main + test_main + + + + + + + + + + + readable_iterator_t + writable_iterator_t + readable_writable_iterator_t + readable_lvalue_iterator_t + writable_lvalue_iterator_t + + + + readable_property_map_tag + writable_property_map_tag + read_write_property_map_tag + lvalue_property_map_tag + + + + + + + + + base + base_reference + + + + + + + exit_success + exit_failure + exit_exception_failure + + + + + + value_type + iterator + const_iterator + reference + const_reference + pointer + difference_type + size_type + reverse_iterator + const_reverse_iterator + key_type + data_type + hasher + key_equal + local_iterator + const_local_iterator + key_compare + value_compare + iterator_category + value_type + difference_type + pointer + reference + + + + + + std + boost + assign + bimaps + call_traits + concept_check + conversion + date_time + dynamic_bitset + enable_if + filesystem + format + hash + graph + integer + in_place_factory + io_state_saver + iostream + lambda + math + minmax + mpl + multi_array + multi_index + numeric + operators + parameter + pointer_container + pool + preprocesor + program_options + property_map + python + random + regex + serialization + signals + smart_ptr + static_assert + spirit + string_algo + test + thread + timer + tokenizer + tribool + tuples + type_traits + uBLAS + utility + value_initialized + wave + fusion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml new file mode 100644 index 000000000..3ec0b91b0 --- /dev/null +++ b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml @@ -0,0 +1,471 @@ + + + + + + + + + + + + asm + break + case + catch + class + const_cast + continue + default + delete + do + dynamic_cast + else + enum + explicit + export + extern + false + friend + for + goto + if + inline + namespace + new + operator + private + protected + public + reinterpret_cast + return + sizeof + static_cast + struct + switch + template + this + throw + true + try + typedef + typeid + type_info + typename + union + using + virtual + while + and + and_eq + bad_cast + bad_typeid + bitand + bitor + compl + not + not_eq + or + or_eq + xor + xor_eq + except + finally + xalloc + + + + + + K_DCOP + SLOT + SIGNAL + Q_CLASSINFO + Q_ENUMS + Q_EXPORT + Q_OBJECT + Q_OVERRIDE + Q_PROPERTY + Q_SETS + TRUE + FALSE + connect + disconnect + emit + signals + slots + foreach + + + + + + auto + bool + char + const + double + float + int + long + mutable + register + short + signed + static + unsigned + void + volatile + uchar + uint + int8_t + int16_t + int32_t + int64_t + uint8_t + uint16_t + uint32_t + uint64_t + wchar_t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml new file mode 100644 index 000000000..b043cfbe8 --- /dev/null +++ b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml @@ -0,0 +1,736 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml new file mode 100644 index 000000000..202d3e560 --- /dev/null +++ b/src/boost/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml @@ -0,0 +1,620 @@ + + + + + + + + + + + + + + adjacent_find + binary_search + copy + copy_backward + count + count_if + equal + equal_range + fill + fill_n + find + find_end + find_first_of + find_if + for_each + generate + generate_n + includes + inplace_merge + iter_swap + lexicographical_compare + lower_bound + make_heap + max + max_element + merge + min + min_element + mismatch + next_permutation + nth_element + partial_sort + partial_sort_copy + partition + pop_heap + prev_permutation + push_heap + random_shuffle + remove + remove_copy + remove_copy_if + remove_if + replace + replace_copy + replace_copy_if + replace_if + reverse + reverse_copy + rotate + rotate_copy + search + search_n + set_difference + set_intersection + set_symmetric_difference + set_union + sort + sort_heap + stable_partition + stable_sort + swap + swap_ranges + transform + unique + unique_copy + upper_bound + + + + assert + + + + abs + arg + conj + cos + cosh + exp + imag + log + log10 + norm + polar + pow + real + sin + sinh + sqrt + tan + tanh + acos + asin + atan + atan2 + + + + terminate_handler + unexpected_handler + + set_terminate + + set_unexpected + terminate + unexpected + uncaught_exception + + + + advance + distance + + + + get_temporary_buffer + return_temporary_buffer + uninitialized_copy + uninitialized_fill + uninitialized_fill_n + + + + set_new_handler + + + + accumulate + inner_product + partial_sum + adjacent_difference + + + + getline + swap + + + + make_pair + + + + has_facet + use_facet + isalnum + isalpha + iscntrl + isdigit + isgraph + islower + isprint + ispunct + isspace + isupper + isxdigit + tolower + toupper + + + + + + + + complex + + + + back_insert_iterator + back_inserter + front_insert_iterator + front_inserter + insert_iterator + inserter + istream_iterator + istreambuf_iterator + iterator + ostream_iterator + ostreambuf_iterator + reverse_iterator + + + + allocator + raw_storage_iterator + auto_ptr + auto_ptr_ref + + + + basic_string + + + + pair + + + + gslice_array + indirect_array + mask_array + slice_array + valarray + + + + messages + codecvt_byname + collate + collate_byname + ctype + ctype_byname + messages_byname + money_base + money_get + money_put + moneypunct + moneypunct_byname + num_get + num_put + numpunct + numpunct_byname + time_base + time_get + time_get_byname + time_put + time_put_byname + + + + basic_ios + fpos + + + + istreambuf_iterator + ostreambuf_iterator + basic_streambuf + basic_istream + basic_ostream + basic_iostream + basic_stringbuf + basic_istringstream + basic_ostringstream + basic_stringstream + basic_filebuf + basic_ifstream + basic_ofstream + basic_fstream + + + + + + + + + + + resetiosflags + setiosflags + setbase + + setfill + setprecision + setw + + + + new_handler + nothrow_t + + + + string + wstring + + + + slice + gslice + + + + locale + codecvt + codecvt_base + ctype_base + messages_base + + + + ios_base + streamoff + streampos + streamsize + wios + wstreampos + ios + + + + streambuf + istream + ostream + iostream + stringbuf + istringstream + ostringstream + stringstream + filebuf + ifstream + ofstream + fstream + wstreambuf + wistream + wostream + wiostream + wstringbuf + wistringstream + wostringstream + wstringstream + wfilebuf + wifstream + wofstream + wfstream + + + + + + + + + exception + bad_exception + + + + bad_alloc + + + + logic_error + domain_error + invalid_argument + length_error + out_of_range + + runtime_error + range_error + overflow_error + underflow_error + + + + bad_cast + bad_typeid + + + + + + + + + __STD_COMPLEX + + + + + + + + + + binary_function + binary_negate + binder1st + binder2nd + const_mem_fun_t + const_mem_fun_ref_t + const_mem_fun1_t + const_mem_fun1_ref_t + divides + equal_to + greater + greater_equal + less + less_equal + logical_and + logical_not + logical_or + mem_fun_t + mem_fun_ref_t + mem_fun1_t + mem_fun1_ref_t + minus + modulus + multiplies + negate + not_equal_to + plus + pointer_to_binary_function + pointer_to_unary_function + unary_function + unary_negate + bind1st + bind2nd + mem_fun + mem_fun_ref + not1 + not2 + ptr_fun + + + + numeric_limits + + + + iterator_traits + + + + char_traits + + + + type_info + + + + + + + + cin + cout + cerr + clog + + wcin + wcout + wcerr + wclog + + + + nothrow + + + + + + + bidirectional_iterator_tag + forward_iterator_tag + input_iterator_tag + output_iterator_tag + random_access_iterator_tag + + + + + + bit_set + deque + list + queue + set + multiset + slist + map + multimap + unordered_map + stack + vector + + + + + + + + boolalpha + dec + fixed + hex + internal + left + noboolalpha + noshowbase + noshowpoint + noshowpos + noskipws + nounitbuf + nouppercase + oct + right + scientific + showbase + showpoint + showpos + skipws + unitbuf + uppercase + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/quickbook/index.html b/src/boost/tools/quickbook/index.html new file mode 100644 index 000000000..35faddf3b --- /dev/null +++ b/src/boost/tools/quickbook/index.html @@ -0,0 +1,15 @@ + + + + + + + Automatic redirection failed, click this + link +

    Copyright Eric Niebler 2005

    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at + www.boost.org/LICENSE_1_0.txt). +

    + + diff --git a/src/boost/tools/quickbook/meta/explicit-failures-markup.xml b/src/boost/tools/quickbook/meta/explicit-failures-markup.xml new file mode 100644 index 000000000..a9097c2c7 --- /dev/null +++ b/src/boost/tools/quickbook/meta/explicit-failures-markup.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + Unsupported compiler + + + + + + + + C++11 mode (or later) required + + + + diff --git a/src/boost/tools/quickbook/src/Jamfile.v2 b/src/boost/tools/quickbook/src/Jamfile.v2 new file mode 100644 index 000000000..fe62c33f5 --- /dev/null +++ b/src/boost/tools/quickbook/src/Jamfile.v2 @@ -0,0 +1,62 @@ +#============================================================================== +# Copyright (c) 2002 2004 2006 Joel de Guzman +# Copyright (c) 2004 Eric Niebler +# http://spirit.sourceforge.net/ +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +#============================================================================== + +lib shell32 ; + +exe quickbook + : + quickbook.cpp + actions.cpp + doc_info_actions.cpp + state.cpp + dependency_tracker.cpp + utils.cpp + files.cpp + native_text.cpp + stream.cpp + glob.cpp + path.cpp + include_paths.cpp + values.cpp + document_state.cpp + id_generation.cpp + id_xml.cpp + post_process.cpp + bb2html.cpp + boostbook_chunker.cpp + xml_parse.cpp + html_printer.cpp + tree.cpp + collector.cpp + template_stack.cpp + code_snippet.cpp + markups.cpp + syntax_highlight.cpp + grammar.cpp + main_grammar.cpp + block_element_grammar.cpp + phrase_element_grammar.cpp + doc_info_grammar.cpp + /boost//program_options + /boost//filesystem + : #QUICKBOOK_NO_DATES + BOOST_FILESYSTEM_NO_DEPRECATED + msvc:/wd4355 + msvc:/wd4511 + msvc:/wd4512 + msvc:/wd4701 + msvc:/wd4702 + msvc:/wd4244 + msvc:/wd4267 + msvc:/wd4800 + msvc:_CRT_SECURE_NO_DEPRECATE + msvc:_SCL_SECURE_NO_DEPRECATE + windows:shell32 + ; diff --git a/src/boost/tools/quickbook/src/actions.cpp b/src/boost/tools/quickbook/src/actions.cpp new file mode 100644 index 000000000..a40741686 --- /dev/null +++ b/src/boost/tools/quickbook/src/actions.cpp @@ -0,0 +1,1973 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "actions.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "block_tags.hpp" +#include "document_state.hpp" +#include "files.hpp" +#include "for.hpp" +#include "grammar.hpp" +#include "markups.hpp" +#include "path.hpp" +#include "phrase_tags.hpp" +#include "quickbook.hpp" +#include "state.hpp" +#include "state_save.hpp" +#include "stream.hpp" +#include "syntax_highlight.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace + { + void write_anchors(quickbook::state& state, collector& tgt) + { + if (state.source_mode_next) { + detail::outwarn( + state.source_mode_next_pos.get_file(), + state.source_mode_next_pos.get_position()) + << "Temporary source mode unsupported here." << std::endl; + state.source_mode_next = 0; + } + + QUICKBOOK_FOR (auto const& anchor_id, state.anchors) { + tgt << ""; + } + + state.anchors.clear(); + } + + std::string add_anchor( + quickbook::state& state, + quickbook::string_view id, + id_category::categories category = id_category::explicit_anchor_id) + { + std::string placeholder = state.document.add_anchor(id, category); + state.anchors.push_back(placeholder); + return placeholder; + } + + std::string get_attribute_value( + quickbook::state& state, quickbook::value const& value) + { + std::string x = value.is_encoded() ? value.get_encoded() + : value.get_quickbook().to_s(); + + if (x.empty()) { + detail::outerr(value.get_file(), value.get_position()) + << "Empty attribute value." << std::endl; + ++state.error_count; + x = "xxx"; + } + + return x; + } + + std::string validate_id( + quickbook::state& state, quickbook::value const& id_value) + { + bool valid = true; + std::string id = get_attribute_value(state, id_value); + + // Special case since I use dollar ids for id placeholders. + if (id[0] == '$') { + valid = false; + id[0] = '_'; + } + + if (qbk_version_n >= 107u) { + char const* allowed_punctuation = "_.-"; + + QUICKBOOK_FOR (char c, id) { + if (!std::isalnum(c) && + !std::strchr(allowed_punctuation, c)) + valid = false; + } + } + + if (!valid) { + detail::outerr(id_value.get_file(), id_value.get_position()) + << "Invalid id: " << (id_value.is_encoded() + ? id_value.get_encoded() + : id_value.get_quickbook().to_s()) + << std::endl; + ++state.error_count; + } + + return id; + } + } + + bool quickbook_range::in_range() const + { + return qbk_version_n >= lower && qbk_version_n < upper; + } + + bool quickbook_strict::is_strict_checking() const + { + return state.strict_mode; + } + + void list_action(quickbook::state&, value); + void header_action(quickbook::state&, value); + void begin_section_action(quickbook::state&, value); + void end_section_action(quickbook::state&, value, string_iterator); + void block_action(quickbook::state&, value); + void block_empty_action(quickbook::state&, value); + void macro_definition_action(quickbook::state&, value); + void template_body_action(quickbook::state&, value); + void variable_list_action(quickbook::state&, value); + void table_action(quickbook::state&, value); + void xinclude_action(quickbook::state&, value); + void include_action(quickbook::state&, value, string_iterator); + void image_action(quickbook::state&, value); + void anchor_action(quickbook::state&, value); + void link_action(quickbook::state&, value); + void phrase_action(quickbook::state&, value); + void role_action(quickbook::state&, value); + void footnote_action(quickbook::state&, value); + void raw_phrase_action(quickbook::state&, value); + void source_mode_action(quickbook::state&, value); + void next_source_mode_action(quickbook::state&, value); + void code_action(quickbook::state&, value); + void do_template_action(quickbook::state&, value, string_iterator); + + void element_action::operator()(parse_iterator first, parse_iterator) const + { + value_consumer values = state.values.release(); + if (!values.check() || !state.conditional) return; + value v = values.consume(); + values.finish(); + + switch (v.get_tag()) { + case block_tags::ordered_list: + case block_tags::itemized_list: + return list_action(state, v); + case block_tags::generic_heading: + case block_tags::heading1: + case block_tags::heading2: + case block_tags::heading3: + case block_tags::heading4: + case block_tags::heading5: + case block_tags::heading6: + return header_action(state, v); + case block_tags::begin_section: + return begin_section_action(state, v); + case block_tags::end_section: + return end_section_action(state, v, first.base()); + case block_tags::blurb: + case block_tags::preformatted: + case block_tags::blockquote: + case block_tags::warning: + case block_tags::caution: + case block_tags::important: + case block_tags::note: + case block_tags::tip: + case block_tags::block: + return block_action(state, v); + case block_tags::hr: + return block_empty_action(state, v); + case block_tags::macro_definition: + return macro_definition_action(state, v); + case block_tags::template_definition: + return template_body_action(state, v); + case block_tags::variable_list: + return variable_list_action(state, v); + case block_tags::table: + return table_action(state, v); + case block_tags::xinclude: + return xinclude_action(state, v); + case block_tags::import: + case block_tags::include: + return include_action(state, v, first.base()); + case phrase_tags::image: + return image_action(state, v); + case phrase_tags::anchor: + return anchor_action(state, v); + case phrase_tags::url: + case phrase_tags::link: + case phrase_tags::funcref: + case phrase_tags::classref: + case phrase_tags::memberref: + case phrase_tags::enumref: + case phrase_tags::macroref: + case phrase_tags::headerref: + case phrase_tags::conceptref: + case phrase_tags::globalref: + return link_action(state, v); + case phrase_tags::bold: + case phrase_tags::italic: + case phrase_tags::underline: + case phrase_tags::teletype: + case phrase_tags::strikethrough: + case phrase_tags::quote: + case phrase_tags::replaceable: + return phrase_action(state, v); + case phrase_tags::footnote: + return footnote_action(state, v); + case phrase_tags::escape: + return raw_phrase_action(state, v); + case phrase_tags::role: + return role_action(state, v); + case source_mode_tags::cpp: + case source_mode_tags::python: + case source_mode_tags::teletype: + return source_mode_action(state, v); + case code_tags::next_source_mode: + return next_source_mode_action(state, v); + case code_tags::code_block: + case code_tags::inline_code_block: + case code_tags::inline_code: + return code_action(state, v); + case template_tags::attribute_template: + case template_tags::template_: + return do_template_action(state, v, first.base()); + default: + break; + } + } + + void break_action::operator()(parse_iterator first, parse_iterator) const + { + write_anchors(state, state.phrase); + + if (*first == '\\') { + detail::outwarn(state.current_file, first.base()) + //<< "in column:" << pos.column << ", " + << "'\\n' is deprecated, pleases use '[br]' instead" + << ".\n"; + } + + if (!state.warned_about_breaks) { + detail::outwarn(state.current_file, first.base()) + << "line breaks generate invalid boostbook " + "(will only note first occurrence).\n"; + + state.warned_about_breaks = true; + } + + state.phrase << detail::get_markup(phrase_tags::break_mark).pre; + } + + void error_message_action::operator()( + parse_iterator first, parse_iterator last) const + { + file_position const pos = state.current_file->position_of(first.base()); + + std::string value(first, last); + std::string formatted_message = message; + boost::replace_all(formatted_message, "%s", value); + boost::replace_all( + formatted_message, "%c", + boost::lexical_cast(pos.column)); + + detail::outerr(state.current_file->path, pos.line) + << formatted_message << std::endl; + ++state.error_count; + } + + void error_action::operator()( + parse_iterator first, parse_iterator /*last*/) const + { + file_position const pos = state.current_file->position_of(first.base()); + + detail::outerr(state.current_file->path, pos.line) + << "Syntax Error near column " << pos.column << ".\n"; + ++state.error_count; + } + + void block_action(quickbook::state& state, value block) + { + write_anchors(state, state.out); + + detail::markup markup = detail::get_markup(block.get_tag()); + + value_consumer values = block; + state.out << markup.pre << values.consume().get_encoded() + << markup.post; + values.finish(); + } + + void block_empty_action(quickbook::state& state, value block) + { + write_anchors(state, state.out); + + detail::markup markup = detail::get_markup(block.get_tag()); + state.out << markup.pre; + } + + void phrase_action(quickbook::state& state, value phrase) + { + write_anchors(state, state.phrase); + + detail::markup markup = detail::get_markup(phrase.get_tag()); + + value_consumer values = phrase; + state.phrase << markup.pre << values.consume().get_encoded() + << markup.post; + values.finish(); + } + + void role_action(quickbook::state& state, value role_list) + { + write_anchors(state, state.phrase); + + value_consumer values = role_list; + value role = values.consume(); + value phrase = values.consume(); + values.finish(); + + state.phrase << "" << phrase.get_encoded() << ""; + } + + void footnote_action(quickbook::state& state, value phrase) + { + write_anchors(state, state.phrase); + + value_consumer values = phrase; + state.phrase << "" << values.consume().get_encoded() + << ""; + values.finish(); + } + + void raw_phrase_action(quickbook::state& state, value phrase) + { + write_anchors(state, state.phrase); + + detail::markup markup = detail::get_markup(phrase.get_tag()); + state.phrase << markup.pre << phrase.get_quickbook() << markup.post; + } + + void paragraph_action::operator()() const + { + std::string str; + state.phrase.swap(str); + + std::string::const_iterator pos = str.begin(), end = str.end(); + + while (pos != end && cl::space_p.test(*pos)) + ++pos; + + if (pos != end) { + detail::markup markup = + state.in_list + ? detail::get_markup(block_tags::paragraph_in_list) + : detail::get_markup(block_tags::paragraph); + state.out << markup.pre << str; + write_anchors(state, state.out); + state.out << markup.post; + } + } + + void explicit_list_action::operator()() const + { + state.explicit_list = true; + } + + void phrase_end_action::operator()() const + { + write_anchors(state, state.phrase); + } + + namespace + { + void write_bridgehead( + quickbook::state& state, + int level, + std::string const& str, + std::string const& id, + bool self_link) + { + if (self_link && !id.empty()) { + state.out << ""; + state.out << ""; + state.out << ""; + state.out << str; + state.out << ""; + state.out << ""; + } + else { + state.out << ""; + state.out << str; + state.out << ""; + } + } + } + + void header_action(quickbook::state& state, value heading_list) + { + value_consumer values = heading_list; + + bool generic = heading_list.get_tag() == block_tags::generic_heading; + value element_id = values.optional_consume(general_tags::element_id); + value content = values.consume(); + values.finish(); + + int level; + + if (generic) { + level = state.document.section_level() + 1; + // We need to use a heading which is one greater + // than the current. + if (level > 6) // The max is h6, clip it if it goes + level = 6; // further than that + } + else { + level = heading_list.get_tag() - block_tags::heading1 + 1; + } + + write_anchors(state, state.out); + + if (!element_id.empty()) { + // Use an explicit id. + + std::string anchor = state.document.add_id( + validate_id(state, element_id), id_category::explicit_id); + + write_bridgehead( + state, level, content.get_encoded(), anchor, + self_linked_headers); + } + else if (state.document.compatibility_version() >= 106u) { + // Generate ids for 1.6+ + + std::string anchor = state.document.add_id( + detail::make_identifier(content.get_quickbook()), + id_category::generated_heading); + + write_bridgehead( + state, level, content.get_encoded(), anchor, + self_linked_headers); + } + else { + // Generate ids that are compatible with older versions of + // quickbook. + + // Older versions of quickbook used the generated boostbook, but + // we only have an intermediate version which can contain id + // placeholders. So to generate the ids they must be replaced + // by the ids that the older versions would have used - i.e. the + // unresolved ids. + // + // Note that this doesn't affect the actual boostbook generated for + // the content, it's just used to generate this id. + + std::string id = detail::make_identifier( + state.document.replace_placeholders_with_unresolved_ids( + content.get_encoded())); + + if (generic || state.document.compatibility_version() >= 103) { + std::string anchor = + state.document.add_id(id, id_category::generated_heading); + + write_bridgehead( + state, level, content.get_encoded(), anchor, + self_linked_headers); + } + else { + std::string anchor = state.document.old_style_id( + id, id_category::generated_heading); + + write_bridgehead( + state, level, content.get_encoded(), anchor, false); + } + } + } + + void simple_phrase_action::operator()(char mark) const + { + write_anchors(state, state.phrase); + + int tag = mark == '*' + ? phrase_tags::bold + : mark == '/' + ? phrase_tags::italic + : mark == '_' + ? phrase_tags::underline + : mark == '=' ? phrase_tags::teletype : 0; + + assert(tag != 0); + detail::markup markup = detail::get_markup(tag); + + value_consumer values = state.values.release(); + value content = values.consume(); + values.finish(); + + state.phrase << markup.pre; + state.phrase << content.get_encoded(); + state.phrase << markup.post; + } + + bool cond_phrase_push::start() + { + value_consumer values = state.values.release(); + + saved_conditional = state.conditional; + + if (saved_conditional) { + bool positive = values.consume().get_quickbook().empty(); + quickbook::string_view macro1 = values.consume().get_quickbook(); + std::string macro(macro1.begin(), macro1.end()); + + state.conditional = + (bool)find(state.macro, macro.c_str()) == positive; + + if (!state.conditional) { + state.push_output(); + state.anchors.swap(anchors); + } + } + + return true; + } + + void cond_phrase_push::cleanup() + { + if (saved_conditional && !state.conditional) { + state.pop_output(); + state.anchors.swap(anchors); + } + + state.conditional = saved_conditional; + } + + void state::start_list(char mark) + { + push_tagged_source_mode(source_mode_next); + source_mode_next = 0; + + write_anchors(*this, (in_list ? phrase : out)); + assert(mark == '*' || mark == '#'); + push_output(); + out << ((mark == '#') ? "\n" : "\n"); + in_list = true; + } + + void state::end_list(char mark) + { + write_anchors(*this, out); + assert(mark == '*' || mark == '#'); + out << ((mark == '#') ? "\n" : "\n"); + + std::string list_output; + out.swap(list_output); + + pop_output(); + + (in_list ? phrase : out) << list_output; + + pop_tagged_source_mode(); + } + + void state::start_list_item() + { + out << ""; + write_anchors(*this, phrase); + } + + void state::end_list_item() + { + write_anchors(*this, phrase); + paragraph_action para(*this); + para(); + out << ""; + } + + namespace + { + bool parse_template( + value const&, + quickbook::state& state, + bool is_attribute_template = false); + } + + void state::start_callouts() { ++callout_depth; } + + std::string state::add_callout(value v) + { + std::string callout_id1 = document.add_id("c", id_category::numbered); + std::string callout_id2 = document.add_id("c", id_category::numbered); + + callouts.insert(encoded_value(callout_id1)); + callouts.insert(encoded_value(callout_id2)); + callouts.insert(v); + + std::string code; + code += ""; + + return code; + } + + std::string state::end_callouts() + { + assert(callout_depth > 0); + std::string block; + + --callout_depth; + if (callout_depth > 0) return block; + + value_consumer c = callouts.release(); + if (!c.check()) return block; + + block += ""; + while (c.check()) { + std::string callout_id1 = c.consume().get_encoded(); + std::string callout_id2 = c.consume().get_encoded(); + value callout_body = c.consume(); + + std::string callout_value; + + { + state_save save(*this, state_save::scope_all); + ++template_depth; + + bool r = parse_template(callout_body, *this); + + if (!r) { + detail::outerr( + callout_body.get_file(), callout_body.get_position()) + << "Expanding callout." << std::endl + << "------------------begin------------------" + << std::endl + << callout_body.get_quickbook() << std::endl + << "------------------end--------------------" + << std::endl; + ++error_count; + } + + out.swap(callout_value); + } + + block += ""; + block += callout_value; + block += ""; + } + block += ""; + + return block; + } + + void list_action(quickbook::state& state, value list) + { + write_anchors(state, state.out); + + detail::markup markup = detail::get_markup(list.get_tag()); + + state.out << markup.pre; + + QUICKBOOK_FOR (value item, list) { + state.out << ""; + state.out << item.get_encoded(); + state.out << ""; + } + + state.out << markup.post; + } + + void anchor_action(quickbook::state& state, value anchor) + { + value_consumer values = anchor; + value anchor_id = values.consume(); + // Note: anchor_id is never encoded as boostbook. If it + // is encoded, it's just things like escapes. + add_anchor(state, validate_id(state, anchor_id)); + values.finish(); + } + + void do_macro_action::operator()(std::string const& str) const + { + write_anchors(state, state.phrase); + + if (str == quickbook_get_date) { + char strdate[64]; + strftime(strdate, sizeof(strdate), "%Y-%b-%d", current_time); + state.phrase << strdate; + } + else if (str == quickbook_get_time) { + char strdate[64]; + strftime(strdate, sizeof(strdate), "%I:%M:%S %p", current_time); + state.phrase << strdate; + } + else { + state.phrase << str; + } + } + + void raw_char_action::operator()(char ch) const { state.phrase << ch; } + + void raw_char_action::operator()( + parse_iterator first, parse_iterator last) const + { + while (first != last) + state.phrase << *first++; + } + + void source_mode_action(quickbook::state& state, value source_mode) + { + state.change_source_mode(source_mode.get_tag()); + } + + void next_source_mode_action(quickbook::state& state, value source_mode) + { + value_consumer values = source_mode; + state.source_mode_next_pos = values.consume(); + state.source_mode_next = values.consume().get_int(); + values.finish(); + } + + void code_action(quickbook::state& state, value code_block) + { + int code_tag = code_block.get_tag(); + + value_consumer values = code_block; + quickbook::string_view code_value = values.consume().get_quickbook(); + values.finish(); + + bool inline_code = + code_tag == code_tags::inline_code || + (code_tag == code_tags::inline_code_block && qbk_version_n < 106u); + bool block = code_tag != code_tags::inline_code; + + source_mode_type source_mode = + state.source_mode_next ? state.source_mode_next + : state.current_source_mode().source_mode; + state.source_mode_next = 0; + + if (inline_code) { + write_anchors(state, state.phrase); + } + else { + paragraph_action para(state); + para(); + write_anchors(state, state.out); + } + + if (block) { + // preprocess the code section to remove the initial indentation + mapped_file_builder mapped; + mapped.start(state.current_file); + mapped.unindent_and_add(code_value); + + file_ptr f = mapped.release(); + + if (f->source().empty()) + return; // Nothing left to do here. The program is empty. + + if (qbk_version_n >= 107u) state.start_callouts(); + + parse_iterator first_(f->source().begin()); + parse_iterator last_(f->source().end()); + + file_ptr saved_file = f; + boost::swap(state.current_file, saved_file); + + // print the code with syntax coloring + // + // We must not place a \n after the tag + // otherwise PDF output starts code blocks with a blank line: + state.phrase << ""; + syntax_highlight(first_, last_, state, source_mode, block); + state.phrase << "\n"; + + boost::swap(state.current_file, saved_file); + + if (qbk_version_n >= 107u) state.phrase << state.end_callouts(); + + if (!inline_code) { + state.out << state.phrase.str(); + state.phrase.clear(); + } + } + else { + parse_iterator first_(code_value.begin()); + parse_iterator last_(code_value.end()); + + state.phrase << ""; + syntax_highlight(first_, last_, state, source_mode, block); + state.phrase << ""; + } + } + + void plain_char_action::operator()(char ch) const + { + write_anchors(state, state.phrase); + + detail::print_char(ch, state.phrase.get()); + } + + void plain_char_action::operator()( + parse_iterator first, parse_iterator last) const + { + write_anchors(state, state.phrase); + + while (first != last) + detail::print_char(*first++, state.phrase.get()); + } + + void escape_unicode_action::operator()( + parse_iterator first, parse_iterator last) const + { + write_anchors(state, state.phrase); + + while (first != last && *first == '0') + ++first; + + // Just ignore \u0000 + // Maybe I should issue a warning? + if (first == last) return; + + std::string hex_digits(first, last); + + if (hex_digits.size() == 2 && *first > '0' && *first <= '7') { + using namespace std; + detail::print_char( + (char)strtol(hex_digits.c_str(), 0, 16), state.phrase.get()); + } + else { + state.phrase << "&#x" << hex_digits << ";"; + } + } + + void write_plain_text(std::ostream& out, value const& v) + { + if (v.is_encoded()) { + detail::print_string(v.get_encoded(), out); + } + else { + quickbook::string_view value = v.get_quickbook(); + for (string_iterator first = value.begin(), last = value.end(); + first != last; ++first) { + if (*first == '\\' && ++first == last) break; + detail::print_char(*first, out); + } + } + } + + void image_action(quickbook::state& state, value image) + { + write_anchors(state, state.phrase); + + // Note: attributes are never encoded as boostbook, if they're + // encoded, it's just things like escapes. + typedef std::map attribute_map; + attribute_map attributes; + + value_consumer values = image; + attributes["fileref"] = values.consume(); + + QUICKBOOK_FOR (value pair_, values) { + value_consumer pair = pair_; + value name = pair.consume(); + value value = pair.consume(); + std::string name_str( + name.get_quickbook().begin(), name.get_quickbook().end()); + pair.finish(); + if (!attributes.insert(std::make_pair(name_str, value)).second) { + detail::outwarn(name.get_file(), name.get_position()) + << "Duplicate image attribute: " << name.get_quickbook() + << std::endl; + } + } + + values.finish(); + + // Find the file basename and extension. + // + // Not using Boost.Filesystem because I want to stay in UTF-8. + // Need to think about uri encoding. + + std::string fileref = + attributes["fileref"].is_encoded() + ? attributes["fileref"].get_encoded() + : attributes["fileref"].get_quickbook().to_s(); + + // Check for windows paths, then convert. + // A bit crude, but there you go. + + if (fileref.find('\\') != std::string::npos) { + (qbk_version_n >= 106u ? detail::outerr( + attributes["fileref"].get_file(), + attributes["fileref"].get_position()) + : detail::outwarn( + attributes["fileref"].get_file(), + attributes["fileref"].get_position())) + << "Image path isn't portable: '" << fileref << "'" + << std::endl; + if (qbk_version_n >= 106u) ++state.error_count; + } + + boost::replace(fileref, '\\', '/'); + + // Find the file basename and extension. + // + // Not using Boost.Filesystem because I want to stay in UTF-8. + // Need to think about uri encoding. + + std::string::size_type pos; + std::string stem, extension; + + pos = fileref.rfind('/'); + stem = pos == std::string::npos ? fileref : fileref.substr(pos + 1); + + pos = stem.rfind('.'); + if (pos != std::string::npos) { + extension = stem.substr(pos + 1); + stem = stem.substr(0, pos); + } + + // Extract the alt tag, to use as a text description. + // Or if there isn't one, use the stem of the file name. + + attribute_map::iterator alt_pos = attributes.find("alt"); + quickbook::value alt_text = alt_pos != attributes.end() + ? alt_pos->second + : qbk_version_n < 106u + ? encoded_value(stem) + : quickbook::value(); + attributes.erase("alt"); + + if (extension == "svg") { + // + // SVG's need special handling: + // + // 1) We must set the "format" attribute, otherwise + // HTML generation produces code that will not display + // the image at all. + // 2) We need to set the "contentwidth" and "contentdepth" + // attributes, otherwise the image will be displayed inside + // a tiny box with scrollbars (Firefox), or else cropped to + // fit in a tiny box (IE7). + // + + attributes.insert( + attribute_map::value_type("format", encoded_value("SVG"))); + + // + // Image paths are relative to the html subdirectory: + // + fs::path img = detail::generic_to_path(fileref); + if (!img.has_root_directory()) + img = quickbook::image_location / img; // relative path + + // + // Now load the SVG file: + // + std::string svg_text; + if (state.dependencies.add_dependency(img)) { + fs::ifstream fs(img); + std::stringstream buffer; + buffer << fs.rdbuf(); + svg_text = buffer.str(); + } + + // + // Extract the svg header from the file: + // + std::string::size_type a, b; + a = svg_text.find("', a); + svg_text = + (a == std::string::npos) ? "" : svg_text.substr(a, b - a); + // + // Now locate the "width" and "height" attributes + // and borrow their values: + // + a = svg_text.find("width"); + a = svg_text.find('=', a); + a = svg_text.find('\"', a); + b = svg_text.find('\"', a + 1); + if (a != std::string::npos) { + attributes.insert(std::make_pair( + "contentwidth", encoded_value(std::string( + boost::next(svg_text.begin(), a + 1), + boost::next(svg_text.begin(), b))))); + } + a = svg_text.find("height"); + a = svg_text.find('=', a); + a = svg_text.find('\"', a); + b = svg_text.find('\"', a + 1); + if (a != std::string::npos) { + attributes.insert(std::make_pair( + "contentdepth", encoded_value(std::string( + boost::next(svg_text.begin(), a + 1), + boost::next(svg_text.begin(), b))))); + } + } + + state.phrase << ""; + + state.phrase << ""; + + // Add a textobject containing the alt tag from earlier. + // This will be used for the alt tag in html. + if (alt_text.check()) { + state.phrase << ""; + write_plain_text(state.phrase.get(), alt_text); + state.phrase << ""; + } + + state.phrase << ""; + } + + void macro_definition_action( + quickbook::state& state, quickbook::value macro_definition) + { + value_consumer values = macro_definition; + std::string macro_id = values.consume().get_quickbook().to_s(); + value phrase_value = values.optional_consume(); + std::string phrase; + if (phrase_value.check()) phrase = phrase_value.get_encoded(); + values.finish(); + + std::string* existing_macro = + boost::spirit::classic::find(state.macro, macro_id.c_str()); + quickbook::ignore_variable(&existing_macro); + + if (existing_macro) { + if (qbk_version_n < 106) return; + + // Do this if you're using spirit's TST. + // + // *existing_macro = phrase; + // return; + } + + state.macro.add(macro_id.begin(), macro_id.end(), phrase); + } + + void template_body_action( + quickbook::state& state, quickbook::value template_definition) + { + value_consumer values = template_definition; + std::string identifier = values.consume().get_quickbook().to_s(); + + std::vector template_values; + QUICKBOOK_FOR (value const& p, values.consume()) { + template_values.push_back(p.get_quickbook().to_s()); + } + + BOOST_ASSERT( + values.check(template_tags::block) || + values.check(template_tags::phrase)); + value body = values.consume(); + BOOST_ASSERT(!values.check()); + + if (!state.templates.add(template_symbol( + identifier, template_values, body, + &state.templates.top_scope()))) { + detail::outwarn(body.get_file(), body.get_position()) + << "Template Redefinition: " << identifier << std::endl; + ++state.error_count; + } + } + + namespace + { + string_iterator find_first_seperator( + string_iterator begin, string_iterator end) + { + if (qbk_version_n < 105) { + for (; begin != end; ++begin) { + switch (*begin) { + case ' ': + case '\t': + case '\n': + case '\r': + return begin; + default: + break; + } + } + } + else { + unsigned int depth = 0; + + for (; begin != end; ++begin) { + switch (*begin) { + case '[': + ++depth; + break; + case '\\': + if (++begin == end) return begin; + break; + case ']': + if (depth > 0) --depth; + break; + case ' ': + case '\t': + case '\n': + case '\r': + if (depth == 0) return begin; + default: + break; + } + } + } + + return begin; + } + + std::pair find_seperator( + string_iterator begin, string_iterator end) + { + string_iterator first = begin = find_first_seperator(begin, end); + + for (; begin != end; ++begin) { + switch (*begin) { + case ' ': + case '\t': + case '\n': + case '\r': + break; + default: + return std::make_pair(first, begin); + } + } + + return std::make_pair(first, begin); + } + + void break_arguments( + std::vector& args, + std::vector const& params, + fs::path const& /* filename */ + ) + { + // Quickbook 1.4-: If there aren't enough parameters seperated by + // '..' then seperate the last parameter using + // whitespace. + // Quickbook 1.5+: If '..' isn't used to seperate the parameters + // then use whitespace to separate them + // (2 = template name + argument). + + if (qbk_version_n < 105 ? args.size() : args.size() == 1) { + + while (args.size() < params.size()) { + // Try to break the last argument at the first space found + // and push it into the back of args. Do this + // recursively until we have all the expected number of + // arguments, or if there are no more spaces left. + + value last_arg = args.back(); + string_iterator begin = last_arg.get_quickbook().begin(); + string_iterator end = last_arg.get_quickbook().end(); + + std::pair pos = + find_seperator(begin, end); + if (pos.second == end) break; + value new_arg(qbk_value( + last_arg.get_file(), pos.second, end, + template_tags::phrase)); + + args.back() = qbk_value( + last_arg.get_file(), begin, pos.first, + last_arg.get_tag()); + args.push_back(new_arg); + } + } + } + + std::pair::const_iterator> get_arguments( + std::vector const& args, + std::vector const& params, + template_scope const& scope, + string_iterator first, + quickbook::state& state) + { + std::vector::const_iterator arg = args.begin(); + std::vector::const_iterator tpl = params.begin(); + std::vector empty_params; + + // Store each of the argument passed in as local templates: + while (arg != args.end()) { + if (!state.templates.add( + template_symbol(*tpl, empty_params, *arg, &scope))) { + detail::outerr(state.current_file, first) + << "Duplicate Symbol Found" << std::endl; + ++state.error_count; + return std::make_pair(false, tpl); + } + ++arg; + ++tpl; + } + return std::make_pair(true, tpl); + } + + bool parse_template( + value const& content, + quickbook::state& state, + bool is_attribute_template) + { + file_ptr saved_current_file = state.current_file; + + state.current_file = content.get_file(); + quickbook::string_view source = content.get_quickbook(); + + parse_iterator first(source.begin()); + parse_iterator last(source.end()); + + bool r = cl::parse( + first, last, + is_attribute_template + ? state.grammar().attribute_template_body + : content.get_tag() == template_tags::phrase + ? state.grammar().inline_phrase + : state.grammar().block_start) + .full; + + boost::swap(state.current_file, saved_current_file); + + return r; + } + } + + void call_template( + quickbook::state& state, + template_symbol const* symbol, + std::vector const& args, + string_iterator first, + bool is_attribute_template = false) + { + bool is_block = symbol->content.get_tag() != template_tags::phrase; + assert(!(is_attribute_template && is_block)); + + quickbook::paragraph_action paragraph_action(state); + + // Finish off any existing paragraphs. + if (is_block) paragraph_action(); + + // If this template contains already encoded text, then just + // write it out, without going through any of the rigamarole. + + if (symbol->content.is_encoded()) { + (is_block ? state.out : state.phrase) + << symbol->content.get_encoded(); + return; + } + + // The template arguments should have the scope that the template was + // called from, not the template's own scope. + // + // Note that for quickbook 1.4- this value is just ignored when the + // arguments are expanded. + template_scope const& call_scope = state.templates.top_scope(); + + { + state_save save(state, state_save::scope_callables); + std::string save_block; + std::string save_phrase; + + state.templates.start_template(symbol); + + qbk_version_n = symbol->content.get_file()->version(); + + ++state.template_depth; + if (state.template_depth > state.max_template_depth) { + detail::outerr(state.current_file, first) + << "Infinite loop detected" << std::endl; + ++state.error_count; + return; + } + + // Store the current section level so that we can ensure that + // [section] and [endsect] tags in the template are balanced. + state.min_section_level = state.document.section_level(); + + /////////////////////////////////// + // Prepare the arguments as local templates + bool get_arg_result; + std::vector::const_iterator tpl; + boost::tie(get_arg_result, tpl) = + get_arguments(args, symbol->params, call_scope, first, state); + + if (!get_arg_result) { + return; + } + + /////////////////////////////////// + // parse the template body: + + if (symbol->content.get_file()->version() < 107u) { + state.out.swap(save_block); + state.phrase.swap(save_phrase); + } + + if (!parse_template( + symbol->content, state, is_attribute_template)) { + detail::outerr(state.current_file, first) + << "Expanding " << (is_block ? "block" : "phrase") + << " template: " << symbol->identifier << "\n\n" + << "------------------begin------------------\n" + << symbol->content.get_quickbook() + << "------------------end--------------------\n" + << std::endl; + ++state.error_count; + return; + } + + if (state.document.section_level() != state.min_section_level) { + detail::outerr(state.current_file, first) + << "Mismatched sections in template " << symbol->identifier + << std::endl; + ++state.error_count; + return; + } + + if (symbol->content.get_file()->version() < 107u) { + state.out.swap(save_block); + state.phrase.swap(save_phrase); + + if (is_block || !save_block.empty()) { + paragraph_action(); + state.out << save_block; + state.phrase << save_phrase; + paragraph_action(); + } + else { + state.phrase << save_phrase; + } + } + else { + if (is_block) paragraph_action(); + } + } + } + + void call_code_snippet( + quickbook::state& state, + template_symbol const* symbol, + string_iterator first) + { + assert(symbol->params.size() == 0); + std::vector args; + + // Create a fake symbol for call_template + template_symbol t( + symbol->identifier, symbol->params, symbol->content, + symbol->lexical_parent); + + state.start_callouts(); + call_template(state, &t, args, first); + state.out << state.end_callouts(); + } + + void do_template_action( + quickbook::state& state, value template_list, string_iterator first) + { + bool const is_attribute_template = + template_list.get_tag() == template_tags::attribute_template; + + // Get the arguments + value_consumer values = template_list; + + bool template_escape = values.check(template_tags::escape); + if (template_escape) values.consume(); + + std::string identifier = + values.consume(template_tags::identifier).get_quickbook().to_s(); + + std::vector args; + + QUICKBOOK_FOR (value arg, values) { + args.push_back(arg); + } + + values.finish(); + + template_symbol const* symbol = state.templates.find(identifier); + BOOST_ASSERT(symbol); + + // Deal with escaped templates. + + if (template_escape) { + if (!args.empty()) { + detail::outerr(state.current_file, first) + << "Arguments for escaped template." << std::endl; + ++state.error_count; + } + + if (symbol->content.is_encoded()) { + state.phrase << symbol->content.get_encoded(); + } + else { + state.phrase << symbol->content.get_quickbook(); + + /* + + This would surround the escaped template in escape + comments to indicate to the post-processor that it + isn't quickbook generated markup. But I'm not sure if + it would work. + + quickbook::detail::markup escape_markup + = detail::get_markup(phrase_tags::escape); + + state.phrase + << escape_markup.pre + << symbol->content.get_quickbook() + << escape_markup.post + ; + */ + } + + return; + } + + /////////////////////////////////// + // Check that attribute templates are phrase templates + + if (is_attribute_template && + symbol->content.get_tag() != template_tags::phrase) { + detail::outerr(state.current_file, first) + << "Only phrase templates can be used in attribute values." + << std::endl; + + ++state.error_count; + return; + } + + /////////////////////////////////// + // Initialise the arguments + + switch (symbol->content.get_tag()) { + case template_tags::block: + case template_tags::phrase: + // Break the arguments for a template + + break_arguments(args, symbol->params, state.current_file->path); + + if (args.size() != symbol->params.size()) { + detail::outerr(state.current_file, first) + << "Invalid number of arguments passed. Expecting: " + << symbol->params.size() + << " argument(s), got: " << args.size() + << " argument(s) instead." << std::endl; + + ++state.error_count; + return; + } + + call_template(state, symbol, args, first, is_attribute_template); + break; + + case template_tags::snippet: + + if (!args.empty()) { + detail::outerr(state.current_file, first) + << "Arguments for code snippet." << std::endl; + ++state.error_count; + + args.clear(); + } + + call_code_snippet(state, symbol, first); + break; + + default: + assert(0); + } + } + + void link_action(quickbook::state& state, value link) + { + write_anchors(state, state.phrase); + + detail::markup markup = detail::get_markup(link.get_tag()); + + value_consumer values = link; + value dst_value = values.consume(); + value content = values.consume(); + values.finish(); + + std::string dst; + + if (link.get_tag() == phrase_tags::link) { + dst = validate_id(state, dst_value); + } + else { + dst = get_attribute_value(state, dst_value); + + if (link.get_tag() == phrase_tags::url) { + dst = detail::partially_escape_uri(dst); + } + } + + state.phrase << markup.pre; + detail::print_string(dst, state.phrase.get()); + state.phrase << "\">"; + + if (content.empty()) + detail::print_string(dst, state.phrase.get()); + else + state.phrase << content.get_encoded(); + + state.phrase << markup.post; + } + + void variable_list_action(quickbook::state& state, value variable_list) + { + write_anchors(state, state.out); + + value_consumer values = variable_list; + std::string title = + values.consume(table_tags::title).get_quickbook().to_s(); + + state.out << "\n"; + + state.out << ""; + detail::print_string(title, state.out.get()); + state.out << "\n"; + + QUICKBOOK_FOR (value_consumer entry, values) { + state.out << ""; + + if (entry.check()) { + state.out << ""; + state.out << entry.consume().get_encoded(); + state.out << ""; + } + + if (entry.check()) { + state.out << ""; + QUICKBOOK_FOR (value phrase, entry) + state.out << phrase.get_encoded(); + state.out << ""; + } + + state.out << "\n"; + } + + state.out << "\n"; + + values.finish(); + } + + void table_action(quickbook::state& state, value table) + { + write_anchors(state, state.out); + + value_consumer values = table; + + std::string element_id; + if (values.check(general_tags::element_id)) { + element_id = validate_id(state, values.consume()); + } + + value title = values.consume(table_tags::title); + bool has_title = !title.empty(); + + std::string table_id; + + if (!element_id.empty()) { + table_id = + state.document.add_id(element_id, id_category::explicit_id); + } + else if (has_title) { + if (state.document.compatibility_version() >= 105) { + table_id = state.document.add_id( + detail::make_identifier(title.get_quickbook()), + id_category::generated); + } + else { + table_id = state.document.add_id("t", id_category::numbered); + } + } + + // Emulating the old behaviour which used the width of the final + // row for span_count. + int row_count = 0; + int span_count = 0; + + value_consumer lookahead = values; + QUICKBOOK_FOR (value row, lookahead) { + ++row_count; + span_count = boost::distance(row); + } + lookahead.finish(); + + if (has_title) { + state.out << "\n"; + state.out << ""; + if (qbk_version_n < 106u) { + detail::print_string(title.get_quickbook(), state.out.get()); + } + else { + state.out << title.get_encoded(); + } + state.out << ""; + } + else { + state.out << "\n"; + } + + state.out << "\n"; + + if (row_count > 1) { + state.out << "" + << ""; + QUICKBOOK_FOR (value cell, values.consume()) { + state.out << "" << cell.get_encoded() << ""; + } + state.out << "\n" + << "\n"; + } + + state.out << "\n"; + + QUICKBOOK_FOR (value row, values) { + state.out << ""; + QUICKBOOK_FOR (value cell, row) { + state.out << "" << cell.get_encoded() << ""; + } + state.out << "\n"; + } + + values.finish(); + + state.out << "\n" + << "\n"; + + if (has_title) { + state.out << "
    \n"; + } + else { + state.out << "\n"; + } + } + + void begin_section_action(quickbook::state& state, value begin_section_list) + { + value_consumer values = begin_section_list; + + value element_id = values.optional_consume(general_tags::element_id); + value content = values.consume(); + values.finish(); + + std::string full_id = state.document.begin_section( + element_id, + element_id.empty() + ? detail::make_identifier(content.get_quickbook()) + : validate_id(state, element_id), + element_id.empty() ? id_category::generated_section + : id_category::explicit_section_id, + state.current_source_mode()); + + state.out << "\n
    \n"; + + std::string title = content.get_encoded(); + + if (!title.empty()) { + state.out << ""; + + write_anchors(state, state.out); + + if (self_linked_headers && + state.document.compatibility_version() >= 103) { + state.out << quickbook::detail::linkify(title, full_id); + } + else { + state.out << title; + } + + state.out << "\n"; + } + } + + void end_section_action( + quickbook::state& state, value end_section_list, string_iterator first) + { + value_consumer values = end_section_list; + value element_id = values.optional_consume(general_tags::element_id); + values.finish(); + + write_anchors(state, state.out); + + if (state.document.section_level() <= state.min_section_level) { + file_position const pos = state.current_file->position_of(first); + + detail::outerr(state.current_file->path, pos.line) + << "Mismatched [endsect] near column " << pos.column << ".\n"; + ++state.error_count; + + return; + } + + if (!element_id.empty() && + !(element_id == state.document.explicit_id())) { + file_position const pos = state.current_file->position_of(first); + value section_element_id = state.document.explicit_id(); + + if (section_element_id.empty()) { + detail::outerr(state.current_file->path, pos.line) + << "Endsect has unexpected id '" + << element_id.get_quickbook() + << "' in section with no explicit id, near column " + << pos.column << ".\n"; + } + else { + detail::outerr(state.current_file->path, pos.line) + << "Endsect has incorrect id '" + << element_id.get_quickbook() << "', expected '" + << state.document.explicit_id().get_quickbook() + << "', near column " << pos.column << ".\n"; + } + ++state.error_count; + } + + state.out << "
    "; + state.document.end_section(); + } + + void element_id_warning_action::operator()( + parse_iterator first, parse_iterator) const + { + detail::outwarn(state.current_file, first.base()) << "Empty id.\n"; + } + + void xinclude_action(quickbook::state& state, value xinclude) + { + write_anchors(state, state.out); + + value_consumer values = xinclude; + path_parameter x = check_xinclude_path(values.consume(), state); + values.finish(); + + if (x.type == path_parameter::path) { + quickbook_path path = resolve_xinclude_path(x.value, state, true); + + state.out << "\n\n"; + } + } + + void load_quickbook( + quickbook::state& state, + quickbook_path const& path, + value::tag_type load_type, + value const& include_doc_id = value()) + { + assert( + load_type == block_tags::include || + load_type == block_tags::import); + + // Check this before qbk_version_n gets changed by the inner file. + bool keep_inner_source_mode = (qbk_version_n < 106); + + { + // When importing, state doesn't scope templates and macros so that + // they're added to the existing scope. It might be better to add + // them to a new scope then explicitly import them into the + // existing scope. + // + // For old versions of quickbook, templates aren't scoped by the + // file. + state_save save( + state, + load_type == block_tags::import + ? state_save::scope_output + : qbk_version_n >= 106u ? state_save::scope_callables + : state_save::scope_macros); + + state.current_file = load(path.file_path); // Throws load_error + state.current_path = path; + state.imported = (load_type == block_tags::import); + + // update the __FILENAME__ macro + state.update_filename_macro(); + + // parse the file + quickbook::parse_file(state, include_doc_id, true); + + // Don't restore source_mode on older versions. + if (keep_inner_source_mode) save.source_mode = state.source_mode; + } + + // restore the __FILENAME__ macro + state.update_filename_macro(); + } + + void load_source_file( + quickbook::state& state, + quickbook_path const& path, + value::tag_type load_type, + string_iterator first, + value const& /* include_doc_id */ = value()) + { + assert( + load_type == block_tags::include || + load_type == block_tags::import); + + std::string ext = path.file_path.extension().generic_string(); + std::vector storage; + // Throws load_error + state.error_count += + load_snippets(path.file_path, storage, ext, load_type); + + if (load_type == block_tags::include) { + state.templates.push(); + } + + QUICKBOOK_FOR (template_symbol& ts, storage) { + std::string tname = ts.identifier; + if (tname != "!") { + ts.lexical_parent = &state.templates.top_scope(); + if (!state.templates.add(ts)) { + detail::outerr( + ts.content.get_file(), ts.content.get_position()) + << "Template Redefinition: " << tname << std::endl; + ++state.error_count; + } + } + } + + if (load_type == block_tags::include) { + QUICKBOOK_FOR (template_symbol& ts, storage) { + std::string tname = ts.identifier; + + if (tname == "!") { + ts.lexical_parent = &state.templates.top_scope(); + call_code_snippet(state, &ts, first); + } + } + + state.templates.pop(); + } + } + + void include_action( + quickbook::state& state, value include, string_iterator first) + { + write_anchors(state, state.out); + + value_consumer values = include; + value include_doc_id = + values.optional_consume(general_tags::include_id); + path_parameter parameter = check_path(values.consume(), state); + values.finish(); + + std::set search = + include_search(parameter, state, first); + QUICKBOOK_FOR (quickbook_path const& path, search) { + try { + if (qbk_version_n >= 106) { + if (state.imported && + include.get_tag() == block_tags::include) + return; + + std::string ext = + path.file_path.extension().generic_string(); + + if (ext == ".qbk" || ext == ".quickbook") { + load_quickbook( + state, path, include.get_tag(), include_doc_id); + } + else { + load_source_file( + state, path, include.get_tag(), first, + include_doc_id); + } + } + else { + if (include.get_tag() == block_tags::include) { + load_quickbook( + state, path, include.get_tag(), include_doc_id); + } + else { + load_source_file( + state, path, include.get_tag(), first, + include_doc_id); + } + } + } catch (load_error& e) { + ++state.error_count; + + detail::outerr(state.current_file, first) + << "Loading file " << path.file_path << ": " << e.what() + << std::endl; + } + } + } + + bool to_value_scoped_action::start(value::tag_type t) + { + state.push_output(); + state.anchors.swap(saved_anchors); + tag = t; + + return true; + } + + void to_value_scoped_action::success( + parse_iterator first, parse_iterator last) + { + std::string value; + + if (!state.out.str().empty()) { + paragraph_action para(state); + para(); // For paragraphs before the template call. + write_anchors(state, state.out); + state.out.swap(value); + } + else { + write_anchors(state, state.phrase); + state.phrase.swap(value); + } + + state.values.builder.insert(encoded_qbk_value( + state.current_file, first.base(), last.base(), value, tag)); + } + + void to_value_scoped_action::cleanup() + { + state.pop_output(); + state.anchors.swap(saved_anchors); + } +} diff --git a/src/boost/tools/quickbook/src/actions.hpp b/src/boost/tools/quickbook/src/actions.hpp new file mode 100644 index 000000000..7039094dd --- /dev/null +++ b/src/boost/tools/quickbook/src/actions.hpp @@ -0,0 +1,379 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP + +#include +#include +#include +#include "fwd.hpp" +#include "iterator.hpp" +#include "scoped.hpp" +#include "utils.hpp" +#include "values.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + // Match if quickbook version is within range + struct quickbook_range : cl::parser + { + explicit quickbook_range(unsigned lower_, unsigned upper_) + : lower(lower_), upper(upper_) + { + } + + bool in_range() const; + + template + typename cl::parser_result::type parse( + ScannerT const& scan) const + { + return in_range() ? scan.empty_match() : scan.no_match(); + } + + unsigned lower, upper; + }; + + inline quickbook_range qbk_ver(unsigned lower, unsigned upper = 999u) + { + return quickbook_range(lower, upper); + } + + // Match if in strict mode. + struct quickbook_strict : cl::parser + { + explicit quickbook_strict( + quickbook::state& state_, bool positive_ = true) + : state(state_), positive(positive_) + { + } + + bool is_strict_checking() const; + + template + typename cl::parser_result::type parse( + ScannerT const& scan) const + { + return is_strict_checking() == positive ? scan.empty_match() + : scan.no_match(); + } + + quickbook_strict operator~() const + { + return quickbook_strict(state, !positive); + } + + quickbook::state& state; + bool positive; + }; + + inline quickbook_strict qbk_strict( + quickbook::state& state, unsigned lower = 999u) + { + return quickbook_strict(state, lower); + } + + // Throws load_error + int load_snippets( + fs::path const& file, + std::vector& storage, + std::string const& extension, + value::tag_type load_type); + + struct error_message_action + { + // Prints an error message to std::cerr + + explicit error_message_action( + quickbook::state& state_, std::string const& message_) + : state(state_), message(message_) + { + } + + void operator()(parse_iterator, parse_iterator) const; + + quickbook::state& state; + std::string message; + }; + + struct error_action + { + // Prints an error message to std::cerr + + explicit error_action(quickbook::state& state_) : state(state_) {} + + void operator()(parse_iterator first, parse_iterator last) const; + + error_message_action operator()(std::string const& message) + { + return error_message_action(state, message); + } + + quickbook::state& state; + }; + + struct element_action + { + explicit element_action(quickbook::state& state_) : state(state_) {} + + void operator()(parse_iterator, parse_iterator) const; + + quickbook::state& state; + }; + + struct paragraph_action + { + // implicit paragraphs + // doesn't output the paragraph if it's only whitespace. + + explicit paragraph_action(quickbook::state& state_) : state(state_) {} + + void operator()() const; + void operator()(parse_iterator, parse_iterator) const { (*this)(); } + + quickbook::state& state; + }; + + struct explicit_list_action + { + // implicit paragraphs + // doesn't output the paragraph if it's only whitespace. + + explicit explicit_list_action(quickbook::state& state_) : state(state_) + { + } + + void operator()() const; + void operator()(parse_iterator, parse_iterator) const { (*this)(); } + + quickbook::state& state; + }; + + struct phrase_end_action + { + explicit phrase_end_action(quickbook::state& state_) : state(state_) {} + + void operator()() const; + void operator()(parse_iterator, parse_iterator) const { (*this)(); } + + quickbook::state& state; + }; + + struct simple_phrase_action + { + // Handles simple text formats + + explicit simple_phrase_action(quickbook::state& state_) : state(state_) + { + } + + void operator()(char) const; + + quickbook::state& state; + }; + + struct cond_phrase_push : scoped_action_base + { + cond_phrase_push(quickbook::state& x) : state(x) {} + + bool start(); + void cleanup(); + + quickbook::state& state; + bool saved_conditional; + std::vector anchors; + }; + + struct do_macro_action + { + // Handles macro substitutions + + explicit do_macro_action(quickbook::state& state_) : state(state_) {} + + void operator()(std::string const& str) const; + quickbook::state& state; + }; + + struct raw_char_action + { + // Prints a space + + explicit raw_char_action(quickbook::state& state_) : state(state_) {} + + void operator()(char ch) const; + void operator()(parse_iterator first, parse_iterator last) const; + + quickbook::state& state; + }; + + struct plain_char_action + { + // Prints a single plain char. + // Converts '<' to "<"... etc See utils.hpp + + explicit plain_char_action(quickbook::state& state_) : state(state_) {} + + void operator()(char ch) const; + void operator()(parse_iterator first, parse_iterator last) const; + + quickbook::state& state; + }; + + struct escape_unicode_action + { + explicit escape_unicode_action(quickbook::state& state_) : state(state_) + { + } + + void operator()(parse_iterator first, parse_iterator last) const; + + quickbook::state& state; + }; + + struct break_action + { + explicit break_action(quickbook::state& state_) : state(state_) {} + + void operator()(parse_iterator f, parse_iterator) const; + + quickbook::state& state; + }; + + struct element_id_warning_action + { + explicit element_id_warning_action(quickbook::state& state_) + : state(state_) + { + } + + void operator()(parse_iterator first, parse_iterator last) const; + + quickbook::state& state; + }; + + // Returns the doc_type, or an empty string if there isn't one. + std::string pre( + quickbook::state& state, + parse_iterator pos, + value include_doc_id, + bool nested_file); + void post(quickbook::state& state, std::string const& doc_type); + + struct to_value_scoped_action : scoped_action_base + { + to_value_scoped_action(quickbook::state& state_) : state(state_) {} + + bool start(value::tag_type = value::default_tag); + void success(parse_iterator, parse_iterator); + void cleanup(); + + quickbook::state& state; + std::vector saved_anchors; + value::tag_type tag; + }; + + // member_action + // + // Action for calling a member function taking two parse iterators. + + template struct member_action + { + typedef void (T::*member_function)(parse_iterator, parse_iterator); + + T& l; + member_function mf; + + explicit member_action(T& l_, member_function mf_) : l(l_), mf(mf_) {} + + void operator()(parse_iterator first, parse_iterator last) const + { + (l.*mf)(first, last); + } + }; + + // member_action1 + // + // Action for calling a member function taking two parse iterators and a + // value. + + template struct member_action1 + { + typedef void (T::*member_function)( + parse_iterator, parse_iterator, Arg1); + + T& l; + member_function mf; + + explicit member_action1(T& l_, member_function mf_) : l(l_), mf(mf_) {} + + struct impl + { + member_action1 a; + Arg1 value; + + explicit impl(member_action1& a_, Arg1 value_) + : a(a_), value(value_) + { + } + + void operator()(parse_iterator first, parse_iterator last) const + { + (a.l.*a.mf)(first, last, value); + } + }; + + impl operator()(Arg1 a1) { return impl(*this, a1); } + }; + + // member_action_value + // + // Action for calling a unary member function. + + template struct member_action_value + { + typedef void (T::*member_function)(Value); + + T& l; + member_function mf; + + explicit member_action_value(T& l_, member_function mf_) + : l(l_), mf(mf_) + { + } + + void operator()(Value v) const { (l.*mf)(v); } + }; + + // member_action_value + // + // Action for calling a unary member function with a fixed value. + + template struct member_action_fixed_value + { + typedef void (T::*member_function)(Value); + + T& l; + member_function mf; + Value v; + + explicit member_action_fixed_value(T& l_, member_function mf_, Value v_) + : l(l_), mf(mf_), v(v_) + { + } + + void operator()() const { (l.*mf)(v); } + + void operator()(parse_iterator, parse_iterator) const { (l.*mf)(v); } + }; +} + +#endif // BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP diff --git a/src/boost/tools/quickbook/src/bb2html.cpp b/src/boost/tools/quickbook/src/bb2html.cpp new file mode 100644 index 000000000..44c8e7558 --- /dev/null +++ b/src/boost/tools/quickbook/src/bb2html.cpp @@ -0,0 +1,1626 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "bb2html.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "boostbook_chunker.hpp" +#include "files.hpp" +#include "for.hpp" +#include "html_printer.hpp" +#include "path.hpp" +#include "post_process.hpp" +#include "stream.hpp" +#include "utils.hpp" +#include "xml_parse.hpp" + +namespace quickbook +{ + namespace fs = boost::filesystem; +} + +namespace quickbook +{ + namespace detail + { + struct html_state; + struct html_gen; + struct docinfo_gen; + struct id_info; + + typedef boost::unordered_map ids_type; + + typedef void (*node_parser)(html_gen&, xml_element*); + typedef boost::unordered_map + node_parsers_type; + static node_parsers_type node_parsers; + + struct docinfo_node_parser + { + typedef void (*parser_type)(docinfo_gen&, xml_element*); + enum docinfo_node_category + { + docinfo_general = 0, + docinfo_author + }; + + docinfo_node_category category; + parser_type parser; + }; + typedef boost:: + unordered_map + docinfo_node_pasers_type; + static docinfo_node_pasers_type docinfo_node_parsers; + + void generate_chunked_documentation( + chunk*, ids_type const&, html_options const&); + void generate_chunks(html_state&, chunk*); + void generate_chunk_navigation(html_gen&, chunk*); + void generate_inline_chunks(html_gen&, chunk*); + void generate_chunk_body(html_gen&, chunk*); + void generate_toc_html(html_gen& gen, chunk*); + void generate_toc_subtree( + html_gen& gen, chunk* page, chunk*, unsigned section_depth); + void generate_toc_item_html(html_gen&, xml_element*); + void generate_footnotes_html(html_gen&); + void number_callouts(html_gen& gen, xml_element* x); + void number_calloutlist_children( + html_gen& gen, unsigned& count, xml_element* x); + void generate_docinfo_html(html_gen&, xml_element*); + void generate_tree_html(html_gen&, xml_element*); + void generate_children_html(html_gen&, xml_element*); + void write_file( + html_state&, std::string const& path, std::string const& content); + std::string get_link_from_path( + html_gen&, quickbook::string_view, quickbook::string_view); + std::string relative_path_or_url(html_gen&, path_or_url const&); + std::string relative_path_from_fs_paths( + fs::path const&, fs::path const&); + std::string relative_path_from_url_paths( + quickbook::string_view, quickbook::string_view); + + ids_type get_id_paths(chunk* chunk); + void get_id_paths_impl(ids_type&, chunk*); + void get_id_paths_impl2(ids_type&, chunk*, xml_element*); + + void tag(html_gen& gen, quickbook::string_view name, xml_element* x); + void tag_start_with_id( + html_gen& gen, quickbook::string_view name, xml_element* x); + void open_tag_with_id( + html_gen& gen, quickbook::string_view name, xml_element* x); + void tag_self_close( + html_gen& gen, quickbook::string_view name, xml_element* x); + void graphics_tag( + html_gen& gen, + quickbook::string_view path, + quickbook::string_view fallback); + + struct id_info + { + private: + chunk* chunk_; + xml_element* element_; + + public: + explicit id_info(chunk* c, xml_element* x) : chunk_(c), element_(x) + { + assert(c); + assert(!x || x->has_attribute("id")); + } + + std::string path() const + { + std::string p = chunk_->path_; + + if (element_) { + p += '#'; + p += element_->get_attribute("id"); + } + else if (chunk_->inline_) { + p += '#'; + p += chunk_->id_; + } + return p; + } + }; + + struct html_state + { + ids_type const& ids; + html_options const& options; + unsigned int error_count; + + explicit html_state( + ids_type const& ids_, html_options const& options_) + : ids(ids_), options(options_), error_count(0) + { + } + }; + + struct callout_data + { + quickbook::string_view link_id; + unsigned number; + }; + + struct chunk_state + { + std::vector footnotes; + boost::unordered_map callout_numbers; + boost::unordered_set fragment_ids; + }; + + struct html_gen + { + html_printer printer; + html_state& state; + chunk_state& chunk; + string_view path; + bool in_toc; + + explicit html_gen( + html_state& state_, chunk_state& chunk_, string_view p) + : printer() + , state(state_) + , chunk(chunk_) + , path(p) + , in_toc(false) + { + } + + html_gen(html_gen const& x) + : printer() + , state(x.state) + , chunk(x.chunk) + , path(x.path) + , in_toc(false) + { + } + }; + + struct docinfo_gen + { + html_gen& gen; + std::vector copyrights; + std::vector pubdates; + std::vector legalnotices; + std::vector authors; + std::vector editors; + std::vector collabs; + + docinfo_gen(html_gen& gen_) : gen(gen_) {} + }; + + int boostbook_to_html( + quickbook::string_view source, html_options const& options) + { + xml_tree tree; + try { + tree = xml_parse(source); + } catch (quickbook::detail::xml_parse_error e) { + string_view source_view(source); + file_position p = relative_position(source_view.begin(), e.pos); + string_view::iterator line_start = + e.pos - (p.column < 40 ? p.column - 1 : 39); + string_view::iterator line_end = + std::find(e.pos, source_view.end(), '\n'); + if (line_end - e.pos > 80) { + line_end = e.pos + 80; + } + std::string indent; + for (auto i = e.pos - line_start; i; --i) { + indent += ' '; + } + ::quickbook::detail::outerr() + << "converting boostbook at line " << p.line << " char " + << p.column << ": " << e.message << "\n" + << string_view(line_start, line_end - line_start) << "\n" + << indent << "^" + << "\n\n"; + + return 1; + } + + chunk_tree chunked = chunk_document(tree); + // Overwrite paths depending on whether output is chunked or not. + // Really want to do something better, e.g. incorporate many section + // chunks into their parent. + chunked.root()->path_ = + path_to_generic(options.home_path.filename()); + if (options.chunked_output) { + inline_sections(chunked.root(), 0); + + // Create the root directory if necessary for chunked + // documentation. + fs::path parent = options.home_path.parent_path(); + if (!parent.empty() && !fs::exists(parent)) { + fs::create_directory(parent); + } + } + else { + inline_all(chunked.root()); + } + ids_type ids = get_id_paths(chunked.root()); + html_state state(ids, options); + if (chunked.root()) { + generate_chunks(state, chunked.root()); + } + return state.error_count; + } + + void gather_chunk_ids(chunk_state& c_state, xml_element* x) + { + if (!x) { + return; + } + if (x->has_attribute("id")) { + c_state.fragment_ids.emplace(x->get_attribute("id")); + } + for (auto it = x->children(); it; it = it->next()) { + gather_chunk_ids(c_state, it); + } + } + + void gather_chunk_ids(chunk_state& c_state, chunk* x) + { + gather_chunk_ids(c_state, x->contents_.root()); + gather_chunk_ids(c_state, x->title_.root()); + gather_chunk_ids(c_state, x->info_.root()); + + for (chunk* it = x->children(); it && it->inline_; + it = it->next()) { + gather_chunk_ids(c_state, it); + } + } + + string_view generate_id( + chunk_state& c_state, + xml_element* x, + string_view name, + string_view base) + { + std::string result; + result.reserve(base.size() + 2); + result.assign(base.begin(), base.end()); + result += '-'; + // TODO: Share implementation with id_generation.cpp? + for (unsigned count = 1;; ++count) { + auto num = boost::lexical_cast(count); + result.reserve(base.size() + 1 + num.size()); + result.erase(base.size() + 1); + result += num; + if (c_state.fragment_ids.find(result) == + c_state.fragment_ids.end()) { + auto r = x->set_attribute(name, result); + c_state.fragment_ids.emplace(r); + return r; + } + } + } + + void generate_chunks(html_state& state, chunk* x) + { + chunk_state c_state; + gather_chunk_ids(c_state, x); + html_gen gen(state, c_state, x->path_); + gen.printer.html += "\n"; + open_tag(gen.printer, "html"); + open_tag(gen.printer, "head"); + if (state.options.css_path) { + tag_start(gen.printer, "link"); + tag_attribute(gen.printer, "rel", "stylesheet"); + tag_attribute(gen.printer, "type", "text/css"); + tag_attribute( + gen.printer, "href", + relative_path_or_url(gen, state.options.css_path)); + tag_end_self_close(gen.printer); + } + close_tag(gen.printer, "head"); + open_tag(gen.printer, "body"); + generate_chunk_navigation(gen, x); + generate_chunk_body(gen, x); + chunk* it = x->children(); + for (; it && it->inline_; it = it->next()) { + generate_inline_chunks(gen, it); + } + generate_footnotes_html(gen); + close_tag(gen.printer, "body"); + close_tag(gen.printer, "html"); + write_file(state, x->path_, gen.printer.html); + for (; it; it = it->next()) { + assert(!it->inline_); + generate_chunks(state, it); + } + } + + void generate_chunk_navigation(html_gen& gen, chunk* x) + { + chunk* next = 0; + for (chunk* it = x->children(); it; it = it->next()) { + if (!it->inline_) { + next = it; + break; + } + } + if (!next) { + next = x->next(); + } + + chunk* prev = x->prev(); + if (prev) { + while (prev->children()) { + for (prev = prev->children(); prev->next(); + prev = prev->next()) { + } + } + } + else { + prev = x->parent(); + } + + if (next || prev || x->parent()) { + tag_start(gen.printer, "div"); + tag_attribute(gen.printer, "class", "spirit-nav"); + tag_end(gen.printer); + if (prev) { + tag_start(gen.printer, "a"); + tag_attribute( + gen.printer, "href", + get_link_from_path(gen, prev->path_, x->path_)); + tag_attribute(gen.printer, "accesskey", "p"); + tag_end(gen.printer); + graphics_tag(gen, "/prev.png", "prev"); + close_tag(gen.printer, "a"); + gen.printer.html += " "; + } + if (x->parent()) { + tag_start(gen.printer, "a"); + tag_attribute( + gen.printer, "href", + get_link_from_path(gen, x->parent()->path_, x->path_)); + tag_attribute(gen.printer, "accesskey", "u"); + tag_end(gen.printer); + graphics_tag(gen, "/up.png", "up"); + close_tag(gen.printer, "a"); + gen.printer.html += " "; + + tag_start(gen.printer, "a"); + tag_attribute( + gen.printer, "href", + get_link_from_path(gen, "index.html", x->path_)); + tag_attribute(gen.printer, "accesskey", "h"); + tag_end(gen.printer); + graphics_tag(gen, "/home.png", "home"); + close_tag(gen.printer, "a"); + if (next) { + gen.printer.html += " "; + } + } + if (next) { + tag_start(gen.printer, "a"); + tag_attribute( + gen.printer, "href", + get_link_from_path(gen, next->path_, x->path_)); + tag_attribute(gen.printer, "accesskey", "n"); + tag_end(gen.printer); + graphics_tag(gen, "/next.png", "next"); + close_tag(gen.printer, "a"); + } + close_tag(gen.printer, "div"); + } + } + + void generate_inline_chunks(html_gen& gen, chunk* x) + { + tag_start(gen.printer, "div"); + tag_attribute(gen.printer, "id", x->id_); + tag_end(gen.printer); + generate_chunk_body(gen, x); + for (chunk* it = x->children(); it; it = it->next()) { + assert(it->inline_); + generate_inline_chunks(gen, it); + } + close_tag(gen.printer, "div"); + } + + void generate_chunk_body(html_gen& gen, chunk* x) + { + gen.chunk.callout_numbers.clear(); + + number_callouts(gen, x->title_.root()); + number_callouts(gen, x->info_.root()); + number_callouts(gen, x->contents_.root()); + + generate_tree_html(gen, x->title_.root()); + generate_docinfo_html(gen, x->info_.root()); + generate_toc_html(gen, x); + generate_tree_html(gen, x->contents_.root()); + } + + void generate_toc_html(html_gen& gen, chunk* x) + { + if (x->children() && x->contents_.root()->name_ != "section") { + tag_start(gen.printer, "div"); + tag_attribute(gen.printer, "class", "toc"); + tag_end(gen.printer); + open_tag(gen.printer, "p"); + open_tag(gen.printer, "b"); + gen.printer.html += "Table of contents"; + close_tag(gen.printer, "b"); + close_tag(gen.printer, "p"); + generate_toc_subtree(gen, x, x, 1); + close_tag(gen.printer, "div"); + } + } + + void generate_toc_subtree( + html_gen& gen, chunk* page, chunk* x, unsigned section_depth) + { + if (x != page && section_depth == 0) { + bool has_non_section_child = false; + for (chunk* it = x->children(); it; it = it->next()) { + if (it->contents_.root()->name_ != "section") { + has_non_section_child = true; + } + } + if (!has_non_section_child) { + return; + } + } + + gen.printer.html += ""; + } + + void generate_toc_item_html(html_gen& gen, xml_element* x) + { + if (x) { + bool old = gen.in_toc; + gen.in_toc = true; + generate_children_html(gen, x); + gen.in_toc = old; + } + else { + gen.printer.html += "Untitled"; + } + } + + void generate_footnotes_html(html_gen& gen) + { + if (!gen.chunk.footnotes.empty()) { + tag_start(gen.printer, "div"); + tag_attribute(gen.printer, "class", "footnotes"); + tag_end(gen.printer); + gen.printer.html += "
    "; + gen.printer.html += "
    "; + for (std::vector::iterator it = + gen.chunk.footnotes.begin(); + it != gen.chunk.footnotes.end(); ++it) { + auto footnote_id = + (*it)->get_attribute("(((footnote-id)))"); + tag_start(gen.printer, "div"); + tag_attribute(gen.printer, "id", footnote_id); + tag_attribute(gen.printer, "class", "footnote"); + tag_end(gen.printer); + + generate_children_html(gen, *it); + close_tag(gen.printer, "div"); + } + close_tag(gen.printer, "div"); + } + } + + void number_callouts(html_gen& gen, xml_element* x) + { + if (!x) { + return; + } + + if (x->type_ == xml_element::element_node) { + if (x->name_ == "calloutlist") { + unsigned count = 0; + number_calloutlist_children(gen, count, x); + } + else if (x->name_ == "co") { + if (x->has_attribute("linkends")) { + auto linkends = x->get_attribute("linkends"); + if (!x->has_attribute("id")) { + generate_id(gen.chunk, x, "id", linkends); + } + gen.chunk.callout_numbers[linkends].link_id = + x->get_attribute("id"); + } + } + } + for (xml_element* it = x->children(); it; it = it->next()) { + number_callouts(gen, it); + } + } + + void number_calloutlist_children( + html_gen& gen, unsigned& count, xml_element* x) + { + for (xml_element* it = x->children(); it; it = it->next()) { + if (it->type_ == xml_element::element_node && + it->name_ == "callout") { + if (it->has_attribute("id")) { + gen.chunk.callout_numbers[it->get_attribute("id")] + .number = ++count; + } + } + number_calloutlist_children(gen, count, it); + } + } + + void generate_tree_html(html_gen& gen, xml_element* x) + { + if (!x) { + return; + } + switch (x->type_) { + case xml_element::element_text: { + gen.printer.html += x->contents_; + break; + } + case xml_element::element_html: { + gen.printer.html += x->contents_; + break; + } + case xml_element::element_node: { + node_parsers_type::iterator parser = + node_parsers.find(x->name_); + if (parser != node_parsers.end()) { + parser->second(gen, x); + } + else { + quickbook::detail::out() + << "Unsupported tag: " << x->name_ << std::endl; + generate_children_html(gen, x); + } + break; + } + default: + assert(false); + } + } + + void generate_children_html(html_gen& gen, xml_element* x) + { + for (xml_element* it = x->children(); it; it = it->next()) { + generate_tree_html(gen, it); + } + } + + void generate_docinfo_html_impl(docinfo_gen& d, xml_element* x) + { + for (xml_element* it = x->children(); it; it = it->next()) { + if (it->type_ == xml_element::element_node) { + auto parser = docinfo_node_parsers.find(it->name_); + if (parser != docinfo_node_parsers.end()) { + parser->second.parser(d, it); + } + else { + quickbook::detail::out() + << "Unsupported docinfo tag: " << x->name_ + << std::endl; + generate_docinfo_html_impl(d, it); + } + } + } + } + + void generate_docinfo_html(html_gen& gen, xml_element* x) + { + if (!x) { + return; + } + + docinfo_gen d(gen); + generate_docinfo_html_impl(d, x); + + if (!d.authors.empty() || !d.editors.empty() || + !d.collabs.empty()) { + gen.printer.html += "
    \n"; + QUICKBOOK_FOR (auto const& author, d.authors) { + gen.printer.html += "

    "; + gen.printer.html += author; + gen.printer.html += "

    \n"; + } + QUICKBOOK_FOR (auto const& editor, d.editors) { + gen.printer.html += "

    "; + gen.printer.html += editor; + gen.printer.html += "

    \n"; + } + QUICKBOOK_FOR (auto const& collab, d.collabs) { + gen.printer.html += "

    "; + gen.printer.html += collab; + gen.printer.html += "

    \n"; + } + gen.printer.html += "
    \n"; + } + + QUICKBOOK_FOR (auto const& copyright, d.copyrights) { + gen.printer.html += "

    "; + gen.printer.html += copyright; + gen.printer.html += "

    "; + } + + QUICKBOOK_FOR (auto const& legalnotice, d.legalnotices) { + gen.printer.html += "
    "; + gen.printer.html += legalnotice; + gen.printer.html += "
    "; + } + } + + void write_file( + html_state& state, + std::string const& generic_path, + std::string const& content) + { + fs::path path = state.options.home_path.parent_path() / + generic_to_path(generic_path); + std::string html = content; + + if (state.options.pretty_print) { + try { + html = post_process(html, -1, -1, true); + } catch (quickbook::post_process_failure&) { + ::quickbook::detail::outerr(path) + << "Post Processing Failed." << std::endl; + ++state.error_count; + } + } + + fs::path parent = path.parent_path(); + if (state.options.chunked_output && !parent.empty() && + !fs::exists(parent)) { + fs::create_directories(parent); + } + + fs::ofstream fileout(path); + + if (fileout.fail()) { + ::quickbook::detail::outerr(path) + << "Error opening output file" << std::endl; + ++state.error_count; + return; + } + + fileout << html; + + if (fileout.fail()) { + ::quickbook::detail::outerr(path) + << "Error writing to output file" << std::endl; + ++state.error_count; + return; + } + } + + std::string get_link_from_path( + html_gen& gen, + quickbook::string_view link, + quickbook::string_view path) + { + if (boost::starts_with(link, "boost:")) { + // TODO: Parameterize the boost location, so that it can use + // relative paths. + string_iterator it = link.begin() + strlen("boost:"); + if (*it == '/') { + ++it; + } + if (!gen.state.options.boost_root_path) { + std::string result = + "http://www.boost.org/doc/libs/release/"; + result.append(it, link.end()); + return result; + } + else { + return relative_path_or_url( + gen, + gen.state.options.boost_root_path / + string_view(it, link.end() - it)); + } + } + + return relative_path_from_url_paths(link, path); + } + + std::string relative_path_or_url(html_gen& gen, path_or_url const& x) + { + assert(x); + if (x.is_url()) { + return x.get_url(); + } + else { + return relative_path_from_fs_paths( + x.get_path(), + gen.state.options.home_path.parent_path() / + gen.path.to_s()); + } + } + + // Note: assume that base is a file, not a directory. + std::string relative_path_from_fs_paths( + fs::path const& p, fs::path const& base) + { + return path_to_generic(path_difference(base.parent_path(), p)); + } + + std::string relative_path_from_url_paths( + quickbook::string_view path, quickbook::string_view base) + { + string_iterator path_it = path.begin(); + string_iterator base_it = base.begin(); + string_iterator path_diff_start = path_it; + string_iterator base_diff_start = base_it; + + for (; path_it != path.end() && base_it != base.end() && + *path_it == *base_it; + ++path_it, ++base_it) { + if (*path_it == '/') { + path_diff_start = path_it + 1; + base_diff_start = base_it + 1; + } + else if (*path_it == '#') { + return std::string(path_it, path.end()); + } + } + + if (base_it == base.end() && path_it != path.end() && + *path_it == '#') { + return std::string(path_it, path.end()); + } + + if (path_it == path.end() && + (base_it == base.end() || *base_it == '#')) { + return std::string("#"); + } + + auto up_count = std::count( + base_diff_start, std::find(base_it, base.end(), '#'), '/'); + + std::string result; + for (int i = 0; i < up_count; ++i) { + result += "../"; + } + result.append(path_diff_start, path.end()); + return result; + } + + // get_id_paths + + ids_type get_id_paths(chunk* chunk) + { + ids_type ids; + if (chunk) { + get_id_paths_impl(ids, chunk); + } + return ids; + } + + void get_id_paths_impl(ids_type& ids, chunk* c) + { + std::string p = c->path_; + if (c->inline_) { + p += '#'; + p += c->id_; + } + ids.emplace(c->id_, id_info(c, 0)); + + get_id_paths_impl2(ids, c, c->title_.root()); + get_id_paths_impl2(ids, c, c->info_.root()); + get_id_paths_impl2(ids, c, c->contents_.root()); + for (chunk* i = c->children(); i; i = i->next()) { + get_id_paths_impl(ids, i); + } + } + + void get_id_paths_impl2(ids_type& ids, chunk* c, xml_element* node) + { + if (!node) { + return; + } + if (node->has_attribute("id")) { + ids.emplace(node->get_attribute("id"), id_info(c, node)); + } + for (xml_element* i = node->children(); i; i = i->next()) { + get_id_paths_impl2(ids, c, i); + } + } + + void tag(html_gen& gen, quickbook::string_view name, xml_element* x) + { + open_tag_with_id(gen, name, x); + generate_children_html(gen, x); + close_tag(gen.printer, name); + } + + void open_tag_with_id( + html_gen& gen, quickbook::string_view name, xml_element* x) + { + tag_start_with_id(gen, name, x); + tag_end(gen.printer); + } + + void tag_self_close( + html_gen& gen, quickbook::string_view name, xml_element* x) + { + tag_start_with_id(gen, name, x); + tag_end_self_close(gen.printer); + } + + void graphics_tag( + html_gen& gen, + quickbook::string_view path, + quickbook::string_view fallback) + { + if (gen.state.options.graphics_path) { + tag_start(gen.printer, "img"); + tag_attribute( + gen.printer, "src", + relative_path_or_url( + gen, gen.state.options.graphics_path / path)); + tag_attribute(gen.printer, "alt", fallback); + tag_end(gen.printer); + } + else { + gen.printer.html.append(fallback.begin(), fallback.end()); + } + } + + void tag_start_with_id( + html_gen& gen, quickbook::string_view name, xml_element* x) + { + tag_start(gen.printer, name); + if (!gen.in_toc) { + if (x->has_attribute("id")) { + tag_attribute(gen.printer, "id", x->get_attribute("id")); + } + } + } + +// Handle boostbook nodes + +#define NODE_RULE(tag_name, gen, x) \ + void BOOST_PP_CAT(parser_, tag_name)(html_gen&, xml_element*); \ + static struct BOOST_PP_CAT(register_parser_type_, tag_name) \ + { \ + BOOST_PP_CAT(register_parser_type_, tag_name)() \ + { \ + node_parsers.emplace( \ + BOOST_PP_STRINGIZE(tag_name), \ + &BOOST_PP_CAT(parser_, tag_name)); \ + } \ + } BOOST_PP_CAT(register_parser_, tag_name); \ + void BOOST_PP_CAT(parser_, tag_name)(html_gen & gen, xml_element * x) + +#define DOCINFO_NODE_RULE(tag_name, category, gen, x) \ + void BOOST_PP_CAT(docinfo_parser_, tag_name)(docinfo_gen&, xml_element*); \ + static struct BOOST_PP_CAT(register_docinfo_parser_type_, tag_name) \ + { \ + BOOST_PP_CAT(register_docinfo_parser_type_, tag_name)() \ + { \ + docinfo_node_parser p = { \ + docinfo_node_parser::category, \ + &BOOST_PP_CAT(docinfo_parser_, tag_name)}; \ + docinfo_node_parsers.emplace(BOOST_PP_STRINGIZE(tag_name), p); \ + } \ + } BOOST_PP_CAT(register_docinfo_parser_, tag_name); \ + void BOOST_PP_CAT(docinfo_parser_, tag_name)( \ + docinfo_gen & gen, xml_element * x) + +#define NODE_MAP(tag_name, html_name) \ + NODE_RULE(tag_name, gen, x) { tag(gen, BOOST_PP_STRINGIZE(html_name), x); } + +#define NODE_MAP_CLASS(tag_name, html_name, class_name) \ + NODE_RULE(tag_name, gen, x) \ + { \ + tag_start_with_id(gen, BOOST_PP_STRINGIZE(html_name), x); \ + tag_attribute(gen.printer, "class", BOOST_PP_STRINGIZE(class_name)); \ + tag_end(gen.printer); \ + generate_children_html(gen, x); \ + close_tag(gen.printer, BOOST_PP_STRINGIZE(html_name)); \ + } + + // TODO: For some reason 'hr' generates an empty paragraph? + NODE_MAP(simpara, div) + NODE_MAP(orderedlist, ol) + NODE_MAP(itemizedlist, ul) + NODE_MAP(listitem, li) + NODE_MAP(blockquote, blockquote) + NODE_MAP(quote, q) + NODE_MAP(code, code) + NODE_MAP(macronname, code) + NODE_MAP(classname, code) + NODE_MAP_CLASS(programlisting, pre, programlisting) + NODE_MAP(literal, tt) + NODE_MAP(subscript, sub) + NODE_MAP(superscript, sup) + NODE_MAP(section, div) + NODE_MAP(anchor, span) + + NODE_MAP(title, h3) + + NODE_MAP_CLASS(warning, div, warning) + NODE_MAP_CLASS(caution, div, caution) + NODE_MAP_CLASS(important, div, important) + NODE_MAP_CLASS(note, div, note) + NODE_MAP_CLASS(tip, div, tip) + NODE_MAP_CLASS(replaceable, em, replaceable) + + NODE_RULE(sidebar, gen, x) + { + auto role = x->get_attribute("role"); + + tag_start_with_id(gen, "div", x); + if (role == "blurb") { + tag_attribute(gen.printer, "class", "blurb"); + } + else { + tag_attribute(gen.printer, "class", "sidebar"); + } + + tag_end(gen.printer); + generate_children_html(gen, x); + close_tag(gen.printer, "div"); + } + + NODE_RULE(sbr, gen, x) + { + if (!x->children()) { + tag_self_close(gen, "br", x); + } + else { + tag(gen, "br", x); + } + } + + NODE_RULE(bridgehead, gen, x) + { + auto renderas = x->get_attribute("renderas"); + char header[3] = "h3"; + if (renderas.size() == 5 && boost::starts_with(renderas, "sect")) { + char l = renderas[4]; + if (l >= '1' && l <= '6') { + header[1] = l; + } + } + return tag(gen, header, x); + } + + NODE_RULE(ulink, gen, x) + { + tag_start_with_id(gen, "a", x); + // TODO: error if missing? + if (x->has_attribute("url")) { + tag_attribute( + gen.printer, "href", + get_link_from_path(gen, x->get_attribute("url"), gen.path)); + } + tag_end(gen.printer); + generate_children_html(gen, x); + close_tag(gen.printer, "a"); + } + + NODE_RULE(link, gen, x) + { + // TODO: error if missing or not found? + auto it = gen.state.ids.end(); + if (x->has_attribute("linkend")) { + it = gen.state.ids.find(x->get_attribute("linkend")); + + if (it == gen.state.ids.end()) { + fs::path docbook("(generated docbook)"); + detail::outwarn(docbook) + << "link not found: " << x->get_attribute("linkend") + << std::endl; + } + } + + tag_start_with_id(gen, "a", x); + if (it != gen.state.ids.end()) { + tag_attribute( + gen.printer, "href", + relative_path_from_url_paths(it->second.path(), gen.path)); + } + tag_end(gen.printer); + generate_children_html(gen, x); + close_tag(gen.printer, "a"); + } + + NODE_RULE(phrase, gen, x) + { + auto role = x->get_attribute("role"); + + tag_start_with_id(gen, "span", x); + if (!role.empty()) { + tag_attribute(gen.printer, "class", role); + } + tag_end(gen.printer); + generate_children_html(gen, x); + close_tag(gen.printer, "span"); + } + + NODE_RULE(para, gen, x) + { + auto role = x->get_attribute("role"); + + tag_start_with_id(gen, "p", x); + if (!role.empty()) { + tag_attribute(gen.printer, "class", role); + } + tag_end(gen.printer); + generate_children_html(gen, x); + close_tag(gen.printer, "p"); + } + + NODE_RULE(emphasis, gen, x) + { + auto role = x->get_attribute("role"); + quickbook::string_view tag_name; + quickbook::string_view class_name; + + if (role.empty()) { + tag_name = "em"; + class_name = "emphasis"; + } + else if (role == "bold" || role == "strong") { + tag_name = "strong"; + class_name = role; + } + else { + class_name = role; + } + tag_start_with_id(gen, "span", x); + if (!class_name.empty()) { + tag_attribute(gen.printer, "class", class_name); + } + tag_end(gen.printer); + if (!tag_name.empty()) { + open_tag(gen.printer, tag_name); + generate_children_html(gen, x); + close_tag(gen.printer, tag_name); + } + else { + generate_children_html(gen, x); + } + close_tag(gen.printer, "span"); + } + + NODE_RULE(inlinemediaobject, gen, x) + { + bool has_image = false; + string_view image; + + // Get image link + for (xml_element* i = x->children(); i; i = i->next()) { + if (i->type_ == xml_element::element_node && + i->name_ == "imageobject") { + for (xml_element* j = i->children(); j; j = j->next()) { + if (j->type_ == xml_element::element_node && + j->name_ == "imagedata") { + if (j->has_attribute("fileref")) { + has_image = true; + image = j->get_attribute("fileref"); + break; + } + } + } + } + } + + std::string alt; + for (xml_element* i = x->children(); i; i = i->next()) { + if (i->type_ == xml_element::element_node && + i->name_ == "textobject") { + for (xml_element* j = i->children(); j; j = j->next()) { + if (j->type_ == xml_element::element_node && + j->name_ == "phrase") { + if (j->get_attribute("role") == "alt") { + html_gen gen2(gen); + generate_tree_html(gen2, j); + alt = gen2.printer.html; + } + } + } + } + } + // TODO: This was in the original php code, not sure why. + if (alt.empty()) { + alt = "[]"; + } + if (has_image) { + tag_start(gen.printer, "span"); + tag_attribute(gen.printer, "class", "inlinemediaobject"); + tag_end(gen.printer); + tag_start_with_id(gen, "img", x); + tag_attribute( + gen.printer, "src", + get_link_from_path(gen, image, gen.path)); + tag_attribute(gen.printer, "alt", alt); + tag_end_self_close(gen.printer); + close_tag(gen.printer, "span"); + } + } + + NODE_RULE(variablelist, gen, x) + { + typedef std::vector > + items_type; + items_type items; + for (xml_element* i = x->children(); i; i = i->next()) { + if (i && i->type_ == xml_element::element_node) { + if (i->name_ == "title") { + // TODO: What to do with titles? + continue; + } + else if (i->name_ == "varlistentry") { + // TODO: What if i has an id? + xml_element* term = 0; + xml_element* listitem = 0; + for (xml_element* j = i->children(); j; j = j->next()) { + if (j && j->type_ == xml_element::element_node) { + if (j->name_ == "term") { + term = j; + } + else if (j->name_ == "listitem") { + listitem = j; + } + } + } + if (term && listitem) { + items.push_back(std::make_pair(term, listitem)); + } + } + } + } + + if (!items.empty()) { + open_tag_with_id(gen, "dl", x); + for (items_type::iterator i = items.begin(); i != items.end(); + ++i) { + tag(gen, "dt", i->first); + tag(gen, "dd", i->second); + } + close_tag(gen.printer, "dl"); + } + } + + void write_table_rows(html_gen& gen, xml_element* x, char const* td_tag) + { + for (xml_element* i = x->children(); i; i = i->next()) { + if (i->type_ == xml_element::element_node && + i->name_ == "row") { + open_tag_with_id(gen, "tr", i); + for (xml_element* j = i->children(); j; j = j->next()) { + if (j->type_ == xml_element::element_node && + j->name_ == "entry") { + auto role = x->get_attribute("role"); + tag_start_with_id(gen, td_tag, j); + if (!role.empty()) { + tag_attribute(gen.printer, "class", role); + } + tag_end(gen.printer); + generate_children_html(gen, j); + close_tag(gen.printer, td_tag); + } + } + close_tag(gen.printer, "tr"); + } + } + } + + void write_table(html_gen& gen, xml_element* x) + { + xml_element* title = 0; + xml_element* tgroup = 0; + xml_element* thead = 0; + xml_element* tbody = 0; + + for (xml_element* i = x->children(); i; i = i->next()) { + if (i->type_ == xml_element::element_node && + i->name_ == "title") { + title = i; + } + if (i->type_ == xml_element::element_node && + i->name_ == "tgroup") { + tgroup = i; + } + } + + if (!tgroup) { + return; + } + + for (xml_element* i = tgroup->children(); i; i = i->next()) { + if (i->type_ == xml_element::element_node && + i->name_ == "thead") { + thead = i; + } + if (i->type_ == xml_element::element_node && + i->name_ == "tbody") { + tbody = i; + } + } + + tag_start_with_id(gen, "div", x); + tag_attribute(gen.printer, "class", x->name_); + tag_end(gen.printer); + open_tag(gen.printer, "table"); + if (title) { + tag(gen, "caption", title); + } + if (thead) { + open_tag(gen.printer, "thead"); + write_table_rows(gen, thead, "th"); + close_tag(gen.printer, "thead"); + } + if (tbody) { + open_tag(gen.printer, "tbody"); + write_table_rows(gen, tbody, "td"); + close_tag(gen.printer, "tbody"); + } + close_tag(gen.printer, "table"); + close_tag(gen.printer, "div"); + } + + NODE_RULE(table, gen, x) { write_table(gen, x); } + NODE_RULE(informaltable, gen, x) { write_table(gen, x); } + + NODE_MAP(calloutlist, div) + + NODE_RULE(callout, gen, x) + { + boost::unordered_map::const_iterator + data = gen.chunk.callout_numbers.end(); + auto link = gen.state.ids.end(); + if (x->has_attribute("id")) { + data = gen.chunk.callout_numbers.find(x->get_attribute("id")); + } + if (data != gen.chunk.callout_numbers.end() && + !data->second.link_id.empty()) { + link = gen.state.ids.find(data->second.link_id); + } + + open_tag_with_id(gen, "div", x); + if (link != gen.state.ids.end()) { + tag_start(gen.printer, "a"); + tag_attribute( + gen.printer, "href", relative_path_from_url_paths( + link->second.path(), gen.path)); + tag_end(gen.printer); + } + graphics_tag( + gen, + "/callouts/" + + boost::lexical_cast(data->second.number) + + ".png", + "(" + boost::lexical_cast(data->second.number) + + ")"); + if (link != gen.state.ids.end()) { + close_tag(gen.printer, "a"); + } + gen.printer.html += " "; + generate_children_html(gen, x); + close_tag(gen.printer, "div"); + } + + NODE_RULE(co, gen, x) + { + boost::unordered_map::const_iterator + data = gen.chunk.callout_numbers.end(); + auto link = gen.state.ids.end(); + if (x->has_attribute("linkends")) { + auto linkends = x->get_attribute("linkends"); + data = gen.chunk.callout_numbers.find(linkends); + link = gen.state.ids.find(linkends); + } + + if (link != gen.state.ids.end()) { + tag_start(gen.printer, "a"); + tag_attribute( + gen.printer, "href", relative_path_from_url_paths( + link->second.path(), gen.path)); + tag_end(gen.printer); + } + if (data != gen.chunk.callout_numbers.end()) { + graphics_tag( + gen, + "/callouts/" + + boost::lexical_cast(data->second.number) + + ".png", + "(" + + boost::lexical_cast(data->second.number) + + ")"); + } + else { + gen.printer.html += "(0)"; + } + if (link != gen.state.ids.end()) { + close_tag(gen.printer, "a"); + } + } + + NODE_RULE(footnote, gen, x) + { + // TODO: Better id generation.... + static int footnote_number = 0; + ++footnote_number; + std::string footnote_label = + boost::lexical_cast(footnote_number); + auto footnote_id = + generate_id(gen.chunk, x, "(((footnote-id)))", "footnote"); + if (!x->has_attribute("id")) { + generate_id(gen.chunk, x, "id", "footnote"); + } + + tag_start_with_id(gen, "a", x); + std::string href = "#"; + href += footnote_id; + tag_attribute(gen.printer, "href", href); + tag_end(gen.printer); + tag_start(gen.printer, "sup"); + tag_attribute(gen.printer, "class", "footnote"); + tag_end(gen.printer); + gen.printer.html += "[" + footnote_label + "]"; + close_tag(gen.printer, "sup"); + close_tag(gen.printer, "a"); + + // Generate HTML to add to footnote. + html_printer printer; + tag_start(printer, "a"); + std::string href2 = "#"; + href2 += x->get_attribute("id"); + tag_attribute(printer, "href", href2); + tag_end(printer); + tag_start(printer, "sup"); + tag_end(printer); + printer.html += "[" + footnote_label + "]"; + close_tag(printer, "sup"); + close_tag(printer, "a"); + printer.html += ' '; + xml_tree_builder builder; + builder.add_element(xml_element::html_node(printer.html)); + + // Find position to insert. + auto pos = x->children(); + for (; pos && pos->type_ == xml_element::element_text; + pos = pos->next()) { + if (pos->contents_.find_first_not_of("\t\n ") != + std::string::npos) { + break; + } + } + if (!pos) { + x->add_first_child(builder.release()); + } + else + switch (pos->type_) { + case xml_element::element_node: + // TODO: Check type of node? Recurse? + pos->add_first_child(builder.release()); + break; + default: + pos->add_before(builder.release()); + break; + } + + gen.chunk.footnotes.push_back(x); + } + + std::string docinfo_get_contents(docinfo_gen& d, xml_element* x) + { + html_gen gen2(d.gen); + generate_children_html(gen2, x); + return gen2.printer.html; + } + + std::string docinfo_get_author(docinfo_gen& d, xml_element* x) + { + auto personname = x->get_child("personname"); + if (personname) { + return docinfo_get_author(d, personname); + } + + std::string name; + + char const* name_parts[] = {"honorific", "firstname", "surname"}; + std::size_t const length = + sizeof(name_parts) / sizeof(name_parts[0]); + for (std::size_t i = 0; i < length; ++i) { + auto child = x->get_child(name_parts[i]); + if (child) { + if (name.size()) { + name += " "; + } + name += docinfo_get_contents(d, child); + } + } + + return name; + } + + // docinfo parsers + + // No support for: + // + // graphic, mediaobject + // modespec + // subjectset, keywordset + // itermset, indexterm + // abbrev + // abstract + // address + // artpagenums + // authorinitials + // bibliomisc, biblioset + // confgroup + // contractnum, contractsponsor + // corpname + // date + // edition + // invpartnumber, isbn, issn, issuenum, biblioid + // orgname + // citebiblioid, citetitle + // bibliosource, bibliorelation, bibliocoverage - Dublin core + // pagenums + // printhistory + // productname, productnumber + // pubdate *** + // publisher, publishername, pubsnumber + // releaseinfo + // revhistory + // seriesvolnums + // title, subtitle, titleabbrev - *** extract into parent? + // volumenum + // personname, honorific, firstname, surname, lineage, othername, + // affiliation, authorblurb, contrib - add to authors? + + DOCINFO_NODE_RULE(copyright, docinfo_general, d, x) + { + std::vector years; + std::vector holders; + + for (auto child = x->children(); child; child = child->next()) { + if (child->type_ == xml_element::element_node) { + if (child->name_ == "year") { + years.push_back(child); + } + else if (child->name_ == "holder") { + holders.push_back(child); + } + else { + quickbook::detail::out() + << "Unsupported copyright tag: " << x->name_ + << std::endl; + } + } + } + + // TODO: Format years, e.g. 2005 2006 2007 2010 => 2005-2007, 2010 + + std::string copyright; + QUICKBOOK_FOR (auto year, years) { + if (!copyright.empty()) { + copyright += ", "; + } + copyright += docinfo_get_contents(d, year); + } + bool first = true; + QUICKBOOK_FOR (auto holder, holders) { + if (first) { + if (!copyright.empty()) { + copyright += " "; + } + first = false; + } + else { + copyright += ", "; + } + copyright += docinfo_get_contents(d, holder); + } + d.copyrights.push_back(copyright); + } + + DOCINFO_NODE_RULE(legalnotice, docinfo_general, d, x) + { + d.legalnotices.push_back(docinfo_get_contents(d, x)); + } + + DOCINFO_NODE_RULE(pubdate, docinfo_general, d, x) + { + d.pubdates.push_back(docinfo_get_contents(d, x)); + } + + DOCINFO_NODE_RULE(authorgroup, docinfo_general, d, x) + { + // TODO: Check children are docinfo_author + generate_docinfo_html_impl(d, x); + } + + DOCINFO_NODE_RULE(author, docinfo_author, d, x) + { + d.authors.push_back(docinfo_get_author(d, x)); + } + + DOCINFO_NODE_RULE(editor, docinfo_author, d, x) + { + d.editors.push_back(docinfo_get_author(d, x)); + } + + DOCINFO_NODE_RULE(collab, docinfo_author, d, x) + { + // Ignoring affiliation. + auto collabname = x->get_child("collabname"); + if (collabname) { + d.collabs.push_back(docinfo_get_contents(d, collabname)); + } + } + + DOCINFO_NODE_RULE(corpauthor, docinfo_author, d, x) + { + d.authors.push_back(docinfo_get_contents(d, x)); + } + + DOCINFO_NODE_RULE(corpcredit, docinfo_author, d, x) + { + std::string text = docinfo_get_contents(d, x); + + string_view class_ = x->get_attribute("class"); + if (!class_.empty()) { + text = class_.to_s() + ": " + text; + } + + d.authors.push_back(text); + } + + DOCINFO_NODE_RULE(othercredit, docinfo_author, d, x) + { + std::string text = docinfo_get_author(d, x); + + string_view class_ = x->get_attribute("class"); + if (!class_.empty()) { + text = class_.to_s() + ": " + text; + } + + d.authors.push_back(text); + } + } +} diff --git a/src/boost/tools/quickbook/src/bb2html.hpp b/src/boost/tools/quickbook/src/bb2html.hpp new file mode 100644 index 000000000..a0230cea6 --- /dev/null +++ b/src/boost/tools/quickbook/src/bb2html.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_BOOSTBOOK_TO_HTML_HPP) +#define BOOST_QUICKBOOK_BOOSTBOOK_TO_HTML_HPP + +#include +#include "path.hpp" +#include "string_view.hpp" + +namespace quickbook +{ + namespace detail + { + struct html_options + { + bool chunked_output; + boost::filesystem::path home_path; + path_or_url boost_root_path; + path_or_url css_path; + path_or_url graphics_path; + bool pretty_print; + + html_options() : chunked_output(false) {} + }; + + int boostbook_to_html(quickbook::string_view, html_options const&); + } +} + +#endif // BOOST_QUICKBOOK_BOOSTBOOK_TO_HTML_HPP diff --git a/src/boost/tools/quickbook/src/block_element_grammar.cpp b/src/boost/tools/quickbook/src/block_element_grammar.cpp new file mode 100644 index 000000000..b17581d82 --- /dev/null +++ b/src/boost/tools/quickbook/src/block_element_grammar.cpp @@ -0,0 +1,335 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "block_tags.hpp" +#include "grammar_impl.hpp" +#include "state.hpp" +#include "template_tags.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + namespace ph = phoenix; + + struct block_element_grammar_local + { + cl::rule heading, inner_block, inner_phrase, def_macro, table, + table_title, table_row, variablelist, varlistentry, varlistterm, + list, cell, preformatted, begin_section, end_section, xinclude, + include, include_filename, template_, template_id, + template_formal_arg, template_body, identifier, import, element_id, + same_line; + }; + + void quickbook_grammar::impl::init_block_elements() + { + block_element_grammar_local& local = + cleanup_.add(new block_element_grammar_local); + + // Actions + error_action error(state); + element_id_warning_action element_id_warning(state); + raw_char_action raw_char(state); + explicit_list_action explicit_list(state); + scoped_parser to_value(state); + + // clang-format off + + local.element_id = + !( ':' + >> ( qbk_ver(107u) + >> to_value(general_tags::element_id) [attribute_value_1_7] + | qbk_ver(0, 107u) + >> !(qbk_ver(105u) >> space) + >> (+(cl::alnum_p | '_')) [state.values.entry(ph::arg1, ph::arg2, general_tags::element_id)] + | cl::eps_p [element_id_warning] + ) + ) + ; + + elements.add + ("section", element_info(element_info::section_block, &local.begin_section, block_tags::begin_section)) + ("endsect", element_info(element_info::section_block, &local.end_section, block_tags::end_section)) + ; + + local.begin_section = + space + >> local.element_id + >> space + >> local.inner_phrase + ; + + local.end_section = + space + >> local.element_id + ; + + local.heading + = space + >> !(qbk_ver(106u) >> local.element_id) + >> space + >> local.inner_phrase + ; + + elements.add + ("heading", element_info(element_info::conditional_or_block, &local.heading, block_tags::generic_heading)) + ("h1", element_info(element_info::conditional_or_block, &local.heading, block_tags::heading1)) + ("h2", element_info(element_info::conditional_or_block, &local.heading, block_tags::heading2)) + ("h3", element_info(element_info::conditional_or_block, &local.heading, block_tags::heading3)) + ("h4", element_info(element_info::conditional_or_block, &local.heading, block_tags::heading4)) + ("h5", element_info(element_info::conditional_or_block, &local.heading, block_tags::heading5)) + ("h6", element_info(element_info::conditional_or_block, &local.heading, block_tags::heading6)) + ; + + elements.add + ("blurb", element_info(element_info::nested_block, &local.inner_block, block_tags::blurb)) + (":", element_info(element_info::nested_block, &local.inner_block, block_tags::blockquote)) + ("warning", element_info(element_info::nested_block, &local.inner_block, block_tags::warning)) + ("caution", element_info(element_info::nested_block, &local.inner_block, block_tags::caution)) + ("important", element_info(element_info::nested_block, &local.inner_block, block_tags::important)) + ("note", element_info(element_info::nested_block, &local.inner_block, block_tags::note)) + ("tip", element_info(element_info::nested_block, &local.inner_block, block_tags::tip)) + ; + + elements.add + ("block", element_info(element_info::nested_block, &local.inner_phrase, block_tags::block, 106u)) + ; + + elements.add + ("pre", element_info(element_info::nested_block, &local.preformatted, block_tags::preformatted)) + ; + + local.preformatted = + ( qbk_ver(0, 106) >> space + | qbk_ver(106) >> blank >> !eol + ) + >> to_value() + [ + inside_preformatted + ] + ; + + elements.add + ("def", element_info(element_info::conditional_or_block, &local.def_macro, block_tags::macro_definition)) + ; + + local.def_macro = + space + >> macro_identifier [state.values.entry(ph::arg1, ph::arg2)] + >> blank + >> local.inner_phrase + ; + + local.identifier = + (cl::alpha_p | '_') >> *(cl::alnum_p | '_') + ; + + local.template_id = + local.identifier | (cl::punct_p - (cl::ch_p('[') | ']')) + ; + + elements.add + ("template", element_info(element_info::conditional_or_block, &local.template_, block_tags::template_definition)) + ; + + local.template_ = + space + >> local.template_id [state.values.entry(ph::arg1, ph::arg2)] + >> state.values.list()[ + !( + space >> '[' + >> *( + space + >> local.template_id [state.values.entry(ph::arg1, ph::arg2)] + ) + >> space >> ']' + ) + ] + >> ( cl::eps_p(*cl::blank_p >> cl::eol_p) + >> local.template_body [state.values.entry(ph::arg1, ph::arg2, template_tags::block)] + | local.template_body [state.values.entry(ph::arg1, ph::arg2, template_tags::phrase)] + ) + ; + + local.template_body = + qbk_ver(106u) + >> *(~cl::eps_p(']') >> skip_entity) + | qbk_ver(0,106u) + >> *(('[' >> local.template_body >> ']') | (cl::anychar_p - ']')) + >> cl::eps_p(space >> ']') + >> space + ; + + elements.add + ("variablelist", element_info(element_info::nested_block, &local.variablelist, block_tags::variable_list)) + ; + + local.variablelist = + (cl::eps_p(*cl::blank_p >> cl::eol_p) | space) + >> local.table_title + >> *local.varlistentry + ; + + local.varlistentry = + space + >> cl::ch_p('[') + >> state.values.list() + [ + ( + local.varlistterm + >> ( +local.cell + | cl::eps_p [error] + ) + >> cl::ch_p(']') + >> space + ) + | cl::eps_p [error] + ] + ; + + local.varlistterm = + space + >> cl::ch_p('[') + >> local.inner_phrase + >> ( cl::ch_p(']') + >> space + | cl::eps_p [error] + ) + ; + + elements.add + ("table", element_info(element_info::nested_block, &local.table, block_tags::table)) + ; + + local.same_line = *cl::blank_p >> !(comment >> space); + + local.table = + local.same_line + >> !(qbk_ver(105u) >> local.element_id) + >> local.same_line + >> local.table_title + >> *local.table_row + ; + + local.table_row = + space + >> cl::ch_p('[') + >> + ( + ( + state.values.list(table_tags::row) + [ *local.cell + ] + >> cl::ch_p(']') + >> space + ) + | cl::eps_p [error] + ) + ; + + local.table_title = + qbk_ver(0, 106) + >> (*(cl::anychar_p - eol)) [state.values.entry(ph::arg1, ph::arg2, table_tags::title)] + >> (+eol) + | qbk_ver(106) + >> to_value(table_tags::title) + [ + table_title_phrase + ] + >> space + ; + + elements.add + ("ordered_list", element_info(element_info::nested_block, &local.list, block_tags::ordered_list, 106)) + ("itemized_list", element_info(element_info::nested_block, &local.list, block_tags::itemized_list, 106)) + ; + + local.list = + *( cl::eps_p [explicit_list] + >> local.cell + ) + ; + + local.cell = + space + >> cl::ch_p('[') + >> ( local.inner_block + >> cl::ch_p(']') + >> space + | cl::eps_p [error] + ) + ; + + elements.add + ("xinclude", element_info(element_info::conditional_or_block, &local.xinclude, block_tags::xinclude)) + ("import", element_info(element_info::conditional_or_block, &local.import, block_tags::import)) + ("include", element_info(element_info::conditional_or_block, &local.include, block_tags::include)) + ; + + local.xinclude = + space + >> local.include_filename + ; + + local.import = + space + >> local.include_filename + ; + + local.include = + space + >> + !( + ':' + >> (*((cl::alnum_p | '_') - cl::space_p)) + [state.values.entry(ph::arg1, ph::arg2, general_tags::include_id)] + >> space + ) + >> local.include_filename + ; + + local.include_filename = + qbk_ver(0, 106u) + >> (*(cl::anychar_p - phrase_end)) [state.values.entry(ph::arg1, ph::arg2)] + | qbk_ver(106u, 107u) + >> to_value() + [ *( raw_escape + | (cl::anychar_p - phrase_end) + [raw_char] + ) + ] + | qbk_ver(107u) + >> to_value() [ attribute_value_1_7 ] + ; + + local.inner_block = + to_value() + [ + inside_paragraph + ] + ; + + local.inner_phrase = + to_value() + [ + paragraph_phrase + ] + ; + + // clang-format on + } +} diff --git a/src/boost/tools/quickbook/src/block_tags.hpp b/src/boost/tools/quickbook/src/block_tags.hpp new file mode 100644 index 000000000..88d891715 --- /dev/null +++ b/src/boost/tools/quickbook/src/block_tags.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_TABLE_TAGS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_TABLE_TAGS_HPP + +#include "value_tags.hpp" + +namespace quickbook +{ + // clang-format off + + QUICKBOOK_VALUE_TAGS(block_tags, 0x200, + (begin_section)(end_section) + (generic_heading) + (heading1)(heading2)(heading3)(heading4)(heading5)(heading6) + (blurb)(blockquote)(preformatted) + (warning)(caution)(important)(note)(tip)(block) + (macro_definition)(template_definition) + (variable_list)(table) + (xinclude)(import)(include) + (paragraph)(paragraph_in_list) + (ordered_list)(itemized_list) + (hr) + ) + + QUICKBOOK_VALUE_TAGS(table_tags, 0x250, + (title)(row) + ) + + QUICKBOOK_VALUE_TAGS(general_tags, 0x300, + (element_id)(include_id)(list_indent)(list_mark) + ) + + // clang-format on +} + +#endif diff --git a/src/boost/tools/quickbook/src/boostbook_chunker.cpp b/src/boost/tools/quickbook/src/boostbook_chunker.cpp new file mode 100644 index 000000000..ec822d982 --- /dev/null +++ b/src/boost/tools/quickbook/src/boostbook_chunker.cpp @@ -0,0 +1,158 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "boostbook_chunker.hpp" +#include +#include +#include + +namespace quickbook +{ + namespace detail + { + boost::unordered_set chunk_types; + boost::unordered_set chunkinfo_types; + + static struct init_chunk_type + { + init_chunk_type() + { + chunk_types.insert("book"); + chunk_types.insert("article"); + chunk_types.insert("library"); + chunk_types.insert("chapter"); + chunk_types.insert("part"); + chunk_types.insert("appendix"); + chunk_types.insert("preface"); + chunk_types.insert("qandadiv"); + chunk_types.insert("qandaset"); + chunk_types.insert("reference"); + chunk_types.insert("set"); + chunk_types.insert("section"); + + for (boost::unordered_set::const_iterator it = + chunk_types.begin(); + it != chunk_types.end(); ++it) { + chunkinfo_types.insert(*it + "info"); + } + } + } init_chunk; + + struct chunk_builder : tree_builder + { + int count; + + chunk_builder() : count(0) {} + + std::string next_path_name() + { + ++count; + std::string result = "page-"; + result += boost::lexical_cast(count); + ++count; + return result; + } + }; + + void chunk_nodes( + chunk_builder& builder, xml_tree& tree, xml_element* node); + std::string id_to_path(quickbook::string_view); + void inline_chunks(chunk*); + + chunk_tree chunk_document(xml_tree& tree) + { + chunk_builder builder; + for (xml_element* it = tree.root(); it;) { + xml_element* next = it->next(); + chunk_nodes(builder, tree, it); + it = next; + } + + return builder.release(); + } + + void inline_sections(chunk* c, int depth) + { + if (c->contents_.root()->name_ == "section" && depth > 1) { + --depth; + } + + // When depth is 0, inline leading sections. + chunk* it = c->children(); + if (depth == 0) { + for (; it && it->contents_.root()->name_ == "section"; + it = it->next()) { + inline_chunks(it); + } + } + + for (; it; it = it->next()) { + inline_sections(it, depth); + } + } + + void inline_all(chunk* c) + { + for (chunk* it = c->children(); it; it = it->next()) { + inline_chunks(it); + } + } + + void inline_chunks(chunk* c) + { + c->inline_ = true; + c->path_ = c->parent()->path_; + for (chunk* it = c->children(); it; it = it->next()) { + inline_chunks(it); + } + } + + void chunk_nodes( + chunk_builder& builder, xml_tree& tree, xml_element* node) + { + chunk* parent = builder.parent(); + + if (parent && node->type_ == xml_element::element_node && + node->name_ == "title") { + parent->title_ = tree.extract(node); + } + else if ( + parent && node->type_ == xml_element::element_node && + chunkinfo_types.find(node->name_) != chunkinfo_types.end()) { + parent->info_ = tree.extract(node); + } + else if ( + node->type_ == xml_element::element_node && + chunk_types.find(node->name_) != chunk_types.end()) { + chunk* chunk_node = new chunk(tree.extract(node)); + builder.add_element(chunk_node); + + chunk_node->id_ = node->has_attribute("id") + ? node->get_attribute("id").to_s() + : builder.next_path_name(); + chunk_node->path_ = id_to_path(chunk_node->id_); + + builder.start_children(); + for (xml_element* it = node->children(); it;) { + xml_element* next = it->next(); + chunk_nodes(builder, tree, it); + it = next; + } + builder.end_children(); + } + } + + std::string id_to_path(quickbook::string_view id) + { + std::string result(id.begin(), id.end()); + boost::replace_all(result, ".", "/"); + result += ".html"; + return result; + } + } +} diff --git a/src/boost/tools/quickbook/src/boostbook_chunker.hpp b/src/boost/tools/quickbook/src/boostbook_chunker.hpp new file mode 100644 index 000000000..b9a2d1f28 --- /dev/null +++ b/src/boost/tools/quickbook/src/boostbook_chunker.hpp @@ -0,0 +1,41 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_BOOSTBOOK_CHUNKER_HPP) +#define BOOST_QUICKBOOK_BOOSTBOOK_CHUNKER_HPP + +#include "xml_parse.hpp" + +namespace quickbook +{ + namespace detail + { + struct chunk : tree_node + { + xml_tree contents_; + xml_tree title_; + xml_tree info_; + bool inline_; + std::string id_; + std::string path_; + + explicit chunk(xml_tree&& contents) + : contents_(std::move(contents)), inline_(false) + { + } + }; + + typedef tree chunk_tree; + + chunk_tree chunk_document(xml_tree&); + void inline_sections(chunk*, int depth); + void inline_all(chunk*); + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/cleanup.hpp b/src/boost/tools/quickbook/src/cleanup.hpp new file mode 100644 index 000000000..41ca4da72 --- /dev/null +++ b/src/boost/tools/quickbook/src/cleanup.hpp @@ -0,0 +1,107 @@ +/*============================================================================= + Copyright (c) 2010.2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_CLEANUP_HPP) +#define BOOST_SPIRIT_QUICKBOOK_CLEANUP_HPP + +namespace quickbook +{ + // This header defines a class which will store pointers and delete what + // they're pointing to on destruction. Add an object, and you can use + // pointers and references to it during the cleanup object's lifespan. + // + // Example use: + // + // struct wonder_struct { + // quickbook::cleanup cleanup; + // }; + // + // wonder_struct w; + // thing& t = w.cleanup.add(new thing()); + // + // Can now use 't' until the wonder_struct is destroyed. + // + // Anything added to cleanup is destroyed in reverse order, so it + // should be okay for an object to depend on something that was previously + // added. + + namespace detail + { + struct cleanup_node; + } + struct cleanup + { + cleanup() : first_(0) {} + ~cleanup(); + template T& add(T*); + + private: + detail::cleanup_node* first_; + + cleanup& operator=(cleanup const&); + cleanup(cleanup const&); + }; + + namespace detail + { + template void delete_impl(void* ptr) + { + delete static_cast(ptr); + } + + struct cleanup_node + { + void* ptr_; + void (*del_)(void*); + cleanup_node* next_; + + cleanup_node() : ptr_(0), del_(0), next_(0) {} + cleanup_node(void* ptr, void (*del)(void* x)) + : ptr_(ptr), del_(del), next_(0) + { + } + ~cleanup_node() + { + if (ptr_) del_(ptr_); + } + + void move_assign(cleanup_node& n) + { + ptr_ = n.ptr_; + del_ = n.del_; + n.ptr_ = 0; + n.del_ = 0; + } + + private: + cleanup_node(cleanup_node const&); + cleanup_node& operator=(cleanup_node const&); + }; + } + + template T& cleanup::add(T* ptr) + { + detail::cleanup_node n(ptr, &detail::delete_impl); + detail::cleanup_node* n2 = new detail::cleanup_node(); + n2->next_ = first_; + first_ = n2; + n2->move_assign(n); + return *ptr; + } + + inline cleanup::~cleanup() + { + while (first_) { + detail::cleanup_node* to_delete = first_; + first_ = first_->next_; + delete to_delete; + } + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/code_snippet.cpp b/src/boost/tools/quickbook/src/code_snippet.cpp new file mode 100644 index 000000000..e2fd13738 --- /dev/null +++ b/src/boost/tools/quickbook/src/code_snippet.cpp @@ -0,0 +1,532 @@ +/*============================================================================= + Copyright (c) 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "block_tags.hpp" +#include "files.hpp" +#include "state.hpp" +#include "stream.hpp" +#include "template_stack.hpp" +#include "values.hpp" + +using namespace boost::placeholders; + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + struct code_snippet_actions + { + code_snippet_actions( + std::vector& storage_, + file_ptr source_file_, + char const* source_type_) + : last_code_pos(source_file_->source().begin()) + , in_code(false) + , snippet_stack() + , storage(storage_) + , source_file(source_file_) + , source_type(source_type_) + , error_count(0) + { + source_file->is_code_snippets = true; + content.start(source_file); + } + + void mark(string_iterator first, string_iterator last); + void pass_thru(string_iterator first, string_iterator last); + void escaped_comment(string_iterator first, string_iterator last); + void start_snippet(string_iterator first, string_iterator last); + void start_snippet_impl(std::string const&, string_iterator); + void end_snippet(string_iterator first, string_iterator last); + void end_snippet_impl(string_iterator); + void end_file(string_iterator, string_iterator); + + void append_code(string_iterator first, string_iterator last); + void close_code(); + + struct snippet_data + { + snippet_data(std::string const& id_) : id(id_), start_code(false) {} + + std::string id; + bool start_code; + string_iterator source_pos; + mapped_file_builder::pos_type start_pos; + boost::shared_ptr next; + }; + + void push_snippet_data(std::string const& id, string_iterator pos) + { + boost::shared_ptr new_snippet(new snippet_data(id)); + new_snippet->next = snippet_stack; + snippet_stack = new_snippet; + snippet_stack->start_code = in_code; + snippet_stack->source_pos = pos; + snippet_stack->start_pos = content.get_pos(); + } + + boost::shared_ptr pop_snippet_data() + { + boost::shared_ptr snippet(snippet_stack); + snippet_stack = snippet->next; + snippet->next.reset(); + return snippet; + } + + mapped_file_builder content; + string_iterator mark_begin, mark_end; + string_iterator last_code_pos; + bool in_code; + boost::shared_ptr snippet_stack; + std::vector& storage; + file_ptr source_file; + char const* const source_type; + int error_count; + }; + + struct python_code_snippet_grammar + : cl::grammar + { + typedef code_snippet_actions actions_type; + + python_code_snippet_grammar(actions_type& actions_) : actions(actions_) + { + } + + template struct definition + { + typedef code_snippet_actions actions_type; + + definition(python_code_snippet_grammar const& self) + { + // clang-format off + + start_ = (*code_elements) [boost::bind(&actions_type::end_file, &self.actions, _1, _2)] + ; + + identifier = + (cl::alpha_p | '_') >> *(cl::alnum_p | '_') + ; + + code_elements = + start_snippet [boost::bind(&actions_type::start_snippet, &self.actions, _1, _2)] + | end_snippet [boost::bind(&actions_type::end_snippet, &self.actions, _1, _2)] + | escaped_comment [boost::bind(&actions_type::escaped_comment, &self.actions, _1, _2)] + | pass_thru_comment [boost::bind(&actions_type::pass_thru, &self.actions, _1, _2)] + | ignore [boost::bind(&actions_type::append_code, &self.actions, _1, _2)] + | cl::anychar_p + ; + + start_snippet = + *cl::blank_p + >> !(cl::eol_p >> *cl::blank_p) + >> "#[" + >> *cl::blank_p + >> identifier [boost::bind(&actions_type::mark, &self.actions, _1, _2)] + >> *(cl::anychar_p - cl::eol_p) + ; + + end_snippet = + *cl::blank_p + >> !(cl::eol_p >> *cl::blank_p) + >> "#]" + >> *(cl::anychar_p - cl::eol_p) + ; + + ignore + = cl::confix_p( + *cl::blank_p >> "#<-", + *cl::anychar_p, + "#->" >> *cl::blank_p >> (cl::eol_p | cl::end_p) + ) + | cl::confix_p( + "\"\"\"<-\"\"\"", + *cl::anychar_p, + "\"\"\"->\"\"\"" + ) + | cl::confix_p( + "\"\"\"<-", + *cl::anychar_p, + "->\"\"\"" + ) + ; + + escaped_comment = + cl::confix_p( + *cl::space_p >> "#`", + (*cl::anychar_p) [boost::bind(&actions_type::mark, &self.actions, _1, _2)], + (cl::eol_p | cl::end_p) + ) + | cl::confix_p( + *cl::space_p >> "\"\"\"`", + (*cl::anychar_p) [boost::bind(&actions_type::mark, &self.actions, _1, _2)], + "\"\"\"" + ) + ; + + // Note: Unlike escaped_comment and ignore, this doesn't + // swallow preceeding whitespace. + pass_thru_comment + = "#=" >> (cl::eps_p - '=') + >> ( *(cl::anychar_p - cl::eol_p) + >> (cl::eol_p | cl::end_p) + ) [boost::bind(&actions_type::mark, &self.actions, _1, _2)] + | cl::confix_p( + "\"\"\"=" >> (cl::eps_p - '='), + (*cl::anychar_p) [boost::bind(&actions_type::mark, &self.actions, _1, _2)], + "\"\"\"" + ) + ; + + // clang-format on + } + + cl::rule start_, identifier, code_elements, start_snippet, + end_snippet, escaped_comment, pass_thru_comment, ignore; + + cl::rule const& start() const { return start_; } + }; + + actions_type& actions; + }; + + struct cpp_code_snippet_grammar : cl::grammar + { + typedef code_snippet_actions actions_type; + + cpp_code_snippet_grammar(actions_type& actions_) : actions(actions_) {} + + template struct definition + { + definition(cpp_code_snippet_grammar const& self) + { + // clang-format off + + start_ = (*code_elements) [boost::bind(&actions_type::end_file, &self.actions, _1, _2)] + ; + + identifier = + (cl::alpha_p | '_') >> *(cl::alnum_p | '_') + ; + + code_elements = + start_snippet [boost::bind(&actions_type::start_snippet, &self.actions, _1, _2)] + | end_snippet [boost::bind(&actions_type::end_snippet, &self.actions, _1, _2)] + | escaped_comment [boost::bind(&actions_type::escaped_comment, &self.actions, _1, _2)] + | ignore [boost::bind(&actions_type::append_code, &self.actions, _1, _2)] + | pass_thru_comment [boost::bind(&actions_type::pass_thru, &self.actions, _1, _2)] + | cl::anychar_p + ; + + start_snippet = + *cl::blank_p + >> !(cl::eol_p >> *cl::blank_p) + >> "//[" + >> *cl::blank_p + >> identifier [boost::bind(&actions_type::mark, &self.actions, _1, _2)] + >> *(cl::anychar_p - cl::eol_p) + | + *cl::blank_p + >> cl::eol_p + >> *cl::blank_p + >> "/*[" + >> *cl::space_p + >> identifier [boost::bind(&actions_type::mark, &self.actions, _1, _2)] + >> *cl::space_p + >> "*/" + >> *cl::blank_p + >> cl::eps_p(cl::eol_p) + | + "/*[" + >> *cl::space_p + >> identifier [boost::bind(&actions_type::mark, &self.actions, _1, _2)] + >> *cl::space_p + >> "*/" + ; + + end_snippet = + *cl::blank_p + >> !(cl::eol_p >> *cl::blank_p) + >> "//]" + >> *(cl::anychar_p - cl::eol_p) + | + *cl::blank_p + >> cl::eol_p + >> *cl::blank_p + >> "/*]*/" + >> *cl::blank_p + >> cl::eps_p(cl::eol_p) + | + "/*[*/" + ; + + ignore + = cl::confix_p( + *cl::blank_p >> "//<-", + *cl::anychar_p, + "//->" + ) + >> *cl::blank_p + >> cl::eol_p + | cl::confix_p( + "/*<-*/", + *cl::anychar_p, + "/*->*/" + ) + | cl::confix_p( + "/*<-", + *cl::anychar_p, + "->*/" + ) + ; + + escaped_comment + = cl::confix_p( + *cl::space_p >> "//`", + (*cl::anychar_p) [boost::bind(&actions_type::mark, &self.actions, _1, _2)], + (cl::eol_p | cl::end_p) + ) + | cl::confix_p( + *cl::space_p >> "/*`", + (*cl::anychar_p) [boost::bind(&actions_type::mark, &self.actions, _1, _2)], + "*/" + ) + ; + + // Note: Unlike escaped_comment and ignore, this doesn't + // swallow preceeding whitespace. + pass_thru_comment + = "//=" >> (cl::eps_p - '=') + >> ( *(cl::anychar_p - cl::eol_p) + >> (cl::eol_p | cl::end_p) + ) [boost::bind(&actions_type::mark, &self.actions, _1, _2)] + | cl::confix_p( + "/*=" >> (cl::eps_p - '='), + (*cl::anychar_p) [boost::bind(&actions_type::mark, &self.actions, _1, _2)], + "*/" + ) + ; + + // clang-format on + } + + cl::rule start_, identifier, code_elements, start_snippet, + end_snippet, escaped_comment, pass_thru_comment, ignore; + + cl::rule const& start() const { return start_; } + }; + + actions_type& actions; + }; + + int load_snippets( + fs::path const& filename, + std::vector& storage // snippets are stored in a + // vector of template_symbols + , + std::string const& extension, + value::tag_type load_type) + { + ignore_variable(&load_type); // Avoid unreferenced parameter warning. + assert( + load_type == block_tags::include || + load_type == block_tags::import); + + bool is_python = extension == ".py" || extension == ".jam"; + code_snippet_actions a( + storage, load(filename, qbk_version_n), + is_python ? "[python]" : "[c++]"); + + string_iterator first(a.source_file->source().begin()); + string_iterator last(a.source_file->source().end()); + + cl::parse_info info; + + if (is_python) { + info = boost::spirit::classic::parse( + first, last, python_code_snippet_grammar(a)); + } + else { + info = boost::spirit::classic::parse( + first, last, cpp_code_snippet_grammar(a)); + } + + assert(info.full); + return a.error_count; + } + + void code_snippet_actions::append_code( + string_iterator first, string_iterator last) + { + assert(last_code_pos <= first); + + if (snippet_stack) { + if (last_code_pos != first) { + if (!in_code) { + content.add_at_pos("\n\n", last_code_pos); + content.add_at_pos(source_type, last_code_pos); + content.add_at_pos("```\n", last_code_pos); + + in_code = true; + } + + content.add(quickbook::string_view( + last_code_pos, first - last_code_pos)); + } + } + + last_code_pos = last; + } + + void code_snippet_actions::close_code() + { + if (!snippet_stack) return; + + if (in_code) { + content.add_at_pos("\n```\n\n", last_code_pos); + in_code = false; + } + } + + void code_snippet_actions::mark(string_iterator first, string_iterator last) + { + mark_begin = first; + mark_end = last; + } + + void code_snippet_actions::pass_thru( + string_iterator first, string_iterator last) + { + if (!snippet_stack) return; + append_code(first, last); + + if (!in_code) { + content.add_at_pos("\n\n", first); + content.add_at_pos(source_type, first); + content.add_at_pos("```\n", first); + in_code = true; + } + + content.add(quickbook::string_view(mark_begin, mark_end - mark_begin)); + } + + void code_snippet_actions::escaped_comment( + string_iterator first, string_iterator last) + { + append_code(first, last); + close_code(); + + if (mark_begin != mark_end) { + if (!snippet_stack) { + start_snippet_impl("!", first); + } + + snippet_data& snippet = *snippet_stack; + + content.add_at_pos("\n", mark_begin); + content.unindent_and_add( + quickbook::string_view(mark_begin, mark_end - mark_begin)); + + if (snippet.id == "!") { + end_snippet_impl(last); + } + } + } + + void code_snippet_actions::start_snippet( + string_iterator first, string_iterator last) + { + append_code(first, last); + start_snippet_impl(std::string(mark_begin, mark_end), first); + } + + void code_snippet_actions::end_snippet( + string_iterator first, string_iterator last) + { + append_code(first, last); + + if (!snippet_stack) { + if (qbk_version_n >= 106u) { + detail::outerr(source_file, first) + << "Mismatched end snippet." << std::endl; + ++error_count; + } + else { + detail::outwarn(source_file, first) + << "Mismatched end snippet." << std::endl; + } + return; + } + + end_snippet_impl(first); + } + + void code_snippet_actions::end_file(string_iterator, string_iterator pos) + { + append_code(pos, pos); + close_code(); + + while (snippet_stack) { + if (qbk_version_n >= 106u) { + detail::outerr(source_file->path) + << "Unclosed snippet '" << snippet_stack->id << "'" + << std::endl; + ++error_count; + } + else { + detail::outwarn(source_file->path) + << "Unclosed snippet '" << snippet_stack->id << "'" + << std::endl; + } + + end_snippet_impl(pos); + } + } + + void code_snippet_actions::start_snippet_impl( + std::string const& id, string_iterator position) + { + push_snippet_data(id, position); + } + + void code_snippet_actions::end_snippet_impl(string_iterator position) + { + assert(snippet_stack); + + boost::shared_ptr snippet = pop_snippet_data(); + + mapped_file_builder f; + f.start(source_file); + if (snippet->start_code) { + f.add_at_pos("\n\n", snippet->source_pos); + f.add_at_pos(source_type, snippet->source_pos); + f.add_at_pos("```\n", snippet->source_pos); + } + f.add(content, snippet->start_pos, content.get_pos()); + if (in_code) { + f.add_at_pos("\n```\n\n", position); + } + + std::vector params; + + file_ptr body = f.release(); + + storage.push_back(template_symbol( + snippet->id, params, + qbk_value( + body, body->source().begin(), body->source().end(), + template_tags::snippet))); + } +} diff --git a/src/boost/tools/quickbook/src/collector.cpp b/src/boost/tools/quickbook/src/collector.cpp new file mode 100644 index 000000000..31324ab32 --- /dev/null +++ b/src/boost/tools/quickbook/src/collector.cpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "collector.hpp" +#include + +namespace quickbook +{ + string_stream::string_stream() + : buffer_ptr(new std::string()) + , stream_ptr( + new ostream(boost::iostreams::back_inserter(*buffer_ptr.get()))) + { + } + + string_stream::string_stream(string_stream const& other) + : buffer_ptr(other.buffer_ptr), stream_ptr(other.stream_ptr) + { + } + + string_stream& string_stream::operator=(string_stream const& other) + { + buffer_ptr = other.buffer_ptr; + stream_ptr = other.stream_ptr; + return *this; + } + + collector::collector() : main(default_), top(default_) {} + + collector::collector(string_stream& out) : main(out), top(out) {} + + collector::~collector() + { + BOOST_ASSERT( + streams.empty()); // assert there are no more pushes than pops!!! + } + + void collector::push() + { + streams.push(string_stream()); + top = boost::ref(streams.top()); + } + + void collector::pop() + { + BOOST_ASSERT(!streams.empty()); + streams.pop(); + + if (streams.empty()) + top = boost::ref(main); + else + top = boost::ref(streams.top()); + } +} diff --git a/src/boost/tools/quickbook/src/collector.hpp b/src/boost/tools/quickbook/src/collector.hpp new file mode 100644 index 000000000..eb2772c84 --- /dev/null +++ b/src/boost/tools/quickbook/src/collector.hpp @@ -0,0 +1,97 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_COLLECTOR_HPP) +#define BOOST_SPIRIT_QUICKBOOK_COLLECTOR_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace quickbook +{ + struct string_stream + { + typedef boost::iostreams::filtering_ostream ostream; + + string_stream(); + string_stream(string_stream const& other); + string_stream& operator=(string_stream const& other); + + std::string const& str() const + { + stream_ptr->flush(); + return *buffer_ptr.get(); + } + + std::ostream& get() const { return *stream_ptr.get(); } + + void clear() { buffer_ptr->clear(); } + + void swap(std::string& other) + { + stream_ptr->flush(); + std::swap(other, *buffer_ptr.get()); + } + + void append(std::string const& other) + { + stream_ptr->flush(); + *buffer_ptr.get() += other; + } + + private: + boost::shared_ptr buffer_ptr; + boost::shared_ptr stream_ptr; + }; + + struct collector : boost::noncopyable + { + collector(); + collector(string_stream& out); + ~collector(); + + void push(); + void pop(); + + std::ostream& get() const { return top.get().get(); } + + std::string const& str() const { return top.get().str(); } + + void clear() { top.get().clear(); } + + void swap(std::string& other) { top.get().swap(other); } + + void append(std::string const& other) { top.get().append(other); } + + private: + std::stack streams; + boost::reference_wrapper main; + boost::reference_wrapper top; + string_stream default_; + }; + + template + inline collector& operator<<(collector& out, T const& val) + { + out.get() << val; + return out; + } + + inline collector& operator<<(collector& out, std::string const& val) + { + out.append(val); + return out; + } +} + +#endif // BOOST_SPIRIT_QUICKBOOK_COLLECTOR_HPP diff --git a/src/boost/tools/quickbook/src/dependency_tracker.cpp b/src/boost/tools/quickbook/src/dependency_tracker.cpp new file mode 100644 index 000000000..5f50352b1 --- /dev/null +++ b/src/boost/tools/quickbook/src/dependency_tracker.cpp @@ -0,0 +1,134 @@ +/*============================================================================= + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "dependency_tracker.hpp" +#include +#include +#include "for.hpp" +#include "path.hpp" + +namespace quickbook +{ + static char const* control_escapes[16] = { + "\\000", "\\001", "\\002", "\\003", "\\004", "\\005", "\\006", "\\a", + "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\016", "\\017"}; + + static std::string escaped_path(std::string const& generic) + { + std::string result; + result.reserve(generic.size()); + + QUICKBOOK_FOR (char c, generic) { + if (c >= 0 && c < 16) { + result += control_escapes[(unsigned int)c]; + } + else if (c == '\\') { + result += "\\\\"; + } + else if (c == 127) { + result += "\\177"; + } + else { + result += c; + } + } + + return result; + } + + static std::string get_path( + fs::path const& path, dependency_tracker::flags f) + { + std::string generic = quickbook::detail::path_to_generic(path); + + if (f & dependency_tracker::escaped) { + generic = escaped_path(generic); + } + + return generic; + } + + dependency_tracker::dependency_tracker() + : dependencies() + , glob_dependencies() + , last_glob(glob_dependencies.end()) + { + } + + bool dependency_tracker::add_dependency(fs::path const& f) + { + bool found = fs::exists(fs::status(f)); + dependencies[f] |= found; + return found; + } + + void dependency_tracker::add_glob(fs::path const& f) + { + std::pair r = glob_dependencies.insert( + std::make_pair(f, glob_list::mapped_type())); + last_glob = r.first; + } + + void dependency_tracker::add_glob_match(fs::path const& f) + { + assert(last_glob != glob_dependencies.end()); + last_glob->second.insert(f); + } + + void dependency_tracker::write_dependencies( + fs::path const& file_out, flags f) + { + fs::ofstream out(file_out); + + if (out.fail()) { + throw std::runtime_error( + "Error opening dependency file " + + quickbook::detail::path_to_generic(file_out)); + } + + out.exceptions(std::ios::badbit); + write_dependencies(out, f); + } + + void dependency_tracker::write_dependencies(std::ostream& out, flags f) + { + if (f & checked) { + QUICKBOOK_FOR (dependency_list::value_type const& d, dependencies) { + out << (d.second ? "+ " : "- ") << get_path(d.first, f) + << std::endl; + } + + QUICKBOOK_FOR (glob_list::value_type const& g, glob_dependencies) { + out << "g " << get_path(g.first, f) << std::endl; + + QUICKBOOK_FOR (fs::path const& p, g.second) { + out << "+ " << get_path(p, f) << std::endl; + } + } + } + else { + std::set paths; + + QUICKBOOK_FOR (dependency_list::value_type const& d, dependencies) { + if (d.second) { + paths.insert(get_path(d.first, f)); + } + } + + QUICKBOOK_FOR (glob_list::value_type const& g, glob_dependencies) { + QUICKBOOK_FOR (fs::path const& p, g.second) { + paths.insert(get_path(p, f)); + } + } + + QUICKBOOK_FOR (std::string const& p, paths) { + out << p << std::endl; + } + } + } +} diff --git a/src/boost/tools/quickbook/src/dependency_tracker.hpp b/src/boost/tools/quickbook/src/dependency_tracker.hpp new file mode 100644 index 000000000..b0a3764fa --- /dev/null +++ b/src/boost/tools/quickbook/src/dependency_tracker.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(QUICKBOOK_DEPENDENCY_TRACKER_HPP) +#define QUICKBOOK_DEPENDENCY_TRACKER_HPP + +#include +#include +#include +#include + +namespace quickbook +{ + namespace fs = boost::filesystem; + + struct dependency_tracker + { + private: + typedef std::map dependency_list; + typedef std::map > glob_list; + + dependency_list dependencies; + glob_list glob_dependencies; + glob_list::iterator last_glob; + + public: + enum flags + { + default_ = 0, + checked = 1, + escaped = 2 + }; + + dependency_tracker(); + + // Call this before loading any file so that it will be included in the + // list of dependencies. Returns true if file exists. + bool add_dependency(fs::path const&); + + void add_glob(fs::path const&); + void add_glob_match(fs::path const&); + + void write_dependencies(fs::path const&, flags = default_); + void write_dependencies(std::ostream&, flags = default_); + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/doc_info_actions.cpp b/src/boost/tools/quickbook/src/doc_info_actions.cpp new file mode 100644 index 000000000..1472eed0d --- /dev/null +++ b/src/boost/tools/quickbook/src/doc_info_actions.cpp @@ -0,0 +1,610 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include +#include +#include +#include +#include "doc_info_tags.hpp" +#include "document_state.hpp" +#include "files.hpp" +#include "for.hpp" +#include "path.hpp" +#include "quickbook.hpp" +#include "state.hpp" +#include "stream.hpp" +#include "utils.hpp" + +using namespace boost::placeholders; + +namespace quickbook +{ + struct doc_info_values + { + std::string doc_type; + value doc_title; + std::vector escaped_attributes; + value qbk_version, compatibility_mode; + value id, dirname, last_revision, purpose; + std::vector categories; + value lang, version; + std::vector authors; + std::vector copyrights; + value license; + std::vector biblioids; + value xmlbase; + std::string xmlbase_value; + + std::string id_placeholder; + std::string include_doc_id_, id_; + }; + + static void write_document_title( + collector& out, value const& title, value const& version); + std::string write_boostbook_header( + quickbook::state& state, doc_info_values const& info, bool nested_file); + + static std::string doc_info_output(value const& p, unsigned version) + { + if (qbk_version_n < version) { + std::string value = p.get_quickbook().to_s(); + value.erase(value.find_last_not_of(" \t") + 1); + return value; + } + else { + return p.get_encoded(); + } + } + + char const* doc_info_attribute_name(value::tag_type tag) + { + return doc_attributes::is_tag(tag) ? doc_attributes::name(tag) + : doc_info_attributes::name(tag); + } + + // Each docinfo attribute is stored in a value list, these are then stored + // in a sorted value list. The following convenience methods extract all the + // values for an attribute tag. + + // Expecting at most one attribute, with several values in the list. + value consume_list( + value_consumer& c, + value::tag_type tag, + std::vector* duplicates) + { + value p; + + int count = 0; + while (c.check(tag)) { + p = c.consume(); + ++count; + } + + if (count > 1) duplicates->push_back(doc_info_attribute_name(tag)); + + return p; + } + + // Expecting at most one attribute, with a single value, so extract that + // immediately. + value consume_value_in_list( + value_consumer& c, + value::tag_type tag, + std::vector* duplicates) + { + value l = consume_list(c, tag, duplicates); + if (l.empty()) return l; + + assert(l.is_list()); + value_consumer c2 = l; + value p = c2.consume(); + c2.finish(); + + return p; + } + + // Any number of attributes, so stuff them into a vector. + std::vector consume_multiple_values( + value_consumer& c, value::tag_type tag) + { + std::vector values; + + while (c.check(tag)) { + values.push_back(c.consume()); + } + + return values; + } + + enum version_state + { + version_unknown, + version_stable, + version_dev + }; + version_state classify_version(unsigned v) + { + return v < 100u ? version_unknown + : v <= 107u ? version_stable : + // v <= 107u ? version_dev : + version_unknown; + } + + unsigned get_version( + quickbook::state& state, bool using_docinfo, value version) + { + unsigned result = 0; + + if (!version.empty()) { + value_consumer version_values(version); + bool before_docinfo = + version_values.optional_consume(doc_info_tags::before_docinfo) + .check(); + int major_verison = version_values.consume().get_int(); + int minor_verison = version_values.consume().get_int(); + version_values.finish(); + + if (before_docinfo || using_docinfo) { + result = + ((unsigned)major_verison * 100) + (unsigned)minor_verison; + + if (classify_version(result) == version_unknown) { + detail::outerr(state.current_file->path) + << "Unknown version: " << major_verison << "." + << minor_verison << std::endl; + ++state.error_count; + } + } + } + + return result; + } + + std::string pre( + quickbook::state& state, + parse_iterator pos, + value include_doc_id, + bool nested_file) + { + // The doc_info in the file has been parsed. Here's what we'll do + // *before* anything else. + // + // If there isn't a doc info block, then values will be empty, so most + // of the following code won't actually do anything. + + value_consumer values = state.values.release(); + + // Skip over invalid attributes + + while (values.check(value::default_tag)) + values.consume(); + + bool use_doc_info = false; + doc_info_values info; + + if (values.check(doc_info_tags::type)) { + info.doc_type = + values.consume(doc_info_tags::type).get_quickbook().to_s(); + info.doc_title = values.consume(doc_info_tags::title); + use_doc_info = !nested_file || qbk_version_n >= 106u; + } + else { + if (!nested_file) { + detail::outerr(state.current_file, pos.base()) + << "No doc_info block." << std::endl; + + ++state.error_count; + + // Create a fake document info block in order to continue. + info.doc_type = "article"; + info.doc_title = qbk_value( + state.current_file, pos.base(), pos.base(), + doc_info_tags::type); + use_doc_info = true; + } + } + + std::vector duplicates; + + info.escaped_attributes = + consume_multiple_values(values, doc_info_tags::escaped_attribute); + + info.qbk_version = + consume_list(values, doc_attributes::qbk_version, &duplicates); + info.compatibility_mode = consume_list( + values, doc_attributes::compatibility_mode, &duplicates); + consume_multiple_values(values, doc_attributes::source_mode); + + info.id = + consume_value_in_list(values, doc_info_attributes::id, &duplicates); + info.dirname = consume_value_in_list( + values, doc_info_attributes::dirname, &duplicates); + info.last_revision = consume_value_in_list( + values, doc_info_attributes::last_revision, &duplicates); + info.purpose = consume_value_in_list( + values, doc_info_attributes::purpose, &duplicates); + info.categories = + consume_multiple_values(values, doc_info_attributes::category); + info.lang = consume_value_in_list( + values, doc_info_attributes::lang, &duplicates); + info.version = consume_value_in_list( + values, doc_info_attributes::version, &duplicates); + info.authors = + consume_multiple_values(values, doc_info_attributes::authors); + info.copyrights = + consume_multiple_values(values, doc_info_attributes::copyright); + info.license = consume_value_in_list( + values, doc_info_attributes::license, &duplicates); + info.biblioids = + consume_multiple_values(values, doc_info_attributes::biblioid); + info.xmlbase = consume_value_in_list( + values, doc_info_attributes::xmlbase, &duplicates); + + values.finish(); + + if (!duplicates.empty()) { + detail::outwarn(state.current_file->path) + << (duplicates.size() > 1 ? "Duplicate attributes" + : "Duplicate attribute") + << ":" << boost::algorithm::join(duplicates, ", ") << "\n"; + } + + if (!include_doc_id.empty()) + info.include_doc_id_ = include_doc_id.get_quickbook().to_s(); + if (!info.id.empty()) info.id_ = info.id.get_quickbook().to_s(); + + // Quickbook version + + unsigned new_version = + get_version(state, use_doc_info, info.qbk_version); + + if (new_version != qbk_version_n) { + if (classify_version(new_version) == version_dev) { + detail::outwarn(state.current_file->path) + << "Quickbook " << (new_version / 100) << "." + << (new_version % 100) + << " is still under development and is " + "likely to change in the future." + << std::endl; + } + } + + if (new_version) { + qbk_version_n = new_version; + } + else if (use_doc_info) { + // hard code quickbook version to v1.1 + qbk_version_n = 101; + detail::outwarn(state.current_file, pos.base()) + << "Quickbook version undefined. " + "Version 1.1 is assumed" + << std::endl; + } + + state.current_file->version(qbk_version_n); + + // Compatibility Version + + unsigned compatibility_version = + get_version(state, use_doc_info, info.compatibility_mode); + + if (!compatibility_version) { + compatibility_version = + use_doc_info ? qbk_version_n + : state.document.compatibility_version(); + } + + // Start file, finish here if not generating document info. + + if (!use_doc_info) { + state.document.start_file( + compatibility_version, info.include_doc_id_, info.id_, + info.doc_title); + return ""; + } + + info.id_placeholder = state.document.start_file_with_docinfo( + compatibility_version, info.include_doc_id_, info.id_, + info.doc_title); + + // Make sure we really did have a document info block. + + assert(info.doc_title.check() && !info.doc_type.empty()); + + // Set xmlbase + + // std::string xmlbase_value; + + if (!info.xmlbase.empty()) { + path_parameter x = check_xinclude_path(info.xmlbase, state); + + if (x.type == path_parameter::path) { + quickbook_path path = resolve_xinclude_path(x.value, state); + + if (!fs::is_directory(path.file_path)) { + detail::outerr( + info.xmlbase.get_file(), info.xmlbase.get_position()) + << "xmlbase \"" << info.xmlbase.get_quickbook() + << "\" isn't a directory." << std::endl; + + ++state.error_count; + } + else { + info.xmlbase_value = + dir_path_to_url(path.abstract_file_path); + state.xinclude_base = path.file_path; + } + } + } + + // Warn about invalid fields + + if (info.doc_type != "library") { + std::vector invalid_attributes; + + if (!info.purpose.empty()) invalid_attributes.push_back("purpose"); + + if (!info.categories.empty()) + invalid_attributes.push_back("category"); + + if (!info.dirname.empty()) invalid_attributes.push_back("dirname"); + + if (!invalid_attributes.empty()) { + detail::outwarn(state.current_file->path) + << (invalid_attributes.size() > 1 ? "Invalid attributes" + : "Invalid attribute") + << " for '" << info.doc_type << " document info': " + << boost::algorithm::join(invalid_attributes, ", ") << "\n"; + } + } + + return write_boostbook_header(state, info, nested_file); + } + + std::string write_boostbook_header( + quickbook::state& state, doc_info_values const& info, bool nested_file) + { + // Write out header + + if (!nested_file) { + state.out << "\n" + << "\n"; + } + + state.out << '<' << info.doc_type << "\n" + << " id=\"" << info.id_placeholder << "\"\n"; + + if (!info.lang.empty()) { + state.out << " lang=\"" << doc_info_output(info.lang, 106) + << "\"\n"; + } + + if (info.doc_type == "library" && !info.doc_title.empty()) { + state.out << " name=\"" << doc_info_output(info.doc_title, 106) + << "\"\n"; + } + + // Set defaults for dirname + last_revision + + if (!info.dirname.empty() || info.doc_type == "library") { + state.out << " dirname=\""; + if (!info.dirname.empty()) { + state.out << doc_info_output(info.dirname, 106); + } + else if (!info.id_.empty()) { + state.out << info.id_; + } + else if (!info.include_doc_id_.empty()) { + state.out << info.include_doc_id_; + } + else if (!info.doc_title.empty()) { + state.out << detail::make_identifier( + info.doc_title.get_quickbook()); + } + else { + state.out << "library"; + } + + state.out << "\"\n"; + } + + state.out << " last-revision=\""; + if (!info.last_revision.empty()) { + state.out << doc_info_output(info.last_revision, 106); + } + else { + // default value for last-revision is now + + char strdate[64]; + strftime( + strdate, sizeof(strdate), + (debug_mode ? "DEBUG MODE Date: %Y/%m/%d %H:%M:%S $" + : "$" /* prevent CVS substitution */ + "Date: %Y/%m/%d %H:%M:%S $"), + current_gm_time); + + state.out << strdate; + } + + state.out << "\" \n"; + + if (!info.xmlbase_value.empty()) { + state.out << " xml:base=\"" << info.xmlbase_value << "\"\n"; + } + + state.out << " xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n"; + + std::ostringstream tmp; + + if (!info.authors.empty()) { + tmp << " \n"; + QUICKBOOK_FOR (value_consumer author_values, info.authors) { + while (author_values.check()) { + value surname = + author_values.consume(doc_info_tags::author_surname); + value first = + author_values.consume(doc_info_tags::author_first); + + tmp << " \n" + << " " << doc_info_output(first, 106) + << "\n" + << " " << doc_info_output(surname, 106) + << "\n" + << " \n"; + } + } + tmp << " \n"; + } + + QUICKBOOK_FOR (value_consumer copyright, info.copyrights) { + while (copyright.check()) { + tmp << "\n" + << " \n"; + + while (copyright.check(doc_info_tags::copyright_year)) { + value year_start_value = copyright.consume(); + int year_start = year_start_value.get_int(); + int year_end = + copyright.check(doc_info_tags::copyright_year_end) + ? copyright.consume().get_int() + : year_start; + + if (year_end < year_start) { + ++state.error_count; + + detail::outerr( + state.current_file, + copyright.begin()->get_position()) + << "Invalid year range: " << year_start << "-" + << year_end << "." << std::endl; + } + + for (; year_start <= year_end; ++year_start) + tmp << " " << year_start << "\n"; + } + + tmp << " " + << doc_info_output( + copyright.consume(doc_info_tags::copyright_name), + 106) + << "\n" + << " \n" + << "\n"; + } + } + + if (!info.license.empty()) { + tmp << " \n" + << " \n" + << " " << doc_info_output(info.license, 103) << "\n" + << " \n" + << " \n" + << "\n"; + } + + if (!info.purpose.empty()) { + tmp << " <" << info.doc_type << "purpose>\n" + << " " << doc_info_output(info.purpose, 103) << " \n" + << "\n"; + } + + QUICKBOOK_FOR (value_consumer category_values, info.categories) { + value category = category_values.optional_consume(); + if (!category.empty()) { + tmp << " <" << info.doc_type << "category name=\"category:" + << doc_info_output(category, 106) << "\">\n" + << "\n"; + } + category_values.finish(); + } + + QUICKBOOK_FOR (value_consumer biblioid, info.biblioids) { + value class_ = biblioid.consume(doc_info_tags::biblioid_class); + value value_ = biblioid.consume(doc_info_tags::biblioid_value); + + tmp << " " + << doc_info_output(value_, 106) << "" + << "\n"; + biblioid.finish(); + } + + QUICKBOOK_FOR (value escaped, info.escaped_attributes) { + tmp << "" << escaped.get_quickbook() + << ""; + } + + if (info.doc_type != "library") { + write_document_title(state.out, info.doc_title, info.version); + } + + std::string docinfo = tmp.str(); + if (!docinfo.empty()) { + state.out << " <" << info.doc_type << "info>\n" + << docinfo << " \n" + << "\n"; + } + + if (info.doc_type == "library") { + write_document_title(state.out, info.doc_title, info.version); + } + + return info.doc_type; + } + + void post(quickbook::state& state, std::string const& doc_type) + { + // We've finished generating our output. Here's what we'll do + // *after* everything else. + + // Close any open sections. + if (!doc_type.empty() && state.document.section_level() > 1) { + if (state.strict_mode) { + detail::outerr(state.current_file->path) + << "Missing [endsect] detected at end of file (strict " + "mode)." + << std::endl; + ++state.error_count; + } + else { + detail::outwarn(state.current_file->path) + << "Missing [endsect] detected at end of file." + << std::endl; + } + + while (state.document.section_level() > 1) { + state.out << ""; + state.document.end_section(); + } + } + + state.document.end_file(); + if (!doc_type.empty()) state.out << "\n\n\n"; + } + + static void write_document_title( + collector& out, value const& title, value const& version) + { + if (!title.empty()) { + out << " " << doc_info_output(title, 106); + if (!version.empty()) { + out << ' ' << doc_info_output(version, 106); + } + out << "\n\n\n"; + } + } +} diff --git a/src/boost/tools/quickbook/src/doc_info_grammar.cpp b/src/boost/tools/quickbook/src/doc_info_grammar.cpp new file mode 100644 index 000000000..b3ca44aff --- /dev/null +++ b/src/boost/tools/quickbook/src/doc_info_grammar.cpp @@ -0,0 +1,323 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "doc_info_tags.hpp" +#include "for.hpp" +#include "grammar_impl.hpp" +#include "phrase_tags.hpp" +#include "state.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + struct attribute_info + { + attribute_info(value::tag_type t, cl::rule* r) + : tag(t), rule(r) + { + } + + value::tag_type tag; + cl::rule* rule; + }; + + struct doc_info_grammar_local + { + struct assign_attribute_type + { + assign_attribute_type(doc_info_grammar_local& l_) : l(l_) {} + + void operator()(value::tag_type& t) const + { + l.attribute_rule = *l.attribute_rules[t]; + l.attribute_tag = t; + } + + doc_info_grammar_local& l; + }; + + struct fallback_attribute_type + { + fallback_attribute_type(doc_info_grammar_local& l_) : l(l_) {} + + void operator()(parse_iterator, parse_iterator) const + { + l.attribute_rule = l.doc_fallback; + l.attribute_tag = value::default_tag; + } + + doc_info_grammar_local& l; + }; + + cl::rule doc_info_block, doc_attribute, doc_info_attribute, + doc_info_escaped_attributes, doc_title, doc_simple, doc_phrase, + doc_fallback, doc_authors, doc_author, doc_copyright, + doc_copyright_holder, doc_source_mode, doc_biblioid, + doc_compatibility_mode, quickbook_version, macro, char_; + cl::uint_parser doc_copyright_year; + cl::symbols<> doc_types; + cl::symbols doc_info_attributes; + cl::symbols doc_attributes; + std::map*> attribute_rules; + value::tag_type attribute_tag; + cl::rule attribute_rule; + assign_attribute_type assign_attribute; + fallback_attribute_type fallback_attribute; + + doc_info_grammar_local() + : assign_attribute(*this), fallback_attribute(*this) + { + } + + bool source_mode_unset; + }; + + void quickbook_grammar::impl::init_doc_info() + { + doc_info_grammar_local& local = + cleanup_.add(new doc_info_grammar_local); + + typedef cl::uint_parser uint2_t; + + local.doc_types = "book", "article", "library", "chapter", "part", + "appendix", "preface", "qandadiv", "qandaset", "reference", "set"; + + QUICKBOOK_FOR (value::tag_type t, doc_attributes::tags()) { + local.doc_attributes.add(doc_attributes::name(t), t); + local.doc_info_attributes.add(doc_attributes::name(t), t); + } + + QUICKBOOK_FOR (value::tag_type t, doc_info_attributes::tags()) { + local.doc_info_attributes.add(doc_info_attributes::name(t), t); + } + + // Actions + error_action error(state); + plain_char_action plain_char(state); + do_macro_action do_macro(state); + scoped_parser to_value(state); + member_action_value + change_source_mode(state, &state::change_source_mode); + member_action_fixed_value + default_source_mode( + state, &state::change_source_mode, source_mode_tags::cpp); + + // clang-format off + + doc_info_details = + cl::eps_p [ph::var(local.source_mode_unset) = true] + >> *( space + >> local.doc_attribute + ) + >> !( space + >> local.doc_info_block + ) + >> *eol + ; + + local.doc_info_block = + '[' + >> space + >> (local.doc_types >> cl::eps_p) + [state.values.entry(ph::arg1, ph::arg2, doc_info_tags::type)] + >> hard_space + >> to_value(doc_info_tags::title) + [ *( ~cl::eps_p(blank >> (cl::ch_p('[') | ']' | cl::eol_p)) + >> local.char_ + ) + // Include 'blank' here so that it will be included in + // id generation. + >> blank + ] + >> space + >> !(qbk_ver(106u) >> cl::eps_p(ph::var(local.source_mode_unset)) + [default_source_mode] + ) + >> ( *( ( local.doc_info_attribute + | local.doc_info_escaped_attributes + ) + >> space + ) + ) [state.values.sort()] + >> ( ']' + >> (eol | cl::end_p) + | cl::eps_p [error] + ) + ; + + local.doc_attribute = + '[' + >> space + >> local.doc_attributes [local.assign_attribute] + >> hard_space + >> state.values.list(ph::var(local.attribute_tag)) + [ cl::eps_p [state.values.entry(ph::arg1, ph::arg2, doc_info_tags::before_docinfo)] + >> local.attribute_rule + ] + >> space + >> ']' + ; + + local.doc_info_attribute = + '[' + >> space + >> ( local.doc_info_attributes + [local.assign_attribute] + | (+(cl::alnum_p | '_' | '-')) + [local.fallback_attribute] + [error("Unrecognized document attribute: '%s'.")] + ) + >> hard_space + >> state.values.list(ph::var(local.attribute_tag)) + [local.attribute_rule] + >> space + >> ']' + ; + + local.doc_fallback = to_value() [ + *(~cl::eps_p(']') >> local.char_) + ]; + + local.doc_info_escaped_attributes = + ("'''" >> !eol) + >> (*(cl::anychar_p - "'''")) [state.values.entry(ph::arg1, ph::arg2, doc_info_tags::escaped_attribute)] + >> ( cl::str_p("'''") + | cl::eps_p [error("Unclosed boostbook escape.")] + ) + ; + + // Document Attributes + + local.quickbook_version = + cl::uint_p [state.values.entry(ph::arg1)] + >> '.' + >> uint2_t() [state.values.entry(ph::arg1)] + ; + + local.attribute_rules[doc_attributes::qbk_version] = &local.quickbook_version; + + local.doc_compatibility_mode = + cl::uint_p [state.values.entry(ph::arg1)] + >> '.' + >> uint2_t() [state.values.entry(ph::arg1)] + ; + + local.attribute_rules[doc_attributes::compatibility_mode] = &local.doc_compatibility_mode; + + local.doc_source_mode = source_modes + [change_source_mode] + [ph::var(local.source_mode_unset) = false] + ; + + local.attribute_rules[doc_attributes::source_mode] = &local.doc_source_mode; + + // Document Info Attributes + + local.doc_simple = to_value() [*(~cl::eps_p(']') >> local.char_)]; + local.attribute_rules[doc_info_attributes::version] = &local.doc_simple; + local.attribute_rules[doc_info_attributes::id] = &local.doc_simple; + local.attribute_rules[doc_info_attributes::dirname] = &local.doc_simple; + local.attribute_rules[doc_info_attributes::category] = &local.doc_simple; + local.attribute_rules[doc_info_attributes::last_revision] = &local.doc_simple; + local.attribute_rules[doc_info_attributes::lang] = &local.doc_simple; + local.attribute_rules[doc_info_attributes::xmlbase] = &local.doc_simple; + + local.doc_copyright_holder + = *( ~cl::eps_p + ( ']' + | ',' >> space >> local.doc_copyright_year + ) + >> local.char_ + ); + + local.doc_copyright = + *( +( local.doc_copyright_year + [state.values.entry(ph::arg1, doc_info_tags::copyright_year)] + >> space + >> !( '-' + >> space + >> local.doc_copyright_year + [state.values.entry(ph::arg1, doc_info_tags::copyright_year_end)] + >> space + ) + >> !cl::ch_p(',') + >> space + ) + >> to_value(doc_info_tags::copyright_name) [ local.doc_copyright_holder ] + >> !cl::ch_p(',') + >> space + ) + ; + + local.attribute_rules[doc_info_attributes::copyright] = &local.doc_copyright; + + local.doc_phrase = to_value() [ nested_phrase ]; + local.attribute_rules[doc_info_attributes::purpose] = &local.doc_phrase; + local.attribute_rules[doc_info_attributes::license] = &local.doc_phrase; + + local.doc_author = + '[' + >> space + >> to_value(doc_info_tags::author_surname) + [*(~cl::eps_p(',') >> local.char_)] + >> ',' >> space + >> to_value(doc_info_tags::author_first) + [*(~cl::eps_p(']') >> local.char_)] + >> ']' + ; + + local.doc_authors = + *( local.doc_author + >> space + >> !(cl::ch_p(',') >> space) + ) + ; + + local.attribute_rules[doc_info_attributes::authors] = &local.doc_authors; + + local.doc_biblioid = + (+cl::alnum_p) [state.values.entry(ph::arg1, ph::arg2, doc_info_tags::biblioid_class)] + >> hard_space + >> to_value(doc_info_tags::biblioid_value) + [+(~cl::eps_p(']') >> local.char_)] + ; + + local.attribute_rules[doc_info_attributes::biblioid] = &local.doc_biblioid; + + local.char_ = + escape + | local.macro + | cl::anychar_p[plain_char]; + ; + + local.macro = + cl::eps_p + ( ( state.macro + >> ~cl::eps_p(cl::alpha_p | '_') + // must not be followed by alpha or underscore + ) + & macro_identifier // must be a valid macro for the current version + ) + >> state.macro [do_macro] + ; + + // clang-format on + } +} diff --git a/src/boost/tools/quickbook/src/doc_info_tags.hpp b/src/boost/tools/quickbook/src/doc_info_tags.hpp new file mode 100644 index 000000000..2f20c4a07 --- /dev/null +++ b/src/boost/tools/quickbook/src/doc_info_tags.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_DOC_INFO_TAGS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_DOC_INFO_TAGS_HPP + +#include "value_tags.hpp" + +namespace quickbook +{ + // clang-format off + + QUICKBOOK_VALUE_TAGS(doc_info_tags, 0x400, + (before_docinfo) + (type) + (title) + (author_surname)(author_first) + (copyright_year)(copyright_year_end)(copyright_name) + (license) + (biblioid_class)(biblioid_value) + (escaped_attribute) + ) + + QUICKBOOK_VALUE_NAMED_TAGS(doc_attributes, 0x440, + ((qbk_version)("quickbook")) + ((compatibility_mode)("compatibility-mode")) + ((source_mode)("source-mode")) + ) + + QUICKBOOK_VALUE_NAMED_TAGS(doc_info_attributes, 0x450, + ((id)("id")) + ((dirname)("dirname")) + ((last_revision)("last-revision")) + ((purpose)("purpose")) + ((category)("category")) + ((lang)("lang")) + ((version)("version")) + ((authors)("authors")) + ((copyright)("copyright")) + ((license)("license")) + ((biblioid)("biblioid")) + ((xmlbase)("xmlbase")) + ) + + // clang-format on +} + +#endif diff --git a/src/boost/tools/quickbook/src/document_state.cpp b/src/boost/tools/quickbook/src/document_state.cpp new file mode 100644 index 000000000..aaf872ec8 --- /dev/null +++ b/src/boost/tools/quickbook/src/document_state.cpp @@ -0,0 +1,500 @@ +/*============================================================================= + Copyright (c) 2011, 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include "document_state_impl.hpp" +#include "utils.hpp" + +namespace quickbook +{ + struct file_info + { + boost::shared_ptr const parent; + boost::shared_ptr const document; + + unsigned const compatibility_version; + unsigned const depth; + unsigned const override_depth; + id_placeholder const* const override_id; + + // The 1.1-1.5 document id would actually change per file due to + // explicit ids in includes and a bug which would sometimes use the + // document title instead of the id. + std::string const doc_id_1_1; + + // Constructor for files that aren't the root of a document. + explicit file_info( + boost::shared_ptr const& parent_, + unsigned compatibility_version_, + quickbook::string_view doc_id_1_1_, + id_placeholder const* override_id_) + : parent(parent_) + , document(parent->document) + , compatibility_version(compatibility_version_) + , depth(parent->depth + 1) + , override_depth(override_id_ ? depth : parent->override_depth) + , override_id(override_id_ ? override_id_ : parent->override_id) + , doc_id_1_1(doc_id_1_1_.to_s()) + { + } + + // Constructor for files that are the root of a document. + explicit file_info( + boost::shared_ptr const& parent_, + boost::shared_ptr const& document_, + unsigned compatibility_version_, + quickbook::string_view doc_id_1_1_) + : parent(parent_) + , document(document_) + , compatibility_version(compatibility_version_) + , depth(0) + , override_depth(0) + , override_id(0) + , doc_id_1_1(doc_id_1_1_.to_s()) + { + } + }; + + struct doc_info + { + boost::shared_ptr current_section; + + // Note: these are mutable to remain bug compatible with old versions + // of quickbook. They would set these values at the start of new files + // and sections and then not restore them at the end. + std::string last_title_1_1; + std::string section_id_1_1; + }; + + struct section_info + { + boost::shared_ptr const parent; + unsigned const compatibility_version; + unsigned const file_depth; + unsigned const level; + + value const explicit_id; + std::string const id_1_1; + id_placeholder const* const placeholder_1_6; + source_mode_info const source_mode; + + explicit section_info( + boost::shared_ptr const& parent_, + file_info const* current_file_, + value const& explicit_id_, + quickbook::string_view id_1_1_, + id_placeholder const* placeholder_1_6_, + source_mode_info const& source_mode_) + : parent(parent_) + , compatibility_version(current_file_->compatibility_version) + , file_depth(current_file_->depth) + , level(parent ? parent->level + 1 : 1) + , explicit_id(explicit_id_) + , id_1_1(id_1_1_.to_s()) + , placeholder_1_6(placeholder_1_6_) + , source_mode(source_mode_) + { + } + }; + + // + // document_state + // + + document_state::document_state() : state(new document_state_impl) {} + + document_state::~document_state() {} + + void document_state::start_file( + unsigned compatibility_version_, + quickbook::string_view include_doc_id, + quickbook::string_view id, + value const& title_) + { + state->start_file( + compatibility_version_, false, include_doc_id, id, title_); + } + + std::string document_state::start_file_with_docinfo( + unsigned compatibility_version_, + quickbook::string_view include_doc_id, + quickbook::string_view id, + value const& title_) + { + return state + ->start_file( + compatibility_version_, true, include_doc_id, id, title_) + ->to_string(); + } + + void document_state::end_file() { state->end_file(); } + + std::string document_state::begin_section( + value const& explicit_id_, + quickbook::string_view id, + id_category category, + source_mode_info const& source_mode) + { + return state->begin_section(explicit_id_, id, category, source_mode) + ->to_string(); + } + + void document_state::end_section() { return state->end_section(); } + + int document_state::section_level() const + { + return state->current_file->document->current_section->level; + } + + value const& document_state::explicit_id() const + { + return state->current_file->document->current_section->explicit_id; + } + + source_mode_info document_state::section_source_mode() const + { + return state->current_file + ? state->current_file->document->current_section->source_mode + : source_mode_info(); + } + + std::string document_state::old_style_id( + quickbook::string_view id, id_category category) + { + return state->old_style_id(id, category)->to_string(); + } + + std::string document_state::add_id( + quickbook::string_view id, id_category category) + { + return state->add_id(id, category)->to_string(); + } + + std::string document_state::add_anchor( + quickbook::string_view id, id_category category) + { + return state->add_placeholder(id, category)->to_string(); + } + + std::string document_state::replace_placeholders_with_unresolved_ids( + quickbook::string_view xml) const + { + return replace_ids(*state, xml); + } + + std::string document_state::replace_placeholders( + quickbook::string_view xml) const + { + assert(!state->current_file); + std::vector ids = generate_ids(*state, xml); + return replace_ids(*state, xml, &ids); + } + + unsigned document_state::compatibility_version() const + { + return state->current_file->compatibility_version; + } + + // + // id_placeholder + // + + id_placeholder::id_placeholder( + std::size_t index_, + quickbook::string_view id_, + id_category category_, + id_placeholder const* parent_) + : index(index_) + , id(id_.begin(), id_.end()) + , unresolved_id(parent_ ? parent_->unresolved_id + '.' + id : id) + , parent(parent_) + , category(category_) + , num_dots( + boost::range::count(id, '.') + + (parent_ ? parent_->num_dots + 1 : 0)) + { + } + + std::string id_placeholder::to_string() const + { + return '$' + boost::lexical_cast(index); + } + + // + // document_state_impl + // + + id_placeholder const* document_state_impl::add_placeholder( + quickbook::string_view id, + id_category category, + id_placeholder const* parent) + { + placeholders.push_back( + id_placeholder(placeholders.size(), id, category, parent)); + return &placeholders.back(); + } + + id_placeholder const* document_state_impl::get_placeholder( + quickbook::string_view value) const + { + // If this isn't a placeholder id. + if (value.size() <= 1 || *value.begin() != '$') return 0; + + unsigned index = boost::lexical_cast( + std::string(value.begin() + 1, value.end())); + + return &placeholders.at(index); + } + + id_placeholder const* document_state_impl::get_id_placeholder( + boost::shared_ptr const& section) const + { + return !section ? 0 + : section->file_depth < current_file->override_depth + ? current_file->override_id + : section->placeholder_1_6; + } + + id_placeholder const* document_state_impl::start_file( + unsigned compatibility_version, + bool document_root, + quickbook::string_view include_doc_id, + quickbook::string_view id, + value const& title) + { + boost::shared_ptr parent = current_file; + assert(parent || document_root); + + boost::shared_ptr document = + document_root ? boost::make_shared() : parent->document; + + // Choose specified id to use. Prefer 'include_doc_id' (the id + // specified in an 'include' element) unless backwards compatibility + // is required. + + quickbook::string_view initial_doc_id; + + if (document_root || compatibility_version >= 106u || + parent->compatibility_version >= 106u) { + initial_doc_id = !include_doc_id.empty() ? include_doc_id : id; + } + else { + initial_doc_id = !id.empty() ? id : include_doc_id; + } + + // Work out this file's doc_id for older versions of quickbook. + // A bug meant that this need to be done per file, not per + // document. + + std::string doc_id_1_1; + + if (document_root || compatibility_version < 106u) { + if (title.check()) + document->last_title_1_1 = title.get_quickbook().to_s(); + + doc_id_1_1 = + !initial_doc_id.empty() + ? initial_doc_id.to_s() + : detail::make_identifier(document->last_title_1_1); + } + else if (parent) { + doc_id_1_1 = parent->doc_id_1_1; + } + + if (document_root) { + // Create new file + + current_file = boost::make_shared( + parent, document, compatibility_version, doc_id_1_1); + + // Create a section for the new document. + + source_mode_info default_source_mode; + + if (!initial_doc_id.empty()) { + return create_new_section( + empty_value(), id, id_category::explicit_section_id, + default_source_mode); + } + else if (!title.empty()) { + return create_new_section( + empty_value(), + detail::make_identifier(title.get_quickbook()), + id_category::generated_doc, default_source_mode); + } + else if (compatibility_version >= 106u) { + return create_new_section( + empty_value(), "doc", id_category::numbered, + default_source_mode); + } + else { + return create_new_section( + empty_value(), "", id_category::generated_doc, + default_source_mode); + } + } + else { + // If an id was set for the file, then the file overrides the + // current section's id with this id. + // + // Don't do this for document_root as it will create a section + // for the document. + // + // Don't do this for older versions, as they use a different + // backwards compatible mechanism to handle file ids. + + id_placeholder const* override_id = 0; + + if (!initial_doc_id.empty() && compatibility_version >= 106u) { + boost::shared_ptr null_section; + + override_id = add_id_to_section( + initial_doc_id, id_category::explicit_section_id, + null_section); + } + + // Create new file + + current_file = boost::make_shared( + parent, compatibility_version, doc_id_1_1, override_id); + + return 0; + } + } + + void document_state_impl::end_file() + { + current_file = current_file->parent; + } + + id_placeholder const* document_state_impl::add_id( + quickbook::string_view id, id_category category) + { + return add_id_to_section( + id, category, current_file->document->current_section); + } + + id_placeholder const* document_state_impl::add_id_to_section( + quickbook::string_view id, + id_category category, + boost::shared_ptr const& section) + { + std::string id_part(id.begin(), id.end()); + + // Note: Normalizing id according to file compatibility version, but + // adding to section according to section compatibility version. + + if (current_file->compatibility_version >= 106u && + category.c < id_category::explicit_id) { + id_part = normalize_id(id); + } + + id_placeholder const* placeholder_1_6 = get_id_placeholder(section); + + if (!section || section->compatibility_version >= 106u) { + return add_placeholder(id_part, category, placeholder_1_6); + } + else { + std::string const& qualified_id = section->id_1_1; + + std::string new_id; + if (!placeholder_1_6) new_id = current_file->doc_id_1_1; + if (!new_id.empty() && !qualified_id.empty()) new_id += '.'; + new_id += qualified_id; + if (!new_id.empty() && !id_part.empty()) new_id += '.'; + new_id += id_part; + + return add_placeholder(new_id, category, placeholder_1_6); + } + } + + id_placeholder const* document_state_impl::old_style_id( + quickbook::string_view id, id_category category) + { + return current_file->compatibility_version < 103u + ? add_placeholder( + current_file->document->section_id_1_1 + "." + + id.to_s(), + category) + : add_id(id, category); + } + + id_placeholder const* document_state_impl::begin_section( + value const& explicit_id, + quickbook::string_view id, + id_category category, + source_mode_info const& source_mode) + { + current_file->document->section_id_1_1 = id.to_s(); + return create_new_section(explicit_id, id, category, source_mode); + } + + id_placeholder const* document_state_impl::create_new_section( + value const& explicit_id, + quickbook::string_view id, + id_category category, + source_mode_info const& source_mode) + { + boost::shared_ptr parent = + current_file->document->current_section; + + id_placeholder const* p = 0; + id_placeholder const* placeholder_1_6 = 0; + + std::string id_1_1; + + if (parent && current_file->compatibility_version < 106u) { + id_1_1 = parent->id_1_1; + if (!id_1_1.empty() && !id.empty()) id_1_1 += "."; + id_1_1.append(id.begin(), id.end()); + } + + if (current_file->compatibility_version >= 106u) { + p = placeholder_1_6 = add_id_to_section(id, category, parent); + } + else if (current_file->compatibility_version >= 103u) { + placeholder_1_6 = get_id_placeholder(parent); + + std::string new_id; + if (!placeholder_1_6) { + new_id = current_file->doc_id_1_1; + if (!id_1_1.empty()) new_id += '.'; + } + new_id += id_1_1; + + p = add_placeholder(new_id, category, placeholder_1_6); + } + else { + placeholder_1_6 = get_id_placeholder(parent); + + std::string new_id; + if (parent && !placeholder_1_6) + new_id = current_file->doc_id_1_1 + '.'; + + new_id += id.to_s(); + + p = add_placeholder(new_id, category, placeholder_1_6); + } + + current_file->document->current_section = + boost::make_shared( + parent, current_file.get(), explicit_id, id_1_1, + placeholder_1_6, source_mode); + + return p; + } + + void document_state_impl::end_section() + { + current_file->document->current_section = + current_file->document->current_section->parent; + } +} diff --git a/src/boost/tools/quickbook/src/document_state.hpp b/src/boost/tools/quickbook/src/document_state.hpp new file mode 100644 index 000000000..a2e056a53 --- /dev/null +++ b/src/boost/tools/quickbook/src/document_state.hpp @@ -0,0 +1,94 @@ +/*============================================================================= + Copyright (c) 2011,2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_DOCUMENT_STATE_HPP) +#define BOOST_QUICKBOOK_DOCUMENT_STATE_HPP + +#include +#include +#include "string_view.hpp" +#include "syntax_highlight.hpp" +#include "values.hpp" + +namespace quickbook +{ + // id_category + // + // Higher categories get priority over lower ones. + + struct id_category + { + enum categories + { + default_category = 0, + numbered, // Just used to avoid random docbook ids + generated, // Generated ids for other elements. + generated_heading, // Generated ids for headings. + generated_section, // Generated ids for sections. + generated_doc, // Generated ids for document. + explicit_id, // Explicitly given by user + explicit_section_id, + explicit_anchor_id + }; + + id_category() : c(default_category) {} + id_category(categories c_) : c(c_) {} + explicit id_category(int c_) : c(categories(c_)) {} + + bool operator==(id_category rhs) const { return c == rhs.c; } + + categories c; + }; + + struct document_state_impl; + + struct document_state + { + document_state(); + ~document_state(); + + std::string start_file_with_docinfo( + unsigned compatibility_version, + quickbook::string_view include_doc_id, + quickbook::string_view id, + value const& title); + + void start_file( + unsigned compatibility_version, + quickbook::string_view include_doc_id, + quickbook::string_view id, + value const& title); + + void end_file(); + + std::string begin_section( + value const&, + quickbook::string_view, + id_category, + source_mode_info const&); + void end_section(); + int section_level() const; + value const& explicit_id() const; + source_mode_info section_source_mode() const; + + std::string old_style_id(quickbook::string_view, id_category); + std::string add_id(quickbook::string_view, id_category); + std::string add_anchor(quickbook::string_view, id_category); + + std::string replace_placeholders_with_unresolved_ids( + quickbook::string_view) const; + std::string replace_placeholders(quickbook::string_view) const; + + unsigned compatibility_version() const; + + private: + boost::scoped_ptr state; + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/document_state_impl.hpp b/src/boost/tools/quickbook/src/document_state_impl.hpp new file mode 100644 index 000000000..e9107d68e --- /dev/null +++ b/src/boost/tools/quickbook/src/document_state_impl.hpp @@ -0,0 +1,156 @@ +/*============================================================================= + Copyright (c) 2011-2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_DOCUMENT_STATE_IMPL_HPP) +#define BOOST_QUICKBOOK_DOCUMENT_STATE_IMPL_HPP + +#include +#include +#include +#include +#include "document_state.hpp" +#include "phrase_tags.hpp" +#include "string_view.hpp" +#include "utils.hpp" + +namespace quickbook +{ + // + // id_placeholder + // + // When generating the xml, quickbook can't allocate the identifiers until + // the end, so it stores in the intermedia xml a placeholder string, + // e.g. id="$1". This represents one of these placeholders. + // + + struct id_placeholder + { + std::size_t index; // The index in document_state_impl::placeholders. + // Use for the dollar identifiers in + // intermediate xml. + std::string id; // The node id. + std::string unresolved_id; + // The id that would be generated + // without any duplicate handling. + // Used for generating old style header anchors. + id_placeholder const* parent; + // Placeholder of the parent id. + id_category category; + std::ptrdiff_t num_dots; // Number of dots in the id. + // Normally equal to the section level + // but not when an explicit id contains + // dots. + + id_placeholder( + std::size_t index, + quickbook::string_view id, + id_category category, + id_placeholder const* parent_); + + std::string to_string() const; + }; + + // + // document_state_impl + // + // Contains all the data tracked by document_state. + // + + struct file_info; + struct doc_info; + struct section_info; + + struct document_state_impl + { + boost::shared_ptr current_file; + std::deque placeholders; + + // Placeholder methods + + id_placeholder const* add_placeholder( + quickbook::string_view, + id_category, + id_placeholder const* parent = 0); + + id_placeholder const* get_placeholder(quickbook::string_view) const; + + id_placeholder const* get_id_placeholder( + boost::shared_ptr const& section) const; + + // Events + + id_placeholder const* start_file( + unsigned compatibility_version, + bool document_root, + quickbook::string_view include_doc_id, + quickbook::string_view id, + value const& title); + + void end_file(); + + id_placeholder const* add_id( + quickbook::string_view id, id_category category); + id_placeholder const* old_style_id( + quickbook::string_view id, id_category category); + id_placeholder const* begin_section( + value const& explicit_id, + quickbook::string_view id, + id_category category, + source_mode_info const&); + void end_section(); + + private: + id_placeholder const* add_id_to_section( + quickbook::string_view id, + id_category category, + boost::shared_ptr const& section); + id_placeholder const* create_new_section( + value const& explicit_id, + quickbook::string_view id, + id_category category, + source_mode_info const&); + }; + + std::string replace_ids( + document_state_impl const& state, + quickbook::string_view xml, + std::vector const* = 0); + std::vector generate_ids( + document_state_impl const&, quickbook::string_view); + + std::string normalize_id(quickbook::string_view src_id); + std::string normalize_id(quickbook::string_view src_id, std::size_t); + + // + // Xml subset parser used for finding id values. + // + // I originally tried to integrate this into the post processor + // but that proved tricky. Alternatively it could use a proper + // xml parser, but I want this to be able to survive badly + // marked up escapes. + // + + struct xml_processor + { + xml_processor(); + + std::vector id_attributes; + + struct callback + { + virtual void start(quickbook::string_view) {} + virtual void id_value(quickbook::string_view) {} + virtual void finish(quickbook::string_view) {} + virtual ~callback() {} + }; + + void parse(quickbook::string_view, callback&); + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/files.cpp b/src/boost/tools/quickbook/src/files.cpp new file mode 100644 index 000000000..8c2140ac6 --- /dev/null +++ b/src/boost/tools/quickbook/src/files.cpp @@ -0,0 +1,600 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "files.hpp" +#include +#include +#include +#include +#include +#include +#include +#include "for.hpp" + +namespace quickbook +{ + namespace + { + boost::unordered_map files; + } + + // Read the first few bytes in a file to see it starts with a byte order + // mark. If it doesn't, then write the characters we've already read in. + // Although, given how UTF-8 works, if we've read anything in, the files + // probably broken. + + template + bool check_bom( + InputIterator& begin, + InputIterator end, + OutputIterator out, + char const* chars, + int length) + { + char const* ptr = chars; + + while (begin != end && *begin == *ptr) { + ++begin; + ++ptr; + --length; + if (length == 0) return true; + } + + // Failed to match, so write the skipped characters to storage: + while (chars != ptr) + *out++ = *chars++; + + return false; + } + + template + std::string read_bom( + InputIterator& begin, InputIterator end, OutputIterator out) + { + if (begin == end) return ""; + + const char* utf8 = "\xef\xbb\xbf"; + const char* utf32be = "\0\0\xfe\xff"; + const char* utf32le = "\xff\xfe\0\0"; + + unsigned char c = *begin; + switch (c) { + case 0xEF: { // UTF-8 + return check_bom(begin, end, out, utf8, 3) ? "UTF-8" : ""; + } + case 0xFF: // UTF-16/UTF-32 little endian + return !check_bom(begin, end, out, utf32le, 2) + ? "" + : check_bom(begin, end, out, utf32le + 2, 2) ? "UTF-32" + : "UTF-16"; + case 0: // UTF-32 big endian + return check_bom(begin, end, out, utf32be, 4) ? "UTF-32" : ""; + case 0xFE: // UTF-16 big endian + return check_bom(begin, end, out, utf32be + 2, 2) ? "UTF-16" : ""; + default: + return ""; + } + } + + // Copy a string, converting mac and windows style newlines to unix + // newlines. + + template + void normalize(InputIterator begin, InputIterator end, OutputIterator out) + { + std::string encoding = read_bom(begin, end, out); + + if (encoding != "UTF-8" && encoding != "") + throw load_error(encoding + " is not supported. Please use UTF-8."); + + while (begin != end) { + if (*begin == '\r') { + *out++ = '\n'; + ++begin; + if (begin != end && *begin == '\n') ++begin; + } + else { + *out++ = *begin++; + } + } + } + + file_ptr load(fs::path const& filename, unsigned qbk_version) + { + boost::unordered_map::iterator pos = + files.find(filename); + + if (pos == files.end()) { + fs::ifstream in(filename, std::ios_base::in); + + if (!in) throw load_error("Could not open input file."); + + // Turn off white space skipping on the stream + in.unsetf(std::ios::skipws); + + std::string source; + normalize( + std::istream_iterator(in), std::istream_iterator(), + std::back_inserter(source)); + + if (in.bad()) throw load_error("Error reading input file."); + + bool inserted; + + boost::tie(pos, inserted) = files.emplace( + filename, new file(filename, source, qbk_version)); + + assert(inserted); + } + + return pos->second; + } + + std::ostream& operator<<(std::ostream& out, file_position const& x) + { + return out << "line: " << x.line << ", column: " << x.column; + } + + file_position relative_position( + string_iterator begin, string_iterator iterator) + { + file_position pos; + string_iterator line_begin = begin; + + while (begin != iterator) { + if (*begin == '\r') { + ++begin; + ++pos.line; + line_begin = begin; + } + else if (*begin == '\n') { + ++begin; + ++pos.line; + line_begin = begin; + if (begin == iterator) break; + if (*begin == '\r') { + ++begin; + line_begin = begin; + } + } + else { + ++begin; + } + } + + pos.column = iterator - line_begin + 1; + return pos; + } + + file_position file::position_of(string_iterator iterator) const + { + return relative_position(source().begin(), iterator); + } + + // Mapped files. + + struct mapped_file_section + { + enum section_types + { + normal, + empty, + indented + }; + + std::string::size_type original_pos; + std::string::size_type our_pos; + section_types section_type; + + explicit mapped_file_section( + std::string::size_type original_pos_, + std::string::size_type our_pos_, + section_types section_type_ = normal) + : original_pos(original_pos_) + , our_pos(our_pos_) + , section_type(section_type_) + { + } + }; + + struct mapped_section_original_cmp + { + bool operator()( + mapped_file_section const& x, mapped_file_section const& y) + { + return x.original_pos < y.original_pos; + } + + bool operator()( + mapped_file_section const& x, std::string::size_type const& y) + { + return x.original_pos < y; + } + + bool operator()( + std::string::size_type const& x, mapped_file_section const& y) + { + return x < y.original_pos; + } + }; + + struct mapped_section_pos_cmp + { + bool operator()( + mapped_file_section const& x, mapped_file_section const& y) + { + return x.our_pos < y.our_pos; + } + + bool operator()( + mapped_file_section const& x, std::string::size_type const& y) + { + return x.our_pos < y; + } + + bool operator()( + std::string::size_type const& x, mapped_file_section const& y) + { + return x < y.our_pos; + } + }; + + struct mapped_file : file + { + explicit mapped_file(file_ptr original_) + : file(*original_, std::string()) + , original(original_) + , mapped_sections() + { + } + + file_ptr original; + std::vector mapped_sections; + + void add_empty_mapped_file_section(string_iterator pos) + { + std::string::size_type original_pos = + pos - original->source().begin(); + + if (mapped_sections.empty() || + mapped_sections.back().section_type != + mapped_file_section::empty || + mapped_sections.back().original_pos != original_pos) { + mapped_sections.push_back(mapped_file_section( + original_pos, source().size(), mapped_file_section::empty)); + } + } + + void add_mapped_file_section(string_iterator pos) + { + mapped_sections.push_back(mapped_file_section( + pos - original->source().begin(), source().size())); + } + + void add_indented_mapped_file_section(string_iterator pos) + { + mapped_sections.push_back(mapped_file_section( + pos - original->source().begin(), source().size(), + mapped_file_section::indented)); + } + + std::string::size_type to_original_pos( + std::vector::const_iterator section, + std::string::size_type pos) const + { + switch (section->section_type) { + case mapped_file_section::normal: + return pos - section->our_pos + section->original_pos; + + case mapped_file_section::empty: + return section->original_pos; + + case mapped_file_section::indented: { + // Will contain the start of the current line. + quickbook::string_view::size_type our_line = section->our_pos; + + // Will contain the number of lines in the block before + // the current line. + unsigned newline_count = 0; + + for (quickbook::string_view::size_type i = section->our_pos; + i != pos; ++i) { + if (source()[i] == '\n') { + our_line = i + 1; + ++newline_count; + } + } + + // The start of the line in the original source. + quickbook::string_view::size_type original_line = + section->original_pos; + + while (newline_count > 0) { + if (original->source()[original_line] == '\n') + --newline_count; + ++original_line; + } + + // The start of line content (i.e. after indentation). + our_line = skip_indentation(source(), our_line); + + // The position is in the middle of indentation, so + // just return the start of the whitespace, which should + // be good enough. + if (our_line > pos) return original_line; + + original_line = + skip_indentation(original->source(), original_line); + + // Confirm that we are actually in the same position. + assert(original->source()[original_line] == source()[our_line]); + + // Calculate the position + return original_line + (pos - our_line); + } + default: + assert(false); + return section->original_pos; + } + } + + std::vector::const_iterator find_section( + string_iterator pos) const + { + std::vector::const_iterator section = + boost::upper_bound( + mapped_sections, + std::string::size_type(pos - source().begin()), + mapped_section_pos_cmp()); + assert(section != mapped_sections.begin()); + --section; + + return section; + } + + virtual file_position position_of(string_iterator) const; + + private: + static std::string::size_type skip_indentation( + quickbook::string_view src, std::string::size_type i) + { + while (i != src.size() && (src[i] == ' ' || src[i] == '\t')) + ++i; + return i; + } + }; + + namespace + { + std::list mapped_files; + } + + struct mapped_file_builder_data + { + mapped_file_builder_data() { reset(); } + void reset() { new_file.reset(); } + + boost::intrusive_ptr new_file; + }; + + mapped_file_builder::mapped_file_builder() : data(0) {} + mapped_file_builder::~mapped_file_builder() { delete data; } + + void mapped_file_builder::start(file_ptr f) + { + if (!data) { + data = new mapped_file_builder_data; + } + + assert(!data->new_file); + data->new_file = new mapped_file(f); + } + + file_ptr mapped_file_builder::release() + { + file_ptr r = data->new_file; + data->reset(); + return r; + } + + void mapped_file_builder::clear() { data->reset(); } + + bool mapped_file_builder::empty() const + { + return data->new_file->source().empty(); + } + + mapped_file_builder::pos_type mapped_file_builder::get_pos() const + { + return data->new_file->source().size(); + } + + void mapped_file_builder::add_at_pos(quickbook::string_view x, iterator pos) + { + data->new_file->add_empty_mapped_file_section(pos); + data->new_file->source_.append(x.begin(), x.end()); + } + + void mapped_file_builder::add(quickbook::string_view x) + { + data->new_file->add_mapped_file_section(x.begin()); + data->new_file->source_.append(x.begin(), x.end()); + } + + void mapped_file_builder::add(mapped_file_builder const& x) + { + add(x, 0, x.data->new_file->source_.size()); + } + + void mapped_file_builder::add( + mapped_file_builder const& x, pos_type begin, pos_type end) + { + assert(data->new_file->original == x.data->new_file->original); + assert(begin <= x.data->new_file->source_.size()); + assert(end <= x.data->new_file->source_.size()); + + if (begin != end) { + std::vector::const_iterator i = + x.data->new_file->find_section( + x.data->new_file->source().begin() + begin); + + std::string::size_type size = data->new_file->source_.size(); + + data->new_file->mapped_sections.push_back(mapped_file_section( + x.data->new_file->to_original_pos(i, begin), size, + i->section_type)); + + for (++i; i != x.data->new_file->mapped_sections.end() && + i->our_pos < end; + ++i) { + data->new_file->mapped_sections.push_back(mapped_file_section( + i->original_pos, i->our_pos - begin + size, + i->section_type)); + } + + data->new_file->source_.append( + x.data->new_file->source_.begin() + begin, + x.data->new_file->source_.begin() + end); + } + } + + quickbook::string_view::size_type indentation_count( + quickbook::string_view x) + { + unsigned count = 0; + + QUICKBOOK_FOR (auto c, x) { + switch (c) { + case ' ': + ++count; + break; + case '\t': + // hardcoded tab to 4 for now + count = count - (count % 4) + 4; + break; + default: + assert(false); + } + } + + return count; + } + + void mapped_file_builder::unindent_and_add(quickbook::string_view x) + { + // I wanted to do everything using a string_ref, but unfortunately + // they don't have all the overloads used in here. So... + std::string const program(x.begin(), x.end()); + + // Erase leading blank lines and newlines: + std::string::size_type text_start = + program.find_first_not_of(" \t\r\n"); + if (text_start == std::string::npos) return; + + text_start = program.find_last_of("\r\n", text_start); + text_start = text_start == std::string::npos ? 0 : text_start + 1; + + assert(text_start < program.size()); + + // Get the first line indentation + std::string::size_type indent = + program.find_first_not_of(" \t", text_start) - text_start; + quickbook::string_view::size_type full_indent = indentation_count( + quickbook::string_view(&program[text_start], indent)); + + std::string::size_type pos = text_start; + + // Calculate the minimum indent from the rest of the lines + // Detecting a mix of spaces and tabs. + while (std::string::npos != + (pos = program.find_first_of("\r\n", pos))) { + pos = program.find_first_not_of("\r\n", pos); + if (std::string::npos == pos) break; + + std::string::size_type n = program.find_first_not_of(" \t", pos); + if (n == std::string::npos) break; + + char ch = program[n]; + if (ch == '\r' || ch == '\n') continue; // ignore empty lines + + indent = (std::min)(indent, n - pos); + full_indent = (std::min)( + full_indent, indentation_count(quickbook::string_view( + &program[pos], n - pos))); + } + + // Detect if indentation is mixed. + bool mixed_indentation = false; + quickbook::string_view first_indent(&program[text_start], indent); + pos = text_start; + + while (std::string::npos != + (pos = program.find_first_of("\r\n", pos))) { + pos = program.find_first_not_of("\r\n", pos); + if (std::string::npos == pos) break; + + std::string::size_type n = program.find_first_not_of(" \t", pos); + if (n == std::string::npos || n - pos < indent) continue; + + if (quickbook::string_view(&program[pos], indent) != first_indent) { + mixed_indentation = true; + break; + } + } + + // Trim white spaces from column 0..indent + std::string unindented_program; + std::string::size_type copy_start = text_start; + pos = text_start; + + do { + if (std::string::npos == + (pos = program.find_first_not_of("\r\n", pos))) + break; + + unindented_program.append( + program.begin() + copy_start, program.begin() + pos); + copy_start = pos; + + // Find the end of the indentation. + std::string::size_type next = program.find_first_not_of(" \t", pos); + if (next == std::string::npos) next = program.size(); + + if (mixed_indentation) { + string_view::size_type length = indentation_count( + quickbook::string_view(&program[pos], next - pos)); + + if (length > full_indent) { + std::string new_indentation(length - full_indent, ' '); + unindented_program.append(new_indentation); + } + + copy_start = next; + } + else { + copy_start = (std::min)(pos + indent, next); + } + + pos = next; + } while (std::string::npos != + (pos = program.find_first_of("\r\n", pos))); + + unindented_program.append(program.begin() + copy_start, program.end()); + + data->new_file->add_indented_mapped_file_section(x.begin()); + data->new_file->source_.append(unindented_program); + } + + file_position mapped_file::position_of(string_iterator pos) const + { + return original->position_of( + original->source().begin() + + to_original_pos(find_section(pos), pos - source().begin())); + } +} diff --git a/src/boost/tools/quickbook/src/files.hpp b/src/boost/tools/quickbook/src/files.hpp new file mode 100644 index 000000000..4ff669dfe --- /dev/null +++ b/src/boost/tools/quickbook/src/files.hpp @@ -0,0 +1,160 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_FILES_HPP) +#define BOOST_QUICKBOOK_FILES_HPP + +#include +#include +#include +#include +#include +#include +#include "string_view.hpp" + +namespace quickbook +{ + + namespace fs = boost::filesystem; + + struct file; + typedef boost::intrusive_ptr file_ptr; + + struct file_position + { + file_position() : line(1), column(1) {} + file_position(std::ptrdiff_t l, std::ptrdiff_t c) : line(l), column(c) + { + } + + std::ptrdiff_t line; + std::ptrdiff_t column; + + bool operator==(file_position const& other) const + { + return line == other.line && column == other.column; + } + + friend std::ostream& operator<<(std::ostream&, file_position const&); + }; + + file_position relative_position( + string_iterator begin, string_iterator iterator); + + struct file + { + private: + // Non copyable + file& operator=(file const&); + file(file const&); + + public: + fs::path const path; + std::string source_; + bool is_code_snippets; + + private: + unsigned qbk_version; + unsigned ref_count; + + public: + quickbook::string_view source() const { return source_; } + + file( + fs::path const& path_, + quickbook::string_view source_view, + unsigned qbk_version_) + : path(path_) + , source_(source_view.begin(), source_view.end()) + , is_code_snippets(false) + , qbk_version(qbk_version_) + , ref_count(0) + { + } + + explicit file(file const& f, quickbook::string_view s) + : path(f.path) + , source_(s.begin(), s.end()) + , is_code_snippets(f.is_code_snippets) + , qbk_version(f.qbk_version) + , ref_count(0) + { + } + + virtual ~file() { assert(!ref_count); } + + unsigned version() const + { + assert(qbk_version); + return qbk_version; + } + + void version(unsigned v) + { + // Check that either version hasn't been set, or it was + // previously set to the same version (because the same + // file has been loaded twice). + assert(!qbk_version || qbk_version == v); + qbk_version = v; + } + + virtual file_position position_of(string_iterator) const; + + friend void intrusive_ptr_add_ref(file* ptr) { ++ptr->ref_count; } + + friend void intrusive_ptr_release(file* ptr) + { + if (--ptr->ref_count == 0) delete ptr; + } + }; + + // If version isn't supplied then it must be set later. + file_ptr load(fs::path const& filename, unsigned qbk_version = 0); + + struct load_error : std::runtime_error + { + explicit load_error(std::string const& arg) : std::runtime_error(arg) {} + }; + + // Interface for creating fake files which are mapped to + // real files, so that the position can be found later. + + struct mapped_file_builder_data; + + struct mapped_file_builder + { + typedef string_iterator iterator; + typedef quickbook::string_view::size_type pos_type; + + mapped_file_builder(); + ~mapped_file_builder(); + + void start(file_ptr); + file_ptr release(); + void clear(); + + bool empty() const; + pos_type get_pos() const; + + void add_at_pos(quickbook::string_view, iterator); + void add(quickbook::string_view); + void add(mapped_file_builder const&); + void add(mapped_file_builder const&, pos_type, pos_type); + void unindent_and_add(quickbook::string_view); + + private: + mapped_file_builder_data* data; + + mapped_file_builder(mapped_file_builder const&); + mapped_file_builder& operator=(mapped_file_builder const&); + }; +} + +#endif // BOOST_QUICKBOOK_FILES_HPP diff --git a/src/boost/tools/quickbook/src/for.hpp b/src/boost/tools/quickbook/src/for.hpp new file mode 100644 index 000000000..dd5a1a8cf --- /dev/null +++ b/src/boost/tools/quickbook/src/for.hpp @@ -0,0 +1,25 @@ +/*============================================================================= + Copyright (c) 2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +// Macro for C++11 range based for loop, with BOOST_FOREACH as a fallback. +// Can't use C++11 loop in Visual C++ 10/Visual Studio 2010 or gcc 4.4. +// BOOST_FOREACH was causing warnings in Visual C++ 14.11/Visual Studio 2017 + +#if !defined(BOOST_QUICKBOOK_FOR_HPP) +#define BOOST_QUICKBOOK_FOR_HPP + +#include + +#if !defined(BOOST_NO_CXX11_RANGE_BASED_FOR) +#define QUICKBOOK_FOR(x, y) for (x : y) +#else +#include +#define QUICKBOOK_FOR(x, y) BOOST_FOREACH (x, y) +#endif + +#endif diff --git a/src/boost/tools/quickbook/src/fwd.hpp b/src/boost/tools/quickbook/src/fwd.hpp new file mode 100644 index 000000000..f079aa5bc --- /dev/null +++ b/src/boost/tools/quickbook/src/fwd.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2010 Daniel James + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_FWD_HPP) +#define BOOST_SPIRIT_FWD_HPP + +#include + +namespace quickbook +{ + struct state; + struct quickbook_grammar; + struct collector; + struct document_state; + struct section_info; + struct file; + struct template_symbol; + typedef boost::intrusive_ptr file_ptr; + typedef unsigned source_mode_type; + + inline void ignore_variable(void const*) {} +} + +#endif diff --git a/src/boost/tools/quickbook/src/glob.cpp b/src/boost/tools/quickbook/src/glob.cpp new file mode 100644 index 000000000..224b9ce48 --- /dev/null +++ b/src/boost/tools/quickbook/src/glob.cpp @@ -0,0 +1,349 @@ +/*============================================================================= + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "glob.hpp" +#include + +namespace quickbook +{ + typedef string_iterator glob_iterator; + + void check_glob_range(glob_iterator&, glob_iterator); + void check_glob_escape(glob_iterator&, glob_iterator); + + bool match_section( + glob_iterator& pattern_begin, + glob_iterator pattern_end, + glob_iterator& filename_begin, + glob_iterator& filename_end); + bool match_range( + glob_iterator& pattern_begin, glob_iterator pattern_end, char x); + + // Is pattern a glob or a plain file name? + // Throws glob_error if pattern is an invalid glob. + bool check_glob(quickbook::string_view pattern) + { + bool is_glob = false; + bool is_ascii = true; + + glob_iterator begin = pattern.begin(); + glob_iterator end = pattern.end(); + + while (begin != end) { + if (*begin < 32 || (*begin & 0x80)) is_ascii = false; + + switch (*begin) { + case '\\': + check_glob_escape(begin, end); + break; + + case '[': + check_glob_range(begin, end); + is_glob = true; + break; + + case ']': + throw glob_error("uneven square brackets"); + + case '?': + is_glob = true; + ++begin; + break; + + case '*': + is_glob = true; + ++begin; + + if (begin != end && *begin == '*') { + throw glob_error("'**' not supported"); + } + break; + + default: + ++begin; + } + } + + if (is_glob && !is_ascii) + throw glob_error("invalid character, globs are ascii only"); + + return is_glob; + } + + void check_glob_range(glob_iterator& begin, glob_iterator end) + { + assert(begin != end && *begin == '['); + ++begin; + + if (*begin == ']') throw glob_error("empty range"); + + while (begin != end) { + switch (*begin) { + case '\\': + ++begin; + + if (begin == end) { + throw glob_error("trailing escape"); + } + else if (*begin == '\\' || *begin == '/') { + throw glob_error("contains escaped slash"); + } + + ++begin; + break; + case '[': + throw glob_error("nested square brackets"); + case ']': + ++begin; + return; + case '/': + throw glob_error("slash in square brackets"); + default: + ++begin; + } + } + + throw glob_error("uneven square brackets"); + } + + void check_glob_escape(glob_iterator& begin, glob_iterator end) + { + assert(begin != end && *begin == '\\'); + + ++begin; + + if (begin == end) { + throw glob_error("trailing escape"); + } + else if (*begin == '\\' || *begin == '/') { + throw glob_error("contains escaped slash"); + } + + ++begin; + } + + // Does filename match pattern? + // Might throw glob_error if pattern is an invalid glob, + // but should call check_glob first to validate the glob. + bool glob( + quickbook::string_view const& pattern, + quickbook::string_view const& filename) + { + // If there wasn't this special case then '*' would match an + // empty string. + if (filename.empty()) return pattern.empty(); + + glob_iterator pattern_it = pattern.begin(); + glob_iterator pattern_end = pattern.end(); + + glob_iterator filename_it = filename.begin(); + glob_iterator filename_end = filename.end(); + + if (!match_section(pattern_it, pattern_end, filename_it, filename_end)) + return false; + + while (pattern_it != pattern_end) { + assert(*pattern_it == '*'); + ++pattern_it; + + if (pattern_it == pattern_end) return true; + + if (*pattern_it == '*') { + throw glob_error("'**' not supported"); + } + + for (;;) { + if (filename_it == filename_end) return false; + if (match_section( + pattern_it, pattern_end, filename_it, filename_end)) + break; + ++filename_it; + } + } + + return filename_it == filename_end; + } + + bool match_section( + glob_iterator& pattern_begin, + glob_iterator pattern_end, + glob_iterator& filename_begin, + glob_iterator& filename_end) + { + glob_iterator pattern_it = pattern_begin; + glob_iterator filename_it = filename_begin; + + while (pattern_it != pattern_end && *pattern_it != '*') { + if (filename_it == filename_end) return false; + + switch (*pattern_it) { + case '*': + assert(false); + throw new glob_error("Internal error"); + case '[': + if (!match_range(pattern_it, pattern_end, *filename_it)) + return false; + ++filename_it; + break; + case ']': + throw glob_error("uneven square brackets"); + case '?': + ++pattern_it; + ++filename_it; + break; + case '\\': + ++pattern_it; + if (pattern_it == pattern_end) { + throw glob_error("trailing escape"); + } + else if (*pattern_it == '\\' || *pattern_it == '/') { + throw glob_error("contains escaped slash"); + } + BOOST_FALLTHROUGH; + default: + if (*pattern_it != *filename_it) return false; + ++pattern_it; + ++filename_it; + } + } + + if (pattern_it == pattern_end && filename_it != filename_end) + return false; + + pattern_begin = pattern_it; + filename_begin = filename_it; + return true; + } + + bool match_range( + glob_iterator& pattern_begin, glob_iterator pattern_end, char x) + { + assert(pattern_begin != pattern_end && *pattern_begin == '['); + ++pattern_begin; + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + + bool invert_match = false; + bool matched = false; + + if (*pattern_begin == '^') { + invert_match = true; + ++pattern_begin; + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + } + else if (*pattern_begin == ']') { + throw glob_error("empty range"); + } + + // Search for a match + for (;;) { + unsigned char first = *pattern_begin; + ++pattern_begin; + if (first == ']') break; + if (first == '[') { + throw glob_error("nested square brackets"); + } + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + + if (first == '\\') { + first = *pattern_begin; + if (first == '\\' || first == '/') { + throw glob_error("contains escaped slash"); + } + ++pattern_begin; + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + } + else if (first == '/') { + throw glob_error("slash in square brackets"); + } + + if (*pattern_begin != '-') { + matched = matched || (first == x); + } + else { + ++pattern_begin; + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + + unsigned char second = *pattern_begin; + ++pattern_begin; + if (second == ']') { + matched = matched || (first == x) || (x == '-'); + break; + } + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + + if (second == '\\') { + second = *pattern_begin; + if (second == '\\' || second == '/') { + throw glob_error("contains escaped slash"); + } + ++pattern_begin; + if (pattern_begin == pattern_end) { + throw glob_error("uneven square brackets"); + } + } + else if (second == '/') { + throw glob_error("slash in square brackets"); + } + + matched = matched || (first <= x && x <= second); + } + } + + return invert_match != matched; + } + + std::size_t find_glob_char(quickbook::string_view pattern, std::size_t pos) + { + // Weird style is because quickbook::string_view's find_first_of + // doesn't take a position argument. + std::size_t removed = 0; + + for (;;) { + pos = pattern.find_first_of("[]?*\\"); + if (pos == quickbook::string_view::npos) return pos; + if (pattern[pos] != '\\') return pos + removed; + pattern.remove_prefix(pos + 2); + removed += pos + 2; + } + } + + std::string glob_unescape(quickbook::string_view pattern) + { + std::string result; + + for (;;) { + std::size_t pos = pattern.find("\\"); + if (pos == quickbook::string_view::npos) { + result.append(pattern.data(), pattern.size()); + break; + } + + result.append(pattern.data(), pos); + ++pos; + if (pos < pattern.size()) { + result += pattern[pos]; + ++pos; + } + pattern.remove_prefix(pos); + } + + return result; + } +} diff --git a/src/boost/tools/quickbook/src/glob.hpp b/src/boost/tools/quickbook/src/glob.hpp new file mode 100644 index 000000000..5d657c0c7 --- /dev/null +++ b/src/boost/tools/quickbook/src/glob.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_GLOB_HPP) +#define BOOST_QUICKBOOK_GLOB_HPP + +#include +#include "string_view.hpp" + +namespace quickbook +{ + struct glob_error : std::runtime_error + { + explicit glob_error(char const* error) : std::runtime_error(error) {} + }; + + // Is this path a glob? Throws glob_error if glob is invalid. + bool check_glob(quickbook::string_view); + + // pre: glob is valid (call check_glob first on user data). + bool glob( + quickbook::string_view const& pattern, + quickbook::string_view const& filename); + + std::size_t find_glob_char(quickbook::string_view, std::size_t start = 0); + std::string glob_unescape(quickbook::string_view); +} + +#endif diff --git a/src/boost/tools/quickbook/src/grammar.cpp b/src/boost/tools/quickbook/src/grammar.cpp new file mode 100644 index 000000000..24a3e96ad --- /dev/null +++ b/src/boost/tools/quickbook/src/grammar.cpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2010 Daniel James + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "grammar_impl.hpp" + +namespace quickbook +{ + quickbook_grammar::quickbook_grammar(quickbook::state& s) + : impl_(new impl(s)) + , command_line_macro(impl_->command_line, "command_line_macro") + , inline_phrase(impl_->inline_phrase, "inline_phrase") + , phrase_start(impl_->phrase_start, "phrase") + , block_start(impl_->block_start, "block") + , attribute_template_body( + impl_->attribute_template_body, "attribute_template_body") + , doc_info(impl_->doc_info_details, "doc_info") + { + } + + quickbook_grammar::~quickbook_grammar() {} + + quickbook_grammar::impl::impl(quickbook::state& s) : state(s), cleanup_() + { + init_main(); + init_block_elements(); + init_phrase_elements(); + init_doc_info(); + } +} diff --git a/src/boost/tools/quickbook/src/grammar.hpp b/src/boost/tools/quickbook/src/grammar.hpp new file mode 100644 index 000000000..17fea7d44 --- /dev/null +++ b/src/boost/tools/quickbook/src/grammar.hpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_GRAMMARS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_GRAMMARS_HPP + +#include +#include "fwd.hpp" +#include "iterator.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + // The spirit scanner for explicitly instantiating grammars. This is a + // spirit implementation detail, but since classic is no longer under + // development, it won't change. And spirit 2 won't require such a hack. + + typedef cl::scanner< + parse_iterator, + cl::scanner_policies< + cl::iteration_policy, + cl::match_policy, + cl::action_policy> > + scanner; + + template + struct Scanner_must_be_the_quickbook_scanner_typedef; + template <> struct Scanner_must_be_the_quickbook_scanner_typedef + { + }; + + struct grammar : public cl::grammar + { + grammar(cl::rule const& start_rule_, char const* /* name */) + : start_rule(start_rule_) + { + } + + template + struct definition + : Scanner_must_be_the_quickbook_scanner_typedef + { + definition(grammar const& self) : start_rule(self.start_rule) {} + cl::rule const& start() const { return start_rule; } + cl::rule const& start_rule; + }; + + cl::rule const& start_rule; + }; + + struct quickbook_grammar + { + public: + struct impl; + + private: + boost::scoped_ptr impl_; + + public: + grammar command_line_macro; + grammar inline_phrase; + grammar phrase_start; + grammar block_start; + grammar attribute_template_body; + grammar doc_info; + + quickbook_grammar(quickbook::state&); + ~quickbook_grammar(); + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/grammar_impl.hpp b/src/boost/tools/quickbook/src/grammar_impl.hpp new file mode 100644 index 000000000..74c50155c --- /dev/null +++ b/src/boost/tools/quickbook/src/grammar_impl.hpp @@ -0,0 +1,168 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2010 Daniel James + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_GRAMMARS_IMPL_HPP) +#define BOOST_SPIRIT_QUICKBOOK_GRAMMARS_IMPL_HPP + +#include +#include "cleanup.hpp" +#include "grammar.hpp" +#include "values.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + // Information about a square bracket element (e.g. [* word]), and + // some other syntactic elements (such as lists and horizontal rules).. + struct element_info + { + // Types of elements. + // + // Used to determine: + // + // - where they can be used. + // - whether they end a paragraph + // - how following newlines are interpreted by the grammar. + // - and possibly other things..... + enum type_enum + { + // Used when there's no element. + nothing = 0, + + // A section tag. These can't be nested. + section_block = 1, + + // Block elements that can be used in conditional phrases and lists, + // but not nested. + conditional_or_block = 2, + + // Block elements that can be nested in other elements. + nested_block = 4, + + // Phrase elements. + phrase = 8, + + // Depending on the context this can be a block or phrase. + // + // Currently this is only used for elements that don't actually + // generate output (e.g. anchors, source mode tags). The main + // reason is so that lists can be preceeded by the element, e.g. + // + // [#anchor] + // * list item. + // + // If the anchor was considered to be a phrase element, then the + // list wouldn't be recognised. + maybe_block = 16 + }; + + // Masks to determine which context elements can be used in (in_*), and + // whether they are consided to be a block element (is_*). + enum context + { + // At the top level we allow everything. + in_top_level = phrase | maybe_block | nested_block | + conditional_or_block | section_block, + + // In conditional phrases and list blocks we everything but section + // elements. + in_conditional = + phrase | maybe_block | nested_block | conditional_or_block, + in_list_block = + phrase | maybe_block | nested_block | conditional_or_block, + + // In nested blocks we allow a more limited range of elements. + in_nested_block = phrase | maybe_block | nested_block, + + // In a phrase we only allow phrase elements, ('maybe_block' + // elements are treated as phrase elements in this context) + in_phrase = phrase | maybe_block, + + // At the start of a block these are all block elements. + is_contextual_block = maybe_block | nested_block | + conditional_or_block | section_block, + + // These are all block elements in all other contexts. + is_block = nested_block | conditional_or_block | section_block + }; + + element_info() : type(nothing), rule(), tag(0) {} + + element_info( + type_enum t, + cl::rule* r, + value::tag_type tag_ = value::default_tag, + unsigned int v = 0) + : type(t), rule(r), tag(tag_), qbk_version(v) + { + } + + type_enum type; + cl::rule* rule; + value::tag_type tag; + unsigned int qbk_version; + }; + + struct quickbook_grammar::impl + { + quickbook::state& state; + cleanup cleanup_; + + // Main Grammar + cl::rule block_start; + cl::rule phrase_start; + cl::rule nested_phrase; + cl::rule inline_phrase; + cl::rule paragraph_phrase; + cl::rule extended_phrase; + cl::rule table_title_phrase; + cl::rule inside_preformatted; + cl::rule inside_paragraph; + cl::rule command_line; + cl::rule attribute_template_body; + cl::rule attribute_value_1_7; + cl::rule escape; + cl::rule raw_escape; + cl::rule skip_entity; + + // Miscellaneous stuff + cl::rule hard_space; // Either non-empty space, or + // empty and not followed by + // alphanumeric/_. Use to match the + // the end of an itendifier. + cl::rule space; // Space/tab/newline/comment (possibly empty) + cl::rule blank; // Space/tab/comment (possibly empty) + cl::rule eol; // blank >> eol + cl::rule phrase_end; // End of phrase text, context sensitive + cl::rule comment; + cl::rule line_comment; + cl::rule macro_identifier; + + // Element Symbols + cl::symbols elements; + + // Source mode + cl::symbols source_modes; + + // Doc Info + cl::rule doc_info_details; + + impl(quickbook::state&); + + private: + void init_main(); + void init_block_elements(); + void init_phrase_elements(); + void init_doc_info(); + }; +} + +#endif // BOOST_SPIRIT_QUICKBOOK_GRAMMARS_HPP diff --git a/src/boost/tools/quickbook/src/html_printer.cpp b/src/boost/tools/quickbook/src/html_printer.cpp new file mode 100644 index 000000000..b8ff43db6 --- /dev/null +++ b/src/boost/tools/quickbook/src/html_printer.cpp @@ -0,0 +1,51 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "html_printer.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace detail + { + void open_tag(html_printer& printer, quickbook::string_view name) + { + tag_start(printer, name); + tag_end(printer); + } + + void close_tag(html_printer& printer, quickbook::string_view name) + { + printer.html += ""; + } + + void tag_start(html_printer& printer, quickbook::string_view name) + { + printer.html += "<"; + printer.html.append(name.begin(), name.end()); + } + + void tag_end(html_printer& printer) { printer.html += ">"; } + + void tag_end_self_close(html_printer& printer) { printer.html += "/>"; } + + void tag_attribute( + html_printer& printer, + quickbook::string_view name, + quickbook::string_view value) + { + printer.html += " "; + printer.html.append(name.begin(), name.end()); + printer.html += "=\""; + printer.html.append(encode_string(value)); + printer.html += "\""; + } + } +} diff --git a/src/boost/tools/quickbook/src/html_printer.hpp b/src/boost/tools/quickbook/src/html_printer.hpp new file mode 100644 index 000000000..8cef974b1 --- /dev/null +++ b/src/boost/tools/quickbook/src/html_printer.hpp @@ -0,0 +1,38 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_BOOSTBOOK_HTML_PRINTER_HPP) +#define BOOST_QUICKBOOK_BOOSTBOOK_HTML_PRINTER_HPP + +#include +#include "string_view.hpp" + +namespace quickbook +{ + namespace detail + { + struct html_printer; + + void open_tag(html_printer&, quickbook::string_view name); + void close_tag(html_printer&, quickbook::string_view name); + void tag_attribute( + html_printer&, + quickbook::string_view name, + quickbook::string_view value); + void tag_start(html_printer&, quickbook::string_view name); + void tag_end(html_printer&); + void tag_end_self_close(html_printer&); + + struct html_printer + { + std::string html; + }; + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/id_generation.cpp b/src/boost/tools/quickbook/src/id_generation.cpp new file mode 100644 index 000000000..15c5e397e --- /dev/null +++ b/src/boost/tools/quickbook/src/id_generation.cpp @@ -0,0 +1,376 @@ +/*============================================================================= + Copyright (c) 2011, 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include +#include "document_state_impl.hpp" +#include "for.hpp" + +namespace quickbook +{ + // + // The maximum size of a generated part of an id. + // + // Not a strict maximum, sometimes broken because the user + // explicitly uses a longer id, or for backwards compatibility. + + static const std::size_t max_size = 32; + + typedef std::vector placeholder_index; + placeholder_index index_placeholders( + document_state_impl const&, quickbook::string_view); + + void generate_id_block( + placeholder_index::iterator, + placeholder_index::iterator, + std::vector& generated_ids); + + std::vector generate_ids( + document_state_impl const& state, quickbook::string_view xml) + { + std::vector generated_ids(state.placeholders.size()); + + // Get a list of the placeholders in the order that we wish to + // process them. + placeholder_index placeholders = index_placeholders(state, xml); + + typedef std::vector::iterator iterator; + iterator it = placeholders.begin(), end = placeholders.end(); + + while (it != end) { + // We process all the ids that have the same number of dots + // together. Note that ids with different parents can clash, e.g. + // because of old fashioned id generation or anchors containing + // multiple dots. + // + // So find the group of placeholders with the same number of dots. + iterator group_begin = it, group_end = it; + while (group_end != end && + (*group_end)->num_dots == (*it)->num_dots) + ++group_end; + + generate_id_block(group_begin, group_end, generated_ids); + it = group_end; + } + + return generated_ids; + } + + // + // index_placeholders + // + // Create a sorted index of the placeholders, in order + // to make numbering duplicates easy. A total order. + // + + struct placeholder_compare + { + std::vector& order; + + placeholder_compare(std::vector& order_) : order(order_) {} + + bool operator()(id_placeholder const* x, id_placeholder const* y) const + { + bool x_explicit = x->category.c >= id_category::explicit_id; + bool y_explicit = y->category.c >= id_category::explicit_id; + + return x->num_dots < y->num_dots + ? true + : x->num_dots > y->num_dots + ? false + : x_explicit > y_explicit + ? true + : x_explicit < y_explicit + ? false + : order[x->index] < order[y->index]; + } + }; + + struct get_placeholder_order_callback : xml_processor::callback + { + document_state_impl const& state; + std::vector& order; + unsigned count; + + get_placeholder_order_callback( + document_state_impl const& state_, std::vector& order_) + : state(state_), order(order_), count(0) + { + } + + void id_value(quickbook::string_view value) + { + set_placeholder_order(state.get_placeholder(value)); + } + + void set_placeholder_order(id_placeholder const* p) + { + if (p && !order[p->index]) { + set_placeholder_order(p->parent); + order[p->index] = ++count; + } + } + }; + + placeholder_index index_placeholders( + document_state_impl const& state, quickbook::string_view xml) + { + // The order that the placeholder appear in the xml source. + std::vector order(state.placeholders.size()); + + xml_processor processor; + get_placeholder_order_callback callback(state, order); + processor.parse(xml, callback); + + placeholder_index sorted_placeholders; + sorted_placeholders.reserve(state.placeholders.size()); + QUICKBOOK_FOR (id_placeholder const& p, state.placeholders) + if (order[p.index]) sorted_placeholders.push_back(&p); + boost::sort(sorted_placeholders, placeholder_compare(order)); + + return sorted_placeholders; + } + + // Resolve and generate ids. + + struct generate_id_block_type + { + // The ids which won't require duplicate handling. + typedef boost::unordered_map + chosen_id_map; + chosen_id_map chosen_ids; + std::vector& generated_ids; + + explicit generate_id_block_type( + std::vector& generated_ids_) + : generated_ids(generated_ids_) + { + } + + void generate( + placeholder_index::iterator begin, placeholder_index::iterator end); + + std::string resolve_id(id_placeholder const*); + std::string generate_id(id_placeholder const*, std::string const&); + }; + + void generate_id_block( + placeholder_index::iterator begin, + placeholder_index::iterator end, + std::vector& generated_ids) + { + generate_id_block_type impl(generated_ids); + impl.generate(begin, end); + } + + void generate_id_block_type::generate( + placeholder_index::iterator begin, placeholder_index::iterator end) + { + std::vector resolved_ids; + + for (placeholder_index::iterator i = begin; i != end; ++i) + resolved_ids.push_back(resolve_id(*i)); + + unsigned index = 0; + for (placeholder_index::iterator i = begin; i != end; ++i, ++index) { + generated_ids[(**i).index] = generate_id(*i, resolved_ids[index]); + } + } + + std::string generate_id_block_type::resolve_id(id_placeholder const* p) + { + std::string id = + p->parent ? generated_ids[p->parent->index] + "." + p->id : p->id; + + if (p->category.c > id_category::numbered) { + // Reserve the id if it isn't already reserved. + chosen_id_map::iterator pos = chosen_ids.emplace(id, p).first; + + // If it was reserved by a placeholder with a lower category, + // then overwrite it. + if (p->category.c > pos->second->category.c) pos->second = p; + } + + return id; + } + + std::string generate_id_block_type::generate_id( + id_placeholder const* p, std::string const& resolved_id) + { + if (p->category.c > id_category::numbered && + chosen_ids.at(resolved_id) == p) { + return resolved_id; + } + + // Split the id into its parent part and child part. + // + // Note: can't just use the placeholder's parent, as the + // placeholder id might contain dots. + std::size_t child_start = resolved_id.rfind('.'); + std::string parent_id, base_id; + + if (child_start == std::string::npos) { + base_id = normalize_id(resolved_id, max_size - 1); + } + else { + parent_id = resolved_id.substr(0, child_start + 1); + base_id = + normalize_id(resolved_id.substr(child_start + 1), max_size - 1); + } + + // Since we're adding digits, don't want an id that ends in + // a digit. + + std::string::size_type length = base_id.size(); + + if (length > 0 && std::isdigit(base_id[length - 1])) { + if (length < max_size - 1) { + base_id += '_'; + ++length; + } + else { + while (length > 0 && std::isdigit(base_id[length - 1])) + --length; + base_id.erase(length); + } + } + + unsigned count = 0; + + for (;;) { + std::string postfix = boost::lexical_cast(count++); + + if ((base_id.size() + postfix.size()) > max_size) { + // The id is now too long, so reduce the length and + // start again. + + // Would need a lot of ids to get this far.... + if (length == 0) throw std::runtime_error("Too many ids"); + + // Trim a character. + --length; + + // Trim any trailing digits. + while (length > 0 && std::isdigit(base_id[length - 1])) + --length; + + base_id.erase(length); + count = 0; + } + else { + // Try to reserve this id. + std::string generated_id = parent_id + base_id + postfix; + + if (chosen_ids.emplace(generated_id, p).second) { + return generated_id; + } + } + } + } + + // + // replace_ids + // + // Return a copy of the xml with all the placeholders replaced by + // generated_ids. + // + + struct replace_ids_callback : xml_processor::callback + { + document_state_impl const& state; + std::vector const* ids; + string_iterator source_pos; + std::string result; + + replace_ids_callback( + document_state_impl const& state_, + std::vector const* ids_) + : state(state_), ids(ids_), source_pos(), result() + { + } + + void start(quickbook::string_view xml) { source_pos = xml.begin(); } + + void id_value(quickbook::string_view value) + { + if (id_placeholder const* p = state.get_placeholder(value)) { + quickbook::string_view id = + ids ? (*ids)[p->index] : p->unresolved_id; + + result.append(source_pos, value.begin()); + result.append(id.begin(), id.end()); + source_pos = value.end(); + } + } + + void finish(quickbook::string_view xml) + { + result.append(source_pos, xml.end()); + source_pos = xml.end(); + } + }; + + std::string replace_ids( + document_state_impl const& state, + quickbook::string_view xml, + std::vector const* ids) + { + xml_processor processor; + replace_ids_callback callback(state, ids); + processor.parse(xml, callback); + return callback.result; + } + + // + // normalize_id + // + // Normalizes generated ids. + // + + std::string normalize_id(quickbook::string_view src_id) + { + return normalize_id(src_id, max_size); + } + + std::string normalize_id(quickbook::string_view src_id, std::size_t size) + { + std::string id(src_id.begin(), src_id.end()); + + std::size_t src = 0; + std::size_t dst = 0; + + while (src < id.length() && id[src] == '_') { + ++src; + } + + if (src == id.length()) { + id = "_"; + } + else { + while (src < id.length() && dst < size) { + if (id[src] == '_') { + do { + ++src; + } while (src < id.length() && id[src] == '_'); + + if (src < id.length()) id[dst++] = '_'; + } + else { + id[dst++] = id[src++]; + } + } + + id.erase(dst); + } + + return id; + } +} diff --git a/src/boost/tools/quickbook/src/id_xml.cpp b/src/boost/tools/quickbook/src/id_xml.cpp new file mode 100644 index 000000000..8209f64ea --- /dev/null +++ b/src/boost/tools/quickbook/src/id_xml.cpp @@ -0,0 +1,183 @@ +/*============================================================================= + Copyright (c) 2011-2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include "document_state_impl.hpp" +#include "simple_parse.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace + { + char const* id_attributes_[] = {"id", "linkend", "linkends", + "arearefs"}; + } + + xml_processor::xml_processor() + { + static std::size_t const n_id_attributes = + sizeof(id_attributes_) / sizeof(char const*); + for (int i = 0; i != n_id_attributes; ++i) { + id_attributes.push_back(id_attributes_[i]); + } + + boost::sort(id_attributes); + } + + void xml_processor::parse(quickbook::string_view source, callback& c) + { + typedef string_iterator iterator; + + c.start(source); + + iterator it = source.begin(), end = source.end(); + + for (;;) { + read_past(it, end, "<"); + if (it == end) break; + + if (read(it, end, "!--quickbook-escape-prefix-->")) { + read_past(it, end, ""); + continue; + } + + switch (*it) { + case '?': + ++it; + read_past(it, end, "?>"); + break; + + case '!': + if (read(it, end, "!--")) + read_past(it, end, "-->"); + else + read_past(it, end, ">"); + break; + + default: + if ((*it >= 'a' && *it <= 'z') || (*it >= 'A' && *it <= 'Z') || + *it == '_' || *it == ':') { + read_to_one_of(it, end, " \t\n\r>"); + + for (;;) { + read_some_of(it, end, " \t\n\r"); + iterator name_start = it; + read_to_one_of(it, end, "= \t\n\r>"); + if (it == end || *it == '>') break; + quickbook::string_view name( + name_start, it - name_start); + ++it; + + read_some_of(it, end, "= \t\n\r"); + if (it == end || (*it != '"' && *it != '\'')) break; + + char delim = *it; + ++it; + + iterator value_start = it; + + it = std::find(it, end, delim); + if (it == end) break; + quickbook::string_view value( + value_start, it - value_start); + ++it; + + if (boost::find(id_attributes, name.to_s()) != + id_attributes.end()) { + c.id_value(value); + } + } + } + else { + read_past(it, end, ">"); + } + } + } + + c.finish(source); + } + + namespace detail + { + std::string linkify( + quickbook::string_view source, quickbook::string_view linkend) + { + typedef string_iterator iterator; + + iterator it = source.begin(), end = source.end(); + + bool contains_link = false; + + for (; !contains_link;) { + read_past(it, end, "<"); + if (it == end) break; + + switch (*it) { + case '?': + ++it; + read_past(it, end, "?>"); + break; + + case '!': + if (read(it, end, "!--")) { + read_past(it, end, "-->"); + } + else { + read_past(it, end, ">"); + } + break; + + default: + if ((*it >= 'a' && *it <= 'z') || + (*it >= 'A' && *it <= 'Z') || *it == '_' || + *it == ':') { + iterator tag_name_start = it; + read_to_one_of(it, end, " \t\n\r>"); + quickbook::string_view tag_name( + tag_name_start, it - tag_name_start); + if (tag_name == "link") { + contains_link = true; + } + + for (;;) { + read_to_one_of(it, end, "\"'\n\r>"); + if (it == end || *it == '>') break; + if (*it == '"' || *it == '\'') { + char delim = *it; + ++it; + it = std::find(it, end, delim); + if (it == end) break; + ++it; + } + } + } + else { + read_past(it, end, ">"); + } + } + } + + std::string result; + + if (!contains_link) { + result += ""; + result.append(source.begin(), source.end()); + result += ""; + } + else { + result.append(source.begin(), source.end()); + } + + return result; + } + } +} diff --git a/src/boost/tools/quickbook/src/include_paths.cpp b/src/boost/tools/quickbook/src/include_paths.cpp new file mode 100644 index 000000000..00b3dd4c8 --- /dev/null +++ b/src/boost/tools/quickbook/src/include_paths.cpp @@ -0,0 +1,327 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "include_paths.hpp" +#include +#include +#include +#include "for.hpp" +#include "glob.hpp" +#include "path.hpp" +#include "quickbook.hpp" // For the include_path global (yuck) +#include "state.hpp" +#include "stream.hpp" +#include "utils.hpp" + +namespace quickbook +{ + // + // check_path + // + + path_parameter check_path(value const& path, quickbook::state& state) + { + if (qbk_version_n >= 107u) { + std::string path_text = path.get_encoded(); + if (path_text.empty()) { + detail::outerr(path.get_file(), path.get_position()) + << "Empty path argument" + << "std::endl"; + ++state.error_count; + return path_parameter(path_text, path_parameter::invalid); + } + + try { + if (check_glob(path_text)) { + return path_parameter(path_text, path_parameter::glob); + } + else { + return path_parameter( + glob_unescape(path_text), path_parameter::path); + } + } catch (glob_error& e) { + detail::outerr(path.get_file(), path.get_position()) + << "Invalid path (" << e.what() << "): " << path_text + << std::endl; + ++state.error_count; + return path_parameter(path_text, path_parameter::invalid); + } + } + else { + // Paths are encoded for quickbook 1.6+ and also xmlbase + // values (technically xmlbase is a 1.6 feature, but that + // isn't enforced as it's backwards compatible). + // + // Counter-intuitively: encoded == plain text here. + + std::string path_text = qbk_version_n >= 106u || path.is_encoded() + ? path.get_encoded() + : path.get_quickbook().to_s(); + + if (path_text.empty()) { + detail::outerr(path.get_file(), path.get_position()) + << "Empty path argument" << std::endl; + ++state.error_count; + return path_parameter(path_text, path_parameter::invalid); + } + + // Check for windows paths, an error in quickbook 1.6 + // In quickbook 1.7 backslash is used as an escape character + // for glob characters. + if (path_text.find('\\') != std::string::npos) { + quickbook::detail::ostream* err; + + if (qbk_version_n >= 106u) { + err = &detail::outerr(path.get_file(), path.get_position()); + ++state.error_count; + } + else { + err = + &detail::outwarn(path.get_file(), path.get_position()); + } + + *err << "Path isn't portable: '" << path_text << "'" + << std::endl; + + boost::replace(path_text, '\\', '/'); + } + + return path_parameter(path_text, path_parameter::path); + } + } + + path_parameter check_xinclude_path(value const& p, quickbook::state& state) + { + path_parameter parameter = check_path(p, state); + + if (parameter.type == path_parameter::glob) { + detail::outerr(p.get_file(), p.get_position()) + << "Glob used for xml path." << std::endl; + ++state.error_count; + parameter.type = path_parameter::invalid; + } + + return parameter; + } + + // + // Search include path + // + + void include_search_glob( + std::set& result, + quickbook_path const& location, + std::string path, + quickbook::state& state) + { + std::size_t glob_pos = find_glob_char(path); + + if (glob_pos == std::string::npos) { + quickbook_path complete_path = location / glob_unescape(path); + + if (fs::exists(complete_path.file_path)) { + state.dependencies.add_glob_match(complete_path.file_path); + result.insert(complete_path); + } + return; + } + + std::size_t prev = path.rfind('/', glob_pos); + std::size_t next = path.find('/', glob_pos); + + std::size_t glob_begin = prev == std::string::npos ? 0 : prev + 1; + std::size_t glob_end = next == std::string::npos ? path.size() : next; + + quickbook_path new_location = location; + + if (prev != std::string::npos) { + new_location /= glob_unescape(path.substr(0, prev)); + } + + if (next != std::string::npos) ++next; + + quickbook::string_view glob( + path.data() + glob_begin, glob_end - glob_begin); + + fs::path base_dir = new_location.file_path.empty() + ? fs::path(".") + : new_location.file_path; + if (!fs::is_directory(base_dir)) return; + + // Walk through the dir for matches. + for (fs::directory_iterator dir_i(base_dir), dir_e; dir_i != dir_e; + ++dir_i) { + fs::path f = dir_i->path().filename(); + std::string generic_path = detail::path_to_generic(f); + + // Skip if the dir item doesn't match. + if (!quickbook::glob(glob, generic_path)) continue; + + // If it's a file we add it to the results. + if (next == std::string::npos) { + if (fs::is_regular_file(dir_i->status())) { + quickbook_path r = new_location / generic_path; + state.dependencies.add_glob_match(r.file_path); + result.insert(r); + } + } + // If it's a matching dir, we recurse looking for more files. + else { + if (!fs::is_regular_file(dir_i->status())) { + include_search_glob( + result, new_location / generic_path, path.substr(next), + state); + } + } + } + } + + std::set include_search( + path_parameter const& parameter, + quickbook::state& state, + string_iterator pos) + { + std::set result; + + switch (parameter.type) { + case path_parameter::glob: + // If the path has some glob match characters + // we do a discovery of all the matches.. + { + fs::path current = state.current_file->path.parent_path(); + + // Search for the current dir accumulating to the result. + state.dependencies.add_glob(current / parameter.value); + include_search_glob( + result, state.current_path.parent_path(), parameter.value, + state); + + // Search the include path dirs accumulating to the result. + unsigned count = 0; + QUICKBOOK_FOR (fs::path dir, include_path) { + ++count; + state.dependencies.add_glob(dir / parameter.value); + include_search_glob( + result, quickbook_path(dir, count, fs::path()), + parameter.value, state); + } + + // Done. + return result; + } + + case path_parameter::path: { + fs::path path = detail::generic_to_path(parameter.value); + + // If the path is relative, try and resolve it. + if (!path.has_root_directory() && !path.has_root_name()) { + quickbook_path path2 = + state.current_path.parent_path() / parameter.value; + + // See if it can be found locally first. + if (state.dependencies.add_dependency(path2.file_path)) { + result.insert(path2); + return result; + } + + // Search in each of the include path locations. + unsigned count = 0; + QUICKBOOK_FOR (fs::path full, include_path) { + ++count; + full /= path; + + if (state.dependencies.add_dependency(full)) { + result.insert(quickbook_path(full, count, path)); + return result; + } + } + } + else { + if (state.dependencies.add_dependency(path)) { + result.insert(quickbook_path(path, 0, path)); + return result; + } + } + + detail::outerr(state.current_file, pos) + << "Unable to find file: " << parameter.value << std::endl; + ++state.error_count; + + return result; + } + + case path_parameter::invalid: + return result; + + default: + assert(0); + return result; + } + } + + // + // quickbook_path + // + + void swap(quickbook_path& x, quickbook_path& y) + { + boost::swap(x.file_path, y.file_path); + boost::swap(x.include_path_offset, y.include_path_offset); + boost::swap(x.abstract_file_path, y.abstract_file_path); + } + + bool quickbook_path::operator<(quickbook_path const& other) const + { + return abstract_file_path != other.abstract_file_path + ? abstract_file_path < other.abstract_file_path + : include_path_offset != other.include_path_offset + ? include_path_offset < other.include_path_offset + : file_path < other.file_path; + } + + quickbook_path quickbook_path::operator/(quickbook::string_view x) const + { + return quickbook_path(*this) /= x; + } + + quickbook_path& quickbook_path::operator/=(quickbook::string_view x) + { + fs::path x2 = detail::generic_to_path(x); + file_path /= x2; + abstract_file_path /= x2; + return *this; + } + + quickbook_path quickbook_path::parent_path() const + { + return quickbook_path( + file_path.parent_path(), include_path_offset, + abstract_file_path.parent_path()); + } + + quickbook_path resolve_xinclude_path( + std::string const& x, quickbook::state& state, bool is_file) + { + fs::path path = detail::generic_to_path(x); + fs::path full_path = path; + + // If the path is relative + if (!path.has_root_directory()) { + // Resolve the path from the current file + full_path = state.current_file->path.parent_path() / path; + + // Then calculate relative to the current xinclude_base. + path = path_difference(state.xinclude_base, full_path, is_file); + } + + return quickbook_path(full_path, 0, path); + } +} diff --git a/src/boost/tools/quickbook/src/include_paths.hpp b/src/boost/tools/quickbook/src/include_paths.hpp new file mode 100644 index 000000000..a986ed1e2 --- /dev/null +++ b/src/boost/tools/quickbook/src/include_paths.hpp @@ -0,0 +1,82 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_INCLUDE_PATHS_HPP) +#define BOOST_QUICKBOOK_INCLUDE_PATHS_HPP + +// Classes and functions for dealing with the values from include, import and +// xinclude elements. + +#include +#include +#include +#include "fwd.hpp" +#include "values.hpp" + +namespace quickbook +{ + struct path_parameter + { + // Will possibly add 'url' to this list later: + enum path_type + { + invalid, + path, + glob + }; + + std::string value; + path_type type; + + path_parameter(std::string const& value_, path_type type_) + : value(value_), type(type_) + { + } + }; + + path_parameter check_path(value const& path, quickbook::state& state); + path_parameter check_xinclude_path(value const&, quickbook::state&); + + struct quickbook_path + { + quickbook_path(fs::path const& x, unsigned offset, fs::path const& y) + : file_path(x), include_path_offset(offset), abstract_file_path(y) + { + } + + friend void swap(quickbook_path&, quickbook_path&); + + quickbook_path parent_path() const; + + bool operator<(quickbook_path const& other) const; + quickbook_path operator/(quickbook::string_view) const; + quickbook_path& operator/=(quickbook::string_view); + + // The actual location of the file. + fs::path file_path; + + // The member of the include path that this file is relative to. + // (1-indexed, 0 == original quickbook file) + unsigned include_path_offset; + + // A machine independent representation of the file's + // path - not unique per-file + fs::path abstract_file_path; + }; + + std::set include_search( + path_parameter const&, quickbook::state& state, string_iterator pos); + + quickbook_path resolve_xinclude_path( + std::string const&, quickbook::state&, bool is_file = false); +} + +#endif diff --git a/src/boost/tools/quickbook/src/iterator.hpp b/src/boost/tools/quickbook/src/iterator.hpp new file mode 100644 index 000000000..9cdeeb7d2 --- /dev/null +++ b/src/boost/tools/quickbook/src/iterator.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2010 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_ITERATOR_HPP) +#define BOOST_SPIRIT_QUICKBOOK_ITERATOR_HPP + +#include +#include +#include +#include +#include "string_view.hpp" + +namespace quickbook +{ + template + struct lookback_iterator + : boost::forward_iterator_helper< + lookback_iterator, + typename boost::iterator_value::type, + typename boost::iterator_difference::type, + typename boost::iterator_pointer::type, + typename boost::iterator_reference::type> + { + lookback_iterator() {} + explicit lookback_iterator(Iterator i) : original_(i), base_(i) {} + + friend bool operator==( + lookback_iterator const& x, lookback_iterator const& y) + { + return x.base_ == y.base_; + } + + lookback_iterator& operator++() + { + ++base_; + return *this; + } + + typename boost::iterator_reference::type operator*() const + { + return *base_; + } + + Iterator base() const { return base_; } + + typedef boost::iterator_range > + lookback_range; + + lookback_range lookback() const + { + return lookback_range(base_, original_); + } + + private: + Iterator original_; + Iterator base_; + }; + + typedef lookback_iterator parse_iterator; +} + +#endif diff --git a/src/boost/tools/quickbook/src/main_grammar.cpp b/src/boost/tools/quickbook/src/main_grammar.cpp new file mode 100644 index 000000000..6d9368f3d --- /dev/null +++ b/src/boost/tools/quickbook/src/main_grammar.cpp @@ -0,0 +1,1320 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "block_tags.hpp" +#include "grammar_impl.hpp" +#include "parsers.hpp" +#include "phrase_tags.hpp" +#include "scoped.hpp" +#include "state.hpp" +#include "stream.hpp" +#include "template_tags.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + struct list_stack_item + { + // Is this the root of the context + // (e.g. top, template, table cell etc.) + enum list_item_type + { + syntactic_list, // In a list marked up '*' or '#' + top_level, // At the top level of a parse + // (might be a template body) + nested_block // Nested in a block element. + } type; + + unsigned int indent; // Indent of list marker + // (or paragraph if not in a list) + unsigned int indent2; // Indent of paragraph + char mark; // List mark, '\0' if not in a list. + + // Example of inside a list: + // + // |indent + // * List item + // |indent2 + + explicit list_stack_item(list_item_type r) + : type(r), indent(0), indent2(0), mark('\0') + { + } + + explicit list_stack_item( + char mark_, unsigned int indent_, unsigned int indent2_) + : type(syntactic_list) + , indent(indent_) + , indent2(indent2_) + , mark(mark_) + { + } + }; + + struct block_types + { + enum values + { + none, + code, + list, + paragraph + }; + }; + + struct main_grammar_local + { + //////////////////////////////////////////////////////////////////////// + // Local actions + + void start_blocks_impl(parse_iterator first, parse_iterator last); + void start_nested_blocks_impl( + parse_iterator first, parse_iterator last); + void end_blocks_impl(parse_iterator first, parse_iterator last); + void check_indentation_impl(parse_iterator first, parse_iterator last); + void check_code_block_impl(parse_iterator first, parse_iterator last); + void plain_block(string_iterator first, string_iterator last); + void list_block( + string_iterator first, + string_iterator mark_pos, + string_iterator last); + void clear_stack(); + + //////////////////////////////////////////////////////////////////////// + // Local members + + cl::rule template_phrase, top_level, indent_check, + paragraph_separator, inside_paragraph, code, code_line, blank_line, + hr, inline_code, skip_inline_code, template_, attribute_template, + template_body, code_block, skip_code_block, macro, template_args, + template_args_1_4, template_arg_1_4, template_inner_arg_1_4, + brackets_1_4, template_args_1_5, template_arg_1_5, + template_arg_1_5_content, template_inner_arg_1_5, brackets_1_5, + template_args_1_6, template_arg_1_6, template_arg_1_6_content, + break_, command_line_macro_identifier, dummy_block, + line_dummy_block, square_brackets, error_brackets, skip_escape; + + struct block_context_closure + : cl::closure + { + // Mask used to determine whether or not an element is a block + // element. + member1 is_block_mask; + }; + + cl::rule simple_markup, simple_markup_end; + + cl::rule paragraph; + cl::rule list; + cl::rule + syntactic_block_item; + cl::rule common; + cl::rule element; + + // state + std::stack list_stack; + unsigned int list_indent; + bool no_eols; + element_info::context context; + char mark; // Simple markup's deliminator + bool still_in_block; // Inside a syntatic block + + // transitory state + block_types::values block_type; + element_info info; + element_info::type_enum element_type; + + // state + quickbook::state& state_; + + //////////////////////////////////////////////////////////////////////// + // Local constructor + + main_grammar_local(quickbook::state& state) + : list_stack() + , list_indent(0) + , no_eols(true) + , context(element_info::in_top_level) + , mark('\0') + , state_(state) + { + } + }; + + struct process_element_impl : scoped_action_base + { + process_element_impl(main_grammar_local& l_) + : l(l_), pushed_source_mode_(false), element_context_error_(false) + { + } + + bool start() + { + // This element doesn't exist in the current language version. + if (qbk_version_n < l.info.qbk_version) return false; + + // The element is not allowed in this context. + if (!(l.info.type & l.context)) { + if (qbk_version_n < 107u) { + return false; + } + else { + element_context_error_ = true; + } + } + + info_ = l.info; + + if (info_.type != element_info::phrase && + info_.type != element_info::maybe_block) { + paragraph_action para(l.state_); + para(); + } + + assert(l.state_.values.builder.empty()); + + if (l.state_.source_mode_next && + info_.type != element_info::maybe_block) { + l.state_.push_tagged_source_mode(l.state_.source_mode_next); + pushed_source_mode_ = true; + l.state_.source_mode_next = 0; + } + + return true; + } + + template + bool result(ResultT r, ScannerT const& scan) + { + if (element_context_error_) { + error_message_action error( + l.state_, "Element not allowed in this context."); + error(scan.first, scan.first); + return true; + } + else if (r) { + return true; + } + else if ( + qbk_version_n < 107u && info_.type & element_info::in_phrase) { + // Old versions of quickbook had a soft fail + // for unparsed phrase elements. + return false; + } + else { + // Parse error in body. + error_action error(l.state_); + error(scan.first, scan.first); + return true; + } + } + + void success(parse_iterator, parse_iterator) + { + l.element_type = info_.type; + } + void failure() { l.element_type = element_info::nothing; } + + void cleanup() + { + if (pushed_source_mode_) l.state_.pop_tagged_source_mode(); + } + + main_grammar_local& l; + element_info info_; + bool pushed_source_mode_; + bool element_context_error_; + }; + + struct scoped_paragraph : scoped_action_base + { + scoped_paragraph(quickbook::state& state_) + : state(state_), pushed(false) + { + } + + bool start() + { + state.push_tagged_source_mode(state.source_mode_next); + pushed = true; + state.source_mode_next = 0; + return true; + } + + void cleanup() + { + if (pushed) state.pop_tagged_source_mode(); + } + + quickbook::state& state; + bool pushed; + }; + + struct in_list_impl + { + main_grammar_local& l; + + explicit in_list_impl(main_grammar_local& l_) : l(l_) {} + + bool operator()() const + { + return !l.list_stack.empty() && + l.list_stack.top().type == list_stack_item::syntactic_list; + } + }; + + template + struct set_scoped_value_impl : scoped_action_base + { + typedef M T::*member_ptr; + + explicit set_scoped_value_impl(T& l_, member_ptr ptr_) + : l(l_), ptr(ptr_), saved_value() + { + } + + bool start(M const& value) + { + saved_value = l.*ptr; + l.*ptr = value; + + return true; + } + + void cleanup() { l.*ptr = saved_value; } + + T& l; + member_ptr ptr; + M saved_value; + }; + + template + struct set_scoped_value : scoped_parser > + { + typedef set_scoped_value_impl impl; + + set_scoped_value(T& l, typename impl::member_ptr ptr) + : scoped_parser(impl(l, ptr)) + { + } + }; + + //////////////////////////////////////////////////////////////////////////// + // Local grammar + + void quickbook_grammar::impl::init_main() + { + main_grammar_local& local = cleanup_.add(new main_grammar_local(state)); + + // Global Actions + quickbook::element_action element_action(state); + quickbook::paragraph_action paragraph_action(state); + + phrase_end_action end_phrase(state); + raw_char_action raw_char(state); + plain_char_action plain_char(state); + escape_unicode_action escape_unicode(state); + + simple_phrase_action simple_markup(state); + + break_action break_(state); + do_macro_action do_macro(state); + + error_action error(state); + element_id_warning_action element_id_warning(state); + + scoped_parser to_value(state); + scoped_parser scope_paragraph(state); + + quickbook_strict strict_mode(state); + + // Local Actions + scoped_parser process_element(local); + in_list_impl in_list(local); + + set_scoped_value scoped_no_eols( + local, &main_grammar_local::no_eols); + set_scoped_value + scoped_context(local, &main_grammar_local::context); + set_scoped_value scoped_still_in_block( + local, &main_grammar_local::still_in_block); + + member_action check_indentation( + local, &main_grammar_local::check_indentation_impl); + member_action check_code_block( + local, &main_grammar_local::check_code_block_impl); + member_action start_blocks( + local, &main_grammar_local::start_blocks_impl); + member_action start_nested_blocks( + local, &main_grammar_local::start_nested_blocks_impl); + member_action end_blocks( + local, &main_grammar_local::end_blocks_impl); + + // clang-format off + + // phrase/phrase_start is used for an entirely self-contained + // phrase. For example, any remaining anchors are written out + // at the end instead of being saved for any following content. + phrase_start = + inline_phrase [end_phrase] + ; + + // nested_phrase is used for a phrase nested inside square + // brackets. + nested_phrase = + state.values.save() + [ + scoped_context(element_info::in_phrase) + [*(~cl::eps_p(']') >> local.common)] + ] + ; + + // paragraph_phrase is like a nested_phrase but is also terminated + // by a paragraph end. + paragraph_phrase = + state.values.save() + [ + scoped_context(element_info::in_phrase) + [*(~cl::eps_p(phrase_end) >> local.common)] + ] + ; + + // extended_phrase is like a paragraph_phrase but allows some block + // elements. + extended_phrase = + state.values.save() + [ + scoped_context(element_info::in_conditional) + [*(~cl::eps_p(phrase_end) >> local.common)] + ] + ; + + // inline_phrase is used a phrase that isn't nested inside + // brackets, but is not self contained. An example of this + // is expanding a template, which is parsed separately but + // is part of the paragraph that contains it. + inline_phrase = + state.values.save() + [ qbk_ver(107u) + >> local.template_phrase + | qbk_ver(0, 107u) + >> scoped_context(element_info::in_phrase) + [*local.common] + ] + ; + + table_title_phrase = + state.values.save() + [ + scoped_context(element_info::in_phrase) + [ *( ~cl::eps_p(space >> (']' | '[' >> space >> '[')) + >> local.common + ) + ] + ] + ; + + inside_preformatted = + scoped_no_eols(false) + [ paragraph_phrase + ] + ; + + // Phrase templates can contain block tags, but can't contain + // syntatic blocks. + local.template_phrase = + scoped_context(element_info::in_top_level) + [ *( (local.paragraph_separator >> space >> cl::anychar_p) + [error("Paragraph in phrase template.")] + | local.common + ) + ] + ; + + // Top level blocks + block_start = + (*eol) [start_blocks] + >> ( *( local.top_level + >> !( qbk_ver(106u) + >> cl::ch_p(']') + >> cl::eps_p [error("Mismatched close bracket")] + ) + ) + ) [end_blocks] + ; + + // Blocks contains within an element, e.g. a table cell or a footnote. + inside_paragraph = + state.values.save() + [ cl::eps_p [start_nested_blocks] + >> ( qbk_ver(107u) + >> (*eol) + >> (*local.top_level) + | qbk_ver(0, 107u) + >> local.inside_paragraph + ) [end_blocks] + ] + ; + + local.top_level = + cl::eps_p(local.indent_check) + >> ( cl::eps_p(ph::var(local.block_type) == block_types::code) + >> local.code + | cl::eps_p(ph::var(local.block_type) == block_types::list) + >> local.list + | cl::eps_p(ph::var(local.block_type) == block_types::paragraph) + >> ( local.hr + | local.paragraph + ) + ) + >> *eol + ; + + local.indent_check = + ( *cl::blank_p + >> !( (cl::ch_p('*') | '#') + >> *cl::blank_p) + ) [check_indentation] + ; + + local.paragraph = + // Usually superfluous call + // for paragraphs in lists. + cl::eps_p [paragraph_action] + >> scope_paragraph() + [ + scoped_context(element_info::in_top_level) + [ scoped_still_in_block(true) + [ local.syntactic_block_item(element_info::is_contextual_block) + >> *( cl::eps_p(ph::var(local.still_in_block)) + >> local.syntactic_block_item(element_info::is_block) + ) + ] + ] + ] [paragraph_action] + ; + + local.list = + *cl::blank_p + >> (cl::ch_p('*') | '#') + >> (*cl::blank_p) + >> scoped_context(element_info::in_list_block) + [ scoped_still_in_block(true) + [ *( cl::eps_p(ph::var(local.still_in_block)) + >> local.syntactic_block_item(element_info::is_block) + ) + ] + ] + ; + + local.syntactic_block_item = + local.paragraph_separator [ph::var(local.still_in_block) = false] + | (cl::eps_p(~cl::ch_p(']')) | qbk_ver(0, 107u)) + [ph::var(local.element_type) = element_info::nothing] + >> local.common + + // If the element is a block, then a newline will end the + // current syntactic block. + // + // Note that we don't do this for lists in 1.6, as it causes + // the list block to end. The support for nested syntactic + // blocks in 1.7 will fix that. Although it does mean the + // following line will need to be indented. + >> !( cl::eps_p(in_list) >> qbk_ver(106u, 107u) + | cl::eps_p + ( + ph::static_cast_(local.syntactic_block_item.is_block_mask) & + ph::static_cast_(ph::var(local.element_type)) + ) + >> eol [ph::var(local.still_in_block) = false] + ) + ; + + local.paragraph_separator = + cl::eol_p + >> cl::eps_p + ( *cl::blank_p + >> ( cl::eol_p + | cl::end_p + | cl::eps_p(in_list) >> (cl::ch_p('*') | '#') + ) + ) + >> *eol + ; + + // Blocks contains within an element, e.g. a table cell or a footnote. + local.inside_paragraph = + scoped_context(element_info::in_nested_block) + [ *( local.paragraph_separator [paragraph_action] + | ~cl::eps_p(']') + >> local.common + ) + ] [paragraph_action] + ; + + local.hr = + cl::str_p("----") + >> state.values.list(block_tags::hr) + [ ( qbk_ver(106u) + >> *(line_comment | (cl::anychar_p - (cl::eol_p | '[' | ']'))) + | qbk_ver(0, 106u) + >> *(line_comment | (cl::anychar_p - (cl::eol_p | "[/"))) + ) + >> *eol + ] [element_action] + ; + + local.element + = '[' + >> ( cl::eps_p(cl::punct_p) + >> elements [ph::var(local.info) = ph::arg1] + | elements [ph::var(local.info) = ph::arg1] + >> (cl::eps_p - (cl::alnum_p | '_')) + ) + >> process_element() + [ state.values.list(ph::var(local.info.tag)) + [ cl::lazy_p(*ph::var(local.info.rule)) + >> space + >> ']' + ] [element_action] + ] + ; + + local.code = + state.values.list(code_tags::code_block) + [( local.code_line + >> *(*local.blank_line >> local.code_line) + ) [state.values.entry(ph::arg1, ph::arg2)] + ] [element_action] + >> *eol + ; + + local.code_line = + ( *cl::blank_p + >> ~cl::eps_p(cl::eol_p) + ) [check_code_block] + >> cl::eps_p(ph::var(local.block_type) == block_types::code) + >> *(cl::anychar_p - cl::eol_p) + >> (cl::eol_p | cl::end_p) + ; + + local.blank_line = + *cl::blank_p >> cl::eol_p + ; + + local.common = + local.macro + | local.element + | local.template_ + | local.break_ + | local.code_block + | local.inline_code + | local.simple_markup + | escape + | comment + | strict_mode + >> ( local.error_brackets [error("Invalid template/tag (strict mode)")] + | cl::eps_p('[') [error("Mismatched open bracket (strict mode)")] + >> cl::anychar_p + | cl::eps_p(']') [error("Mismatched close bracket (strict mode)")] + >> cl::anychar_p + ) + | qbk_ver(106u) + >> local.square_brackets + | cl::space_p [raw_char] + | cl::anychar_p [plain_char] + ; + + skip_entity = + '[' + // For escaped templates: + >> !(space >> cl::ch_p('`') >> (cl::alpha_p | '_')) + >> *(~cl::eps_p(']') >> skip_entity) + >> !cl::ch_p(']') + | local.skip_code_block + | local.skip_inline_code + | local.skip_escape + | comment + | (cl::anychar_p - '[' - ']') + ; + + local.square_brackets = + ( cl::ch_p('[') [plain_char] + >> paragraph_phrase + >> ( cl::ch_p(']') [plain_char] + | cl::eps_p [error("Missing close bracket")] + ) + | cl::ch_p(']') [plain_char] + >> cl::eps_p [error("Mismatched close bracket")] + ) + ; + + local.error_brackets = + cl::ch_p('[') [plain_char] + >> ( local.error_brackets + | (cl::anychar_p - ']') + ) + >> cl::ch_p(']') + ; + + local.macro = + cl::eps_p + ( ( state.macro + >> ~cl::eps_p(cl::alpha_p | '_') + // must not be followed by alpha or underscore + ) + & macro_identifier // must be a valid macro for the current version + ) + >> state.macro [do_macro] + ; + + local.template_ = + ( '[' + >> space + >> state.values.list(template_tags::template_) + [ local.template_body + >> ']' + ] + ) [element_action] + ; + + local.attribute_template = + ( '[' + >> space + >> state.values.list(template_tags::attribute_template) + [ local.template_body + >> ']' + ] + ) [element_action] + ; + + local.template_body = + ( cl::str_p('`') + >> cl::eps_p(cl::punct_p) + >> state.templates.scope + [state.values.entry(ph::arg1, ph::arg2, template_tags::escape)] + [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)] + >> !( qbk_ver(106u) + [error("Templates with punctuation names can't be escaped in quickbook 1.6+")] + | strict_mode + [error("Templates with punctuation names can't be escaped (strict mode)")] + ) + | cl::str_p('`') + >> state.templates.scope + [state.values.entry(ph::arg1, ph::arg2, template_tags::escape)] + [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)] + + | cl::eps_p(cl::punct_p) + >> state.templates.scope + [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)] + + | state.templates.scope + [state.values.entry(ph::arg1, ph::arg2, template_tags::identifier)] + >> cl::eps_p(hard_space) + ) + >> space + >> !local.template_args + ; + + local.template_args = + qbk_ver(106u) >> local.template_args_1_6 + | qbk_ver(105u, 106u) >> local.template_args_1_5 + | qbk_ver(0, 105u) >> local.template_args_1_4 + ; + + local.template_args_1_4 = local.template_arg_1_4 >> *(".." >> local.template_arg_1_4); + + local.template_arg_1_4 = + ( cl::eps_p(*cl::blank_p >> cl::eol_p) + >> local.template_inner_arg_1_4 [state.values.entry(ph::arg1, ph::arg2, template_tags::block)] + | local.template_inner_arg_1_4 [state.values.entry(ph::arg1, ph::arg2, template_tags::phrase)] + ) + ; + + local.template_inner_arg_1_4 = + +(local.brackets_1_4 | (cl::anychar_p - (cl::str_p("..") | ']'))) + ; + + local.brackets_1_4 = + '[' >> local.template_inner_arg_1_4 >> ']' + ; + + local.template_args_1_5 = local.template_arg_1_5 >> *(".." >> local.template_arg_1_5); + + local.template_arg_1_5 = + ( cl::eps_p(*cl::blank_p >> cl::eol_p) + >> local.template_arg_1_5_content [state.values.entry(ph::arg1, ph::arg2, template_tags::block)] + | local.template_arg_1_5_content [state.values.entry(ph::arg1, ph::arg2, template_tags::phrase)] + ) + ; + + local.template_arg_1_5_content = + +(local.brackets_1_5 | ('\\' >> cl::anychar_p) | (cl::anychar_p - (cl::str_p("..") | '[' | ']'))) + ; + + local.template_inner_arg_1_5 = + +(local.brackets_1_5 | ('\\' >> cl::anychar_p) | (cl::anychar_p - (cl::str_p('[') | ']'))) + ; + + local.brackets_1_5 = + '[' >> local.template_inner_arg_1_5 >> ']' + ; + + local.template_args_1_6 = local.template_arg_1_6 >> *(".." >> local.template_arg_1_6); + + local.template_arg_1_6 = + ( cl::eps_p(*cl::blank_p >> cl::eol_p) + >> local.template_arg_1_6_content [state.values.entry(ph::arg1, ph::arg2, template_tags::block)] + | local.template_arg_1_6_content [state.values.entry(ph::arg1, ph::arg2, template_tags::phrase)] + ) + ; + + local.template_arg_1_6_content = + + ( ~cl::eps_p("..") >> skip_entity ) + ; + + local.break_ + = ( '[' + >> space + >> "br" + >> space + >> ']' + ) [break_] + ; + + local.inline_code = + '`' >> state.values.list(code_tags::inline_code) + [( + *(cl::anychar_p - + ( '`' + | (cl::eol_p >> *cl::blank_p >> cl::eol_p) + // Make sure that we don't go + ) // past a single block + ) >> cl::eps_p('`') + ) [state.values.entry(ph::arg1, ph::arg2)] + >> '`' + ] [element_action] + ; + + local.skip_inline_code = + '`' + >> *(cl::anychar_p - + ( '`' + | (cl::eol_p >> *cl::blank_p >> cl::eol_p) + // Make sure that we don't go + ) // past a single block + ) + >> !cl::ch_p('`') + ; + + local.skip_code_block = + "```" + >> ~cl::eps_p("`") + >> ( (!( *(*cl::blank_p >> cl::eol_p) + >> ( *( "````" >> *cl::ch_p('`') + | ( cl::anychar_p + - (*cl::space_p >> "```" >> ~cl::eps_p("`")) + ) + ) + >> !(*cl::blank_p >> cl::eol_p) + ) + >> (*cl::space_p >> "```") + )) + | *cl::anychar_p + ) + | "``" + >> ~cl::eps_p("`") + >> ( ( *(*cl::blank_p >> cl::eol_p) + >> ( *( "```" >> *cl::ch_p('`') + | ( cl::anychar_p + - (*cl::space_p >> "``" >> ~cl::eps_p("`")) + ) + ) + >> !(*cl::blank_p >> cl::eol_p) + ) + >> (*cl::space_p >> "``") + ) + | *cl::anychar_p + ) + ; + + local.code_block = + "```" + >> ~cl::eps_p("`") + >> ( state.values.list(code_tags::inline_code_block) + [ *(*cl::blank_p >> cl::eol_p) + >> ( *( "````" >> *cl::ch_p('`') + | ( cl::anychar_p + - (*cl::space_p >> "```" >> ~cl::eps_p("`")) + ) + ) + >> !(*cl::blank_p >> cl::eol_p) + ) [state.values.entry(ph::arg1, ph::arg2)] + >> (*cl::space_p >> "```") + ] [element_action] + | cl::eps_p [error("Unfinished code block")] + >> *cl::anychar_p + ) + | "``" + >> ~cl::eps_p("`") + >> ( state.values.list(code_tags::inline_code_block) + [ *(*cl::blank_p >> cl::eol_p) + >> ( *( "```" >> *cl::ch_p('`') + | ( cl::anychar_p + - (*cl::space_p >> "``" >> ~cl::eps_p("`")) + ) + ) + >> !(*cl::blank_p >> cl::eol_p) + ) [state.values.entry(ph::arg1, ph::arg2)] + >> (*cl::space_p >> "``") + ] [element_action] + | cl::eps_p [error("Unfinished code block")] + >> *cl::anychar_p + ) + ; + + local.simple_markup = + cl::chset<>("*/_=") [ph::var(local.mark) = ph::arg1] + >> cl::eps_p(cl::graph_p) // graph_p must follow first mark + >> lookback + [ cl::anychar_p // skip back over the markup + >> ~cl::eps_p(cl::ch_p(boost::ref(local.mark))) + // first mark not be preceeded by + // the same character. + >> (cl::space_p | cl::punct_p | cl::end_p) + // first mark must be preceeded + // by space or punctuation or the + // mark character or a the start. + ] + >> state.values.save() + [ + to_value() + [ + cl::eps_p((state.macro & macro_identifier) >> local.simple_markup_end) + >> state.macro [do_macro] + | ~cl::eps_p(cl::ch_p(boost::ref(local.mark))) + >> +( ~cl::eps_p + ( lookback [~cl::ch_p(boost::ref(local.mark))] + >> local.simple_markup_end + ) + >> cl::anychar_p [plain_char] + ) + ] + >> cl::ch_p(boost::ref(local.mark)) + [simple_markup] + ] + ; + + local.simple_markup_end + = ( lookback[cl::graph_p] // final mark must be preceeded by + // graph_p + >> cl::ch_p(boost::ref(local.mark)) + >> ~cl::eps_p(cl::ch_p(boost::ref(local.mark))) + // final mark not be followed by + // the same character. + >> (cl::space_p | cl::punct_p | cl::end_p) + // final mark must be followed by + // space or punctuation + ) + | '[' + | "'''" + | '`' + | phrase_end + ; + + escape = + cl::str_p("\\n") [break_] + | cl::str_p("\\ ") // ignore an escaped space + | '\\' >> cl::punct_p [plain_char] + | "\\u" >> cl::repeat_p(4) [cl::chset<>("0-9a-fA-F")] + [escape_unicode] + | "\\U" >> cl::repeat_p(8) [cl::chset<>("0-9a-fA-F")] + [escape_unicode] + | ("'''" >> !eol) + >> state.values.save() + [ (*(cl::anychar_p - "'''")) [state.values.entry(ph::arg1, ph::arg2, phrase_tags::escape)] + >> ( cl::str_p("'''") + | cl::eps_p [error("Unclosed boostbook escape.")] + ) [element_action] + ] + ; + + local.skip_escape = + cl::str_p("\\n") + | cl::str_p("\\ ") + | '\\' >> cl::punct_p + | "\\u" >> cl::repeat_p(4) [cl::chset<>("0-9a-fA-F")] + | "\\U" >> cl::repeat_p(8) [cl::chset<>("0-9a-fA-F")] + | ("'''" >> !eol) + >> (*(cl::anychar_p - "'''")) + >> ( cl::str_p("'''") + | cl::eps_p + ) + ; + + raw_escape = + cl::str_p("\\n") [error("Newlines invalid here.")] + | cl::str_p("\\ ") // ignore an escaped space + | '\\' >> cl::punct_p [raw_char] + | "\\u" >> cl::repeat_p(4) [cl::chset<>("0-9a-fA-F")] + [escape_unicode] + | "\\U" >> cl::repeat_p(8) [cl::chset<>("0-9a-fA-F")] + [escape_unicode] + | ('\\' >> cl::anychar_p) [error("Invalid escape.")] + [raw_char] + | ("'''" >> !eol) [error("Boostbook escape invalid here.")] + >> (*(cl::anychar_p - "'''")) + >> ( cl::str_p("'''") + | cl::eps_p [error("Unclosed boostbook escape.")] + ) + ; + + attribute_template_body = + space + >> *( ~cl::eps_p(space >> cl::end_p | comment) + >> ( cl::eps_p + ( cl::ch_p('[') + >> space + >> ( cl::eps_p(cl::punct_p) + >> elements + | elements + >> (cl::eps_p - (cl::alnum_p | '_')) + ) + ) [error("Elements not allowed in attribute values.")] + >> local.square_brackets + | local.attribute_template + | cl::eps_p(cl::ch_p('[')) [error("Unmatched template in attribute value.")] + >> local.square_brackets + | raw_escape + | cl::anychar_p [raw_char] + ) + ) + >> space + ; + + attribute_value_1_7 = + state.values.save() [ + +( ~cl::eps_p(']' | cl::space_p | comment) + >> ( cl::eps_p + ( cl::ch_p('[') + >> space + >> ( cl::eps_p(cl::punct_p) + >> elements + | elements + >> (cl::eps_p - (cl::alnum_p | '_')) + ) + ) [error("Elements not allowed in attribute values.")] + >> local.square_brackets + | local.attribute_template + | cl::eps_p(cl::ch_p('['))[error("Unmatched template in attribute value.")] + >> local.square_brackets + | raw_escape + | cl::anychar_p [raw_char] + ) + ) + ] + ; + + // + // Command line + // + + command_line = + state.values.list(block_tags::macro_definition) + [ *cl::space_p + >> local.command_line_macro_identifier + [state.values.entry(ph::arg1, ph::arg2)] + >> *cl::space_p + >> !( '=' + >> *cl::space_p + >> to_value() [ inline_phrase ] + >> *cl::space_p + ) + >> cl::end_p + ] [element_action] + ; + + local.command_line_macro_identifier = + qbk_ver(106u) + >> +(cl::anychar_p - (cl::space_p | '[' | '\\' | ']' | '=')) + | +(cl::anychar_p - (cl::space_p | ']' | '=')) + ; + + // Miscellaneous stuff + + // Follows an alphanumeric identifier - ensures that it doesn't + // match an empty space in the middle of the identifier. + hard_space = + (cl::eps_p - (cl::alnum_p | '_')) >> space + ; + + space = + *(cl::space_p | comment) + ; + + blank = + *(cl::blank_p | comment) + ; + + eol = blank >> cl::eol_p + ; + + phrase_end = + ']' + | cl::eps_p(ph::var(local.no_eols)) + >> cl::eol_p >> *cl::blank_p >> cl::eol_p + ; // Make sure that we don't go + // past a single block, except + // when preformatted. + + comment = + "[/" >> *(local.dummy_block | (cl::anychar_p - ']')) >> ']' + ; + + local.dummy_block = + '[' >> *(local.dummy_block | (cl::anychar_p - ']')) >> ']' + ; + + line_comment = + "[/" >> *(local.line_dummy_block | (cl::anychar_p - (cl::eol_p | ']'))) >> ']' + ; + + local.line_dummy_block = + '[' >> *(local.line_dummy_block | (cl::anychar_p - (cl::eol_p | ']'))) >> ']' + ; + + macro_identifier = + qbk_ver(106u) + >> +(cl::anychar_p - (cl::space_p | '[' | '\\' | ']')) + | qbk_ver(0, 106u) + >> +(cl::anychar_p - (cl::space_p | ']')) + ; + + // clang-format on + } + + //////////////////////////////////////////////////////////////////////////// + // Indentation Handling + + template int indent_length(Iterator first, Iterator end) + { + int length = 0; + for (; first != end; ++first) { + if (*first == '\t') { + // hardcoded tab to 4 for now + length = length + 4 - (length % 4); + } + else { + ++length; + } + } + + return length; + } + + void main_grammar_local::start_blocks_impl(parse_iterator, parse_iterator) + { + list_stack.push(list_stack_item(list_stack_item::top_level)); + } + + void main_grammar_local::start_nested_blocks_impl( + parse_iterator, parse_iterator) + { + // If this nested block is part of a list, then tell the + // output state. + state_.in_list = state_.explicit_list; + state_.explicit_list = false; + + list_stack.push(list_stack_item(list_stack_item::nested_block)); + } + + void main_grammar_local::end_blocks_impl(parse_iterator, parse_iterator) + { + clear_stack(); + list_stack.pop(); + } + + void main_grammar_local::check_indentation_impl( + parse_iterator first_, parse_iterator last_) + { + string_iterator first = first_.base(); + string_iterator last = last_.base(); + auto mark_pos = string_view(first, last - first).find_first_of("*#"); + + if (mark_pos == string_view::npos) { + plain_block(first, last); + } + else { + list_block(first, first + mark_pos, last); + } + } + + void main_grammar_local::check_code_block_impl( + parse_iterator first, parse_iterator last) + { + unsigned int new_indent = indent_length(first.base(), last.base()); + + block_type = (new_indent > list_stack.top().indent2) + ? block_types::code + : block_types::none; + } + + void main_grammar_local::plain_block( + string_iterator first, string_iterator last) + { + if (qbk_version_n >= 106u) { + unsigned int new_indent = indent_length(first, last); + + if (new_indent > list_stack.top().indent2) { + if (list_stack.top().type != list_stack_item::nested_block) { + block_type = block_types::code; + } + else { + block_type = block_types::paragraph; + } + } + else { + while (list_stack.top().type == + list_stack_item::syntactic_list && + new_indent < list_stack.top().indent) { + state_.end_list_item(); + state_.end_list(list_stack.top().mark); + list_stack.pop(); + list_indent = list_stack.top().indent; + } + + if (list_stack.top().type == list_stack_item::syntactic_list && + new_indent == list_stack.top().indent) { + // If the paragraph is aligned with the list item's marker, + // then end the current list item if that's aligned (or to + // the left of) the parent's paragraph. + // + // i.e. + // + // * Level 1 + // * Level 2 + // + // Still Level 2 + // + // vs. + // + // * Level 1 + // * Level 2 + // + // Back to Level 1 + + list_stack_item save = list_stack.top(); + list_stack.pop(); + + assert( + list_stack.top().type != list_stack_item::syntactic_list + ? new_indent >= list_stack.top().indent + : new_indent > list_stack.top().indent); + + if (new_indent <= list_stack.top().indent2) { + state_.end_list_item(); + state_.end_list(save.mark); + list_indent = list_stack.top().indent; + } + else { + list_stack.push(save); + } + } + + block_type = block_types::paragraph; + } + + if (qbk_version_n == 106u && + list_stack.top().type == list_stack_item::syntactic_list) { + detail::outerr(state_.current_file, first) + << "Paragraphs in lists aren't supported in quickbook 1.6." + << std::endl; + ++state_.error_count; + } + } + else { + clear_stack(); + + if (list_stack.top().type != list_stack_item::nested_block && + last != first) + block_type = block_types::code; + else + block_type = block_types::paragraph; + } + } + + void main_grammar_local::list_block( + string_iterator first, string_iterator mark_pos, string_iterator last) + { + unsigned int new_indent = indent_length(first, mark_pos); + unsigned int new_indent2 = indent_length(first, last); + char list_mark = *mark_pos; + + if (list_stack.top().type == list_stack_item::top_level && + new_indent > 0) { + block_type = block_types::code; + return; + } + + if (list_stack.top().type != list_stack_item::syntactic_list || + new_indent > list_indent) { + list_stack.push( + list_stack_item(list_mark, new_indent, new_indent2)); + state_.start_list(list_mark); + } + else if (new_indent == list_indent) { + state_.end_list_item(); + } + else { + // This should never reach root, since the first list + // has indentation 0. + while (list_stack.top().type == list_stack_item::syntactic_list && + new_indent < list_stack.top().indent) { + state_.end_list_item(); + state_.end_list(list_stack.top().mark); + list_stack.pop(); + } + + state_.end_list_item(); + } + + list_indent = new_indent; + + if (list_mark != list_stack.top().mark) { + detail::outerr(state_.current_file, first) + << "Illegal change of list style.\n"; + detail::outwarn(state_.current_file, first) + << "Ignoring change of list style." << std::endl; + ++state_.error_count; + } + + state_.start_list_item(); + block_type = block_types::list; + } + + void main_grammar_local::clear_stack() + { + while (list_stack.top().type == list_stack_item::syntactic_list) { + state_.end_list_item(); + state_.end_list(list_stack.top().mark); + list_stack.pop(); + } + } +} diff --git a/src/boost/tools/quickbook/src/markups.cpp b/src/boost/tools/quickbook/src/markups.cpp new file mode 100644 index 000000000..cd13b028b --- /dev/null +++ b/src/boost/tools/quickbook/src/markups.cpp @@ -0,0 +1,83 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "markups.hpp" +#include +#include +#include "block_tags.hpp" +#include "for.hpp" +#include "phrase_tags.hpp" +#include "quickbook.hpp" + +namespace quickbook +{ + namespace detail + { + std::map markups; + + void initialise_markups() + { + markup init_markups[] = { + {block_tags::paragraph, "\n", "\n"}, + {block_tags::paragraph_in_list, "\n", "\n"}, + {block_tags::blurb, "\n", + "\n"}, + {block_tags::blockquote, "
    ", "
    "}, + {block_tags::preformatted, "", + ""}, + {block_tags::warning, "", ""}, + {block_tags::caution, "", ""}, + {block_tags::important, "", ""}, + {block_tags::note, "", ""}, + {block_tags::tip, "", ""}, + {block_tags::block, "", ""}, + {block_tags::ordered_list, "", ""}, + {block_tags::itemized_list, "", + ""}, + {block_tags::hr, "", 0}, + {phrase_tags::url, ""}, + {phrase_tags::link, ""}, + {phrase_tags::funcref, ""}, + {phrase_tags::classref, ""}, + {phrase_tags::memberref, ""}, + {phrase_tags::enumref, ""}, + {phrase_tags::macroref, ""}, + {phrase_tags::headerref, ""}, + {phrase_tags::conceptref, ""}, + {phrase_tags::globalref, ""}, + {phrase_tags::bold, "", ""}, + {phrase_tags::italic, "", ""}, + {phrase_tags::underline, "", + ""}, + {phrase_tags::teletype, "", ""}, + {phrase_tags::strikethrough, + "", ""}, + {phrase_tags::quote, "", ""}, + {phrase_tags::replaceable, "", ""}, + {phrase_tags::escape, "", + ""}, + {phrase_tags::break_mark, "\n", 0}}; + + QUICKBOOK_FOR (markup m, init_markups) { + markups[m.tag] = m; + } + } + + markup const& get_markup(value::tag_type t) { return markups[t]; } + + std::ostream& operator<<(std::ostream& out, markup const& m) + { + return out << "{" << m.tag << ": \"" << m.pre << "\", \"" << m.post + << "\"}"; + } + } +} diff --git a/src/boost/tools/quickbook/src/markups.hpp b/src/boost/tools/quickbook/src/markups.hpp new file mode 100644 index 000000000..d837974eb --- /dev/null +++ b/src/boost/tools/quickbook/src/markups.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_MARKUPS_HPP) +#define BOOST_SPIRIT_MARKUPS_HPP + +#include +#include "values.hpp" + +namespace quickbook +{ + namespace detail + { + struct markup + { + value::tag_type tag; + char const* pre; + char const* post; + }; + + markup const& get_markup(value::tag_type); + std::ostream& operator<<(std::ostream&, markup const&); + } +} + +#endif // BOOST_SPIRIT_MARKUPS_HPP diff --git a/src/boost/tools/quickbook/src/native_text.cpp b/src/boost/tools/quickbook/src/native_text.cpp new file mode 100644 index 000000000..42fc0e13b --- /dev/null +++ b/src/boost/tools/quickbook/src/native_text.cpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2009 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "native_text.hpp" +#include +#include +#include "utils.hpp" + +#if QUICKBOOK_WIDE_PATHS || QUICKBOOK_WIDE_STREAMS +#include +#include +#endif + +namespace quickbook +{ + namespace detail + { +// This is used for converting paths to UTF-8 on cygin. +// Might be better not to use a windows +#if QUICKBOOK_WIDE_PATHS || QUICKBOOK_WIDE_STREAMS + std::string to_utf8(std::wstring const& x) + { + int buffer_count = + WideCharToMultiByte(CP_UTF8, 0, x.c_str(), -1, 0, 0, 0, 0); + + if (!buffer_count) + throw conversion_error( + "Error converting wide string to utf-8."); + + boost::scoped_array buffer(new char[buffer_count]); + + if (!WideCharToMultiByte( + CP_UTF8, 0, x.c_str(), -1, buffer.get(), buffer_count, 0, + 0)) + throw conversion_error( + "Error converting wide string to utf-8."); + + return std::string(buffer.get()); + } + + std::wstring from_utf8(quickbook::string_view text) + { + std::string x(text.begin(), text.end()); + int buffer_count = + MultiByteToWideChar(CP_UTF8, 0, x.c_str(), -1, 0, 0); + + if (!buffer_count) + throw conversion_error( + "Error converting utf-8 to wide string."); + + boost::scoped_array buffer(new wchar_t[buffer_count]); + + if (!MultiByteToWideChar( + CP_UTF8, 0, x.c_str(), -1, buffer.get(), buffer_count)) + throw conversion_error( + "Error converting utf-8 to wide string."); + + return std::wstring(buffer.get()); + } +#endif + } +} diff --git a/src/boost/tools/quickbook/src/native_text.hpp b/src/boost/tools/quickbook/src/native_text.hpp new file mode 100644 index 000000000..33047e4a2 --- /dev/null +++ b/src/boost/tools/quickbook/src/native_text.hpp @@ -0,0 +1,66 @@ +/*============================================================================= + Copyright (c) 2009 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +// For handling native strings and streams. + +#if !defined(BOOST_QUICKBOOK_DETAIL_NATIVE_TEXT_HPP) +#define BOOST_QUICKBOOK_DETAIL_NATIVE_TEXT_HPP + +#include +#include +#include +#include "fwd.hpp" +#include "string_view.hpp" + +#if defined(__cygwin__) || defined(__CYGWIN__) +#define QUICKBOOK_CYGWIN_PATHS 1 +#elif defined(_WIN32) +#define QUICKBOOK_WIDE_PATHS 1 +// Wide streams work okay for me with older versions of Visual C++, +// but I've had reports of problems. My guess is that it's an +// incompatibility with later versions of windows. +#if defined(BOOST_MSVC) && BOOST_MSVC >= 1700 +#define QUICKBOOK_WIDE_STREAMS 1 +#endif +#endif + +#if !defined(QUICKBOOK_WIDE_PATHS) +#define QUICKBOOK_WIDE_PATHS 0 +#endif + +#if !defined(QUICKBOOK_WIDE_STREAMS) +#define QUICKBOOK_WIDE_STREAMS 0 +#endif + +#if !defined(QUICKBOOK_CYGWIN_PATHS) +#define QUICKBOOK_CYGWIN_PATHS 0 +#endif + +namespace quickbook +{ + namespace detail + { + struct conversion_error : std::runtime_error + { + conversion_error(char const* m) : std::runtime_error(m) {} + }; + +#if QUICKBOOK_WIDE_STREAMS + typedef std::wstring stream_string; +#else + typedef std::string stream_string; +#endif + +#if QUICKBOOK_WIDE_PATHS || QUICKBOOK_WIDE_STREAMS + std::string to_utf8(std::wstring const& x); + std::wstring from_utf8(string_view x); +#endif + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/parsers.hpp b/src/boost/tools/quickbook/src/parsers.hpp new file mode 100644 index 000000000..ac15d6471 --- /dev/null +++ b/src/boost/tools/quickbook/src/parsers.hpp @@ -0,0 +1,305 @@ +/*============================================================================= + Copyright (c) 2010-2011 Daniel James + Copyright (c) 2003 Martin Wille + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + =============================================================================*/ + +// Some custom parsers for use in quickbook. + +#ifndef BOOST_QUICKBOOK_PARSERS_HPP +#define BOOST_QUICKBOOK_PARSERS_HPP + +#include +#include +#include +#include +#include +#include "fwd.hpp" +#include "iterator.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + /////////////////////////////////////////////////////////////////////////// + // + // scoped_parser + // + // Impl is a struct with the methods: + // + // void start(); + // void success(parse_iterator, parse_iterator); + // void failure(); + // void cleanup(); + // + /////////////////////////////////////////////////////////////////////////// + + template + struct scoped_parser_impl + : public cl::unary< + ParserT, + cl::parser > > + { + typedef scoped_parser_impl self_t; + typedef cl::unary< + ParserT, + cl::parser > > + base_t; + + template struct result + { + typedef cl::match<> type; + }; + + scoped_parser_impl( + Impl const& impl, Arguments const& arguments, ParserT const& p) + : base_t(p), impl_(impl), arguments_(arguments) + { + } + + struct scoped + { + explicit scoped(Impl const& impl) : impl_(impl), in_progress_(false) + { + } + + typedef phoenix::tuple_index<0> t0; + typedef phoenix::tuple_index<1> t1; + + bool start(phoenix::tuple<> const&) + { + in_progress_ = impl_.start(); + return in_progress_; + } + + template bool start(phoenix::tuple const& x) + { + in_progress_ = + phoenix::bind(&Impl::start)(phoenix::var(impl_), x[t0()])(); + return in_progress_; + } + + template + bool start(phoenix::tuple const& x) + { + in_progress_ = phoenix::bind(&Impl::start)( + phoenix::var(impl_), x[t0()], x[t1()])(); + return in_progress_; + } + + void success(parse_iterator f, parse_iterator l) + { + in_progress_ = false; + impl_.success(f, l); + } + + void failure() + { + in_progress_ = false; + impl_.failure(); + } + + ~scoped() + { + if (in_progress_) impl_.failure(); + impl_.cleanup(); + } + + Impl impl_; + bool in_progress_; + }; + + template + typename result::type parse(ScannerT const& scan) const + { + typedef typename ScannerT::iterator_t iterator_t; + iterator_t save = scan.first; + + scoped scope(impl_); + if (!scope.start(arguments_)) return scan.no_match(); + + typename cl::parser_result::type r = + this->subject().parse(scan); + + bool success = scope.impl_.result(r, scan); + + if (success) { + scope.success(save, scan.first); + + if (r) { + return scan.create_match( + r.length(), cl::nil_t(), save, scan.first); + } + else { + return scan.create_match( + scan.first.base() - save.base(), cl::nil_t(), save, + scan.first); + } + } + else { + scope.failure(); + return scan.no_match(); + } + } + + Impl impl_; + Arguments arguments_; + }; + + template struct scoped_parser_gen + { + explicit scoped_parser_gen(Impl impl, Arguments const& arguments) + : impl_(impl), arguments_(arguments) + { + } + + template + scoped_parser_impl< + Impl, + Arguments, + typename cl::as_parser::type> + operator[](ParserT const& p) const + { + typedef cl::as_parser as_parser_t; + typedef typename as_parser_t::type parser_t; + + return scoped_parser_impl( + impl_, arguments_, p); + } + + Impl impl_; + Arguments arguments_; + }; + + template struct scoped_parser + { + scoped_parser(Impl const& impl) : impl_(impl) {} + + scoped_parser_gen > operator()() const + { + typedef phoenix::tuple<> tuple; + return scoped_parser_gen(impl_, tuple()); + } + + template + scoped_parser_gen > operator()(Arg1 x1) const + { + typedef phoenix::tuple tuple; + return scoped_parser_gen(impl_, tuple(x1)); + } + + template + scoped_parser_gen > operator()( + Arg1 x1, Arg2 x2) const + { + typedef phoenix::tuple tuple; + return scoped_parser_gen(impl_, tuple(x1, x2)); + } + + Impl impl_; + + private: + scoped_parser& operator=(scoped_parser const&); + }; + + /////////////////////////////////////////////////////////////////////////// + // + // Lookback parser + // + // usage: lookback[body] + // + // Requires that iterator has typedef 'lookback_range' and function + // 'lookback' returning a 'lookback_range'. + // + /////////////////////////////////////////////////////////////////////////// + + template + struct lookback_parser + : public cl::unary > > + { + typedef lookback_parser self_t; + typedef cl::unary > > + base_t; + + template struct result + { + typedef typename cl::parser_result::type type; + }; + + lookback_parser(ParserT const& p) : base_t(p) {} + + template + typename result::type parse(ScannerT const& scan) const + { + typedef typename ScannerT::iterator_t::lookback_range::iterator + iterator_t; + typedef cl::scanner + scanner_t; + + iterator_t begin = scan.first.lookback().begin(); + scanner_t lookback_scan(begin, scan.first.lookback().end(), scan); + + if (this->subject().parse(lookback_scan)) + return scan.empty_match(); + else + return scan.no_match(); + } + }; + + struct lookback_gen + { + template + lookback_parser operator[](ParserT const& p) const + { + return lookback_parser(p); + } + }; + + lookback_gen const lookback = lookback_gen(); + + /////////////////////////////////////////////////////////////////////////// + // + // UTF-8 code point + // + // Very crude, it doesn't check that the code point is in any way valid. + // Just looks for the beginning of the next character. This is just for + // implementing some crude fixes, rather than full unicode support. I'm + // sure experts would be appalled. + // + /////////////////////////////////////////////////////////////////////////// + + struct u8_codepoint_parser : public cl::parser + { + typedef u8_codepoint_parser self_t; + + template struct result + { + typedef cl::match<> type; + }; + + template + typename result::type parse(Scanner const& scan) const + { + typedef typename Scanner::iterator_t iterator_t; + + if (scan.at_end()) return scan.no_match(); + + iterator_t save(scan.first); + + do { + ++scan.first; + } while (!scan.at_end() && + ((unsigned char)*scan.first & 0xc0) == 0x80); + + return scan.create_match( + scan.first.base() - save.base(), cl::nil_t(), save, scan.first); + } + }; + + u8_codepoint_parser const u8_codepoint_p = u8_codepoint_parser(); +} + +#endif // BOOST_QUICKBOOK_SCOPED_BLOCK_HPP diff --git a/src/boost/tools/quickbook/src/path.cpp b/src/boost/tools/quickbook/src/path.cpp new file mode 100644 index 000000000..66c27ba31 --- /dev/null +++ b/src/boost/tools/quickbook/src/path.cpp @@ -0,0 +1,450 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + Copyright (c) 2013, 2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "path.hpp" +#include +#include +#include +#include "for.hpp" +#include "glob.hpp" +#include "include_paths.hpp" +#include "state.hpp" +#include "utils.hpp" + +#if QUICKBOOK_CYGWIN_PATHS +#include +#include +#endif + +namespace quickbook +{ + // Not a general purpose normalization function, just + // from paths from the root directory. It strips the excess + // ".." parts from a path like: "x/../../y", leaving "y". + std::vector remove_dots_from_path(fs::path const& path) + { + assert(!path.has_root_directory() && !path.has_root_name()); + + std::vector parts; + + QUICKBOOK_FOR (fs::path const& part, path) { + if (part.empty() || part == ".") { + } + else if (part == "..") { + if (!parts.empty()) parts.pop_back(); + } + else { + parts.push_back(part); + } + } + + return parts; + } + + // The relative path from base to path + fs::path path_difference( + fs::path const& base, fs::path const& path, bool is_file) + { + fs::path absolute_base = fs::absolute(base), + absolute_path = fs::absolute(path); + + // Remove '.', '..' and empty parts from the remaining path + std::vector base_parts = remove_dots_from_path( + absolute_base.relative_path()), + path_parts = remove_dots_from_path( + absolute_path.relative_path()); + + std::vector::iterator base_it = base_parts.begin(), + base_end = base_parts.end(), + path_it = path_parts.begin(), + path_end = path_parts.end(); + + // Build up the two paths in these variables, checking for the first + // difference. + fs::path base_tmp = absolute_base.root_path(), + path_tmp = absolute_path.root_path(); + + fs::path result; + + // If they have different roots then there's no relative path so + // just build an absolute path. + if (!fs::equivalent(base_tmp, path_tmp)) { + result = path_tmp; + } + else { + // Find the point at which the paths differ + for (; base_it != base_end && path_it != path_end; + ++base_it, ++path_it) { + base_tmp /= *base_it; + path_tmp /= *path_it; + if (*base_it != *path_it) { + if (!fs::exists(base_tmp) || !fs::exists(path_tmp) || + !fs::equivalent(base_tmp, path_tmp)) { + break; + } + } + } + + if (is_file && path_it == path_end && + path_it != path_parts.begin()) { + --path_it; + result = ".."; + } + else if (base_it == base_end && path_it == path_end) { + result = "."; + } + + // Build a relative path to that point + for (; base_it != base_end; ++base_it) + result /= ".."; + } + + // Build the rest of our path + for (; path_it != path_end; ++path_it) + result /= *path_it; + + return result; + } + + // Convert a Boost.Filesystem path to a URL. + // + // I'm really not sure about this, as the meaning of root_name and + // root_directory are only clear for windows. + // + // Some info on file URLs at: + // https://en.wikipedia.org/wiki/File_URI_scheme + std::string file_path_to_url_impl(fs::path const& x, bool is_dir) + { + fs::path::const_iterator it = x.begin(), end = x.end(); + if (it == end) { + return is_dir ? "./" : ""; + } + + std::string result; + bool sep = false; + std::string part; + if (x.has_root_name()) { + // Handle network address (e.g. \\example.com) + part = detail::path_to_generic(*it); + if (part.size() >= 2 && part[0] == '/' && part[1] == '/') { + result = "file:" + detail::escape_uri(part); + sep = true; + ++it; + if (it != end && *it == "/") { + result += "/"; + sep = false; + ++it; + } + } + else { + result = "file:///"; + } + + // Handle windows root (e.g. c:) + if (it != end) { + part = detail::path_to_generic(*it); + if (part.size() >= 2 && part[part.size() - 1] == ':') { + result += + detail::escape_uri(part.substr(0, part.size() - 1)); + result += ':'; + sep = false; + ++it; + } + } + } + else if (x.has_root_directory()) { + result = "file://"; + sep = true; + } + else if (*it == ".") { + result = "."; + sep = true; + ++it; + } + + for (; it != end; ++it) { + part = detail::path_to_generic(*it); + if (part == "/") { + result += "/"; + sep = false; + } + else if (part == ".") { + // If the path has a trailing slash, write it out, + // even if is_dir is false. + if (sep) { + result += "/"; + sep = false; + } + } + else { + if (sep) { + result += "/"; + } + result += detail::escape_uri(detail::path_to_generic(*it)); + sep = true; + } + } + + if (is_dir && sep) { + result += "/"; + } + + return result; + } + + std::string file_path_to_url(fs::path const& x) + { + return file_path_to_url_impl(x, false); + } + + std::string dir_path_to_url(fs::path const& x) + { + return file_path_to_url_impl(x, true); + } + + namespace detail + { +#if QUICKBOOK_WIDE_PATHS + std::string command_line_to_utf8(command_line_string const& x) + { + return to_utf8(x); + } +#else + std::string command_line_to_utf8(command_line_string const& x) + { + return x; + } +#endif + +#if QUICKBOOK_WIDE_PATHS + fs::path generic_to_path(quickbook::string_view x) + { + return fs::path(from_utf8(x)); + } + + std::string path_to_generic(fs::path const& x) + { + return to_utf8(x.generic_wstring()); + } +#else + fs::path generic_to_path(quickbook::string_view x) + { + return fs::path(x.begin(), x.end()); + } + + std::string path_to_generic(fs::path const& x) + { + return x.generic_string(); + } +#endif + +#if QUICKBOOK_CYGWIN_PATHS + fs::path command_line_to_path(command_line_string const& path) + { + cygwin_conv_path_t flags = CCP_POSIX_TO_WIN_W | CCP_RELATIVE; + + ssize_t size = cygwin_conv_path(flags, path.c_str(), NULL, 0); + + if (size < 0) + throw conversion_error( + "Error converting cygwin path to windows."); + + boost::scoped_array result(new char[size]); + void* ptr = result.get(); + + if (cygwin_conv_path(flags, path.c_str(), ptr, size)) + throw conversion_error( + "Error converting cygwin path to windows."); + + return fs::path(static_cast(ptr)); + } + + stream_string path_to_stream(fs::path const& path) + { + cygwin_conv_path_t flags = CCP_WIN_W_TO_POSIX | CCP_RELATIVE; + + ssize_t size = + cygwin_conv_path(flags, path.native().c_str(), NULL, 0); + + if (size < 0) + throw conversion_error( + "Error converting windows path to cygwin."); + + boost::scoped_array result(new char[size]); + + if (cygwin_conv_path( + flags, path.native().c_str(), result.get(), size)) + throw conversion_error( + "Error converting windows path to cygwin."); + + return std::string(result.get()); + } +#else + fs::path command_line_to_path(command_line_string const& path) + { + return fs::path(path); + } + +#if QUICKBOOK_WIDE_PATHS && !QUICKBOOK_WIDE_STREAMS + stream_string path_to_stream(fs::path const& path) + { + return path.string(); + } +#else + stream_string path_to_stream(fs::path const& path) + { + return path.native(); + } +#endif + +#endif // QUICKBOOK_CYGWIN_PATHS + + enum path_or_url_type + { + path_or_url_empty = 0, + path_or_url_path, + path_or_url_url + }; + + path_or_url::path_or_url() : type_(path_or_url_empty) {} + + path_or_url::path_or_url(path_or_url const& x) + : type_(x.type_), path_(x.path_), url_(x.url_) + { + } + + path_or_url::path_or_url(command_line_string const& x) + { + auto rep = command_line_to_utf8(x); + auto it = rep.begin(), end = rep.end(); + std::size_t count = 0; + while (it != end && + ((*it >= 'a' && *it <= 'z') || (*it >= 'A' && *it <= 'Z') || + *it == '+' || *it == '-' || *it == '.')) { + ++it; + ++count; + } + + if (it != end && *it == ':' && count > 1) { + type_ = path_or_url_url; + } + else { + type_ = path_or_url_path; + } + + switch (type_) { + case path_or_url_empty: + break; + case path_or_url_path: + path_ = command_line_to_path(x); + break; + case path_or_url_url: + url_ = rep; + break; + default: + assert(false); + } + } + + path_or_url& path_or_url::operator=(path_or_url const& x) + { + type_ = x.type_; + path_ = x.path_; + url_ = x.url_; + return *this; + } + + path_or_url& path_or_url::operator=(command_line_string const& x) + { + path_or_url tmp(x); + swap(tmp); + return *this; + } + + void path_or_url::swap(path_or_url& x) + { + std::swap(type_, x.type_); + std::swap(path_, x.path_); + std::swap(url_, x.url_); + } + + path_or_url path_or_url::url(string_view x) + { + path_or_url r; + r.type_ = path_or_url_url; + r.url_.assign(x.begin(), x.end()); + return r; + } + + path_or_url path_or_url::path(boost::filesystem::path const& x) + { + path_or_url r; + r.type_ = path_or_url_path; + r.path_ = x; + return r; + } + + path_or_url::operator bool() const + { + return type_ != path_or_url_empty; + } + + bool path_or_url::is_path() const { return type_ == path_or_url_path; } + + bool path_or_url::is_url() const { return type_ == path_or_url_url; } + + boost::filesystem::path const& path_or_url::get_path() const + { + assert(is_path()); + return path_; + } + + std::string const& path_or_url::get_url() const + { + assert(is_url()); + return url_; + } + + path_or_url path_or_url::operator/(string_view x) const + { + path_or_url r; + r.type_ = type_; + + switch (type_) { + case path_or_url_empty: + assert(false); + break; + case path_or_url_path: + r.path_ = path_ / x.to_s(); + break; + case path_or_url_url: { + r.url_ = url_; + auto pos = r.url_.rfind('/'); + if (pos == std::string::npos) { + pos = r.url_.rfind(':'); + } + if (pos != std::string::npos) { + r.url_.resize(pos + 1); + } + else { + // Error? Empty string? + r.url_ = "/"; + } + r.url_ += x; + break; + } + default: + assert(false); + } + return r; + } + } +} diff --git a/src/boost/tools/quickbook/src/path.hpp b/src/boost/tools/quickbook/src/path.hpp new file mode 100644 index 000000000..f66251c9d --- /dev/null +++ b/src/boost/tools/quickbook/src/path.hpp @@ -0,0 +1,116 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + Copyright (c) 2013, 2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_DETAIL_PATH_HPP) +#define BOOST_QUICKBOOK_DETAIL_PATH_HPP + +#include +#include "native_text.hpp" + +namespace quickbook +{ + namespace fs = boost::filesystem; + + // The relative path from base to path + fs::path path_difference( + fs::path const& base, fs::path const& path, bool is_file = false); + + // Convert a Boost.Filesystem path to a URL. + std::string file_path_to_url(fs::path const&); + std::string dir_path_to_url(fs::path const&); + + namespace detail + { +// 'generic': Paths in quickbook source and the generated boostbook. +// Always UTF-8. +// 'command_line': +// Paths (or other parameters) from the command line and +// possibly other sources in the future. Wide strings on +// normal windows, UTF-8 for cygwin and other platforms +// (hopefully). +// 'path': Stored as a boost::filesystem::path. Since +// Boost.Filesystem doesn't support cygwin, this +// is always wide on windows. UTF-8 on other +// platforms (again, hopefully). + +#if QUICKBOOK_WIDE_PATHS + typedef std::wstring command_line_string; +#else + typedef std::string command_line_string; +#endif + + std::string command_line_to_utf8(command_line_string const&); + fs::path command_line_to_path(command_line_string const&); + + std::string path_to_generic(fs::path const&); + fs::path generic_to_path(quickbook::string_view); + + stream_string path_to_stream(fs::path const& path); + + // Command line parameters that might be a path, a url, or empty. + // Not very efficient, but won't be used much. + class path_or_url + { + int type_; + boost::filesystem::path path_; + std::string url_; + + public: + // Creates an empty path_or_url. + path_or_url(); + + path_or_url(path_or_url const&); + + // Stores a parameter as either a path or a URL depending + // on whether it looks like an absolute URL (i.e. starts with + // 'scheme:') + explicit path_or_url(command_line_string const&); + + path_or_url& operator=(path_or_url const&); + + path_or_url& operator=(command_line_string const&); + + void swap(path_or_url&); + + // Explicity create a URL + static path_or_url url(string_view); + + // Explicitly create a path + static path_or_url path(boost::filesystem::path const&); + + // Returns true if this isn't empty. + operator bool() const; + + // Returns true if contains a path. + bool is_path() const; + + // Returns true is contains a URL. + bool is_url() const; + + // Returns the stored path. + // pre: is_path() + boost::filesystem::path const& get_path() const; + + // Returns the stored URL. + // pre: is_url() + std::string const& get_url() const; + + // Appends the value, either by path concatenation or URL + // concatenation. + // Note: a URL will strip text after the last '/', a path won't. + // Maybe should only work when the path is known to be a + // directory? + path_or_url operator/(string_view) const; + }; + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/phrase_element_grammar.cpp b/src/boost/tools/quickbook/src/phrase_element_grammar.cpp new file mode 100644 index 000000000..ed33e3000 --- /dev/null +++ b/src/boost/tools/quickbook/src/phrase_element_grammar.cpp @@ -0,0 +1,211 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "for.hpp" +#include "grammar_impl.hpp" +#include "phrase_tags.hpp" +#include "state.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + struct phrase_element_grammar_local + { + cl::rule image, anchor, link, empty, cond_phrase, inner_phrase, + role, source_mode; + }; + + void quickbook_grammar::impl::init_phrase_elements() + { + phrase_element_grammar_local& local = + cleanup_.add(new phrase_element_grammar_local); + + error_action error(state); + raw_char_action raw_char(state); + scoped_parser scoped_cond_phrase(state); + scoped_parser to_value(state); + + // clang-format off + + elements.add + ("?", element_info(element_info::phrase, &local.cond_phrase)) + ; + + local.cond_phrase = + ( !(qbk_ver(107u) >> "!") ) [state.values.entry(ph::arg1, ph::arg2)] + >> blank + >> macro_identifier [state.values.entry(ph::arg1, ph::arg2)] + >> scoped_cond_phrase() [extended_phrase] + ; + + elements.add + ("$", element_info(element_info::phrase, &local.image, phrase_tags::image)) + ; + + // Note that the attribute values here are encoded in plain text not + // boostbook. + local.image = + qbk_ver(105u) + >> blank + >> ( qbk_ver(0, 106u) + >> (+( + *cl::space_p + >> +(cl::anychar_p - (cl::space_p | phrase_end | '[')) + )) [state.values.entry(ph::arg1, ph::arg2)] + | qbk_ver(106u) + >> to_value() + [ +( raw_escape + | (+cl::space_p >> ~cl::eps_p(phrase_end | '[')) + [raw_char] + | (cl::anychar_p - (cl::space_p | phrase_end | '[')) + [raw_char] + ) + ] + ) + >> hard_space + >> *state.values.list() + [ '[' + >> (*(cl::alnum_p | '_')) + [state.values.entry(ph::arg1, ph::arg2)] + >> space + >> ( qbk_ver(0, 106u) + >> (*(cl::anychar_p - (phrase_end | '['))) + [state.values.entry(ph::arg1, ph::arg2)] + | qbk_ver(106u) + >> to_value() + [ *( raw_escape + | (cl::anychar_p - (phrase_end | '[')) + [raw_char] + ) + ] + ) + >> ']' + >> space + ] + >> cl::eps_p(']') + | qbk_ver(0, 105u) + >> blank + >> (*(cl::anychar_p - phrase_end)) [state.values.entry(ph::arg1, ph::arg2)] + >> cl::eps_p(']') + ; + + elements.add + ("@", element_info(element_info::phrase, &local.link, phrase_tags::url)) + ("link", element_info(element_info::phrase, &local.link, phrase_tags::link)) + ("funcref", element_info(element_info::phrase, &local.link, phrase_tags::funcref)) + ("classref", element_info(element_info::phrase, &local.link, phrase_tags::classref)) + ("memberref", element_info(element_info::phrase, &local.link, phrase_tags::memberref)) + ("enumref", element_info(element_info::phrase, &local.link, phrase_tags::enumref)) + ("macroref", element_info(element_info::phrase, &local.link, phrase_tags::macroref)) + ("headerref", element_info(element_info::phrase, &local.link, phrase_tags::headerref)) + ("conceptref", element_info(element_info::phrase, &local.link, phrase_tags::conceptref)) + ("globalref", element_info(element_info::phrase, &local.link, phrase_tags::globalref)) + ; + + local.link = + space + >> ( qbk_ver(0, 106u) + >> (*(cl::anychar_p - (']' | space))) + [state.values.entry(ph::arg1, ph::arg2)] + | qbk_ver(106u, 107u) + >> to_value() + [ *( raw_escape + | (cl::anychar_p - (cl::ch_p('[') | ']' | space)) + [raw_char] + ) + ] + >> !( ~cl::eps_p(comment) + >> cl::eps_p('[') [error("Open bracket in link value.")] + ) + | qbk_ver(107u) + >> to_value() [attribute_value_1_7] + ) + >> hard_space + >> local.inner_phrase + ; + + elements.add + ("#", element_info(element_info::maybe_block, &local.anchor, phrase_tags::anchor)) + ; + + local.anchor = + blank + >> ( qbk_ver(0, 106u) + >> (*(cl::anychar_p - phrase_end)) [state.values.entry(ph::arg1, ph::arg2)] + | qbk_ver(106u, 107u) + >> to_value() + [ *( raw_escape + | (cl::anychar_p - phrase_end) + [raw_char] + ) + ] + | qbk_ver(107u) + >> to_value() [attribute_value_1_7] + ) + ; + + elements.add + ("*", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::bold)) + ("'", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::italic)) + ("_", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::underline)) + ("^", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::teletype)) + ("-", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::strikethrough)) + ("\"", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::quote)) + ("~", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::replaceable)) + ("footnote", element_info(element_info::phrase, &local.inner_phrase, phrase_tags::footnote)) + ; + + elements.add("!", element_info(element_info::maybe_block, &local.source_mode, code_tags::next_source_mode, 107u)) + ; + + local.source_mode = + cl::eps_p [state.values.entry(ph::arg1, ph::arg2)] + >> source_modes [state.values.entry(ph::arg1)]; + + QUICKBOOK_FOR(int tag, source_mode_tags::tags()) { + source_modes.add(source_mode_tags::name(tag), tag); + elements.add(source_mode_tags::name(tag), + element_info(element_info::phrase, &local.empty, tag)); + } + + elements.add + ("role", element_info(element_info::phrase, &local.role, phrase_tags::role, 106u)) + ; + + local.role + = space + >> ( qbk_ver(0, 107u) + >> (+(cl::alnum_p | '_')) [state.values.entry(ph::arg1, ph::arg2)] + | qbk_ver(107u) + >> to_value() [attribute_value_1_7] + ) + >> hard_space + >> local.inner_phrase + ; + + local.empty = cl::eps_p; + + local.inner_phrase = + blank + >> to_value() [ paragraph_phrase ] + ; + + // clang-format on + } +} diff --git a/src/boost/tools/quickbook/src/phrase_tags.hpp b/src/boost/tools/quickbook/src/phrase_tags.hpp new file mode 100644 index 000000000..e94c0935c --- /dev/null +++ b/src/boost/tools/quickbook/src/phrase_tags.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_PHRASE_TAGS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_PHRASE_TAGS_HPP + +#include "value_tags.hpp" + +namespace quickbook +{ + // clang-format off + + QUICKBOOK_VALUE_TAGS(phrase_tags, 0x500, + (image) + (url)(link)(anchor) + (funcref)(classref)(memberref)(enumref) + (macroref)(headerref)(conceptref)(globalref) + (bold)(italic)(underline)(teletype)(strikethrough)(quote)(replaceable) + (footnote) + (escape) + (break_mark) + (role) + ) + + QUICKBOOK_VALUE_NAMED_TAGS(source_mode_tags, 0x550, + ((cpp)("c++")) + ((python)("python")) + ((teletype)("teletype")) + ) + + QUICKBOOK_VALUE_TAGS(code_tags, 0x560, + (code_block) + (inline_code) + (inline_code_block) + (next_source_mode) + ) + + // clang-format on +} + +#endif diff --git a/src/boost/tools/quickbook/src/post_process.cpp b/src/boost/tools/quickbook/src/post_process.cpp new file mode 100644 index 000000000..1ee02bc4c --- /dev/null +++ b/src/boost/tools/quickbook/src/post_process.cpp @@ -0,0 +1,454 @@ +/*============================================================================= + Copyright (c) 2005 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "post_process.hpp" +#include +#include +#include +#include +#include +#include +#include + +using namespace boost::placeholders; + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + namespace ph = phoenix; + typedef std::string::const_iterator iter_type; + + struct pretty_printer + { + pretty_printer(std::string& out_, int& current_indent_, int linewidth_) + : prev(0) + , out(out_) + , current_indent(current_indent_) + , column(0) + , in_string(false) + , linewidth(linewidth_) + { + } + + void indent() + { + BOOST_ASSERT(current_indent >= 0); // this should not happen! + for (int i = 0; i < current_indent; ++i) + out += ' '; + column = current_indent; + } + + void trim_spaces() + { + out.erase(out.find_last_not_of(' ') + 1); // trim trailing spaces + } + + void break_line() + { + trim_spaces(); + out += '\n'; + indent(); + } + + bool line_is_empty() const + { + for (iter_type i = out.end() - (column - current_indent); + i != out.end(); ++i) { + if (*i != ' ') return false; + } + return true; + } + + void align_indent() + { + // make sure we are at the proper indent position + if (column != current_indent) { + if (column > current_indent) { + if (line_is_empty()) { + // trim just enough trailing spaces down to + // current_indent position + out.erase( + out.end() - (column - current_indent), out.end()); + column = current_indent; + } + else { + // nope, line is not empty. do a hard CR + break_line(); + } + } + else { + // will this happen? (i.e. column <= current_indent) + while (column != current_indent) { + out += ' '; + ++column; + } + } + } + } + + void print(char ch) + { + // Print a char. Attempt to break the line if we are exceeding + // the target linewidth. The linewidth is not an absolute limit. + // There are many cases where a line will exceed the linewidth + // and there is no way to properly break the line. Preformatted + // code that exceeds the linewidth are examples. We cannot break + // preformatted code. We shall not attempt to be very strict with + // line breaking. What's more important is to have a reproducable + // output (i.e. processing two logically equivalent xml files + // results in two lexically equivalent xml files). *** pretty + // formatting is a secondary goal *** + + // Strings will occur only in tag attributes. Normal content + // will have " instead. We shall deal only with tag + // attributes here. + if (ch == '"') in_string = !in_string; // don't break strings! + + if (!in_string && std::isspace(static_cast(ch))) { + // we can break spaces if they are not inside strings + if (!std::isspace(static_cast(prev))) { + if (column >= linewidth) { + break_line(); + if (column == 0 && ch == ' ') { + ++column; + out += ' '; + } + } + else { + ++column; + out += ' '; + } + } + } + else { + // we can break tag boundaries and stuff after + // delimiters if they are not inside strings + // and *only-if* the preceding char is a space + if (!in_string && column >= linewidth && + (ch == '<' && + std::isspace(static_cast(prev)))) + break_line(); + out += ch; + ++column; + } + + prev = ch; + } + + void print(iter_type f, iter_type l) + { + for (iter_type i = f; i != l; ++i) + print(*i); + } + + void print_tag(iter_type f, iter_type l, bool is_flow_tag) + { + if (is_flow_tag) { + print(f, l); + } + else { + // This is not a flow tag, so, we're going to do a + // carriage return anyway. Let us remove extra right + // spaces. + std::string str(f, l); + BOOST_ASSERT(f != l); // this should not happen + iter_type i = str.end(); + while (i != str.begin() && + std::isspace(static_cast(*(i - 1)))) + --i; + print(str.begin(), i); + } + } + + char prev; + std::string& out; + int& current_indent; + int column; + bool in_string; + int linewidth; + + private: + pretty_printer& operator=(pretty_printer const&); + }; + + char const* html_block_tags_[] = { + "div", "p", "blockquote", "address", "h1", "h2", "h3", + "h4", "h5", "h6", "ul", "ol", "li", "dl", + "dt", "dd", "table", "tr", "th", "td", "tbody", + "thead", "form", "fieldset", "hr", "noscript", "html", "body"}; + + char const* block_tags_[] = { + "author", "blockquote", "bridgehead", "callout", + "calloutlist", "caution", "copyright", "entry", + "important", "informaltable", "itemizedlist", "legalnotice", + "listitem", "note", "orderedlist", "para", + "row", "section", "simpara", "table", + "tbody", "textobject", "tgroup", "thead", + "tip", "variablelist", "varlistentry", "warning", + "xml", "xi:include"}; + + char const* doc_types_[] = {"book", "article", "library", "chapter", + "part", "appendix", "preface", "qandadiv", + "qandaset", "reference", "set"}; + + struct tidy_compiler + { + tidy_compiler(std::string& out_, int linewidth_, bool is_html) + : out(out_) + , current_indent(0) + , printer(out_, current_indent, linewidth_) + { + if (is_html) { + static std::size_t const n_block_tags = + sizeof(html_block_tags_) / sizeof(char const*); + for (std::size_t i = 0; i != n_block_tags; ++i) { + block_tags.insert(html_block_tags_[i]); + } + } + else { + static std::size_t const n_block_tags = + sizeof(block_tags_) / sizeof(char const*); + for (std::size_t i = 0; i != n_block_tags; ++i) { + block_tags.insert(block_tags_[i]); + } + + static std::size_t const n_doc_types = + sizeof(doc_types_) / sizeof(char const*); + for (std::size_t i = 0; i != n_doc_types; ++i) { + block_tags.insert(doc_types_[i]); + block_tags.insert(doc_types_[i] + std::string("info")); + block_tags.insert(doc_types_[i] + std::string("purpose")); + } + } + } + + bool is_flow_tag(std::string const& tag) + { + return block_tags.find(tag) == block_tags.end(); + } + + std::set block_tags; + std::stack tags; + std::string& out; + int current_indent; + pretty_printer printer; + std::string current_tag; + + private: + tidy_compiler& operator=(tidy_compiler const&); + }; + + struct tidy_grammar : cl::grammar + { + tidy_grammar(tidy_compiler& state_, int indent_, bool is_html_) + : state(state_), indent(indent_), is_html(is_html_) + { + } + + template struct definition + { + definition(tidy_grammar const& self) + { + // clang-format off + + tag = (cl::lexeme_d[+(cl::alnum_p | '_' | ':')]) [boost::bind(&tidy_grammar::do_tag, &self, _1, _2)]; + + code = cl::eps_p(ph::var(self.is_html)) + >> "<" + >> cl::lexeme_d[cl::str_p("pre")] + >> *(cl::anychar_p - '>') + >> ">" + >> *(cl::anychar_p - "") + >> "> cl::lexeme_d[">" >> *cl::space_p] + | cl::eps_p(!ph::var(self.is_html)) + >> "" + >> *(cl::anychar_p - "") + >> "> cl::lexeme_d[">" >> *cl::space_p] + ; + + // What's the business of cl::lexeme_d['>' >> *cl::space_p]; ? + // It is there to preserve the space after the tag that is + // otherwise consumed by the cl::space_p skipper. + + escape = + cl::str_p("") >> + (*(cl::anychar_p - cl::str_p(""))) + [ + boost::bind(&tidy_grammar::do_escape, &self, _1, _2) + ] + >> cl::lexeme_d + [ + cl::str_p("") >> + (*cl::space_p) + [ + boost::bind(&tidy_grammar::do_escape_post, &self, _1, _2) + ] + ] + ; + + start_tag = '<' >> tag >> *(cl::anychar_p - '>') >> cl::lexeme_d['>' >> *cl::space_p]; + start_end_tag = + '<' >> tag >> *(cl::anychar_p - ("/>" | cl::ch_p('>'))) >> cl::lexeme_d["/>" >> *cl::space_p] + | "> tag >> *(cl::anychar_p - '?') >> cl::lexeme_d["?>" >> *cl::space_p] + | "") >> cl::lexeme_d["-->" >> *cl::space_p] + | "> tag >> *(cl::anychar_p - '>') >> cl::lexeme_d['>' >> *cl::space_p] + ; + content = cl::lexeme_d[ +(cl::anychar_p - '<') ]; + end_tag = "> +(cl::anychar_p - '>') >> cl::lexeme_d['>' >> *cl::space_p]; + + markup = + escape + | code [boost::bind(&tidy_grammar::do_code, &self, _1, _2)] + | start_end_tag [boost::bind(&tidy_grammar::do_start_end_tag, &self, _1, _2)] + | start_tag [boost::bind(&tidy_grammar::do_start_tag, &self, _1, _2)] + | end_tag [boost::bind(&tidy_grammar::do_end_tag, &self, _1, _2)] + | content [boost::bind(&tidy_grammar::do_content, &self, _1, _2)] + ; + + tidy = *markup; + + // clang-format on + } + + cl::rule const& start() { return tidy; } + + cl::rule tidy, tag, start_tag, start_end_tag, content, + end_tag, markup, code, escape; + }; + + void do_escape_post(iter_type f, iter_type l) const + { + for (iter_type i = f; i != l; ++i) + state.out += *i; + } + + void do_escape(iter_type f, iter_type l) const + { + while (f != l && std::isspace(*f)) { + ++f; + } + while (f != l && std::isspace(*(l - 1))) { + --l; + } + for (iter_type i = f; i != l; ++i) { + state.out += *i; + } + } + + void do_code(iter_type f, iter_type l) const + { + state.printer.trim_spaces(); + if (state.out[state.out.size() - 1] != '\n') state.out += '\n'; + + // trim trailing space from after closing tag + while (f != l && std::isspace(*(l - 1))) { + --l; + } + + // print the string taking care of line + // ending CR/LF platform issues + for (iter_type i = f; i != l;) { + if (*i == '\n') { + state.printer.trim_spaces(); + state.out += '\n'; + ++i; + if (i != l && *i == '\r') { + ++i; + } + } + else if (*i == '\r') { + state.printer.trim_spaces(); + state.out += '\n'; + ++i; + if (i != l && *i == '\n') { + ++i; + } + } + else { + state.out += *i; + ++i; + } + } + state.out += '\n'; + state.printer.indent(); + } + + void do_tag(iter_type f, iter_type l) const + { + state.current_tag = std::string(f, l); + } + + void do_start_end_tag(iter_type f, iter_type l) const + { + bool is_flow_tag = state.is_flow_tag(state.current_tag); + if (!is_flow_tag) state.printer.align_indent(); + state.printer.print_tag(f, l, is_flow_tag); + if (!is_flow_tag) state.printer.break_line(); + } + + void do_start_tag(iter_type f, iter_type l) const + { + state.tags.push(state.current_tag); + bool is_flow_tag = state.is_flow_tag(state.current_tag); + if (!is_flow_tag) state.printer.align_indent(); + state.printer.print_tag(f, l, is_flow_tag); + if (!is_flow_tag) { + state.current_indent += indent; + state.printer.break_line(); + } + } + + void do_content(iter_type f, iter_type l) const + { + state.printer.print(f, l); + } + + void do_end_tag(iter_type f, iter_type l) const + { + if (state.tags.empty()) + throw quickbook::post_process_failure("Mismatched tags."); + + bool is_flow_tag = state.is_flow_tag(state.tags.top()); + if (!is_flow_tag) { + state.current_indent -= indent; + state.printer.align_indent(); + } + state.printer.print_tag(f, l, is_flow_tag); + if (!is_flow_tag) state.printer.break_line(); + state.tags.pop(); + } + + tidy_compiler& state; + int indent; + bool is_html; + + private: + tidy_grammar& operator=(tidy_grammar const&); + }; + + std::string post_process( + std::string const& in, int indent, int linewidth, bool is_html) + { + if (indent == -1) indent = 2; // set default to 2 + if (linewidth == -1) linewidth = 80; // set default to 80 + + std::string tidy; + tidy_compiler state(tidy, linewidth, is_html); + tidy_grammar g(state, indent, is_html); + cl::parse_info r = + parse(in.begin(), in.end(), g, cl::space_p); + if (r.full) { + return tidy; + } + else { + throw quickbook::post_process_failure("Post Processing Failed."); + } + } +} diff --git a/src/boost/tools/quickbook/src/post_process.hpp b/src/boost/tools/quickbook/src/post_process.hpp new file mode 100644 index 000000000..7c4324b43 --- /dev/null +++ b/src/boost/tools/quickbook/src/post_process.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2005 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_POST_PROCESS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_POST_PROCESS_HPP + +#include +#include + +namespace quickbook +{ + std::string post_process( + std::string const& in, + int indent = -1, + int linewidth = -1, + bool is_html = false); + + struct post_process_failure : public std::runtime_error + { + public: + explicit post_process_failure(std::string const& error) + : std::runtime_error(error) + { + } + }; +} + +#endif // BOOST_SPIRIT_QUICKBOOK_POST_PROCESS_HPP diff --git a/src/boost/tools/quickbook/src/quickbook.cpp b/src/boost/tools/quickbook/src/quickbook.cpp new file mode 100644 index 000000000..cc8fe0dcb --- /dev/null +++ b/src/boost/tools/quickbook/src/quickbook.cpp @@ -0,0 +1,782 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "quickbook.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "bb2html.hpp" +#include "document_state.hpp" +#include "files.hpp" +#include "for.hpp" +#include "grammar.hpp" +#include "path.hpp" +#include "post_process.hpp" +#include "state.hpp" +#include "stream.hpp" +#include "utils.hpp" + +#include +#include +#include + +#if defined(_WIN32) +#include +#include +#endif + +#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)) +#pragma warning(disable : 4355) +#endif + +#define QUICKBOOK_VERSION "Quickbook Version 1.7.2" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + namespace fs = boost::filesystem; + + tm* current_time; // the current time + tm* current_gm_time; // the current UTC time + bool debug_mode; // for quickbook developers only + bool self_linked_headers; + std::vector include_path; + std::vector preset_defines; + fs::path image_location; + + static void set_macros(quickbook::state& state) + { + QUICKBOOK_FOR (quickbook::string_view val, preset_defines) { + parse_iterator first(val.begin()); + parse_iterator last(val.end()); + + cl::parse_info info = + cl::parse(first, last, state.grammar().command_line_macro); + + if (!info.full) { + detail::outerr() << "Error parsing command line definition: '" + << val << "'" << std::endl; + ++state.error_count; + } + } + } + + /////////////////////////////////////////////////////////////////////////// + // + // Parse a file + // + /////////////////////////////////////////////////////////////////////////// + void parse_file( + quickbook::state& state, value include_doc_id, bool nested_file) + { + parse_iterator first(state.current_file->source().begin()); + parse_iterator last(state.current_file->source().end()); + + cl::parse_info info = + cl::parse(first, last, state.grammar().doc_info); + assert(info.hit); + + if (!state.error_count) { + std::string doc_type = + pre(state, info.stop, include_doc_id, nested_file); + + info = cl::parse( + info.hit ? info.stop : first, last, + state.grammar().block_start); + + post(state, doc_type); + + if (!info.full) { + file_position const& pos = + state.current_file->position_of(info.stop.base()); + detail::outerr(state.current_file->path, pos.line) + << "Syntax Error near column " << pos.column << ".\n"; + ++state.error_count; + } + } + } + + struct parse_document_options + { + enum output_format + { + boostbook, + html + }; + enum output_style + { + output_none = 0, + output_file, + output_chunked + }; + + parse_document_options() + : format(boostbook) + , style(output_file) + , output_path() + , indent(-1) + , linewidth(-1) + , pretty_print(true) + , strict_mode(false) + , deps_out_flags(quickbook::dependency_tracker::default_) + { + } + + output_format format; + output_style style; + fs::path output_path; + int indent; + int linewidth; + bool pretty_print; + bool strict_mode; + fs::path deps_out; + quickbook::dependency_tracker::flags deps_out_flags; + fs::path locations_out; + fs::path xinclude_base; + quickbook::detail::html_options html_ops; + }; + + static int parse_document( + fs::path const& filein_, parse_document_options const& options_) + { + string_stream buffer; + document_state output; + + int result = 0; + + try { + quickbook::state state( + filein_, options_.xinclude_base, buffer, output); + state.strict_mode = options_.strict_mode; + set_macros(state); + + if (state.error_count == 0) { + state.dependencies.add_dependency(filein_); + state.current_file = load(filein_); // Throws load_error + + parse_file(state); + + if (state.error_count) { + detail::outerr() + << "Error count: " << state.error_count << ".\n"; + } + } + + result = state.error_count ? 1 : 0; + + if (!options_.deps_out.empty()) { + state.dependencies.write_dependencies( + options_.deps_out, options_.deps_out_flags); + } + + if (!options_.locations_out.empty()) { + fs::ofstream out(options_.locations_out); + state.dependencies.write_dependencies( + options_.locations_out, dependency_tracker::checked); + } + } catch (load_error& e) { + detail::outerr(filein_) << e.what() << std::endl; + result = 1; + } catch (std::runtime_error& e) { + detail::outerr() << e.what() << std::endl; + result = 1; + } + + if (result) { + return result; + } + + if (options_.style) { + std::string stage2 = output.replace_placeholders(buffer.str()); + + if (options_.pretty_print) { + try { + stage2 = post_process( + stage2, options_.indent, options_.linewidth); + } catch (quickbook::post_process_failure&) { + ::quickbook::detail::outerr() + << "Post Processing Failed." << std::endl; + if (options_.format == parse_document_options::boostbook) { + // Can still write out a boostbook file, but return an + // error code. + result = 1; + } + else { + return 1; + } + } + } + + if (options_.format == parse_document_options::html) { + if (result) { + return result; + } + return quickbook::detail::boostbook_to_html( + stage2, options_.html_ops); + } + else { + fs::ofstream fileout(options_.output_path); + + if (fileout.fail()) { + ::quickbook::detail::outerr() + << "Error opening output file " << options_.output_path + << std::endl; + + return 1; + } + + fileout << stage2; + + if (fileout.fail()) { + ::quickbook::detail::outerr() + << "Error writing to output file " + << options_.output_path << std::endl; + + return 1; + } + } + } + + return result; + } +} + +/////////////////////////////////////////////////////////////////////////// +// +// Main program +// +/////////////////////////////////////////////////////////////////////////// +int main(int argc, char* argv[]) +{ + try { + namespace fs = boost::filesystem; + namespace po = boost::program_options; + + using boost::program_options::options_description; + using boost::program_options::variables_map; + using boost::program_options::store; + using boost::program_options::parse_command_line; + using boost::program_options::wcommand_line_parser; + using boost::program_options::command_line_parser; + using boost::program_options::notify; + using boost::program_options::positional_options_description; + + using namespace quickbook; + using quickbook::detail::command_line_string; + + // First thing, the filesystem should record the current working + // directory. + fs::initial_path(); + + // Various initialisation methods + quickbook::detail::initialise_output(); + quickbook::detail::initialise_markups(); + + // Declare the program options + + options_description desc("Allowed options"); + options_description html_desc("HTML options"); + options_description hidden("Hidden options"); + options_description all("All options"); + +#if QUICKBOOK_WIDE_PATHS +#define PO_VALUE po::wvalue +#else +#define PO_VALUE po::value +#endif + + // clang-format off + + desc.add_options() + ("help", "produce help message") + ("version", "print version string") + ("no-pretty-print", "disable XML pretty printing") + ("strict", "strict mode") + ("no-self-linked-headers", "stop headers linking to themselves") + ("indent", PO_VALUE(), "indent spaces") + ("linewidth", PO_VALUE(), "line width") + ("input-file", PO_VALUE(), "input file") + ("output-format", PO_VALUE(), "boostbook, html, onehtml") + ("output-file", PO_VALUE(), "output file (for boostbook or onehtml)") + ("output-dir", PO_VALUE(), "output directory (for html)") + ("no-output", "don't write out the result") + ("output-deps", PO_VALUE(), "output dependency file") + ("ms-errors", "use Microsoft Visual Studio style error & warn message format") + ("include-path,I", PO_VALUE< std::vector >(), "include path") + ("define,D", PO_VALUE< std::vector >(), "define macro") + ("image-location", PO_VALUE(), "image location") + ; + + html_desc.add_options() + ("boost-root-path", PO_VALUE(), "boost root (file path or absolute URL)") + ("css-path", PO_VALUE(), "css file (file path or absolute URL)") + ("graphics-path", PO_VALUE(), "graphics directory (file path or absolute URL)"); + desc.add(html_desc); + + hidden.add_options() + ("debug", "debug mode") + ("expect-errors", + "Succeed if the input file contains a correctly handled " + "error, fail otherwise.") + ("xinclude-base", PO_VALUE(), + "Generate xincludes as if generating for this target " + "directory.") + ("output-deps-format", PO_VALUE(), + "Comma separated list of formatting options for output-deps, " + "options are: escaped, checked") + ("output-checked-locations", PO_VALUE(), + "Writes a file listing all the file locations that were " + "checked, starting with '+' if they were found, or '-' " + "if they weren't.\n" + "This is deprecated, use 'output-deps-format=checked' to " + "write the deps file in this format.") + ; + + // clang-format on + + all.add(desc).add(hidden); + + positional_options_description p; + p.add("input-file", -1); + + // Read option from the command line + + variables_map vm; + +#if QUICKBOOK_WIDE_PATHS + quickbook::ignore_variable(&argc); + quickbook::ignore_variable(&argv); + + int wide_argc; + LPWSTR* wide_argv = CommandLineToArgvW(GetCommandLineW(), &wide_argc); + if (!wide_argv) { + quickbook::detail::outerr() + << "Error getting argument values." << std::endl; + return 1; + } + + store( + wcommand_line_parser(wide_argc, wide_argv) + .options(all) + .positional(p) + .run(), + vm); + + LocalFree(wide_argv); +#else + store( + command_line_parser(argc, argv).options(all).positional(p).run(), + vm); +#endif + + notify(vm); + + // Process the command line options + + parse_document_options options; + bool expect_errors = vm.count("expect-errors"); + int error_count = 0; + bool output_specified = false; + bool alt_output_specified = false; + + if (vm.count("help")) { + std::ostringstream description_text; + description_text << desc; + + quickbook::detail::out() << description_text.str() << "\n"; + + return 0; + } + + if (vm.count("version")) { + std::string boost_version = BOOST_LIB_VERSION; + boost::replace(boost_version, '_', '.'); + + quickbook::detail::out() << QUICKBOOK_VERSION << " (Boost " + << boost_version << ")" << std::endl; + return 0; + } + + quickbook::detail::set_ms_errors(vm.count("ms-errors")); + + if (vm.count("no-pretty-print")) options.pretty_print = false; + + options.strict_mode = !!vm.count("strict"); + + if (vm.count("indent")) options.indent = vm["indent"].as(); + + if (vm.count("linewidth")) + options.linewidth = vm["linewidth"].as(); + + if (vm.count("output-format")) { + output_specified = true; + std::string format = quickbook::detail::command_line_to_utf8( + vm["output-format"].as()); + if (format == "html") { + options.format = quickbook::parse_document_options::html; + options.style = + quickbook::parse_document_options::output_chunked; + } + else if (format == "onehtml") { + options.format = quickbook::parse_document_options::html; + options.style = quickbook::parse_document_options::output_file; + } + else if (format == "boostbook") { + options.format = quickbook::parse_document_options::boostbook; + options.style = quickbook::parse_document_options::output_file; + } + else { + quickbook::detail::outerr() + << "Unknown output format: " << format << std::endl; + + ++error_count; + } + } + + quickbook::self_linked_headers = + options.format != parse_document_options::html && + !vm.count("no-self-linked-headers"); + + if (vm.count("debug")) { + static tm timeinfo; + timeinfo.tm_year = 2000 - 1900; + timeinfo.tm_mon = 12 - 1; + timeinfo.tm_mday = 20; + timeinfo.tm_hour = 12; + timeinfo.tm_min = 0; + timeinfo.tm_sec = 0; + timeinfo.tm_isdst = -1; + mktime(&timeinfo); + quickbook::current_time = &timeinfo; + quickbook::current_gm_time = &timeinfo; + quickbook::debug_mode = true; + } + else { + time_t t = std::time(0); + static tm lt = *localtime(&t); + static tm gmt = *gmtime(&t); + quickbook::current_time = < + quickbook::current_gm_time = &gmt; + quickbook::debug_mode = false; + } + + quickbook::include_path.clear(); + if (vm.count("include-path")) { + boost::transform( + vm["include-path"].as >(), + std::back_inserter(quickbook::include_path), + quickbook::detail::command_line_to_path); + } + + quickbook::preset_defines.clear(); + if (vm.count("define")) { + boost::transform( + vm["define"].as >(), + std::back_inserter(quickbook::preset_defines), + quickbook::detail::command_line_to_utf8); + } + + if (vm.count("input-file")) { + fs::path filein = quickbook::detail::command_line_to_path( + vm["input-file"].as()); + + if (!fs::exists(filein)) { + quickbook::detail::outerr() + << "file not found: " << filein << std::endl; + ++error_count; + } + + if (vm.count("output-deps")) { + alt_output_specified = true; + options.deps_out = quickbook::detail::command_line_to_path( + vm["output-deps"].as()); + } + + if (vm.count("output-deps-format")) { + std::string format_flags = + quickbook::detail::command_line_to_utf8( + vm["output-deps-format"].as()); + + std::vector flag_names; + boost::algorithm::split( + flag_names, format_flags, boost::algorithm::is_any_of(", "), + boost::algorithm::token_compress_on); + + unsigned flags = 0; + + QUICKBOOK_FOR (std::string const& flag, flag_names) { + if (flag == "checked") { + flags |= quickbook::dependency_tracker::checked; + } + else if (flag == "escaped") { + flags |= quickbook::dependency_tracker::escaped; + } + else if (!flag.empty()) { + quickbook::detail::outerr() + << "Unknown dependency format flag: " << flag + << std::endl; + + ++error_count; + } + } + + options.deps_out_flags = + quickbook::dependency_tracker::flags(flags); + } + + if (vm.count("output-checked-locations")) { + alt_output_specified = true; + options.locations_out = quickbook::detail::command_line_to_path( + vm["output-checked-locations"].as()); + } + + if (vm.count("boost-root-path")) { + // TODO: Check that it's a directory? + options.html_ops.boost_root_path = + vm["boost-root-path"].as(); + } + // Could possibly default it: + // 'boost:' links will use this anyway, but setting a default + // would also result in default css and graphics paths. + // + // else { + // options.html_ops.boost_root_path = + // quickbook::detail::path_or_url::url( + // "http://www.boost.org/doc/libs/release/"); + //} + + if (vm.count("css-path")) { + options.html_ops.css_path = + vm["css-path"].as(); + } + else if (options.html_ops.boost_root_path) { + options.html_ops.css_path = + options.html_ops.boost_root_path / "doc/src/boostbook.css"; + } + + if (vm.count("graphics-path")) { + options.html_ops.graphics_path = + vm["graphics-path"].as(); + } + else if (options.html_ops.boost_root_path) { + options.html_ops.graphics_path = + options.html_ops.boost_root_path / "doc/src/images"; + } + + if (vm.count("output-file")) { + output_specified = true; + switch (options.style) { + case quickbook::parse_document_options::output_file: { + options.output_path = + quickbook::detail::command_line_to_path( + vm["output-file"].as()); + + fs::path parent = options.output_path.parent_path(); + if (!parent.empty() && !fs::is_directory(parent)) { + quickbook::detail::outerr() + << "parent directory not found for output file" + << std::endl; + ++error_count; + } + break; + } + case quickbook::parse_document_options::output_chunked: + quickbook::detail::outerr() + << "output-file give for chunked output" << std::endl; + ++error_count; + break; + case quickbook::parse_document_options::output_none: + quickbook::detail::outerr() + << "output-file given for no output" << std::endl; + ++error_count; + break; + default: + assert(false); + } + } + + if (vm.count("output-dir")) { + output_specified = true; + switch (options.style) { + case quickbook::parse_document_options::output_chunked: { + options.output_path = + quickbook::detail::command_line_to_path( + vm["output-dir"].as()); + + if (!fs::is_directory(options.output_path.parent_path())) { + quickbook::detail::outerr() + << "parent directory not found for output directory" + << std::endl; + ++error_count; + } + } + case quickbook::parse_document_options::output_file: + quickbook::detail::outerr() + << "output-dir give for file output" << std::endl; + ++error_count; + break; + case quickbook::parse_document_options::output_none: + quickbook::detail::outerr() + << "output-dir given for no output" << std::endl; + ++error_count; + break; + default: + assert(false); + } + } + + if (!vm.count("output-file") && !vm.count("output-dir")) { + if (!output_specified && alt_output_specified) { + options.style = + quickbook::parse_document_options::output_none; + } + else { + fs::path path = filein; + switch (options.style) { + case quickbook::parse_document_options::output_chunked: + path = path.parent_path() / "html"; + options.style = + quickbook::parse_document_options::output_chunked; + options.output_path = path; + break; + case quickbook::parse_document_options::output_file: + switch (options.format) { + case quickbook::parse_document_options::html: + path.replace_extension(".html"); + break; + case quickbook::parse_document_options::boostbook: + path.replace_extension(".xml"); + break; + default: + assert(false); + path.replace_extension(".xml"); + } + options.output_path = path; + break; + default: + assert(false); + options.style = + quickbook::parse_document_options::output_none; + } + } + } + + if (vm.count("xinclude-base")) { + options.xinclude_base = quickbook::detail::command_line_to_path( + vm["xinclude-base"].as()); + + // I'm not sure if this error check is necessary. + // There might be valid reasons to use a path that doesn't + // exist yet, or a path that just generates valid relative + // paths. + if (!fs::is_directory(options.xinclude_base)) { + quickbook::detail::outerr() + << "xinclude-base is not a directory" << std::endl; + ++error_count; + } + } + else { + options.xinclude_base = + options.style == parse_document_options::output_chunked + ? options.output_path + : options.output_path.parent_path(); + if (options.xinclude_base.empty()) { + options.xinclude_base = "."; + } + + // If output_path was implicitly created from filein, then it + // should be in filein's directory. + // If output_path was explicitly specified, then it's already + // been checked. + assert(error_count || fs::is_directory(options.xinclude_base)); + } + + if (vm.count("image-location")) { + quickbook::image_location = + quickbook::detail::command_line_to_path( + vm["image-location"].as()); + } + else { + quickbook::image_location = filein.parent_path() / "html"; + } + + // Set duplicated html_options. + // TODO: Clean this up? + if (options.style == parse_document_options::output_chunked) { + options.html_ops.home_path = options.output_path / "index.html"; + options.html_ops.chunked_output = true; + } + else { + options.html_ops.home_path = options.output_path; + options.html_ops.chunked_output = false; + } + options.html_ops.pretty_print = options.pretty_print; + + if (!error_count) { + switch (options.style) { + case parse_document_options::output_file: + quickbook::detail::out() + << "Generating output file: " << options.output_path + << std::endl; + break; + case parse_document_options::output_chunked: + quickbook::detail::out() + << "Generating output path: " << options.output_path + << std::endl; + break; + case parse_document_options::output_none: + break; + default: + assert(false); + } + + error_count += quickbook::parse_document(filein, options); + } + + if (expect_errors) { + if (!error_count) + quickbook::detail::outerr() + << "No errors detected for --expect-errors." + << std::endl; + return !error_count; + } + else { + return error_count; + } + } + else { + std::ostringstream description_text; + description_text << desc; + + quickbook::detail::outerr() << "No filename given\n\n" + << description_text.str() << std::endl; + return 1; + } + } + + catch (std::exception& e) { + quickbook::detail::outerr() << e.what() << "\n"; + return 1; + } + + catch (...) { + quickbook::detail::outerr() << "Exception of unknown type caught\n"; + return 1; + } + + return 0; +} diff --git a/src/boost/tools/quickbook/src/quickbook.hpp b/src/boost/tools/quickbook/src/quickbook.hpp new file mode 100644 index 000000000..584f81e99 --- /dev/null +++ b/src/boost/tools/quickbook/src/quickbook.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2009 Daniel James + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_QUICKBOOK_HPP) +#define BOOST_SPIRIT_QUICKBOOK_QUICKBOOK_HPP + +#include +#include +#include +#include +#include "fwd.hpp" +#include "values.hpp" + +namespace quickbook +{ + namespace fs = boost::filesystem; + + extern tm* current_time; // the current time + extern tm* current_gm_time; // the current UTC time + extern bool debug_mode; + extern bool self_linked_headers; + extern std::vector include_path; + extern std::vector preset_defines; + extern fs::path image_location; + + void parse_file( + quickbook::state& state, + value include_doc_id = value(), + bool nested_file = false); + // Some initialisation methods + // + // Declared here to avoid including other headers + namespace detail + { + void initialise_markups(); + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/scoped.hpp b/src/boost/tools/quickbook/src/scoped.hpp new file mode 100644 index 000000000..483b05f48 --- /dev/null +++ b/src/boost/tools/quickbook/src/scoped.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_SCOPED_HPP) +#define BOOST_QUICKBOOK_SCOPED_HPP + +#include + +namespace quickbook +{ + + struct scoped_action_base + { + bool start() { return true; } + template void success(Iterator, Iterator) {} + void failure() {} + void cleanup() {} + + template + bool result(ResultT r, ScannerT const&) + { + return r; + } + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/simple_parse.hpp b/src/boost/tools/quickbook/src/simple_parse.hpp new file mode 100644 index 000000000..efe222c3c --- /dev/null +++ b/src/boost/tools/quickbook/src/simple_parse.hpp @@ -0,0 +1,63 @@ +/*============================================================================= +Copyright (c) 2011-2013, 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +namespace quickbook +{ + template + bool read(Iterator& it, Iterator end, char const* text) + { + for (Iterator it2 = it;; ++it2, ++text) { + if (!*text) { + it = it2; + return true; + } + + if (it2 == end || *it2 != *text) return false; + } + } + + template + bool read_past(Iterator& it, Iterator end, char const* text) + { + while (it != end) { + if (read(it, end, text)) { + return true; + } + ++it; + } + return false; + } + + inline bool find_char(char const* text, char c) + { + for (; *text; ++text) + if (c == *text) return true; + return false; + } + + template + void read_some_of(Iterator& it, Iterator end, char const* text) + { + while (it != end && find_char(text, *it)) + ++it; + } + + template + void read_to_one_of(Iterator& it, Iterator end, char const* text) + { + while (it != end && !find_char(text, *it)) + ++it; + } + + template + void read_to(Iterator& it, Iterator end, char c) + { + while (it != end && *it != c) + ++it; + } +} diff --git a/src/boost/tools/quickbook/src/state.cpp b/src/boost/tools/quickbook/src/state.cpp new file mode 100644 index 000000000..af57b248b --- /dev/null +++ b/src/boost/tools/quickbook/src/state.cpp @@ -0,0 +1,187 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2005 Thomas Guest + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "state.hpp" +#include "document_state.hpp" +#include "for.hpp" +#include "grammar.hpp" +#include "path.hpp" +#include "phrase_tags.hpp" +#include "quickbook.hpp" +#include "state_save.hpp" +#include "utils.hpp" + +#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)) +#pragma warning(disable : 4355) +#endif + +namespace quickbook +{ + char const* quickbook_get_date = "__quickbook_get_date__"; + char const* quickbook_get_time = "__quickbook_get_time__"; + + unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version + + state::state( + fs::path const& filein_, + fs::path const& xinclude_base_, + string_stream& out_, + document_state& document_) + : grammar_() + + , order_pos(0) + , xinclude_base(xinclude_base_) + + , templates() + , error_count(0) + , anchors() + , warned_about_breaks(false) + , conditional(true) + , document(document_) + , callouts() + , callout_depth(0) + , dependencies() + , explicit_list(false) + , strict_mode(false) + + , imported(false) + , macro() + , source_mode() + , source_mode_next() + , source_mode_next_pos() + , current_file(0) + , current_path(filein_, 0, filein_.filename()) + + , template_depth(0) + , min_section_level(1) + + , in_list(false) + , in_list_save() + , out(out_) + , phrase() + + , values(¤t_file) + { + // add the predefined macros + macro.add("__DATE__", std::string(quickbook_get_date))( + "__TIME__", + std::string(quickbook_get_time))("__FILENAME__", std::string()); + update_filename_macro(); + + boost::scoped_ptr g(new quickbook_grammar(*this)); + grammar_.swap(g); + } + + quickbook_grammar& state::grammar() const { return *grammar_; } + + void state::update_filename_macro() + { + *boost::spirit::classic::find(macro, "__FILENAME__") = + detail::encode_string( + detail::path_to_generic(current_path.abstract_file_path)); + } + + unsigned state::get_new_order_pos() { return ++order_pos; } + + void state::push_output() + { + out.push(); + phrase.push(); + in_list_save.push(in_list); + } + + void state::pop_output() + { + phrase.pop(); + out.pop(); + in_list = in_list_save.top(); + in_list_save.pop(); + } + + source_mode_info state::tagged_source_mode() const + { + source_mode_info result; + + QUICKBOOK_FOR (source_mode_info const& s, tagged_source_mode_stack) { + result.update(s); + } + + return result; + } + + source_mode_info state::current_source_mode() const + { + source_mode_info result = source_mode; + + result.update(document.section_source_mode()); + + QUICKBOOK_FOR (source_mode_info const& s, tagged_source_mode_stack) { + result.update(s); + } + + return result; + } + + void state::change_source_mode(source_mode_type s) + { + source_mode = source_mode_info(s, get_new_order_pos()); + } + + void state::push_tagged_source_mode(source_mode_type s) + { + tagged_source_mode_stack.push_back( + source_mode_info(s, s ? get_new_order_pos() : 0)); + } + + void state::pop_tagged_source_mode() + { + assert(!tagged_source_mode_stack.empty()); + tagged_source_mode_stack.pop_back(); + } + + state_save::state_save(quickbook::state& state_, scope_flags scope_) + : state(state_) + , scope(scope_) + , qbk_version(qbk_version_n) + , imported(state.imported) + , current_file(state.current_file) + , current_path(state.current_path) + , xinclude_base(state.xinclude_base) + , source_mode(state.source_mode) + , macro() + , template_depth(state.template_depth) + , min_section_level(state.min_section_level) + { + if (scope & scope_macros) macro = state.macro; + if (scope & scope_templates) state.templates.push(); + if (scope & scope_output) { + state.push_output(); + } + state.values.builder.save(); + } + + state_save::~state_save() + { + state.values.builder.restore(); + boost::swap(qbk_version_n, qbk_version); + boost::swap(state.imported, imported); + boost::swap(state.current_file, current_file); + boost::swap(state.current_path, current_path); + boost::swap(state.xinclude_base, xinclude_base); + boost::swap(state.source_mode, source_mode); + if (scope & scope_output) { + state.pop_output(); + } + if (scope & scope_templates) state.templates.pop(); + if (scope & scope_macros) state.macro = macro; + boost::swap(state.template_depth, template_depth); + boost::swap(state.min_section_level, min_section_level); + } +} diff --git a/src/boost/tools/quickbook/src/state.hpp b/src/boost/tools/quickbook/src/state.hpp new file mode 100644 index 000000000..022d262d7 --- /dev/null +++ b/src/boost/tools/quickbook/src/state.hpp @@ -0,0 +1,122 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_ACTIONS_CLASS_HPP) +#define BOOST_SPIRIT_ACTIONS_CLASS_HPP + +#include +#include +#include "collector.hpp" +#include "dependency_tracker.hpp" +#include "include_paths.hpp" +#include "parsers.hpp" +#include "symbols.hpp" +#include "syntax_highlight.hpp" +#include "template_stack.hpp" +#include "values_parse.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + namespace fs = boost::filesystem; + + struct state + { + state( + fs::path const& filein_, + fs::path const& xinclude_base, + string_stream& out_, + document_state&); + + private: + boost::scoped_ptr grammar_; + + public: + /////////////////////////////////////////////////////////////////////////// + // State + /////////////////////////////////////////////////////////////////////////// + + typedef std::vector string_list; + + static int const max_template_depth = 100; + + // global state + unsigned order_pos; + fs::path xinclude_base; + template_stack templates; + int error_count; + string_list anchors; + bool warned_about_breaks; + bool conditional; + document_state& document; + value_builder callouts; // callouts are global as + int callout_depth; // they don't nest. + dependency_tracker dependencies; + bool explicit_list; // set when using a list + bool strict_mode; + + // state saved for files and templates. + bool imported; + string_symbols macro; + source_mode_info source_mode; + source_mode_type source_mode_next; + value source_mode_next_pos; + std::vector tagged_source_mode_stack; + file_ptr current_file; + quickbook_path current_path; + + // state saved for templates. + int template_depth; + int min_section_level; + + // output state - scoped by templates and grammar + bool in_list; // generating a list + std::stack in_list_save; // save the in_list state + collector out; // main output stream + collector phrase; // phrase output stream + + // values state - scoped by everything. + value_parser values; // parsed values + + quickbook_grammar& grammar() const; + + /////////////////////////////////////////////////////////////////////////// + // actions + /////////////////////////////////////////////////////////////////////////// + + void update_filename_macro(); + + unsigned get_new_order_pos(); + + void push_output(); + void pop_output(); + + void start_list(char mark); + void end_list(char mark); + void start_list_item(); + void end_list_item(); + + void start_callouts(); + std::string add_callout(value); + std::string end_callouts(); + + source_mode_info current_source_mode() const; + source_mode_info tagged_source_mode() const; + void change_source_mode(source_mode_type); + void push_tagged_source_mode(source_mode_type); + void pop_tagged_source_mode(); + }; + + extern unsigned + qbk_version_n; // qbk_major_version * 100 + qbk_minor_version + extern char const* quickbook_get_date; + extern char const* quickbook_get_time; +} + +#endif // BOOST_SPIRIT_ACTIONS_CLASS_HPP diff --git a/src/boost/tools/quickbook/src/state_save.hpp b/src/boost/tools/quickbook/src/state_save.hpp new file mode 100644 index 000000000..8f76badde --- /dev/null +++ b/src/boost/tools/quickbook/src/state_save.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_ACTIONS_STATE_HPP) +#define BOOST_SPIRIT_ACTIONS_STATE_HPP + +#include "state.hpp" + +namespace quickbook +{ + // State savers + // + // Defined in state.cpp + + struct state_save + { + enum scope_flags + { + scope_none = 0, + scope_macros = 1, + scope_templates = 2, + scope_output = 4, + scope_callables = scope_macros + scope_templates, + scope_all = scope_callables + scope_output + }; + + explicit state_save(quickbook::state&, scope_flags); + ~state_save(); + + quickbook::state& state; + scope_flags scope; + unsigned qbk_version; + bool imported; + std::string doc_type; + file_ptr current_file; + quickbook_path current_path; + fs::path xinclude_base; + source_mode_info source_mode; + string_symbols macro; + int template_depth; + int min_section_level; + + private: + state_save(state_save const&); + state_save& operator=(state_save const&); + }; +} + +#endif // BOOST_SPIRIT_ACTIONS_STATE_HPP diff --git a/src/boost/tools/quickbook/src/stream.cpp b/src/boost/tools/quickbook/src/stream.cpp new file mode 100644 index 000000000..9aab9c872 --- /dev/null +++ b/src/boost/tools/quickbook/src/stream.cpp @@ -0,0 +1,214 @@ +/*============================================================================= + Copyright (c) 2009 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "stream.hpp" +#include "files.hpp" +#include "path.hpp" + +#if QUICKBOOK_WIDE_PATHS || QUICKBOOK_WIDE_STREAMS +#include +#include +#endif + +namespace quickbook +{ + namespace detail + { + namespace + { + bool ms_errors = false; + } + + void set_ms_errors(bool x) { ms_errors = x; } + +#if QUICKBOOK_WIDE_STREAMS + + void initialise_output() + { + if (_isatty(_fileno(stdout))) _setmode(_fileno(stdout), _O_U16TEXT); + if (_isatty(_fileno(stderr))) _setmode(_fileno(stderr), _O_U16TEXT); + } + + void write_utf8(ostream::base_ostream& out, quickbook::string_view x) + { + out << from_utf8(x); + } + + ostream& out() + { + static ostream x(std::wcout); + return x; + } + + namespace + { + inline ostream& error_stream() + { + static ostream x(std::wcerr); + return x; + } + } + +#else + + void initialise_output() {} + + void write_utf8(ostream::base_ostream& out, quickbook::string_view x) + { + out << x; + } + + ostream& out() + { + static ostream x(std::cout); + return x; + } + + namespace + { + inline ostream& error_stream() + { + static ostream x(std::clog); + return x; + } + } + +#endif + + ostream& outerr() { return error_stream() << "Error: "; } + + ostream& outerr(fs::path const& file, std::ptrdiff_t line) + { + if (line >= 0) { + if (ms_errors) + return error_stream() << path_to_stream(file) << "(" << line + << "): error: "; + else + return error_stream() << path_to_stream(file) << ":" << line + << ": error: "; + } + else { + return error_stream() << path_to_stream(file) << ": error: "; + } + } + + ostream& outerr(file_ptr const& f, string_iterator pos) + { + return outerr(f->path, f->position_of(pos).line); + } + + ostream& outwarn(fs::path const& file, std::ptrdiff_t line) + { + if (line >= 0) { + if (ms_errors) + return error_stream() << path_to_stream(file) << "(" << line + << "): warning: "; + else + return error_stream() << path_to_stream(file) << ":" << line + << ": warning: "; + } + else { + return error_stream() << path_to_stream(file) << ": warning: "; + } + } + + ostream& outwarn(file_ptr const& f, string_iterator pos) + { + return outwarn(f->path, f->position_of(pos).line); + } + + ostream& ostream::operator<<(char c) + { + assert(c && !(c & 0x80)); + base << c; + return *this; + } + + inline bool check_ascii(char const* x) + { + for (; *x; ++x) + if (*x & 0x80) return false; + return true; + } + + ostream& ostream::operator<<(char const* x) + { + assert(check_ascii(x)); + base << x; + return *this; + } + + ostream& ostream::operator<<(std::string const& x) + { + write_utf8(base, x); + return *this; + } + + ostream& ostream::operator<<(quickbook::string_view x) + { + write_utf8(base, x); + return *this; + } + + ostream& ostream::operator<<(int x) + { + base << x; + return *this; + } + + ostream& ostream::operator<<(unsigned int x) + { + base << x; + return *this; + } + + ostream& ostream::operator<<(long x) + { + base << x; + return *this; + } + + ostream& ostream::operator<<(unsigned long x) + { + base << x; + return *this; + } + +#if !defined(BOOST_NO_LONG_LONG) + ostream& ostream::operator<<(boost::long_long_type x) + { + base << x; + return *this; + } + + ostream& ostream::operator<<(boost::ulong_long_type x) + { + base << x; + return *this; + } +#endif + + ostream& ostream::operator<<(fs::path const& x) + { + base << path_to_stream(x); + return *this; + } + + ostream& ostream::operator<<(base_ostream& (*x)(base_ostream&)) + { + base << x; + return *this; + } + + ostream& ostream::operator<<(base_ios& (*x)(base_ios&)) + { + base << x; + return *this; + } + } +} diff --git a/src/boost/tools/quickbook/src/stream.hpp b/src/boost/tools/quickbook/src/stream.hpp new file mode 100644 index 000000000..48d789710 --- /dev/null +++ b/src/boost/tools/quickbook/src/stream.hpp @@ -0,0 +1,85 @@ +/*============================================================================= + Copyright (c) 2009 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +// For handling native strings and streams. + +#if !defined(BOOST_QUICKBOOK_DETAIL_STREAM_HPP) +#define BOOST_QUICKBOOK_DETAIL_STREAM_HPP + +#include +#include +#include "native_text.hpp" + +namespace quickbook +{ + namespace fs = boost::filesystem; + + namespace detail + { + // A light wrapper around C++'s streams that gets things right + // in the quickbook context. + // + // This is far from perfect but it fixes some issues. + struct ostream + { + typedef stream_string string; +#if QUICKBOOK_WIDE_STREAMS + typedef std::wostream base_ostream; + typedef std::wios base_ios; +#else + typedef std::ostream base_ostream; + typedef std::ios base_ios; +#endif + base_ostream& base; + + explicit ostream(base_ostream& x) : base(x) {} + + // C strings should always be ascii. + ostream& operator<<(char); + ostream& operator<<(char const*); + + // std::string should be UTF-8 (what a mess!) + ostream& operator<<(std::string const&); + ostream& operator<<(quickbook::string_view); + + // Other value types. + ostream& operator<<(int x); + ostream& operator<<(unsigned int x); + ostream& operator<<(long x); + ostream& operator<<(unsigned long x); + +#if !defined(BOOST_NO_LONG_LONG) + ostream& operator<<(boost::long_long_type x); + ostream& operator<<(boost::ulong_long_type x); +#endif + + ostream& operator<<(fs::path const&); + + // Modifiers + ostream& operator<<(base_ostream& (*)(base_ostream&)); + ostream& operator<<(base_ios& (*)(base_ios&)); + }; + + void initialise_output(); + + ostream& out(); + + // Preformats an error/warning message so that it can be parsed by + // common IDEs. Set 'ms_errors' to determine if VS format + // or GCC format. Returns the stream to continue ouput of the verbose + // error message. + void set_ms_errors(bool); + ostream& outerr(); + ostream& outerr(fs::path const& file, std::ptrdiff_t line = -1); + ostream& outwarn(fs::path const& file, std::ptrdiff_t line = -1); + ostream& outerr(file_ptr const&, string_iterator); + ostream& outwarn(file_ptr const&, string_iterator); + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/string_view.hpp b/src/boost/tools/quickbook/src/string_view.hpp new file mode 100644 index 000000000..71788c04f --- /dev/null +++ b/src/boost/tools/quickbook/src/string_view.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2017 Daniel James + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_STRING_VIEW_HPP) +#define BOOST_SPIRIT_QUICKBOOK_STRING_VIEW_HPP + +#include +#include + +namespace quickbook +{ + // boost::string_view now can't be constructed from an rvalue std::string, + // which is something that quickbook does in several places, so this wraps + // it to allow that. + + struct string_view : boost::string_view + { + typedef boost::string_view base; + + string_view() : base() {} + string_view(string_view const& x) : base(x) {} + string_view(std::string const& x) : base(x) {} + string_view(const char* x) : base(x) {} + string_view(const char* x, base::size_type len) : base(x, len) {} + + std::string to_s() const { return std::string(begin(), end()); } + }; + + typedef quickbook::string_view::const_iterator string_iterator; + + inline std::size_t hash_value(string_view const& x) + { + return boost::hash_range(x.begin(), x.end()); + } + + inline std::string& operator+=(std::string& x, string_view const& y) + { + return x.append(y.begin(), y.end()); + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/symbols.hpp b/src/boost/tools/quickbook/src/symbols.hpp new file mode 100644 index 000000000..1d16c35cf --- /dev/null +++ b/src/boost/tools/quickbook/src/symbols.hpp @@ -0,0 +1,202 @@ +/*============================================================================= + Copyright (c) 2001-2003 Joel de Guzman + Copyright (c) 2011 Daniel James + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef QUICKBOOK_SYMBOLS_IPP +#define QUICKBOOK_SYMBOLS_IPP + +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +namespace quickbook +{ + + /////////////////////////////////////////////////////////////////////////////// + // + // tst class + // + // This it the Ternary Search Tree from + // adapted to be cheap + // to copy. + // + // Ternary Search Tree implementation. The data structure is faster + // than + // hashing for many typical search problems especially when the search + // interface is iterator based. Searching for a string of length k in a + // ternary search tree with n strings will require at most O(log n+k) + // character comparisons. TSTs are many times faster than hash tables + // for unsuccessful searches since mismatches are discovered earlier + // after examining only a few characters. Hash tables always examine an + // entire key when searching. + // + // For details see http://www.cs.princeton.edu/~rs/strings/. + // + // *** This is a low level class and is + // not meant for public consumption *** + // + /////////////////////////////////////////////////////////////////////////////// + + template struct tst_node + { + tst_node(CharT value_) + : reference_count(0) + , left() + , middle() + , right() + , data() + , value(value_) + { + } + + tst_node(tst_node const& other) + : reference_count(0) + , left(other.left) + , middle(other.middle) + , right(other.right) + , data(other.data ? new T(*other.data) : 0) + , value(other.value) + { + } + + // If you fancy a slight improvement in memory use, + // reference_count + value could probably be packed + // in the space for a single int. + int reference_count; + boost::intrusive_ptr left; + boost::intrusive_ptr middle; + boost::intrusive_ptr right; + boost::scoped_ptr data; + CharT value; + + private: + tst_node& operator=(tst_node const&); + }; + + template + void intrusive_ptr_add_ref(tst_node* ptr) + { + ++ptr->reference_count; + } + + template + void intrusive_ptr_release(tst_node* ptr) + { + if (--ptr->reference_count == 0) delete ptr; + } + + /////////////////////////////////////////////////////////////////////////// + template class tst + { + typedef tst_node node_t; + typedef boost::intrusive_ptr node_ptr; + node_ptr root; + + public: + struct search_info + { + T* data; + std::size_t length; + }; + + void swap(tst& other) { root.swap(other.root); } + + // Adds symbol to ternary search tree. + // If it already exists, then replace it with new value. + // + // pre: first != last + template + T* add(IteratorT first, IteratorT const& last, T const& data) + { + assert(first != last); + + node_ptr* np = &root; + CharT ch = *first; + + for (;;) { + if (!*np) { + *np = new node_t(ch); + } + else if ((*np)->reference_count > 1) { + *np = new node_t(**np); + } + + if (ch < (*np)->value) { + np = &(*np)->left; + } + else if (ch == (*np)->value) { + ++first; + if (first == last) break; + ch = *first; + np = &(*np)->middle; + } + else { + np = &(*np)->right; + } + } + + boost::scoped_ptr new_data(new T(data)); + boost::swap((*np)->data, new_data); + return (*np)->data.get(); + } + + template + search_info find(ScannerT const& scan) const + { + search_info result = {0, 0}; + if (scan.at_end()) { + return result; + } + + typedef typename ScannerT::iterator_t iterator_t; + node_ptr np = root; + CharT ch = *scan; + iterator_t latest = scan.first; + std::size_t length = 0; + + while (np) { + if (ch < np->value) // => go left! + { + np = np->left; + } + else if (ch == np->value) // => go middle! + { + ++scan; + ++length; + + // Found a potential match. + if (np->data.get()) { + result.data = np->data.get(); + result.length = length; + latest = scan.first; + } + + if (scan.at_end()) break; + ch = *scan; + np = np->middle; + } + else // (ch > np->value) => go right! + { + np = np->right; + } + } + + scan.first = latest; + return result; + } + }; + + typedef boost::spirit::classic:: + symbols > + string_symbols; +} // namespace quickbook + +#endif diff --git a/src/boost/tools/quickbook/src/syntax_highlight.cpp b/src/boost/tools/quickbook/src/syntax_highlight.cpp new file mode 100644 index 000000000..f6a6d3e82 --- /dev/null +++ b/src/boost/tools/quickbook/src/syntax_highlight.cpp @@ -0,0 +1,633 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "syntax_highlight.hpp" +#include +#include +#include +#include +#include +#include "actions.hpp" +#include "files.hpp" +#include "grammar.hpp" +#include "phrase_tags.hpp" +#include "state.hpp" +#include "stream.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace cl = boost::spirit::classic; + + // Syntax Highlight Actions + + struct syntax_highlight_actions + { + quickbook::state& state; + do_macro_action do_macro_impl; + + // State + bool support_callouts; + quickbook::string_view marked_text; + + syntax_highlight_actions(quickbook::state& state_, bool is_block_) + : state(state_) + , do_macro_impl(state_) + , support_callouts( + is_block_ && (qbk_version_n >= 107u || + state.current_file->is_code_snippets)) + , marked_text() + { + } + + void span(parse_iterator, parse_iterator, char const*); + void span_start(parse_iterator, parse_iterator, char const*); + void span_end(parse_iterator, parse_iterator); + void unexpected_char(parse_iterator, parse_iterator); + void plain_char(parse_iterator, parse_iterator); + void pre_escape_back(parse_iterator, parse_iterator); + void post_escape_back(parse_iterator, parse_iterator); + void do_macro(std::string const&); + + void mark_text(parse_iterator, parse_iterator); + void callout(parse_iterator, parse_iterator); + }; + + void syntax_highlight_actions::span( + parse_iterator first, parse_iterator last, char const* name) + { + state.phrase << ""; + while (first != last) + detail::print_char(*first++, state.phrase.get()); + state.phrase << ""; + } + + void syntax_highlight_actions::span_start( + parse_iterator first, parse_iterator last, char const* name) + { + state.phrase << ""; + while (first != last) + detail::print_char(*first++, state.phrase.get()); + } + + void syntax_highlight_actions::span_end( + parse_iterator first, parse_iterator last) + { + while (first != last) + detail::print_char(*first++, state.phrase.get()); + state.phrase << ""; + } + + void syntax_highlight_actions::unexpected_char( + parse_iterator first, parse_iterator last) + { + file_position const pos = state.current_file->position_of(first.base()); + + detail::outwarn(state.current_file->path, pos.line) + << "in column:" << pos.column << ", unexpected character: " + << std::string(first.base(), last.base()) << "\n"; + + // print out an unexpected character + state.phrase << ""; + while (first != last) + detail::print_char(*first++, state.phrase.get()); + state.phrase << ""; + } + + void syntax_highlight_actions::plain_char( + parse_iterator first, parse_iterator last) + { + while (first != last) + detail::print_char(*first++, state.phrase.get()); + } + + void syntax_highlight_actions::pre_escape_back( + parse_iterator, parse_iterator) + { + state.push_output(); // save the stream + } + + void syntax_highlight_actions::post_escape_back( + parse_iterator, parse_iterator) + { + std::string tmp; + state.phrase.swap(tmp); + state.pop_output(); // restore the stream + state.phrase << tmp; + } + + void syntax_highlight_actions::do_macro(std::string const& v) + { + do_macro_impl(v); + } + + void syntax_highlight_actions::mark_text( + parse_iterator first, parse_iterator last) + { + marked_text = + quickbook::string_view(first.base(), last.base() - first.base()); + } + + void syntax_highlight_actions::callout(parse_iterator, parse_iterator) + { + state.phrase << state.add_callout(qbk_value( + state.current_file, marked_text.begin(), marked_text.end())); + marked_text.clear(); + } + + // Syntax + + struct keywords_holder + { + cl::symbols<> cpp, python; + + keywords_holder() + { + // clang-format off + + cpp + = "alignas", "alignof", "and_eq", "and", "asm", "auto", + "bitand", "bitor", "bool", "break", "case", "catch", + "char", "char16_t", "char32_t", "class", "compl", + "const", "const_cast", "constexpr", "continue", + "decltype", "default", "delete", "do", "double", + "dynamic_cast", "else", "enum", "explicit", "export", + "extern", "false", "float", "for", "friend", "goto", + "if", "inline", "int", "long", "mutable", "namespace", + "new", "noexcept", "not_eq", "not", "nullptr", + "operator", "or_eq", "or", "private", "protected", + "public", "register", "reinterpret_cast", "return", + "short", "signed", "sizeof", "static", "static_assert", + "static_cast", "struct", "switch", "template", "this", + "thread_local", "throw", "true", "try", "typedef", + "typeid", "typename", "union", "unsigned", "using", + "virtual", "void", "volatile", "wchar_t", "while", + "xor_eq", "xor" + ; + + python + = + "and", "del", "for", "is", "raise", + "assert", "elif", "from", "lambda", "return", + "break", "else", "global", "not", "try", + "class", "except", "if", "or", "while", + "continue", "exec", "import", "pass", "yield", + "def", "finally", "in", "print", + + // Technically "as" and "None" are not yet keywords (at Python + // 2.4). They are destined to become keywords, and we treat them + // as such for syntax highlighting purposes. + + "as", "None" + ; + + // clang-format on + } + }; + + namespace + { + keywords_holder keywords; + } + + // Grammar for C++ highlighting + struct cpp_highlight : public cl::grammar + { + explicit cpp_highlight(syntax_highlight_actions& actions_) + : actions(actions_) + { + } + + template struct definition + { + definition(cpp_highlight const& self) + : g(self.actions.state.grammar()) + { + // clang-format off + + member_action1 + span(self.actions, &syntax_highlight_actions::span), + span_start(self.actions, &syntax_highlight_actions::span_start); + member_action + span_end(self.actions, &syntax_highlight_actions::span_end), + unexpected_char(self.actions, &syntax_highlight_actions::unexpected_char), + plain_char(self.actions, &syntax_highlight_actions::plain_char), + pre_escape_back(self.actions, &syntax_highlight_actions::pre_escape_back), + post_escape_back(self.actions, &syntax_highlight_actions::post_escape_back), + mark_text(self.actions, &syntax_highlight_actions::mark_text), + callout(self.actions, &syntax_highlight_actions::callout); + member_action_value + do_macro(self.actions, &syntax_highlight_actions::do_macro); + error_action error(self.actions.state); + + program = + *( (*cl::space_p) [plain_char] + >> (line_start | rest_of_line) + >> *rest_of_line + ) + ; + + line_start = + preprocessor [span("preprocessor")] + ; + + rest_of_line = + (+cl::blank_p) [plain_char] + | macro + | escape + | cl::eps_p(ph::var(self.actions.support_callouts)) + >> ( line_callout [callout] + | inline_callout [callout] + ) + | comment + | keyword [span("keyword")] + | identifier [span("identifier")] + | special [span("special")] + | string_ [span("string")] + | char_ [span("char")] + | number [span("number")] + | ~cl::eps_p(cl::eol_p) + >> u8_codepoint_p [unexpected_char] + ; + + macro = + // must not be followed by alpha or underscore + cl::eps_p(self.actions.state.macro + >> (cl::eps_p - (cl::alpha_p | '_'))) + >> self.actions.state.macro + [do_macro] + ; + + escape = + cl::str_p("``") [pre_escape_back] + >> + ( + ( + ( + (+(cl::anychar_p - "``") >> cl::eps_p("``")) + & g.phrase_start + ) + >> cl::str_p("``") + ) + | + ( + cl::eps_p [error] + >> *cl::anychar_p + ) + ) [post_escape_back] + ; + + preprocessor + = '#' >> *cl::space_p >> ((cl::alpha_p | '_') >> *(cl::alnum_p | '_')) + ; + + inline_callout + = cl::confix_p( + "/*<" >> *cl::space_p, + (*cl::anychar_p) [mark_text], + ">*/" + ) + ; + + line_callout + = cl::confix_p( + "/*<<" >> *cl::space_p, + (*cl::anychar_p) [mark_text], + ">>*/" + ) + >> *cl::space_p + ; + + comment + = cl::str_p("//") [span_start("comment")] + >> *( escape + | (+(cl::anychar_p - (cl::eol_p | "``"))) + [plain_char] + ) + >> cl::eps_p [span_end] + | cl::str_p("/*") [span_start("comment")] + >> *( escape + | (+(cl::anychar_p - (cl::str_p("*/") | "``"))) + [plain_char] + ) + >> (!cl::str_p("*/")) [span_end] + ; + + keyword + = keywords.cpp >> (cl::eps_p - (cl::alnum_p | '_')) + ; // make sure we recognize whole words only + + special + = +cl::chset_p("~!%^&*()+={[}]:;,<.>?/|\\#-") + ; + + string_char = ('\\' >> u8_codepoint_p) | (cl::anychar_p - '\\'); + + string_ + = !cl::as_lower_d['l'] >> cl::confix_p('"', *string_char, '"') + ; + + char_ + = !cl::as_lower_d['l'] >> cl::confix_p('\'', *string_char, '\'') + ; + + number + = ( + cl::as_lower_d["0x"] >> cl::hex_p + | '0' >> cl::oct_p + | cl::real_p + ) + >> *cl::as_lower_d[cl::chset_p("ldfu")] + ; + + identifier + = (cl::alpha_p | '_') >> *(cl::alnum_p | '_') + ; + + // clang-format on + } + + cl::rule program, line_start, rest_of_line, macro, + preprocessor, inline_callout, line_callout, comment, special, + string_, char_, number, identifier, keyword, escape, + string_char; + + quickbook_grammar& g; + + cl::rule const& start() const { return program; } + }; + + syntax_highlight_actions& actions; + }; + + // Grammar for Python highlighting + // See also: The Python Reference Manual + // http://docs.python.org/ref/ref.html + struct python_highlight : public cl::grammar + { + explicit python_highlight(syntax_highlight_actions& actions_) + : actions(actions_) + { + } + + template struct definition + { + definition(python_highlight const& self) + : g(self.actions.state.grammar()) + { + // clang-format off + + member_action1 + span(self.actions, &syntax_highlight_actions::span), + span_start(self.actions, &syntax_highlight_actions::span_start); + member_action + span_end(self.actions, &syntax_highlight_actions::span_end), + unexpected_char(self.actions, &syntax_highlight_actions::unexpected_char), + plain_char(self.actions, &syntax_highlight_actions::plain_char), + pre_escape_back(self.actions, &syntax_highlight_actions::pre_escape_back), + post_escape_back(self.actions, &syntax_highlight_actions::post_escape_back), + mark_text(self.actions, &syntax_highlight_actions::mark_text), + callout(self.actions, &syntax_highlight_actions::callout); + member_action_value + do_macro(self.actions, &syntax_highlight_actions::do_macro); + error_action error(self.actions.state); + + program + = + *( (+cl::space_p) [plain_char] + | macro + | escape + | cl::eps_p(ph::var(self.actions.support_callouts)) + >> ( line_callout [callout] + | inline_callout [callout] + ) + | comment + | keyword [span("keyword")] + | identifier [span("identifier")] + | special [span("special")] + | string_ [span("string")] + | number [span("number")] + | u8_codepoint_p [unexpected_char] + ) + ; + + macro = + // must not be followed by alpha or underscore + cl::eps_p(self.actions.state.macro + >> (cl::eps_p - (cl::alpha_p | '_'))) + >> self.actions.state.macro + [do_macro] + ; + + escape = + cl::str_p("``") [pre_escape_back] + >> + ( + ( + ( + (+(cl::anychar_p - "``") >> cl::eps_p("``")) + & g.phrase_start + ) + >> cl::str_p("``") + ) + | + ( + cl::eps_p [error] + >> *cl::anychar_p + ) + ) [post_escape_back] + ; + + inline_callout + = "#<" >> *cl::space_p >> + (*(cl::anychar_p - cl::eol_p)) [mark_text] + ; + + line_callout + = cl::confix_p( + "#<<" >> *cl::space_p, + (*cl::anychar_p) [mark_text], + (cl::eol_p | cl::end_p) + ) + ; + + comment + = cl::str_p("#") [span_start("comment")] + >> *( escape + | (+(cl::anychar_p - (cl::eol_p | "``"))) + [plain_char] + ) + >> cl::eps_p [span_end] + ; + + keyword + = keywords.python >> (cl::eps_p - (cl::alnum_p | '_')) + ; // make sure we recognize whole words only + + special + = +cl::chset_p("~!%^&*()+={[}]:;,<.>/|\\-") + ; + + string_prefix + = cl::as_lower_d[cl::str_p("u") >> ! cl::str_p("r")] + ; + + string_ + = ! string_prefix >> (long_string | short_string) + ; + + string_char = ('\\' >> u8_codepoint_p) | (cl::anychar_p - '\\'); + + short_string + = cl::confix_p('\'', * string_char, '\'') | + cl::confix_p('"', * string_char, '"') + ; + + long_string + // Note: the "cl::str_p" on the next two lines work around + // an INTERNAL COMPILER ERROR when using VC7.1 + = cl::confix_p(cl::str_p("'''"), * string_char, "'''") | + cl::confix_p(cl::str_p("\"\"\""), * string_char, "\"\"\"") + ; + + number + = ( + cl::as_lower_d["0x"] >> cl::hex_p + | '0' >> cl::oct_p + | cl::real_p + ) + >> *cl::as_lower_d[cl::chset_p("lj")] + ; + + identifier + = (cl::alpha_p | '_') >> *(cl::alnum_p | '_') + ; + + // clang-format on + } + + cl::rule program, macro, inline_callout, line_callout, + comment, special, string_, string_prefix, short_string, + long_string, number, identifier, keyword, escape, string_char; + + quickbook_grammar& g; + + cl::rule const& start() const { return program; } + }; + + syntax_highlight_actions& actions; + }; + + // Grammar for plain text (no actual highlighting) + struct teletype_highlight : public cl::grammar + { + teletype_highlight(syntax_highlight_actions& actions_) + : actions(actions_) + { + } + + template struct definition + { + definition(teletype_highlight const& self) + : g(self.actions.state.grammar()) + { + member_action plain_char( + self.actions, &syntax_highlight_actions::plain_char), + pre_escape_back( + self.actions, + &syntax_highlight_actions::pre_escape_back), + post_escape_back( + self.actions, + &syntax_highlight_actions::post_escape_back); + member_action_value< + syntax_highlight_actions, std::string const&> + do_macro(self.actions, &syntax_highlight_actions::do_macro); + error_action error(self.actions.state); + + // clang-format off + + program + = + *( macro + | escape + | u8_codepoint_p [plain_char] + ) + ; + + macro = + // must not be followed by alpha or underscore + cl::eps_p(self.actions.state.macro + >> (cl::eps_p - (cl::alpha_p | '_'))) + >> self.actions.state.macro + [do_macro] + ; + + escape = + cl::str_p("``") [pre_escape_back] + >> + ( + ( + ( + (+(cl::anychar_p - "``") >> cl::eps_p("``")) + & g.phrase_start + ) + >> cl::str_p("``") + ) + | + ( + cl::eps_p [error] + >> *cl::anychar_p + ) + ) [post_escape_back] + ; + + // clang-format on + } + + cl::rule program, macro, escape; + + quickbook_grammar& g; + + cl::rule const& start() const { return program; } + }; + + syntax_highlight_actions& actions; + }; + + void syntax_highlight( + parse_iterator first, + parse_iterator last, + quickbook::state& state, + source_mode_type source_mode, + bool is_block) + { + syntax_highlight_actions syn_actions(state, is_block); + + // print the code with syntax coloring + switch (source_mode) { + case source_mode_tags::cpp: { + cpp_highlight cpp_p(syn_actions); + boost::spirit::classic::parse(first, last, cpp_p); + break; + } + case source_mode_tags::python: { + python_highlight python_p(syn_actions); + boost::spirit::classic::parse(first, last, python_p); + break; + } + case source_mode_tags::teletype: { + teletype_highlight teletype_p(syn_actions); + boost::spirit::classic::parse(first, last, teletype_p); + break; + } + default: + BOOST_ASSERT(0); + } + } +} diff --git a/src/boost/tools/quickbook/src/syntax_highlight.hpp b/src/boost/tools/quickbook/src/syntax_highlight.hpp new file mode 100644 index 000000000..74e1ab7e8 --- /dev/null +++ b/src/boost/tools/quickbook/src/syntax_highlight.hpp @@ -0,0 +1,62 @@ +/*============================================================================= + Copyright (c) 2011,2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_SYNTAX_HIGHLIGHT_HPP) +#define BOOST_QUICKBOOK_SYNTAX_HIGHLIGHT_HPP + +#include +#include "fwd.hpp" +#include "iterator.hpp" +#include "phrase_tags.hpp" + +namespace quickbook +{ + // + // source_mode_info + // + // The source mode is stored in a few places, so the order needs to also be + // stored to work out which is the current source mode. + + struct source_mode_info + { + source_mode_type source_mode; + unsigned order; + + source_mode_info() : source_mode(source_mode_tags::cpp), order(0) {} + + source_mode_info(source_mode_type source_mode_, unsigned order_) + : source_mode(source_mode_), order(order_) + { + } + + void update(source_mode_info const& x) + { + if (x.order > order) { + source_mode = x.source_mode; + order = x.order; + } + } + + void swap(source_mode_info& x) + { + boost::swap(source_mode, x.source_mode); + boost::swap(order, x.order); + } + }; + + inline void swap(source_mode_info& x, source_mode_info& y) { x.swap(y); } + + void syntax_highlight( + parse_iterator first, + parse_iterator last, + quickbook::state& state, + source_mode_type source_mode, + bool is_block); +} + +#endif diff --git a/src/boost/tools/quickbook/src/template_stack.cpp b/src/boost/tools/quickbook/src/template_stack.cpp new file mode 100644 index 000000000..404780974 --- /dev/null +++ b/src/boost/tools/quickbook/src/template_stack.cpp @@ -0,0 +1,117 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "template_stack.hpp" +#include +#include "files.hpp" + +#ifdef BOOST_MSVC +#pragma warning(disable : 4355) +#endif + +namespace quickbook +{ + template_symbol::template_symbol( + std::string const& identifier_, + std::vector const& params_, + value const& content_, + template_scope const* lexical_parent_) + : identifier(identifier_) + , params(params_) + , content(content_) + , lexical_parent(lexical_parent_) + { + assert( + content.get_tag() == template_tags::block || + content.get_tag() == template_tags::phrase || + content.get_tag() == template_tags::snippet); + } + + template_stack::template_stack() + : scope(template_stack::parser(*this)), scopes(), parent_1_4(0) + { + scopes.push_front(template_scope()); + parent_1_4 = &scopes.front(); + } + + template_symbol* template_stack::find(std::string const& symbol) const + { + for (template_scope const* i = &*scopes.begin(); i; + i = i->parent_scope) { + if (template_symbol* ts = + boost::spirit::classic::find(i->symbols, symbol.c_str())) + return ts; + } + return 0; + } + + template_symbol* template_stack::find_top_scope( + std::string const& symbol) const + { + return boost::spirit::classic::find( + scopes.front().symbols, symbol.c_str()); + } + + template_symbols const& template_stack::top() const + { + BOOST_ASSERT(!scopes.empty()); + return scopes.front().symbols; + } + + template_scope const& template_stack::top_scope() const + { + BOOST_ASSERT(!scopes.empty()); + return scopes.front(); + } + + bool template_stack::add(template_symbol const& ts) + { + BOOST_ASSERT(!scopes.empty()); + BOOST_ASSERT(ts.lexical_parent); + + if (this->find_top_scope(ts.identifier)) { + return false; + } + + boost::spirit::classic::add( + scopes.front().symbols, ts.identifier.c_str(), ts); + + return true; + } + + void template_stack::push() + { + template_scope const& old_front = scopes.front(); + scopes.push_front(template_scope()); + scopes.front().parent_1_4 = parent_1_4; + scopes.front().parent_scope = &old_front; + parent_1_4 = &scopes.front(); + } + + void template_stack::pop() + { + parent_1_4 = scopes.front().parent_1_4; + scopes.pop_front(); + } + + void template_stack::start_template(template_symbol const* symbol) + { + // Quickbook 1.4-: When expanding the template continue to use the + // current scope (the dynamic scope). + // Quickbook 1.5+: Use the scope the template was defined in + // (the static scope). + if (symbol->content.get_file()->version() >= 105u) { + parent_1_4 = scopes.front().parent_1_4; + scopes.front().parent_scope = symbol->lexical_parent; + } + else { + scopes.front().parent_scope = scopes.front().parent_1_4; + } + } +} diff --git a/src/boost/tools/quickbook/src/template_stack.hpp b/src/boost/tools/quickbook/src/template_stack.hpp new file mode 100644 index 000000000..9ad2251ca --- /dev/null +++ b/src/boost/tools/quickbook/src/template_stack.hpp @@ -0,0 +1,126 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_TEMPLATE_STACK_HPP) +#define BOOST_SPIRIT_QUICKBOOK_TEMPLATE_STACK_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "fwd.hpp" +#include "template_tags.hpp" +#include "values.hpp" + +namespace quickbook +{ + namespace fs = boost::filesystem; + + struct template_scope; + + struct template_symbol + { + template_symbol( + std::string const& identifier, + std::vector const& params, + value const& content, + template_scope const* parent = 0); + + std::string identifier; + std::vector params; + value content; + + template_scope const* lexical_parent; + }; + + typedef boost::spirit::classic::symbols template_symbols; + + // template scope + // + // 1.4-: parent_scope is the previous scope on the dynamic + // lookup chain. This moves up the stack skipping + // 1.5 templates (but not 1.5 included files). + // 1.5+: parent_scope is the template's lexical parent. + // + // This means that a search along the parent_scope chain will follow the + // correct lookup chain for that version of quickboook. + // + // symbols contains the templates defined in this scope. + + struct template_scope + { + template_scope() : parent_scope(), parent_1_4() {} + template_scope const* parent_scope; + template_scope const* parent_1_4; + template_symbols symbols; + }; + + struct template_stack + { + typedef std::deque deque; + + struct parser + { + typedef boost::spirit::classic::nil_t result_t; + + parser(template_stack& ts_) : ts(ts_) {} + + template + std::ptrdiff_t operator()(Scanner const& scan, result_t) const + { + // search all scopes for the longest matching symbol. + typename Scanner::iterator_t f = scan.first; + std::ptrdiff_t len = -1; + for (template_scope const* i = &*ts.scopes.begin(); i; + i = i->parent_scope) { + boost::spirit::classic::match<> m = i->symbols.parse(scan); + if (m.length() > len) len = m.length(); + scan.first = f; + } + if (len >= 0) scan.first = boost::next(f, len); + return len; + } + + template_stack& ts; + + private: + parser& operator=(parser const&); + }; + + template_stack(); + template_symbol* find(std::string const& symbol) const; + template_symbol* find_top_scope(std::string const& symbol) const; + template_symbols const& top() const; + template_scope const& top_scope() const; + // Add the given template symbol to the current scope. + // If it doesn't have a scope, sets the symbol's scope to the current + // scope. + bool add(template_symbol const&); + void push(); + void pop(); + + void start_template(template_symbol const*); + + boost::spirit::classic::functor_parser scope; + + private: + friend struct parser; + deque scopes; + template_scope const* parent_1_4; + + template_stack& operator=(template_stack const&); + }; +} + +#endif // BOOST_SPIRIT_QUICKBOOK_TEMPLATE_STACK_HPP diff --git a/src/boost/tools/quickbook/src/template_tags.hpp b/src/boost/tools/quickbook/src/template_tags.hpp new file mode 100644 index 000000000..006200cbd --- /dev/null +++ b/src/boost/tools/quickbook/src/template_tags.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_TEMPLATE_TAGS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_TEMPLATE_TAGS_HPP + +#include "value_tags.hpp" + +namespace quickbook +{ + // clang-format off + + QUICKBOOK_VALUE_TAGS(template_tags, 0x100, + (template_) + (attribute_template) + (escape) + (identifier) + (block) + (phrase) + (snippet) + ) + + // clang-format on +} + +#endif diff --git a/src/boost/tools/quickbook/src/tree.cpp b/src/boost/tools/quickbook/src/tree.cpp new file mode 100644 index 000000000..1f16b9320 --- /dev/null +++ b/src/boost/tools/quickbook/src/tree.cpp @@ -0,0 +1,205 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "tree.hpp" +#include + +namespace quickbook +{ + namespace detail + { + void tree_node_base::add_before(tree_base* t) + { + assert( + t->root_ && !t->root_->parent_ && !t->root_->prev_ && + !t->root_->next_); + t->root_->parent_ = this->parent_; + t->root_->next_ = this; + if (this->prev_) { + t->root_->prev_ = this->prev_; + this->prev_->next_ = t->root_; + } + else { + this->parent_->children_ = t->root_; + } + this->prev_ = t->root_; + t->root_ = 0; + } + + void tree_node_base::add_after(tree_base* t) + { + assert( + t->root_ && !t->root_->parent_ && !t->root_->prev_ && + !t->root_->next_); + t->root_->parent_ = this->parent_; + t->root_->prev_ = this; + t->root_->next_ = this->next_; + if (this->next_) this->next_->prev_ = t->root_; + this->next_ = t->root_; + t->root_ = 0; + } + + void tree_node_base::add_first_child(tree_base* t) + { + assert( + t->root_ && !t->root_->parent_ && !t->root_->prev_ && + !t->root_->next_); + t->root_->parent_ = this; + t->root_->next_ = this->children_; + if (this->children_) { + this->children_->prev_ = t->root_; + } + this->children_ = t->root_; + t->root_ = 0; + } + + void tree_node_base::add_last_child(tree_base* t) + { + assert( + t->root_ && !t->root_->parent_ && !t->root_->prev_ && + !t->root_->next_); + t->root_->parent_ = this; + if (!this->children_) { + this->children_ = t->root_; + } + else { + auto it = this->children_; + while (it->next_) { + it = it->next_; + } + t->root_->prev_ = it; + it->next_ = t->root_; + } + t->root_ = 0; + } + + tree_base::tree_base() : root_(0) {} + tree_base::tree_base(tree_node_base* r) : root_(r) {} + tree_base::~tree_base() {} + + tree_base::tree_base(tree_base&& x) : root_(x.root_) { x.root_ = 0; } + + tree_base& tree_base::operator=(tree_base&& x) + { + root_ = x.root_; + x.root_ = 0; + return *this; + } + + tree_node_base* tree_base::extract(tree_node_base* x) + { + if (!x->prev_) { + if (x->parent_) { + x->parent_->children_ = x->next_; + } + else { + assert(x == root_); + root_ = x->next_; + } + } + else { + x->prev_->next_ = x->next_; + } + if (x->next_) { + x->next_->prev_ = x->prev_; + } + x->parent_ = 0; + x->next_ = 0; + x->prev_ = 0; + return x; + } + + tree_builder_base::tree_builder_base() + : tree_base(), current_(0), parent_(0) + { + } + + tree_builder_base::tree_builder_base(tree_builder_base&& x) + : tree_base(std::move(x)), current_(x.current_), parent_(x.parent_) + { + x.current_ = 0; + x.parent_ = 0; + } + + tree_builder_base& tree_builder_base::operator=(tree_builder_base&& x) + { + root_ = x.root_; + current_ = x.current_; + parent_ = x.parent_; + x.root_ = 0; + x.current_ = 0; + x.parent_ = 0; + return *this; + } + + // Nodes are deleted in the subclass, which knows their type. + tree_builder_base::~tree_builder_base() {} + + tree_node_base* tree_builder_base::extract(tree_node_base* x) + { + if (!x->prev_) { + if (x->parent_) { + x->parent_->children_ = x->next_; + } + else { + assert(x == root_); + root_ = x->next_; + parent_ = 0; + current_ = root_; + } + } + else { + x->prev_->next_ = x->next_; + } + if (x->next_) { + x->next_->prev_ = x->prev_; + } + x->parent_ = 0; + x->next_ = 0; + x->prev_ = 0; + return x; + } + + tree_node_base* tree_builder_base::release() + { + tree_node_base* n = root_; + root_ = 0; + current_ = 0; + parent_ = 0; + return n; + } + + void tree_builder_base::add_element(tree_node_base* n) + { + n->parent_ = parent_; + n->prev_ = current_; + if (current_) { + current_->next_ = n; + } + else if (parent_) { + parent_->children_ = n; + } + else { + root_ = n; + } + current_ = n; + } + + void tree_builder_base::start_children() + { + parent_ = current_; + current_ = 0; + } + + void tree_builder_base::end_children() + { + current_ = parent_; + parent_ = current_->parent_; + } + } +} diff --git a/src/boost/tools/quickbook/src/tree.hpp b/src/boost/tools/quickbook/src/tree.hpp new file mode 100644 index 000000000..7503b7080 --- /dev/null +++ b/src/boost/tools/quickbook/src/tree.hpp @@ -0,0 +1,167 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_TREE_HPP) +#define BOOST_QUICKBOOK_TREE_HPP + +#include + +namespace quickbook +{ + namespace detail + { + struct tree_node_base; + template struct tree_node; + struct tree_base; + template struct tree; + struct tree_builder_base; + template struct tree_builder; + + struct tree_node_base + { + friend struct tree_base; + friend struct tree_builder_base; + + protected: + tree_node_base* parent_; + tree_node_base* children_; + tree_node_base* next_; + tree_node_base* prev_; + + public: + tree_node_base() : parent_(), children_(), next_(), prev_() {} + + protected: + void add_before(tree_base*); + void add_after(tree_base*); + void add_first_child(tree_base*); + void add_last_child(tree_base*); + }; + + template struct tree_node : tree_node_base + { + T* parent() const { return static_cast(parent_); } + T* children() const { return static_cast(children_); } + T* next() const { return static_cast(next_); } + T* prev() const { return static_cast(prev_); } + + void add_before(tree&& x) { tree_node_base::add_before(&x); } + void add_after(tree&& x) { tree_node_base::add_after(&x); } + void add_first_child(tree&& x) + { + tree_node_base::add_first_child(&x); + } + void add_last_child(tree&& x) + { + tree_node_base::add_last_child(&x); + } + }; + + template void delete_nodes(Node* n) + { + while (n) { + Node* to_delete = n; + n = n->next(); + delete_nodes(to_delete->children()); + delete (to_delete); + } + } + + struct tree_base + { + friend struct tree_node_base; + + private: + tree_base(tree_base const&); + tree_base& operator=(tree_base const&); + + protected: + tree_node_base* root_; + + tree_base(); + explicit tree_base(tree_node_base*); + tree_base(tree_base&&); + tree_base& operator=(tree_base&&); + ~tree_base(); + + tree_node_base* extract(tree_node_base*); + }; + + template struct tree : tree_base + { + tree() {} + explicit tree(T* r) : tree_base(r) {} + tree(tree&& x) : tree_base(std::move(x)) {} + ~tree() { delete_nodes(root()); } + tree& operator=(tree&& x) + { + tree_base::operator=(std::move(x)); + return *this; + } + + tree extract(T* n) + { + return tree(static_cast(tree_base::extract(n))); + } + T* root() const { return static_cast(root_); } + }; + + struct tree_builder_base : tree_base + { + private: + tree_builder_base(tree_builder_base const&); + tree_builder_base& operator=(tree_builder_base const&); + + protected: + tree_node_base* current_; + tree_node_base* parent_; + + tree_builder_base(); + tree_builder_base(tree_builder_base&&); + tree_builder_base& operator=(tree_builder_base&& x); + ~tree_builder_base(); + + tree_node_base* extract(tree_node_base*); + tree_node_base* release(); + void add_element(tree_node_base* n); + + public: + void start_children(); + void end_children(); + }; + + template struct tree_builder : tree_builder_base + { + public: + tree_builder() : tree_builder_base() {} + tree_builder(tree_builder&& x) : tree_builder_base(std::move(x)) + { + } + ~tree_builder() { delete_nodes(root()); } + tree_builder& operator=(tree_builder&& x) + { + return tree_builder_base::operator=(std::move(x)); + } + + T* parent() const { return static_cast(parent_); } + T* current() const { return static_cast(current_); } + T* root() const { return static_cast(root_); } + tree extract(T* x) + { + return tree(static_cast(tree_builder_base::extract(x))); + } + tree release() + { + return tree(static_cast(tree_builder_base::release())); + } + void add_element(T* n) { tree_builder_base::add_element(n); } + }; + } +} + +#endif diff --git a/src/boost/tools/quickbook/src/utils.cpp b/src/boost/tools/quickbook/src/utils.cpp new file mode 100644 index 000000000..3a6b05803 --- /dev/null +++ b/src/boost/tools/quickbook/src/utils.cpp @@ -0,0 +1,221 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include "utils.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace quickbook +{ + namespace detail + { + namespace cl = boost::spirit::classic; + namespace ph = phoenix; + + struct xml_decode_grammar : cl::grammar + { + std::string& result; + xml_decode_grammar(std::string& result_) : result(result_) {} + + void append_char(char c) const { result += c; } + + void append_escaped_char(unsigned int c) const + { + if (c < 0x80) { + result += static_cast(c); + } + else if (c < 0x800) { + char e[] = {static_cast(0xc0 + (c >> 6)), + static_cast(0x80 + (c & 0x3f)), '\0'}; + result += e; + } + else if (c < 0x10000) { + char e[] = {static_cast(0xe0 + (c >> 12)), + static_cast(0x80 + ((c >> 6) & 0x3f)), + static_cast(0x80 + (c & 0x3f)), '\0'}; + result += e; + } + else if (c < 0x110000) { + char e[] = {static_cast(0xf0 + (c >> 18)), + static_cast(0x80 + ((c >> 12) & 0x3f)), + static_cast(0x80 + ((c >> 6) & 0x3f)), + static_cast(0x80 + (c & 0x3f)), '\0'}; + result += e; + } + else { + result += "\xEF\xBF\xBD"; + } + } + + template struct definition + { + definition(xml_decode_grammar const& self) + { + // clang-format off + + auto append_escaped_char = ph::bind(&xml_decode_grammar::append_escaped_char); + auto append_char = ph::bind(&xml_decode_grammar::append_char); + auto encoded = + cl::ch_p('&') + >> ( "#x" + >> cl::hex_p [append_escaped_char(self, ph::arg1)] + >> !cl::ch_p(';') + | '#' + >> cl::uint_p [append_escaped_char(self, ph::arg1)] + >> !cl::ch_p(';') + | cl::str_p("amp;") [append_char(self, '&')] + | cl::str_p("apos;") [append_char(self, '\'')] + | cl::str_p("gt;") [append_char(self, '>')] + | cl::str_p("lt;") [append_char(self, '<')] + | cl::str_p("quot;") [append_char(self, '"')] + ); + auto character = cl::anychar_p [append_char(self, ph::arg1)]; + xml_encoded = *(encoded | character); + + // clang-format on + } + + cl::rule const& start() { return xml_encoded; } + cl::rule xml_encoded; + }; + + private: + xml_decode_grammar& operator=(xml_decode_grammar const&); + }; + + std::string decode_string(quickbook::string_view str) + { + std::string result; + xml_decode_grammar xml_decode(result); + boost::spirit::classic::parse(str.begin(), str.end(), xml_decode); + return result; + } + + std::string encode_string(quickbook::string_view str) + { + std::string result; + result.reserve(str.size()); + + for (string_iterator it = str.begin(); it != str.end(); ++it) { + switch (*it) { + case '<': + result += "<"; + break; + case '>': + result += ">"; + break; + case '&': + result += "&"; + break; + case '"': + result += """; + break; + default: + result += *it; + break; + } + } + + return result; + } + + void print_char(char ch, std::ostream& out) + { + switch (ch) { + case '<': + out << "<"; + break; + case '>': + out << ">"; + break; + case '&': + out << "&"; + break; + case '"': + out << """; + break; + default: + out << ch; + break; + // note ' is not included. see the curse of apos: + // http://fishbowl.pastiche.org/2003/07/01/the_curse_of_apos + } + } + + void print_string(quickbook::string_view str, std::ostream& out) + { + for (string_iterator cur = str.begin(); cur != str.end(); ++cur) { + print_char(*cur, out); + } + } + + std::string make_identifier(quickbook::string_view text) + { + std::string id(text.begin(), text.end()); + for (std::string::iterator i = id.begin(); i != id.end(); ++i) { + if (!std::isalnum(static_cast(*i))) { + *i = '_'; + } + else { + *i = static_cast( + std::tolower(static_cast(*i))); + } + } + + return id; + } + + static std::string escape_uri_impl( + quickbook::string_view uri_param, char const* mark) + { + // Extra capital characters for validating percent escapes. + static char const hex[] = "0123456789abcdefABCDEF"; + + std::string uri; + uri.reserve(uri_param.size()); + + for (std::string::size_type n = 0; n < uri_param.size(); ++n) { + if (static_cast(uri_param[n]) > 127 || + (!std::isalnum(static_cast(uri_param[n])) && + !std::strchr(mark, uri_param[n])) || + (uri_param[n] == '%' && + !(n + 2 < uri_param.size() && + std::strchr(hex, uri_param[n + 1]) && + std::strchr(hex, uri_param[n + 2])))) { + char escape[] = {'%', hex[uri_param[n] / 16], + hex[uri_param[n] % 16], '\0'}; + uri += escape; + } + else { + uri += uri_param[n]; + } + } + + return uri; + } + + std::string escape_uri(quickbook::string_view uri_param) + { + std::string uri(uri_param.begin(), uri_param.end()); + return escape_uri_impl(uri_param, "-_.!~*'()?\\/"); + } + + std::string partially_escape_uri(quickbook::string_view uri_param) + { + return escape_uri_impl(uri_param, "-_.!~*'()?\\/:&=#%+"); + } + } +} diff --git a/src/boost/tools/quickbook/src/utils.hpp b/src/boost/tools/quickbook/src/utils.hpp new file mode 100644 index 000000000..fd616bc53 --- /dev/null +++ b/src/boost/tools/quickbook/src/utils.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2002 2004 2006 Joel de Guzman + Copyright (c) 2004 Eric Niebler + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_QUICKBOOK_UTILS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_UTILS_HPP + +#include +#include +#include "string_view.hpp" + +namespace quickbook +{ + namespace detail + { + std::string decode_string(quickbook::string_view); + std::string encode_string(quickbook::string_view); + void print_char(char ch, std::ostream& out); + void print_string(quickbook::string_view str, std::ostream& out); + std::string make_identifier(quickbook::string_view); + + // URI escape string + std::string escape_uri(quickbook::string_view); + + // URI escape string, leaving characters generally used in URIs. + std::string partially_escape_uri(quickbook::string_view); + + // Defined in id_xml.cpp. Just because. + std::string linkify( + quickbook::string_view source, quickbook::string_view linkend); + } +} + +#endif // BOOST_SPIRIT_QUICKBOOK_UTILS_HPP diff --git a/src/boost/tools/quickbook/src/value_tags.hpp b/src/boost/tools/quickbook/src/value_tags.hpp new file mode 100644 index 000000000..69f90f08b --- /dev/null +++ b/src/boost/tools/quickbook/src/value_tags.hpp @@ -0,0 +1,90 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_VALUES_TAGS_HPP) +#define BOOST_SPIRIT_QUICKBOOK_VALUES_TAGS_HPP + +#include +#include +#include +#include +#include +#include + +#define QUICKBOOK_VALUE_TAGS(tags_name, start_index, values) \ + struct tags_name \ + { \ + enum tags_name##_enum{previous_index = start_index - 1, \ + BOOST_PP_SEQ_ENUM(values), end_index}; \ + \ + static char const* name(int value) \ + { \ + switch (value) { \ + case 0: \ + return "null"; \ + BOOST_PP_SEQ_FOR_EACH(QUICKBOOK_VALUE_CASE, _, values) \ + default: \ + assert(false); \ + return ""; \ + }; \ + } \ + \ + typedef boost::integer_range range_type; \ + static range_type tags() \ + { \ + return boost::irange(start_index, (int)end_index); \ + } \ + static bool is_tag(int value) \ + { \ + return value >= start_index && value < (int)end_index; \ + } \ + }; + +#define QUICKBOOK_VALUE_CASE(r, _, value) \ + case value: \ + return BOOST_PP_STRINGIZE(value); + +#define QUICKBOOK_VALUE_NAMED_TAGS(tags_name, start_index, values) \ + struct tags_name \ + { \ + enum tags_name##_enum{previous_index = \ + start_index - \ + 1 BOOST_PP_SEQ_FOR_EACH( \ + QUICKBOOK_VALUE_NAMED_ENUM, _, values), \ + end_index}; \ + \ + static char const* name(int value) \ + { \ + switch (value) { \ + case 0: \ + return "null"; \ + BOOST_PP_SEQ_FOR_EACH(QUICKBOOK_VALUE_NAMED_CASE, _, values) \ + default: \ + assert(false); \ + return ""; \ + }; \ + } \ + \ + typedef boost::integer_range range_type; \ + static range_type tags() \ + { \ + return boost::irange(start_index, (int)end_index); \ + } \ + static bool is_tag(int value) \ + { \ + return value >= start_index && value < (int)end_index; \ + } \ + }; + +#define QUICKBOOK_VALUE_NAMED_ENUM(r, _, value) , BOOST_PP_SEQ_ELEM(0, value) + +#define QUICKBOOK_VALUE_NAMED_CASE(r, _, value) \ + case BOOST_PP_SEQ_ELEM(0, value): \ + return BOOST_PP_SEQ_ELEM(1, value); + +#endif diff --git a/src/boost/tools/quickbook/src/values.cpp b/src/boost/tools/quickbook/src/values.cpp new file mode 100644 index 000000000..6e2c3ec91 --- /dev/null +++ b/src/boost/tools/quickbook/src/values.cpp @@ -0,0 +1,829 @@ +/*============================================================================= + Copyright (c) 2010-2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "values.hpp" +#include +#include +#include "files.hpp" + +#define UNDEFINED_ERROR() \ + throw value_undefined_method( \ + std::string(BOOST_CURRENT_FUNCTION) + " not defined for " + \ + this->type_name() + " values."); + +namespace quickbook +{ + //////////////////////////////////////////////////////////////////////////// + // Value Error + + struct value_undefined_method : value_error + { + value_undefined_method(std::string const&); + }; + + value_error::value_error(std::string const& x) : std::logic_error(x) {} + + value_undefined_method::value_undefined_method(std::string const& x) + : value_error(x) + { + } + + //////////////////////////////////////////////////////////////////////////// + // Node + + namespace detail + { + value_node::value_node(tag_type t) : ref_count_(0), tag_(t), next_() {} + + value_node::~value_node() {} + + file_ptr value_node::get_file() const { UNDEFINED_ERROR(); } + string_iterator value_node::get_position() const { UNDEFINED_ERROR(); } + int value_node::get_int() const { UNDEFINED_ERROR(); } + quickbook::string_view value_node::get_quickbook() const + { + UNDEFINED_ERROR(); + } + std::string value_node::get_encoded() const { UNDEFINED_ERROR(); } + value_node* value_node::get_list() const { UNDEFINED_ERROR(); } + + bool value_node::empty() const { return false; } + bool value_node::check() const { return true; } + bool value_node::is_list() const { return false; } + bool value_node::is_encoded() const { return false; } + bool value_node::equals(value_node*) const { UNDEFINED_ERROR(); } + } + + //////////////////////////////////////////////////////////////////////////// + // List end value + // + // A special value for marking the end of lists. + + namespace detail + { + struct value_list_end_impl : public value_node + { + static value_list_end_impl instance; + + private: + value_list_end_impl() : value_node(value::default_tag) + { + intrusive_ptr_add_ref(&instance); + next_ = this; + } + + virtual char const* type_name() const { return "list end"; } + virtual value_node* clone() const { UNDEFINED_ERROR(); } + + virtual bool equals(value_node* other) const + { + return this == other; + } + + bool empty() const { UNDEFINED_ERROR(); } + bool check() const { UNDEFINED_ERROR(); } + bool is_list() const { UNDEFINED_ERROR(); } + bool is_encoded() const { UNDEFINED_ERROR(); } + }; + + value_list_end_impl value_list_end_impl::instance; + } + + //////////////////////////////////////////////////////////////////////////// + // Empty/nil values + // + // (nil is just a special case of empty, don't be mislead by the name + // the type is not important). + + namespace detail + { + struct empty_value_impl : public value_node + { + static value_node* new_(value::tag_type t); + + protected: + explicit empty_value_impl(value::tag_type t) : value_node(t) {} + + private: + char const* type_name() const { return "empty"; } + + virtual value_node* clone() const + { + return new empty_value_impl(tag_); + } + + virtual bool empty() const { return true; } + + virtual bool check() const { return false; } + + virtual bool equals(value_node* other) const + { + return !other->check(); + } + + friend value quickbook::empty_value(value::tag_type); + }; + + struct value_nil_impl : public empty_value_impl + { + static value_nil_impl instance; + + private: + value_nil_impl() : empty_value_impl(value::default_tag) + { + intrusive_ptr_add_ref(&instance); + next_ = &value_list_end_impl::instance; + } + }; + + value_nil_impl value_nil_impl::instance; + + value_node* empty_value_impl::new_(value::tag_type t) + { + // The return value from this function is always placed in an + // intrusive_ptr which will manage the memory correctly. + // Note that value_nil_impl increments its reference count + // in its constructor, so that it will never be deleted by the + // intrusive pointer. + + if (t == value::default_tag) + return &value_nil_impl::instance; + else + return new empty_value_impl(t); + } + } + + value empty_value(value::tag_type t) + { + return value(detail::empty_value_impl::new_(t)); + } + + //////////////////////////////////////////////////////////////////////////// + // value_counted + + namespace detail + { + value_counted::value_counted() : value_base(&value_nil_impl::instance) + { + // Even though empty is not on the heap, its reference + // counter needs to be incremented so that the destructor + // doesn't try to delete it. + + intrusive_ptr_add_ref(value_); + } + + value_counted::value_counted(value_counted const& x) : value_base(x) + { + intrusive_ptr_add_ref(value_); + } + + value_counted::value_counted(value_base const& x) : value_base(x) + { + intrusive_ptr_add_ref(value_); + } + + value_counted::value_counted(value_node* x) : value_base(x) + { + intrusive_ptr_add_ref(value_); + } + + value_counted::~value_counted() { intrusive_ptr_release(value_); } + } + + //////////////////////////////////////////////////////////////////////////// + // value + + value::value() : detail::value_counted() {} + + value::value(value const& x) : detail::value_counted(x) {} + + value::value(detail::value_base const& x) : detail::value_counted(x) {} + + value::value(detail::value_node* x) : detail::value_counted(x) {} + + value& value::operator=(value x) + { + swap(x); + return *this; + } + + //////////////////////////////////////////////////////////////////////////// + // Integers + + namespace detail + { + struct int_value_impl : public value_node + { + public: + explicit int_value_impl(int, value::tag_type); + + private: + char const* type_name() const { return "integer"; } + virtual value_node* clone() const; + virtual int get_int() const; + virtual std::string get_encoded() const; + virtual bool empty() const; + virtual bool is_encoded() const; + virtual bool equals(value_node*) const; + + int value_; + }; + + int_value_impl::int_value_impl(int v, value::tag_type t) + : value_node(t), value_(v) + { + } + + value_node* int_value_impl::clone() const + { + return new int_value_impl(value_, tag_); + } + + int int_value_impl::get_int() const { return value_; } + + std::string int_value_impl::get_encoded() const + { + return boost::lexical_cast(value_); + } + + bool int_value_impl::empty() const { return false; } + + bool int_value_impl::is_encoded() const { return true; } + + bool int_value_impl::equals(value_node* other) const + { + try { + return value_ == other->get_int(); + } catch (value_undefined_method&) { + return false; + } + } + } + + value int_value(int v, value::tag_type t) + { + return value(new detail::int_value_impl(v, t)); + } + + //////////////////////////////////////////////////////////////////////////// + // Strings + + namespace detail + { + struct encoded_value_impl : public value_node + { + public: + explicit encoded_value_impl(std::string const&, value::tag_type); + + private: + char const* type_name() const { return "encoded text"; } + + virtual ~encoded_value_impl(); + virtual value_node* clone() const; + virtual std::string get_encoded() const; + virtual bool empty() const; + virtual bool is_encoded() const; + virtual bool equals(value_node*) const; + + std::string value_; + }; + + struct qbk_value_impl : public value_node + { + public: + explicit qbk_value_impl( + file_ptr const&, + string_iterator begin, + string_iterator end, + value::tag_type); + + private: + char const* type_name() const { return "quickbook"; } + + virtual ~qbk_value_impl(); + virtual value_node* clone() const; + virtual file_ptr get_file() const; + virtual string_iterator get_position() const; + virtual quickbook::string_view get_quickbook() const; + virtual bool empty() const; + virtual bool equals(value_node*) const; + + file_ptr file_; + string_iterator begin_; + string_iterator end_; + }; + + struct encoded_qbk_value_impl : public value_node + { + private: + char const* type_name() const + { + return "encoded text with quickbook reference"; + } + + encoded_qbk_value_impl( + file_ptr const&, + string_iterator, + string_iterator, + std::string const&, + value::tag_type); + + virtual ~encoded_qbk_value_impl(); + virtual value_node* clone() const; + virtual file_ptr get_file() const; + virtual string_iterator get_position() const; + virtual quickbook::string_view get_quickbook() const; + virtual std::string get_encoded() const; + virtual bool empty() const; + virtual bool is_encoded() const; + virtual bool equals(value_node*) const; + + file_ptr file_; + string_iterator begin_; + string_iterator end_; + std::string encoded_value_; + + friend quickbook::value quickbook::encoded_qbk_value( + file_ptr const&, + string_iterator, + string_iterator, + std::string const&, + quickbook::value::tag_type); + }; + + // encoded_value_impl + + encoded_value_impl::encoded_value_impl( + std::string const& val, value::tag_type tag) + : value_node(tag), value_(val) + { + } + + encoded_value_impl::~encoded_value_impl() {} + + value_node* encoded_value_impl::clone() const + { + return new encoded_value_impl(value_, tag_); + } + + std::string encoded_value_impl::get_encoded() const { return value_; } + + bool encoded_value_impl::empty() const { return value_.empty(); } + + bool encoded_value_impl::is_encoded() const { return true; } + + bool encoded_value_impl::equals(value_node* other) const + { + try { + return value_ == other->get_encoded(); + } catch (value_undefined_method&) { + return false; + } + } + + // qbk_value_impl + + qbk_value_impl::qbk_value_impl( + file_ptr const& f, + string_iterator begin, + string_iterator end, + value::tag_type tag) + : value_node(tag), file_(f), begin_(begin), end_(end) + { + } + + qbk_value_impl::~qbk_value_impl() {} + + value_node* qbk_value_impl::clone() const + { + return new qbk_value_impl(file_, begin_, end_, tag_); + } + + file_ptr qbk_value_impl::get_file() const { return file_; } + + string_iterator qbk_value_impl::get_position() const { return begin_; } + + quickbook::string_view qbk_value_impl::get_quickbook() const + { + return quickbook::string_view(begin_, end_ - begin_); + } + + bool qbk_value_impl::empty() const { return begin_ == end_; } + + bool qbk_value_impl::equals(value_node* other) const + { + try { + return this->get_quickbook() == other->get_quickbook(); + } catch (value_undefined_method&) { + return false; + } + } + + // encoded_qbk_value_impl + + encoded_qbk_value_impl::encoded_qbk_value_impl( + file_ptr const& f, + string_iterator begin, + string_iterator end, + std::string const& encoded, + value::tag_type tag) + : value_node(tag) + , file_(f) + , begin_(begin) + , end_(end) + , encoded_value_(encoded) + + { + } + + encoded_qbk_value_impl::~encoded_qbk_value_impl() {} + + value_node* encoded_qbk_value_impl::clone() const + { + return new encoded_qbk_value_impl( + file_, begin_, end_, encoded_value_, tag_); + } + + file_ptr encoded_qbk_value_impl::get_file() const { return file_; } + + string_iterator encoded_qbk_value_impl::get_position() const + { + return begin_; + } + + quickbook::string_view encoded_qbk_value_impl::get_quickbook() const + { + return quickbook::string_view(begin_, end_ - begin_); + } + + std::string encoded_qbk_value_impl::get_encoded() const + { + return encoded_value_; + } + + // Should this test the quickbook, the boostbook or both? + bool encoded_qbk_value_impl::empty() const + { + return encoded_value_.empty(); + } + + bool encoded_qbk_value_impl::is_encoded() const { return true; } + + bool encoded_qbk_value_impl::equals(value_node* other) const + { + try { + return this->get_quickbook() == other->get_quickbook(); + } catch (value_undefined_method&) { + } + + try { + return this->get_encoded() == other->get_encoded(); + } catch (value_undefined_method&) { + } + + return false; + } + } + + value qbk_value( + file_ptr const& f, + string_iterator x, + string_iterator y, + value::tag_type t) + { + return value(new detail::qbk_value_impl(f, x, y, t)); + } + + value encoded_value(std::string const& x, value::tag_type t) + { + return value(new detail::encoded_value_impl(x, t)); + } + + value encoded_qbk_value( + file_ptr const& f, + string_iterator x, + string_iterator y, + std::string const& z, + value::tag_type t) + { + return value(new detail::encoded_qbk_value_impl(f, x, y, z, t)); + } + + ////////////////////////////////////////////////////////////////////////// + // List methods + + namespace detail + { + namespace + { + value_node** list_ref_back(value_node**); + void list_ref(value_node*); + void list_unref(value_node*); + value_node** merge_sort(value_node**); + value_node** merge_sort(value_node**, int); + value_node** merge(value_node**, value_node**, value_node**); + void rotate(value_node**, value_node**, value_node**); + + value_node** list_ref_back(value_node** back) + { + while (*back != &value_list_end_impl::instance) { + intrusive_ptr_add_ref(*back); + back = &(*back)->next_; + } + + return back; + } + + void list_ref(value_node* ptr) + { + while (ptr != &value_list_end_impl::instance) { + intrusive_ptr_add_ref(ptr); + ptr = ptr->next_; + } + } + + void list_unref(value_node* ptr) + { + while (ptr != &value_list_end_impl::instance) { + value_node* next = ptr->next_; + intrusive_ptr_release(ptr); + ptr = next; + } + } + + value_node** merge_sort(value_node** l) + { + if (*l == &value_list_end_impl::instance) + return l; + else + return merge_sort(l, 9999); + } + + value_node** merge_sort(value_node** l, int recurse_limit) + { + value_node** p = &(*l)->next_; + for (int count = 0; count < recurse_limit && + *p != &value_list_end_impl::instance; + ++count) { + p = merge(l, p, merge_sort(p, count)); + } + return p; + } + + value_node** merge( + value_node** first, value_node** second, value_node** third) + { + for (;;) { + for (;;) { + if (first == second) return third; + if ((*second)->tag_ < (*first)->tag_) break; + first = &(*first)->next_; + } + + rotate(first, second, third); + first = &(*first)->next_; + + // Since the two ranges were just swapped, the order is now: + // first...third...second + // + // Also, that since the second section of the list was + // originally before the first, if the heads are equal + // we need to swap to maintain the order. + + for (;;) { + if (first == third) return second; + if ((*third)->tag_ <= (*first)->tag_) break; + first = &(*first)->next_; + } + + rotate(first, third, second); + first = &(*first)->next_; + } + } + + void rotate( + value_node** first, value_node** second, value_node** third) + { + value_node* tmp = *first; + *first = *second; + *second = *third; + *third = tmp; + // if(*second != &value_list_end_impl::instance) back = second; + } + } + } + + ////////////////////////////////////////////////////////////////////////// + // Lists + + namespace detail + { + struct value_list_impl : public value_node + { + value_list_impl(value::tag_type); + value_list_impl(value_list_builder&, value::tag_type); + + private: + value_list_impl(value_list_impl const&); + + char const* type_name() const { return "list"; } + + virtual ~value_list_impl(); + virtual value_node* clone() const; + virtual bool empty() const; + virtual bool equals(value_node*) const; + + virtual bool is_list() const; + virtual value_node* get_list() const; + + value_node* head_; + }; + + value_list_impl::value_list_impl(value::tag_type tag) + : value_node(tag), head_(&value_list_end_impl::instance) + { + } + + value_list_impl::value_list_impl( + value_list_builder& builder, value::tag_type tag) + : value_node(tag), head_(builder.release()) + { + } + + value_list_impl::value_list_impl(value_list_impl const& x) + : value_node(x.tag_), head_(x.head_) + { + list_ref(head_); + } + + value_list_impl::~value_list_impl() { list_unref(head_); } + + value_node* value_list_impl::clone() const + { + return new value_list_impl(*this); + } + + bool value_list_impl::empty() const + { + return head_ == &value_list_end_impl::instance; + } + + bool value_list_impl::is_list() const { return true; } + + value_node* value_list_impl::get_list() const { return head_; } + + bool value_list_impl::equals(value_node* other) const + { + value_node* x1; + + try { + x1 = other->get_list(); + } catch (value_undefined_method&) { + return false; + } + + for (value_node *x2 = head_; x1 != x2; + x1 = x1->next_, x2 = x2->next_) { + if (x2 == &value_list_end_impl::instance || !x1->equals(x2)) + return false; + } + + return true; + } + } + + ////////////////////////////////////////////////////////////////////////// + // List builder + + namespace detail + { + // value_list_builder + + value_list_builder::value_list_builder() + : head_(&value_list_end_impl::instance), back_(&head_) + { + } + + value_list_builder::value_list_builder(value_node* ptr) + : head_(ptr), back_(list_ref_back(&head_)) + { + } + + value_list_builder::~value_list_builder() { list_unref(head_); } + + void value_list_builder::swap(value_list_builder& other) + { + std::swap(head_, other.head_); + std::swap(back_, other.back_); + if (back_ == &other.head_) back_ = &head_; + if (other.back_ == &head_) other.back_ = &other.head_; + } + + value_node* value_list_builder::release() + { + value_node* r = head_; + head_ = &value_list_end_impl::instance; + back_ = &head_; + return r; + } + + void value_list_builder::append(value_node* item) + { + if (item->next_) item = item->clone(); + intrusive_ptr_add_ref(item); + item->next_ = *back_; + *back_ = item; + back_ = &item->next_; + } + + void value_list_builder::sort() + { + back_ = merge_sort(&head_); + assert(*back_ == &value_list_end_impl::instance); + } + + bool value_list_builder::empty() const + { + return head_ == &value_list_end_impl::instance; + } + } + + ////////////////////////////////////////////////////////////////////////// + // Value builder + + value_builder::value_builder() + : current(), list_tag(value::default_tag), saved() + { + } + + void value_builder::swap(value_builder& other) + { + current.swap(other.current); + std::swap(list_tag, other.list_tag); + saved.swap(other.saved); + } + + void value_builder::save() + { + boost::scoped_ptr store(new value_builder); + swap(*store); + saved.swap(store); + } + + void value_builder::restore() + { + boost::scoped_ptr store; + store.swap(saved); + swap(*store); + } + + value value_builder::release() + { + return value(new detail::value_list_impl(current, list_tag)); + } + + void value_builder::insert(value const& item) + { + current.append(item.value_); + } + + void value_builder::extend(value const& list) + { + for (value::iterator begin = list.begin(), end = list.end(); + begin != end; ++begin) { + insert(*begin); + } + } + + void value_builder::start_list(value::tag_type tag) + { + save(); + list_tag = tag; + } + + void value_builder::finish_list() + { + value list = release(); + restore(); + insert(list); + } + + void value_builder::clear_list() { restore(); } + + void value_builder::sort_list() { current.sort(); } + + bool value_builder::empty() const { return current.empty(); } + + //////////////////////////////////////////////////////////////////////////// + // Iterator + + namespace detail + { + value::iterator::iterator() : ptr_(&value_list_end_impl::instance) {} + } +} diff --git a/src/boost/tools/quickbook/src/values.hpp b/src/boost/tools/quickbook/src/values.hpp new file mode 100644 index 000000000..3ba75ffe5 --- /dev/null +++ b/src/boost/tools/quickbook/src/values.hpp @@ -0,0 +1,444 @@ +/*============================================================================= + Copyright (c) 2010-2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +// An easy way to store data parsed for quickbook. + +#if !defined(BOOST_SPIRIT_QUICKBOOK_VALUES_HPP) +#define BOOST_SPIRIT_QUICKBOOK_VALUES_HPP + +#include +#include +#include +#include +#include +#include +#include +#include "files.hpp" +#include "fwd.hpp" +#include "string_view.hpp" + +namespace quickbook +{ + struct value; + struct value_builder; + struct value_error; + + namespace detail + { + //////////////////////////////////////////////////////////////////////// + // Node + + struct value_node + { + private: + value_node(value_node const&); + value_node& operator=(value_node const&); + + public: + typedef int tag_type; + + protected: + explicit value_node(tag_type); + virtual ~value_node(); + + public: + virtual char const* type_name() const = 0; + virtual value_node* clone() const = 0; + + virtual file_ptr get_file() const; + virtual string_iterator get_position() const; + virtual quickbook::string_view get_quickbook() const; + virtual std::string get_encoded() const; + virtual int get_int() const; + + virtual bool check() const; + virtual bool empty() const; + virtual bool is_encoded() const; + virtual bool is_list() const; + virtual bool equals(value_node*) const; + + virtual value_node* get_list() const; + + int ref_count_; + const tag_type tag_; + value_node* next_; + + friend void intrusive_ptr_add_ref(value_node* ptr) + { + ++ptr->ref_count_; + } + friend void intrusive_ptr_release(value_node* ptr) + { + if (--ptr->ref_count_ == 0) delete ptr; + } + }; + + //////////////////////////////////////////////////////////////////////// + // Value base + // + // This defines most of the public methods for value. + // 'begin' and 'end' are defined with the iterators later. + + struct value_base + { + public: + struct iterator; + + typedef iterator const_iterator; + typedef value_node::tag_type tag_type; + enum + { + default_tag = 0 + }; + + protected: + explicit value_base(value_node* base) : value_(base) + { + assert(value_); + } + + ~value_base() {} + + void swap(value_base& x) { std::swap(value_, x.value_); } + + public: + bool check() const { return value_->check(); } + bool empty() const { return value_->empty(); } + bool is_encoded() const { return value_->is_encoded(); } + bool is_list() const { return value_->is_list(); } + + iterator begin() const; + iterator end() const; + + // Item accessors + tag_type get_tag() const { return value_->tag_; } + file_ptr get_file() const { return value_->get_file(); } + string_iterator get_position() const + { + return value_->get_position(); + } + quickbook::string_view get_quickbook() const + { + return value_->get_quickbook(); + } + std::string get_encoded() const { return value_->get_encoded(); } + int get_int() const { return value_->get_int(); } + + // Equality is pretty inefficient. Not really designed for anything + // more than testing purposes. + friend bool operator==(value_base const& x, value_base const& y) + { + return x.value_->equals(y.value_); + } + + protected: + value_node* value_; + + // value_builder needs to access 'value_' to get the node + // from a value. + friend struct quickbook::value_builder; + }; + + //////////////////////////////////////////////////////////////////////// + // Reference and proxy values for use in iterators + + struct value_ref : public value_base + { + public: + explicit value_ref(value_node* base) : value_base(base) {} + }; + + struct value_proxy : public value_base + { + public: + explicit value_proxy(value_node* base) : value_base(base) {} + value_proxy* operator->() { return this; } + value_ref operator*() const { return value_ref(value_); } + }; + + //////////////////////////////////////////////////////////////////////// + // Iterators + + struct value_base::iterator : public boost::forward_iterator_helper< + iterator, + value, + int, + value_proxy, + value_ref> + { + public: + iterator(); + explicit iterator(value_node* p) : ptr_(p) {} + friend bool operator==(iterator x, iterator y) + { + return x.ptr_ == y.ptr_; + } + iterator& operator++() + { + ptr_ = ptr_->next_; + return *this; + } + value_ref operator*() const { return value_ref(ptr_); } + value_proxy operator->() const { return value_proxy(ptr_); } + + private: + value_node* ptr_; + }; + + inline value_base::iterator value_base::begin() const + { + return iterator(value_->get_list()); + } + + inline value_base::iterator value_base::end() const + { + return iterator(); + } + + //////////////////////////////////////////////////////////////////////// + // Reference counting for values + + struct value_counted : public value_base + { + value_counted& operator=(value_counted const&); + + protected: + value_counted(); + value_counted(value_counted const&); + value_counted(value_base const&); + value_counted(value_node*); + ~value_counted(); + }; + + //////////////////////////////////////////////////////////////////////// + // List builder + // + // Values are immutable, so this class is used to build a list of + // value nodes before constructing the value. + + struct value_list_builder + { + value_list_builder(value_list_builder const&); + value_list_builder& operator=(value_list_builder const&); + + public: + value_list_builder(); + value_list_builder(value_node*); + ~value_list_builder(); + void swap(value_list_builder& b); + value_node* release(); + + void append(value_node*); + void sort(); + + bool empty() const; + + private: + value_node* head_; + value_node** back_; + }; + } + + //////////////////////////////////////////////////////////////////////////// + // Value + // + // Most of the methods are in value_base. + + struct value : public detail::value_counted + { + public: + value(); + value(value const&); + value(detail::value_base const&); + explicit value(detail::value_node*); + value& operator=(value); + void swap(value& x) { detail::value_counted::swap(x); } + }; + + // Empty + value empty_value(value::tag_type = value::default_tag); + + // Integers + value int_value(int, value::tag_type = value::default_tag); + + // String types + + // Quickbook strings contain a reference to the original quickbook source. + value qbk_value( + file_ptr const&, + string_iterator, + string_iterator, + value::tag_type = value::default_tag); + + // Encoded strings are either plain text or boostbook. + value encoded_value( + std::string const&, value::tag_type = value::default_tag); + + // An encoded quickbook string is an encoded string that contains a + // reference to the quickbook source it was generated from. + value encoded_qbk_value( + file_ptr const&, + string_iterator, + string_iterator, + std::string const&, + value::tag_type = value::default_tag); + + //////////////////////////////////////////////////////////////////////////// + // Value Builder + // + // Used to incrementally build a valueeter tree. + + struct value_builder + { + public: + value_builder(); + void swap(value_builder& b); + + void save(); + void restore(); + + value release(); + + void insert(value const&); + void extend(value const&); + + void start_list(value::tag_type = value::default_tag); + void finish_list(); + void clear_list(); + void sort_list(); + + bool empty() const; + + private: + detail::value_list_builder current; + value::tag_type list_tag; + boost::scoped_ptr saved; + }; + + //////////////////////////////////////////////////////////////////////////// + // Value Error + // + + struct value_error : public std::logic_error + { + public: + explicit value_error(std::string const&); + }; + + //////////////////////////////////////////////////////////////////////////// + // Value Consumer + // + // Convenience class for unpacking value values. + + struct value_consumer + { + public: + struct iterator : public boost::input_iterator_helper< + iterator, + boost::iterator_value::type, + boost::iterator_difference::type, + boost::iterator_pointer::type, + boost::iterator_reference::type> + { + public: + iterator(); + explicit iterator(value::iterator* p) : ptr_(p) {} + friend bool operator==(iterator x, iterator y) + { + return *x.ptr_ == *y.ptr_; + } + iterator& operator++() + { + ++*ptr_; + return *this; + } + reference operator*() const { return **ptr_; } + pointer operator->() const { return ptr_->operator->(); } + + private: + value::iterator* ptr_; + }; + + typedef iterator const_iterator; + typedef iterator::reference reference; + + value_consumer(value const& x) + : list_(x), pos_(x.begin()), end_(x.end()) + { + } + + value_consumer(reference x) : list_(x), pos_(x.begin()), end_(x.end()) + { + } + + reference consume() + { + assert_check(); + return *pos_++; + } + + reference consume(value::tag_type t) + { + assert_check(t); + return *pos_++; + } + + value optional_consume() + { + if (check()) { + return *pos_++; + } + else { + return value(); + } + } + + value optional_consume(value::tag_type t) + { + if (check(t)) { + return *pos_++; + } + else { + return value(); + } + } + + bool check() const { return pos_ != end_; } + + bool check(value::tag_type t) const + { + return pos_ != end_ && t == pos_->get_tag(); + } + + void finish() const + { + if (pos_ != end_) throw value_error("Not all values handled."); + } + + iterator begin() { return iterator(&pos_); } + iterator end() { return iterator(&end_); } + + private: + void assert_check() const + { + if (pos_ == end_) + throw value_error("Attempt to read past end of value list."); + } + + void assert_check(value::tag_type t) const + { + assert_check(); + if (t != pos_->get_tag()) throw value_error("Incorrect value tag."); + } + + value list_; + value::iterator pos_, end_; + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/values_parse.hpp b/src/boost/tools/quickbook/src/values_parse.hpp new file mode 100644 index 000000000..ee9cb2be7 --- /dev/null +++ b/src/boost/tools/quickbook/src/values_parse.hpp @@ -0,0 +1,137 @@ +/*============================================================================= + Copyright (c) 2010-2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_SPIRIT_QUICKBOOK_VALUES_PARSE_HPP) +#define BOOST_SPIRIT_QUICKBOOK_VALUES_PARSE_HPP + +#include +#include "parsers.hpp" +#include "scoped.hpp" +#include "values.hpp" + +#include + +namespace quickbook +{ + namespace ph = phoenix; + + struct value_builder_save : scoped_action_base + { + explicit value_builder_save(value_builder& builder_) : builder(builder_) + { + } + + bool start() + { + builder.save(); + return true; + } + + void cleanup() { builder.restore(); } + + value_builder& builder; + + private: + value_builder_save& operator=(value_builder_save const&); + }; + + struct value_builder_list : scoped_action_base + { + explicit value_builder_list(value_builder& builder_) : builder(builder_) + { + } + + bool start(value::tag_type tag = value::default_tag) + { + builder.start_list(tag); + return true; + } + + void success(parse_iterator, parse_iterator) { builder.finish_list(); } + void failure() { builder.clear_list(); } + + value_builder& builder; + + private: + value_builder_list& operator=(value_builder_list const&); + }; + + struct value_entry + { + template < + typename Arg1, + typename Arg2 = void, + typename Arg3 = void, + typename Arg4 = void> + struct result + { + typedef void type; + }; + + explicit value_entry(value_builder& builder_, file_ptr* current_file_) + : builder(builder_), current_file(current_file_) + { + } + + void operator()( + parse_iterator begin, + parse_iterator end, + value::tag_type tag = value::default_tag) const + { + builder.insert( + qbk_value(*current_file, begin.base(), end.base(), tag)); + } + + void operator()(int v, value::tag_type tag = value::default_tag) const + { + builder.insert(int_value(v, tag)); + } + + value_builder& builder; + file_ptr* current_file; + + private: + value_entry& operator=(value_entry const&); + }; + + struct value_sort + { + typedef void result_type; + + explicit value_sort(value_builder& builder_) : builder(builder_) {} + + void operator()() const { builder.sort_list(); } + + value_builder& builder; + + private: + value_sort& operator=(value_sort const&); + }; + + struct value_parser + { + explicit value_parser(file_ptr* current_file) + : builder() + , save(value_builder_save(builder)) + , list(value_builder_list(builder)) + , entry(value_entry(builder, current_file)) + , sort(value_sort(builder)) + { + } + + value release() { return builder.release(); } + + value_builder builder; + scoped_parser save; + scoped_parser list; + ph::function entry; + ph::function sort; + }; +} + +#endif diff --git a/src/boost/tools/quickbook/src/xml_parse.cpp b/src/boost/tools/quickbook/src/xml_parse.cpp new file mode 100644 index 000000000..4a043bb2b --- /dev/null +++ b/src/boost/tools/quickbook/src/xml_parse.cpp @@ -0,0 +1,302 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include "xml_parse.hpp" +#include "simple_parse.hpp" +#include "stream.hpp" +#include "utils.hpp" + +namespace quickbook +{ + namespace detail + { + // write_xml_tree + + void write_xml_tree_impl( + std::string& out, xml_element* node, unsigned int depth); + + void write_xml_tree(xml_element* node) + { + std::string result; + write_xml_tree_impl(result, node, 0); + quickbook::detail::out() << result << std::flush; + } + + void write_xml_tree_impl( + std::string& out, xml_element* node, unsigned int depth) + { + if (!node) { + return; + } + + for (unsigned i = 0; i < depth; ++i) { + out += " "; + } + switch (node->type_) { + case xml_element::element_node: + out += "Node: "; + out += node->name_; + break; + case xml_element::element_text: + out += "Text"; + break; + case xml_element::element_html: + out += "HTML"; + break; + default: + out += "Unknown node type"; + break; + } + out += "\n"; + for (xml_element* it = node->children(); it; it = it->next()) { + write_xml_tree_impl(out, it, depth + 1); + } + } + + // xml_parse + + void read_tag( + xml_tree_builder&, + string_iterator& it, + string_iterator start, + string_iterator end); + void read_close_tag( + xml_tree_builder&, + string_iterator& it, + string_iterator start, + string_iterator end); + void skip_question_mark_tag( + string_iterator& it, string_iterator start, string_iterator end); + void skip_exclamation_mark_tag( + string_iterator& it, string_iterator start, string_iterator end); + quickbook::string_view read_tag_name( + string_iterator& it, string_iterator start, string_iterator end); + quickbook::string_view read_attribute_value( + string_iterator& it, string_iterator start, string_iterator end); + quickbook::string_view read_string( + string_iterator& it, string_iterator end); + + xml_tree xml_parse(quickbook::string_view source) + { + typedef string_iterator iterator; + iterator it = source.begin(), end = source.end(); + + xml_tree_builder builder; + + while (true) { + iterator start = it; + read_to(it, end, '<'); + if (start != it) { + builder.add_element(xml_element::text_node( + quickbook::string_view(start, it - start))); + } + + if (it == end) { + break; + } + start = it++; + if (it == end) { + throw xml_parse_error("Invalid tag", start); + } + + switch (*it) { + case '?': + skip_question_mark_tag(it, start, end); + break; + case '!': + skip_exclamation_mark_tag(it, start, end); + break; + case '/': + read_close_tag(builder, it, start, end); + break; + default: + read_tag(builder, it, start, end); + break; + } + } + + return builder.release(); + } + + void read_tag( + xml_tree_builder& builder, + string_iterator& it, + string_iterator start, + string_iterator end) + { + assert(it == start + 1 && it != end); + quickbook::string_view name = read_tag_name(it, start, end); + xml_element* node = xml_element::node(name); + builder.add_element(node); + + // Read attributes + while (true) { + read_some_of(it, end, " \t\n\r"); + if (it == end) { + throw xml_parse_error("Invalid tag", start); + } + if (*it == '>') { + ++it; + builder.start_children(); + break; + } + if (*it == '/') { + ++it; + read_some_of(it, end, " \t\n\r"); + if (it == end || *it != '>') { + throw xml_parse_error("Invalid tag", start); + } + ++it; + break; + } + quickbook::string_view attribute_name = + read_tag_name(it, start, end); + read_some_of(it, end, " \t\n\r"); + if (it == end) { + throw xml_parse_error("Invalid tag", start); + } + quickbook::string_view attribute_value; + if (*it == '=') { + ++it; + attribute_value = read_attribute_value(it, start, end); + } + node->set_attribute( + attribute_name, + quickbook::detail::decode_string(attribute_value)); + } + } + + void read_close_tag( + xml_tree_builder& builder, + string_iterator& it, + string_iterator start, + string_iterator end) + { + assert(it == start + 1 && it != end && *it == '/'); + ++it; + quickbook::string_view name = read_tag_name(it, start, end); + read_some_of(it, end, " \t\n\r"); + if (it == end || *it != '>') { + throw xml_parse_error("Invalid close tag", start); + } + ++it; + + if (!builder.parent() || builder.parent()->name_ != name) { + throw xml_parse_error("Close tag doesn't match", start); + } + + builder.end_children(); + } + + void skip_question_mark_tag( + string_iterator& it, string_iterator start, string_iterator end) + { + assert(it == start + 1 && it != end && *it == '?'); + ++it; + + while (true) { + read_to_one_of(it, end, "\"'?<>"); + if (it == end) { + throw xml_parse_error("Invalid tag", start); + } + switch (*it) { + case '"': + case '\'': + read_string(it, end); + break; + case '?': + if (read(it, end, "?>")) { + return; + } + else { + ++it; + } + break; + default: + throw xml_parse_error("Invalid tag", start); + } + } + } + + void skip_exclamation_mark_tag( + string_iterator& it, string_iterator start, string_iterator end) + { + assert(it == start + 1 && it != end && *it == '!'); + ++it; + + if (read(it, end, "--")) { + if (read_past(it, end, "-->")) { + return; + } + else { + throw xml_parse_error("Invalid comment", start); + } + } + + while (true) { + read_to_one_of(it, end, "\"'<>"); + if (it == end) { + throw xml_parse_error("Invalid tag", start); + } + switch (*it) { + case '"': + case '\'': + read_string(it, end); + break; + case '>': + ++it; + return; + default: + throw xml_parse_error("Invalid tag", start); + } + } + } + + quickbook::string_view read_tag_name( + string_iterator& it, string_iterator start, string_iterator end) + { + read_some_of(it, end, " \t\n\r"); + string_iterator name_start = it; + read_some_of( + it, end, + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:-"); + if (name_start == it) { + throw xml_parse_error("Invalid tag", start); + } + return quickbook::string_view(name_start, it - name_start); + } + + quickbook::string_view read_attribute_value( + string_iterator& it, string_iterator start, string_iterator end) + { + read_some_of(it, end, " \t\n\r"); + if (*it == '"' || *it == '\'') { + return read_string(it, end); + } + else { + throw xml_parse_error("Invalid tag", start); + } + } + + quickbook::string_view read_string( + string_iterator& it, string_iterator end) + { + assert(it != end && (*it == '"' || *it == '\'')); + + string_iterator start = it; + char deliminator = *it; + ++it; + read_to(it, end, deliminator); + if (it == end) { + throw xml_parse_error("Invalid string", start); + } + ++it; + return quickbook::string_view(start + 1, it - start - 2); + } + } +} diff --git a/src/boost/tools/quickbook/src/xml_parse.hpp b/src/boost/tools/quickbook/src/xml_parse.hpp new file mode 100644 index 000000000..6d8e4ca16 --- /dev/null +++ b/src/boost/tools/quickbook/src/xml_parse.hpp @@ -0,0 +1,134 @@ +/*============================================================================= +Copyright (c) 2017 Daniel James + +Use, modification and distribution is subject to the Boost Software +License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#if !defined(BOOST_QUICKBOOK_XML_PARSE_HPP) +#define BOOST_QUICKBOOK_XML_PARSE_HPP + +#include +#include +#include "string_view.hpp" +#include "tree.hpp" + +namespace quickbook +{ + namespace detail + { + struct xml_element; + typedef tree xml_tree; + typedef tree_builder xml_tree_builder; + struct xml_parse_error; + + struct xml_element : tree_node + { + enum element_type + { + element_node, + element_text, + element_html + } type_; + std::string name_; + + private: + std::list > attributes_; + + public: + std::string contents_; + + explicit xml_element(element_type n) : type_(n) {} + + explicit xml_element(element_type n, quickbook::string_view name) + : type_(n), name_(name.begin(), name.end()) + { + } + + static xml_element* text_node(quickbook::string_view x) + { + xml_element* n = new xml_element(element_text); + n->contents_.assign(x.begin(), x.end()); + return n; + } + + static xml_element* html_node(quickbook::string_view x) + { + xml_element* n = new xml_element(element_html); + n->contents_.assign(x.begin(), x.end()); + return n; + } + + static xml_element* node(quickbook::string_view x) + { + return new xml_element(element_node, x); + } + + bool has_attribute(quickbook::string_view name) + { + for (auto it = attributes_.begin(), end = attributes_.end(); + it != end; ++it) { + if (name == it->first) { + return true; + } + } + return false; + } + + string_view get_attribute(quickbook::string_view name) + { + for (auto it = attributes_.begin(), end = attributes_.end(); + it != end; ++it) { + if (name == it->first) { + return it->second; + } + } + return string_view(); + } + + string_view set_attribute( + quickbook::string_view name, quickbook::string_view value) + { + for (auto it = attributes_.begin(), end = attributes_.end(); + it != end; ++it) { + if (name == it->first) { + it->second.assign(value.begin(), value.end()); + return it->second; + } + } + + attributes_.push_back( + std::make_pair(name.to_s(), value.to_s())); + return attributes_.back().second; + } + + xml_element* get_child(quickbook::string_view name) + { + for (auto it = children(); it; it = it->next()) { + if (it->type_ == element_node && it->name_ == name) { + return it; + } + } + + return 0; + } + }; + + struct xml_parse_error + { + char const* message; + string_iterator pos; + + xml_parse_error(char const* m, string_iterator p) + : message(m), pos(p) + { + } + }; + + void write_xml_tree(xml_element*); + xml_tree xml_parse(quickbook::string_view); + } +} + +#endif diff --git a/src/boost/tools/quickbook/test/Jamfile.v2 b/src/boost/tools/quickbook/test/Jamfile.v2 new file mode 100644 index 000000000..c0d543f59 --- /dev/null +++ b/src/boost/tools/quickbook/test/Jamfile.v2 @@ -0,0 +1,173 @@ +# +# Copyright (c) 2005 João Abecasis +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/test + : requirements + msvc:off + 98:no + 03:no + ; + +build-project doc-info ; +build-project unit ; +build-project command-line ; +build-project snippets ; +build-project "include" ; +build-project versions ; +build-project xinclude ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +test-suite quickbook.test : + [ quickbook-test anchor-1_1 ] + [ quickbook-test anchor-1_6 ] + [ quickbook-test anchor-1_7 ] + [ quickbook-test blocks-1_5 ] + [ quickbook-test callouts-1_5 ] + [ quickbook-test callouts-1_7 ] + [ quickbook-test code-1_1 ] + [ quickbook-test code-1_5 ] + [ quickbook-test code_cpp-1_5 ] + [ quickbook-error-test code_cpp_mismatched_escape-1_4-fail ] + [ quickbook-test code_python-1_5 ] + [ quickbook-error-test code_python_mismatched_escape-1_4-fail ] + [ quickbook-test code_snippet-1_1 ] + [ quickbook-test code_teletype-1_5 ] + [ quickbook-error-test code_unclosed_block-1_6-fail ] + [ quickbook-test command_line_macro-1_1 : : : + __macro__=*bold* + __empty__ ] + [ quickbook-error-test command_line_macro-1_1-invalid : + command_line_macro-1_1.quickbook : + -Dsomething[] ] + [ quickbook-test cond_phrase-1_5 ] + [ quickbook-test cond_phrase-1_7 ] + # TODO: This test generates invalid boostbook, so it breaks when generating html + # [ quickbook-test elements-1_5 ] + [ quickbook-test elements-1_6 ] + [ quickbook-error-test endsect-wrong-id-1_4-fail ] + [ quickbook-error-test endsect-wrong-id-1_7-fail ] + [ quickbook-error-test endsect-unopened-1_7-fail ] + [ quickbook-test escape-1_1 ] + [ quickbook-test escape-1_6 ] + [ quickbook-error-test escape-mismatched-1_5-fail ] + [ quickbook-test footnotes-1_7 ] + [ quickbook-test heading-1_1 ] + [ quickbook-test heading-1_3 ] + [ quickbook-test heading-1_5 ] + [ quickbook-test heading-1_6 ] + [ quickbook-test heading-1_7 ] + [ quickbook-error-test heading_unclosed-1_4-fail ] + [ quickbook-test hr-1_5 ] + [ quickbook-test hr-1_6 ] + [ quickbook-test identifier-1_5 ] + [ quickbook-test identifier-1_6 ] + [ quickbook-test image-1_5 ] + [ quickbook-test image-1_6 ] + [ quickbook-error-test import-1_1-fail ] + [ quickbook-error-test include-1_1-fail ] + [ quickbook-test include-1_5 ] + [ quickbook-test include-1_6 ] + [ quickbook-test include-1_7 ] + [ quickbook-test include2-1_6 ] + [ quickbook-error-test include_win_path-1_6-fail ] + [ quickbook-error-test include_invalid_path1-1_7-fail ] + [ quickbook-error-test include_invalid_path2-1_7-fail ] + [ quickbook-error-test include_invalid_path3-1_7-fail ] + [ quickbook-error-test include_unicode_glob-1_7-fail ] + [ quickbook-test link-1_1 ] + [ quickbook-test link-1_6 ] + [ quickbook-test link-1_7 ] + [ quickbook-error-test link-1_7-fail ] + [ quickbook-error-test link-1_7-fail2 ] + [ quickbook-test list_test-1_5 ] + [ quickbook-test list_test-1_6 ] + [ quickbook-error-test list_test-1_6-fail ] + [ quickbook-test list_test-1_7 ] + [ quickbook-error-test list_test-1_7-fail1 ] + [ quickbook-test macro-1_5 ] + [ quickbook-test macro-1_6 ] + [ quickbook-error-test mismatched_brackets-1_1-fail ] + [ quickbook-test mismatched_brackets1-1_1 ] + [ quickbook-test mismatched_brackets2-1_1 ] + [ quickbook-test mismatched_brackets3-1_1 ] + [ quickbook-error-test mismatched_brackets1-1_1-strict-fail : + mismatched_brackets1-1_1.quickbook : --strict ] + [ quickbook-error-test mismatched_brackets2-1_1-strict-fail : + mismatched_brackets2-1_1.quickbook : --strict ] + [ quickbook-error-test mismatched_brackets3-1_1-strict-fail : + mismatched_brackets3-1_1.quickbook : --strict ] + [ quickbook-error-test mismatched_brackets1-1_7-strict-fail : + mismatched_brackets1-1_1.quickbook : --strict ] + [ quickbook-test newline-1_1 ] + [ quickbook-test para_test-1_5 ] + [ quickbook-error-test post_process-fail ] + [ quickbook-test preformatted-1_1 ] + [ quickbook-test preformatted-1_6 ] + [ quickbook-test role-1_6 ] + [ quickbook-test role-1_7 ] + [ quickbook-error-test role-1_7-fail ] + [ quickbook-test section-1_4 ] + [ quickbook-test section-1_5-unclosed ] + [ quickbook-test section-1_5 ] + [ quickbook-error-test section-1_5-unclosed-strict-fail : + section-1_5-unclosed : --strict ] + [ quickbook-test section-1_5-strict : + section-1_5.quickbook : : --strict ] + [ quickbook-test section-1_7 ] + [ quickbook-test simple_markup-1_5 ] + [ quickbook-test source_mode-1_7 ] + [ quickbook-test stray_close_bracket-1_1 ] + [ quickbook-error-test stray_close_bracket-1_1-strict-fail : + stray_close_bracket-1_1.quickbook : + --strict ] + [ quickbook-error-test stray_close_bracket-1_7-fail ] + [ quickbook-test svg-1_1 ] + [ quickbook-test table-1_3 ] + [ quickbook-test table-1_5 ] + [ quickbook-test table-1_6 ] + [ quickbook-test table-1_7 ] + [ quickbook-error-test template_arguments1-1_1-fail ] + [ quickbook-error-test template_arguments1-1_5-fail ] + [ quickbook-error-test template_arguments2-1_1-fail ] + [ quickbook-error-test template_arguments2-1_5-fail ] + [ quickbook-error-test template_arguments3-1_1-fail ] + [ quickbook-error-test template_arguments3-1_5-fail ] + [ quickbook-test template_section-1_5 ] + [ quickbook-error-test template_section1-1_5-fail ] + [ quickbook-error-test template_section2-1_5-fail ] + [ quickbook-error-test template_section3-1_5-fail ] + [ quickbook-test templates-1_3 ] + [ quickbook-test templates-1_4 ] + [ quickbook-test templates-1_5 ] + [ quickbook-test templates-1_6 ] + [ quickbook-error-test templates-1_6-fail1 ] + [ quickbook-test templates-1_7 ] + [ quickbook-error-test templates-1_7-fail1 ] + [ quickbook-error-test templates-1_7-fail2 ] + [ quickbook-test unicode_escape-1_5 ] + [ quickbook-test unmatched_element-1_5 ] + [ quickbook-test unmatched_element-1_6 ] + [ quickbook-error-test utf16be_bom-1_5-fail ] + [ quickbook-error-test utf16le_bom-1_5-fail ] + [ quickbook-test utf8-1_5 ] + [ quickbook-test utf8_bom-1_5 ] + [ quickbook-error-test variablelist-1_5-fail ] + [ quickbook-test variablelist-1_5 ] + [ quickbook-error-test version-0_1-fail ] + [ quickbook-error-test version-1_8-fail ] + [ quickbook-error-test version-2_0-fail ] + [ quickbook-test xml_escape-1_2 ] + [ quickbook-test xml_escape-1_5 ] + + [ quickbook-test quickbook_manual-1_4 ] + ; + +# for `b2 quick` in status +alias quick : quickbook_manual-1_4 ; +explicit quick ; diff --git a/src/boost/tools/quickbook/test/anchor-1_1.gold b/src/boost/tools/quickbook/test/anchor-1_1.gold new file mode 100644 index 000000000..e0b820971 --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_1.gold @@ -0,0 +1,145 @@ + + +
    + Anchor Test +
    + Anchors + + A paragraph containing several anchors. We + want to make sure they appear in the correct place. + + + This + heading shouldn't pick up the previous anchor + + + + This + heading should pick up the previous anchor + + + + And + this one + + + + Also + this one + + + + Finally this + + +
    +
    + <anchor id="a9"/>Section Anchor +
    + <anchor id="a10"/>Nested Section +
    + +
    +
    + <anchor id="a12"/>Conditional Section Anchor +
    +
    + Lists + + + + Item 1 + + + + + Item 2 + + + + + Nested List + + + + Nested Item 1 + + + + + Nested Item 2 + + + + + Nested Item 3 + + + + + + + + Item 3 + + + +
    +
    + Anchors in templates + + Some text. + + + Text content + +
    +
    + Anchors in syntax highlighted code +int main() {} + +
    +
    + Nested anchors + + Table with anchors + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + + + Cell 3 + + + + + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/anchor-1_1.gold-html b/src/boost/tools/quickbook/test/anchor-1_1.gold-html new file mode 100644 index 000000000..e6610d417 --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_1.gold-html @@ -0,0 +1,205 @@ + + + + +

    + Anchor Test +

    + +
    +

    + Anchors +

    +
    +

    + A paragraph containing several anchors. We + want to make sure they appear in the correct place. +

    +

    + This heading shouldn't pick up the previous anchor +

    + +

    + This heading should pick up the previous anchor +

    + +

    + And this one +

    + +

    + Also this one +

    + +

    + Finally this +

    + +
    +
    +
    +

    + Section Anchor +

    +
    + +
    +
    +

    + Nested Section +

    +
    +
    +
    +
    +
    +

    + Conditional Section Anchor +

    +
    +
    +
    +
    +

    + Lists +

    +
    + +
      +
    • +
      + Item 1 +
      +
    • +
    • +
      + Item 2 +
      +
    • +
    • +
      + Nested List +
        +
      • +
        + Nested Item 1 +
        +
      • +
      • +
        + Nested Item 2 +
        +
      • +
      • +
        + Nested Item 3 +
        +
      • +
      +
      +
    • +
    • +
      + Item 3 +
      +
    • +
    +
    +
    +
    +

    + Anchors in templates +

    +
    +

    + Some text. +

    +

    + Text content +

    +
    +
    +
    +

    + Anchors in syntax highlighted code +

    +
    +
    int main() {}
    +
    +
    +
    +
    +

    + Nested anchors +

    +
    +
    + + + + + + + + + + + + + + + + + + +
    Table with anchors
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +

    + Cell 3 +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/anchor-1_1.quickbook b/src/boost/tools/quickbook/test/anchor-1_1.quickbook new file mode 100644 index 000000000..0e8934ee0 --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_1.quickbook @@ -0,0 +1,80 @@ +[article Anchor Test] + +[section Anchors] + +[#a1] A paragraph containing several anchors. [#a2] We want to make sure +they appear in the correct place. [#a3] + +[heading This heading shouldn't pick up the previous anchor] + +[#a4] + +[heading This heading should pick up the previous anchor] + +[#a5] +[heading And this one] + +[#a6][heading Also this one] + +[#a7][h3 Finally this] + +[#a8] + +[endsect] + +[#a9] +[section Section Anchor] +[#a10][section Nested Section] +[endsect] +[/ This anchor is invalid, I'm not sure what to do with it] +[#a11] +[endsect] + +[#a12][?__not_defined__ #a13] +[section Conditional Section Anchor] +[endsect] + +[section Lists] + +[#a14] +* Item 1 +* Item 2 +* Nested List + [#a15] + * Nested Item 1 + * Nested Item 2 + * [#a16] Nested Item 3 +* Item 3 + +[endsect] + +[section Anchors in templates] + +[template anchor1[][#t1]] +[template para[] Text content] + +[anchor1] + +Some text. + +[#t2] + +[para] + +[endsect] + +[section Anchors in syntax highlighted code] + + int ``[#s1]``main() {} + +[endsect] + +[section Nested anchors] + +[table Table with anchors + [[Heading]] + [[[#table1]Cell 1]] + [[[#table2] Cell 2]] + [[Cell 3[#table3]]] +] +[endsect] diff --git a/src/boost/tools/quickbook/test/anchor-1_6.gold b/src/boost/tools/quickbook/test/anchor-1_6.gold new file mode 100644 index 000000000..5d056f2db --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_6.gold @@ -0,0 +1,151 @@ + + +
    + Anchor Test +
    + <link linkend="anchor_test.anchors">Anchors</link> + + A paragraph containing several anchors. We + want to make sure they appear in the correct place. + + + This + heading shouldn't pick up the previous anchor + + + + This + heading should pick up the previous anchor + + + + And + this one + + + + Also + this one + + + + Finally + this + + +
    +
    + <anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link> +
    + <anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested + Section</link> +
    + +
    +
    + <anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional + Section Anchor</link> +
    +
    + <link linkend="anchor_test.lists">Lists</link> + + + + Item 1 + + + + + Item 2 + + + + + Nested List + + + + Nested Item 1 + + + + + Nested Item 2 + + + + + Nested Item 3 + + + + + + + + Item 3 + + + +
    +
    + <link linkend="anchor_test.anchors_in_templates">Anchors in templates</link> + + Some text. + + + Text content + +
    +
    + <link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in + syntax highlighted code</link> +int main() {} + +
    +
    + <link linkend="anchor_test.nested_anchors">Nested anchors</link> + + Table with anchors + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + + + Cell 3 + + + + + +
    +
    +
    + <link linkend="anchor_test.anchors_with_escapes">Anchors with escapes</link> + +
    +
    diff --git a/src/boost/tools/quickbook/test/anchor-1_6.gold-html b/src/boost/tools/quickbook/test/anchor-1_6.gold-html new file mode 100644 index 000000000..001b275f5 --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_6.gold-html @@ -0,0 +1,216 @@ + + + + +

    + Anchor Test +

    + +
    +

    + Anchors +

    +
    +

    + A paragraph containing several anchors. We + want to make sure they appear in the correct place. +

    +

    + This heading shouldn't pick up the previous anchor +

    + +

    + This heading should pick up the previous anchor +

    + +

    + And this one +

    + +

    + Also this one +

    + +

    + Finally this +

    + +
    +
    +
    +

    + Section Anchor +

    +
    + +
    +
    +

    + Nested Section +

    +
    +
    +
    +
    +
    +

    + Conditional Section Anchor +

    +
    +
    +
    +
    +

    + Lists +

    +
    + +
      +
    • +
      + Item 1 +
      +
    • +
    • +
      + Item 2 +
      +
    • +
    • +
      + Nested List +
        +
      • +
        + Nested Item 1 +
        +
      • +
      • +
        + Nested Item 2 +
        +
      • +
      • +
        + Nested Item 3 +
        +
      • +
      +
      +
    • +
    • +
      + Item 3 +
      +
    • +
    +
    +
    +
    +

    + Anchors in templates +

    +
    +

    + Some text. +

    +

    + Text content +

    +
    +
    +
    +

    + Anchors in syntax highlighted code +

    +
    +
    int main() {}
    +
    +
    +
    +
    +

    + Nested anchors +

    +
    +
    + + + + + + + + + + + + + + + + + + +
    Table with anchors
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +

    + Cell 3 +

    +
    +
    +
    +
    +
    +

    + Anchors with escapes +

    +
    + +
    +
    + + diff --git a/src/boost/tools/quickbook/test/anchor-1_6.quickbook b/src/boost/tools/quickbook/test/anchor-1_6.quickbook new file mode 100644 index 000000000..8d4a7b34e --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_6.quickbook @@ -0,0 +1,88 @@ +[article Anchor Test +[quickbook 1.6] +] + +[section Anchors] + +[#a1] A paragraph containing several anchors. [#a2] We want to make sure +they appear in the correct place. [#a3] + +[heading This heading shouldn't pick up the previous anchor] + +[#a4] + +[heading This heading should pick up the previous anchor] + +[#a5] +[heading And this one] + +[#a6][heading Also this one] + +[#a7][h3 Finally this] + +[#a8] + +[endsect] + +[#a9] +[section Section Anchor] +[#a10][section Nested Section] +[endsect] +[/ This anchor is invalid, I'm not sure what to do with it] +[#a11] +[endsect] + +[#a12][?__not_defined__ #a13] +[section Conditional Section Anchor] +[endsect] + +[section Lists] + +[#a14] +* Item 1 +* Item 2 +* Nested List + [#a15] + * Nested Item 1 + * Nested Item 2 + * [#a16] Nested Item 3 +* Item 3 + +[endsect] + +[section Anchors in templates] + +[template anchor1[][#t1]] +[template para[] Text content] + +[anchor1] + +Some text. + +[#t2] + +[para] + +[endsect] + +[section Anchors in syntax highlighted code] + + int ``[#s1]``main() {} + +[endsect] + +[section Nested anchors] + +[table Table with anchors + [[Heading]] + [[[#table1]Cell 1]] + [[[#table2] Cell 2]] + [[Cell 3[#table3]]] +] +[endsect] + +[section Anchors with escapes] + +[#\[oddid\]] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/anchor-1_7.gold b/src/boost/tools/quickbook/test/anchor-1_7.gold new file mode 100644 index 000000000..71e22458d --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_7.gold @@ -0,0 +1,151 @@ + + +
    + Anchor Test +
    + <link linkend="anchor_test.anchors">Anchors</link> + + A paragraph containing several anchors. We + want to make sure they appear in the correct place. + + + This + heading shouldn't pick up the previous anchor + + + + This + heading should pick up the previous anchor + + + + And + this one + + + + Also + this one + + + + Finally + this + + +
    +
    + <anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link> +
    + <anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested + Section</link> +
    + +
    +
    + <anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional + Section Anchor</link> +
    +
    + <link linkend="anchor_test.lists">Lists</link> + + + + Item 1 + + + + + Item 2 + + + + + Nested List + + + + Nested Item 1 + + + + + Nested Item 2 + + + + + Nested Item 3 + + + + + + + + Item 3 + + + +
    +
    + <link linkend="anchor_test.anchors_in_templates">Anchors in templates</link> + + Some text. + + + Text content + +
    +
    + <link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in + syntax highlighted code</link> +int main() {} + +
    +
    + <link linkend="anchor_test.nested_anchors">Nested anchors</link> + + Table with anchors + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + + + Cell 3 + + + + + +
    +
    +
    + <link linkend="anchor_test.templates">Anchors with templates</link> + +
    +
    diff --git a/src/boost/tools/quickbook/test/anchor-1_7.gold-html b/src/boost/tools/quickbook/test/anchor-1_7.gold-html new file mode 100644 index 000000000..890eb5191 --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_7.gold-html @@ -0,0 +1,217 @@ + + + + +

    + Anchor Test +

    + +
    +

    + Anchors +

    +
    +

    + A paragraph containing several anchors. We + want to make sure they appear in the correct place. +

    +

    + This heading shouldn't pick up the previous anchor +

    + +

    + This heading should pick up the previous anchor +

    + +

    + And this one +

    + +

    + Also this one +

    + +

    + Finally this +

    + +
    +
    +
    +

    + Section Anchor +

    +
    + +
    +
    +

    + Nested Section +

    +
    +
    +
    +
    +
    +

    + Conditional Section Anchor +

    +
    +
    +
    +
    +

    + Lists +

    +
    + +
      +
    • +
      + Item 1 +
      +
    • +
    • +
      + Item 2 +
      +
    • +
    • +
      + Nested List +
        +
      • +
        + Nested Item 1 +
        +
      • +
      • +
        + Nested Item 2 +
        +
      • +
      • +
        + Nested Item 3 +
        +
      • +
      +
      +
    • +
    • +
      + Item 3 +
      +
    • +
    +
    +
    +
    +

    + Anchors in templates +

    +
    +

    + Some text. +

    +

    + Text content +

    +
    +
    +
    +

    + Anchors in syntax highlighted code +

    +
    +
    int main() {}
    +
    +
    +
    +
    +

    + Nested anchors +

    +
    +
    + + + + + + + + + + + + + + + + + + +
    Table with anchors
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +

    + Cell 3 +

    +
    +
    +
    +
    +
    +

    + Anchors with templates +

    +
    + +
    +
    + + diff --git a/src/boost/tools/quickbook/test/anchor-1_7.quickbook b/src/boost/tools/quickbook/test/anchor-1_7.quickbook new file mode 100644 index 000000000..f2b5c13db --- /dev/null +++ b/src/boost/tools/quickbook/test/anchor-1_7.quickbook @@ -0,0 +1,97 @@ +[article Anchor Test +[quickbook 1.7] +] + +[section Anchors] + +[#a1] A paragraph containing several anchors. [#a2] We want to make sure +they appear in the correct place. [#a3] + +[heading This heading shouldn't pick up the previous anchor] + +[#a4] + +[heading This heading should pick up the previous anchor] + +[#a5] +[heading And this one] + +[#a6][heading Also this one] + +[#a7][h3 Finally this] + +[#a8] + +[endsect] + +[#a9] +[section Section Anchor] +[#a10][section Nested Section] +[endsect] +[/ This anchor is invalid, I'm not sure what to do with it] +[#a11] +[endsect] + +[#a12][?__not_defined__ #a13] +[section Conditional Section Anchor] +[endsect] + +[section Lists] + +[#a14] +* Item 1 +* Item 2 +* Nested List + [#a15] + * Nested Item 1 + * Nested Item 2 + * [#a16] Nested Item 3 +* Item 3 + +[endsect] + +[section Anchors in templates] + +[template anchor1[][#t1]] +[template para[] Text content] + +[anchor1] + +Some text. + +[#t2] + +[para] + +[endsect] + +[section Anchors in syntax highlighted code] + + int ``[#s1]``main() {} + +[endsect] + +[section Nested anchors] + +[table Table with anchors + [[Heading]] + [[[#table1]Cell 1]] + [[[#table2] Cell 2]] + [[Cell 3[#table3]]] +] +[endsect] + +[section:templates Anchors with templates] + +[template a1 anchor1] +[template a2 anchor2] + +[#[a1]] +[#[a2]] + +[template anchor[name] [#x[name]y]] + +[anchor 1] +[anchor 12] + +[endsect] [/ templates] diff --git a/src/boost/tools/quickbook/test/blocks-1_5.gold b/src/boost/tools/quickbook/test/blocks-1_5.gold new file mode 100644 index 000000000..2d7370be6 --- /dev/null +++ b/src/boost/tools/quickbook/test/blocks-1_5.gold @@ -0,0 +1,111 @@ + + +
    + Various blocks + + Blockquotes + + + Here's a blockquote: + +
    + + Blockquote. + +
    + + And another: + +
    + + Blockquote first paragraph. + + + Blockquote second paragraph. + +
    + + Admonitions + + + + Warning + + + + + Caution + + + + + Important + + + + + Note + + + + + Tip + + + + + Warning first paragraph. + + + Warning second paragraph. + + + + Blurb + + + + Blurb + + + + Inline + blocks + +
    + + Blockquote containing a footnote + + Here it is! + + . + +
    + + [tipping point] + + + Multiple paragraphs because of the inline blocks. + + + + Warning + + + + This line should appear as a separate paragraph. + + + + Warning + + + + + + This should be a list item because it's preceded by block markup. + + + +
    diff --git a/src/boost/tools/quickbook/test/blocks-1_5.gold-html b/src/boost/tools/quickbook/test/blocks-1_5.gold-html new file mode 100644 index 000000000..c60436487 --- /dev/null +++ b/src/boost/tools/quickbook/test/blocks-1_5.gold-html @@ -0,0 +1,119 @@ + + + + +

    + Various blocks +

    +

    + Blockquotes +

    +

    + Here's a blockquote: +

    +
    +

    + Blockquote. +

    +
    +

    + And another: +

    +
    +

    + Blockquote first paragraph. +

    +

    + Blockquote second paragraph. +

    +
    +

    + Admonitions +

    +
    +

    + Warning +

    +
    +
    +

    + Caution +

    +
    +
    +

    + Important +

    +
    +
    +

    + Note +

    +
    +
    +

    + Tip +

    +
    +
    +

    + Warning first paragraph. +

    +

    + Warning second paragraph. +

    +
    +

    + Blurb +

    +
    +

    + Blurb +

    +
    +

    + Inline blocks +

    +
    +

    + Blockquote containing a footnote[1]. +

    +
    +

    + [tipping point] +

    +

    + Multiple paragraphs because of the inline blocks. +

    +
    +

    + Warning +

    +
    +

    + This line should appear as a separate paragraph. +

    +
    +

    + Warning +

    +
    +
      +
    • +
      + This should be a list item because it's preceded by block markup. +
      +
    • +
    +
    +
    +
    +
    +

    + [1] Here it is! +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/blocks-1_5.quickbook b/src/boost/tools/quickbook/test/blocks-1_5.quickbook new file mode 100644 index 000000000..2632a0fd6 --- /dev/null +++ b/src/boost/tools/quickbook/test/blocks-1_5.quickbook @@ -0,0 +1,46 @@ +[article Various blocks +[quickbook 1.5] +] + +[heading Blockquotes] + +Here's a blockquote: + +[:Blockquote.] + +And another: + +[: +Blockquote first paragraph. + +Blockquote second paragraph. +] + +[heading Admonitions] + +[warning Warning] +[caution Caution] +[important Important] +[note Note] +[tip Tip] + +[warning Warning first paragraph. + +Warning second paragraph.] + +[heading Blurb] + +[blurb Blurb] + +[heading Inline blocks] + +[: Blockquote containing a footnote[footnote Here it is!].] + +[/ Unfortunately footnotes currently can't contain blocks.] + +[/ Quickbook shouldn't think that this is a tip] +[tipping point] + +Multiple paragraphs because of the inline blocks. [warning Warning] This +line should appear as a separate paragraph.[warning Warning] +* This should be a list item because it's preceded by block markup. \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/callouts-1_5.gold b/src/boost/tools/quickbook/test/callouts-1_5.gold new file mode 100644 index 000000000..5b66c9933 --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts-1_5.gold @@ -0,0 +1,241 @@ + + +
    + Callout Tests + + Example 1: + + + Now we can define a function that simulates an ordinary six-sided die. + + +int roll_die() { + boost::uniform_int<> dist(1, 6); +} + + + + + + create a uniform_int distribution + + + + + Example 2: + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + + test + + + + + + Example 3: + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + + test + + + + + + Example 3 (again!): + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + + test + + + + + + Example 4: + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); + boost::uniform_int<> dist(1, 6); +} + + + + + + callout 1 + + + + + callout 2 + + + + + create a uniform_int distribution + + + + +boost::uniform_int<> dist(1, 6); + + + + + + callout 2 + + + + + create a uniform_int distribution + + + +
    + <link linkend="callout_tests.test_section">Try callouts in a section</link> + + Example 1: + + + Now we can define a function that simulates an ordinary six-sided die. + + +int roll_die() { + boost::uniform_int<> dist(1, 6); +} + + + + + + create a uniform_int distribution + + + + + Example 2: + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + + test + + + + + + Example 3: + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + + test + + + + + + Example 3 (again!): + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + + test + + + + + + Example 4: + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); + boost::uniform_int<> dist(1, 6); +} + + + + + + callout 1 + + + + + callout 2 + + + + + create a uniform_int distribution + + + + +boost::uniform_int<> dist(1, 6); + + + + + + callout 2 + + + + + create a uniform_int distribution + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/callouts-1_5.gold-html b/src/boost/tools/quickbook/test/callouts-1_5.gold-html new file mode 100644 index 000000000..17319559b --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts-1_5.gold-html @@ -0,0 +1,276 @@ + + + + +

    + Callout Tests +

    +
    +

    + Table of contents +

    + +
    +

    + Example 1: +

    +

    + Now we can define a function that simulates an ordinary six-sided die. +

    +

    +

    int roll_die() {
    +  boost::uniform_int<> dist(1, 6); (1)
    +}
    +
    +

    +
    +
    + (1) +

    + create a uniform_int distribution +

    +
    +
    +

    + Example 2: +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +

    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3: +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +

    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3 (again!): +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +

    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 4: +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +  (2)boost::uniform_int<> dist(1, 6); (3)
    +}
    +
    +

    +
    +
    + (1) +

    + callout 1 +

    +
    +
    + (2) +

    + callout 2 +

    +
    +
    + (3) +

    + create a uniform_int distribution +

    +
    +
    +

    +

    (1)boost::uniform_int<> dist(1, 6); (2)
    +
    +

    +
    +
    + (1) +

    + callout 2 +

    +
    +
    + (2) +

    + create a uniform_int distribution +

    +
    +
    +
    +

    + Try callouts in a section +

    +
    +

    + Example 1: +

    +

    + Now we can define a function that simulates an ordinary six-sided die. +

    +

    +

    int roll_die() {
    +  boost::uniform_int<> dist(1, 6); (1)
    +}
    +
    +

    +
    +
    + (1) +

    + create a uniform_int distribution +

    +
    +
    +

    + Example 2: +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +

    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3: +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +

    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3 (again!): +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +

    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 4: +

    +

    +

    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +  (2)boost::uniform_int<> dist(1, 6); (3)
    +}
    +
    +

    +
    +
    + (1) +

    + callout 1 +

    +
    +
    + (2) +

    + callout 2 +

    +
    +
    + (3) +

    + create a uniform_int distribution +

    +
    +
    +

    +

    (1)boost::uniform_int<> dist(1, 6); (2)
    +
    +

    +
    +
    + (1) +

    + callout 2 +

    +
    +
    + (2) +

    + create a uniform_int distribution +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/callouts-1_5.quickbook b/src/boost/tools/quickbook/test/callouts-1_5.quickbook new file mode 100644 index 000000000..b17e90489 --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts-1_5.quickbook @@ -0,0 +1,51 @@ +[article Callout Tests + [quickbook 1.5] +] + +[import callouts.cpp] + +Example 1: + +[example1] + +Example 2: + +[example2] + +Example 3: + +[example3] + +Example 3 (again!): + +[example3] + +Example 4: + +[example4] +[example4a] + +[section:test_section Try callouts in a section] + +Example 1: + +[example1] + +Example 2: + +[example2] + +Example 3: + +[example3] + +Example 3 (again!): + +[example3] + +Example 4: + +[example4] +[example4a] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/callouts-1_7.gold b/src/boost/tools/quickbook/test/callouts-1_7.gold new file mode 100644 index 000000000..5d2c2d154 --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts-1_7.gold @@ -0,0 +1,249 @@ + + +
    + Callout Tests + + Example 1: + + + Now we can define a function that simulates an ordinary six-sided die. + +int roll_die() { + boost::uniform_int<> dist(1, 6); +} + + + + + create a uniform_int distribution + + + + + Example 2: + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + Example 3: + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + Example 3 (again!): + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + Example 4: + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); + boost::uniform_int<> dist(1, 6); +} + + + + + callout 1 + + + + + callout 2 + + + + + create a uniform_int distribution + + + +boost::uniform_int<> dist(1, 6); + + + + + callout 2 + + + + + create a uniform_int distribution + + + +
    + <link linkend="callout_tests.test_section">Try callouts in a section</link> + + Example 1: + + + Now we can define a function that simulates an ordinary six-sided die. + +int roll_die() { + boost::uniform_int<> dist(1, 6); +} + + + + + create a uniform_int distribution + + + + + Example 2: + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + Example 3: + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + Example 3 (again!): + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + Example 4: + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); + boost::uniform_int<> dist(1, 6); +} + + + + + callout 1 + + + + + callout 2 + + + + + create a uniform_int distribution + + + +boost::uniform_int<> dist(1, 6); + + + + + callout 2 + + + + + create a uniform_int distribution + + + +
    +
    + <link linkend="callout_tests.blocks">Callouts in code blocks</link> +int roll_die() { + boost::uniform_int<> dist(1, 6); +} + + + + + create a uniform_int distribution + + + +int roll_die() { + boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist); +} + + + + + + test + + + + + + /*< This shouldn't be a callout >*/ + + Silly test +silly +
    +
    diff --git a/src/boost/tools/quickbook/test/callouts-1_7.gold-html b/src/boost/tools/quickbook/test/callouts-1_7.gold-html new file mode 100644 index 000000000..4ca439bb2 --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts-1_7.gold-html @@ -0,0 +1,302 @@ + + + + +

    + Callout Tests +

    +
    +

    + Table of contents +

    + +
    +

    + Example 1: +

    +

    + Now we can define a function that simulates an ordinary six-sided die. +

    +
    int roll_die() {
    +  boost::uniform_int<> dist(1, 6); (1)
    +}
    +
    +
    +
    + (1) +

    + create a uniform_int distribution +

    +
    +
    +

    + Example 2: +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3: +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3 (again!): +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 4: +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +  (2)boost::uniform_int<> dist(1, 6); (3)
    +}
    +
    +
    +
    + (1) +

    + callout 1 +

    +
    +
    + (2) +

    + callout 2 +

    +
    +
    + (3) +

    + create a uniform_int distribution +

    +
    +
    +
    (1)boost::uniform_int<> dist(1, 6); (2)
    +
    +
    +
    + (1) +

    + callout 2 +

    +
    +
    + (2) +

    + create a uniform_int distribution +

    +
    +
    +
    +

    + Try callouts in a section +

    +
    +

    + Example 1: +

    +

    + Now we can define a function that simulates an ordinary six-sided die. +

    +
    int roll_die() {
    +  boost::uniform_int<> dist(1, 6); (1)
    +}
    +
    +
    +
    + (1) +

    + create a uniform_int distribution +

    +
    +
    +

    + Example 2: +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3: +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 3 (again!): +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + Example 4: +

    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +  (2)boost::uniform_int<> dist(1, 6); (3)
    +}
    +
    +
    +
    + (1) +

    + callout 1 +

    +
    +
    + (2) +

    + callout 2 +

    +
    +
    + (3) +

    + create a uniform_int distribution +

    +
    +
    +
    (1)boost::uniform_int<> dist(1, 6); (2)
    +
    +
    +
    + (1) +

    + callout 2 +

    +
    +
    + (2) +

    + create a uniform_int distribution +

    +
    +
    +
    +
    +
    +

    + Callouts in code blocks +

    +
    +
    int roll_die() {
    +  boost::uniform_int<> dist(1, 6); (1)
    +}
    +
    +
    +
    + (1) +

    + create a uniform_int distribution +

    +
    +
    +
    int roll_die() {
    +  (1)boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
    +}
    +
    +
    +
    + (1) +
    +

    + test +

    +
    +
    +
    +

    + /*< This shouldn't be a callout >*/ +

    +

    + Silly test(1) +

    +
    +
    + (1) +

    + silly +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/callouts-1_7.quickbook b/src/boost/tools/quickbook/test/callouts-1_7.quickbook new file mode 100644 index 000000000..5361ba900 --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts-1_7.quickbook @@ -0,0 +1,73 @@ +[article Callout Tests + [quickbook 1.7] +] + +[import callouts.cpp] + +Example 1: + +[example1] + +Example 2: + +[example2] + +Example 3: + +[example3] + +Example 3 (again!): + +[example3] + +Example 4: + +[example4] +[example4a] + +[section:test_section Try callouts in a section] + +Example 1: + +[example1] + +Example 2: + +[example2] + +Example 3: + +[example3] + +Example 3 (again!): + +[example3] + +Example 4: + +[example4] +[example4a] + +[endsect] + +[section:blocks Callouts in code blocks] + + int roll_die() { + boost::uniform_int<> dist(1, 6); /*< create a uniform_int distribution >*/ + } + +``` +int roll_die() { + /*<< [important test] >>*/ + boost::variate_generator > die(gen, dist); +} +``` + +`/*< This shouldn't be a callout >*/` + +[block''' +Silly test +silly +'''] + +[endsect] diff --git a/src/boost/tools/quickbook/test/callouts.cpp b/src/boost/tools/quickbook/test/callouts.cpp new file mode 100644 index 000000000..8506a93f1 --- /dev/null +++ b/src/boost/tools/quickbook/test/callouts.cpp @@ -0,0 +1,52 @@ + +// Copyright 2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or move at http://www.boost.org/LICENSE_1_0.txt) + +// clang-format off + +/*< This shouldn't be used. >*/ + +//[ example1 + +/*` + Now we can define a function that simulates an ordinary + six-sided die. +*/ +int roll_die() { + boost::uniform_int<> dist(1, 6); /*< create a uniform_int distribution >*/ +} + +//] + +//[ example2 + +int roll_die() { + /*<< [important test] >>*/ + boost::variate_generator > die(gen, dist); +} + +//] + +//[ example3 + +int roll_die() { + /*<< [important test] + >>*/ + boost::variate_generator > die(gen, dist); +} + +//] + +//[ example4 + +int roll_die() { + /*<< callout 1 >>*/ + boost::variate_generator > die(gen, dist); +//[ example4a + /*<< callout 2 >>*/ + boost::uniform_int<> dist(1, 6); /*< create a uniform_int distribution >*/ +//] +} + +//] diff --git a/src/boost/tools/quickbook/test/code-1_1.gold b/src/boost/tools/quickbook/test/code-1_1.gold new file mode 100644 index 000000000..d7382593b --- /dev/null +++ b/src/boost/tools/quickbook/test/code-1_1.gold @@ -0,0 +1,52 @@ + + +
    + Code Block +
    + Test 1 + + A code block with proper indentation ;-) + +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} + +
    +
    + Test 2 + + A code block with proper indentation ;-) + + +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} + + +
    +
    + Test 3 + +print "\xfabln\xeck" + + +
    +
    + Test 4 + + This isn't valid C++ but I think we should accept it; + + +std::cout<<"\xfabln\xeck"<<"\n"; + + +
    +
    diff --git a/src/boost/tools/quickbook/test/code-1_1.gold-html b/src/boost/tools/quickbook/test/code-1_1.gold-html new file mode 100644 index 000000000..3c676ecc2 --- /dev/null +++ b/src/boost/tools/quickbook/test/code-1_1.gold-html @@ -0,0 +1,91 @@ + + + + +

    + Code Block +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Test 1 +

    +
    +

    + A code block with proper indentation ;-) +

    +
    #include <iostream>
    +
    +int main()
    +{
    +    std::cout << "Hello, World!" << std::endl;
    +    return 0;
    +}
    +
    +
    +
    +
    +

    + Test 2 +

    +
    +

    + A code block with proper indentation ;-) +

    +

    +

    #include <iostream>
    +
    +int main()
    +{
    +    std::cout << "Hello, World!" << std::endl;
    +    return 0;
    +}
    +
    +

    +
    +
    +
    +

    + Test 3 +

    +
    +

    +

    print "\xfabln\xeck"
    +
    +

    +
    +
    +
    +

    + Test 4 +

    +
    +

    + This isn't valid C++ but I think we should accept it; +

    +

    +

    std::cout<<"\xfabln\xeck"<<"\n";
    +
    +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/code-1_1.quickbook b/src/boost/tools/quickbook/test/code-1_1.quickbook new file mode 100644 index 000000000..8c800911a --- /dev/null +++ b/src/boost/tools/quickbook/test/code-1_1.quickbook @@ -0,0 +1,51 @@ +[article Code Block] + +[section Test 1] + +A code block with proper indentation ;-) + + #include + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } + +[endsect] + +[section Test 2] + +A code block with proper indentation ;-) + +`` + #include + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } +`` + +[endsect] + +[section Test 3] + +[python] +`` + print "\xfabln\xeck" +`` + +[endsect] + +[section Test 4] + +This isn't valid C++ but I think we should accept it; + +[c++] +`` + std::cout<<"\xfabln\xeck"<<"\n"; +`` + +[endsect] diff --git a/src/boost/tools/quickbook/test/code-1_5.gold b/src/boost/tools/quickbook/test/code-1_5.gold new file mode 100644 index 000000000..8ca228126 --- /dev/null +++ b/src/boost/tools/quickbook/test/code-1_5.gold @@ -0,0 +1,37 @@ + + +
    + Indented code blocks + + In a paragraph. Still in a paragraph. + +In a code block. + + + Back in a paragraph. + + Code block line 1. +Code block line 2. + Code block line 3. + + + Paragraph. + +Code block with no trailing blank lines. + + + Paragraph. + + + Code + blocks separated by comment + +First code block. + +Second code block. +[/ Comment in second code block] +Still second code block. +[/ Comment trailing second code block] + +
    diff --git a/src/boost/tools/quickbook/test/code-1_5.gold-html b/src/boost/tools/quickbook/test/code-1_5.gold-html new file mode 100644 index 000000000..02164d1b9 --- /dev/null +++ b/src/boost/tools/quickbook/test/code-1_5.gold-html @@ -0,0 +1,39 @@ + + + + +

    + Indented code blocks +

    +

    + In a paragraph. Still in a paragraph. +

    +
    In a code block.
    +
    +

    + Back in a paragraph. +

    +
       Code block line 1.
    +Code block line 2.
    +       Code block line 3.
    +
    +

    + Paragraph. +

    +
    Code block with no trailing blank lines.
    +
    +

    + Paragraph. +

    +

    + Code blocks separated by comment +

    +
    First code block.
    +
    +
    Second code block.
    +[/ Comment in second code block]
    +Still second code block.
    +[/ Comment trailing second code block]
    +
    + + diff --git a/src/boost/tools/quickbook/test/code-1_5.quickbook b/src/boost/tools/quickbook/test/code-1_5.quickbook new file mode 100644 index 000000000..de377a64f --- /dev/null +++ b/src/boost/tools/quickbook/test/code-1_5.quickbook @@ -0,0 +1,29 @@ +[article Indented code blocks + [quickbook 1.5] + [source-mode teletype] +] + +In a paragraph. + Still in a paragraph. + + In a code block. + +Back in a paragraph. + + Code block line 1. + Code block line 2. + Code block line 3. + +Paragraph. + + Code block with no trailing blank lines. +Paragraph. + +[heading Code blocks separated by comment] + + First code block. +[/ Comment] + Second code block. + [/ Comment in second code block] + Still second code block. + [/ Comment trailing second code block] diff --git a/src/boost/tools/quickbook/test/code_cpp-1_5.gold b/src/boost/tools/quickbook/test/code_cpp-1_5.gold new file mode 100644 index 000000000..d0bc79a3f --- /dev/null +++ b/src/boost/tools/quickbook/test/code_cpp-1_5.gold @@ -0,0 +1,40 @@ + + +
    + C++ Code Blocks +#include <some_header> + #include "another_header.hpp" +# define A_MACRO value +#define stringize(hello) #hello +// No escape +/* No escape */ +/* No escape + * with newlines + */ +// In Header: <boost/optional/optional.hpp> +/* In Header: <boost/optional/optional.hpp> */ +/* Multiple escapes: italic + * underlinebold + */ +/* Token pasting: */ a##b + + + A badly formed comment: + +/* Oh dear + + + A badly formed comment with an escape: + +/* Oh dear bold + + + Just some code: + +int main() { + constexpr char32_t x = 'a'; + const auto y = x - ' '; +} + +
    diff --git a/src/boost/tools/quickbook/test/code_cpp-1_5.gold-html b/src/boost/tools/quickbook/test/code_cpp-1_5.gold-html new file mode 100644 index 000000000..9fd45cd28 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_cpp-1_5.gold-html @@ -0,0 +1,43 @@ + + + + +

    + C++ Code Blocks +

    +
    #include <some_header>
    +    #include "another_header.hpp"
    +#   define A_MACRO value
    +#define stringize(hello) #hello
    +// No escape
    +/* No escape */
    +/* No escape
    + * with newlines
    + */
    +// In Header: <boost/optional/optional.hpp>
    +/* In Header: <boost/optional/optional.hpp> */
    +/* Multiple escapes: italic
    + * underlinebold
    + */
    +/* Token pasting: */ a##b
    +
    +

    + A badly formed comment: +

    +
    /* Oh dear
    +
    +

    + A badly formed comment with an escape: +

    +
    /* Oh dear bold
    +
    +

    + Just some code: +

    +
    int main() {
    +    constexpr char32_t x = 'a';
    +    const auto y = x - ' ';
    +}
    +
    + + diff --git a/src/boost/tools/quickbook/test/code_cpp-1_5.quickbook b/src/boost/tools/quickbook/test/code_cpp-1_5.quickbook new file mode 100644 index 000000000..fdaa926bb --- /dev/null +++ b/src/boost/tools/quickbook/test/code_cpp-1_5.quickbook @@ -0,0 +1,34 @@ +[article C++ Code Blocks +[quickbook 1.5] +] + + #include + #include "another_header.hpp" + # define A_MACRO value + #define stringize(hello) #hello + // No escape + /* No escape */ + /* No escape + * with newlines + */ + // In Header: <``[@boost:/boost/optional/optional.hpp boost/optional/optional.hpp]``> + /* In Header: <``[@boost:/boost/optional/optional.hpp boost/optional/optional.hpp]``> */ + /* Multiple escapes: ``/italic/`` + * ``_underline_````*bold*`` + */ + /* Token pasting: */ a##b + +A badly formed comment: + + /* Oh dear + +A badly formed comment with an escape: + + /* Oh dear ``*bold*`` + +Just some code: + + int main() { + constexpr char32_t x = 'a'; + const auto y = x - ' '; + } diff --git a/src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook b/src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook new file mode 100644 index 000000000..d5d332c17 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook @@ -0,0 +1,5 @@ +[article Odd code markup. [quickbook 1.4] ] + +[c++] + + `` int main() {} diff --git a/src/boost/tools/quickbook/test/code_python-1_5.gold b/src/boost/tools/quickbook/test/code_python-1_5.gold new file mode 100644 index 000000000..239d1470a --- /dev/null +++ b/src/boost/tools/quickbook/test/code_python-1_5.gold @@ -0,0 +1,10 @@ + + +
    + Python Code Blocks +# No escape +# Escape: bold +# Escape: underlineitalic + +
    diff --git a/src/boost/tools/quickbook/test/code_python-1_5.gold-html b/src/boost/tools/quickbook/test/code_python-1_5.gold-html new file mode 100644 index 000000000..15a7739b1 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_python-1_5.gold-html @@ -0,0 +1,13 @@ + + + + +

    + Python Code Blocks +

    +
    # No escape
    +# Escape: bold
    +# Escape: underlineitalic
    +
    + + diff --git a/src/boost/tools/quickbook/test/code_python-1_5.quickbook b/src/boost/tools/quickbook/test/code_python-1_5.quickbook new file mode 100644 index 000000000..45e700ecb --- /dev/null +++ b/src/boost/tools/quickbook/test/code_python-1_5.quickbook @@ -0,0 +1,8 @@ +[article Python Code Blocks +[quickbook 1.5] +[source-mode python] +] + + # No escape + # Escape: ``*bold*`` + # Escape: ``_underline_````/italic/`` diff --git a/src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook b/src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook new file mode 100644 index 000000000..e93cf13f1 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook @@ -0,0 +1,5 @@ +[article Odd code markup. [quickbook 1.4] ] + +[python] + + print "Hello World." `` diff --git a/src/boost/tools/quickbook/test/code_snippet-1_1.gold b/src/boost/tools/quickbook/test/code_snippet-1_1.gold new file mode 100644 index 000000000..1badf4bab --- /dev/null +++ b/src/boost/tools/quickbook/test/code_snippet-1_1.gold @@ -0,0 +1,22 @@ + + +
    + Code Snippets +
    + A code snippet + + Code snippets inlined in text, as in namespace + quickbook { + static const + int value + = 0; + }, should be properly formatted and + not glued to the surrounding text. + + + There shoud be no spacees around (this), + and spaces around this code. + +
    +
    diff --git a/src/boost/tools/quickbook/test/code_snippet-1_1.gold-html b/src/boost/tools/quickbook/test/code_snippet-1_1.gold-html new file mode 100644 index 000000000..a3738bf37 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_snippet-1_1.gold-html @@ -0,0 +1,39 @@ + + + + +

    + Code Snippets +

    +
    +

    + Table of contents +

    + +
    +
    +

    + A code snippet +

    +
    +

    + Code snippets inlined in text, as in namespace + quickbook { + static const + int value + = 0; + }, should be properly formatted and + not glued to the surrounding text. +

    +

    + There shoud be no spacees around (this), + and spaces around this code. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/code_snippet-1_1.quickbook b/src/boost/tools/quickbook/test/code_snippet-1_1.quickbook new file mode 100644 index 000000000..875162708 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_snippet-1_1.quickbook @@ -0,0 +1,12 @@ +[article Code Snippets +] + +[section A code snippet] + +Code snippets inlined in text, as in `namespace quickbook { static const int +value = 0; }`, should be properly formatted and not glued to the surrounding +text. + +There shoud be no spacees around (`this`), and spaces around `this` code. + +[endsect] diff --git a/src/boost/tools/quickbook/test/code_teletype-1_5.gold b/src/boost/tools/quickbook/test/code_teletype-1_5.gold new file mode 100644 index 000000000..e36fb11bb --- /dev/null +++ b/src/boost/tools/quickbook/test/code_teletype-1_5.gold @@ -0,0 +1,12 @@ + + +
    + Code Block Teletype 1 +
    + <link linkend="code_block_teletype_1.a_code_block">A code block</link> +Just some plain text. +With some quickbook thrown in? + +
    +
    diff --git a/src/boost/tools/quickbook/test/code_teletype-1_5.gold-html b/src/boost/tools/quickbook/test/code_teletype-1_5.gold-html new file mode 100644 index 000000000..a038a4b6c --- /dev/null +++ b/src/boost/tools/quickbook/test/code_teletype-1_5.gold-html @@ -0,0 +1,29 @@ + + + + +

    + Code Block Teletype 1 +

    +
    +

    + Table of contents +

    + +
    +
    +

    + A code block +

    +
    +
    Just some plain text.
    +With some quickbook thrown in?
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/code_teletype-1_5.quickbook b/src/boost/tools/quickbook/test/code_teletype-1_5.quickbook new file mode 100644 index 000000000..841de3e54 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_teletype-1_5.quickbook @@ -0,0 +1,13 @@ +[article Code Block Teletype 1 + [quickbook 1.5] + [source-mode teletype] +] + +[section A code block] + +[def __text__ text] + + Just some plain __text__. + ``With some *quickbook* thrown in?`` + +[endsect] diff --git a/src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook b/src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook new file mode 100644 index 000000000..f02887c44 --- /dev/null +++ b/src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook @@ -0,0 +1,4 @@ +[article Odd code markup. [quickbook 1.6] ] + +`` +int main() {} diff --git a/src/boost/tools/quickbook/test/command-line/Jamfile.v2 b/src/boost/tools/quickbook/test/command-line/Jamfile.v2 new file mode 100644 index 000000000..9e838e0a4 --- /dev/null +++ b/src/boost/tools/quickbook/test/command-line/Jamfile.v2 @@ -0,0 +1,28 @@ + +# +# Copyright (c) 2011 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/tests/command-line ; + +import quickbook-testing : quickbook-test quickbook-fail-test quickbook-error-test ; + +test-suite command-line.test : + # Check that expect-errors works as advertised. + [ quickbook-fail-test error-fail : : --expect-errors ] + [ quickbook-error-test error1 ] + [ quickbook-error-test error2 ] + + [ quickbook-error-test + non_existent_output : + basic-1_6.quickbook : + --output-file=non-existent/basic.xml ] + [ quickbook-error-test + output_nested_in_file : + basic-1_6.quickbook : + --output-file=basic-1_6.quickbook/basic.xml ] + ; diff --git a/src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook b/src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook new file mode 100644 index 000000000..fa8c8a693 --- /dev/null +++ b/src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook @@ -0,0 +1,5 @@ +[article Basic quickbook file +[quickbook 1.5] +] + +Just used for running command line tests. \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/command-line/error-fail.quickbook b/src/boost/tools/quickbook/test/command-line/error-fail.quickbook new file mode 100644 index 000000000..835f01ad5 --- /dev/null +++ b/src/boost/tools/quickbook/test/command-line/error-fail.quickbook @@ -0,0 +1,5 @@ +[article Valid file to just that expect errors fails +[quickbook 1.5] +] + +No errors. \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/command-line/error1.quickbook b/src/boost/tools/quickbook/test/command-line/error1.quickbook new file mode 100644 index 000000000..5f76a444e --- /dev/null +++ b/src/boost/tools/quickbook/test/command-line/error1.quickbook @@ -0,0 +1,3 @@ +[article A file with an error in the docinfo +[quickbook 0.8] +] diff --git a/src/boost/tools/quickbook/test/command-line/error2.quickbook b/src/boost/tools/quickbook/test/command-line/error2.quickbook new file mode 100644 index 000000000..2eea16285 --- /dev/null +++ b/src/boost/tools/quickbook/test/command-line/error2.quickbook @@ -0,0 +1,7 @@ +[article A file with an error in the body +[quickbook 1.5] +] + +[table +[x] +] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/command_line_macro-1_1.gold b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold new file mode 100644 index 000000000..423b5cbba --- /dev/null +++ b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold @@ -0,0 +1,12 @@ + + +
    + Command Line Macro + + bold + + + empty is defined + +
    diff --git a/src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html new file mode 100644 index 000000000..7e90fe4dd --- /dev/null +++ b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html @@ -0,0 +1,15 @@ + + + + +

    + Command Line Macro +

    +

    + bold +

    +

    + empty is defined +

    + + diff --git a/src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook b/src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook new file mode 100644 index 000000000..5b19fc006 --- /dev/null +++ b/src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook @@ -0,0 +1,10 @@ +[article Command Line Macro +] + +[/ This test relies on __macro__ being defined at the command line.] + +__macro__ + +__empty__ + +[?__empty__ empty is defined] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_5.gold b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold new file mode 100644 index 000000000..95a1d35d7 --- /dev/null +++ b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold @@ -0,0 +1,15 @@ + + +
    + Coniditional Phrase Test + + This should show + + + The should be no space inserted. + + + Bold text + +
    diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html new file mode 100644 index 000000000..c9256b0cb --- /dev/null +++ b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html @@ -0,0 +1,18 @@ + + + + +

    + Coniditional Phrase Test +

    +

    + This should show +

    +

    + The should be no space inserted. +

    +

    + Bold text +

    + + diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook b/src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook new file mode 100644 index 000000000..e158a251b --- /dev/null +++ b/src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook @@ -0,0 +1,12 @@ +[article Coniditional Phrase Test + [quickbook 1.5] +] + +[def __defined__] + +[? __defined__ This should show] +[? __undefined__ This should not show] + +The should be no sp[?__undefined__ just some junk]ace inserted. + +[? __defined__ [*Bold text]] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_7.gold b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold new file mode 100644 index 000000000..34ba8a0bd --- /dev/null +++ b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold @@ -0,0 +1,21 @@ + + +
    + Coniditional Phrase Test + + This should show + + + But this should show + + + Weird macro is defined + + + The should be no space inserted. + + + Bold text + +
    diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html new file mode 100644 index 000000000..6c0117935 --- /dev/null +++ b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html @@ -0,0 +1,24 @@ + + + + +

    + Coniditional Phrase Test +

    +

    + This should show +

    +

    + But this should show +

    +

    + Weird macro is defined +

    +

    + The should be no space inserted. +

    +

    + Bold text +

    + + diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook b/src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook new file mode 100644 index 000000000..ebf356bf0 --- /dev/null +++ b/src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook @@ -0,0 +1,20 @@ +[article Coniditional Phrase Test + [quickbook 1.7] +] + +[def __defined__] + +[? __defined__ This should show] +[? __undefined__ This should not show] + +[?! __defined__ This should also not show] +[?! __undefined__ But this should show] + +[? ! __undefined__ This shouldn't show] + +[def !weird_macro!] +[? !weird_macro! Weird macro is defined] + +The should be no sp[?__undefined__ just some junk]ace inserted. + +[? __defined__ [*Bold text]] diff --git a/src/boost/tools/quickbook/test/doc-info/Jamfile.v2 b/src/boost/tools/quickbook/test/doc-info/Jamfile.v2 new file mode 100644 index 000000000..a35229c09 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/Jamfile.v2 @@ -0,0 +1,38 @@ +# +# Copyright (c) 2005 João Abecasis +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/tests/doc-info ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +test-suite quickbook.test : + [ quickbook-test escape-1.6 ] + [ quickbook-test encode-1.5 ] + [ quickbook-test author1 ] + [ quickbook-test author2 ] + [ quickbook-test empty-attributes ] + [ quickbook-test escaped_attributes1-1_7 ] + [ quickbook-test escaped_attributes2-1_7 ] + [ quickbook-test duplicates-1.1 ] + [ quickbook-test duplicates-1.5 ] + [ quickbook-test macros1-1_5 ] + [ quickbook-test macros1-1_6 ] + [ quickbook-test source-mode-1.4 ] + [ quickbook-test source-mode-1.5 ] + [ quickbook-test source-mode-1.6 ] + [ quickbook-test copyright1 ] + [ quickbook-error-test copyright-fail1 ] + [ quickbook-error-test copyright-fail2 ] + [ quickbook-test id1-1.5 ] + [ quickbook-test title_trailing_space-1_1 ] + [ quickbook-test title_trailing_space-1_6 ] + [ quickbook-test empty_title-1_1 ] + [ quickbook-test empty_title-1_5 ] + [ quickbook-test empty_title-1_6 ] + [ quickbook-error-test missing_doc_info-1_6-fail ] + ; diff --git a/src/boost/tools/quickbook/test/doc-info/author1.gold b/src/boost/tools/quickbook/test/doc-info/author1.gold new file mode 100644 index 000000000..613fa83ef --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/author1.gold @@ -0,0 +1,13 @@ + + + + Document Information 4 + + + + Joe Blow + + + + diff --git a/src/boost/tools/quickbook/test/doc-info/author1.gold-html b/src/boost/tools/quickbook/test/doc-info/author1.gold-html new file mode 100644 index 000000000..9d39657f3 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/author1.gold-html @@ -0,0 +1,14 @@ + + + + +

    + Document Information 4 +

    +
    +

    + Joe Blow +

    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/author1.quickbook b/src/boost/tools/quickbook/test/doc-info/author1.quickbook new file mode 100644 index 000000000..4505b4091 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/author1.quickbook @@ -0,0 +1,5 @@ +[appendix Document Information 4 +[quickbook 1.5] +[authors [Blow, Joe]] +] +[/ Some comment] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/author2.gold b/src/boost/tools/quickbook/test/doc-info/author2.gold new file mode 100644 index 000000000..766d8f68b --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/author2.gold @@ -0,0 +1,19 @@ + + + + Document Information 4 + + + + Joe Blow + + + Jane Doe + + + John Coe + + + + diff --git a/src/boost/tools/quickbook/test/doc-info/author2.gold-html b/src/boost/tools/quickbook/test/doc-info/author2.gold-html new file mode 100644 index 000000000..59b9b7e5c --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/author2.gold-html @@ -0,0 +1,20 @@ + + + + +

    + Document Information 4 +

    +
    +

    + Joe Blow +

    +

    + Jane Doe +

    +

    + John Coe +

    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/author2.quickbook b/src/boost/tools/quickbook/test/doc-info/author2.quickbook new file mode 100644 index 000000000..c4737e0ac --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/author2.quickbook @@ -0,0 +1,4 @@ +[chapter Document Information 4 +[quickbook 1.5] +[authors [Blow, Joe], [Doe, Jane] [Coe, John]] +] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook b/src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook new file mode 100644 index 000000000..20738cb91 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook @@ -0,0 +1,4 @@ +[article Invalid copyright years +[quickbook 1.5] +[copyright 2010-2001 Timequake man] +] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook b/src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook new file mode 100644 index 000000000..607c3a789 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook @@ -0,0 +1,6 @@ +[article Invalid copyright +[quickbook 1.5] +[copyright No year] +] + +Maybe this should pass? \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/copyright1.gold b/src/boost/tools/quickbook/test/doc-info/copyright1.gold new file mode 100644 index 000000000..3c6d40668 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/copyright1.gold @@ -0,0 +1,17 @@ + + + diff --git a/src/boost/tools/quickbook/test/doc-info/copyright1.gold-html b/src/boost/tools/quickbook/test/doc-info/copyright1.gold-html new file mode 100644 index 000000000..61b05b472 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/copyright1.gold-html @@ -0,0 +1,18 @@ + + + + +

    + Copyright Test +

    + + + + + diff --git a/src/boost/tools/quickbook/test/doc-info/copyright1.quickbook b/src/boost/tools/quickbook/test/doc-info/copyright1.quickbook new file mode 100644 index 000000000..4dff125fe --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/copyright1.quickbook @@ -0,0 +1,5 @@ +[article Copyright Test +[quickbook 1.5] +[copyright 1963-1965 Jane Doe, 2018 Joe Blow, John Coe] +[copyright 1977,1985 Someone else] +] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold new file mode 100644 index 000000000..7ff1fa4b9 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold @@ -0,0 +1,35 @@ + + + + + + + Joe Blow + + + Jane Doe + + + + 2018 Joe Blow + + + 1963 Jane Doe + + + + Public Domain + + + + Another Duplicate + + + + Duplicates 1.1 2 + + Content + + diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html new file mode 100644 index 000000000..cd1eb53d6 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html @@ -0,0 +1,31 @@ + + + + +

    + Duplicates 1.1 2 +

    +
    +

    + Joe Blow +

    +

    + Jane Doe +

    +
    + + +
    +

    + Public Domain +

    +
    +

    + Content +

    + + diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook new file mode 100644 index 000000000..d5daa2158 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook @@ -0,0 +1,23 @@ +[library Duplicates 1.1 + +[id thing1] +[id thing2] +[dirname thing1] +[dirname thing2] +[last-revision Yesterday] +[last-revision Tomorrow] +[purpose Test Duplicates] +[purpose Another Duplicate] +[category Category 1] +[category Category 2] +[version 1] +[version 2] +[authors [Blow, Joe]] +[authors [Doe, Jane]] +[copyright 2018 Joe Blow] +[copyright 1963 Jane Doe] +[license Some license] +[license Public Domain] +] + +Content \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold new file mode 100644 index 000000000..71a58a8d1 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold @@ -0,0 +1,32 @@ + + +
    + Duplicates 1.5 2 + + + + Joe Blow + + + Jane Doe + + + + 2018 Joe Blow + + + 1963 Jane Doe + + + + Public Domain + + + + Another Duplicate + + http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook + 0-937383-18-X + +
    diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html new file mode 100644 index 000000000..1c448e7f2 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html @@ -0,0 +1,28 @@ + + + + +

    + Duplicates 1.5 2 +

    +
    +

    + Joe Blow +

    +

    + Jane Doe +

    +
    + + +
    +

    + Public Domain +

    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook new file mode 100644 index 000000000..ed8f5da22 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook @@ -0,0 +1,27 @@ +[article Duplicates 1.5 +[quickbook 1.5] +[quickbook 1.5] + +[id thing1] +[id thing2] +[dirname thing1] +[dirname thing2] +[last-revision Yesterday] +[last-revision Tomorrow] +[purpose Test Duplicates] +[purpose Another Duplicate] +[category Category 1] +[category Category 2] +[lang en] +[lang de] +[version 1] +[version 2] +[authors [Blow, Joe]] +[authors [Doe, Jane]] +[copyright 2018 Joe Blow] +[copyright 1963 Jane Doe] +[license Some license] +[license Public Domain] +[biblioid uri http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook] +[biblioid isbn 0-937383-18-X] +] diff --git a/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold new file mode 100644 index 000000000..a7f05f756 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold @@ -0,0 +1,19 @@ + + + + + + + + + + + 2011 + + + Empty Attributes + + biblioid and source-mode can't be empty. + + diff --git a/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html new file mode 100644 index 000000000..07d23c0b3 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html @@ -0,0 +1,19 @@ + + + + +

    + Empty Attributes +

    +
    +

    +

    +
    + +

    + biblioid and source-mode can't be empty. +

    + + diff --git a/src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook b/src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook new file mode 100644 index 000000000..a31dc7199 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook @@ -0,0 +1,16 @@ +[library Empty Attributes +[version] +[id] +[dirname] +[copyright] +[copyright 2011] +[purpose] +[category] +[authors] +[authors [,]] +[license] +[last-revision] +[lang] +] + +=biblioid= and =source-mode= can't be empty. diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold new file mode 100644 index 000000000..01bc60673 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold @@ -0,0 +1,10 @@ + + +
    +
    + Test + + Hello + +
    +
    diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html new file mode 100644 index 000000000..359cf1546 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html @@ -0,0 +1,26 @@ + + + + +
    +

    + Table of contents +

    + +
    +
    +

    + Test +

    +
    +

    + Hello +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook new file mode 100644 index 000000000..45769a983 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook @@ -0,0 +1,8 @@ +[article +] + +[section Test] + +Hello + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold new file mode 100644 index 000000000..034482798 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold @@ -0,0 +1,10 @@ + + +
    +
    + <link linkend=".test">Test</link> + + Hello + +
    +
    diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html new file mode 100644 index 000000000..359cf1546 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html @@ -0,0 +1,26 @@ + + + + +
    +

    + Table of contents +

    + +
    +
    +

    + Test +

    +
    +

    + Hello +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook new file mode 100644 index 000000000..99cbf6b79 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook @@ -0,0 +1,7 @@ +[article +[quickbook 1.5] +] + +[section Test] +Hello +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold new file mode 100644 index 000000000..1dce22ef0 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold @@ -0,0 +1,4 @@ + + +
    +
    diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html new file mode 100644 index 000000000..ce2d4462e --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook new file mode 100644 index 000000000..bf310afd3 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook @@ -0,0 +1 @@ +[quickbook 1.6][article] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold new file mode 100644 index 000000000..83870c7c9 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold @@ -0,0 +1,26 @@ + + + + + + + Matti Meikäläinen + + + Pero Perić + + + + 2010 Meðal-Jón and Jóna Jónsdóttir + + + Inline code test: 1 + 2 + + + http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook + 0-937383-18-X + + Karel Vomáčka and Tomáš Martiník + diff --git a/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html new file mode 100644 index 000000000..62ce95f86 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html @@ -0,0 +1,20 @@ + + + + +

    + Karel Vomáčka and Tomáš Martiník +

    +
    +

    + Matti Meikäläinen +

    +

    + Pero Perić +

    +
    + + + diff --git a/src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook new file mode 100644 index 000000000..c1928c6a8 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook @@ -0,0 +1,14 @@ +[library Karel Vomáčka and Tomáš Martiník +[quickbook 1.5] +[authors [Meikäläinen, Matti],[Perić, Pero]] +[copyright 2010 Meðal-Jón and Jóna Jónsdóttir] +[source-mode teletype] +[purpose Inline code test: `1 + 2`] +[category tests] +[category irrelevance] +[/ [category commented out] ] +[biblioid uri http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook] +[biblioid isbn 0-937383-18-X] +] + +[/ Some comment] diff --git a/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold new file mode 100644 index 000000000..630398679 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold @@ -0,0 +1,24 @@ + + +
    + Karel Vomáčka and Tomáš Martiník + + + + Matti Meikäläinen + + + Pero Perić + + + + 2010 Meðal-Jón and Jóna Jónsdóttir + + + Inline code test: 1 + 2 + + + http://www.boost.org/tools/quickbook/test/doc-info-1.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html new file mode 100644 index 000000000..62ce95f86 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html @@ -0,0 +1,20 @@ + + + + +

    + Karel Vomáčka and Tomáš Martiník +

    +
    +

    + Matti Meikäläinen +

    +

    + Pero Perić +

    +
    + + + diff --git a/src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook b/src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook new file mode 100644 index 000000000..7ae3e7003 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook @@ -0,0 +1,12 @@ +[article Karel Vom\u00E1\u010Dka and Tom\u00E1\u0161 Martin\u00EDk +[quickbook 1.6] +[authors [Meik\u00E4l\u00E4inen, Matti][Peri\u0107, Pero]] +[copyright 2010 Me\u00F0al-J\u00F3n and J\u00F3na J\u00F3nsd\u00F3ttir] +[source-mode teletype] +[purpose Inline code test: `1 + 2`] +[category tests] +[category irrelevance] +[/ [category commented out] ] +[biblioid uri http://www.boost.org/tools/quickbook/test/doc-info-1.quickbook] +[lang en] +] diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold new file mode 100644 index 000000000..b6425d910 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold @@ -0,0 +1,16 @@ + + + + + + 1325 John Doe + + + John + Doe + john.doe@example.com + + + Escaped name + diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html new file mode 100644 index 000000000..73d9655ce --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html @@ -0,0 +1,17 @@ + + + + +

    + Escaped name +

    +
    +

    + John Doe +

    +
    + + + diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook new file mode 100644 index 000000000..e70161375 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook @@ -0,0 +1,11 @@ +[library Escaped name +[quickbook 1.7] +[copyright 1325 John Doe] +''' + John + Doe + john.doe@example.com +''' +[category test] +] + diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold new file mode 100644 index 000000000..259111ac4 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold @@ -0,0 +1,12 @@ + + +
    + Multiple escaped attributes + + + John + Doe + john.doe@example.com +Acme Corporation +
    diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html new file mode 100644 index 000000000..359094610 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html @@ -0,0 +1,14 @@ + + + + +

    + Multiple escaped attributes +

    +
    +

    + John Doe +

    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook new file mode 100644 index 000000000..70676f8a1 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook @@ -0,0 +1,10 @@ +[article Multiple escaped attributes +[quickbook 1.7] +''' + John + Doe + john.doe@example.com +''' +'''Acme Corporation''' +] + diff --git a/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold new file mode 100644 index 000000000..5b55391e2 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold @@ -0,0 +1,27 @@ + + +
    + Missing Id test +
    + <link linkend="missing_id_test.missing_id_test_1">Missing Id test 1</link> +
    +
    + <link linkend="missing_id_test.no_docinfo_test_1">No docinfo test 1</link> +
    +
    + <link linkend="missing_id_test.missing_id_test_2">Missing Id test 2</link> +
    +
    + <link linkend="docinfo_no_id.docinfo_no_id_1">Docinfo no id 1</link> +
    +
    + <link linkend="missing_id_test.missing_id_test_3">Missing Id test 3</link> +
    +
    + <link linkend="docinfo_no_id.no_docinfo_test_1">No docinfo test 1</link> +
    +
    + <link linkend="missing_id_test.missing_id_test_4">Missing Id test 4</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html new file mode 100644 index 000000000..c6fbb841a --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html @@ -0,0 +1,86 @@ + + + + +

    + Missing Id test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Missing Id test 1 +

    +
    +
    +
    +
    +

    + No docinfo test 1 +

    +
    +
    +
    +
    +

    + Missing Id test 2 +

    +
    +
    +
    +
    +

    + Docinfo no id 1 +

    +
    +
    +
    +
    +

    + Missing Id test 3 +

    +
    +
    +
    +
    +

    + No docinfo test 1 +

    +
    +
    +
    +
    +

    + Missing Id test 4 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook new file mode 100644 index 000000000..c7065d0c5 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook @@ -0,0 +1,21 @@ +[article Missing Id test +[quickbook 1.5] +] + +[section Missing Id test 1] +[endsect] + +[include id1-no-docinfo.quickbook] + +[section Missing Id test 2] +[endsect] + +[include id1-docinfo-no-id.quickbook] + +[section Missing Id test 3] +[endsect] + +[include id1-no-docinfo.quickbook] + +[section Missing Id test 4] +[endsect] diff --git a/src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook b/src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook new file mode 100644 index 000000000..d5e954826 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook @@ -0,0 +1,5 @@ +[article Docinfo no id +] + +[section Docinfo no id 1] +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook b/src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook new file mode 100644 index 000000000..4dbaf2dea --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook @@ -0,0 +1,2 @@ +[section No docinfo test 1] +[endsect] diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold new file mode 100644 index 000000000..0b76b9da1 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold @@ -0,0 +1,11 @@ + + +
    + Macro shouldn't expand: __DATE__ + + + Unfortunately this does expand: 2000-Dec-20, but I'm not fixing it, as I don't + think it'll cause any real problems. + + +
    diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html new file mode 100644 index 000000000..7df921e6b --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html @@ -0,0 +1,9 @@ + + + + +

    + Macro shouldn't expand: __DATE__ +

    + + diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook new file mode 100644 index 000000000..c66a1de6d --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook @@ -0,0 +1,6 @@ +[article Macro shouldn't expand: __DATE__ + [quickbook 1.5] + [last-revision __DATE__] + [purpose Unfortunately this does expand: __DATE__, but I'm not fixing it, + as I don't think it'll cause any real problems.] +] diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold new file mode 100644 index 000000000..92ac1a191 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold @@ -0,0 +1,8 @@ + + +
    + Testing date: 2000-Dec-20 + + Testing macro date: 5 May 2013 + +
    diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html new file mode 100644 index 000000000..57b673755 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html @@ -0,0 +1,24 @@ + + + + +

    + Testing date: 2000-Dec-20 +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Testing macro date: 5 May 2013 +

    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook new file mode 100644 index 000000000..058c34954 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook @@ -0,0 +1,7 @@ +[article Testing date: __DATE__ + [quickbook 1.6] + [last-revision __DATE__] +] + +[def NESTED_MACRO 5 May 2013] +[include macros1-inc_1_6.quickbook] diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook new file mode 100644 index 000000000..47fc84a81 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook @@ -0,0 +1,4 @@ +[chapter Testing macro date: NESTED_MACRO + [quickbook 1.6] + [last-revision NESTED_MACRO] +] diff --git a/src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook b/src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook new file mode 100644 index 000000000..6f0b2cdbe --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook @@ -0,0 +1,3 @@ +[quickbook 1.6] + +Hello! diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold new file mode 100644 index 000000000..f7fea9a71 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold @@ -0,0 +1,33 @@ + + +
    + C++ test + + + + def foo(x): + print "Hello" + + + + int main() {} + + + +int main() {} + + +def foo(): + + +def foo(x): + + +int main() {} + + +int main() {} + +
    diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html new file mode 100644 index 000000000..e1237d1fd --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html @@ -0,0 +1,31 @@ + + + + +

    + C++ test +

    +
    +

    + def foo(x): + print "Hello" +

    +
    +

    +

    int main() {}
    +

    +

    +

    def foo():
    +

    +

    +

    def foo(x):
    +

    +

    +

    int main() {}
    +

    +

    +

    int main() {}
    +

    + + diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook new file mode 100644 index 000000000..a04bca741 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook @@ -0,0 +1,17 @@ +[article C++ test +[quickbook 1.5] +[source-mode python] +[license `def foo(x): print "Hello"`] +[source-mode c++] +[purpose `int main() {}`] +] + +```int main() {}``` + +[include source-mode-python-include.quickbook] + +```def foo(x):``` + +[include source-mode-cpp-include.quickbook] + +```int main() {}``` diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold new file mode 100644 index 000000000..340c5d2e9 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold @@ -0,0 +1,38 @@ + + +
    + C++ test + + + + def foo(x): + print "Hello" + + + + This shouldn't be highlighted + + + +This shouldn't be highlighted. + + +int main() {} + + +int main() {} + + +def foo(): + + +def foo(x): + + +This shouldn't be highlighted + + +This shouldn't be highlighted. + +
    diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html new file mode 100644 index 000000000..4eacbb674 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html @@ -0,0 +1,37 @@ + + + + +

    + C++ test +

    +
    +

    + def foo(x): + print "Hello" +

    +
    +

    +

    This shouldn't be highlighted.
    +

    +

    +

    int main() {}
    +

    +

    +

    int main() {}
    +

    +

    +

    def foo():
    +

    +

    +

    def foo(x):
    +

    +

    +

    This shouldn't be highlighted
    +

    +

    +

    This shouldn't be highlighted.
    +

    + + diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook new file mode 100644 index 000000000..78e20b7c0 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook @@ -0,0 +1,21 @@ +[article C++ test +[quickbook 1.5] +[source-mode python] +[license `def foo(x): print "Hello"`] +[source-mode teletype] +[purpose `This shouldn't be highlighted`] +] + +```This shouldn't be highlighted.``` + +[include source-mode-cpp-include.quickbook] + +```int main() {}``` + +[include source-mode-python-include.quickbook] + +```def foo(x):``` + +[include source-mode-teletype-include.quickbook] + +```This shouldn't be highlighted.``` diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold new file mode 100644 index 000000000..02496673a --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold @@ -0,0 +1,42 @@ + + +
    + C++ test + + + + def foo(x): + print "Hello" + + + + This shouldn't be highlighted + + +This shouldn't be highlighted. +
    + C++ source mode include + +int main() {} + +
    +This shouldn't be highlighted. +
    + Python source mode include + +def foo(): + +
    +This shouldn't be highlighted. +
    + Teletype source mode include + +This shouldn't be highlighted + +
    +This shouldn't be highlighted. +
    diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html new file mode 100644 index 000000000..79390c04b --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html @@ -0,0 +1,60 @@ + + + + +

    + C++ test +

    +
    +

    + def foo(x): + print "Hello" +

    +
    +
    +

    + Table of contents +

    + +
    +
    This shouldn't be highlighted.
    +
    This shouldn't be highlighted.
    +
    This shouldn't be highlighted.
    +
    This shouldn't be highlighted.
    +
    +

    + C++ source mode include +

    +

    +

    int main() {}
    +

    +
    +
    +

    + Python source mode include +

    +

    +

    def foo():
    +

    +
    +
    +

    + Teletype source mode include +

    +

    +

    This shouldn't be highlighted
    +

    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook new file mode 100644 index 000000000..02f7ee4c4 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook @@ -0,0 +1,21 @@ +[article C++ test +[quickbook 1.6] +[source-mode python] +[license `def foo(x): print "Hello"`] +[source-mode teletype] +[purpose `This shouldn't be highlighted`] +] + +```This shouldn't be highlighted.``` + +[include source-mode-cpp-include.quickbook] + +```This shouldn't be highlighted.``` + +[include source-mode-python-include.quickbook] + +```This shouldn't be highlighted.``` + +[include source-mode-teletype-include.quickbook] + +```This shouldn't be highlighted.``` diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook new file mode 100644 index 000000000..1ff2b94cd --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook @@ -0,0 +1,4 @@ +[source-mode c++] +[article C++ source mode include] + +```int main() {}``` \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook new file mode 100644 index 000000000..31ac531d0 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook @@ -0,0 +1,5 @@ +[article Python source mode include +[source-mode python] +] + +```def foo():``` \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook new file mode 100644 index 000000000..c7908fb76 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook @@ -0,0 +1,5 @@ +[article Teletype source mode include +[source-mode teletype] +] + +```This shouldn't be highlighted``` \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold new file mode 100644 index 000000000..17e4add73 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold @@ -0,0 +1,9 @@ + + +
    + Trailing Space +
    + Body +
    +
    diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html new file mode 100644 index 000000000..187ba4271 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html @@ -0,0 +1,26 @@ + + + + +

    + Trailing Space +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Body +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook new file mode 100644 index 000000000..27305f719 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook @@ -0,0 +1,5 @@ +[article Trailing Space ] + +[section Body] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold new file mode 100644 index 000000000..45231b6d1 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold @@ -0,0 +1,9 @@ + + +
    + Trailing Space +
    + <link linkend="trailing_space.body">Body</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html new file mode 100644 index 000000000..1b3cb4e23 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html @@ -0,0 +1,26 @@ + + + + +

    + Trailing Space +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Body +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook new file mode 100644 index 000000000..b1b8cd5d2 --- /dev/null +++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook @@ -0,0 +1,5 @@ +[article Trailing Space [quickbook 1.6]] + +[section Body] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/elements-1_5.gold b/src/boost/tools/quickbook/test/elements-1_5.gold new file mode 100644 index 000000000..e5bb24a27 --- /dev/null +++ b/src/boost/tools/quickbook/test/elements-1_5.gold @@ -0,0 +1,18 @@ + + +
    + 1.5 Elements + + [ordered_list [item1][item2]] + + + [itemized_list [item1][item2]] + + + [blockA <emphasis role="bold">simplesect</emphasis>!] + + + [block] + +
    diff --git a/src/boost/tools/quickbook/test/elements-1_5.quickbook b/src/boost/tools/quickbook/test/elements-1_5.quickbook new file mode 100644 index 000000000..df8f10aa7 --- /dev/null +++ b/src/boost/tools/quickbook/test/elements-1_5.quickbook @@ -0,0 +1,13 @@ +[article 1.5 Elements +[quickbook 1.5] +] + +[/ elements from 1.6] + +[ordered_list [item1][item2]] + +[itemized_list [item1][item2]] + +[block''''''A *simplesect*!''''''] + +[block''''''] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/elements-1_6.gold b/src/boost/tools/quickbook/test/elements-1_6.gold new file mode 100644 index 000000000..59a90af5c --- /dev/null +++ b/src/boost/tools/quickbook/test/elements-1_6.gold @@ -0,0 +1,40 @@ + + +
    + 1.6 Elements + + + + item1 + + + + + item2 + + + + + + + item1 + + + + + item2 + + + + + + + Check that bold text isn't confused with + a list. + + + + A <emphasis role="bold">simplesect</emphasis>! + +
    diff --git a/src/boost/tools/quickbook/test/elements-1_6.gold-html b/src/boost/tools/quickbook/test/elements-1_6.gold-html new file mode 100644 index 000000000..17566749c --- /dev/null +++ b/src/boost/tools/quickbook/test/elements-1_6.gold-html @@ -0,0 +1,44 @@ + + + + +

    + 1.6 Elements +

    +
      +
    1. +
      + item1 +
      +
    2. +
    3. +
      + item2 +
      +
    4. +
    +
      +
    • +
      + item1 +
      +
    • +
    • +
      + item2 +
      +
    • +
    +
      +
    1. +
      + Check that bold text isn't confused + with a list. +
      +
    2. +
    +

    + A simplesect! +

    + + diff --git a/src/boost/tools/quickbook/test/elements-1_6.quickbook b/src/boost/tools/quickbook/test/elements-1_6.quickbook new file mode 100644 index 000000000..e313cd98d --- /dev/null +++ b/src/boost/tools/quickbook/test/elements-1_6.quickbook @@ -0,0 +1,21 @@ +[article 1.6 Elements +[quickbook 1.6] +] + +[/ elements from 1.6] + +[ordered_list [item1][item2]] + +[itemized_list [item1][item2]] + +[ordered_list + [ + Check that + *bold text* + isn't confused with a list. + ] +] + +[block''''''A *simplesect*!''''''] + +[block''''''] diff --git a/src/boost/tools/quickbook/test/empty-inc.quickbook b/src/boost/tools/quickbook/test/empty-inc.quickbook new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook b/src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook new file mode 100644 index 000000000..50125d967 --- /dev/null +++ b/src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook @@ -0,0 +1,6 @@ +[article Endsect with wrong id 1.7 + [quickbook 1.7] + [id something] +] + +[endsect:something] diff --git a/src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook b/src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook new file mode 100644 index 000000000..ea833323c --- /dev/null +++ b/src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook @@ -0,0 +1,6 @@ +[article Endsect with wrong id 1.4 + [quickbook 1.4] +] + +[section Quickbook section id test] +[endsect:id_test] diff --git a/src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook b/src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook new file mode 100644 index 000000000..9ef2fc925 --- /dev/null +++ b/src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook @@ -0,0 +1,6 @@ +[article Endsect with wrong id 1.7 + [quickbook 1.7] +] + +[section:id_test1 Quickbook section id test] +[endsect:id_test] diff --git a/src/boost/tools/quickbook/test/escape-1_1.gold b/src/boost/tools/quickbook/test/escape-1_1.gold new file mode 100644 index 000000000..0c600e0dc --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-1_1.gold @@ -0,0 +1,32 @@ + + +
    + Escape +
    + Escape + + Da do do do. Da da da da. That's all I have to say to you. + + + This letter α should have a space either side of it. + + + These should be properly encoded: > < " + + + This link shouldn't be changed. + + + Some other problematic links: +one, +two, +three. + + + This will be escaped + + + \[ generates [. \] generates ]. + +
    +
    diff --git a/src/boost/tools/quickbook/test/escape-1_1.gold-html b/src/boost/tools/quickbook/test/escape-1_1.gold-html new file mode 100644 index 000000000..61cd98261 --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-1_1.gold-html @@ -0,0 +1,48 @@ + + + + +

    + Escape +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Escape +

    +
    +

    + Da do do do. Da da da da. That's all I have + to say to you. +

    +

    + This letter α should have a space either side of it. +

    +

    + These should be properly encoded: > < " +

    +

    + This link shouldn't be changed. +

    +

    + Some other problematic links: one, two, three. +

    +

    + This will be escaped +

    +

    + \[ generates [. \] generates ]. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/escape-1_1.quickbook b/src/boost/tools/quickbook/test/escape-1_1.quickbook new file mode 100644 index 000000000..3536ae5d5 --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-1_1.quickbook @@ -0,0 +1,34 @@ +[article Escape +] + +[section Escape] + +''' +Da do do do. Da da da da. That's all I have to say to you. +''' + +This letter '''α''' should have a space either side of it. + +These should be properly encoded: \> \< \" + +[/ The following tests are based on internal knowledge of + how quickbook's id generator works. They make sure it + doesn't mess up escaped docbook. ] + +'''This link shouldn't be changed.''' + +''' +Some other problematic links: +one, +two, +three. +''' + +[template escapedtemplate This will be escaped] + +[`escapedtemplate] + +\\\[ generates \[. +\\\] generates \]. + +[endsect] diff --git a/src/boost/tools/quickbook/test/escape-1_6.gold b/src/boost/tools/quickbook/test/escape-1_6.gold new file mode 100644 index 000000000..54056a7d8 --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-1_6.gold @@ -0,0 +1,32 @@ + + +
    + Escape +
    + <link linkend="escape.escape">Escape</link> + + Da do do do. Da da da da. That's all I have to say to you. + + + This letter α should have a space either side of it. + + + These should be properly encoded: > < " + + + This link shouldn't be changed. + + + Some other problematic links: +one, +two, +three. + + + This will be escaped + + + \[ generates [. \] generates ]. + +
    +
    diff --git a/src/boost/tools/quickbook/test/escape-1_6.gold-html b/src/boost/tools/quickbook/test/escape-1_6.gold-html new file mode 100644 index 000000000..61cd98261 --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-1_6.gold-html @@ -0,0 +1,48 @@ + + + + +

    + Escape +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Escape +

    +
    +

    + Da do do do. Da da da da. That's all I have + to say to you. +

    +

    + This letter α should have a space either side of it. +

    +

    + These should be properly encoded: > < " +

    +

    + This link shouldn't be changed. +

    +

    + Some other problematic links: one, two, three. +

    +

    + This will be escaped +

    +

    + \[ generates [. \] generates ]. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/escape-1_6.quickbook b/src/boost/tools/quickbook/test/escape-1_6.quickbook new file mode 100644 index 000000000..0df903808 --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-1_6.quickbook @@ -0,0 +1,35 @@ +[article Escape +[quickbook 1.6] +] + +[section Escape] + +''' +Da do do do. Da da da da. That's all I have to say to you. +''' + +This letter '''α''' should have a space either side of it. + +These should be properly encoded: \> \< \" + +[/ The following tests are based on internal knowledge of + how quickbook's id generator works. They make sure it + doesn't mess up escaped docbook. ] + +'''This link shouldn't be changed.''' + +''' +Some other problematic links: +one, +two, +three. +''' + +[template escapedtemplate This will be escaped] + +[`escapedtemplate] + +\\\[ generates \[. +\\\] generates \]. + +[endsect] diff --git a/src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook b/src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook new file mode 100644 index 000000000..1f9d0c0a4 --- /dev/null +++ b/src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook @@ -0,0 +1,5 @@ +[article Badly escaped boostbook +[quickbook 1.5] +] + +'''something \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/footnotes-1_7.gold b/src/boost/tools/quickbook/test/footnotes-1_7.gold new file mode 100644 index 000000000..9b9e9c15e --- /dev/null +++ b/src/boost/tools/quickbook/test/footnotes-1_7.gold @@ -0,0 +1,31 @@ + + +
    + Footnotes +
    + <link linkend="footnotes.first">First Section</link> + + Some + + First footnote + + normal + + Second footnote + + footnotes + + Third footnote + + . + +
    +
    + <link linkend="footnotes.second">Second Section</link> + + SomeBoostbook footnote +boostbookFootnote without id +footnotesAnother footnote without an id. + +
    +
    diff --git a/src/boost/tools/quickbook/test/footnotes-1_7.gold-html b/src/boost/tools/quickbook/test/footnotes-1_7.gold-html new file mode 100644 index 000000000..d8a0743d9 --- /dev/null +++ b/src/boost/tools/quickbook/test/footnotes-1_7.gold-html @@ -0,0 +1,80 @@ + + + + +

    + Footnotes +

    +
    +

    + Table of contents +

    + +
    +
    +

    + First Section +

    +
    +

    + Some[1] + normal[2] + footnotes[3]. +

    +
    +
    +
    +

    + Second Section +

    +
    +

    + Some[4] boostbook[5] + footnotes[6]. +

    +
    +
    +
    +
    +
    +
    +

    + [1] First footnote +

    +
    +
    +

    + [2] Second footnote +

    +
    +
    +

    + [3] Third footnote +

    +
    +
    +

    + [4] Boostbook footnote +

    +
    +
    +

    + [5] Footnote without id +

    +
    +
    +

    + [6] Another footnote without an id +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/footnotes-1_7.quickbook b/src/boost/tools/quickbook/test/footnotes-1_7.quickbook new file mode 100644 index 000000000..ac3dc91f9 --- /dev/null +++ b/src/boost/tools/quickbook/test/footnotes-1_7.quickbook @@ -0,0 +1,16 @@ +[quickbook 1.7] +[article Footnotes] + +[section:first First Section] + +Some[footnote First footnote] normal[footnote Second footnote] footnotes[footnote Third footnote]. + +[endsect] + +[section:second Second Section] + +Some'''Boostbook footnote''' +boostbook'''Footnote without id''' +footnotes'''Another footnote without an id'''. + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/heading-1_1.gold b/src/boost/tools/quickbook/test/heading-1_1.gold new file mode 100644 index 000000000..334d20bc1 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_1.gold @@ -0,0 +1,76 @@ + + +
    + Heading Test 1.1 + + Generic + header + + + Level 1 + + + Level 2 + + + Level 3 + + + Level 4 + + + Level 5 + + + Level 6 + + + Bold + + + Comment + + + :notanid + + + :also not an id + + + Anchor heading + + + Link heading + + + H1 + +
    + S1 + + H2 + +
    + S2 + + H3 + +
    + + H4 + +
    + S3 + + H5 + +
    + + H6 + +
    + + H7 + +
    diff --git a/src/boost/tools/quickbook/test/heading-1_1.gold-html b/src/boost/tools/quickbook/test/heading-1_1.gold-html new file mode 100644 index 000000000..9da607a93 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_1.gold-html @@ -0,0 +1,100 @@ + + + + +

    + Heading Test 1.1 +

    +
    +

    + Table of contents +

    +
      +
    • + S1 +
    • +
    +
    +

    + Generic header +

    +

    + Level 1 +

    +

    + Level 2 +

    +

    + Level 3 +

    +

    + Level 4 +

    +
    + Level 5 +
    +
    + Level 6 +
    +

    + Bold +

    +

    + Comment +

    +

    + :notanid +

    +

    + :also not an id +

    +

    + Anchor heading +

    +

    + Link heading +

    +

    + H1 +

    +

    + H7 +

    +
    +

    + S1 +

    +
    +

    + H2 +

    +

    + H4 +

    +

    + H6 +

    +
    +
    +

    + S2 +

    +
    +

    + H3 +

    +
    +
    +
    +

    + S3 +

    +
    +

    + H5 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/heading-1_1.quickbook b/src/boost/tools/quickbook/test/heading-1_1.quickbook new file mode 100644 index 000000000..f7b2286f4 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_1.quickbook @@ -0,0 +1,55 @@ +[article Heading Test 1.1] + +[/ Basic headers ] + +[heading Generic header] +[h1 Level 1] +[h2 Level 2] +[h3 Level 3] +[h4 Level 4] +[h5 Level 5] +[h6 Level 6] + +[/ Test how heading ids are generated when different types of markup are present] + +[h1 *Bold*] +[h1 [/]Comment[/]] + +[/ Headings that look like ids] + +[h1:notanid] +[h1:also not an id] + +[/ Test how ids are generated for headings containing things like anchors + and links ] + +[h1 [#anchor]Anchor heading] +[h1 [link anchor Link heading]] + +[/ Test how heading ids are generated inside sections] + +[h1 H1] + +[section:s1 S1] + +[h2 H2] + +[section:s2 S2] + +[h3 H3] + +[endsect] + +[heading H4] + +[section:s3 S3] + +[h3 H5] + +[endsect] + +[heading H6] + +[endsect] + +[h1 H7] diff --git a/src/boost/tools/quickbook/test/heading-1_3.gold b/src/boost/tools/quickbook/test/heading-1_3.gold new file mode 100644 index 000000000..f883a6037 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_3.gold @@ -0,0 +1,24 @@ + + + diff --git a/src/boost/tools/quickbook/test/heading-1_3.gold-html b/src/boost/tools/quickbook/test/heading-1_3.gold-html new file mode 100644 index 000000000..a46543b63 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_3.gold-html @@ -0,0 +1,27 @@ + + + + +

    + Header +

    +

    + Header Test +

    +

    + Testing headers without sections. +

    +

    + :Not an Id +

    +

    + Paragraph. +

    +

    + :Not an Id again +

    +

    + Paragraph. +

    + + diff --git a/src/boost/tools/quickbook/test/heading-1_3.quickbook b/src/boost/tools/quickbook/test/heading-1_3.quickbook new file mode 100644 index 000000000..19de3a49a --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_3.quickbook @@ -0,0 +1,16 @@ +[article Header + [quickbook 1.3] + [id header] +] + +[heading Header Test] + +Testing headers without sections. + +[heading:Not an Id] + +Paragraph. + +[h3:Not an Id again] + +Paragraph. \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/heading-1_5.gold b/src/boost/tools/quickbook/test/heading-1_5.gold new file mode 100644 index 000000000..03fe46491 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_5.gold @@ -0,0 +1,87 @@ + + +
    + Heading Test 1.5 + + Generic + header + + + Level + 1 + + + Level + 2 + + + Level + 3 + + + Level + 4 + + + Level + 5 + + + Level + 6 + + + Bold + + + Comment + + + :notanid + + + :also + not an id + + + Anchor heading + + + Link + heading + + + H1 + +
    + <link linkend="heading_test_1_5.s1">S1</link> + + H2 + +
    + <link linkend="heading_test_1_5.s1.s2">S2</link> + + H3 + +
    + + H4 + +
    + <link linkend="heading_test_1_5.s1.s3">S3</link> + + H5 + +
    + + H6 + +
    + + H7 + +
    diff --git a/src/boost/tools/quickbook/test/heading-1_5.gold-html b/src/boost/tools/quickbook/test/heading-1_5.gold-html new file mode 100644 index 000000000..cad0e0311 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_5.gold-html @@ -0,0 +1,100 @@ + + + + +

    + Heading Test 1.5 +

    +
    +

    + Table of contents +

    +
      +
    • + S1 +
    • +
    +
    +

    + Generic header +

    +

    + Level 1 +

    +

    + Level 2 +

    +

    + Level 3 +

    +

    + Level 4 +

    +
    + Level 5 +
    +
    + Level 6 +
    +

    + Bold +

    +

    + Comment +

    +

    + :notanid +

    +

    + :also not an id +

    +

    + Anchor heading +

    +

    + Link heading +

    +

    + H1 +

    +

    + H7 +

    +
    +

    + S1 +

    +
    +

    + H2 +

    +

    + H4 +

    +

    + H6 +

    +
    +
    +

    + S2 +

    +
    +

    + H3 +

    +
    +
    +
    +

    + S3 +

    +
    +

    + H5 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/heading-1_5.quickbook b/src/boost/tools/quickbook/test/heading-1_5.quickbook new file mode 100644 index 000000000..572b184cd --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_5.quickbook @@ -0,0 +1,57 @@ +[article Heading Test 1.5 +[quickbook 1.5] +] + +[/ Basic headers ] + +[heading Generic header] +[h1 Level 1] +[h2 Level 2] +[h3 Level 3] +[h4 Level 4] +[h5 Level 5] +[h6 Level 6] + +[/ Test how heading ids are generated when different types of markup are present] + +[h1 *Bold*] +[h1 [/]Comment[/]] + +[/ Headings that look like ids] + +[h1:notanid] +[h1:also not an id] + +[/ Test how ids are generated for headings containing things like anchors + and links ] + +[h1 [#anchor]Anchor heading] +[h1 [link anchor Link heading]] + +[/ Test how heading ids are generated inside sections] + +[heading H1] + +[section:s1 S1] + +[h2 H2] + +[section:s2 S2] + +[h3 H3] + +[endsect] + +[h2 H4] + +[section:s3 S3] + +[heading H5] + +[endsect] + +[h2 H6] + +[endsect] + +[h1 H7] diff --git a/src/boost/tools/quickbook/test/heading-1_6.gold b/src/boost/tools/quickbook/test/heading-1_6.gold new file mode 100644 index 000000000..008115d72 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_6.gold @@ -0,0 +1,109 @@ + + +
    + Heading Test 1.6 + + Generic + header + + + Level + 1 + + + Level + 2 + + + Level + 3 + + + Level + 4 + + + Level + 5 + + + Level + 6 + + + Bold + + + Comment + + + Anchor heading + + + Link heading + + + H1 + +
    + <link linkend="heading_test_1_6.s1">S1</link> + + H2 + +
    + <link linkend="heading_test_1_6.s1.s2">S2</link> + + H3 + +
    + + H4 + +
    + <link linkend="heading_test_1_6.s1.s3">S3</link> + + H5 + +
    + + H6 + +
    + + H7 + + + H1 + +
    + <link linkend="heading_test_1_6.s1_0">S1</link> + + H2 + +
    + <link linkend="heading_test_1_6.s1_0.s2">S2</link> + + H3 + +
    + + H4 + +
    + <link linkend="heading_test_1_6.s1_0.s3">S3</link> + + H5 + +
    + + H6 + +
    + + H7 + +
    diff --git a/src/boost/tools/quickbook/test/heading-1_6.gold-html b/src/boost/tools/quickbook/test/heading-1_6.gold-html new file mode 100644 index 000000000..ce826d66b --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_6.gold-html @@ -0,0 +1,139 @@ + + + + +

    + Heading Test 1.6 +

    +
    +

    + Table of contents +

    +
      +
    • + S1 +
    • +
    • + S1 +
    • +
    +
    +

    + Generic header +

    +

    + Level 1 +

    +

    + Level 2 +

    +

    + Level 3 +

    +

    + Level 4 +

    +
    + Level 5 +
    +
    + Level 6 +
    +

    + Bold +

    +

    + Comment +

    +

    + Anchor heading +

    +

    + Link heading +

    +

    + H1 +

    +

    + H7 +

    +

    + H1 +

    +

    + H7 +

    +
    +

    + S1 +

    +
    +

    + H2 +

    +

    + H4 +

    +

    + H6 +

    +
    +
    +

    + S2 +

    +
    +

    + H3 +

    +
    +
    +
    +

    + S3 +

    +
    +

    + H5 +

    +
    +
    +
    +
    +

    + S1 +

    +
    +

    + H2 +

    +

    + H4 +

    +

    + H6 +

    +
    +
    +

    + S2 +

    +
    +

    + H3 +

    +
    +
    +
    +

    + S3 +

    +
    +

    + H5 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/heading-1_6.quickbook b/src/boost/tools/quickbook/test/heading-1_6.quickbook new file mode 100644 index 000000000..b8f668694 --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_6.quickbook @@ -0,0 +1,80 @@ +[article Heading Test 1.6 +[quickbook 1.6] +] + +[/ Basic headers ] + +[heading Generic header] +[h1 Level 1] +[h2 Level 2] +[h3 Level 3] +[h4 Level 4] +[h5 Level 5] +[h6 Level 6] + +[/ Test how heading ids are generated when different types of markup are present] + +[h1 *Bold*] +[h1 [/]Comment[/]] + +[/ Test how ids are generated for headings containing things like anchors + and links ] + +[h1 [#anchor]Anchor heading] +[h1 [link anchor Link heading]] + +[/ Test how heading ids are generated inside sections] + +[h1 H1] + +[section:s1 S1] + +[heading H2] + +[section:s2 S2] + +[h3 H3] + +[endsect] + +[h2 H4] + +[section:s3 S3] + +[heading H5] + +[endsect] + +[h2 H6] + +[endsect] + +[h1 H7] + +[/ Repeat with explicit ids] + +[h1:a1 H1] + +[section:s1 S1] + +[h2:a2 H2] + +[section:s2 S2] + +[h3:a3 H3] + +[endsect] + +[h2:a4 H4] + +[section:s3 S3] + +[h3:a5 H5] + +[endsect] + +[heading:a6 H6] + +[endsect] + +[h1:a7 H7] diff --git a/src/boost/tools/quickbook/test/heading-1_7.gold b/src/boost/tools/quickbook/test/heading-1_7.gold new file mode 100644 index 000000000..52f8291ab --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_7.gold @@ -0,0 +1,113 @@ + + +
    + Heading Test 1.7 + + Generic + header + + + Level + 1 + + + Level + 2 + + + Level + 3 + + + Level + 4 + + + Level + 5 + + + Level + 6 + + + Bold + + + Comment + + + Anchor heading + + + Link heading + + + H1 + +
    + <link linkend="heading_test_1_7.s1">S1</link> + + H2 + +
    + <link linkend="heading_test_1_7.s1.s2">S2</link> + + H3 + +
    + + H4 + +
    + <link linkend="heading_test_1_7.s1.s3">S3</link> + + H5 + +
    + + H6 + +
    + + H7 + + + H1 + +
    + <link linkend="heading_test_1_7.s1_0">S1</link> + + H2 + +
    + <link linkend="heading_test_1_7.s1_0.s2">S2</link> + + H3 + +
    + + H4 + +
    + <link linkend="heading_test_1_7.s1_0.s3">S3</link> + + H5 + +
    + + H6 + +
    + + H7 + + + Template + Id + +
    diff --git a/src/boost/tools/quickbook/test/heading-1_7.gold-html b/src/boost/tools/quickbook/test/heading-1_7.gold-html new file mode 100644 index 000000000..b0e21997b --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_7.gold-html @@ -0,0 +1,142 @@ + + + + +

    + Heading Test 1.7 +

    +
    +

    + Table of contents +

    +
      +
    • + S1 +
    • +
    • + S1 +
    • +
    +
    +

    + Generic header +

    +

    + Level 1 +

    +

    + Level 2 +

    +

    + Level 3 +

    +

    + Level 4 +

    +
    + Level 5 +
    +
    + Level 6 +
    +

    + Bold +

    +

    + Comment +

    +

    + Anchor heading +

    +

    + Link heading +

    +

    + H1 +

    +

    + H7 +

    +

    + H1 +

    +

    + H7 +

    +

    + Template Id +

    +
    +

    + S1 +

    +
    +

    + H2 +

    +

    + H4 +

    +

    + H6 +

    +
    +
    +

    + S2 +

    +
    +

    + H3 +

    +
    +
    +
    +

    + S3 +

    +
    +

    + H5 +

    +
    +
    +
    +
    +

    + S1 +

    +
    +

    + H2 +

    +

    + H4 +

    +

    + H6 +

    +
    +
    +

    + S2 +

    +
    +

    + H3 +

    +
    +
    +
    +

    + S3 +

    +
    +

    + H5 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/heading-1_7.quickbook b/src/boost/tools/quickbook/test/heading-1_7.quickbook new file mode 100644 index 000000000..47f878add --- /dev/null +++ b/src/boost/tools/quickbook/test/heading-1_7.quickbook @@ -0,0 +1,83 @@ +[article Heading Test 1.7 +[quickbook 1.7] +] + +[/ Basic headers ] + +[heading Generic header] +[h1 Level 1] +[h2 Level 2] +[h3 Level 3] +[h4 Level 4] +[h5 Level 5] +[h6 Level 6] + +[/ Test how heading ids are generated when different types of markup are present] + +[h1 *Bold*] +[h1 [/]Comment[/]] + +[/ Test how ids are generated for headings containing things like anchors + and links ] + +[h1 [#anchor]Anchor heading] +[h1 [link anchor Link heading]] + +[/ Test how heading ids are generated inside sections] + +[h1 H1] + +[section:s1 S1] + +[heading H2] + +[section:s2 S2] + +[h3 H3] + +[endsect] + +[h2 H4] + +[section:s3 S3] + +[heading H5] + +[endsect] + +[h2 H6] + +[endsect] + +[h1 H7] + +[/ Repeat with explicit ids] + +[h1:a1 H1] + +[section:s1 S1] + +[h2:a2 H2] + +[section:s2 S2] + +[h3:a3 H3] + +[endsect] + +[h2:a4 H4] + +[section:s3 S3] + +[h3:a5 H5] + +[endsect] + +[heading:a6 H6] + +[endsect] + +[h1:a7 H7] + +[template thing[] abc] +[heading:[thing]-2 Template Id] diff --git a/src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook b/src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook new file mode 100644 index 000000000..79bf3d79a --- /dev/null +++ b/src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook @@ -0,0 +1,3 @@ +[article Parse error [quickbook 1.4]] + +[heading Incomplete heading diff --git a/src/boost/tools/quickbook/test/hr-1_5.gold b/src/boost/tools/quickbook/test/hr-1_5.gold new file mode 100644 index 000000000..8da9aa4d0 --- /dev/null +++ b/src/boost/tools/quickbook/test/hr-1_5.gold @@ -0,0 +1,34 @@ + + +
    + Horizontal Rule + + + This should be displayed. + + + + + * This shouldn't be a list + + + + + + This should be a list + + + + + + + + This should be a list + + + + + + +
    diff --git a/src/boost/tools/quickbook/test/hr-1_5.gold-html b/src/boost/tools/quickbook/test/hr-1_5.gold-html new file mode 100644 index 000000000..14c24c067 --- /dev/null +++ b/src/boost/tools/quickbook/test/hr-1_5.gold-html @@ -0,0 +1,45 @@ + + + + +

    + Horizontal Rule +

    +

    +

    +

    + This should be displayed. +

    +

    +

    +

    +

    +

    + * This shouldn't be a list +

    +

    +

    +
      +
    • +
      + This should be a list +
      +
    • +
    +

    +

    +
      +
    • +
      + This should be a list +
      +
    • +
    +

    +

    +

    +

    +

    +

    + + diff --git a/src/boost/tools/quickbook/test/hr-1_5.quickbook b/src/boost/tools/quickbook/test/hr-1_5.quickbook new file mode 100644 index 000000000..27df9f537 --- /dev/null +++ b/src/boost/tools/quickbook/test/hr-1_5.quickbook @@ -0,0 +1,27 @@ +[article Horizontal Rule +[quickbook 1.5] +] + +---- [/ +This should be a comment. +] This should be displayed. + +---- [/ ] This shouldn't be displayed. + +---- [/ +This should be a comment. +] * This shouldn't be a list + +---- [/ +This should be a comment. +] +* This should be a list + +---- [/ This should be a comment] +* This should be a list + +---- [* This shouldn't be displayed.] + +---- This doesn't have an open bracket.] + +---- [ This doesn't have a close bracket. diff --git a/src/boost/tools/quickbook/test/hr-1_6.gold b/src/boost/tools/quickbook/test/hr-1_6.gold new file mode 100644 index 000000000..b9ef17a47 --- /dev/null +++ b/src/boost/tools/quickbook/test/hr-1_6.gold @@ -0,0 +1,39 @@ + + +
    + Horizontal Rule + + + This should be displayed. + + + + + * This shouldn't be a list + + + + + + This should be a list + + + + + + + + This should be a list + + + + + + This should be displayed. Maybe that's wrong? + + + + Odd way to get text displayed. + +
    diff --git a/src/boost/tools/quickbook/test/hr-1_6.gold-html b/src/boost/tools/quickbook/test/hr-1_6.gold-html new file mode 100644 index 000000000..11e670228 --- /dev/null +++ b/src/boost/tools/quickbook/test/hr-1_6.gold-html @@ -0,0 +1,49 @@ + + + + +

    + Horizontal Rule +

    +

    +

    +

    + This should be displayed. +

    +

    +

    +

    +

    +

    + * This shouldn't be a list +

    +

    +

    +
      +
    • +
      + This should be a list +
      +
    • +
    +

    +

    +
      +
    • +
      + This should be a list +
      +
    • +
    +

    +

    +

    + This should be displayed. Maybe that's wrong? +

    +

    +

    +

    + Odd way to get text displayed. +

    + + diff --git a/src/boost/tools/quickbook/test/hr-1_6.quickbook b/src/boost/tools/quickbook/test/hr-1_6.quickbook new file mode 100644 index 000000000..0ed38c93e --- /dev/null +++ b/src/boost/tools/quickbook/test/hr-1_6.quickbook @@ -0,0 +1,26 @@ +[article Horizontal Rule +[quickbook 1.6] +] + +---- [/ +This should be a comment. +] This should be displayed. + +---- [/ ] This shouldn't be displayed. + +---- [/ +This should be a comment. +] * This shouldn't be a list + +---- [/ +This should be a comment. +] +* This should be a list + +---- [/ This should be a comment] +* This should be a list + +---- [* This should be displayed. Maybe that's wrong?] + +[template nothing] +---- [nothing] Odd way to get text displayed. diff --git a/src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg b/src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg new file mode 100644 index 000000000..9a4521f3a --- /dev/null +++ b/src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg @@ -0,0 +1,143 @@ + + + + + + + + image/svg+xml + + Open Clip Art Logo + 10-01-2004 + + + Andreas Nilsson + + + + + + Jon Phillips, Tobias Jakobs + + + This is one version of the official Open Clip Art Library logo. + logo, open clip art library logo, logotype + + + + + + + + + + + + + + + + + + + diff --git a/src/boost/tools/quickbook/test/identifier-1_5.gold b/src/boost/tools/quickbook/test/identifier-1_5.gold new file mode 100644 index 000000000..0e3557b0a --- /dev/null +++ b/src/boost/tools/quickbook/test/identifier-1_5.gold @@ -0,0 +1,610 @@ + + +
    + Identifiers in quickbook 1.5 + + Test + heading with code + + + Identifier + 10 + + + Identifier + 10 + + + Identifier 10 + + + + + + + + +
    + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + a2345678901234567890123456789012 + + + a2345678901234567890123456789012 + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + +
    + <link linkend="identifiers_in_quickbook_1_5.identifier_10">Identifier + 10</link> + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + a2345678901234567890123456789012 + + + a2345678901234567890123456789012 + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + + + h3 + + + + + + + + +
    + + h3 + + + + + + + + +
    +
    +
    + <link linkend="identifiers_in_quickbook_1_5.punctuation___stuff">Punctuation + & stuff</link> + + A + B + + + A + + B + +
    +
    diff --git a/src/boost/tools/quickbook/test/identifier-1_5.gold-html b/src/boost/tools/quickbook/test/identifier-1_5.gold-html new file mode 100644 index 000000000..4628a436f --- /dev/null +++ b/src/boost/tools/quickbook/test/identifier-1_5.gold-html @@ -0,0 +1,421 @@ + + + + +

    + Identifiers in quickbook 1.5 +

    +
    +

    + Table of contents +

    + +
    +

    + Test heading with code +

    +

    + Identifier 10 +

    +

    + Identifier 10 +

    +
    + + + + + + + +
    Identifier 10
    +
    +
    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + a2345678901234567890123456789012 +

    +

    + a2345678901234567890123456789012 +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + Markup in heading in order + to test normalization +

    +

    + Markup in heading in order + to test normalization +

    +

    + Markup in heading in order + to test normalization +

    +
    +

    + Identifier 10 +

    +
    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + a2345678901234567890123456789012 +

    +

    + a2345678901234567890123456789012 +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + Markup in heading in order to test normalization +

    +

    + Markup in heading in order to test normalization +

    +

    + Markup in heading in order to test normalization +

    +
    + + + + + + + +
    h3
    +
    +
    +
    + + + + + + + +
    h3
    +
    +
    +
    +
    +
    +

    + Punctuation & stuff +

    +
    +

    + A + B +

    +

    + A + B +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/identifier-1_5.quickbook b/src/boost/tools/quickbook/test/identifier-1_5.quickbook new file mode 100644 index 000000000..882d5df23 --- /dev/null +++ b/src/boost/tools/quickbook/test/identifier-1_5.quickbook @@ -0,0 +1,148 @@ +[article Identifiers in quickbook 1.5 + [quickbook 1.5] +] + +[heading Test heading with `code`] + +[heading Identifier 10] +[heading Identifier 10] +[table Identifier 10 +[[]] +] + +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having several headers] + +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] + +[heading a2345678901234567890123456789012] +[heading a2345678901234567890123456789012] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] + +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] + +[section Identifier 10] + +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having several headers] + +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] + +[heading a2345678901234567890123456789012] +[heading a2345678901234567890123456789012] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] + +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] + +[table h3 +[[]] +] + +[table h3 +[[]] +] + +[endsect] + +[section Punctuation & stuff] + +[heading A + B] +[heading A + B] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/identifier-1_6.gold b/src/boost/tools/quickbook/test/identifier-1_6.gold new file mode 100644 index 000000000..387204122 --- /dev/null +++ b/src/boost/tools/quickbook/test/identifier-1_6.gold @@ -0,0 +1,609 @@ + + +
    + Identifiers in quickbook 1.6 + + Test + heading with code + + + Identifier + 10 + + + Identifier + 10 + + + Identifier 10 + + + + + + + + +
    + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + a2345678901234567890123456789012 + + + a2345678901234567890123456789012 + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + +
    + <link linkend="identifiers_in_quickbook_1_6.identifier_10">Identifier + 10</link> + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having lots of headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having too many headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having even more headers + + + Generate + a really long id and duplicate it by having several headers + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + Generate + a really long id and d4 + + + Generate + a really long id and 15 + + + a2345678901234567890123456789012 + + + a2345678901234567890123456789012 + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + abcdefghijklmnopqrstuvwxyzabcdef + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + + + Markup + in heading in order + to test normalization + + + h3 + + + + + + + + +
    + + h3 + + + + + + + + +
    +
    +
    + <link linkend="identifiers_in_quickbook_1_6.punctuation_stuff">Punctuation + & stuff</link> + + A + + B + + + A + + B + +
    +
    diff --git a/src/boost/tools/quickbook/test/identifier-1_6.gold-html b/src/boost/tools/quickbook/test/identifier-1_6.gold-html new file mode 100644 index 000000000..d9f67439d --- /dev/null +++ b/src/boost/tools/quickbook/test/identifier-1_6.gold-html @@ -0,0 +1,421 @@ + + + + +

    + Identifiers in quickbook 1.6 +

    +
    +

    + Table of contents +

    + +
    +

    + Test heading with code +

    +

    + Identifier 10 +

    +

    + Identifier 10 +

    +
    + + + + + + + +
    Identifier 10
    +
    +
    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + a2345678901234567890123456789012 +

    +

    + a2345678901234567890123456789012 +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + Markup in heading in order + to test normalization +

    +

    + Markup in heading in order + to test normalization +

    +

    + Markup in heading in order + to test normalization +

    +
    +

    + Identifier 10 +

    +
    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having lots of headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having too many headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having even more headers +

    +

    + Generate a really long id and duplicate it by having several headers +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + Generate a really long id and d4 +

    +

    + Generate a really long id and 15 +

    +

    + a2345678901234567890123456789012 +

    +

    + a2345678901234567890123456789012 +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + abcdefghijklmnopqrstuvwxyzabcdef +

    +

    + Markup in heading in order to test normalization +

    +

    + Markup in heading in order to test normalization +

    +

    + Markup in heading in order to test normalization +

    +
    + + + + + + + +
    h3
    +
    +
    +
    + + + + + + + +
    h3
    +
    +
    +
    +
    +
    +

    + Punctuation & stuff +

    +
    +

    + A + B +

    +

    + A + B +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/identifier-1_6.quickbook b/src/boost/tools/quickbook/test/identifier-1_6.quickbook new file mode 100644 index 000000000..1bbf0a1c4 --- /dev/null +++ b/src/boost/tools/quickbook/test/identifier-1_6.quickbook @@ -0,0 +1,148 @@ +[article Identifiers in quickbook 1.6 + [quickbook 1.6] +] + +[heading Test heading with `code`] + +[heading Identifier 10] +[heading Identifier 10] +[table Identifier 10 +[[]] +] + +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having several headers] + +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] + +[heading a2345678901234567890123456789012] +[heading a2345678901234567890123456789012] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] + +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] + +[section Identifier 10] + +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having lots of headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having too many headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having several headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having even more headers] +[heading Generate a really long id and duplicate it by having several headers] + +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] +[heading Generate a really long id and d4] +[heading Generate a really long id and 15] + +[heading a2345678901234567890123456789012] +[heading a2345678901234567890123456789012] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] +[heading abcdefghijklmnopqrstuvwxyzabcdef] + +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] +[heading Markup in `heading` in *order* to test normalization] + +[table h3 +[[]] +] + +[table h3 +[[]] +] + +[endsect] + +[section Punctuation & stuff] + +[heading A + B] +[heading A + B] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/image-1_5.gold b/src/boost/tools/quickbook/test/image-1_5.gold new file mode 100644 index 000000000..6364ded61 --- /dev/null +++ b/src/boost/tools/quickbook/test/image-1_5.gold @@ -0,0 +1,64 @@ + + +
    + Images 1.5 + + + + test + + + + test this + + + + test&this + + + + test + + + + Foo + + + + Foobie foobie foo + + + + Foo & bar + + + + Foo + + + + + + + test + + + + test + + + + comment + + + + + + + test + + + +
    diff --git a/src/boost/tools/quickbook/test/image-1_5.gold-html b/src/boost/tools/quickbook/test/image-1_5.gold-html new file mode 100644 index 000000000..23c8e6f16 --- /dev/null +++ b/src/boost/tools/quickbook/test/image-1_5.gold-html @@ -0,0 +1,26 @@ + + + + +

    + Images 1.5 +

    +

    + [] [] [] [] [] [] [] + [] +

    +

    + [] [] [] +

    +

    + [] +

    + + diff --git a/src/boost/tools/quickbook/test/image-1_5.quickbook b/src/boost/tools/quickbook/test/image-1_5.quickbook new file mode 100644 index 000000000..0774fd447 --- /dev/null +++ b/src/boost/tools/quickbook/test/image-1_5.quickbook @@ -0,0 +1,19 @@ +[article Images 1.5 + [quickbook 1.5] +] + +[$test.gif] +[$test this.gif] +[$test&this.gif] +[$test.gif [width 10cm] [height 10cm]] +[$test.gif [alt Foo]] +[$test.gif [alt Foobie foobie foo]] +[$test.gif [alt Foo & bar]] +[$test.gif [alt Foo] [width 10cm] [height 10cm]] + +[$ [/comment] test.gif ] +[$ [/comment] test.gif [/comment] ] +[$ [/comment] test.gif [/comment] [alt comment] ] + +[/ This should warn about repeated attribute and then ignore it. ] +[$test.gif [width 10cm] [height 10cm] [width 20cm]] diff --git a/src/boost/tools/quickbook/test/image-1_6.gold b/src/boost/tools/quickbook/test/image-1_6.gold new file mode 100644 index 000000000..d26269ac4 --- /dev/null +++ b/src/boost/tools/quickbook/test/image-1_6.gold @@ -0,0 +1,51 @@ + + +
    + Images 1.6 + + + + + + + + Foo + + + + Foobie foobie foo + + + + Foo & bar + + + + Foo + + + + Foo[] + + + + + + + + + comment + + + + + + + + + + +
    diff --git a/src/boost/tools/quickbook/test/image-1_6.gold-html b/src/boost/tools/quickbook/test/image-1_6.gold-html new file mode 100644 index 000000000..2432d09b0 --- /dev/null +++ b/src/boost/tools/quickbook/test/image-1_6.gold-html @@ -0,0 +1,32 @@ + + + + +

    + Images 1.6 +

    +

    + [] [] [] [] [] [] [] + [] [] +

    +

    + [] [] [] +

    +

    + [] +

    +

    + [] [] +

    + + diff --git a/src/boost/tools/quickbook/test/image-1_6.quickbook b/src/boost/tools/quickbook/test/image-1_6.quickbook new file mode 100644 index 000000000..438c34f5d --- /dev/null +++ b/src/boost/tools/quickbook/test/image-1_6.quickbook @@ -0,0 +1,23 @@ +[article Images 1.6 + [quickbook 1.6] +] + +[$test.gif] +[$test this.gif] +[$test&this.gif] +[$test.gif [width 10cm] [height 10cm]] +[$test.gif [alt Foo]] +[$test.gif [alt Foobie foobie foo]] +[$test.gif [alt Foo & bar]] +[$test.gif [alt Foo] [width 10cm] [height 10cm]] +[$test.gif [alt Foo\[\]] [width 10cm] [height 10cm]] + +[$ [/comment] test.gif ] +[$ [/comment] test.gif [/comment] ] +[$ [/comment] test.gif [/comment] [alt comment] ] + +[/ This should warn about repeated attribute and then ignore it. ] +[$test.gif [width 10cm] [height 10cm] [width 20cm]] + +[$boost:/boost.png] +[$boost:boost.png [width 10cm] [height 10cm] [width 20cm]] diff --git a/src/boost/tools/quickbook/test/import-1_1-fail.quickbook b/src/boost/tools/quickbook/test/import-1_1-fail.quickbook new file mode 100644 index 000000000..ea60df84f --- /dev/null +++ b/src/boost/tools/quickbook/test/import-1_1-fail.quickbook @@ -0,0 +1,8 @@ +[article Expect import Fail +] + +[section Failure] + +[import this-is-not-a-file.cpp] + +[endsect] diff --git a/src/boost/tools/quickbook/test/include-1_1-fail.quickbook b/src/boost/tools/quickbook/test/include-1_1-fail.quickbook new file mode 100644 index 000000000..adb990e59 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_1-fail.quickbook @@ -0,0 +1,8 @@ +[article Expect xinclude Fail +] + +[section Failure] + +[include this-is-not-a-file.qbk] + +[endsect] diff --git a/src/boost/tools/quickbook/test/include-1_5.gold b/src/boost/tools/quickbook/test/include-1_5.gold new file mode 100644 index 000000000..f8a347e2e --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_5.gold @@ -0,0 +1,30 @@ + + +
    + Include Test +
    + <link linkend="include_test_sub_document.test">Test</link> + + Just testing. + +
    +
    + <link linkend="foo.test">Test</link> + + Just testing. + +
    + + Just trying including in a conditional macro. + +
    + <link linkend="foo2.test">Test</link> + + Just testing. + +
    + + With some text around it. + +
    diff --git a/src/boost/tools/quickbook/test/include-1_5.gold-html b/src/boost/tools/quickbook/test/include-1_5.gold-html new file mode 100644 index 000000000..5a92021b4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_5.gold-html @@ -0,0 +1,61 @@ + + + + +

    + Include Test +

    +
    +

    + Table of contents +

    + +
    +

    + Just trying including in a conditional macro. +

    +

    + With some text around it. +

    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include-1_5.quickbook b/src/boost/tools/quickbook/test/include-1_5.quickbook new file mode 100644 index 000000000..972012192 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_5.quickbook @@ -0,0 +1,17 @@ +[article Include Test + [quickbook 1.5] + [id include-test] +] + +[include include-inc-1_5.quickbook] +[include .\include-inc.quickbook] +[include:foo include-inc.quickbook] +[include empty-inc.quickbook] + +[def __defined__] + +[? __undefined__ [include:foo1 include-inc.quickbook] ] +[? __undefined__ [include:foo1 not_a_file.quickbook] ] +[? __defined__ + Just trying including in a conditional macro. [include:foo2 include-inc.quickbook] + With some text around it.] diff --git a/src/boost/tools/quickbook/test/include-1_6.gold b/src/boost/tools/quickbook/test/include-1_6.gold new file mode 100644 index 000000000..f5b5af358 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_6.gold @@ -0,0 +1,30 @@ + + +
    + Include Test +
    + <link linkend="include-test.test">Test</link> + + Just testing. + +
    +
    + <link linkend="foo.test">Test</link> + + Just testing. + +
    + + Just trying including in a conditional macro. + +
    + <link linkend="foo2.test">Test</link> + + Just testing. + +
    + + With some text around it. + +
    diff --git a/src/boost/tools/quickbook/test/include-1_6.gold-html b/src/boost/tools/quickbook/test/include-1_6.gold-html new file mode 100644 index 000000000..f7f45f34a --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_6.gold-html @@ -0,0 +1,61 @@ + + + + +

    + Include Test +

    +
    +

    + Table of contents +

    + +
    +

    + Just trying including in a conditional macro. +

    +

    + With some text around it. +

    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include-1_6.quickbook b/src/boost/tools/quickbook/test/include-1_6.quickbook new file mode 100644 index 000000000..29a761192 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_6.quickbook @@ -0,0 +1,15 @@ +[article Include Test + [quickbook 1.6] + [id include-test] +] + +[include include-inc.quickbook] +[include:foo include-inc.quickbook] + +[def __defined__] + +[? __undefined__ [include:foo1 include-inc.quickbook] ] +[? __undefined__ [include:foo1 not-a-file.quickbook] ] +[? __defined__ + Just trying including in a conditional macro. [include:foo2 include-inc.quickbook] + With some text around it.] diff --git a/src/boost/tools/quickbook/test/include-1_7.gold b/src/boost/tools/quickbook/test/include-1_7.gold new file mode 100644 index 000000000..206509bf2 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_7.gold @@ -0,0 +1,36 @@ + + +
    + Include Test +
    + <link linkend="include-test.test">Test</link> + + Just testing. + +
    +
    + <link linkend="foo.test">Test</link> + + Just testing. + +
    +
    + <link linkend="foo0.test">Test</link> + + Just testing. + +
    + + Just trying including in a conditional macro. + +
    + <link linkend="foo2.test">Test</link> + + Just testing. + +
    + + With some text around it. + +
    diff --git a/src/boost/tools/quickbook/test/include-1_7.gold-html b/src/boost/tools/quickbook/test/include-1_7.gold-html new file mode 100644 index 000000000..b92d56298 --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_7.gold-html @@ -0,0 +1,74 @@ + + + + +

    + Include Test +

    +
    +

    + Table of contents +

    + +
    +

    + Just trying including in a conditional macro. +

    +

    + With some text around it. +

    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include-1_7.quickbook b/src/boost/tools/quickbook/test/include-1_7.quickbook new file mode 100644 index 000000000..481e4130a --- /dev/null +++ b/src/boost/tools/quickbook/test/include-1_7.quickbook @@ -0,0 +1,18 @@ +[article Include Test + [quickbook 1.7] + [id include-test] +] + +[include include-inc.quickbook] +[include:foo include-inc.quickbook] + +[template id2[] include-inc] +[include:foo0 [id2].quickbook] + +[def __defined__] + +[? __undefined__ [include:foo1 include-inc.quickbook] ] +[? __undefined__ [include:foo1 not-a-file.quickbook] ] +[? __defined__ + Just trying including in a conditional macro. [include:foo2 include-inc.quickbook] + With some text around it.] diff --git a/src/boost/tools/quickbook/test/include-inc-1_5.quickbook b/src/boost/tools/quickbook/test/include-inc-1_5.quickbook new file mode 100644 index 000000000..1dcbff9ff --- /dev/null +++ b/src/boost/tools/quickbook/test/include-inc-1_5.quickbook @@ -0,0 +1,6 @@ +[article Include Test Sub Document + [quickbook 1.5] + [id include-sub] +] + +[/ Empty. Shouldn't really need this comment.] diff --git a/src/boost/tools/quickbook/test/include-inc.quickbook b/src/boost/tools/quickbook/test/include-inc.quickbook new file mode 100644 index 000000000..1fa61608b --- /dev/null +++ b/src/boost/tools/quickbook/test/include-inc.quickbook @@ -0,0 +1,9 @@ +[/ I'm trying not to break existing behaviour even when buggy. + In this case, this section will get an id using the title from + the previous 'include'.] + +[section:test Test] + +Just testing. + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/Jamfile.v2 b/src/boost/tools/quickbook/test/include/Jamfile.v2 new file mode 100644 index 000000000..a40bf5543 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/Jamfile.v2 @@ -0,0 +1,48 @@ +# +# Copyright (c) 2011 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/test/includes + : requirements + msvc:off + ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +test-suite quickbook.test : + [ quickbook-test import-basic-1.6 ] + [ quickbook-test filename ] + [ quickbook-test filename-1_7 ] + [ quickbook-test filename-path : : : sub ] + [ quickbook-test filename_path-1_7 : : : sub ] + [ quickbook-test doc-title1-1.5 ] + [ quickbook-test doc-title1a-1.5 ] + [ quickbook-test section ] + [ quickbook-test section-unclosed ] + [ quickbook-test templates-1.5 ] + [ quickbook-test templates-1.6 ] + [ quickbook-test macros-1.5 ] + [ quickbook-test macros-1.6 ] + [ quickbook-test code-import ] + [ quickbook-test code-include ] + [ quickbook-test include-id-1.5 ] + [ quickbook-test include-id-1.6 ] + [ quickbook-test include_id_unbalanced-1_6 ] + [ quickbook-error-test section-fail1 ] + [ quickbook-error-test section-fail2 ] + [ quickbook-test in_section-1_5 ] + [ quickbook-test in_section-1_6 ] + [ quickbook-test compatibility-1_1 ] + [ quickbook-test compatibility-1_5 ] + [ quickbook-test compatibility-1_6 ] + [ quickbook-test source_mode-1_5 ] + [ quickbook-test source_mode-1_6 ] + [ quickbook-test nested_compatibility-1_5 ] + [ quickbook-test nested_compatibility-1_6 ] + [ quickbook-test template_include-1_7 ] + [ quickbook-test glob-1_7 ] + ; diff --git a/src/boost/tools/quickbook/test/include/code-import.gold b/src/boost/tools/quickbook/test/include/code-import.gold new file mode 100644 index 000000000..12089ece2 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/code-import.gold @@ -0,0 +1,138 @@ + + +
    + Import + + This is the foo function. + + + This description can have paragraphs... + + + + + lists + + + + + etc. + + + + + And any quickbook block markup. + + +std::string foo() +{ + // return 'em, foo man! + return "foo"; +} + + + + This is the Python foo + function. + + + This description can have paragraphs... + + + + + lists + + + + + etc. + + + + + And any quickbook block markup. + + +def foo(): + # return 'em, foo man! + return "foo" + + + + This is the C foo function. + + + This description can have paragraphs... + + + + + lists + + + + + etc. + + + + + And any quickbook block markup. + + +char* foo() +{ + // return 'em, foo man! + return "foo"; +} + + + +class x +{ +public: + + x() : n(0) + { + } + + ~x() + { + } + + int get() const + { + return n; + } + + void set(int n_) + { + n = n_; + } +}; + + + + + + Constructor + + + + + Destructor + + + + + Get the n member variable + + + + + Set the n member variable + + + +
    diff --git a/src/boost/tools/quickbook/test/include/code-import.gold-html b/src/boost/tools/quickbook/test/include/code-import.gold-html new file mode 100644 index 000000000..1fbe10557 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/code-import.gold-html @@ -0,0 +1,148 @@ + + + + +

    + Import +

    +

    + This is the foo + function. +

    +

    + This description can have paragraphs... +

    +
      +
    • +
      + lists +
      +
    • +
    • +
      + etc. +
      +
    • +
    +

    + And any quickbook block markup. +

    +

    +

    std::string foo()
    +{
    +    // return 'em, foo man!
    +    return "foo";
    +}
    +
    +

    +

    + This is the Python foo + function. +

    +

    + This description can have paragraphs... +

    +
      +
    • +
      + lists +
      +
    • +
    • +
      + etc. +
      +
    • +
    +

    + And any quickbook block markup. +

    +

    +

    def foo():
    +    # return 'em, foo man!
    +    return "foo"
    +
    +

    +

    + This is the C foo + function. +

    +

    + This description can have paragraphs... +

    +
      +
    • +
      + lists +
      +
    • +
    • +
      + etc. +
      +
    • +
    +

    + And any quickbook block markup. +

    +

    +

    char* foo()
    +{
    +    // return 'em, foo man!
    +    return "foo";
    +}
    +
    +

    +

    +

    class x
    +{
    +public:
    +
    +    (1)x() : n(0)
    +    {
    +    }
    +
    +    (2)~x()
    +    {
    +    }
    +
    +    (3)int get() const
    +    {
    +        return n;
    +    }
    +
    +    (4)void set(int n_)
    +    {
    +        n = n_;
    +    }
    +};
    +
    +

    +
    +
    + (1) +

    + Constructor +

    +
    +
    + (2) +

    + Destructor +

    +
    +
    + (3) +

    + Get the n member variable +

    +
    +
    + (4) +

    + Set the n member variable +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/code-import.quickbook b/src/boost/tools/quickbook/test/include/code-import.quickbook new file mode 100644 index 000000000..70faf0776 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/code-import.quickbook @@ -0,0 +1,13 @@ +[article Import] + +[import ../stub.c] +[import ../stub.py] +[import ../stub.cpp] + +[foo] + +[foo_py] + +[foo_c] + +[class_] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/code-include.gold b/src/boost/tools/quickbook/test/include/code-include.gold new file mode 100644 index 000000000..dfa697fd8 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/code-include.gold @@ -0,0 +1,50 @@ + + +
    + Include + + This should appear when stub.c is included. + + + This is the C foo function. + + + This description can have paragraphs... + + + + + lists + + + + + etc. + + + + + And any quickbook block markup. + +char* foo() +{ + // return 'em, foo man! + return "foo"; +} + + + This should appear when stub.py is included. + + + This should appear when stub.cpp is included. + + + [foo] + + + [foo_py] + + + [foo_c] + +
    diff --git a/src/boost/tools/quickbook/test/include/code-include.gold-html b/src/boost/tools/quickbook/test/include/code-include.gold-html new file mode 100644 index 000000000..100e34a1b --- /dev/null +++ b/src/boost/tools/quickbook/test/include/code-include.gold-html @@ -0,0 +1,55 @@ + + + + +

    + Include +

    +

    + This should appear when stub.c is included. +

    +

    + This is the C foo + function. +

    +

    + This description can have paragraphs... +

    +
      +
    • +
      + lists +
      +
    • +
    • +
      + etc. +
      +
    • +
    +

    + And any quickbook block markup. +

    +
    char* foo()
    +{
    +    // return 'em, foo man!
    +    return "foo";
    +}
    +
    +

    + This should appear when stub.py is included. +

    +

    + This should appear when stub.cpp is included. +

    +

    + [foo] +

    +

    + [foo_py] +

    +

    + [foo_c] +

    + + diff --git a/src/boost/tools/quickbook/test/include/code-include.quickbook b/src/boost/tools/quickbook/test/include/code-include.quickbook new file mode 100644 index 000000000..8a47538f1 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/code-include.quickbook @@ -0,0 +1,16 @@ +[article Include +[quickbook 1.6] +] + +[include ../stub.c] +[include ../stub.py] +[include ../stub.cpp] + +[/ These shouldn't expand ] + +[foo] + +[foo_py] + +[foo_c] + diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_1.gold b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold new file mode 100644 index 000000000..961d6aa51 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold @@ -0,0 +1,362 @@ + + +
    + Test Compatibility Mode +
    + Outer +
    + Inner + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + Inner with id +
    +
    +
    + Include compatibility 1.1 +
    + Inner + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + Inner with id +
    +
    +
    + Include compatibility 1.5 +
    + <link linkend="test_compatibility_mode.collision.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="test_compatibility_mode.collision.x">Inner with id</link> +
    +
    +
    + Include compatibility 1.6 +
    + <link linkend="compatibility.collision.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="compatibility.collision.x">Inner with id</link> +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html new file mode 100644 index 000000000..6a811781a --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html @@ -0,0 +1,424 @@ + + + + +

    + Test Compatibility Mode +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Outer +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.1 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.5 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.6 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook b/src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook new file mode 100644 index 000000000..afdd39dc4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook @@ -0,0 +1,18 @@ +[article Test Compatibility Mode +[quickbook 1.6] +[compatibility-mode 1.1] +[id compatibility] +] + +[section:collision Outer] +[include compatibility-inc.quickbook] +[endsect] +[section:collision Include compatibility 1.1] +[include compatibility-inc_1_1.quickbook] +[endsect] +[section:collision Include compatibility 1.5] +[include compatibility-inc_1_5.quickbook] +[endsect] +[section:collision Include compatibility 1.6] +[include compatibility-inc_1_6.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_5.gold b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold new file mode 100644 index 000000000..79245caf1 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold @@ -0,0 +1,362 @@ + + +
    + Test Compatibility Mode +
    + <link linkend="compatibility.collision">Outer</link> +
    + <link linkend="test_compatibility_mode.collision.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="test_compatibility_mode.collision.x">Inner with id</link> +
    +
    +
    + <link linkend="compatibility.collision0">Include compatibility 1.1</link> +
    + Inner + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + Inner with id +
    +
    +
    + <link linkend="compatibility.collision1">Include compatibility 1.5</link> +
    + <link linkend="test_compatibility_mode.collision.inner0">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="test_compatibility_mode.collision.x0">Inner with id</link> +
    +
    +
    + <link linkend="compatibility.collision2">Include compatibility 1.6</link> +
    + <link linkend="compatibility.collision.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="compatibility.collision.x">Inner with id</link> +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html new file mode 100644 index 000000000..945b00f0b --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html @@ -0,0 +1,424 @@ + + + + +

    + Test Compatibility Mode +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Outer +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.1 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.5 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.6 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook b/src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook new file mode 100644 index 000000000..9593df720 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook @@ -0,0 +1,18 @@ +[article Test Compatibility Mode +[compatibility-mode 1.5] +[id compatibility] +[quickbook 1.6] +] + +[section:collision Outer] +[include compatibility-inc.quickbook] +[endsect] +[section:collision Include compatibility 1.1] +[include compatibility-inc_1_1.quickbook] +[endsect] +[section:collision Include compatibility 1.5] +[include compatibility-inc_1_5.quickbook] +[endsect] +[section:collision Include compatibility 1.6] +[include compatibility-inc_1_6.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_6.gold b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold new file mode 100644 index 000000000..b3e51277f --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold @@ -0,0 +1,362 @@ + + +
    + Test Compatibility Mode +
    + <link linkend="compatibility.collision">Outer</link> +
    + <link linkend="compatibility.collision.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="compatibility.collision.x">Inner with id</link> +
    +
    +
    + <link linkend="compatibility.collision0">Include compatibility 1.1</link> +
    + Inner + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + Inner with id +
    +
    +
    + <link linkend="compatibility.collision1">Include compatibility 1.5</link> +
    + <link linkend="compatibility.collision1.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="compatibility.collision1.x">Inner with id</link> +
    +
    +
    + <link linkend="compatibility.collision2">Include compatibility 1.6</link> +
    + <link linkend="compatibility.collision2.inner">Inner</link> + + Header + + + Heading1 + + + Header + with id + + + Heading1 + with id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + With Title + + + + + + + + + + + + + + +
    + + Id and Title + + + + + + + + + + + + + + +
    +
    +
    + <link linkend="compatibility.collision2.x">Inner with id</link> +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html new file mode 100644 index 000000000..eff72c000 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html @@ -0,0 +1,424 @@ + + + + +

    + Test Compatibility Mode +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Outer +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.1 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.5 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    +
    +

    + Include compatibility 1.6 +

    +
    +
    +
    +

    + Inner +

    +
    +

    + Header +

    +

    + Heading1 +

    +

    + Header with id +

    +

    + Heading1 with id +

    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    With Title
    +
    +
    +
    +
    + + + + + + + + + + + + +
    Id and Title
    +
    +
    +
    +
    +
    +
    +

    + Inner with id +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook b/src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook new file mode 100644 index 000000000..46880a8c3 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook @@ -0,0 +1,17 @@ +[article Test Compatibility Mode +[id compatibility] +[quickbook 1.6] +] + +[section:collision Outer] +[include compatibility-inc.quickbook] +[endsect] +[section:collision Include compatibility 1.1] +[include compatibility-inc_1_1.quickbook] +[endsect] +[section:collision Include compatibility 1.5] +[include compatibility-inc_1_5.quickbook] +[endsect] +[section:collision Include compatibility 1.6] +[include compatibility-inc_1_6.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc.quickbook new file mode 100644 index 000000000..66fbb54ee --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-inc.quickbook @@ -0,0 +1,31 @@ +[section Inner] + +[heading Header] + +[h1 Heading1] + +[heading:x1 Header with id] + +[h1:x2 Heading1 with id] + +[table +[[]][[]] +] + +[table:withid +[[]][[]] +] + +[table With Title +[[]][[]] +] + +[table:x Id and Title +[[]][[]] +] + + +[endsect] + +[section:x Inner with id] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook new file mode 100644 index 000000000..89b4d6554 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook @@ -0,0 +1,33 @@ +[compatibility-mode 1.1] + +[section Inner] + +[heading Header] + +[h1 Heading1] + +[heading:x1 Header with id] + +[h1:x2 Heading1 with id] + +[table +[[]][[]] +] + +[table:withid +[[]][[]] +] + +[table With Title +[[]][[]] +] + +[table:x Id and Title +[[]][[]] +] + + +[endsect] + +[section:x Inner with id] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook new file mode 100644 index 000000000..5551da5b3 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook @@ -0,0 +1,33 @@ +[compatibility-mode 1.5] + +[section Inner] + +[heading Header] + +[h1 Heading1] + +[heading:x1 Header with id] + +[h1:x2 Heading1 with id] + +[table +[[]][[]] +] + +[table:withid +[[]][[]] +] + +[table With Title +[[]][[]] +] + +[table:x Id and Title +[[]][[]] +] + + +[endsect] + +[section:x Inner with id] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook new file mode 100644 index 000000000..61f3c7bcd --- /dev/null +++ b/src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook @@ -0,0 +1,33 @@ +[compatibility-mode 1.6] + +[section Inner] + +[heading Header] + +[h1 Heading1] + +[heading:x1 Header with id] + +[h1:x2 Heading1 with id] + +[table +[[]][[]] +] + +[table:withid +[[]][[]] +] + +[table With Title +[[]][[]] +] + +[table:x Id and Title +[[]][[]] +] + + +[endsect] + +[section:x Inner with id] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold new file mode 100644 index 000000000..f2fb5321d --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold @@ -0,0 +1,27 @@ + + +
    + Doc Title 1 + + a1 + + + inc1 + + + a2 + + + inc2 + + + a3 + + + inc3 + + + a4 + +
    diff --git a/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html new file mode 100644 index 000000000..69848ef9f --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html @@ -0,0 +1,30 @@ + + + + +

    + Doc Title 1 +

    +

    + a1 +

    +

    + inc1 +

    +

    + a2 +

    +

    + inc2 +

    +

    + a3 +

    +

    + inc3 +

    +

    + a4 +

    + + diff --git a/src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook new file mode 100644 index 000000000..ec7a56c86 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook @@ -0,0 +1,27 @@ +[article Doc Title 1 +[quickbook 1.5] +] + +[/ Doc Titles for included files is a little odd. You generally don't see + titles in them, the only way to detect them is through the generated ids. + So that's what this test is for. + + The second include has a title, because that isn't scoped by file it will + continue to be used to generated ids for the following included files - + but not in this document as the document id for the file is generated + for the whole file at the start. + ] + +[heading a1] + +[include doc-title1-inc1.quickbook] + +[heading a2] + +[include doc-title1-inc2.quickbook] + +[heading a3] + +[include doc-title1-inc3.quickbook] + +[heading a4] diff --git a/src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook new file mode 100644 index 000000000..e17ad31d8 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook @@ -0,0 +1 @@ +[heading inc1] diff --git a/src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook new file mode 100644 index 000000000..e8b18d37b --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook @@ -0,0 +1,4 @@ +[article Doc Title 1 Inc2 +] + +[heading inc2] diff --git a/src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook new file mode 100644 index 000000000..501e3320b --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook @@ -0,0 +1 @@ +[heading inc3] diff --git a/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold new file mode 100644 index 000000000..0ee226e9e --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold @@ -0,0 +1,26 @@ + + +
    + Doc Title 1a + + a1 + + + inc1 + + + a2 + + + inc2 + + + a3 + + + inc3 + + + a4 + +
    diff --git a/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html new file mode 100644 index 000000000..f29d8cdb7 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html @@ -0,0 +1,30 @@ + + + + +

    + Doc Title 1a +

    +

    + a1 +

    +

    + inc1 +

    +

    + a2 +

    +

    + inc2 +

    +

    + a3 +

    +

    + inc3 +

    +

    + a4 +

    + + diff --git a/src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook new file mode 100644 index 000000000..dc12d5cb7 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook @@ -0,0 +1,20 @@ +[article Doc Title 1a +[quickbook 1.5] +[id doc-title] +] + +[/ A repeat of doc-title1, but with an explicit id. ] + +[heading a1] + +[include doc-title1-inc1.quickbook] + +[heading a2] + +[include doc-title1-inc2.quickbook] + +[heading a3] + +[include doc-title1-inc3.quickbook] + +[heading a4] diff --git a/src/boost/tools/quickbook/test/include/filename-1_7.gold b/src/boost/tools/quickbook/test/include/filename-1_7.gold new file mode 100644 index 000000000..935b42642 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename-1_7.gold @@ -0,0 +1,46 @@ + + +
    + Filename Test + + filename-1_7.quickbook + + + Test + 1 + + + sub/filename_include1.quickbook + + + sub/../filename_include2.quickbook + + + Test + 2 + + + filename_include2.quickbook + + + Test + 3 + + + sub/filename_include1.quickbook + + + sub/../filename_include2.quickbook + + + Test + 4 + + + sub/filename_include1.quickbook + + + sub/../filename_include2.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/filename-1_7.gold-html b/src/boost/tools/quickbook/test/include/filename-1_7.gold-html new file mode 100644 index 000000000..50bd60546 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename-1_7.gold-html @@ -0,0 +1,45 @@ + + + + +

    + Filename Test +

    +

    + filename-1_7.quickbook +

    +

    + Test 1 +

    +

    + sub/filename_include1.quickbook +

    +

    + sub/../filename_include2.quickbook +

    +

    + Test 2 +

    +

    + filename_include2.quickbook +

    +

    + Test 3 +

    +

    + sub/filename_include1.quickbook +

    +

    + sub/../filename_include2.quickbook +

    +

    + Test 4 +

    +

    + sub/filename_include1.quickbook +

    +

    + sub/../filename_include2.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/filename-1_7.quickbook b/src/boost/tools/quickbook/test/include/filename-1_7.quickbook new file mode 100644 index 000000000..9d462af89 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename-1_7.quickbook @@ -0,0 +1,21 @@ +[article Filename Test +[quickbook 1.7] +] + +__FILENAME__ + +[heading Test 1] + +[include sub/*.quickbook] + +[heading Test 2] + +[include filename_include?.quickbook] + +[heading Test 3] + +[include su\[b\]/filename\\_include1.quickbook] + +[heading Test 4] + +[include su\\b/*.quickbook] diff --git a/src/boost/tools/quickbook/test/include/filename-path.gold b/src/boost/tools/quickbook/test/include/filename-path.gold new file mode 100644 index 000000000..f77ab84a8 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename-path.gold @@ -0,0 +1,18 @@ + + +
    + Filename test with include path + + filename-path.quickbook + + + filename_include1.quickbook + + + ../filename_include2.quickbook + + + filename_include2.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/filename-path.gold-html b/src/boost/tools/quickbook/test/include/filename-path.gold-html new file mode 100644 index 000000000..d7a6e2e00 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename-path.gold-html @@ -0,0 +1,21 @@ + + + + +

    + Filename test with include path +

    +

    + filename-path.quickbook +

    +

    + filename_include1.quickbook +

    +

    + ../filename_include2.quickbook +

    +

    + filename_include2.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/filename-path.quickbook b/src/boost/tools/quickbook/test/include/filename-path.quickbook new file mode 100644 index 000000000..6121df5c5 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename-path.quickbook @@ -0,0 +1,9 @@ +[article Filename test with include path +[quickbook 1.5] +] + +__FILENAME__ + +[include filename_include1.quickbook] + +[include filename_include2.quickbook] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/filename.gold b/src/boost/tools/quickbook/test/include/filename.gold new file mode 100644 index 000000000..3e895eb4e --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename.gold @@ -0,0 +1,18 @@ + + +
    + Filename Test + + filename.quickbook + + + sub/filename_include1.quickbook + + + sub/../filename_include2.quickbook + + + filename_include2.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/filename.gold-html b/src/boost/tools/quickbook/test/include/filename.gold-html new file mode 100644 index 000000000..e722f9307 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename.gold-html @@ -0,0 +1,21 @@ + + + + +

    + Filename Test +

    +

    + filename.quickbook +

    +

    + sub/filename_include1.quickbook +

    +

    + sub/../filename_include2.quickbook +

    +

    + filename_include2.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/filename.quickbook b/src/boost/tools/quickbook/test/include/filename.quickbook new file mode 100644 index 000000000..37ff37b5c --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename.quickbook @@ -0,0 +1,9 @@ +[article Filename Test +[quickbook 1.5] +] + +__FILENAME__ + +[include sub/filename_include1.quickbook] + +[include filename_include2.quickbook] diff --git a/src/boost/tools/quickbook/test/include/filename_include2.quickbook b/src/boost/tools/quickbook/test/include/filename_include2.quickbook new file mode 100644 index 000000000..f9d479a93 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename_include2.quickbook @@ -0,0 +1 @@ +__FILENAME__ \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/filename_path-1_7.gold b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold new file mode 100644 index 000000000..6f52dafc1 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold @@ -0,0 +1,18 @@ + + +
    + Filename test with include path + + filename_path-1_7.quickbook + + + filename_include1.quickbook + + + ../filename_include2.quickbook + + + filename_include2.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html new file mode 100644 index 000000000..190f5d240 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html @@ -0,0 +1,21 @@ + + + + +

    + Filename test with include path +

    +

    + filename_path-1_7.quickbook +

    +

    + filename_include1.quickbook +

    +

    + ../filename_include2.quickbook +

    +

    + filename_include2.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook b/src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook new file mode 100644 index 000000000..741d76ad5 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook @@ -0,0 +1,7 @@ +[article Filename test with include path +[quickbook 1.7] +] + +__FILENAME__ + +[include filename_include?.quickbook] diff --git a/src/boost/tools/quickbook/test/include/glob-1_7.gold b/src/boost/tools/quickbook/test/include/glob-1_7.gold new file mode 100644 index 000000000..ba31ae961 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob-1_7.gold @@ -0,0 +1,41 @@ + + +
    + Glob Test +
    + <link linkend="glob_test.t1_0">Test 1.0</link> +
    +
    + <link linkend="glob_test.t1_1">Test 1.1</link> + + A + +
    +
    + <link linkend="glob_test.t1_2">Test 1.2</link> + + B + +
    +
    + <link linkend="glob_test.t1_3">Test 1.3</link> + + B + +
    +
    + <link linkend="glob_test.t2_1">Test 2.1</link> + + A + + + B + +
    +
    + <link linkend="glob_test.t2_2">Test 2.2</link> + + B + +
    +
    diff --git a/src/boost/tools/quickbook/test/include/glob-1_7.gold-html b/src/boost/tools/quickbook/test/include/glob-1_7.gold-html new file mode 100644 index 000000000..9b53c2be4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob-1_7.gold-html @@ -0,0 +1,94 @@ + + + + +

    + Glob Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Test 1.0 +

    +
    +
    +
    +
    +

    + Test 1.1 +

    +
    +

    + A +

    +
    +
    +
    +

    + Test 1.2 +

    +
    +

    + B +

    +
    +
    +
    +

    + Test 1.3 +

    +
    +

    + B +

    +
    +
    +
    +

    + Test 2.1 +

    +
    +

    + A +

    +

    + B +

    +
    +
    +
    +

    + Test 2.2 +

    +
    +

    + B +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/glob-1_7.quickbook b/src/boost/tools/quickbook/test/include/glob-1_7.quickbook new file mode 100644 index 000000000..826c12be8 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob-1_7.quickbook @@ -0,0 +1,39 @@ +[article Glob Test +[quickbook 1.7] +] + +[section:t1_0 Test 1.0] + +[include glob0/*] + +[endsect] [/t1_0] + +[section:t1_1 Test 1.1] + +[include glob1/*] + +[endsect] [/t1_1] + +[section:t1_2 Test 1.2] + +[include glob1/*/*] + +[endsect] [/t1_2] + +[section:t1_3 Test 1.3] + +[include glob1/*/b.qbk] + +[endsect] [/t1_3] + +[section:t2_1 Test 2.1] + +[include glob2/*] + +[endsect] [/t2_1] + +[section:t2_2 Test 2.2] + +[include glob2/*/*] + +[endsect] [/t2_2] diff --git a/src/boost/tools/quickbook/test/include/glob1/a.qbk b/src/boost/tools/quickbook/test/include/glob1/a.qbk new file mode 100644 index 000000000..f70f10e4d --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob1/a.qbk @@ -0,0 +1 @@ +A diff --git a/src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk b/src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk new file mode 100644 index 000000000..223b7836f --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk @@ -0,0 +1 @@ +B diff --git a/src/boost/tools/quickbook/test/include/glob2/a.qbk b/src/boost/tools/quickbook/test/include/glob2/a.qbk new file mode 100644 index 000000000..160580801 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob2/a.qbk @@ -0,0 +1,3 @@ +A + +[include */*.qbk] diff --git a/src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk b/src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk new file mode 100644 index 000000000..223b7836f --- /dev/null +++ b/src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk @@ -0,0 +1 @@ +B diff --git a/src/boost/tools/quickbook/test/include/import-basic-1.6.gold b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold new file mode 100644 index 000000000..706589aef --- /dev/null +++ b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold @@ -0,0 +1,11 @@ + + +
    + Import Quickbook Test + + Macro 1: import-basic-inc1.quickbook Template 1: import-basic-1.6.quickbook + + + Macro 2: import-basic-inc2.quickbook Template 2: import-basic-1.6.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html new file mode 100644 index 000000000..bbc87b7d7 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html @@ -0,0 +1,15 @@ + + + + +

    + Import Quickbook Test +

    +

    + Macro 1: import-basic-inc1.quickbook Template 1: import-basic-1.6.quickbook +

    +

    + Macro 2: import-basic-inc2.quickbook Template 2: import-basic-1.6.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook b/src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook new file mode 100644 index 000000000..934db6a9e --- /dev/null +++ b/src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook @@ -0,0 +1,12 @@ +[article Import Quickbook Test +[quickbook 1.6] +[id import-1.6] +] + +[import import-basic-inc1.quickbook] + +macro1 [template1] + +[import import-basic-inc2.quickbook] + +macro2 [template2] diff --git a/src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook b/src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook new file mode 100644 index 000000000..469922845 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook @@ -0,0 +1,4 @@ +This shouldn't show: __FILENAME__ + +[def macro1 Macro 1: __FILENAME__] +[template template1 Template 1: __FILENAME__] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook b/src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook new file mode 100644 index 000000000..0cbaaa11d --- /dev/null +++ b/src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook @@ -0,0 +1,10 @@ +[article Macro import. +[quickbook 1.6] +] + +[/ TOOD: Should I have a special docinfo type for this kind of thing? ] + +This shouldn't show: __FILENAME__ + +[def macro2 Macro 2: __FILENAME__] +[template template2 Template 2: __FILENAME__] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/in_section-1_5.gold b/src/boost/tools/quickbook/test/include/in_section-1_5.gold new file mode 100644 index 000000000..b55eb73f3 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-1_5.gold @@ -0,0 +1,88 @@ + + +
    + Include in section 1.5 +
    + <link linkend="include_in_section_1_5.container">Container</link> + + Test1 + +
    + + Test2 + + + Simple + include + +
    + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    + + Test1 + +
    + + Test2 + + + Simple + include + +
    + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    + <link linkend="include_in_section_1_5.container2">Container2</link> + + Test1 + +
    + + Test2 + + + Simple + include + +
    + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/in_section-1_5.gold-html b/src/boost/tools/quickbook/test/include/in_section-1_5.gold-html new file mode 100644 index 000000000..5bad6b570 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-1_5.gold-html @@ -0,0 +1,120 @@ + + + + +

    + Include in section 1.5 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +

    + Test1 +

    +
    +

    + Container +

    +
    +

    + Test1 +

    +

    + Test1 +

    +
    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +

    + Container2 +

    +
    +

    + Test1 +

    +

    + Test1 +

    +
    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/in_section-1_5.quickbook b/src/boost/tools/quickbook/test/include/in_section-1_5.quickbook new file mode 100644 index 000000000..28183096a --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-1_5.quickbook @@ -0,0 +1,16 @@ +[article Include in section 1.5 +[quickbook 1.5] +] + +[section:container Container] +[include in_section-inc1.quickbook] +[include in_section-inc2.quickbook] +[endsect] + +[include in_section-inc1.quickbook] +[include in_section-inc2.quickbook] + +[section:container2 Container2] +[include in_section-inc1.quickbook] +[include in_section-inc2.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/in_section-1_6.gold b/src/boost/tools/quickbook/test/include/in_section-1_6.gold new file mode 100644 index 000000000..52c18a706 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-1_6.gold @@ -0,0 +1,108 @@ + + +
    + Include in section 1.6 +
    + <link linkend="include_in_section_1_6.container">Container</link> +
    + Include in section include 1 + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    +
    + Include in section include 2 + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    +
    +
    + Include in section include 1 + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    +
    + Include in section include 2 + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    +
    + <link linkend="include_in_section_1_6.container2">Container2</link> +
    + Include in section include 1 + + Test1 + +
    + + Test2 + + + Simple include + +
    +
    +
    + Include in section include 2 + + Test1 + +
    + + Test2 + + + Simple + include + +
    +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/in_section-1_6.gold-html b/src/boost/tools/quickbook/test/include/in_section-1_6.gold-html new file mode 100644 index 000000000..cc2c36ac0 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-1_6.gold-html @@ -0,0 +1,238 @@ + + + + +

    + Include in section 1.6 +

    + +
    +

    + Container +

    +
    +
    +
    +

    + Include in section include 1 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Include in section include 2 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +
    +

    + Include in section include 1 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Include in section include 2 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Container2 +

    +
    +
    +
    +

    + Include in section include 1 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    +

    + Include in section include 2 +

    +
    +

    + Table of contents +

    + +
    +

    + Test1 +

    +
    +
    +

    + Test2 +

    +

    + Simple include +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/in_section-1_6.quickbook b/src/boost/tools/quickbook/test/include/in_section-1_6.quickbook new file mode 100644 index 000000000..686f97ec4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-1_6.quickbook @@ -0,0 +1,16 @@ +[article Include in section 1.6 +[quickbook 1.6] +] + +[section:container Container] +[include in_section-inc1.quickbook] +[include in_section-inc2.quickbook] +[endsect] + +[include in_section-inc1.quickbook] +[include in_section-inc2.quickbook] + +[section:container2 Container2] +[include in_section-inc1.quickbook] +[include in_section-inc2.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/in_section-inc1.quickbook b/src/boost/tools/quickbook/test/include/in_section-inc1.quickbook new file mode 100644 index 000000000..f74bf5dbd --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-inc1.quickbook @@ -0,0 +1,13 @@ +[article Include in section include 1 +[quickbook 1.6] +] + +[h1 Test1] + +[section:inner] + +[h1 Test2] + +[include include-id-inc1.quickbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/include/in_section-inc2.quickbook b/src/boost/tools/quickbook/test/include/in_section-inc2.quickbook new file mode 100644 index 000000000..0a30aaa74 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/in_section-inc2.quickbook @@ -0,0 +1,14 @@ +[article Include in section include 2 +[quickbook 1.6] +[id section_include] +] + +[h1 Test1] + +[section:inner] + +[h1 Test2] + +[include include-id-inc1.quickbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/include/include-id-1.5.gold b/src/boost/tools/quickbook/test/include/include-id-1.5.gold new file mode 100644 index 000000000..4944d08d4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-1.5.gold @@ -0,0 +1,26 @@ + + +
    + Include Id Test + + Simple include + + + Simple include + + + Title, no id + + + Title, no id + + + Title + with id + + + Title + with id + +
    diff --git a/src/boost/tools/quickbook/test/include/include-id-1.5.gold-html b/src/boost/tools/quickbook/test/include/include-id-1.5.gold-html new file mode 100644 index 000000000..4c7b6b230 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-1.5.gold-html @@ -0,0 +1,27 @@ + + + + +

    + Include Id Test +

    +

    + Simple include +

    +

    + Simple include +

    +

    + Title, no id +

    +

    + Title, no id +

    +

    + Title with id +

    +

    + Title with id +

    + + diff --git a/src/boost/tools/quickbook/test/include/include-id-1.5.quickbook b/src/boost/tools/quickbook/test/include/include-id-1.5.quickbook new file mode 100644 index 000000000..dd4b50ad3 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-1.5.quickbook @@ -0,0 +1,10 @@ +[article Include Id Test +[quickbook 1.5] +] + +[include:a include-id-inc1.quickbook] +[include:b include-id-inc1.quickbook] +[include:c include-id-inc2.quickbook] +[include:d include-id-inc2.quickbook] +[include:e include-id-inc3.quickbook] +[include:f include-id-inc3.quickbook] diff --git a/src/boost/tools/quickbook/test/include/include-id-1.6.gold b/src/boost/tools/quickbook/test/include/include-id-1.6.gold new file mode 100644 index 000000000..1f4cb881f --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-1.6.gold @@ -0,0 +1,36 @@ + + +
    + Include Id Test + + Simple include + + + Simple include + +
    + Include without id + + Title, no id + +
    +
    + Include without id + + Title, no id + +
    +
    + Include with id + + Title with id + +
    +
    + Include with id + + Title with id + +
    +
    diff --git a/src/boost/tools/quickbook/test/include/include-id-1.6.gold-html b/src/boost/tools/quickbook/test/include/include-id-1.6.gold-html new file mode 100644 index 000000000..5912dadb0 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-1.6.gold-html @@ -0,0 +1,66 @@ + + + + +

    + Include Id Test +

    +
    +

    + Table of contents +

    + +
    +

    + Simple include +

    +

    + Simple include +

    +
    +

    + Include without id +

    +

    + Title, no id +

    +
    +
    +

    + Include without id +

    +

    + Title, no id +

    +
    +
    +

    + Include with id +

    +

    + Title with id +

    +
    +
    +

    + Include with id +

    +

    + Title with id +

    +
    + + diff --git a/src/boost/tools/quickbook/test/include/include-id-1.6.quickbook b/src/boost/tools/quickbook/test/include/include-id-1.6.quickbook new file mode 100644 index 000000000..d7d5318cd --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-1.6.quickbook @@ -0,0 +1,10 @@ +[article Include Id Test +[quickbook 1.6] +] + +[include:a include-id-inc1.quickbook] +[include:b include-id-inc1.quickbook] +[include:c include-id-inc2.quickbook] +[include:d include-id-inc2.quickbook] +[include:e include-id-inc3.quickbook] +[include:f include-id-inc3.quickbook] diff --git a/src/boost/tools/quickbook/test/include/include-id-inc1.quickbook b/src/boost/tools/quickbook/test/include/include-id-inc1.quickbook new file mode 100644 index 000000000..63a761d56 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-inc1.quickbook @@ -0,0 +1 @@ +[heading Simple include] diff --git a/src/boost/tools/quickbook/test/include/include-id-inc2.quickbook b/src/boost/tools/quickbook/test/include/include-id-inc2.quickbook new file mode 100644 index 000000000..a7dbef41b --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-inc2.quickbook @@ -0,0 +1,5 @@ +[article Include without id +[quickbook 1.5] +] + +[heading Title, no id] diff --git a/src/boost/tools/quickbook/test/include/include-id-inc3.quickbook b/src/boost/tools/quickbook/test/include/include-id-inc3.quickbook new file mode 100644 index 000000000..2bd239825 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include-id-inc3.quickbook @@ -0,0 +1,6 @@ +[article Include with id +[quickbook 1.5] +[id with-id] +] + +[heading Title with id] diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold new file mode 100644 index 000000000..ede21ccbb --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold @@ -0,0 +1,59 @@ + + +
    + Test include ids with unbalanced sections +
    + <link linkend="include1.inc1">Include 1</link> + + Heading + 1 + + + Heading 1 + +
    + <link linkend="include1a.inc1a">Include 1a</link> + + Heading + 2 + + + Heading + 2 + + + X1 + +
    + + X2 + +
    +
    + <link linkend="unbalanced.sect1">Section 1</link> + + X1 + +
    + <link linkend="unbalanced.sect1.sect2">Section 2</link> + + X2 + + + Heading 1 + +
    + + Heading 2 + + + Heading 1 + +
    + + Heading 2 + + + Heading 3 + +
    diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html new file mode 100644 index 000000000..85415e882 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html @@ -0,0 +1,89 @@ + + + + +

    + Test include ids with unbalanced sections +

    +
    +

    + Table of contents +

    + +
    +

    + Heading 2 +

    +

    + Heading 3 +

    +
    +

    + Include 1 +

    +
    +

    + Heading 1 +

    +

    + Heading 1 +

    +

    + X2 +

    +
    +
    +

    + Include 1a +

    +
    +

    + Heading 2 +

    +

    + Heading 2 +

    +

    + X1 +

    +
    +
    +
    +
    +

    + Section 1 +

    +
    +

    + X1 +

    +

    + Heading 2 +

    +

    + Heading 1 +

    +
    +
    +

    + Section 2 +

    +
    +

    + X2 +

    +

    + Heading 1 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook new file mode 100644 index 000000000..b1568d4f9 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook @@ -0,0 +1,19 @@ +[quickbook 1.6] +[article Test include ids with unbalanced sections + [id unbalanced] +] + +[/ Sections start in included files ] + +[include:include1 include_id_unbalanced-inc1.quickbook] +[heading:x1 X1] +[endsect] +[heading:x2 X2] +[endsect] + +[/ Sections end in included files ] +[section:sect1 Section 1] +[heading:x1 X1] +[section:sect2 Section 2] +[heading:x2 X2] +[include:include2 include_id_unbalanced-inc2.quickbook] diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook new file mode 100644 index 000000000..d3214811a --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook @@ -0,0 +1,4 @@ +[section:inc1 Include 1] +[heading:inc1_1 Heading 1] +[include:include1a include_id_unbalanced-inc1a.quickbook] +[heading:inc1_2 Heading 2] diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook new file mode 100644 index 000000000..1bc46b4f5 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook @@ -0,0 +1,3 @@ +[heading:inc1a_1 Heading 1] +[section:inc1a Include 1a] +[heading:inc1a_2 Heading 2] diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook new file mode 100644 index 000000000..37c313cae --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook @@ -0,0 +1,5 @@ +[heading:inc2_1 Heading 1] +[endsect] +[heading:inc2_2 Heading 2] +[include:include2a include_id_unbalanced-inc2a.quickbook] +[heading:inc2_3 Heading 3] diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook new file mode 100644 index 000000000..780fb4057 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook @@ -0,0 +1,3 @@ +[heading:inc2a_1 Heading 1] +[endsect] +[heading:inc2a_2 Heading 2] diff --git a/src/boost/tools/quickbook/test/include/macros-1.5.gold b/src/boost/tools/quickbook/test/include/macros-1.5.gold new file mode 100644 index 000000000..d5e8a5193 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-1.5.gold @@ -0,0 +1,39 @@ + + +
    + Macros Test 1.5 + + Foo:macros-inc1.quickbook + + + Defined conditional phrase. + + + + + __foo__ + + + + + Defined template:macros-1.5.quickbook + + + + + __defined_macro__ + + + + + [not_defined_template] + + + + + _not_defined_macro__ + + + +
    diff --git a/src/boost/tools/quickbook/test/include/macros-1.5.gold-html b/src/boost/tools/quickbook/test/include/macros-1.5.gold-html new file mode 100644 index 000000000..e1a985932 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-1.5.gold-html @@ -0,0 +1,42 @@ + + + + +

    + Macros Test 1.5 +

    +

    + Foo:macros-inc1.quickbook +

    +

    + Defined conditional phrase. +

    +
      +
    • +
      + __foo__ +
      +
    • +
    • +
      + Defined template:macros-1.5.quickbook +
      +
    • +
    • +
      + __defined_macro__ +
      +
    • +
    • +
      + [not_defined_template] +
      +
    • +
    • +
      + _not_defined_macro__ +
      +
    • +
    + + diff --git a/src/boost/tools/quickbook/test/include/macros-1.5.quickbook b/src/boost/tools/quickbook/test/include/macros-1.5.quickbook new file mode 100644 index 000000000..a63a1f0ca --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-1.5.quickbook @@ -0,0 +1,13 @@ +[article Macros Test 1.5 +[quickbook 1.5] +] + +[def __defined__] + +[include macros-inc1.quickbook] + +* __foo__ +* [defined_template] +* __defined_macro__ +* [not_defined_template] +* [__not_defined_macro__] diff --git a/src/boost/tools/quickbook/test/include/macros-1.6.gold b/src/boost/tools/quickbook/test/include/macros-1.6.gold new file mode 100644 index 000000000..ec93c05c1 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-1.6.gold @@ -0,0 +1,66 @@ + + +
    + Macros Test 1.6 + + Foo:macros-inc1.quickbook + + + Defined conditional phrase. + + + + + __foo__ + + + + + [defined_template] + + + + + __defined_macro__ + + + + + [not_defined_template] + + + + + _not_defined_macro__ + + + + + + + Foo:macros-inc1.quickbook + + + + + Defined template:macros-1.6.quickbook + + + + + Defined macro:macros-inc1.quickbook + + + + + [not_defined_template] + + + + + _not_defined_macro__ + + + +
    diff --git a/src/boost/tools/quickbook/test/include/macros-1.6.gold-html b/src/boost/tools/quickbook/test/include/macros-1.6.gold-html new file mode 100644 index 000000000..bb7a9c6c7 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-1.6.gold-html @@ -0,0 +1,69 @@ + + + + +

    + Macros Test 1.6 +

    +

    + Foo:macros-inc1.quickbook +

    +

    + Defined conditional phrase. +

    +
      +
    • +
      + __foo__ +
      +
    • +
    • +
      + [defined_template] +
      +
    • +
    • +
      + __defined_macro__ +
      +
    • +
    • +
      + [not_defined_template] +
      +
    • +
    • +
      + _not_defined_macro__ +
      +
    • +
    +
      +
    • +
      + Foo:macros-inc1.quickbook +
      +
    • +
    • +
      + Defined template:macros-1.6.quickbook +
      +
    • +
    • +
      + Defined macro:macros-inc1.quickbook +
      +
    • +
    • +
      + [not_defined_template] +
      +
    • +
    • +
      + _not_defined_macro__ +
      +
    • +
    + + diff --git a/src/boost/tools/quickbook/test/include/macros-1.6.quickbook b/src/boost/tools/quickbook/test/include/macros-1.6.quickbook new file mode 100644 index 000000000..5355c090e --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-1.6.quickbook @@ -0,0 +1,21 @@ +[article Macros Test 1.6 +[quickbook 1.6] +] + +[def __defined__] + +[include macros-inc1.quickbook] + +* __foo__ +* [defined_template] +* __defined_macro__ +* [not_defined_template] +* [__not_defined_macro__] + +[import macros-inc1.quickbook] + +* __foo__ +* [defined_template] +* __defined_macro__ +* [not_defined_template] +* [__not_defined_macro__] diff --git a/src/boost/tools/quickbook/test/include/macros-inc1.quickbook b/src/boost/tools/quickbook/test/include/macros-inc1.quickbook new file mode 100644 index 000000000..f8b6f25bc --- /dev/null +++ b/src/boost/tools/quickbook/test/include/macros-inc1.quickbook @@ -0,0 +1,15 @@ +[def __foo__ Foo:__FILENAME__] + +__foo__ + +[?__defined__ +Defined conditional phrase. +[template defined_template Defined template:__FILENAME__] +[def __defined_macro__ Defined macro:__FILENAME__] +] + +[?__not_defined__ +Not defined conditional phrase. +[template not_defined_template Not defined template:__FILENAME__] +[def __not_defined_macro__ Not defined macro:__FILENAME__] +] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold new file mode 100644 index 000000000..92c948a14 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold @@ -0,0 +1,48 @@ + + +
    + Nested Compatibility Test +
    + <link linkend="nested_compatibility_test.duplicate_name">Duplicate Name</link> +
    + <link linkend="nested_compatibility_test.duplicate_name.nested">Nested + Section 1.5</link> + + Nested + Heading 1.5 + +
    +
    + <link linkend="nested_compatibility_test.duplicate_name.nested0">Nested + Section 1.6</link> + + Nested + Heading 1.6 + +
    +
    +
    + <link linkend="nested_compatibility_test.duplicate_name0">Duplicate Name</link> +
    + <link linkend="nested_compatibility_test.duplicate_name.nested1">Nested + Section 1.5</link> + + Nested + Heading 1.5 + +
    +
    + <link linkend="nested_compatibility_test.duplicate_name.nested2">Nested + Section 1.6</link> + + Nested + Heading 1.6 + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html new file mode 100644 index 000000000..c7fe5f3e4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html @@ -0,0 +1,76 @@ + + + + +

    + Nested Compatibility Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Duplicate Name +

    +
    +
    +
    +

    + Nested Section 1.5 +

    +
    +

    + Nested Heading 1.5 +

    +
    +
    +
    +

    + Nested Section 1.6 +

    +
    +

    + Nested Heading 1.6 +

    +
    +
    +
    +
    +

    + Duplicate Name +

    +
    +
    +
    +

    + Nested Section 1.5 +

    +
    +

    + Nested Heading 1.5 +

    +
    +
    +
    +

    + Nested Section 1.6 +

    +
    +

    + Nested Heading 1.6 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook new file mode 100644 index 000000000..f9d78b1e4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook @@ -0,0 +1,12 @@ +[quickbook 1.5] +[article Nested Compatibility Test] + +[section Duplicate Name] +[include nested_compatibility-inc-1_5.quickbook] +[include nested_compatibility-inc-1_6.quickbook] +[endsect] + +[section Duplicate Name] +[include nested_compatibility-inc-1_5.quickbook] +[include nested_compatibility-inc-1_6.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold new file mode 100644 index 000000000..af09a9e87 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold @@ -0,0 +1,48 @@ + + +
    + Nested Compatibility Test +
    + <link linkend="nested_compatibility_test.duplicate_name">Duplicate Name</link> +
    + <link linkend="nested_compatibility_test.duplicate_name.nested">Nested + Section 1.5</link> + + Nested + Heading 1.5 + +
    +
    + <link linkend="nested_compatibility_test.duplicate_name.nested0">Nested + Section 1.6</link> + + Nested + Heading 1.6 + +
    +
    +
    + <link linkend="nested_compatibility_test.duplicate_name0">Duplicate Name</link> +
    + <link linkend="nested_compatibility_test.duplicate_name0.nested">Nested + Section 1.5</link> + + Nested + Heading 1.5 + +
    +
    + <link linkend="nested_compatibility_test.duplicate_name0.nested0">Nested + Section 1.6</link> + + Nested + Heading 1.6 + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html new file mode 100644 index 000000000..028e53038 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html @@ -0,0 +1,76 @@ + + + + +

    + Nested Compatibility Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Duplicate Name +

    +
    +
    +
    +

    + Nested Section 1.5 +

    +
    +

    + Nested Heading 1.5 +

    +
    +
    +
    +

    + Nested Section 1.6 +

    +
    +

    + Nested Heading 1.6 +

    +
    +
    +
    +
    +

    + Duplicate Name +

    +
    +
    +
    +

    + Nested Section 1.5 +

    +
    +

    + Nested Heading 1.5 +

    +
    +
    +
    +

    + Nested Section 1.6 +

    +
    +

    + Nested Heading 1.6 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook new file mode 100644 index 000000000..8beeb8a06 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook @@ -0,0 +1,12 @@ +[quickbook 1.6] +[article Nested Compatibility Test] + +[section Duplicate Name] +[include nested_compatibility-inc-1_5.quickbook] +[include nested_compatibility-inc-1_6.quickbook] +[endsect] + +[section Duplicate Name] +[include nested_compatibility-inc-1_5.quickbook] +[include nested_compatibility-inc-1_6.quickbook] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook new file mode 100644 index 000000000..3c79855a4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook @@ -0,0 +1,5 @@ +[compatibility-mode 1.5] + +[section:nested Nested Section 1.5] +[heading Nested Heading 1.5] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook new file mode 100644 index 000000000..d0790840c --- /dev/null +++ b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook @@ -0,0 +1,5 @@ +[compatibility-mode 1.6] + +[section:nested Nested Section 1.6] +[heading Nested Heading 1.6] +[endsect] diff --git a/src/boost/tools/quickbook/test/include/section-fail1.quickbook b/src/boost/tools/quickbook/test/include/section-fail1.quickbook new file mode 100644 index 000000000..ea75783e0 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-fail1.quickbook @@ -0,0 +1,6 @@ +[article Include Section Test +[quickbook 1.5] +] + +[include section-inc2.quickbook] +[include section-inc1.quickbook] diff --git a/src/boost/tools/quickbook/test/include/section-fail2.quickbook b/src/boost/tools/quickbook/test/include/section-fail2.quickbook new file mode 100644 index 000000000..26a481104 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-fail2.quickbook @@ -0,0 +1,5 @@ +[article Include Section Test +[quickbook 1.5] +] + +[include section-inc2.quickbook] diff --git a/src/boost/tools/quickbook/test/include/section-inc1.quickbook b/src/boost/tools/quickbook/test/include/section-inc1.quickbook new file mode 100644 index 000000000..9c3fdd824 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-inc1.quickbook @@ -0,0 +1 @@ +[section Mulitple file section] diff --git a/src/boost/tools/quickbook/test/include/section-inc2.quickbook b/src/boost/tools/quickbook/test/include/section-inc2.quickbook new file mode 100644 index 000000000..8acc6a502 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-inc2.quickbook @@ -0,0 +1 @@ +[endsect] diff --git a/src/boost/tools/quickbook/test/include/section-unclosed.gold b/src/boost/tools/quickbook/test/include/section-unclosed.gold new file mode 100644 index 000000000..bea5cea67 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-unclosed.gold @@ -0,0 +1,10 @@ + + +
    + Include Section Test +
    + <link linkend="include_section_test.mulitple_file_section">Mulitple file + section</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/include/section-unclosed.gold-html b/src/boost/tools/quickbook/test/include/section-unclosed.gold-html new file mode 100644 index 000000000..efbdd708a --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-unclosed.gold-html @@ -0,0 +1,26 @@ + + + + +

    + Include Section Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Mulitple file section +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/section-unclosed.quickbook b/src/boost/tools/quickbook/test/include/section-unclosed.quickbook new file mode 100644 index 000000000..290cd1633 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section-unclosed.quickbook @@ -0,0 +1,5 @@ +[article Include Section Test +[quickbook 1.5] +] + +[include section-inc1.quickbook] diff --git a/src/boost/tools/quickbook/test/include/section.gold b/src/boost/tools/quickbook/test/include/section.gold new file mode 100644 index 000000000..bea5cea67 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section.gold @@ -0,0 +1,10 @@ + + +
    + Include Section Test +
    + <link linkend="include_section_test.mulitple_file_section">Mulitple file + section</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/include/section.gold-html b/src/boost/tools/quickbook/test/include/section.gold-html new file mode 100644 index 000000000..efbdd708a --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section.gold-html @@ -0,0 +1,26 @@ + + + + +

    + Include Section Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Mulitple file section +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/section.quickbook b/src/boost/tools/quickbook/test/include/section.quickbook new file mode 100644 index 000000000..a570b3524 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/section.quickbook @@ -0,0 +1,6 @@ +[article Include Section Test +[quickbook 1.5] +] + +[include section-inc1.quickbook] +[include section-inc2.quickbook] diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_5.gold b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold new file mode 100644 index 000000000..2ed6b7fee --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold @@ -0,0 +1,9 @@ + + +
    + Souce Mode Include +void main() {} +void main() {} + +
    diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html new file mode 100644 index 000000000..8781356e2 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html @@ -0,0 +1,12 @@ + + + + +

    + Souce Mode Include +

    +
    void main() {}
    +
    void main() {}
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook b/src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook new file mode 100644 index 000000000..d5df05bd4 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook @@ -0,0 +1,4 @@ +[article Souce Mode Include [source-mode teletype][quickbook 1.5]] + +[include source_mode-inc1.quickbook] +[include source_mode-inc2.quickbook] diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_6.gold b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold new file mode 100644 index 000000000..aa01d2057 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold @@ -0,0 +1,13 @@ + + +
    + Souce Mode Include +
    + Source include with no source-mode +void main() {} +
    +void main() {} + +
    diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html new file mode 100644 index 000000000..c41dbbe70 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html @@ -0,0 +1,27 @@ + + + + +

    + Souce Mode Include +

    +
    +

    + Table of contents +

    + +
    +
    void main() {}
    +
    +
    +

    + Source include with no source-mode +

    +
    void main() {}
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook b/src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook new file mode 100644 index 000000000..fc4243f3b --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook @@ -0,0 +1,5 @@ +[source-mode teletype][quickbook 1.6] +[article Souce Mode Include] + +[include source_mode-inc1.quickbook] +[include source_mode-inc2.quickbook] diff --git a/src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook b/src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook new file mode 100644 index 000000000..3cefbe6bc --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook @@ -0,0 +1,3 @@ +[article Source include with no source-mode] + + void main() {} \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook b/src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook new file mode 100644 index 000000000..81dba8a17 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook @@ -0,0 +1,3 @@ +[/ Source include with no source-mode, and no docinfo.] + + void main() {} diff --git a/src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook b/src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook new file mode 100644 index 000000000..6c57614d5 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook @@ -0,0 +1,3 @@ +__FILENAME__ + +[include ../filename_include2.quickbook] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/template_include-1_7.gold b/src/boost/tools/quickbook/test/include/template_include-1_7.gold new file mode 100644 index 000000000..163ff30ee --- /dev/null +++ b/src/boost/tools/quickbook/test/include/template_include-1_7.gold @@ -0,0 +1,12 @@ + + +
    + Template include test + + Simple + include + +void main() {} + +
    diff --git a/src/boost/tools/quickbook/test/include/template_include-1_7.gold-html b/src/boost/tools/quickbook/test/include/template_include-1_7.gold-html new file mode 100644 index 000000000..fdd7ff8c5 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/template_include-1_7.gold-html @@ -0,0 +1,14 @@ + + + + +

    + Template include test +

    +

    + Simple include +

    +
    void main() {}
    +
    + + diff --git a/src/boost/tools/quickbook/test/include/template_include-1_7.quickbook b/src/boost/tools/quickbook/test/include/template_include-1_7.quickbook new file mode 100644 index 000000000..19f58fab0 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/template_include-1_7.quickbook @@ -0,0 +1,8 @@ +[article Template include test +[quickbook 1.7] +] + +[template include_foo[name] [include [name].quickbook]] + +[include_foo include-id-inc1] +[include_foo source_mode-inc2] diff --git a/src/boost/tools/quickbook/test/include/templates-1.5.gold b/src/boost/tools/quickbook/test/include/templates-1.5.gold new file mode 100644 index 000000000..7d7e5dd60 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-1.5.gold @@ -0,0 +1,12 @@ + + +
    + Templates 1.5 + + Inline:templates-inc1.quickbook + + + Foo:templates-1.5.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/templates-1.5.gold-html b/src/boost/tools/quickbook/test/include/templates-1.5.gold-html new file mode 100644 index 000000000..c773637b6 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-1.5.gold-html @@ -0,0 +1,15 @@ + + + + +

    + Templates 1.5 +

    +

    + Inline:templates-inc1.quickbook +

    +

    + Foo:templates-1.5.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/templates-1.5.quickbook b/src/boost/tools/quickbook/test/include/templates-1.5.quickbook new file mode 100644 index 000000000..5104ae6fa --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-1.5.quickbook @@ -0,0 +1,7 @@ +[article Templates 1.5 +[quickbook 1.5] +] + +[include templates-inc1.quickbook] + +[foo] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/include/templates-1.6.gold b/src/boost/tools/quickbook/test/include/templates-1.6.gold new file mode 100644 index 000000000..4e37e5e64 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-1.6.gold @@ -0,0 +1,15 @@ + + +
    + Templates 1.6 + + Inline:templates-inc1.quickbook + + + [foo] + + + Foo:templates-1.6.quickbook + +
    diff --git a/src/boost/tools/quickbook/test/include/templates-1.6.gold-html b/src/boost/tools/quickbook/test/include/templates-1.6.gold-html new file mode 100644 index 000000000..362390d93 --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-1.6.gold-html @@ -0,0 +1,18 @@ + + + + +

    + Templates 1.6 +

    +

    + Inline:templates-inc1.quickbook +

    +

    + [foo] +

    +

    + Foo:templates-1.6.quickbook +

    + + diff --git a/src/boost/tools/quickbook/test/include/templates-1.6.quickbook b/src/boost/tools/quickbook/test/include/templates-1.6.quickbook new file mode 100644 index 000000000..77d821e4c --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-1.6.quickbook @@ -0,0 +1,11 @@ +[article Templates 1.6 +[quickbook 1.6] +] + +[include templates-inc1.quickbook] + +[foo] + +[import templates-inc1.quickbook] + +[foo] diff --git a/src/boost/tools/quickbook/test/include/templates-inc1.quickbook b/src/boost/tools/quickbook/test/include/templates-inc1.quickbook new file mode 100644 index 000000000..70574627c --- /dev/null +++ b/src/boost/tools/quickbook/test/include/templates-inc1.quickbook @@ -0,0 +1,4 @@ +Inline:__FILENAME__ + +[template foo Foo:__FILENAME__] + diff --git a/src/boost/tools/quickbook/test/include2-1_6.gold b/src/boost/tools/quickbook/test/include2-1_6.gold new file mode 100644 index 000000000..f46759b78 --- /dev/null +++ b/src/boost/tools/quickbook/test/include2-1_6.gold @@ -0,0 +1,22 @@ + + +
    + Include Test +
    + Include Test Sub Document +
    +
    + <link linkend="include-test.test">Test</link> + + Just testing. + +
    +
    + <link linkend="foo.test">Test</link> + + Just testing. + +
    +
    diff --git a/src/boost/tools/quickbook/test/include2-1_6.gold-html b/src/boost/tools/quickbook/test/include2-1_6.gold-html new file mode 100644 index 000000000..6d96cfa32 --- /dev/null +++ b/src/boost/tools/quickbook/test/include2-1_6.gold-html @@ -0,0 +1,50 @@ + + + + +

    + Include Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Include Test Sub Document +

    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    +
    +

    + Test +

    +
    +

    + Just testing. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/include2-1_6.quickbook b/src/boost/tools/quickbook/test/include2-1_6.quickbook new file mode 100644 index 000000000..66b4897ef --- /dev/null +++ b/src/boost/tools/quickbook/test/include2-1_6.quickbook @@ -0,0 +1,8 @@ +[article Include Test + [quickbook 1.6] + [id include-test] +] + +[include include-inc-1_5.quickbook] +[include include-inc.quickbook] +[include:foo include-inc.quickbook] diff --git a/src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook new file mode 100644 index 000000000..fa7e8e337 --- /dev/null +++ b/src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Include invalid path fail +[quickbook 1.7] +] + +[include .\\\/empty-inc.quickbook] diff --git a/src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook new file mode 100644 index 000000000..4f2672840 --- /dev/null +++ b/src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Include invalid path fail +[quickbook 1.7] +] + +[include .\\\\empty-inc.quickbook] diff --git a/src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook new file mode 100644 index 000000000..5c99c1143 --- /dev/null +++ b/src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Include invalid path fail +[quickbook 1.7] +] + +[include empty\[-/\]inc.quickbook] diff --git a/src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook new file mode 100644 index 000000000..79a9df667 --- /dev/null +++ b/src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Unicode glob +[quickbook 1.7] +] + +[include £*.quickbook] diff --git a/src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook b/src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook new file mode 100644 index 000000000..aff5fd2c3 --- /dev/null +++ b/src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook @@ -0,0 +1,5 @@ +[article Include fail for windows path. +[quickbook 1.6] +] + +[include .\empty-inc.quickbook] diff --git a/src/boost/tools/quickbook/test/link-1_1.gold b/src/boost/tools/quickbook/test/link-1_1.gold new file mode 100644 index 000000000..955fdec76 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_1.gold @@ -0,0 +1,45 @@ + + + diff --git a/src/boost/tools/quickbook/test/link-1_1.gold-html b/src/boost/tools/quickbook/test/link-1_1.gold-html new file mode 100644 index 000000000..92ac75b4e --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_1.gold-html @@ -0,0 +1,68 @@ + + + + +

    + Link tests +

    +
    +

    + Table of contents +

    + +
    + + + + + diff --git a/src/boost/tools/quickbook/test/link-1_1.quickbook b/src/boost/tools/quickbook/test/link-1_1.quickbook new file mode 100644 index 000000000..a22ce70f0 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_1.quickbook @@ -0,0 +1,48 @@ +[article Link tests +] + +[section Different types of links] + +[@http://www.boost.org/] +[@ http://www.boost.org/ Boost] +[link link-id] +[link link-id Link Text] +[#link-id] +[funcref foo] +[funcref foo link text] +[classref foo] +[classref foo link text] +[memberref foo] +[memberref foo link text] +[enumref foo] +[enumref foo link text] +[macroref foo] +[macroref foo link text] +[headerref foo] +[headerref foo link text] +[conceptref foo] +[conceptref foo link text] +[globalref foo] +[globalref foo link text] + +[link link[/ comment]description] + +[endsect] + +[section Side-by-side links] + +[link x] and [link y] are two distinct links, which should be separated by +whitespace when they appear together as in [link x] [link y]. Also in [link x] +[link y], and in +[link x] +[link y] +as well. + +[endsect] + +[section Escaping links] + +* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1 + Boost Trac] + +[endsect] diff --git a/src/boost/tools/quickbook/test/link-1_6.gold b/src/boost/tools/quickbook/test/link-1_6.gold new file mode 100644 index 000000000..587b67be3 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_6.gold @@ -0,0 +1,49 @@ + + + diff --git a/src/boost/tools/quickbook/test/link-1_6.gold-html b/src/boost/tools/quickbook/test/link-1_6.gold-html new file mode 100644 index 000000000..f8f9b1a2b --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_6.gold-html @@ -0,0 +1,71 @@ + + + + +

    + Link tests +

    +
    +

    + Table of contents +

    + +
    + + + + + diff --git a/src/boost/tools/quickbook/test/link-1_6.quickbook b/src/boost/tools/quickbook/test/link-1_6.quickbook new file mode 100644 index 000000000..c874a79c6 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_6.quickbook @@ -0,0 +1,52 @@ +[article Link tests +[quickbook 1.6] +] + +[section Different types of links] + +[@http://www.boost.org/] +[@ http://www.boost.org/ Boost] +[link link-id] +[link link-id Link Text] +[#link-id] +[funcref foo] +[funcref foo link text] +[classref foo] +[classref foo link text] +[memberref foo] +[memberref foo link text] +[enumref foo] +[enumref foo link text] +[macroref foo] +[macroref foo link text] +[headerref foo] +[headerref foo link text] +[conceptref foo] +[conceptref foo link text] +[globalref foo] +[globalref foo link text] + +[link link[/ comment]description] + +[link link\[Hello\] description] + + +[endsect] + +[section Side-by-side links] + +[link x] and [link y] are two distinct links, which should be separated by +whitespace when they appear together as in [link x] [link y]. Also in [link x] +[link y], and in +[link x] +[link y] +as well. + +[endsect] + +[section Escaping links] + +* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1 + Boost Trac] + +[endsect] diff --git a/src/boost/tools/quickbook/test/link-1_7-fail.quickbook b/src/boost/tools/quickbook/test/link-1_7-fail.quickbook new file mode 100644 index 000000000..9f2db1fb1 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Link fail test +[quickbook 1.7] +] + +[link something [table]] diff --git a/src/boost/tools/quickbook/test/link-1_7-fail2.quickbook b/src/boost/tools/quickbook/test/link-1_7-fail2.quickbook new file mode 100644 index 000000000..30ac49570 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_7-fail2.quickbook @@ -0,0 +1,6 @@ +[article Link fail test +[quickbook 1.7] +] + +[/ Escapes aren't allowed in links.] +[link '''escaped stuff'''] diff --git a/src/boost/tools/quickbook/test/link-1_7.gold b/src/boost/tools/quickbook/test/link-1_7.gold new file mode 100644 index 000000000..c2e5f0398 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_7.gold @@ -0,0 +1,56 @@ + + + diff --git a/src/boost/tools/quickbook/test/link-1_7.gold-html b/src/boost/tools/quickbook/test/link-1_7.gold-html new file mode 100644 index 000000000..797e6a769 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_7.gold-html @@ -0,0 +1,84 @@ + + + + +

    + Link tests +

    +
    +

    + Table of contents +

    + +
    + + + + + + diff --git a/src/boost/tools/quickbook/test/link-1_7.quickbook b/src/boost/tools/quickbook/test/link-1_7.quickbook new file mode 100644 index 000000000..acfba3188 --- /dev/null +++ b/src/boost/tools/quickbook/test/link-1_7.quickbook @@ -0,0 +1,61 @@ +[article Link tests +[quickbook 1.7] +] + +[section Different types of links] + +[@http://www.boost.org/] +[@ http://www.boost.org/ Boost] +[link link-id] +[link link-id Link Text] +[#link-id] +[funcref foo] +[funcref foo link text] +[classref foo] +[classref foo link text] +[memberref foo] +[memberref foo link text] +[enumref foo] +[enumref foo link text] +[macroref foo] +[macroref foo link text] +[headerref foo] +[headerref foo link text] +[conceptref foo] +[conceptref foo link text] +[globalref foo] +[globalref foo link text] + +[link link[/ comment]description] + +[endsect] + +[section Side-by-side links] + +[link x] and [link y] are two distinct links, which should be separated by +whitespace when they appear together as in [link x] [link y]. Also in [link x] +[link y], and in +[link x] +[link y] +as well. + +[endsect] + +[section Templates is links....] + +[template thing[]x] +[link blah.[thing]2 Templated link?] + +[template link_in_template[x y] [link something-[x]-[y]]] +[link_in_template one two] +[link_in_template one..two] +[link_in_template one .. two ] + +[endsect] + +[section Escaping links] + +* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1 + Boost Trac] + +[endsect] diff --git a/src/boost/tools/quickbook/test/list_test-1_5.gold b/src/boost/tools/quickbook/test/list_test-1_5.gold new file mode 100644 index 000000000..4d25aa7cc --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_5.gold @@ -0,0 +1,402 @@ + + +
    + List Test + + Simple list: + + + + + A + + + + + B + + + + + Simple list: + + + + + A + + + + + B + + + + + Two level list: + + + + + A + + + + A + + + + + B + + + + + + + + B + + + + A + + + + + B + + + + + + + + Two level list: + + + + + A + + + + A + + + + + B + + + + + + + + B + + + + A + + + + + B + + + + + + + + Three level list: + + + + + A + + + + A + + + + + B + + + + C + + + + + D + + + + + + + + E + + + + + F + + + + G + + + + + H + + + + + + + + + + + Three level list: + + + + + A + + + + A + + + + + B + + + + C + + + + + D + + + + + + + + + + + G + + + + + H + + + + + Inconsistent Indentation: + + + + + A1 + + + + B1 + + + + + B2 + + + + C1 + + + + + C2 + + + + + + + + B3 + + + + + B4 + + + + + B5 + + + + C3 + + + + + + + + B6 + + + + + + + + A2 + + + + + A3 + + + + + Markup in list: + + + + + Bold + + + + + Bold + + + + + Quoted + + + + + + + Footnote + + + + + + + Don't end list with comment 1: + + + + + A1 + + + + + A2 + + + + + A3 + + + + + A4 + + + + + Don't end list with comment 2: + + + + + A1 + + + + B1 + + + + + B2 + + + + + B3 + + + + + + +
    + <link linkend="list_test.list_immediately_following_markup">List immediately + following markup</link> + + + + One + + + + + Two + + + + + Three + + + +
    +
    + <link linkend="list_test.list_immediately_following_markup_2">List immediately + following markup 2</link> + + + + One [section Nested section] + + + + + Two [endsect] + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/list_test-1_5.gold-html b/src/boost/tools/quickbook/test/list_test-1_5.gold-html new file mode 100644 index 000000000..6c599de4f --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_5.gold-html @@ -0,0 +1,432 @@ + + + + +

    + List Test +

    + +

    + Simple list: +

    +
      +
    • +
      + A +
      +
    • +
    • +
      + B +
      +
    • +
    +

    + Simple list: +

    +
      +
    1. +
      + A +
      +
    2. +
    3. +
      + B +
      +
    4. +
    +

    + Two level list: +

    +
      +
    • +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    • +
    • +
      + B +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    • +
    +

    + Two level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    2. +
    3. +
      + B +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    4. +
    +

    + Three level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
          +
        • +
          + C +
          +
        • +
        • +
          + D +
          +
        • +
        +
        +
      • +
      • +
        + E +
        +
      • +
      • +
        + F +
          +
        • +
          + G +
          +
        • +
        • +
          + H +
          +
        • +
        +
        +
      • +
      +
      +
    2. +
    +

    + Three level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
          +
        1. +
          + C +
          +
        2. +
        3. +
          + D +
          +
        4. +
        +
        +
      • +
      +
      +
    2. +
    3. +
      + G +
      +
    4. +
    5. +
      + H +
      +
    6. +
    +

    + Inconsistent Indentation: +

    +
      +
    • +
      + A1 +
        +
      • +
        + B1 +
        +
      • +
      • +
        + B2 +
          +
        • +
          + C1 +
          +
        • +
        • +
          + C2 +
          +
        • +
        +
        +
      • +
      • +
        + B3 +
        +
      • +
      • +
        + B4 +
        +
      • +
      • +
        + B5 +
          +
        • +
          + C3 +
          +
        • +
        +
        +
      • +
      • +
        + B6 +
        +
      • +
      +
      +
    • +
    • +
      + A2 +
      +
    • +
    • +
      + A3 +
      +
    • +
    +

    + Markup in list: +

    +
      +
    • +
      + Bold +
      +
    • +
    • +
      + Bold +
      +
    • +
    • +
      + Quoted +
      +
    • +
    • +
      + [1] +
      +
    • +
    +

    + Don't end list with comment 1: +

    +
      +
    • +
      + A1 +
      +
    • +
    • +
      + A2 +
      +
    • +
    • +
      + A3 +
      +
    • +
    • +
      + A4 +
      +
    • +
    +

    + Don't end list with comment 2: +

    +
      +
    • +
      + A1 +
        +
      • +
        + B1 +
        +
      • +
      • +
        + B2 +
        +
      • +
      • +
        + B3 +
        +
      • +
      +
      +
    • +
    +
    +

    + List immediately following markup +

    +
    +
      +
    • +
      + One +
      +
    • +
    • +
      + Two +
      +
    • +
    • +
      + Three +
      +
    • +
    +
    +
    +
    +

    + List immediately following markup 2 +

    +
    +
      +
    • +
      + One [section Nested section] +
      +
    • +
    • +
      + Two [endsect] +
      +
    • +
    +
    +
    +
    +
    +
    +
    +

    + [1] Footnote +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/list_test-1_5.quickbook b/src/boost/tools/quickbook/test/list_test-1_5.quickbook new file mode 100644 index 000000000..64b391a61 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_5.quickbook @@ -0,0 +1,108 @@ +[article List Test +[quickbook 1.5] +] + +Simple list: + +* A +* B + +Simple list: + +#A +#B + +Two level list: + +* A + * A + * B +* B + * A + * B + +Two level list: + +# A + * A + * B +# B + * A + * B + +Three level list: + +# A + * A + * B + * C + * D + * E + * F + * G + * H + +Three level list: + +# A + * A + * B + # C + # D +# G +# H + +Inconsistent Indentation: + +* A1 + * B1 + * B2 + * C1 + * C2 + * B3 + * B4 + * B5 + * C3 + * B6 + * A2 +* A3 + +Markup in list: + +* *Bold* +* [*Bold] +* ["Quoted] +* [footnote Footnote] + +Don't end list with comment 1: + +* A1 +* A2 + +[/ End list?] +* A3 +* A4 + +Don't end list with comment 2: + +* A1 + * B1 + +[/ End list?] + * B2 + * B3 + +[section List immediately following markup] +* One +* Two +* Three + +[endsect] + +[section List immediately following markup 2] +* One +[section Nested section] +* Two +[endsect] + +[endsect] diff --git a/src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook b/src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook new file mode 100644 index 000000000..7ca8a9399 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook @@ -0,0 +1,46 @@ +[article List Test +[quickbook 1.6] +] + +Markup in list: + +* [table [[Heading]][[Cell]]] +* [heading The heading for a list item] + + The content of the list item. + +[section Paragraphs in list items] + +* A1 + + A2 + +* B1 + * C1 + + C2 + + B2 + +* D1 + * E1 + + E2 + + E3 + + D2 + +[endsect] + +[section Indented code blocks in lists] + +* A + + B + C +* D + + E +* F +[endsect] diff --git a/src/boost/tools/quickbook/test/list_test-1_6.gold b/src/boost/tools/quickbook/test/list_test-1_6.gold new file mode 100644 index 000000000..b6d3775a6 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_6.gold @@ -0,0 +1,450 @@ + + +
    + List Test + + Simple list: + + + + + A + + + + + B + + + + + Simple list: + + + + + A + + + + + B + + + + + Two level list: + + + + + A + + + + A + + + + + B + + + + + + + + B + + + + A + + + + + B + + + + + + + + Two level list: + + + + + A + + + + A + + + + + B + + + + + + + + B + + + + A + + + + + B + + + + + + + + Three level list: + + + + + A + + + + A + + + + + B + + + + C + + + + + D + + + + + + + + E + + + + + F + + + + G + + + + + H + + + + + + + + + + + Three level list: + + + + + A + + + + A + + + + + B + + + + C + + + + + D + + + + + + + + + + + G + + + + + H + + + + + Inconsistent Indentation: + + + + + A1 + + + + B1 + + + + + B2 + + + + C1 + + + + + C2 + + + + + + + + B3 + + + + + B4 + + + + + B5 + + + + C3 + + + + + + + + B6 + + + + + + + + A2 + + + + + A3 + + + + + Markup in list: + + + + + Bold + + + + + Bold + + + + + Quoted + + + + + + + Footnote + + + + + + + + + + + + Heading + + + + + + + + + Cell + + + + + + + + Some text. + + + + + [section Doesn't expand] Blah, blah. [endsect] + + + + + Paragraph cheat 1. + + + Paragraph cheat 2. + + + + + Paragraph cheat 3. + + + Paragraph cheat 4. + + + + + Don't end list with comment 1: + + + + + A1 + + + + + A2 + + + + + A3 + + + + + A4 + + + + + Don't end list with comment 2: + + + + + A1 + + + + B1 + + + + + B2 + + + + + B3 + + + + + + +
    + <link linkend="list_test.list_immediately_following_marku">List immediately + following markup</link> + + + + One + + + + + Two + + + + + Three + + + +
    +
    + <link linkend="list_test.list_immediately_following_mark0">List immediately + following markup 2</link> + + + + One [section Nested section] + + + + + Two [endsect] + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/list_test-1_6.gold-html b/src/boost/tools/quickbook/test/list_test-1_6.gold-html new file mode 100644 index 000000000..c8ca7a85c --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_6.gold-html @@ -0,0 +1,480 @@ + + + + +

    + List Test +

    + +

    + Simple list: +

    +
      +
    • +
      + A +
      +
    • +
    • +
      + B +
      +
    • +
    +

    + Simple list: +

    +
      +
    1. +
      + A +
      +
    2. +
    3. +
      + B +
      +
    4. +
    +

    + Two level list: +

    +
      +
    • +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    • +
    • +
      + B +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    • +
    +

    + Two level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    2. +
    3. +
      + B +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    4. +
    +

    + Three level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
          +
        • +
          + C +
          +
        • +
        • +
          + D +
          +
        • +
        +
        +
      • +
      • +
        + E +
        +
      • +
      • +
        + F +
          +
        • +
          + G +
          +
        • +
        • +
          + H +
          +
        • +
        +
        +
      • +
      +
      +
    2. +
    +

    + Three level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
          +
        1. +
          + C +
          +
        2. +
        3. +
          + D +
          +
        4. +
        +
        +
      • +
      +
      +
    2. +
    3. +
      + G +
      +
    4. +
    5. +
      + H +
      +
    6. +
    +

    + Inconsistent Indentation: +

    +
      +
    • +
      + A1 +
        +
      • +
        + B1 +
        +
      • +
      • +
        + B2 +
          +
        • +
          + C1 +
          +
        • +
        • +
          + C2 +
          +
        • +
        +
        +
      • +
      • +
        + B3 +
        +
      • +
      • +
        + B4 +
        +
      • +
      • +
        + B5 +
          +
        • +
          + C3 +
          +
        • +
        +
        +
      • +
      • +
        + B6 +
        +
      • +
      +
      +
    • +
    • +
      + A2 +
      +
    • +
    • +
      + A3 +
      +
    • +
    +

    + Markup in list: +

    +
      +
    • +
      + Bold +
      +
    • +
    • +
      + Bold +
      +
    • +
    • +
      + Quoted +
      +
    • +
    • +
      + [1] +
      +
    • +
    • +
      + + + + + + + + + + + +
      +

      + Heading +

      +
      +

      + Cell +

      +
      +
      +
      + Some text. +
      +
    • +
    • +
      + [section Doesn't expand] Blah, blah. [endsect] +
      +
    • +
    • +
      + Paragraph cheat 1. +
      +
      + Paragraph cheat 2. +
      +
    • +
    • +
      + Paragraph cheat 3. +
      +
      + Paragraph cheat 4. +
      +
    • +
    +

    + Don't end list with comment 1: +

    +
      +
    • +
      + A1 +
      +
    • +
    • +
      + A2 +
      +
    • +
    • +
      + A3 +
      +
    • +
    • +
      + A4 +
      +
    • +
    +

    + Don't end list with comment 2: +

    +
      +
    • +
      + A1 +
        +
      • +
        + B1 +
        +
      • +
      • +
        + B2 +
        +
      • +
      • +
        + B3 +
        +
      • +
      +
      +
    • +
    +
    +

    + List immediately following markup +

    +
    +
      +
    • +
      + One +
      +
    • +
    • +
      + Two +
      +
    • +
    • +
      + Three +
      +
    • +
    +
    +
    +
    +

    + List immediately following markup 2 +

    +
    +
      +
    • +
      + One [section Nested section] +
      +
    • +
    • +
      + Two [endsect] +
      +
    • +
    +
    +
    +
    +
    +
    +
    +

    + [1] Footnote +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/list_test-1_6.quickbook b/src/boost/tools/quickbook/test/list_test-1_6.quickbook new file mode 100644 index 000000000..fe1e18756 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_6.quickbook @@ -0,0 +1,120 @@ +[article List Test +[quickbook 1.6] +] + +Simple list: + +* A +* B + +Simple list: + +#A +#B + +Two level list: + +* A + * A + * B +* B + * A + * B + +Two level list: + +# A + * A + * B +# B + * A + * B + +Three level list: + +# A + * A + * B + * C + * D + * E + * F + * G + * H + +Three level list: + +# A + * A + * B + # C + # D +# G +# H + +Inconsistent Indentation: + +* A1 + * B1 + * B2 + * C1 + * C2 + * B3 + * B4 + * B5 + * C3 + * B6 + * A2 +* A3 + +Markup in list: + +* *Bold* +* [*Bold] +* ["Quoted] +* [footnote Footnote] +* [table [[Heading]][[Cell]]] + Some text. +* [section Doesn't expand] + Blah, blah. + [endsect] + +* Paragraph cheat 1. + [block] + Paragraph cheat 2. +* Paragraph cheat 3. + [block] + Paragraph cheat 4. + +Don't end list with comment 1: + +* A1 +* A2 + +[/ End list?] +* A3 +* A4 + +Don't end list with comment 2: + +* A1 + * B1 + +[/ End list?] + * B2 + * B3 + +[section List immediately following markup] +* One +* Two +* Three + +[endsect] + +[section List immediately following markup 2] +* One +[section Nested section] +* Two +[endsect] + +[endsect] diff --git a/src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook b/src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook new file mode 100644 index 000000000..c8beed1c5 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook @@ -0,0 +1,9 @@ +[article List Fail Test 1 +[quickbook 1.7] +] + +[section List immediately following markup] +* One +* Two +* Three +[endsect] diff --git a/src/boost/tools/quickbook/test/list_test-1_7.gold b/src/boost/tools/quickbook/test/list_test-1_7.gold new file mode 100644 index 000000000..dec074c74 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_7.gold @@ -0,0 +1,479 @@ + + +
    + List Test + + Simple list: + + + + + A + + + + + B + + + + + Simple list: + + + + + A + + + + + B + + + + + Two level list: + + + + + A + + + + A + + + + + B + + + + + + + + B + + + + A + + + + + B + + + + + + + + Two level list: + + + + + A + + + + A + + + + + B + + + + + + + + B + + + + A + + + + + B + + + + + + + + Three level list: + + + + + A + + + + A + + + + + B + + + + C + + + + + D + + + + + + + + E + + + + + F + + + + G + + + + + H + + + + + + + + + + + Three level list: + + + + + A + + + + A + + + + + B + + + + C + + + + + D + + + + + + + + + + + G + + + + + H + + + + + Inconsistent Indentation: + + + + + A1 + + + + B1 + + + + + B2 + + + + C1 + + + + + C2 + + + + + + + + B3 + + + + + B4 + + + + + B5 + + + + C3 + + + + + + + + B6 + + + + + + + + A2 + + + + + A3 + + + + + Markup in list: + + + + + Bold + + + + + Bold + + + + + Quoted + + + + + + + Footnote + + + + + + + + + + + + Heading + + + + + + + + + Cell + + + + + + + + + + The + heading for a list item + + + The content of the list item. + + + + + Don't end list with comment 1: + + + + + A1 + + + + + A2 + + + + + A3 + + + + + A4 + + + + + Don't end list with comment 2: + + + + + A1 + + + + B1 + + + + + B2 + + + + + B3 + + + + + + +
    + <link linkend="list_test.paragraphs_in_list_items">Paragraphs in list + items</link> + + + + A1 + + + A2 + + + + + B1 + + + + C1 + + + C2 + + + + + + B2 + + + + + D1 + + + + E1 + + + E2 + + + E3 + + + + + + D2 + + + +
    +
    + <link linkend="list_test.indented_code_blocks_in_lists">Indented code + blocks in lists</link> + + + + A + +B + + + C + + + + + D + +E + + + + + F + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/list_test-1_7.gold-html b/src/boost/tools/quickbook/test/list_test-1_7.gold-html new file mode 100644 index 000000000..9d7b78eac --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_7.gold-html @@ -0,0 +1,507 @@ + + + + +

    + List Test +

    +
    +

    + Table of contents +

    + +
    +

    + Simple list: +

    +
      +
    • +
      + A +
      +
    • +
    • +
      + B +
      +
    • +
    +

    + Simple list: +

    +
      +
    1. +
      + A +
      +
    2. +
    3. +
      + B +
      +
    4. +
    +

    + Two level list: +

    +
      +
    • +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    • +
    • +
      + B +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    • +
    +

    + Two level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    2. +
    3. +
      + B +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
        +
      • +
      +
      +
    4. +
    +

    + Three level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
          +
        • +
          + C +
          +
        • +
        • +
          + D +
          +
        • +
        +
        +
      • +
      • +
        + E +
        +
      • +
      • +
        + F +
          +
        • +
          + G +
          +
        • +
        • +
          + H +
          +
        • +
        +
        +
      • +
      +
      +
    2. +
    +

    + Three level list: +

    +
      +
    1. +
      + A +
        +
      • +
        + A +
        +
      • +
      • +
        + B +
          +
        1. +
          + C +
          +
        2. +
        3. +
          + D +
          +
        4. +
        +
        +
      • +
      +
      +
    2. +
    3. +
      + G +
      +
    4. +
    5. +
      + H +
      +
    6. +
    +

    + Inconsistent Indentation: +

    +
      +
    • +
      + A1 +
        +
      • +
        + B1 +
        +
      • +
      • +
        + B2 +
          +
        • +
          + C1 +
          +
        • +
        • +
          + C2 +
          +
        • +
        +
        +
      • +
      • +
        + B3 +
        +
      • +
      • +
        + B4 +
        +
      • +
      • +
        + B5 +
          +
        • +
          + C3 +
          +
        • +
        +
        +
      • +
      • +
        + B6 +
        +
      • +
      +
      +
    • +
    • +
      + A2 +
      +
    • +
    • +
      + A3 +
      +
    • +
    +

    + Markup in list: +

    +
      +
    • +
      + Bold +
      +
    • +
    • +
      + Bold +
      +
    • +
    • +
      + Quoted +
      +
    • +
    • +
      + [1] +
      +
    • +
    • +
      + + + + + + + + + + + +
      +

      + Heading +

      +
      +

      + Cell +

      +
      +
      +
    • +
    • +

      + The heading for a list item +

      +
      + The content of the list item. +
      +
    • +
    +

    + Don't end list with comment 1: +

    +
      +
    • +
      + A1 +
      +
    • +
    • +
      + A2 +
      +
    • +
    • +
      + A3 +
      +
    • +
    • +
      + A4 +
      +
    • +
    +

    + Don't end list with comment 2: +

    +
      +
    • +
      + A1 +
        +
      • +
        + B1 +
        +
      • +
      • +
        + B2 +
        +
      • +
      • +
        + B3 +
        +
      • +
      +
      +
    • +
    +
    +

    + Paragraphs in list items +

    +
    +
      +
    • +
      + A1 +
      +
      + A2 +
      +
    • +
    • +
      + B1 +
        +
      • +
        + C1 +
        +
        + C2 +
        +
      • +
      +
      +
      + B2 +
      +
    • +
    • +
      + D1 +
        +
      • +
        + E1 +
        +
        + E2 +
        +
        + E3 +
        +
      • +
      +
      +
      + D2 +
      +
    • +
    +
    +
    +
    +

    + Indented code blocks in lists +

    +
    +
      +
    • +
      + A +
      +
      B
      +
      +
      + C +
      +
    • +
    • +
      + D +
      +
      E
      +
      +
    • +
    • +
      + F +
      +
    • +
    +
    +
    +
    +
    +
    +
    +

    + [1] Footnote +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/list_test-1_7.quickbook b/src/boost/tools/quickbook/test/list_test-1_7.quickbook new file mode 100644 index 000000000..8eac6a718 --- /dev/null +++ b/src/boost/tools/quickbook/test/list_test-1_7.quickbook @@ -0,0 +1,134 @@ +[article List Test +[quickbook 1.7] +] + +Simple list: + +* A +* B + +Simple list: + +#A +#B + +Two level list: + +* A + * A + * B +* B + * A + * B + +Two level list: + +# A + * A + * B +# B + * A + * B + +Three level list: + +# A + * A + * B + * C + * D + * E + * F + * G + * H + +Three level list: + +# A + * A + * B + # C + # D +# G +# H + +Inconsistent Indentation: + +* A1 + * B1 + * B2 + * C1 + * C2 + * B3 + * B4 + * B5 + * C3 + * B6 + * A2 +* A3 + +Markup in list: + +* *Bold* +* [*Bold] +* ["Quoted] +* [footnote Footnote] +* [table [[Heading]][[Cell]]] +* [heading The heading for a list item] + + The content of the list item. + +Don't end list with comment 1: + +* A1 +* A2 + +[/ End list?] +* A3 +* A4 + +Don't end list with comment 2: + +* A1 + * B1 + +[/ End list?] + * B2 + * B3 + +[section Paragraphs in list items] + +* A1 + + A2 + +* B1 + * C1 + + C2 + + B2 + +* D1 + * E1 + + E2 + + E3 + + D2 + +[endsect] + +[section Indented code blocks in lists] + +* A + + B + C +* D + + E +* F + +[endsect] diff --git a/src/boost/tools/quickbook/test/macro-1_5.gold b/src/boost/tools/quickbook/test/macro-1_5.gold new file mode 100644 index 000000000..aec771a0c --- /dev/null +++ b/src/boost/tools/quickbook/test/macro-1_5.gold @@ -0,0 +1,26 @@ + + +
    + Macro Test + + 1 + + + 2 + + + two + + + 1 + + + 1 + + + 1 + + + 1 2 + +
    diff --git a/src/boost/tools/quickbook/test/macro-1_5.gold-html b/src/boost/tools/quickbook/test/macro-1_5.gold-html new file mode 100644 index 000000000..b2ffd0edd --- /dev/null +++ b/src/boost/tools/quickbook/test/macro-1_5.gold-html @@ -0,0 +1,30 @@ + + + + +

    + Macro Test +

    +

    + 1 +

    +

    + 2 +

    +

    + two +

    +

    + 1 +

    +

    + 1 +

    +

    + 1 +

    +

    + 1 2 +

    + + diff --git a/src/boost/tools/quickbook/test/macro-1_5.quickbook b/src/boost/tools/quickbook/test/macro-1_5.quickbook new file mode 100644 index 000000000..165ad1b92 --- /dev/null +++ b/src/boost/tools/quickbook/test/macro-1_5.quickbook @@ -0,0 +1,34 @@ +[article Macro Test +[quickbook 1.5] +] + +[def one 1] + +one + +[template foo[] + +[def two 2] +two +] + +[foo] +two [/This shouldn't expand] + + +[def __foo__ 1] +[def __foo__ 2] +__foo__ + +[template foo2[] +[def __foo__ 3] +__foo__ +] + +[foo2] +__foo__ + +[def __crazy[macro__ 1] +[def __crazy\macro__ 2] +__crazy[macro__ +__crazy\macro__ \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/macro-1_6.gold b/src/boost/tools/quickbook/test/macro-1_6.gold new file mode 100644 index 000000000..291ddf1f9 --- /dev/null +++ b/src/boost/tools/quickbook/test/macro-1_6.gold @@ -0,0 +1,26 @@ + + +
    + Macro Test + + 1 + + + 2 + + + two + + + 2 + + + 3 + + + 2 + + + [1] \m2 + +
    diff --git a/src/boost/tools/quickbook/test/macro-1_6.gold-html b/src/boost/tools/quickbook/test/macro-1_6.gold-html new file mode 100644 index 000000000..f49236233 --- /dev/null +++ b/src/boost/tools/quickbook/test/macro-1_6.gold-html @@ -0,0 +1,30 @@ + + + + +

    + Macro Test +

    +

    + 1 +

    +

    + 2 +

    +

    + two +

    +

    + 2 +

    +

    + 3 +

    +

    + 2 +

    +

    + [1] \m2 +

    + + diff --git a/src/boost/tools/quickbook/test/macro-1_6.quickbook b/src/boost/tools/quickbook/test/macro-1_6.quickbook new file mode 100644 index 000000000..43f8cbc0a --- /dev/null +++ b/src/boost/tools/quickbook/test/macro-1_6.quickbook @@ -0,0 +1,34 @@ +[article Macro Test +[quickbook 1.6] +] + +[def one 1] + +one + +[template foo[] + +[def two 2] +two +] + +[foo] +two [/This shouldn't expand] + + +[def __foo__ 1] +[def __foo__ 2] +__foo__ + +[template foo2[] +[def __foo__ 3] +__foo__ +] + +[foo2] +__foo__ + +[def __crazy[1]] +[def __crazy2\m2] +__crazy +__crazy2 \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook new file mode 100644 index 000000000..e3db0daa2 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook @@ -0,0 +1,5 @@ +[article Mismatched brackets] + +[template foo Oops] +[template blah Eek +[foo] diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold new file mode 100644 index 000000000..f6fbff497 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold @@ -0,0 +1,12 @@ + + +
    + Mismatched brackets + + [foo + + + Eek + +
    diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html new file mode 100644 index 000000000..a0c96eb7a --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html @@ -0,0 +1,15 @@ + + + + +

    + Mismatched brackets +

    +

    + [foo +

    +

    + Eek +

    + + diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook new file mode 100644 index 000000000..a0cfb77b3 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook @@ -0,0 +1,7 @@ +[article Mismatched brackets] + +[template foo Oops] + +[foo +[template blah Eek] +[blah] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook new file mode 100644 index 000000000..2303fa8e8 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook @@ -0,0 +1,8 @@ +[quickbook 1.7] +[article Mismatched brackets] + +[template foo Oops] + +[foo +[template blah Eek] +[blah] diff --git a/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold new file mode 100644 index 000000000..bdbb114c7 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold @@ -0,0 +1,9 @@ + + +
    + Mismatched brackets + + [foo Eek + +
    diff --git a/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html new file mode 100644 index 000000000..27c42db45 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html @@ -0,0 +1,12 @@ + + + + +

    + Mismatched brackets +

    +

    + [foo Eek +

    + + diff --git a/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook new file mode 100644 index 000000000..271fee8af --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook @@ -0,0 +1,7 @@ +[article Mismatched brackets] + +[template foo Oops] +[template blah Eek] + +[foo +[blah] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold new file mode 100644 index 000000000..a7ab11e83 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold @@ -0,0 +1,12 @@ + + +
    + Mismatched brackets +
    + Something +
    + + ] + +
    diff --git a/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html new file mode 100644 index 000000000..a63ee3a63 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html @@ -0,0 +1,29 @@ + + + + +

    + Mismatched brackets +

    +
    +

    + Table of contents +

    + +
    +

    + ] +

    +
    +

    + Something +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook new file mode 100644 index 000000000..dadd42692 --- /dev/null +++ b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook @@ -0,0 +1,6 @@ +[article Mismatched brackets] + +[section Something] + +[endsect] +] diff --git a/src/boost/tools/quickbook/test/newline-1_1.gold b/src/boost/tools/quickbook/test/newline-1_1.gold new file mode 100644 index 000000000..716acca12 --- /dev/null +++ b/src/boost/tools/quickbook/test/newline-1_1.gold @@ -0,0 +1,24 @@ + + +
    + Test newlines + + Line 1 Line 2 + +
    + + It is better to be approximately right than exactly wrong. + -- Old adage + +
    + + Line 1 Line 2 + +
    + + It is better to be approximately right than exactly wrong. + -- Old adage + +
    +
    diff --git a/src/boost/tools/quickbook/test/newline-1_1.gold-html b/src/boost/tools/quickbook/test/newline-1_1.gold-html new file mode 100644 index 000000000..ea82594a1 --- /dev/null +++ b/src/boost/tools/quickbook/test/newline-1_1.gold-html @@ -0,0 +1,27 @@ + + + + +

    + Test newlines +

    +

    + Line 1
    Line 2 +

    +
    +

    + It is better to be approximately right than exactly wrong.
    -- Old adage +

    +
    +

    + Line 1
    Line 2 +

    +
    +

    + It is better to be approximately right than exactly wrong.
    -- Old adage +

    +
    + + diff --git a/src/boost/tools/quickbook/test/newline-1_1.quickbook b/src/boost/tools/quickbook/test/newline-1_1.quickbook new file mode 100644 index 000000000..6476f6a40 --- /dev/null +++ b/src/boost/tools/quickbook/test/newline-1_1.quickbook @@ -0,0 +1,10 @@ +[article Test newlines +] + +Line 1\nLine 2 + +[:["It is better to be approximately right than exactly wrong.]\n['-- Old adage]] + +Line 1[br]Line 2 + +[:["It is better to be approximately right than exactly wrong.][br]['-- Old adage]] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/para_test-1_5.gold b/src/boost/tools/quickbook/test/para_test-1_5.gold new file mode 100644 index 000000000..1a8f17d6a --- /dev/null +++ b/src/boost/tools/quickbook/test/para_test-1_5.gold @@ -0,0 +1,75 @@ + + +
    + Paragraph Test +
    + <link linkend="paragraph_test.some_paragraphs">Some Paragraphs</link> + + Shouldn't be a code block. + + + Should be bold. + + + Should be a single paragraph. + + + Single paragraph. + + + Single paragraph. + + + Single paragraph. + + + Single paragraph. + + + Lots of newlines round this paragraph. + + + Last paragraph. + +
    +
    + <link linkend="paragraph_test.inside___breaking_comment__blocks">Inside + blocks</link> + + + + Paragraphs + + + Shouldn't be a code block. + + + Should be bold. + + + Should be a single paragraph. + + + Single paragraph. + + + Single paragraph. + + + Single paragraph. + + + Single paragraph. + + + Lots of newlines round this paragraph. + + + Last paragraph. + + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/para_test-1_5.gold-html b/src/boost/tools/quickbook/test/para_test-1_5.gold-html new file mode 100644 index 000000000..92018efc5 --- /dev/null +++ b/src/boost/tools/quickbook/test/para_test-1_5.gold-html @@ -0,0 +1,97 @@ + + + + +

    + Paragraph Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Some Paragraphs +

    +
    +

    + Shouldn't be a code block. +

    +

    + Should be bold. +

    +

    + Should be a single paragraph. +

    +

    + Single paragraph. +

    +

    + Single paragraph. +

    +

    + Single paragraph. +

    +

    + Single paragraph. +

    +

    + Lots of newlines round this paragraph. +

    +

    + Last paragraph. +

    +
    +
    +
    +

    + Inside blocks +

    +
    +
    +
    + Paragraphs +
    +
    +

    + Shouldn't be a code block. +

    +

    + Should be bold. +

    +

    + Should be a single paragraph. +

    +

    + Single paragraph. +

    +

    + Single paragraph. +

    +

    + Single paragraph. +

    +

    + Single paragraph. +

    +

    + Lots of newlines round this paragraph. +

    +

    + Last paragraph. +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/para_test-1_5.quickbook b/src/boost/tools/quickbook/test/para_test-1_5.quickbook new file mode 100644 index 000000000..8a099bce5 --- /dev/null +++ b/src/boost/tools/quickbook/test/para_test-1_5.quickbook @@ -0,0 +1,81 @@ +[article Paragraph Test + [quickbook 1.5] +] + +[section Some Paragraphs] + +[/ Leading comment ] Shouldn't be a code block. + +[/ Leading comment ]*Should be bold*. + +Should be a +[/ Breaking comment] +single paragraph. + +Single paragraph. +[/ Breaking comment] + +Single paragraph. + +[/ Breaking comment] +Single paragraph. + +Single paragraph.[/ Trailing comment] + + + + + + +Lots of newlines round this paragraph. + + + + + + + + +Last paragraph.[endsect] + +[section Inside +[/Breaking comment] +blocks] + +[variablelist +[[Paragraphs][ +[/ Leading comment ] Shouldn't be a code block. + +[/ Leading comment ]*Should be bold*. + +Should be a +[/ Breaking comment] +single paragraph. + +Single paragraph. +[/ Breaking comment] + +Single paragraph. + +[/ Breaking comment] +Single paragraph. + +Single paragraph.[/ Trailing comment] + + + + + + +Lots of newlines round this paragraph. + + + + + + + + +Last paragraph.]]] + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/post_process-fail.quickbook b/src/boost/tools/quickbook/test/post_process-fail.quickbook new file mode 100644 index 000000000..994a63574 --- /dev/null +++ b/src/boost/tools/quickbook/test/post_process-fail.quickbook @@ -0,0 +1,3 @@ +[article Fail post process due to invalid embedded xml [quickbook 1.4] ] + +Invalid xml follows: '''<>''' diff --git a/src/boost/tools/quickbook/test/preformatted-1_1.gold b/src/boost/tools/quickbook/test/preformatted-1_1.gold new file mode 100644 index 000000000..a92b3f55a --- /dev/null +++ b/src/boost/tools/quickbook/test/preformatted-1_1.gold @@ -0,0 +1,40 @@ + + +
    + Preformatted +
    + Preformatted + + Here's the ubiquitous Hello World program in C++. + +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} + + + The code should appear as a single block of code in a monospaced font and with + no syntax highlighting. The fifth and sixth lines should appear indented to + the right, aligning under main, + on line 3. + + + Here's a one line function definitition: + +void something(); + + . + + + And some indented code: + +void go() + { + } + +
    +
    diff --git a/src/boost/tools/quickbook/test/preformatted-1_1.gold-html b/src/boost/tools/quickbook/test/preformatted-1_1.gold-html new file mode 100644 index 000000000..e25c047f5 --- /dev/null +++ b/src/boost/tools/quickbook/test/preformatted-1_1.gold-html @@ -0,0 +1,58 @@ + + + + +

    + Preformatted +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Preformatted +

    +
    +

    + Here's the ubiquitous Hello World + program in C++. +

    +
    #include <iostream>
    +
    +int main()
    +{
    +    std::cout << "Hello, World!" << std::endl;
    +    return 0;
    +}
    +
    +

    + The code should appear as a single block of code in a monospaced font and + with no syntax highlighting. The fifth and sixth lines should appear indented + to the right, aligning under main, + on line 3. +

    +

    + Here's a one line function definitition: +

    +
    void something(); 
    +

    + . +

    +

    + And some indented code: +

    +
    void go()
    +    {
    +    }
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/preformatted-1_1.quickbook b/src/boost/tools/quickbook/test/preformatted-1_1.quickbook new file mode 100644 index 000000000..e41f83b5d --- /dev/null +++ b/src/boost/tools/quickbook/test/preformatted-1_1.quickbook @@ -0,0 +1,32 @@ +[article Preformatted +] + +[section Preformatted] + +Here's the ubiquitous /Hello World/ program in C++. + +[pre +#include + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} +] + +The code should appear as a single block of code in a monospaced font and with +no syntax highlighting. The fifth and sixth lines should appear indented to the +right, aligning under `main`, on line 3. + +Here's a one line function definitition: [pre void something(); ]. + +And some indented code: + +[pre + void go() + { + } +] + +[endsect] diff --git a/src/boost/tools/quickbook/test/preformatted-1_6.gold b/src/boost/tools/quickbook/test/preformatted-1_6.gold new file mode 100644 index 000000000..46a90c98e --- /dev/null +++ b/src/boost/tools/quickbook/test/preformatted-1_6.gold @@ -0,0 +1,40 @@ + + +
    + Preformatted +
    + <link linkend="preformatted.preformatted">Preformatted</link> + + Here's the ubiquitous Hello World program in C++. + +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} + + + The code should appear as a single block of code in a monospaced font and with + no syntax highlighting. The fifth and sixth lines should appear indented to + the right, aligning under main, + on line 3. + + + Here's a one line function definitition: + +void something(); + + . + + + And some indented code: + + void go() + { + } + +
    +
    diff --git a/src/boost/tools/quickbook/test/preformatted-1_6.gold-html b/src/boost/tools/quickbook/test/preformatted-1_6.gold-html new file mode 100644 index 000000000..bebc28896 --- /dev/null +++ b/src/boost/tools/quickbook/test/preformatted-1_6.gold-html @@ -0,0 +1,58 @@ + + + + +

    + Preformatted +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Preformatted +

    +
    +

    + Here's the ubiquitous Hello World + program in C++. +

    +
    #include <iostream>
    +
    +int main()
    +{
    +    std::cout << "Hello, World!" << std::endl;
    +    return 0;
    +}
    +
    +

    + The code should appear as a single block of code in a monospaced font and + with no syntax highlighting. The fifth and sixth lines should appear indented + to the right, aligning under main, + on line 3. +

    +

    + Here's a one line function definitition: +

    +
    void something(); 
    +

    + . +

    +

    + And some indented code: +

    +
        void go()
    +    {
    +    }
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/preformatted-1_6.quickbook b/src/boost/tools/quickbook/test/preformatted-1_6.quickbook new file mode 100644 index 000000000..25c6bc5c5 --- /dev/null +++ b/src/boost/tools/quickbook/test/preformatted-1_6.quickbook @@ -0,0 +1,33 @@ +[article Preformatted +[quickbook 1.6] +] + +[section Preformatted] + +Here's the ubiquitous /Hello World/ program in C++. + +[pre +#include + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} +] + +The code should appear as a single block of code in a monospaced font and with +no syntax highlighting. The fifth and sixth lines should appear indented to the +right, aligning under `main`, on line 3. + +Here's a one line function definitition: [pre void something(); ]. + +And some indented code: + +[pre + void go() + { + } +] + +[endsect] diff --git a/src/boost/tools/quickbook/test/python/include_glob.qbk b/src/boost/tools/quickbook/test/python/include_glob.qbk new file mode 100644 index 000000000..6e1f5248a --- /dev/null +++ b/src/boost/tools/quickbook/test/python/include_glob.qbk @@ -0,0 +1,11 @@ +[/ + Copyright 2012-2013 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[quickbook 1.7] +[article Include Path] +[include ?.qbk] diff --git a/src/boost/tools/quickbook/test/python/include_glob_deps.txt b/src/boost/tools/quickbook/test/python/include_glob_deps.txt new file mode 100644 index 000000000..82fb66e68 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/include_glob_deps.txt @@ -0,0 +1,6 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +include_glob.qbk +sub1/a.qbk +sub2/b.qbk diff --git a/src/boost/tools/quickbook/test/python/include_glob_locs.txt b/src/boost/tools/quickbook/test/python/include_glob_locs.txt new file mode 100644 index 000000000..ccab607e0 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/include_glob_locs.txt @@ -0,0 +1,9 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) ++ include_glob.qbk +g ?.qbk +g sub1/?.qbk ++ sub1/a.qbk +g sub2/?.qbk ++ sub2/b.qbk diff --git a/src/boost/tools/quickbook/test/python/include_path.qbk b/src/boost/tools/quickbook/test/python/include_path.qbk new file mode 100644 index 000000000..3af3b3704 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/include_path.qbk @@ -0,0 +1,12 @@ +[/ + Copyright 2012-2013 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[quickbook 1.5] +[article Include Path] +[include a.qbk] +[include b.qbk] diff --git a/src/boost/tools/quickbook/test/python/include_path_deps.txt b/src/boost/tools/quickbook/test/python/include_path_deps.txt new file mode 100644 index 000000000..86875d79b --- /dev/null +++ b/src/boost/tools/quickbook/test/python/include_path_deps.txt @@ -0,0 +1,6 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +include_path.qbk +sub1/a.qbk +sub2/b.qbk diff --git a/src/boost/tools/quickbook/test/python/include_path_locs.txt b/src/boost/tools/quickbook/test/python/include_path_locs.txt new file mode 100644 index 000000000..7926db615 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/include_path_locs.txt @@ -0,0 +1,9 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) ++ include_path.qbk +- a.qbk ++ sub1/a.qbk +- b.qbk +- sub1/b.qbk ++ sub2/b.qbk diff --git a/src/boost/tools/quickbook/test/python/missing_relative.qbk b/src/boost/tools/quickbook/test/python/missing_relative.qbk new file mode 100644 index 000000000..ff96b1088 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/missing_relative.qbk @@ -0,0 +1,14 @@ +[/ + Copyright 2012-2013 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[quickbook 1.5] +[article Missing Relative] + +[include ../missing.qbk] +[include missing-dir/x.qbk] +[include missing-dir/../../x.qbk] diff --git a/src/boost/tools/quickbook/test/python/missing_relative_deps.txt b/src/boost/tools/quickbook/test/python/missing_relative_deps.txt new file mode 100644 index 000000000..fb8f27fee --- /dev/null +++ b/src/boost/tools/quickbook/test/python/missing_relative_deps.txt @@ -0,0 +1,4 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +missing_relative.qbk diff --git a/src/boost/tools/quickbook/test/python/missing_relative_locs.txt b/src/boost/tools/quickbook/test/python/missing_relative_locs.txt new file mode 100644 index 000000000..ac85cec10 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/missing_relative_locs.txt @@ -0,0 +1,7 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) ++ missing_relative.qbk +- ../missing.qbk +- missing-dir/x.qbk +- missing-dir/../../x.qbk diff --git a/src/boost/tools/quickbook/test/python/run_tests.py b/src/boost/tools/quickbook/test/python/run_tests.py new file mode 100644 index 000000000..955f52c92 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/run_tests.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python + +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +import sys, os, subprocess, tempfile, re + +def main(args, directory): + if len(args) != 1: + print "Usage: output-deps.py quickbook-command" + exit(1) + quickbook_command = args[0] + + failures = 0 + + # Dependency tests + + failures += run_quickbook(quickbook_command, 'svg_missing.qbk', + deps_gold = 'svg_missing_deps.txt') + failures += run_quickbook(quickbook_command, 'svg_missing.qbk', + locations_gold = 'svg_missing_locs.txt') + failures += run_quickbook(quickbook_command, 'missing_relative.qbk', + deps_gold = 'missing_relative_deps.txt', + locations_gold = 'missing_relative_locs.txt') + failures += run_quickbook(quickbook_command, 'include_path.qbk', + deps_gold = 'include_path_deps.txt', + locations_gold = 'include_path_locs.txt', + input_path = ['sub1', 'sub2']) + failures += run_quickbook(quickbook_command, 'include_glob.qbk', + deps_gold = 'include_glob_deps.txt', + locations_gold = 'include_glob_locs.txt', + input_path = ['sub1', 'sub2']) + + # Try building a simple document with various flags. + + failures += run_quickbook(quickbook_command, 'simple.qbk', + output_gold = 'simple.xml') + failures += run_quickbook(quickbook_command, 'simple.qbk', + extra_flags = ['--no-self-linked-headers'], + output_gold = 'simple_no_self_linked.xml') + failures += run_quickbook(quickbook_command, 'simple.qbk', + extra_flags = ['--no-pretty-print'], + output_gold = 'simple_no_pretty_print.xml') + failures += run_quickbook(quickbook_command, 'simple.qbk', + extra_flags = ['--indent','4','--linewidth','60'], + output_gold = 'simple_custom_pretty_print.xml') + + if failures == 0: + print "Success" + else: + print "Failures:",failures + exit(failures) + +def run_quickbook(quickbook_command, filename, output_gold = None, + deps_gold = None, locations_gold = None, input_path = [], + extra_flags = None): + failures = 0 + + command = [quickbook_command, '--debug', filename] + + output_filename = None + if output_gold: + output_filename = temp_filename('.qbk') + command.extend(['--output-file', output_filename]) + + deps_filename = None + if deps_gold: + deps_filename = temp_filename('.txt') + command.extend(['--output-deps', deps_filename]) + + locations_filename = None + if locations_gold: + locations_filename = temp_filename('.txt') + command.extend(['--output-checked-locations', locations_filename]) + + for path in input_path: + command.extend(['-I', path]) + + if extra_flags: + command.extend(extra_flags) + + try: + print 'Running: ' + ' '.join(command) + print + exit_code = subprocess.call(command) + print + success = not exit_code + + if output_filename: + output = load_file(output_filename) + else: + output = None + + if deps_filename: + deps = load_dependencies(deps_filename) + else: + deps = None + + if locations_filename: + locations = load_locations(locations_filename) + else: + locations = None + finally: + if output_filename: os.unlink(output_filename) + if deps_filename: os.unlink(deps_filename) + + if deps_gold: + gold = load_dependencies(deps_gold) + if deps != gold: + failures = failures + 1 + print "Dependencies don't match:" + print "Gold:", gold + print "Result:", deps + print + + if locations_gold: + gold = load_locations(locations_gold) + if locations != gold: + failures = failures + 1 + print "Dependencies don't match:" + print "Gold:", gold + print "Result:", locations + print + + if output_gold: + gold = load_file(output_gold) + if gold != output: + failures = failures + 1 + print "Output doesn't match:" + print + print gold + print + print output + print + + return failures + +def load_dependencies(filename): + dependencies = set() + f = open(filename, 'r') + for path in f: + if path[0] == '#': continue + if path in dependencies: + raise Exception("Duplicate path (%1s) in %2s" % (path, filename)) + dependencies.add(path) + return dependencies + +def load_locations(filename): + line_matcher = re.compile("^([+-g]) (.*)$") + dependencies = {} + f = open(filename, 'r') + glob = None + globs = {} + for line in f: + if line[0] == '#': continue + m = line_matcher.match(line) + + path = m.group(2) + + if not m: + raise Exception("Invalid dependency file: %1s" % filename) + if m.group(1) == 'g': + globs[path] = [] + glob = path + elif glob: + if m.group(1) != '+': + raise Exception("Negative match in glob.") + globs[glob].append(path) + else: + found = m.group(1) == '+' + if path in dependencies: + raise Exception("Duplicate path (%1s) in %2s" % (path, filename)) + dependencies[path] = found + return { 'dependencies': dependencies, 'globs': globs } + +def temp_filename(extension): + file = tempfile.mkstemp(suffix = extension) + os.close(file[0]) + return file[1] + +def load_file(filename): + f = open(filename, 'r') + try: + return f.read() + finally: + f.close() + + return None + +main(sys.argv[1:], os.path.dirname(sys.argv[0])) diff --git a/src/boost/tools/quickbook/test/python/simple.qbk b/src/boost/tools/quickbook/test/python/simple.qbk new file mode 100644 index 000000000..af42ca5cd --- /dev/null +++ b/src/boost/tools/quickbook/test/python/simple.qbk @@ -0,0 +1,23 @@ +[/ Copyright 2016 Daniel James. + / Distributed under the Boost Software License, Version 1.0. (See accompanying + / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ] + +[quickbook 1.6] +[article Simple Test Article + [copyright 2016 Daniel James] + [license + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + [@http://www.boost.org/LICENSE_1_0.txt]) + ] +] + +[section:one One] + +[h1 A] + +Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus. Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit. Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed pretium urna metus scelerisque urna massa vestibulum neque. + +[heading B] + +[endsect] diff --git a/src/boost/tools/quickbook/test/python/simple.xml b/src/boost/tools/quickbook/test/python/simple.xml new file mode 100644 index 000000000..9b8f73bed --- /dev/null +++ b/src/boost/tools/quickbook/test/python/simple.xml @@ -0,0 +1,36 @@ + + +
    + Simple Test Article + + + 2016 Daniel James + + + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + +
    + <link linkend="simple_test_article.one">One</link> + + A + + + Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit + luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus. + Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non + libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem + amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor + iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit. + Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed + pretium urna metus scelerisque urna massa vestibulum neque. + + + B + +
    +
    diff --git a/src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml b/src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml new file mode 100644 index 000000000..07b71e5bf --- /dev/null +++ b/src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml @@ -0,0 +1,42 @@ + + +
    + Simple Test Article + + + 2016 Daniel James + + + + Distributed under the Boost Software License, + Version 1.0. (See accompanying file LICENSE_1_0.txt + or copy at http://www.boost.org/LICENSE_1_0.txt) + + + +
    + <link linkend="simple_test_article.one">One</link> + + A + + + Lorem ipsum dolor. Sit amet quis hendrerit pretium + massa. Et imperdiet sit luctus et nam. Eget neque + vivamus nec aliquam vestibulum. Venenatis id penatibus. + Rutrum lobortis tempora. Turpis cras imperdiet. Quis + parturient quam sed non libero donec in ut aliquam + aliquam purus maecenas con dolor in est felis lorem + amet vel. Risus mauris felis. Libero felis fringilla. + Sed cursus metus dolor iaculis eget sit ac commodo. + Molestie interdum nunc. Erat auctor suscipit. Turpis + quisque nonummy. Integer vestibulum vivamus vulputate + euismod et sed pretium urna metus scelerisque urna + massa vestibulum neque. + + + B + +
    +
    diff --git a/src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml b/src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml new file mode 100644 index 000000000..258b4339f --- /dev/null +++ b/src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml @@ -0,0 +1,36 @@ + + +
    + Simple Test Article + + + + + + 2016 + Daniel James + + + + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) + + + + + + + +
    +<link linkend="simple_test_article.one">One</link> +A +Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus. Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit. Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed pretium urna metus scelerisque urna massa vestibulum neque. +B
    +
    + diff --git a/src/boost/tools/quickbook/test/python/simple_no_self_linked.xml b/src/boost/tools/quickbook/test/python/simple_no_self_linked.xml new file mode 100644 index 000000000..37dce222e --- /dev/null +++ b/src/boost/tools/quickbook/test/python/simple_no_self_linked.xml @@ -0,0 +1,36 @@ + + +
    + Simple Test Article + + + 2016 Daniel James + + + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + +
    + One + + A + + + Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit + luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus. + Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non + libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem + amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor + iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit. + Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed + pretium urna metus scelerisque urna massa vestibulum neque. + + + B + +
    +
    diff --git a/src/boost/tools/quickbook/test/python/sub1/a.qbk b/src/boost/tools/quickbook/test/python/sub1/a.qbk new file mode 100644 index 000000000..f3abe6ebf --- /dev/null +++ b/src/boost/tools/quickbook/test/python/sub1/a.qbk @@ -0,0 +1,9 @@ +[/ + Copyright 2012-2013 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +a diff --git a/src/boost/tools/quickbook/test/python/sub2/b.qbk b/src/boost/tools/quickbook/test/python/sub2/b.qbk new file mode 100644 index 000000000..9b4336bdc --- /dev/null +++ b/src/boost/tools/quickbook/test/python/sub2/b.qbk @@ -0,0 +1,9 @@ +[/ + Copyright 2012-2013 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +b diff --git a/src/boost/tools/quickbook/test/python/svg_missing.qbk b/src/boost/tools/quickbook/test/python/svg_missing.qbk new file mode 100644 index 000000000..1b54ece45 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/svg_missing.qbk @@ -0,0 +1,11 @@ +[/ + Copyright 2012-2013 Daniel James + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +] + +[article Dependencies for missing svg] + +[$missing.svg] diff --git a/src/boost/tools/quickbook/test/python/svg_missing_deps.txt b/src/boost/tools/quickbook/test/python/svg_missing_deps.txt new file mode 100644 index 000000000..91487e85e --- /dev/null +++ b/src/boost/tools/quickbook/test/python/svg_missing_deps.txt @@ -0,0 +1,4 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +svg_missing.qbk diff --git a/src/boost/tools/quickbook/test/python/svg_missing_locs.txt b/src/boost/tools/quickbook/test/python/svg_missing_locs.txt new file mode 100644 index 000000000..0f4c9b806 --- /dev/null +++ b/src/boost/tools/quickbook/test/python/svg_missing_locs.txt @@ -0,0 +1,5 @@ +# Copyright 2012-2013 Daniel James +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +- html/missing.svg ++ svg_missing.qbk diff --git a/src/boost/tools/quickbook/test/quickbook-testing.jam b/src/boost/tools/quickbook/test/quickbook-testing.jam new file mode 100644 index 000000000..a4529497c --- /dev/null +++ b/src/boost/tools/quickbook/test/quickbook-testing.jam @@ -0,0 +1,185 @@ +# +# Copyright (c) 2005 João Abecasis +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +import feature ; +import generators ; +import modules ; +import project ; +import targets ; +import testing ; +import toolset ; +import type ; + +feature.feature quickbook-testing.quickbook-command : : free dependency ; +feature.feature : : free ; +feature.feature : : free path ; +feature.feature : : free ; + +type.register QUICKBOOK_INPUT : quickbook ; +type.register QUICKBOOK_OUTPUT ; +type.register QUICKBOOK_HTML_OUTPUT ; + +generators.register-standard quickbook-testing.process-quickbook : QUICKBOOK_INPUT : QUICKBOOK_OUTPUT ; +generators.register-standard quickbook-testing.process-quickbook-html : QUICKBOOK_INPUT : QUICKBOOK_HTML_OUTPUT ; + +################################################################################ +# +# quickbook-test - generates a test for quickbook itself. A quickbook-test is +# actually made up of two tests: +# $(target-name).boostbook : +# generate boostbook from $(input) or $(target-name).quickbook +# +# $(target-name): +# compare generated boostbook to $(reference-output) or +# $(input).gold or $(target-name).gold +# +rule quickbook-test ( target-name : input ? : reference-output ? : requirements * ) +{ + input ?= $(target-name).quickbook ; + reference-output ?= $(input:S=.gold) ; + reference-output-html = $(input:S=.gold-html) ; + + local project = [ project.current ] ; + + local boost-root = [ modules.peek : BOOST_ROOT ] ; + + local t1 = + [ targets.create-typed-target QUICKBOOK_OUTPUT + : $(project) + : $(target-name).boostbook + : $(input) + : $(requirements) + $(target-name).test + $(boost-root)/tools/quickbook/src//quickbook + ] ; + + local t2 = + [ targets.create-typed-target RUN + : $(project) + : $(target-name) + : $(boost-root)/tools/quickbook/test/src/text_diff.cpp + : $(requirements) + $(target-name).test2 + $(reference-output) + $(target-name).boostbook + on + ] ; + + local t1-html = + [ targets.create-typed-target QUICKBOOK_HTML_OUTPUT + : $(project) + : $(target-name).html + : $(input) + : $(requirements) + $(target-name).test-html + $(boost-root)/tools/quickbook/src//quickbook + ] ; + + local t2-html = + [ targets.create-typed-target RUN + : $(project) + : $(target-name)-compare-html + : $(boost-root)/tools/quickbook/test/src/text_diff.cpp + : $(requirements) + $(target-name).test-html + $(reference-output-html) + $(target-name).html + on + ] ; + + local all-tests = [ modules.peek testing : .all-tests ] ; + all-tests += $(t2) $(t2-html) ; + modules.poke testing : .all-tests : $(all-tests) ; + + return $(t1) $(t2) $(t1-html) $(t2-html) ; +} + +rule quickbook-fail-test ( target-name : input ? : requirements * ) +{ + input ?= $(target-name).quickbook ; + + local project = [ project.current ] ; + + local boost-root = [ modules.peek : BOOST_ROOT ] ; + + local t = + [ targets.create-typed-target RUN_FAIL + : $(project) + : $(target-name) + : $(boost-root)/tools/quickbook/src//quickbook + : $(requirements) + $(input) + on + $(input) + ] + ; + + local all-tests = [ modules.peek testing : .all-tests ] ; + all-tests += $(t) ; + modules.poke testing : .all-tests : $(all-tests) ; + + return $(t) ; +} + +rule quickbook-error-test ( target-name : input ? : requirements * ) +{ + input ?= $(target-name).quickbook ; + + local project = [ project.current ] ; + + local boost-root = [ modules.peek : BOOST_ROOT ] ; + + local t = + [ targets.create-typed-target RUN + : $(project) + : $(target-name) + : $(boost-root)/tools/quickbook/src//quickbook + : $(requirements) + $(input) + --expect-errors + on + $(input) + ] + ; + + local all-tests = [ modules.peek testing : .all-tests ] ; + all-tests += $(t) ; + modules.poke testing : .all-tests : $(all-tests) ; + + return $(t) ; +} + +################################################################################ +toolset.flags quickbook-testing.process-quickbook quickbook-command ; +toolset.flags quickbook-testing.process-quickbook QB-DEFINES ; +toolset.flags quickbook-testing.process-quickbook XINCLUDE ; +toolset.flags quickbook-testing.process-quickbook INCLUDES ; +toolset.flags quickbook-testing.process-quickbook-html quickbook-command ; +toolset.flags quickbook-testing.process-quickbook-html QB-DEFINES ; +toolset.flags quickbook-testing.process-quickbook-html XINCLUDE ; +toolset.flags quickbook-testing.process-quickbook-html INCLUDES ; + +rule process-quickbook ( target : source : properties * ) +{ + DEPENDS $(target) : [ on $(target) return $(quickbook-command) ] ; +} + +actions process-quickbook bind quickbook-command +{ + $(quickbook-command) $(>) --output-file=$(<) --debug -D"$(QB-DEFINES)" -I"$(INCLUDES)" --xinclude-base="$(XINCLUDE)" +} + +rule process-quickbook-html ( target : source : properties * ) +{ + DEPENDS $(target) : [ on $(target) return $(quickbook-command) ] ; +} + +actions process-quickbook-html bind quickbook-command +{ + $(quickbook-command) $(>) --output-format=onehtml --output-file=$(<) --debug -D"$(QB-DEFINES)" -I"$(INCLUDES)" --xinclude-base="$(XINCLUDE)" +} diff --git a/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold new file mode 100644 index 000000000..86d2eda66 --- /dev/null +++ b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold @@ -0,0 +1,3945 @@ + + +
    + Quickbook 1.4 + + + + Joel de Guzman + + + Eric Niebler + + + + 2002 2004 2006 Joel de Guzman, + Eric Niebler + + + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + + WikiWiki style documentation tool + + +
    + <link linkend="quickbook.intro">Introduction</link> +
    + + Why program by hand in five days what + you can spend five years of your life automating? + + + -- Terrence Parr, author ANTLR/PCCTS + +
    + + Well, QuickBook started as a weekend hack. It was originally intended to be + a sample application using Spirit. + What is it? What you are viewing now, this documentation, is autogenerated + by QuickBook. These files were generated from one master: + +
    + + quickbook.qbk + +
    + + Originally named QuickDoc, this funky tool that never dies evolved into a funkier + tool thanks to Eric Niebler who resurrected the project making it generate + BoostBook + instead of HTML. The BoostBook + documentation format is an extension of DocBook, + an SGML or XML based format for describing documentation. + + + QuickBook is a WikiWiki style documentation tool geared towards C++ documentation + using simple rules and markup for simple formatting tasks. QuickBook extends + the WikiWiki concept. Like the WikiWiki, QuickBook documents are simple text + files. A single QuickBook document can generate a fully linked set of nice + HTML and PostScript/PDF documents complete with images and syntax- colorized + source code. + + + Features include: + + + + + generate BoostBook + xml, to generate HTML, PostScript and PDF + + + + + simple markup to link to Doxygen-generated entities + + + + + macro system for simple text substitution + + + + + simple markup for italics, bold, preformatted, blurbs, code samples, tables, + URLs, anchors, images, etc. + + + + + automatic syntax coloring of code samples + + + + + CSS support + + + +
    +
    + <link linkend="quickbook.change_log">Change Log</link> + + Version + 1.3 + + + + + Quickbook file inclusion [include]. + + + + + Better xml output (pretty layout). Check out the generated XML. + + + + + Regression testing facility: to make sure your document will always be + compatible (full backward compatibility) regardless of changes to QuickBook. + + + + + Code cleanup and refactoring. + + + + + Allow phrase markup in the doc-info. + + + + + Preformatted code blocks via ``code`` (double ticks) allows code in tables + and lists, for example. + + + + + Quickbook versioning; allows full backward compatibility. You have to add + [quickbook 1.3] to the doc-info header to enable the new features. Without + this, QuickBook will assume that the document is a pre-1.3 document. + + + + + Better (intuitive) paragraph termination. Some markups may terminate a + paragraph. Example: +[section x] +blah... +[endsect] + + + + + Fully qualified section and headers. Subsection names are concatenated + to the ID to avoid clashing. Example: doc_name.sect_name.sub_sect_name.sub_sub_sect_name + + + + + Better &nbsp; and whitespace handling in code snippets. + + + + + [xinclude] fixes up the relative path to the target XML file when input_directory + is not the same as the output_directory. + + + + + Allow untitled tables. + + + + + Allow phrase markups in section titles. + + + + + Allow escaping back to QuickBook from code, code blocks and inline code. + + + + + Footnotes, with the [footnote This is the footnote] syntax. + + + + + Post-processor bug fix for escaped XML code that it does not recognize. + + + + + Replaceable, with the [~replacement] syntax. + + + + + Generic Headers + + + + + Code changes to allow full recursion (i.e. Collectors and push/pop functions) + + + + + Various code cleanup/maintenance + + + + + Templates! + + + + + [conceptref] for referencing BoostBook <concept> entities. + + + + + Allow escape of spaces. The escaped space is removed from the output. Syntax: + \ . + + + + + Nested comments are now allowed. + + + + + Quickbook blocks can nest inside comments. + + + + + Import facility. + + + + + Callouts on imported code + + + + + Simple markups can now span a whole block. + + + + + Blurbs, Admonitions + and table cells (see Tables) + may now contain paragraphs. + + + + + \n + and [br] are now deprecated. + + + +
    +
    + <link linkend="quickbook.syntax">Syntax Summary</link> + + A QuickBook document is composed of one or more blocks. An example of a block + is the paragraph or a C++ code snippet. Some blocks have special mark-ups. + Blocks, except code snippets which have their own grammar (C++ or Python), + are composed of one or more phrases. A phrase can be a simple contiguous run + of characters. Phrases can have special mark-ups. Marked up phrases can recursively + contain other phrases, but cannot contain blocks. A terminal is a self contained + block-level or phrase-level element that does not nest anything. + + + Blocks, in general, are delimited by two end-of-lines (the block terminator). + Phrases in each block cannot contain a block terminator. This way, syntax errors + such as un-matched closing brackets do not go haywire and corrupt anything + past a single block. + +
    + <link linkend="quickbook.syntax.comments">Comments</link> + + Can be placed anywhere. + +[/ comment (no output generated) ] + +[/ comments can be nested [/ some more here] ] + +[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ] + +
    +
    + <link linkend="quickbook.syntax.phrase">Phrase Level Elements</link> +
    + <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link> +['italic], [*bold], [_underline], [^teletype], [-strikethrough] + + + will generate: + + + italic, bold, underline, teletype, strikethrough + + + Like all non-terminal phrase level elements, this can of course be nested: + +[*['bold-italic]] + + + will generate: + + + bold-italic + +
    +
    + <link linkend="quickbook.syntax.phrase.replaceable">Replaceable</link> + + When you want content that may or must be replaced by the user, use the + syntax: + +[~replacement] + + + This will generate: + + + replacement + +
    +
    + <link linkend="quickbook.syntax.phrase.quotations">Quotations</link> +["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein + + + will generate: + + + A question that sometimes drives me hazy: am I or are the others + crazy?--Einstein + + + Note the proper left and right quote marks. Also, while you can simply + use ordinary quote marks like "quoted", our quotation, above, + will generate correct DocBook quotations (e.g. <quote>quoted</quote>). + + + Like all phrase elements, quotations may be nested. Example: + +["Here's the rule for bargains: ["Do other men, for they would do you.] That's +the true business precept.] + + + will generate: + + + Here's the rule for bargains: Do other men, for they would + do you. That's the true business precept. + +
    +
    + <link linkend="quickbook.syntax.phrase.simple_formatting">Simple formatting</link> + + Simple markup for formatting text, common in many applications, is now + supported: + +/italic/, *bold*, _underline_, =teletype= + + + will generate: + + + italic, bold, underline, teletype + + + Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives + are much stricter + + Thanks to David Barrett, author of Qwiki, + for sharing these samples and teaching me these obscure formatting rules. + I wasn't sure at all if Spirit, + being more or less a formal EBNF parser, can handle the context sensitivity + and ambiguity. + + . + + + + + Simple markups cannot nest. You can combine a simple markup with a + nestable markup. + + + + + Simple markups cannot contain any other form of quickbook markup. + + + + + A non-space character must follow the leading markup + + + + + A non-space character must precede the trailing markup + + + + + A space or a punctuation must follow the trailing markup + + + + + If the matching markup cannot be found within a block, the formatting + will not be applied. This is to ensure that un-matched formatting markups, + which can be a common mistake, does not corrupt anything past a single + block. We do not want the rest of the document to be rendered bold + just because we forgot a trailing '*'. A single block is terminated + by two end of lines or the close bracket: ']'. + + + + + A line starting with the star will be interpreted as an unordered list. + See Unordered + lists. + + + + + More Formatting Samples + + + + + + Markup + + + + + Result + + + + + + + + + *Bold* + + + + + Bold + + + + + + + *Is bold* + + + + + Is bold + + + + + + + * Not bold* *Not bold * * Not bold * + + + + + * Not bold* *Not bold * * Not bold * + + + + + + + This*Isn't*Bold (no bold) + + + + + This*Isn't*Bold (no bold) + + + + + + + (*Bold Inside*) (parenthesis not bold) + + + + + (Bold Inside) (parenthesis not + bold) + + + + + + + *(Bold Outside)* (parenthesis bold) + + + + + (Bold Outside) (parenthesis + bold) + + + + + + + 3*4*5 = 60 (no bold) + + + + + 3*4*5 = 60 (no bold) + + + + + + + 3 * 4 * 5 = 60 (no bold) + + + + + 3 * 4 * 5 = 60 (no bold) + + + + + + + 3 *4* 5 = 60 (4 is bold) + + + + + 3 4 5 = 60 (4 is bold) + + + + + + + *This is bold* this is not *but this is* + + + + + This is bold this is not but this is + + + + + + + *This is bold*. + + + + + This is bold. + + + + + + + *B*. (bold B) + + + + + B. (bold B) + + + + + + + ['*Bold-Italic*] + + + + + Bold-Italic + + + + + + + *side-by*/-side/ + + + + + side-by-side + + + + + +
    + + As mentioned, simple markups cannot go past a single block. The text from + "have" to "full" in the following paragraph will be + rendered as bold: + +Baa baa black sheep, *have you any wool? +Yes sir, yes sir, three bags full!* +One for the master, one for the dame, +And one for the little boy who lives down the lane. + + + Baa baa black sheep, have you any wool? Yes sir, + yes sir, three bags full! One for the master, one for the dame, + And one for the little boy who lives down the lane. + + + But in the following paragraph, bold is not applied: + +Baa baa black sheep, *have you any wool? +Yes sir, yes sir, three bags full! +One for the master, one for the dame, +And one for the little boy who lives down the lane. + + + Baa baa black sheep, *have you any wool? Yes sir, yes sir, three bags full! + One for the master, one for the dame, And one for the little boy who lives + down the lane. + +
    +
    + <link linkend="quickbook.syntax.phrase.inline_code">Inline code</link> + + Inlining code in paragraphs is quite common when writing C++ documentation. + We provide a very simple markup for this. For example, this: + +This text has inlined code `int main() { return 0; }` in it. + + + will generate: + + + This text has inlined code int main() { return 0; } + in it. The code will be syntax highlighted. + + + + We simply enclose the code with the tick: "`", not the + single quote: "'". + Note too that `some code` is preferred over [^some code]. + + +
    +
    + <link linkend="quickbook.syntax.phrase.code_blocks">Code blocks</link> + + Preformatted code simply starts with a space or a tab (See Code). + However, such a simple syntax cannot be used as phrase elements in lists + (See Ordered + lists and Unordered + lists), tables (See Tables), + etc. Inline code (see above) can. The problem is, inline code does not + allow formatting with newlines, spaces, and tabs. These are lost. + + + We provide a phrase level markup that is a mix between the two. By using + the double-tick, instead of the single-tick, we are telling QuickBook to + use preformatted blocks of code. Example: + +`` + #include <iostream> + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } +`` + + + will generate: + + +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} + + +
    +
    + <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link> + + If a document contains more than one type of source code then the source + mode may be changed dynamically as the document is processed. All QuickBook + documents are initially in C++ mode by default, though an alternative initial + value may be set in the Document + section. + + + To change the source mode, use the [source-mode] markup, + where source-mode is one of the supported modes. For + example, this: + +Python's [python] `import` is rather like C++'s [c++] `#include`. A +C++ comment `// looks like this` whereas a Python comment [python] +`# looks like this`. + + + will generate: + + + Python's import is rather + like C++'s #include. + A C++ comment // looks like this + whereas a Python comment #looks like this. + + + Supported Source Modes + + + + + + Mode + + + + + Source Mode Markup + + + + + + + + + C++ + + + + + [c++] + + + + + + + Python + + + + + [python] + + + + + +
    + + + The source mode strings are lowercase. + + +
    +
    + <link linkend="quickbook.syntax.phrase.line_break">line-break</link> +[br] + + + + [br] is now deprecated. Blurbs, + Admonitions + and table cells (see Tables) + may now contain paragraphs. + + +
    +
    + <link linkend="quickbook.syntax.phrase.anchors">Anchors</link> +[#named_anchor] + + + A named anchor is a hook that can be referenced by a link elsewhere in + the document. You can then reference an anchor with [link named_anchor +Some link text]. + See Anchor links, + Section and Heading. + +
    + + + + +
    + <link linkend="quickbook.syntax.phrase.escape">Escape</link> + + The escape mark-up is used when we don't want to do any processing. + +''' +escape (no processing/formatting) +''' + + + Escaping allows us to pass XML markup to BoostBook + or DocBook. For example: + +''' +<emphasis role="bold">This is direct XML markup</emphasis> +''' + + + This is direct XML markup + + + + Be careful when using the escape. The text must conform to BoostBook/DocBook syntax. + + +
    +
    + <link linkend="quickbook.syntax.phrase.single_char_escape">Single + char escape</link> + + The backslash may be used to escape a single punctuation character. The + punctuation immediately after the backslash is passed without any processing. + This is useful when we need to escape QuickBook punctuations such as [ and ]. + For example, how do you escape the triple quote? Simple: \'\'\' + + + \n + has a special meaning. It is used to generate line breaks. + + + + \n + and [br] are now deprecated. Blurbs, + Admonitions + and table cells (see Tables) + may now contain paragraphs. + + + + The escaped space: \ also + has a special meaning. The escaped space is removed from the output. + +
    +
    + <link linkend="quickbook.syntax.phrase.images">Images</link> +[$image.jpg] + +
    +
    + <link linkend="quickbook.syntax.phrase.footnotes">Footnotes</link> + + As of version 1.3, QuickBook supports footnotes. Just put the text of the + footnote in a [footnote] block, and the text will be put at the + bottom of the current page. For example, this: + +[footnote A sample footnote] + + + will generate this + + A sample footnote + + . + +
    + <link linkend="quickbook.syntax.phrase.footnotes.macro_expansion">Macro + Expansion</link> +__a_macro_identifier__ + + + See Macros for details. + +
    +
    + <link linkend="quickbook.syntax.phrase.footnotes.template_expansion">Template + Expansion</link> +[a_template_identifier] + + + See Templates + for details. + +
    +
    +
    +
    + <link linkend="quickbook.syntax.block">Block Level Elements</link> +
    + <link linkend="quickbook.syntax.block.document">Document</link> + + Every document must begin with a Document Info section, which should look + like this: + +[document-type The Document Title + [quickbook 1.3] + [version 1.0] + [id the_document_name] + [dirname the_document_dir] + [copyright 2000 2002 2003 Joe Blow, Jane Doe] + [purpose The document's reason for being] + [category The document's category] + [authors [Blow, Joe], [Doe, Jane]] + [license The document's license] + [source-mode source-type] +] + + + Where document-type is one of: + + + + + book + + + + + article + + + + + library + + + + + chapter + + + + + part + + + + + appendix + + + + + preface + + + + + qandadiv + + + + + qandaset + + + + + reference + + + + + set + + + + + quickbook 1.3 declares the version of quickbook the document is written + for. In its absence, version 1.1 is assumed. + + + version, id, dirname, + copyright, purpose, category, + authors, license, last-revision + and source-mode are optional information. + + + source-type is a lowercase string setting the initial + Source Mode. + If the source-mode field is omitted, a default value + of c++ will be used. + +
    +
    + <link linkend="quickbook.syntax.block.section">Section</link> + + Starting a new section is accomplished with: + +[section:id The Section Title] + + + where id is optional. id will be the filename of the + generated section. If it is not present, "The Section Title" + will be normalized and become the id. Valid characters are a-Z, + A-Z, 0-9 and _. + All non-valid characters are converted to underscore and all upper-case + are converted to lower case. Thus: "The Section Title" will be + normalized to "the_section_title". + + + End a section with: + +[endsect] + + + Sections can nest, and that results in a hierarchy in the table of contents. + +
    +
    + <link linkend="quickbook.syntax.block.xinclude">xinclude</link> + + You can include another XML file with: + +[xinclude file.xml] + + + This is useful when file.xml has been generated by Doxygen and contains + your reference section. + +
    +
    + <link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link> + + Paragraphs start left-flushed and are terminated by two or more newlines. + No markup is needed for paragraphs. QuickBook automatically detects paragraphs + from the context. Block markups [section, endsect, h1, h2, h3, h4, h5, + h6, blurb, (block-quote) ':', pre, def, table and include ] may also terminate + a paragraph. + +
    +
    + <link linkend="quickbook.syntax.block.lists">Lists</link> +
    + <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered + lists</link> +# One +# Two +# Three + + + will generate: + + + + + One + + + + + Two + + + + + Three + + + +
    +
    + <link linkend="quickbook.syntax.block.lists.list_hierarchies">List + Hierarchies</link> + + List hierarchies are supported. Example: + +# One +# Two +# Three + # Three.a + # Three.b + # Three.c +# Four + # Four.a + # Four.a.i + # Four.a.ii +# Five + + + will generate: + + + + + One + + + + + Two + + + + + Three + + + + Three.a + + + + + Three.b + + + + + Three.c + + + + + + + + Fourth + + + + Four.a + + + + Four.a.i + + + + + Four.a.ii + + + + + + + + + + + Five + + + +
    +
    + <link linkend="quickbook.syntax.block.lists.long_list_lines">Long + List Lines</link> + + Long lines will be wrapped appropriately. Example: + +# A short item. +# A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. +# A short item. + + + + + A short item. + + + + + A very long item. A very long item. A very long item. A very long + item. A very long item. A very long item. A very long item. A very + long item. A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. A very long + item. + + + + + A short item. + + + +
    +
    + <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered + lists</link> +* First +* Second +* Third + + + will generate: + + + + + First + + + + + Second + + + + + Third + + + +
    +
    + <link linkend="quickbook.syntax.block.lists.mixed_lists">Mixed lists</link> + + Mixed lists (ordered and unordered) are supported. Example: + +# One +# Two +# Three + * Three.a + * Three.b + * Three.c +# Four + + + will generate: + + + + + One + + + + + Two + + + + + Three + + + + Three.a + + + + + Three.b + + + + + Three.c + + + + + + + + Four + + + + + And... + +# 1 + * 1.a + # 1.a.1 + # 1.a.2 + * 1.b +# 2 + * 2.a + * 2.b + # 2.b.1 + # 2.b.2 + * 2.b.2.a + * 2.b.2.b + + + will generate: + + + + + 1 + + + + 1.a + + + + 1.a.1 + + + + + 1.a.2 + + + + + + + + 1.b + + + + + + + + 2 + + + + 2.a + + + + + 2.b + + + + 2.b.1 + + + + + 2.b.2 + + + + 2.b.2.a + + + + + 2.b.2.b + + + + + + + + + + + + +
    +
    +
    + <link linkend="quickbook.syntax.block.code">Code</link> + + Preformatted code starts with a space or a tab. The code will be syntax + highlighted according to the current Source + Mode: + +#include <iostream> + +int main() +{ + // Sample code + std::cout << "Hello, World\n"; + return 0; +} + +import cgi + +def cookForHtml(text): + '''"Cooks" the input text for HTML.''' + + return cgi.escape(text) + + + Macros that are already defined are expanded in source code. Example: + +[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]] +[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]] + + using __boost__::__array__; + + + Generates: + +using boost::array; + +
    +
    + <link linkend="quickbook.syntax.block.escape_back">Escaping Back To + QuickBook</link> + + Inside code, code blocks and inline code, QuickBook does not allow any + markup to avoid conflicts with the target syntax (e.g. c++). In case you + need to switch back to QuickBook markup inside code, you can do so using + a language specific escape-back delimiter. In C++ + and Python, the delimiter is the double tick (back-quote): "``" + and "``". Example: + +void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``() +{ +} + + + Will generate: + +void foo() +{ +} + + + When escaping from code to QuickBook, only phrase level markups are allowed. + Block level markups like lists, tables etc. are not allowed. + +
    +
    + <link linkend="quickbook.syntax.block.preformatted">Preformatted</link> + + Sometimes, you don't want some preformatted text to be parsed as C++. In + such cases, use the [pre ... ] markup block. + +[pre + + Some *preformatted* text Some *preformatted* text + + Some *preformatted* text Some *preformatted* text + + Some *preformatted* text Some *preformatted* text + +] + + + Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block + level markup, pre (and Code) are the only ones that allow multiple newlines. + The markup above will generate: + +Some preformatted text Some preformatted text + + Some preformatted text Some preformatted text + + Some preformatted text Some preformatted text + + + + Notice that unlike Code, phrase markup such as font style is still permitted + inside pre blocks. + +
    +
    + <link linkend="quickbook.syntax.block.blockquote">Blockquote</link> +[:sometext...] + +
    + + Indents the paragraph. This applies to one paragraph only. + +
    +
    +
    + <link linkend="quickbook.syntax.block.admonitions">Admonitions</link> +[note This is a note] +[tip This is a tip] +[important This is important] +[caution This is a caution] +[warning This is a warning] + + + generates DocBook admonitions: + + + + This is a note + + + + + This is a tip + + + + + This is important + + + + + This is a caution + + + + + This is a warning + + + + These are the only admonitions supported by DocBook. + So, for example [information This is some information] + is unlikely to produce the desired effect. + +
    +
    + <link linkend="quickbook.syntax.block.headings">Headings</link> +[h1 Heading 1] +[h2 Heading 2] +[h3 Heading 3] +[h4 Heading 4] +[h5 Heading 5] +[h6 Heading 6] + + + Heading + 1 + + + Heading + 2 + + + Heading + 3 + + + Heading + 4 + + + Heading + 5 + + + Heading + 6 + + + Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized + names with name="section_id.normalized_header_text" + (i.e. valid characters are a-z, A-Z, + 0-9 and _. All non-valid characters + are converted to underscore and all upper-case are converted to lower-case. + For example: Heading 1 in section Section 2 will be normalized to section_2.heading_1). + You can use: + +[link section_id.normalized_header_text The link text] + + + to link to them. See Anchor + links and Section + for more info. + +
    +
    + <link linkend="quickbook.syntax.block.generic_heading">Generic Heading</link> + + In cases when you don't want to care about the heading level (1 to 6), + you can use the Generic Heading: + +[heading Heading] + + + The Generic Heading assumes the level, plus one, of + the innermost section where it is placed. For example, if it is placed + in the outermost section, then, it assumes h2. + + + Headings are often used as an alternative to sections. It is used particularly + if you do not want to start a new section. In many cases, however, headings + in a particular section is just flat. Example: + +[section A] +[h2 X] +[h2 Y] +[h2 Z] +[endsect] + + + Here we use h2 assuming that section A is the outermost level. If it is + placed in an inner level, you'll have to use h3, h4, etc. depending on + where the section is. In general, it is the section level plus one. It + is rather tedious, however, to scan the section level everytime. If you + rewrite the example above as shown below, this will be automatic: + +[section A] +[heading X] +[heading Y] +[heading Z] +[endsect] + + + They work well regardless where you place them. You can rearrange sections + at will without any extra work to ensure correct heading levels. In fact, + with section and heading, you + have all you need. h1..h6 becomes + redundant. h1..h6 might be deprecated + in the future. + +
    +
    + <link linkend="quickbook.syntax.block.macros">Macros</link> +[def macro_identifier some text] + + + When a macro is defined, the identifier replaces the text anywhere in the + file, in paragraphs, in markups, etc. macro_identifier is a string of non- + white space characters except ']'. A macro may not follow an alphabetic + character or the underscore. The replacement text can be any phrase (even + marked up). Example: + +[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] +sf_logo + + + Now everywhere the sf_logo is placed, the picture will be inlined. + + + + + sflogo + + + + + + It's a good idea to use macro identifiers that are distinguishable. For + instance, in this document, macro identifiers have two leading and trailing + underscores (e.g. __spirit__). The reason is to avoid unwanted + macro replacement. + + + + Links (URLS) and images are good candidates for macros. 1) + They tend to change a lot. It is a good idea to place all links and images + in one place near the top to make it easy to make changes. 2) + The syntax is not pretty. It's easier to read and write, e.g. __spirit__ + than [@http://spirit.sourceforge.net Spirit]. + + + Some more examples: + +[def :-) [$theme/smiley.png]] +[def __spirit__ [@http://spirit.sourceforge.net Spirit]] + + + (See Images and + Links) + + + Invoking these macros: + +Hi __spirit__ :-) + + + will generate this: + + + Hi Spirit + + smiley + + + +
    +
    + <link linkend="quickbook.syntax.block.predefined_macros">Predefined + Macros</link> + + Quickbook has some predefined macros that you can already use. + + + Predefined Macros + + + + + + Macro + + + + + Meaning + + + + + Example + + + + + + + + + __DATE__ + + + + + Today's date + + + + + 2000-Dec-20 + + + + + + + __TIME__ + + + + + The current time + + + + + 12:00:00 PM + + + + + + + __FILENAME__ + + + + + Quickbook source filename + + + + + quickbook_manual-1_4.quickbook + + + + + +
    +
    +
    + <link linkend="quickbook.syntax.block.templates">Templates</link> + + Templates provide a more versatile text substitution mechanism. Templates + come in handy when you need to create parameterizable, multi-line, boilerplate + text that you specify once and expand many times. Templates accept one + or more arguments. These arguments act like place-holders for text replacement. + Unlike simple macros, which are limited to phrase level markup, templates + can contain block level markup (e.g. paragraphs, code blocks and tables). + + + Example template: + +[template person[name age what] + +Hi, my name is [name]. I am [age] years old. I am a [what]. + +] + + + Template + Identifier + + + Template identifiers can either consist of: + + + + + An initial alphabetic character or the underscore, followed by zero + or more alphanumeric characters or the underscore. This is similar + to your typical C/C++ identifier. + + + + + A single character punctuation (a non-alphanumeric printable character) + + + + + Formal + Template Arguments + + + Template formal arguments are identifiers consisting of an initial alphabetic + character or the underscore, followed by zero or more alphanumeric characters + or the underscore. This is similar to your typical C/C++ identifier. + + + A template formal argument temporarily hides a template of the same name + at the point where the template + is expanded. Note that the body of the person + template above refers to name age + and what as [name] [age] + and [what]. name age + and what are actually templates that exist in the duration + of the template call. + + + Template + Body + + + The template body can be just about any QuickBook block or phrase. There + are actually two forms. Templates may be phrase or block level. Phrase + templates are of the form: + +[template sample[arg1 arg2...argN] replacement text... ] + + + Block templates are of the form: + +[template sample[arg1 arg2...argN] +replacement text... +] + + + The basic rule is as follows: if a newline immediately follows the argument + list, then it is a block template, otherwise, it is a phrase template. + Phrase templates are typically expanded as part of phrases. Like macros, + block level elements are not allowed in phrase templates. + + + Template + Expansion + + + You expand a template this way: + +[template_identifier arg1..arg2..arg3] + + + At template expansion, you supply the actual arguments. The template will + be expanded with your supplied arguments. Example: + +[person James Bond..39..Spy] +[person Santa Clause..87..Big Red Fatso] + + + Which will expand to: + + + Hi, my name is James Bond. I am 39 years old. I am a Spy. + + + Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso. + + + + A word of caution: Templates are recursive. A template can call another + template or even itself, directly or indirectly. There are no control + structures in QuickBook (yet) so this will always mean infinite recursion. + QuickBook can detect this situation and report an error if recursion + exceeds a certain limit. + + + + Each actual argument can be a word, a text fragment or just about any + QuickBook phrase. Arguments + are separated by the double dot ".." and terminated + by the close parenthesis. + + + Nullary Templates + + + Nullary templates look and act like simple macros. Example: + +[template alpha[]'''&#945;'''] +[template beta[]'''&#946;'''] + + + Expanding: + +Some squigles...[*[alpha][beta]] + + We have: + + + Some squiggles...αβ + + + The difference with macros are + + + + + The explicit template + expansion syntax. This is an advantage because, now, we don't + have to use obscure naming conventions like double underscores (e.g. + __alpha__) to avoid unwanted macro replacement. + + + + + The template is expanded at the point where it is invoked. A macro + is expanded immediately at its point of declaration. This is subtle + and can cause a slight difference in behavior especially if you refer + to other macros and templates in the body. + + + + + The empty brackets after the template identifier (alpha[]) + indicates no arguments. If the template body does not look like a template + argument list, we can elide the empty brackets. Example: + +[template aristotle_quote Aristotle: [*['Education is the best provision +for the journey to old age.]]] + + + Expanding: + +Here's a quote from [aristotle_quote]. + + + We have: + + + Here's a quote from Aristotle: Education + is the best provision for the journey to old age.. + + + The disadvantage is that you can't avoid the space between the template + identifier, aristotle_quote, + and the template body "Aristotle...". This space will be part + of the template body. If that space is unwanted, use empty brackets or + use the space escape: "\ ". + Example: + +[template tag\ _tag] + + + Then expanding: + +`struct` x[tag]; + + + We have: + + + struct x_tag; + + + You have a couple of ways to do it. I personally prefer the explicit empty + brackets, though. + + + Simple + Arguments + + + As mentioned, arguments are separated by the double dot "..". + If there are less arguments passed than expected, QuickBook attempts to + break the last argument into two or more arguments following this logic: + + + + + Break the last argument into two, at the first space found ('', + '\n', \t' or '\r'). + + + + + Repeat until there are enough arguments or if there are no more spaces + found (in which case, an error is reported). + + + + + For example: + +[template simple[a b c d] [a][b][c][d]] +[simple w x y z] + + + will produce: + + + wxyz + + + "w x y z" is initially treated as a single argument because we + didn't supply any ".." separators. However, + since simple expects 4 arguments, "w x y z" + is broken down iteratively (applying the logic above) until we have "w", + "x", "y" and "z". + + + QuickBook only tries to get the arguments it needs. For example: + +[simple w x y z trail] + + + will produce: + + + wxyz trail + + + The arguments being: "w", "x", "y" and "z + trail". + + + It should be obvious now that for simple arguments with no spaces, we can + get by without separating the arguments with ".." + separators. It is possible to combine ".." + separators with the argument passing simplification presented above. Example: + +[simple what do you think ..m a n?] + + + will produce: + + + what do you think man? + + + Punctuation + Templates + + + With templates, one of our objectives is to allow us to rewrite QuickBook + in QuickBook (as a qbk library). For that to happen, we need to accommodate + single character punctuation templates which are fairly common in QuickBook. + You might have noticed that single character punctuations are allowed as + template + identifiers. Example: + +[template ![bar] <hey>[bar]</hey>] + + + Now, expanding this: + +[!baz] + + + We will have: + +<hey>baz</hey> + +
    +
    + <link linkend="quickbook.syntax.block.blurbs">Blurbs</link> +[blurb :-) [*An eye catching advertisement or note...] + + __spirit__ is an object-oriented recursive-descent parser generator framework + implemented using template meta-programming techniques. Expression templates + allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) + completely in C++. +] + + + will generate this: + + + + + + smiley + + An eye catching advertisement + or note... + + + Spirit is an object-oriented + recursive-descent parser generator framework implemented using template + meta-programming techniques. Expression templates allow us to approximate + the syntax of Extended Backus-Normal Form (EBNF) completely in C++. + + + + + Prefer admonitions + wherever appropriate. + + +
    +
    + <link linkend="quickbook.syntax.block.tables">Tables</link> +[table A Simple Table + [[Heading 1] [Heading 2] [Heading 3]] + [[R0-C0] [R0-C1] [R0-C2]] + [[R1-C0] [R1-C1] [R1-C2]] + [[R2-C0] [R2-C1] [R2-C2]] +] + + + will generate: + + + A Simple Table + + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + + + + + R0-C0 + + + + + R0-C1 + + + + + R0-C2 + + + + + + + R2-C0 + + + + + R2-C1 + + + + + R2-C2 + + + + + + + R3-C0 + + + + + R3-C1 + + + + + R3-C2 + + + + + +
    + + The table title is optional. The first row of the table is automatically + treated as the table header; that is, it is wrapped in <thead>...</thead> + XML tags. Note that unlike the original QuickDoc, the columns are nested + in [ cells... ]. The syntax is free-format and allows big cells to be formatted + nicely. Example: + +[table Table with fat cells + [[Heading 1] [Heading 2]] + [ + [Row 0, Col 0: a small cell] + [ + Row 0, Col 1: a big fat cell with paragraphs + + Boost provides free peer-reviewed portable C++ source libraries. + + We emphasize libraries that work well with the C++ Standard Library. + Boost libraries are intended to be widely useful, and usable across + a broad spectrum of applications. The Boost license encourages both + commercial and non-commercial use. + ] + ] + [ + [Row 1, Col 0: a small cell] + [Row 1, Col 1: a small cell] + ] +] + + + and thus: + + + Table with fat cells + + + + + + Heading 1 + + + + + Heading 2 + + + + + + + + + Row 0, Col 0: a small cell + + + + + Row 0, Col 1: a big fat cell with paragraphs + + + Boost provides free peer-reviewed portable C++ source libraries. + + + We emphasize libraries that work well with the C++ Standard Library. + Boost libraries are intended to be widely useful, and usable + across a broad spectrum of applications. The Boost license encourages + both commercial and non-commercial use. + + + + + + + Row 1, Col 0: a small cell + + + + + Row 1, Col 1: a small cell + + + + + +
    + + Here's how to have preformatted blocks of code in a table cell: + +[table Table with code + [[Comment] [Code]] + [ + [My first program] + [`` + #include <iostream> + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } + ``] + ] +] + + + Table with code + + + + + + Comment + + + + + Code + + + + + + + + + My first program + + + + +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} + + + + + + +
    +
    +
    + <link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link> +[variablelist A Variable List + [[term 1] [The definition of term 1]] + [[term 2] [The definition of term 2]] + [[term 3] [The definition of term 3]] +] + + + will generate: + + + A Variable List + + term 1 + + + The definition of term 1 + + + + + term 2 + + + The definition of term 2 + + + + + term 3 + + + The definition of term 3 + + + + + + The rules for variable lists are the same as for tables, except that only + 2 "columns" are allowed. The first column contains the terms, + and the second column contains the definitions. Those familiar with HTML + will recognize this as a "definition list". + +
    +
    + <link linkend="quickbook.syntax.block.include">Include</link> + + You can include one QuickBook file from another. The syntax is simply: + +[include someother.qbk] + + + The included file will be processed as if it had been cut and pasted into + the current document, with the following exceptions: + + + + + The __FILENAME__ predefined macro will reflect the name of the file currently being + processed. + + + + + Any macros defined in the included file are scoped to that file. + + + + + The [include] directive lets you specify a document + id to use for the included file. When this id is not explicitly specified, + the id defaults to the filename ("someother", in the example + above). You can specify the id like this: + +[include:someid someother.qbk] + + + All auto-generated anchors will use the document id as a unique prefix. + So for instance, if there is a top section in someother.qbk named "Intro", + the named anchor for that section will be "someid.intro", and + you can link to it with [link someid.intro The Intro]. + +
    +
    + <link linkend="quickbook.syntax.block.import">Import</link> + + When documenting code, you'd surely need to present code from actual source + files. While it is possible to copy some code and paste them in your QuickBook + file, doing so is error prone and the extracted code in the documentation + tends to get out of sync with the actual code as the code evolves. The + problem, as always, is that once documentation is written, the tendency + is for the docs to languish in the archives without maintenance. + + + QuickBook's import facility provides a nice solution. + + + Example + + + You can effortlessly import code snippets from source code into your QuickBook. + The following illustrates how this is done: + +[import ../test/stub.cpp] +[foo] +[bar] + + + The first line: + +[import ../test/stub.cpp] + + + collects specially marked-up code snippets from stub.cpp + and places them in your QuickBook file as virtual templates. Each of the + specially marked-up code snippets has a name (e.g. foo + and bar in the example + above). This shall be the template identifier for that particular code + snippet. The second and third line above does the actual template expansion: + +[foo] +[bar] + + + And the result is: + + + This is the foo function. + + + This description can have paragraphs... + + + + + lists + + + + + etc. + + + + + And any quickbook block markup. + + +std::string foo() +{ + // return 'em, foo man! + return "foo"; +} + + + + This is the bar function + + +std::string bar() +{ + // return 'em, bar man! + return "bar"; +} + + + + Some trailing text here + + + Code + Snippet Markup + + + Note how the code snippets in stub.cpp + get marked up. We use distinguishable comments following the form: + +//[id +some code here +//] + + + The first comment line above initiates a named code-snippet. This prefix + will not be visible in quickbook. The entire code-snippet in between //[id and //] + will be inserted as a template in quickbook with name id. + The comment //] ends a code-snippet + This too will not be visible in quickbook. + + + Special + Comments + + + Special comments of the form: + +//` some [*quickbook] markup here + + + and: + +/*` some [*quickbook] markup here */ + + + will be parsed by QuickBook. This can contain quickbook blocks + (e.g. sections, paragraphs, tables, etc). In the first case, the initial + slash-slash, tick and white-space shall be ignored. In the second, the + initial slash-star-tick and the final star-slash shall be ignored. + + + Callouts + + + Special comments of the form: + +/*< some [*quickbook] markup here >*/ + + + will be regarded as callouts. These will be collected, numbered and rendered + as a "callout bug" (a small icon with a number). After the whole + snippet is parsed, the callout list is generated. See Callouts + for details. Example: + + +std::string foo_bar() +{ + return "foo-bar"; +} + + + + + + The Mythical FooBar. See Foobar + for details + + + + + return 'em, foo-bar man! + + + + + Checkout stub.cpp to see the actual + code. + +
    +
    +
    +
    + <link linkend="quickbook.install">Installation and configuration</link> + + This section provides some guidelines on how to install and configure BoostBook + and Quickbook under several operating systems. + + + Before continuing, it is very important that you keep this in mind: if you + try to build some documents and the process breaks due to misconfiguration, + be absolutely sure to delete any bin + and bin.v2 directories generated by the build before + trying again. Otherwise your configuration fixes will not take any effect. + +
    + <link linkend="quickbook.install.windows">Windows 2000, XP, 2003, Vista</link> +
    + + Section contributed by Julio M. Merino Vidal + +
    + + The following instructions apply to any Windows system based on Windows 2000, + including Windows XP, Windows 2003 Server and Windows Vista. The paths shown + below are taken from a Windows Vista machine; you will need to adjust them + to match your system in case you are running an older version. + + + + + First of all you need to have a copy of xsltproc + for Windows. There are many ways to get this tool, but to keep things + simple, use the binary + packages made by Igor Zlatkovic. At the very least, you need + to download the following packages: iconv, + zlib, libxml2 + and libxslt. + + + + + Unpack all these packages in the same directory so that you get unique + bin, include + and lib directories within + the hierarchy. These instructions use C:\Users\example\Documents\boost\xml + as the root for all files. + + + + + From the command line, go to the bin + directory and launch xsltproc.exe + to ensure it works. You should get usage information on screen. + + + + + Download Docbook + XML 4.2 and unpack it in the same directory used above. That + is: C:\Users\example\Documents\boost\xml\docbook-xml. + + + + + Download the latest Docbook + XSL version and unpack it, again in the same directory used before. + To make things easier, rename the directory created during the extraction + to docbook-xsl (bypassing the version name): + C:\Users\example\Documents\boost\xml\docbook-xsl. + + + + + Add the following to your user-config.jam + file, which should live in your home directory (%HOMEDRIVE%%HOMEPATH%). + You must already have it somewhere or otherwise you could not be building + Boost (i.e. missing tools configuration). + + + +using xsltproc + : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe" + ; + +using boostbook + : "C:/Users/example/Documents/boost/xml/docbook-xsl" + : "C:/Users/example/Documents/boost/xml/docbook-xml" + ; + + + The above steps are enough to get a functional BoostBook setup. Quickbook + will be automatically built when needed. If you want to avoid these rebuilds: + + + + + Go to Quickbook's source directory (BOOST_ROOT\tools\quickbook). + + + + + Build the utility by issuing bjam + --v2. + + + + + Copy the resulting quickbook.exe + binary (located under the BOOST_ROOT\bin.v2 + hierarchy) to a safe place. Following our previous example, you can install + it into: C:\Users\example\Documents\boost\xml\bin. + + + + + Add the following to your user-config.jam + file: + + + +using quickbook + : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe" + ; + +
    +
    + <link linkend="quickbook.install.linux">Debian, Ubuntu</link> + + The following instructions apply to Debian and its derivatives. They are + based on a Ubuntu Edgy install but should work on other Debian based systems. + + + First install the bjam, + xsltproc, docbook-xsl and + docbook-xml packages. For example, using apt-get: + +sudo apt-get install xsltprc docbook-xsl docbook-xml + + + If you're planning on building boost's documentation, you'll also need to + install the doxygen package + as well. + + + Next, we need to configure Boost Build to compile BoostBook files. Add the + following to your user-config.jam file, which should be in your home + directory. If you don't have one, create a file containing this text. For + more information on setting up user-config.jam, see + the Boost + Build documentation. + +using xsltproc ; + +using boostbook + : /usr/share/xml/docbook/stylesheet/nwalsh + : /usr/share/xml/docbook/schema/dtd/4.2 + ; + +# Remove this line if you're not using doxygen +using doxygen ; + + + The above steps are enough to get a functional BoostBook setup. Quickbook + will be automatically built when needed. If you want to avoid these rebuilds: + + + + + Go to Quickbook's source directory (BOOST_ROOT/tools/quickbook). + + + + + Build the utility by issuing bjam + --v2. + + + + + Copy the resulting quickbook + binary (located under the BOOST_ROOT/bin.v2 + hierarchy) to a safe place. The traditional location is /usr/local/bin. + + + + + Add the following to your user-config.jam + file, using the full path of the quickbook executable: + + + +using quickbook + : /usr/local/bin/quickbook + ; + +
    +
    +
    + <link linkend="quickbook.editors">Editor Support</link> + + Editing quickbook files is usually done with text editors both simple and powerful. + The following sections list the settings for some editors which can help make + editing quickbook files a bit easier. + + + + + + note + + You may submit your settings, tips, and suggestions to + the authors, or through the docs + Boost Docs mailing list. + + +
    + <link linkend="quickbook.editors.scite">Scintilla Text Editor</link> +
    + + Section contributed by Dean Michael Berris + +
    + + The Scintilla Text Editor (SciTE) is a free source code editor for Win32 + and X. It uses the SCIntilla source code editing component. + + + + + + tip + + SciTE can be downloaded from http://www.scintilla.org/SciTE.html + + + + You can use the following settings to highlight quickbook tags when editing + quickbook files. + +qbk=*.qbk +lexer.*.qbk=props +use.tabs.$(qbk)=0 +tab.size.$(qbk)=4 +indent.size.$(qbk)=4 +style.props.32=$(font.base) +comment.stream.start.props=[/ +comment.stream.end.props=] +comment.box.start.props=[/ +comment.box.middle.props= +comment.box.end.props=] + + + + + + note + + Thanks to Rene Rivera for the above SciTE settings. + + +
    +
    +
    + <link linkend="quickbook.faq">Frequently Asked Questions</link> + + Can + I use QuickBook for non-Boost documentation? + + + QuickBook can be used for non-Boost documentation with a little extra work. + +
    + + Faq contributed by Michael Marcin + +
    + + When building HTML documentation with BoostBook a Boost C++ Libraries header + is added to the files. When using QuickBook to document projects outside of + Boost this is not desirable. This behavior can be overridden at the BoostBook + level by specifying some XSLT options. When using Boost Build version 2 (BBv2) + this can be achieved by adding parameters to the BoostBook target declaration. + + + For example: + +using quickbook ; + +xml my_doc : my_doc.qbk ; + +boostbook standalone + : + my_doc + : + <xsl:param>boost.image.src=images/my_project_logo.png + <xsl:param>boost.image.alt="\"My Project\"" + <xsl:param>boost.image.w=100 + <xsl:param>boost.image.h=50 + <xsl:param>nav.layout=none + ; + +
    +
    + <link linkend="quickbook.ref">Quick Reference</link> + + [cpp] + + + Syntax Compendium + + + + + + To do this... + + + + + Use this... + + + + + See this... + + + + + + + + + comment + + + + + [/ some comment] + + + + + Comments + + + + + + + italics + + + + + ['italics] or /italics/ + + + + + Font Styles + and Simple + formatting + + + + + + + bold + + + + + [*bold] or *bold* + + + + + Font Styles + and Simple + formatting + + + + + + + underline + + + + + [_underline] or _underline_ + + + + + Font Styles + and Simple + formatting + + + + + + + teletype + + + + + [^teletype] or =teletype= + + + + + Font Styles + and Simple + formatting + + + + + + + strikethrough + + + + + [-strikethrough] + + + + + Font Styles + and Simple + formatting + + + + + + + replaceable + + + + + [~replaceable] + + + + + Replaceble + + + + + + + source mode + + + + + [c++] or [python] + + + + + Source Mode + + + + + + + inline code + + + + + `int main();` + + + + + Inline code + + + + + + + code block + + + + + ``int main();`` + + + + + Code + + + + + + + code escape + + + + + ``from c++ to QuickBook`` + + + + + Escaping Back + To QuickBook + + + + + + + line break + + + + + [br] or \n + + + + + line-break + DEPRECATED + + + + + + + anchor + + + + + [#anchor] + + + + + Anchors + + + + + + + link + + + + + [@http://www.boost.org Boost] + + + + + Links + + + + + + + anchor link + + + + + [link section.anchor Link text] + + + + + Anchor links + + + + + + + refentry link + + + + + [link xml.refentry Link text] + + + + + refentry links + + + + + + + function link + + + + + [funcref fully::qualified::function_name Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + class link + + + + + [classref fully::qualified::class_name Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + member link + + + + + [memberref fully::qualified::member_name Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + enum link + + + + + [enumref fully::qualified::enum_name Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + macro link + + + + + [macroref MACRO_NAME Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + concept link + + + + + [conceptref ConceptName Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + header link + + + + + [headerref path/to/header.hpp Link text] + + + + + function, class, + member, enum, macro, concept or header links + + + + + + + escape + + + + + '''escaped text (no processing/formatting)''' + + + + + Escape + + + + + + + single char escape + + + + + \c + + + + + Single + char escape + + + + + + + images + + + + + [$image.jpg] + + + + + Images + + + + + + + begin section + + + + + [section The Section Title] + + + + + Section + + + + + + + end section + + + + + [endsect] + + + + + Section + + + + + + + paragraph + + + + + No markup. Paragraphs start left-flushed and are terminated by two + or more newlines. + + + + + Paragraphs + + + + + + + ordered list + + + +# one +# two +# three + + + + + Ordered + lists + + + + + + + unordered list + + + +* one +* two +* three + + + + + Unordered + lists + + + + + + + code + + + + + No markup. Preformatted code starts with a space or a tab. + + + + + Code + + + + + + + preformatted + + + + + [pre preformatted] + + + + + Preformatted + + + + + + + block quote + + + + + [:sometext...] + + + + + Blockquote + + + + + + + heading 1 + + + + + [h1 Heading 1] + + + + + Heading + + + + + + + heading 2 + + + + + [h2 Heading 2] + + + + + Heading + + + + + + + heading 3 + + + + + [h3 Heading 3] + + + + + Heading + + + + + + + heading 4 + + + + + [h4 Heading 4] + + + + + Heading + + + + + + + heading 5 + + + + + [h5 Heading 5] + + + + + Heading + + + + + + + heading 6 + + + + + [h6 Heading 6] + + + + + Heading + + + + + + + macro + + + + + [def macro_identifier some text] + + + + + Macros + + + + + + + template + + + + + [template[a b] [a] body [b]] + + + + + Templates + + + + + + + blurb + + + + + [blurb advertisement or note...] + + + + + Blurbs + + + + + + + admonition + + + + + [warning Warning text...] + + + + + Admonitions + + + + + + + table + + + +[table Title +[[a][b][c]] +[[a][b][c]] +] + + + + + Tables + + + + + + + variablelist + + + +[variablelist Title +[[a][b]] +[[a][b]] +] + + + + + Variable Lists + + + + + + + include + + + + + [include someother.qbk] + + + + + Include + + + + + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html new file mode 100644 index 000000000..0eeaf54e2 --- /dev/null +++ b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html @@ -0,0 +1,4177 @@ + + + + +

    + Quickbook 1.4 +

    +
    +

    + Joel de Guzman +

    +

    + Eric Niebler +

    +
    + +
    +

    + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +

    +
    + +
    +

    + Introduction +

    +
    +
    +

    + Why program + by hand in five days what you can spend five years of your life automating? +

    +

    + -- Terrence Parr, author ANTLR/PCCTS +

    +
    +

    + Well, QuickBook started as a weekend hack. It was originally intended to + be a sample application using Spirit. + What is it? What you are viewing now, this documentation, is autogenerated + by QuickBook. These files were generated from one master: +

    +
    +

    + quickbook.qbk +

    +
    +

    + Originally named QuickDoc, this funky tool that never dies evolved into + a funkier tool thanks to Eric Niebler who resurrected the project making + it generate BoostBook + instead of HTML. The BoostBook + documentation format is an extension of DocBook, + an SGML or XML based format for describing documentation. +

    +

    + QuickBook is a WikiWiki style documentation tool geared towards C++ documentation + using simple rules and markup for simple formatting tasks. QuickBook extends + the WikiWiki concept. Like the WikiWiki, QuickBook documents are simple + text files. A single QuickBook document can generate a fully linked set + of nice HTML and PostScript/PDF documents complete with images and syntax- + colorized source code. +

    +

    + Features include: +

    +
      +
    • +
      + generate BoostBook + xml, to generate HTML, PostScript and PDF +
      +
    • +
    • +
      + simple markup to link to Doxygen-generated entities +
      +
    • +
    • +
      + macro system for simple text substitution +
      +
    • +
    • +
      + simple markup for italics, bold, preformatted, blurbs, code samples, + tables, URLs, anchors, images, etc. +
      +
    • +
    • +
      + automatic syntax coloring of code samples +
      +
    • +
    • +
      + CSS support +
      +
    • +
    +
    +
    +
    +

    + Change Log +

    +
    +

    + Version 1.3 +

    +
      +
    • +
      + Quickbook file inclusion [include]. +
      +
    • +
    • +
      + Better xml output (pretty layout). Check out the generated XML. +
      +
    • +
    • +
      + Regression testing facility: to make sure your document will always + be compatible (full backward compatibility) regardless of changes to + QuickBook. +
      +
    • +
    • +
      + Code cleanup and refactoring. +
      +
    • +
    • +
      + Allow phrase markup in the doc-info. +
      +
    • +
    • +
      + Preformatted code blocks via ``code`` (double ticks) allows code in + tables and lists, for example. +
      +
    • +
    • +
      + Quickbook versioning; allows full backward compatibility. You have + to add [quickbook 1.3] to the doc-info header to enable the new features. + Without this, QuickBook will assume that the document is a pre-1.3 + document. +
      +
    • +
    • +
      + Better (intuitive) paragraph termination. Some markups may terminate + a paragraph. Example: +
      [section x]
      +blah...
      +[endsect]
      +
      +
    • +
    • +
      + Fully qualified section and headers. Subsection names are concatenated + to the ID to avoid clashing. Example: doc_name.sect_name.sub_sect_name.sub_sub_sect_name +
      +
    • +
    • +
      + Better &nbsp; and whitespace handling in code snippets. +
      +
    • +
    • +
      + [xinclude] fixes up the relative path to the target XML file when input_directory + is not the same as the output_directory. +
      +
    • +
    • +
      + Allow untitled tables. +
      +
    • +
    • +
      + Allow phrase markups in section titles. +
      +
    • +
    • +
      + Allow escaping back to QuickBook from code, code blocks and inline + code. +
      +
    • +
    • +
      + Footnotes, with the [footnote This is the footnote] syntax. +
      +
    • +
    • +
      + Post-processor bug fix for escaped XML code that it does not recognize. +
      +
    • +
    • +
      + Replaceable, with the [~replacement] syntax. +
      +
    • +
    • +
      + Generic Headers +
      +
    • +
    • +
      + Code changes to allow full recursion (i.e. Collectors and push/pop + functions) +
      +
    • +
    • +
      + Various code cleanup/maintenance +
      +
    • +
    • +
      + Templates! +
      +
    • +
    • +
      + [conceptref] for referencing BoostBook <concept> entities. +
      +
    • +
    • +
      + Allow escape of spaces. The escaped space is removed from the output. + Syntax: \ . +
      +
    • +
    • +
      + Nested comments are now allowed. +
      +
    • +
    • +
      + Quickbook blocks can nest inside comments. +
      +
    • +
    • +
      + Import facility. +
      +
    • +
    • +
      + Callouts on imported code +
      +
    • +
    • +
      + Simple markups can now span a whole block. +
      +
    • +
    • +
      + Blurbs, Admonitions + and table cells (see Tables) + may now contain paragraphs. +
      +
    • +
    • +
      + \n + and [br] are now deprecated. +
      +
    • +
    +
    +
    +
    +

    + Syntax Summary +

    +
    +

    + A QuickBook document is composed of one or more blocks. An example of a + block is the paragraph or a C++ code snippet. Some blocks have special + mark-ups. Blocks, except code snippets which have their own grammar (C++ + or Python), are composed of one or more phrases. A phrase can be a simple + contiguous run of characters. Phrases can have special mark-ups. Marked + up phrases can recursively contain other phrases, but cannot contain blocks. + A terminal is a self contained block-level or phrase-level element that + does not nest anything. +

    +

    + Blocks, in general, are delimited by two end-of-lines (the block terminator). + Phrases in each block cannot contain a block terminator. This way, syntax + errors such as un-matched closing brackets do not go haywire and corrupt + anything past a single block. +

    +
    +
    +

    + Comments +

    +
    +

    + Can be placed anywhere. +

    +
    [/ comment (no output generated) ]
    +
    +
    [/ comments can be nested [/ some more here] ]
    +
    +
    [/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]
    +
    +
    +
    +
    +

    + Phrase Level Elements +

    +
    +
    +
    +

    + Font Styles +

    +
    +
    ['italic], [*bold], [_underline], [^teletype], [-strikethrough]
    +
    +

    + will generate: +

    +

    + italic, bold, + underline, teletype, strikethrough +

    +

    + Like all non-terminal phrase level elements, this can of course be + nested: +

    +
    [*['bold-italic]]
    +
    +

    + will generate: +

    +

    + bold-italic +

    +
    +
    +
    +

    + Replaceable +

    +
    +

    + When you want content that may or must be replaced by the user, use + the syntax: +

    +
    [~replacement]
    +
    +

    + This will generate: +

    +

    + replacement +

    +
    +
    +
    +

    + Quotations +

    +
    +
    ["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
    +
    +

    + will generate: +

    +

    + A question that sometimes drives me hazy: am I or are the others + crazy?--Einstein +

    +

    + Note the proper left and right quote marks. Also, while you can simply + use ordinary quote marks like "quoted", our quotation, above, + will generate correct DocBook quotations (e.g. <quote>quoted</quote>). +

    +

    + Like all phrase elements, quotations may be nested. Example: +

    +
    ["Here's the rule for bargains: ["Do other men, for they would do you.] That's
    +the true business precept.]
    +
    +

    + will generate: +

    +

    + Here's the rule for bargains: Do other men, for they would do + you. That's the true business precept. +

    +
    +
    +
    +

    + Simple formatting +

    +
    +

    + Simple markup for formatting text, common in many applications, is + now supported: +

    +
    /italic/, *bold*, _underline_, =teletype=
    +
    +

    + will generate: +

    +

    + italic, bold, + underline, teletype +

    +

    + Unlike QuickBook's standard formatting scheme, the rules for simpler + alternatives are much stricter[1]. +

    +
      +
    • +
      + Simple markups cannot nest. You can combine a simple markup with + a nestable markup. +
      +
    • +
    • +
      + Simple markups cannot contain any other form of quickbook markup. +
      +
    • +
    • +
      + A non-space character must follow the leading markup +
      +
    • +
    • +
      + A non-space character must precede the trailing markup +
      +
    • +
    • +
      + A space or a punctuation must follow the trailing markup +
      +
    • +
    • +
      + If the matching markup cannot be found within a block, the formatting + will not be applied. This is to ensure that un-matched formatting + markups, which can be a common mistake, does not corrupt anything + past a single block. We do not want the rest of the document to + be rendered bold just because we forgot a trailing '*'. A single + block is terminated by two end of lines or the close bracket: ']'. +
      +
    • +
    • +
      + A line starting with the star will be interpreted as an unordered + list. See Unordered + lists. +
      +
    • +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    More Formatting Samples
    +

    + Markup +

    +
    +

    + Result +

    +
    +

    + *Bold* +

    +
    +

    + Bold +

    +
    +

    + *Is bold* +

    +
    +

    + Is bold +

    +
    +

    + * Not bold* *Not bold * * Not bold * +

    +
    +

    + * Not bold* *Not bold * * Not bold * +

    +
    +

    + This*Isn't*Bold (no bold) +

    +
    +

    + This*Isn't*Bold (no bold) +

    +
    +

    + (*Bold Inside*) (parenthesis not bold) +

    +
    +

    + (Bold Inside) + (parenthesis not bold) +

    +
    +

    + *(Bold Outside)* (parenthesis bold) +

    +
    +

    + (Bold Outside) + (parenthesis bold) +

    +
    +

    + 3*4*5 = 60 (no bold) +

    +
    +

    + 3*4*5 = 60 (no bold) +

    +
    +

    + 3 * 4 * 5 = 60 (no bold) +

    +
    +

    + 3 * 4 * 5 = 60 (no bold) +

    +
    +

    + 3 *4* 5 = 60 (4 is bold) +

    +
    +

    + 3 4 5 = 60 (4 + is bold) +

    +
    +

    + *This is bold* this is not *but this is* +

    +
    +

    + This is bold this + is not but this is +

    +
    +

    + *This is bold*. +

    +
    +

    + This is bold. +

    +
    +

    + *B*. (bold B) +

    +
    +

    + B. (bold B) +

    +
    +

    + ['*Bold-Italic*] +

    +
    +

    + Bold-Italic +

    +
    +

    + *side-by*/-side/ +

    +
    +

    + side-by-side +

    +
    +
    +

    + As mentioned, simple markups cannot go past a single block. The text + from "have" to "full" in the following paragraph + will be rendered as bold: +

    +
    Baa baa black sheep, *have you any wool?
    +Yes sir, yes sir, three bags full!*
    +One for the master, one for the dame,
    +And one for the little boy who lives down the lane.
    +
    +

    + Baa baa black sheep, have you any wool? + Yes sir, yes sir, three bags full! One for the master, + one for the dame, And one for the little boy who lives down the lane. +

    +

    + But in the following paragraph, bold is not applied: +

    +
    Baa baa black sheep, *have you any wool?
    +Yes sir, yes sir, three bags full!
    +One for the master, one for the dame,
    +And one for the little boy who lives down the lane.
    +
    +

    + Baa baa black sheep, *have you any wool? Yes sir, yes sir, three bags + full! One for the master, one for the dame, And one for the little + boy who lives down the lane. +

    +
    +
    +
    +

    + Inline code +

    +
    +

    + Inlining code in paragraphs is quite common when writing C++ documentation. + We provide a very simple markup for this. For example, this: +

    +
    This text has inlined code `int main() { return 0; }` in it.
    +
    +

    + will generate: +

    +

    + This text has inlined code int + main() + { return + 0; } + in it. The code will be syntax highlighted. +

    +
    +

    + We simply enclose the code with the tick: "`", not the single + quote: "'". Note + too that `some code` is preferred over [^some code]. +

    +
    +
    +
    +
    +

    + Code blocks +

    +
    +

    + Preformatted code simply starts with a space or a tab (See Code). + However, such a simple syntax cannot be used as phrase elements in + lists (See Ordered + lists and Unordered + lists), tables (See Tables), + etc. Inline code (see above) can. The problem is, inline code does + not allow formatting with newlines, spaces, and tabs. These are lost. +

    +

    + We provide a phrase level markup that is a mix between the two. By + using the double-tick, instead of the single-tick, we are telling QuickBook + to use preformatted blocks of code. Example: +

    +
    ``
    +    #include <iostream>
    +
    +    int main()
    +    {
    +        std::cout << "Hello, World!" << std::endl;
    +        return 0;
    +    }
    +``
    +
    +

    + will generate: +

    +

    +

    #include <iostream>
    +
    +int main()
    +{
    +    std::cout << "Hello, World!" << std::endl;
    +    return 0;
    +}
    +
    +

    +
    +
    +
    +

    + Source Mode +

    +
    +

    + If a document contains more than one type of source code then the source + mode may be changed dynamically as the document is processed. All QuickBook + documents are initially in C++ mode by default, though an alternative + initial value may be set in the Document + section. +

    +

    + To change the source mode, use the [source-mode] markup, where + source-mode is one of the supported modes. For example, this: +

    +
    Python's [python] `import` is rather like C++'s [c++] `#include`. A
    +C++ comment `// looks like this` whereas a Python comment [python]
    +`# looks like this`.
    +
    +

    + will generate: +

    +

    + Python's import is rather + like C++'s #include. + A C++ comment // looks like this + whereas a Python comment #looks like this. +

    +
    + + + + + + + + + + + + + + + + + + +
    Supported Source Modes
    +

    + Mode +

    +
    +

    + Source Mode Markup +

    +
    +

    + C++ +

    +
    +

    + [c++] +

    +
    +

    + Python +

    +
    +

    + [python] +

    +
    +
    +
    +

    + The source mode strings are lowercase. +

    +
    +
    +
    +
    +

    + line-break +

    +
    +
    [br]
    +
    +
    +

    + [br] is now deprecated. Blurbs, + Admonitions and + table cells (see Tables) + may now contain paragraphs. +

    +
    +
    +
    +
    +

    + Anchors +

    +
    +
    [#named_anchor]
    +
    +

    + A named anchor is a hook that can be referenced by a link elsewhere + in the document. You can then reference an anchor with [link named_anchor + Some link text]. See Anchor + links, Section and + Heading. +

    +
    +
    + + + + +
    +

    + Escape +

    +
    +

    + The escape mark-up is used when we don't want to do any processing. +

    +
    '''
    +escape (no processing/formatting)
    +'''
    +
    +

    + Escaping allows us to pass XML markup to BoostBook + or DocBook. For example: +

    +
    '''
    +<emphasis role="bold">This is direct XML markup</emphasis>
    +'''
    +
    +

    + This is direct XML markup +

    +
    +

    + Be careful when using the escape. The text must conform to BoostBook/DocBook syntax. +

    +
    +
    +
    +
    +

    + Single char escape +

    +
    +

    + The backslash may be used to escape a single punctuation character. + The punctuation immediately after the backslash is passed without any + processing. This is useful when we need to escape QuickBook punctuations + such as [ and ]. For example, how do you escape the + triple quote? Simple: \'\'\' +

    +

    + \n + has a special meaning. It is used to generate line breaks. +

    +
    +

    + \n + and [br] are now deprecated. Blurbs, + Admonitions and + table cells (see Tables) + may now contain paragraphs. +

    +
    +

    + The escaped space: \ also + has a special meaning. The escaped space is removed from the output. +

    +
    +
    +
    +

    + Images +

    +
    +
    [$image.jpg]
    +
    +
    +
    +
    +

    + Footnotes +

    +
    +

    + As of version 1.3, QuickBook supports footnotes. Just put the text + of the footnote in a [footnote] block, and the text will be put at + the bottom of the current page. For example, this: +

    +
    [footnote A sample footnote]
    +
    +

    + will generate this[2]. +

    +
    +
    +

    + Macro Expansion +

    +
    +
    __a_macro_identifier__
    +
    +

    + See Macros for details. +

    +
    +
    +
    +

    + Template Expansion +

    +
    +
    [a_template_identifier]
    +
    +

    + See Templates for + details. +

    +
    +
    +
    +
    +
    +

    + Block Level Elements +

    +
    +
    +
    +

    + Document +

    +
    +

    + Every document must begin with a Document Info section, which should + look like this: +

    +
    [document-type The Document Title
    +    [quickbook 1.3]
    +    [version 1.0]
    +    [id the_document_name]
    +    [dirname the_document_dir]
    +    [copyright 2000 2002 2003 Joe Blow, Jane Doe]
    +    [purpose The document's reason for being]
    +    [category The document's category]
    +    [authors [Blow, Joe], [Doe, Jane]]
    +    [license The document's license]
    +    [source-mode source-type]
    +]
    +
    +

    + Where document-type is one of: +

    +
      +
    • +
      + book +
      +
    • +
    • +
      + article +
      +
    • +
    • +
      + library +
      +
    • +
    • +
      + chapter +
      +
    • +
    • +
      + part +
      +
    • +
    • +
      + appendix +
      +
    • +
    • +
      + preface +
      +
    • +
    • +
      + qandadiv +
      +
    • +
    • +
      + qandaset +
      +
    • +
    • +
      + reference +
      +
    • +
    • +
      + set +
      +
    • +
    +

    + quickbook 1.3 declares the version of quickbook the document is written + for. In its absence, version 1.1 is assumed. +

    +

    + version, id, dirname, copyright, + purpose, category, authors, license, + last-revision and source-mode are optional information. +

    +

    + source-type is a lowercase string setting the initial Source + Mode. If the source-mode field is omitted, a default value + of c++ will be used. +

    +
    +
    +
    +

    + Section +

    +
    +

    + Starting a new section is accomplished with: +

    +
    [section:id The Section Title]
    +
    +

    + where id is optional. id will + be the filename of the generated section. If it is not present, "The + Section Title" will be normalized and become the id. Valid characters + are a-Z, A-Z, 0-9 and _. All non-valid + characters are converted to underscore and all upper-case are converted + to lower case. Thus: "The Section Title" will be normalized + to "the_section_title". +

    +

    + End a section with: +

    +
    [endsect]
    +
    +

    + Sections can nest, and that results in a hierarchy in the table of + contents. +

    +
    +
    +
    +

    + xinclude +

    +
    +

    + You can include another XML file with: +

    +
    [xinclude file.xml]
    +
    +

    + This is useful when file.xml has been generated by Doxygen and contains + your reference section. +

    +
    +
    +
    +

    + Paragraphs +

    +
    +

    + Paragraphs start left-flushed and are terminated by two or more newlines. + No markup is needed for paragraphs. QuickBook automatically detects + paragraphs from the context. Block markups [section, endsect, h1, h2, + h3, h4, h5, h6, blurb, (block-quote) ':', pre, def, table and include + ] may also terminate a paragraph. +

    +
    +
    +
    +

    + Lists +

    +
    +
    +
    +

    + Ordered lists +

    +
    +
    # One
    +# Two
    +# Three
    +
    +

    + will generate: +

    +
      +
    1. +
      + One +
      +
    2. +
    3. +
      + Two +
      +
    4. +
    5. +
      + Three +
      +
    6. +
    +
    +
    +
    +

    + List Hierarchies +

    +
    +

    + List hierarchies are supported. Example: +

    +
    # One
    +# Two
    +# Three
    +    # Three.a
    +    # Three.b
    +    # Three.c
    +# Four
    +    # Four.a
    +        # Four.a.i
    +        # Four.a.ii
    +# Five
    +
    +

    + will generate: +

    +
      +
    1. +
      + One +
      +
    2. +
    3. +
      + Two +
      +
    4. +
    5. +
      + Three +
        +
      1. +
        + Three.a +
        +
      2. +
      3. +
        + Three.b +
        +
      4. +
      5. +
        + Three.c +
        +
      6. +
      +
      +
    6. +
    7. +
      + Fourth +
        +
      1. +
        + Four.a +
          +
        1. +
          + Four.a.i +
          +
        2. +
        3. +
          + Four.a.ii +
          +
        4. +
        +
        +
      2. +
      +
      +
    8. +
    9. +
      + Five +
      +
    10. +
    +
    +
    +
    +

    + Long List Lines +

    +
    +

    + Long lines will be wrapped appropriately. Example: +

    +
    # A short item.
    +# A very long item. A very long item. A very long item.
    +  A very long item. A very long item. A very long item.
    +  A very long item. A very long item. A very long item.
    +  A very long item. A very long item. A very long item.
    +  A very long item. A very long item. A very long item.
    +# A short item.
    +
    +
      +
    1. +
      + A short item. +
      +
    2. +
    3. +
      + A very long item. A very long item. A very long item. A very + long item. A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. A very + long item. A very long item. A very long item. A very long item. + A very long item. +
      +
    4. +
    5. +
      + A short item. +
      +
    6. +
    +
    +
    +
    +

    + Unordered lists +

    +
    +
    * First
    +* Second
    +* Third
    +
    +

    + will generate: +

    +
      +
    • +
      + First +
      +
    • +
    • +
      + Second +
      +
    • +
    • +
      + Third +
      +
    • +
    +
    +
    +
    +

    + Mixed lists +

    +
    +

    + Mixed lists (ordered and unordered) are supported. Example: +

    +
    # One
    +# Two
    +# Three
    +    * Three.a
    +    * Three.b
    +    * Three.c
    +# Four
    +
    +

    + will generate: +

    +
      +
    1. +
      + One +
      +
    2. +
    3. +
      + Two +
      +
    4. +
    5. +
      + Three +
        +
      • +
        + Three.a +
        +
      • +
      • +
        + Three.b +
        +
      • +
      • +
        + Three.c +
        +
      • +
      +
      +
    6. +
    7. +
      + Four +
      +
    8. +
    +

    + And... +

    +
    # 1
    +    * 1.a
    +        # 1.a.1
    +        # 1.a.2
    +    * 1.b
    +# 2
    +    * 2.a
    +    * 2.b
    +        # 2.b.1
    +        # 2.b.2
    +            * 2.b.2.a
    +            * 2.b.2.b
    +
    +

    + will generate: +

    +
      +
    1. +
      + 1 +
        +
      • +
        + 1.a +
          +
        1. +
          + 1.a.1 +
          +
        2. +
        3. +
          + 1.a.2 +
          +
        4. +
        +
        +
      • +
      • +
        + 1.b +
        +
      • +
      +
      +
    2. +
    3. +
      + 2 +
        +
      • +
        + 2.a +
        +
      • +
      • +
        + 2.b +
          +
        1. +
          + 2.b.1 +
          +
        2. +
        3. +
          + 2.b.2 +
            +
          • +
            + 2.b.2.a +
            +
          • +
          • +
            + 2.b.2.b +
            +
          • +
          +
          +
        4. +
        +
        +
      • +
      +
      +
    4. +
    +
    +
    +
    +
    +

    + Code +

    +
    +

    + Preformatted code starts with a space or a tab. The code will be syntax + highlighted according to the current Source + Mode: +

    +
    #include <iostream>
    +
    +int main()
    +{
    +    // Sample code
    +    std::cout << "Hello, World\n";
    +    return 0;
    +}
    +
    +
    import cgi
    +
    +def cookForHtml(text):
    +    '''"Cooks" the input text for HTML.'''
    +
    +    return cgi.escape(text)
    +
    +

    + Macros that are already defined are expanded in source code. Example: +

    +
    [def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
    +[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]
    +
    +    using __boost__::__array__;
    +
    +

    + Generates: +

    +
    using boost::array;
    +
    +
    +
    +
    +

    + Escaping Back To QuickBook +

    +
    +

    + Inside code, code blocks and inline code, QuickBook does not allow + any markup to avoid conflicts with the target syntax (e.g. c++). In + case you need to switch back to QuickBook markup inside code, you can + do so using a language specific escape-back + delimiter. In C++ and Python, the delimiter is the double tick (back-quote): + "``" and "``". Example: +

    +
    void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
    +{
    +}
    +
    +

    + Will generate: +

    +
    void foo()
    +{
    +}
    +
    +

    + When escaping from code to QuickBook, only phrase level markups are + allowed. Block level markups like lists, tables etc. are not allowed. +

    +
    +
    +
    +

    + Preformatted +

    +
    +

    + Sometimes, you don't want some preformatted text to be parsed as C++. + In such cases, use the [pre ... ] markup block. +

    +
    [pre
    +
    +    Some *preformatted* text                    Some *preformatted* text
    +
    +        Some *preformatted* text            Some *preformatted* text
    +
    +            Some *preformatted* text    Some *preformatted* text
    +
    +]
    +
    +

    + Spaces, tabs and newlines are rendered as-is. Unlike all quickbook + block level markup, pre (and Code) are the only ones that allow multiple + newlines. The markup above will generate: +

    +
    Some preformatted text                    Some preformatted text
    +
    +    Some preformatted text            Some preformatted text
    +
    +        Some preformatted text    Some preformatted text
    +
    +
    +

    + Notice that unlike Code, phrase markup such as font style is still + permitted inside pre blocks. +

    +
    +
    +
    +

    + Blockquote +

    +
    +
    [:sometext...]
    +
    +
    +

    + Indents the paragraph. This applies to one paragraph only. +

    +
    +
    +
    +
    +

    + Admonitions +

    +
    +
    [note This is a note]
    +[tip This is a tip]
    +[important This is important]
    +[caution This is a caution]
    +[warning This is a warning]
    +
    +

    + generates DocBook admonitions: +

    +
    +

    + This is a note +

    +
    +
    +

    + This is a tip +

    +
    +
    +

    + This is important +

    +
    +
    +

    + This is a caution +

    +
    +
    +

    + This is a warning +

    +
    +

    + These are the only admonitions supported by DocBook. + So, for example [information This is some information] is + unlikely to produce the desired effect. +

    +
    +
    +
    +

    + Headings +

    +
    +
    [h1 Heading 1]
    +[h2 Heading 2]
    +[h3 Heading 3]
    +[h4 Heading 4]
    +[h5 Heading 5]
    +[h6 Heading 6]
    +
    +

    + Heading 1 +

    +

    + Heading 2 +

    +

    + Heading 3 +

    +

    + Heading 4 +

    +
    + Heading 5 +
    +
    + Heading 6 +
    +

    + Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized + names with name="section_id.normalized_header_text" + (i.e. valid characters are a-z, A-Z, 0-9 + and _. All non-valid characters are converted to underscore + and all upper-case are converted to lower-case. For example: Heading + 1 in section Section 2 will be normalized to section_2.heading_1). + You can use: +

    +
    [link section_id.normalized_header_text The link text]
    +
    +

    + to link to them. See Anchor + links and Section + for more info. +

    +
    +
    +
    +

    + Generic Heading +

    +
    +

    + In cases when you don't want to care about the heading level (1 to + 6), you can use the Generic Heading: +

    +
    [heading Heading]
    +
    +

    + The Generic Heading assumes + the level, plus one, of the innermost section where it is placed. For + example, if it is placed in the outermost section, then, it assumes + h2. +

    +

    + Headings are often used as an alternative to sections. It is used particularly + if you do not want to start a new section. In many cases, however, + headings in a particular section is just flat. Example: +

    +
    [section A]
    +[h2 X]
    +[h2 Y]
    +[h2 Z]
    +[endsect]
    +
    +

    + Here we use h2 assuming that section A is the outermost level. If it + is placed in an inner level, you'll have to use h3, h4, etc. depending + on where the section is. In general, it is the section level plus one. + It is rather tedious, however, to scan the section level everytime. + If you rewrite the example above as shown below, this will be automatic: +

    +
    [section A]
    +[heading X]
    +[heading Y]
    +[heading Z]
    +[endsect]
    +
    +

    + They work well regardless where you place them. You can rearrange sections + at will without any extra work to ensure correct heading levels. In + fact, with section and heading, you have all you need. h1..h6 + becomes redundant. h1..h6 might be deprecated in the future. +

    +
    +
    +
    +

    + Macros +

    +
    +
    [def macro_identifier some text]
    +
    +

    + When a macro is defined, the identifier replaces the text anywhere + in the file, in paragraphs, in markups, etc. macro_identifier is a + string of non- white space characters except ']'. A macro may not follow + an alphabetic character or the underscore. The replacement text can + be any phrase (even marked up). Example: +

    +
    [def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
    +sf_logo
    +
    +

    + Now everywhere the sf_logo is placed, the picture will be inlined. +

    +

    + [] +

    +
    +

    + It's a good idea to use macro identifiers that are distinguishable. + For instance, in this document, macro identifiers have two leading + and trailing underscores (e.g. __spirit__). The reason is + to avoid unwanted macro replacement. +

    +
    +

    + Links (URLS) and images are good candidates for macros. 1) + They tend to change a lot. It is a good idea to place all links and + images in one place near the top to make it easy to make changes. + 2) The syntax is not pretty. + It's easier to read and write, e.g. __spirit__ than [@http://spirit.sourceforge.net + Spirit]. +

    +

    + Some more examples: +

    +
    [def :-)            [$theme/smiley.png]]
    +[def __spirit__     [@http://spirit.sourceforge.net Spirit]]
    +
    +

    + (See Images and Links) +

    +

    + Invoking these macros: +

    +
    Hi __spirit__  :-)
    +
    +

    + will generate this: +

    +

    + Hi Spirit [] +

    +
    +
    +
    +

    + Predefined Macros +

    +
    +

    + Quickbook has some predefined macros that you can already use. +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Predefined Macros
    +

    + Macro +

    +
    +

    + Meaning +

    +
    +

    + Example +

    +
    +

    + __DATE__ +

    +
    +

    + Today's date +

    +
    +

    + 2000-Dec-20 +

    +
    +

    + __TIME__ +

    +
    +

    + The current time +

    +
    +

    + 12:00:00 PM +

    +
    +

    + __FILENAME__ +

    +
    +

    + Quickbook source filename +

    +
    +

    + quickbook_manual-1_4.quickbook +

    +
    +
    +
    +
    +
    +

    + Templates +

    +
    +

    + Templates provide a more versatile text substitution mechanism. Templates + come in handy when you need to create parameterizable, multi-line, + boilerplate text that you specify once and expand many times. Templates + accept one or more arguments. These arguments act like place-holders + for text replacement. Unlike simple macros, which are limited to phrase + level markup, templates can contain block level markup (e.g. paragraphs, + code blocks and tables). +

    +

    + Example template: +

    +
    [template person[name age what]
    +
    +Hi, my name is [name]. I am [age] years old. I am a [what].
    +
    +]
    +
    +
    + Template Identifier +
    +

    + Template identifiers can either consist of: +

    +
      +
    • +
      + An initial alphabetic character or the underscore, followed by + zero or more alphanumeric characters or the underscore. This is + similar to your typical C/C++ identifier. +
      +
    • +
    • +
      + A single character punctuation (a non-alphanumeric printable character) +
      +
    • +
    +
    + Formal Template Arguments +
    +

    + Template formal arguments are identifiers consisting of an initial + alphabetic character or the underscore, followed by zero or more alphanumeric + characters or the underscore. This is similar to your typical C/C++ + identifier. +

    +

    + A template formal argument temporarily hides a template of the same + name at the point where the template + is expanded. Note that the body of the person template + above refers to name age and what as [name] + [age] and [what]. name age and + what are actually templates that exist in the duration of + the template call. +

    +
    + Template Body +
    +

    + The template body can be just about any QuickBook block or phrase. + There are actually two forms. Templates may be phrase or block level. + Phrase templates are of the form: +

    +
    [template sample[arg1 arg2...argN] replacement text... ]
    +
    +

    + Block templates are of the form: +

    +
    [template sample[arg1 arg2...argN]
    +replacement text...
    +]
    +
    +

    + The basic rule is as follows: if a newline immediately follows the + argument list, then it is a block template, otherwise, it is a phrase + template. Phrase templates are typically expanded as part of phrases. + Like macros, block level elements are not allowed in phrase templates. +

    +
    + Template Expansion +
    +

    + You expand a template this way: +

    +
    [template_identifier arg1..arg2..arg3]
    +
    +

    + At template expansion, you supply the actual arguments. The template + will be expanded with your supplied arguments. Example: +

    +
    [person James Bond..39..Spy]
    +[person Santa Clause..87..Big Red Fatso]
    +
    +

    + Which will expand to: +

    +

    + Hi, my name is James Bond. I am 39 years old. I am a Spy. +

    +

    + Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso. +

    +
    +

    + A word of caution: Templates are recursive. A template can call another + template or even itself, directly or indirectly. There are no control + structures in QuickBook (yet) so this will always mean infinite recursion. + QuickBook can detect this situation and report an error if recursion + exceeds a certain limit. +

    +
    +

    + Each actual argument can be a word, a text fragment or just about any + QuickBook phrase. Arguments + are separated by the double dot ".." and terminated + by the close parenthesis. +

    +
    + Nullary Templates +
    +

    + Nullary templates look and act like simple macros. Example: +

    +
    [template alpha[]'''&#945;''']
    +[template beta[]'''&#946;''']
    +
    +

    + Expanding: +

    +
    Some squigles...[*[alpha][beta]]
    +

    + We have: +

    +

    + Some squiggles...αβ +

    +

    + The difference with macros are +

    +
      +
    • +
      + The explicit template + expansion syntax. This is an advantage because, now, we don't + have to use obscure naming conventions like double underscores + (e.g. __alpha__) to avoid unwanted macro replacement. +
      +
    • +
    • +
      + The template is expanded at the point where it is invoked. A macro + is expanded immediately at its point of declaration. This is subtle + and can cause a slight difference in behavior especially if you + refer to other macros and templates in the body. +
      +
    • +
    +

    + The empty brackets after the template identifier (alpha[]) + indicates no arguments. If the template body does not look like a template + argument list, we can elide the empty brackets. Example: +

    +
    [template aristotle_quote Aristotle: [*['Education is the best provision
    +for the journey to old age.]]]
    +
    +

    + Expanding: +

    +
    Here's a quote from [aristotle_quote].
    +
    +

    + We have: +

    +

    + Here's a quote from Aristotle: Education + is the best provision for the journey to old age.. +

    +

    + The disadvantage is that you can't avoid the space between the template + identifier, aristotle_quote, + and the template body "Aristotle...". This space will be + part of the template body. If that space is unwanted, use empty brackets + or use the space escape: "\ + ". Example: +

    +
    [template tag\ _tag]
    +
    +

    + Then expanding: +

    +
    `struct` x[tag];
    +
    +

    + We have: +

    +

    + struct x_tag; +

    +

    + You have a couple of ways to do it. I personally prefer the explicit + empty brackets, though. +

    +
    + Simple Arguments +
    +

    + As mentioned, arguments are separated by the double dot "..". + If there are less arguments passed than expected, QuickBook attempts + to break the last argument into two or more arguments following this + logic: +

    +
      +
    • +
      + Break the last argument into two, at the first space found ('', + '\n', \t' or '\r'). +
      +
    • +
    • +
      + Repeat until there are enough arguments or if there are no more + spaces found (in which case, an error is reported). +
      +
    • +
    +

    + For example: +

    +
    [template simple[a b c d] [a][b][c][d]]
    +[simple w x y z]
    +
    +

    + will produce: +

    +

    + wxyz +

    +

    + "w x y z" is initially treated as a single argument because + we didn't supply any ".." separators. However, since + simple expects 4 arguments, "w x y z" is broken + down iteratively (applying the logic above) until we have "w", + "x", "y" and "z". +

    +

    + QuickBook only tries to get the arguments it needs. For example: +

    +
    [simple w x y z trail]
    +
    +

    + will produce: +

    +

    + wxyz trail +

    +

    + The arguments being: "w", "x", "y" and + "z trail". +

    +

    + It should be obvious now that for simple arguments with no spaces, + we can get by without separating the arguments with ".." + separators. It is possible to combine ".." separators + with the argument passing simplification presented above. Example: +

    +
    [simple what do you think ..m a n?]
    +
    +

    + will produce: +

    +

    + what do you think man? +

    +
    + Punctuation Templates +
    +

    + With templates, one of our objectives is to allow us to rewrite QuickBook + in QuickBook (as a qbk library). For that to happen, we need to accommodate + single character punctuation templates which are fairly common in QuickBook. + You might have noticed that single character punctuations are allowed + as template + identifiers. Example: +

    +
    [template ![bar] <hey>[bar]</hey>]
    +
    +

    + Now, expanding this: +

    +
    [!baz]
    +
    +

    + We will have: +

    +
    <hey>baz</hey>
    +
    +
    +
    +
    +

    + Blurbs +

    +
    +
    [blurb :-) [*An eye catching advertisement or note...]
    +
    +    __spirit__ is an object-oriented recursive-descent parser generator framework
    +    implemented using template meta-programming techniques. Expression templates
    +    allow us to approximate the syntax of Extended Backus-Normal Form (EBNF)
    +    completely in C++.
    +]
    +
    +

    + will generate this: +

    +
    +

    + [] + An eye catching advertisement or note... +

    +

    + Spirit is an object-oriented + recursive-descent parser generator framework implemented using template + meta-programming techniques. Expression templates allow us to approximate + the syntax of Extended Backus-Normal Form (EBNF) completely in C++. +

    +
    +
    +

    + Prefer admonitions + wherever appropriate. +

    +
    +
    +
    +
    +

    + Tables +

    +
    +
    [table A Simple Table
    +    [[Heading 1] [Heading 2] [Heading 3]]
    +    [[R0-C0]     [R0-C1]     [R0-C2]]
    +    [[R1-C0]     [R1-C1]     [R1-C2]]
    +    [[R2-C0]     [R2-C1]     [R2-C2]]
    +]
    +
    +

    + will generate: +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    A Simple Table
    +

    + Heading 1 +

    +
    +

    + Heading 2 +

    +
    +

    + Heading 3 +

    +
    +

    + R0-C0 +

    +
    +

    + R0-C1 +

    +
    +

    + R0-C2 +

    +
    +

    + R2-C0 +

    +
    +

    + R2-C1 +

    +
    +

    + R2-C2 +

    +
    +

    + R3-C0 +

    +
    +

    + R3-C1 +

    +
    +

    + R3-C2 +

    +
    +
    +

    + The table title is optional. The first row of the table is automatically + treated as the table header; that is, it is wrapped in <thead>...</thead> + XML tags. Note that unlike the original QuickDoc, the columns are nested + in [ cells... ]. The syntax is free-format and allows big cells to + be formatted nicely. Example: +

    +
    [table Table with fat cells
    +    [[Heading 1] [Heading 2]]
    +    [
    +        [Row 0, Col 0: a small cell]
    +        [
    +            Row 0, Col 1: a big fat cell with paragraphs
    +
    +            Boost provides free peer-reviewed portable C++ source libraries.
    +
    +            We emphasize libraries that work well with the C++ Standard Library.
    +            Boost libraries are intended to be widely useful, and usable across
    +            a broad spectrum of applications. The Boost license encourages both
    +            commercial and non-commercial use.
    +        ]
    +    ]
    +    [
    +        [Row 1, Col 0: a small cell]
    +        [Row 1, Col 1: a small cell]
    +    ]
    +]
    +
    +

    + and thus: +

    +
    + + + + + + + + + + + + + + + + + + +
    Table with fat cells
    +

    + Heading 1 +

    +
    +

    + Heading 2 +

    +
    +

    + Row 0, Col 0: a small cell +

    +
    +

    + Row 0, Col 1: a big fat cell with paragraphs +

    +

    + Boost provides free peer-reviewed portable C++ source libraries. +

    +

    + We emphasize libraries that work well with the C++ Standard + Library. Boost libraries are intended to be widely useful, + and usable across a broad spectrum of applications. The Boost + license encourages both commercial and non-commercial use. +

    +
    +

    + Row 1, Col 0: a small cell +

    +
    +

    + Row 1, Col 1: a small cell +

    +
    +
    +

    + Here's how to have preformatted blocks of code in a table cell: +

    +
    [table Table with code
    +    [[Comment] [Code]]
    +    [
    +        [My first program]
    +        [``
    +            #include <iostream>
    +
    +            int main()
    +            {
    +                std::cout << "Hello, World!" << std::endl;
    +                return 0;
    +            }
    +        ``]
    +    ]
    +]
    +
    +
    + + + + + + + + + + + + + + +
    Table with code
    +

    + Comment +

    +
    +

    + Code +

    +
    +

    + My first program +

    +
    +

    +

    #include <iostream>
    +
    +int main()
    +{
    +    std::cout << "Hello, World!" << std::endl;
    +    return 0;
    +}
    +
    +

    +
    +
    +
    +
    +
    +

    + Variable Lists +

    +
    +
    [variablelist A Variable List
    +    [[term 1] [The definition of term 1]]
    +    [[term 2] [The definition of term 2]]
    +    [[term 3] [The definition of term 3]]
    +]
    +
    +

    + will generate: +

    +
    +
    + term 1 +
    +
    +

    + The definition of term 1 +

    +
    +
    + term 2 +
    +
    +

    + The definition of term 2 +

    +
    +
    + term 3 +
    +
    +

    + The definition of term 3 +

    +
    +
    +

    + The rules for variable lists are the same as for tables, except that + only 2 "columns" are allowed. The first column contains the + terms, and the second column contains the definitions. Those familiar + with HTML will recognize this as a "definition list". +

    +
    +
    +
    +

    + Include +

    +
    +

    + You can include one QuickBook file from another. The syntax is simply: +

    +
    [include someother.qbk]
    +
    +

    + The included file will be processed as if it had been cut and pasted + into the current document, with the following exceptions: +

    +
      +
    • +
      + The __FILENAME__ predefined macro will reflect the name of the + file currently being processed. +
      +
    • +
    • +
      + Any macros defined in the included file are scoped to that file. +
      +
    • +
    +

    + The [include] directive lets you specify a document id to + use for the included file. When this id is not explicitly specified, + the id defaults to the filename ("someother", in the example + above). You can specify the id like this: +

    +
    [include:someid someother.qbk]
    +
    +

    + All auto-generated anchors will use the document id as a unique prefix. + So for instance, if there is a top section in someother.qbk named "Intro", + the named anchor for that section will be "someid.intro", + and you can link to it with [link someid.intro The Intro]. +

    +
    +
    +
    +

    + Import +

    +
    +

    + When documenting code, you'd surely need to present code from actual + source files. While it is possible to copy some code and paste them + in your QuickBook file, doing so is error prone and the extracted code + in the documentation tends to get out of sync with the actual code + as the code evolves. The problem, as always, is that once documentation + is written, the tendency is for the docs to languish in the archives + without maintenance. +

    +

    + QuickBook's import facility provides a nice solution. +

    +
    + Example +
    +

    + You can effortlessly import code snippets from source code into your + QuickBook. The following illustrates how this is done: +

    +
    [import ../test/stub.cpp]
    +[foo]
    +[bar]
    +
    +

    + The first line: +

    +
    [import ../test/stub.cpp]
    +
    +

    + collects specially marked-up code snippets from stub.cpp + and places them in your QuickBook file as virtual templates. Each of + the specially marked-up code snippets has a name (e.g. foo and bar + in the example above). This shall be the template identifier for that + particular code snippet. The second and third line above does the actual + template expansion: +

    +
    [foo]
    +[bar]
    +
    +

    + And the result is: +

    +

    + This is the foo + function. +

    +

    + This description can have paragraphs... +

    +
      +
    • +
      + lists +
      +
    • +
    • +
      + etc. +
      +
    • +
    +

    + And any quickbook block markup. +

    +

    +

    std::string foo()
    +{
    +    // return 'em, foo man!
    +    return "foo";
    +}
    +
    +

    +

    + This is the bar + function +

    +

    +

    std::string bar()
    +{
    +    // return 'em, bar man!
    +    return "bar";
    +}
    +
    +

    +

    + Some trailing text here +

    +
    + Code Snippet Markup +
    +

    + Note how the code snippets in stub.cpp + get marked up. We use distinguishable comments following the form: +

    +
    //[id
    +some code here
    +//]
    +
    +

    + The first comment line above initiates a named code-snippet. This prefix + will not be visible in quickbook. The entire code-snippet in between + //[id and //] + will be inserted as a template in quickbook with name id. The comment //] ends a code-snippet This too will + not be visible in quickbook. +

    +
    + Special Comments +
    +

    + Special comments of the form: +

    +
    //` some [*quickbook] markup here
    +
    +

    + and: +

    +
    /*` some [*quickbook] markup here */
    +
    +

    + will be parsed by QuickBook. This can contain quickbook blocks + (e.g. sections, paragraphs, tables, etc). In the first case, the initial + slash-slash, tick and white-space shall be ignored. In the second, + the initial slash-star-tick and the final star-slash shall be ignored. +

    +
    + Callouts +
    +

    + Special comments of the form: +

    +
    /*< some [*quickbook] markup here >*/
    +
    +

    + will be regarded as callouts. These will be collected, numbered and + rendered as a "callout bug" (a small icon with a number). + After the whole snippet is parsed, the callout list is generated. See + Callouts + for details. Example: +

    +

    +

    std::string foo_bar() (1)
    +{
    +    return "foo-bar"; (2)
    +}
    +
    +

    +
    +
    + (1) +

    + The Mythical FooBar. See + Foobar for details +

    +
    +
    + (2) +

    + return 'em, foo-bar man! +

    +
    +
    +

    + Checkout stub.cpp to see the actual + code. +

    +
    +
    +
    +
    +
    +

    + Installation and configuration +

    +
    +

    + This section provides some guidelines on how to install and configure BoostBook + and Quickbook under several operating systems. +

    +

    + Before continuing, it is very important that you keep this in mind: if + you try to build some documents and the process breaks due to misconfiguration, + be absolutely sure to delete any bin + and bin.v2 directories generated by the build + before trying again. Otherwise your configuration fixes will not take any + effect. +

    +
    +
    +

    + Windows 2000, XP, 2003, Vista +

    +
    +
    +

    + Section contributed by Julio M. Merino Vidal +

    +
    +

    + The following instructions apply to any Windows system based on Windows + 2000, including Windows XP, Windows 2003 Server and Windows Vista. The + paths shown below are taken from a Windows Vista machine; you will need + to adjust them to match your system in case you are running an older + version. +

    +
      +
    1. +
      + First of all you need to have a copy of xsltproc + for Windows. There are many ways to get this tool, but to keep things + simple, use the binary + packages made by Igor Zlatkovic. At the very least, you need + to download the following packages: iconv, + zlib, libxml2 + and libxslt. +
      +
    2. +
    3. +
      + Unpack all these packages in the same directory so that you get unique + bin, include + and lib directories + within the hierarchy. These instructions use C:\Users\example\Documents\boost\xml + as the root for all files. +
      +
    4. +
    5. +
      + From the command line, go to the bin + directory and launch xsltproc.exe + to ensure it works. You should get usage information on screen. +
      +
    6. +
    7. +
      + Download Docbook + XML 4.2 and unpack it in the same directory used above. That + is: C:\Users\example\Documents\boost\xml\docbook-xml. +
      +
    8. +
    9. +
      + Download the latest Docbook + XSL version and unpack it, again in the same directory used before. + To make things easier, rename the directory created during the extraction + to docbook-xsl (bypassing the version name): + C:\Users\example\Documents\boost\xml\docbook-xsl. +
      +
    10. +
    11. +
      + Add the following to your user-config.jam + file, which should live in your home directory (%HOMEDRIVE%%HOMEPATH%). + You must already have it somewhere or otherwise you could not be + building Boost (i.e. missing tools configuration). +
      +
    12. +
    +
    using xsltproc
    +    : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe"
    +    ;
    +
    +using boostbook
    +    : "C:/Users/example/Documents/boost/xml/docbook-xsl"
    +    : "C:/Users/example/Documents/boost/xml/docbook-xml"
    +    ;
    +
    +

    + The above steps are enough to get a functional BoostBook setup. Quickbook + will be automatically built when needed. If you want to avoid these rebuilds: +

    +
      +
    1. +
      + Go to Quickbook's source directory (BOOST_ROOT\tools\quickbook). +
      +
    2. +
    3. +
      + Build the utility by issuing bjam + --v2. +
      +
    4. +
    5. +
      + Copy the resulting quickbook.exe + binary (located under the BOOST_ROOT\bin.v2 + hierarchy) to a safe place. Following our previous example, you can + install it into: C:\Users\example\Documents\boost\xml\bin. +
      +
    6. +
    7. +
      + Add the following to your user-config.jam + file: +
      +
    8. +
    +
    using quickbook
    +    : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe"
    +    ;
    +
    +
    +
    +
    +

    + Debian, Ubuntu +

    +
    +

    + The following instructions apply to Debian and its derivatives. They + are based on a Ubuntu Edgy install but should work on other Debian based + systems. +

    +

    + First install the bjam, + xsltproc, docbook-xsl and + docbook-xml packages. For example, using apt-get: +

    +
    sudo apt-get install xsltprc docbook-xsl docbook-xml
    +
    +

    + If you're planning on building boost's documentation, you'll also need + to install the doxygen package + as well. +

    +

    + Next, we need to configure Boost Build to compile BoostBook files. Add + the following to your user-config.jam file, which should be in your home + directory. If you don't have one, create a file containing this text. + For more information on setting up user-config.jam, see the Boost + Build documentation. +

    +
    using xsltproc ;
    +
    +using boostbook
    +    : /usr/share/xml/docbook/stylesheet/nwalsh
    +    : /usr/share/xml/docbook/schema/dtd/4.2
    +    ;
    +
    +# Remove this line if you're not using doxygen
    +using doxygen ;
    +
    +

    + The above steps are enough to get a functional BoostBook setup. Quickbook + will be automatically built when needed. If you want to avoid these rebuilds: +

    +
      +
    1. +
      + Go to Quickbook's source directory (BOOST_ROOT/tools/quickbook). +
      +
    2. +
    3. +
      + Build the utility by issuing bjam + --v2. +
      +
    4. +
    5. +
      + Copy the resulting quickbook + binary (located under the BOOST_ROOT/bin.v2 + hierarchy) to a safe place. The traditional location is /usr/local/bin. +
      +
    6. +
    7. +
      + Add the following to your user-config.jam + file, using the full path of the quickbook executable: +
      +
    8. +
    +
    using quickbook
    +    : /usr/local/bin/quickbook
    +    ;
    +
    +
    +
    +
    +
    +

    + Editor Support +

    +
    +

    + Editing quickbook files is usually done with text editors both simple and + powerful. The following sections list the settings for some editors which + can help make editing quickbook files a bit easier. +

    +
    +

    + [] + You may submit your settings, tips, and suggestions to the authors, or + through the docs + Boost Docs mailing list. +

    +
    +
    +
    +

    + Scintilla Text Editor +

    +
    +
    +

    + Section contributed by Dean Michael Berris +

    +
    +

    + The Scintilla Text Editor (SciTE) is a free source code editor for Win32 + and X. It uses the SCIntilla source code editing component. +

    +
    +

    + [] + SciTE can be downloaded from http://www.scintilla.org/SciTE.html +

    +
    +

    + You can use the following settings to highlight quickbook tags when editing + quickbook files. +

    +
    qbk=*.qbk
    +lexer.*.qbk=props
    +use.tabs.$(qbk)=0
    +tab.size.$(qbk)=4
    +indent.size.$(qbk)=4
    +style.props.32=$(font.base)
    +comment.stream.start.props=[/
    +comment.stream.end.props=]
    +comment.box.start.props=[/
    +comment.box.middle.props=
    +comment.box.end.props=]
    +
    +
    +

    + [] + Thanks to Rene Rivera for the above SciTE settings. +

    +
    +
    +
    +
    +
    +

    + Frequently Asked Questions +

    +
    +

    + Can I use QuickBook for non-Boost documentation? +

    +

    + QuickBook can be used for non-Boost documentation with a little extra work. +

    +
    +

    + Faq contributed by Michael Marcin +

    +
    +

    + When building HTML documentation with BoostBook a Boost C++ Libraries header + is added to the files. When using QuickBook to document projects outside + of Boost this is not desirable. This behavior can be overridden at the + BoostBook level by specifying some XSLT options. When using Boost Build + version 2 (BBv2) this can be achieved by adding parameters to the BoostBook + target declaration. +

    +

    + For example: +

    +
    using quickbook ;
    +
    +xml my_doc : my_doc.qbk ;
    +
    +boostbook standalone
    +    :
    +        my_doc
    +    :
    +        <xsl:param>boost.image.src=images/my_project_logo.png
    +        <xsl:param>boost.image.alt="\"My Project\""
    +        <xsl:param>boost.image.w=100
    +        <xsl:param>boost.image.h=50
    +        <xsl:param>nav.layout=none
    +    ;
    +
    +
    +
    +
    +

    + Quick Reference +

    +
    +

    + [cpp] +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Syntax Compendium
    +

    + To do this... +

    +
    +

    + Use this... +

    +
    +

    + See this... +

    +
    +

    + comment +

    +
    +

    + [/ some comment] +

    +
    +

    + Comments +

    +
    +

    + italics +

    +
    +

    + ['italics] or /italics/ +

    +
    +

    + Font Styles + and Simple + formatting +

    +
    +

    + bold +

    +
    +

    + [*bold] or *bold* +

    +
    +

    + Font Styles + and Simple + formatting +

    +
    +

    + underline +

    +
    +

    + [_underline] or _underline_ +

    +
    +

    + Font Styles + and Simple + formatting +

    +
    +

    + teletype +

    +
    +

    + [^teletype] or =teletype= +

    +
    +

    + Font Styles + and Simple + formatting +

    +
    +

    + strikethrough +

    +
    +

    + [-strikethrough] +

    +
    +

    + Font Styles + and Simple + formatting +

    +
    +

    + replaceable +

    +
    +

    + [~replaceable] +

    +
    +

    + Replaceble +

    +
    +

    + source mode +

    +
    +

    + [c++] or [python] +

    +
    +

    + Source Mode +

    +
    +

    + inline code +

    +
    +

    + `int main();` +

    +
    +

    + Inline code +

    +
    +

    + code block +

    +
    +

    + ``int main();`` +

    +
    +

    + Code +

    +
    +

    + code escape +

    +
    +

    + ``from c++ to QuickBook`` +

    +
    +

    + Escaping Back To + QuickBook +

    +
    +

    + line break +

    +
    +

    + [br] or \n +

    +
    +

    + line-break + DEPRECATED +

    +
    +

    + anchor +

    +
    +

    + [#anchor] +

    +
    +

    + Anchors +

    +
    +

    + link +

    +
    +

    + [@http://www.boost.org Boost] +

    +
    +

    + Links +

    +
    +

    + anchor link +

    +
    +

    + [link section.anchor Link text] +

    +
    +

    + Anchor links +

    +
    +

    + refentry link +

    +
    +

    + [link xml.refentry Link text] +

    +
    +

    + refentry links +

    +
    +

    + function link +

    +
    +

    + [funcref fully::qualified::function_name Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + class link +

    +
    +

    + [classref fully::qualified::class_name Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + member link +

    +
    +

    + [memberref fully::qualified::member_name Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + enum link +

    +
    +

    + [enumref fully::qualified::enum_name Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + macro link +

    +
    +

    + [macroref MACRO_NAME Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + concept link +

    +
    +

    + [conceptref ConceptName Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + header link +

    +
    +

    + [headerref path/to/header.hpp Link text] +

    +
    +

    + function, class, + member, enum, macro, concept or header links +

    +
    +

    + escape +

    +
    +

    + '''escaped text (no processing/formatting)''' +

    +
    +

    + Escape +

    +
    +

    + single char escape +

    +
    +

    + \c +

    +
    +

    + Single + char escape +

    +
    +

    + images +

    +
    +

    + [$image.jpg] +

    +
    +

    + Images +

    +
    +

    + begin section +

    +
    +

    + [section The Section Title] +

    +
    +

    + Section +

    +
    +

    + end section +

    +
    +

    + [endsect] +

    +
    +

    + Section +

    +
    +

    + paragraph +

    +
    +

    + No markup. Paragraphs start left-flushed and are terminated by + two or more newlines. +

    +
    +

    + Paragraphs +

    +
    +

    + ordered list +

    +
    +
    # one
    +# two
    +# three
    +
    +
    +

    + Ordered + lists +

    +
    +

    + unordered list +

    +
    +
    * one
    +* two
    +* three
    +
    +
    +

    + Unordered + lists +

    +
    +

    + code +

    +
    +

    + No markup. Preformatted code starts with a space or a tab. +

    +
    +

    + Code +

    +
    +

    + preformatted +

    +
    +

    + [pre preformatted] +

    +
    +

    + Preformatted +

    +
    +

    + block quote +

    +
    +

    + [:sometext...] +

    +
    +

    + Blockquote +

    +
    +

    + heading 1 +

    +
    +

    + [h1 Heading 1] +

    +
    +

    + Heading +

    +
    +

    + heading 2 +

    +
    +

    + [h2 Heading 2] +

    +
    +

    + Heading +

    +
    +

    + heading 3 +

    +
    +

    + [h3 Heading 3] +

    +
    +

    + Heading +

    +
    +

    + heading 4 +

    +
    +

    + [h4 Heading 4] +

    +
    +

    + Heading +

    +
    +

    + heading 5 +

    +
    +

    + [h5 Heading 5] +

    +
    +

    + Heading +

    +
    +

    + heading 6 +

    +
    +

    + [h6 Heading 6] +

    +
    +

    + Heading +

    +
    +

    + macro +

    +
    +

    + [def macro_identifier some text] +

    +
    +

    + Macros +

    +
    +

    + template +

    +
    +

    + [template[a b] [a] body [b]] +

    +
    +

    + Templates +

    +
    +

    + blurb +

    +
    +

    + [blurb advertisement or note...] +

    +
    +

    + Blurbs +

    +
    +

    + admonition +

    +
    +

    + [warning Warning text...] +

    +
    +

    + Admonitions +

    +
    +

    + table +

    +
    +
    [table Title
    +[[a][b][c]]
    +[[a][b][c]]
    +]
    +
    +
    +

    + Tables +

    +
    +

    + variablelist +

    +
    +
    [variablelist Title
    +[[a][b]]
    +[[a][b]]
    +]
    +
    +
    +

    + Variable Lists +

    +
    +

    + include +

    +
    +

    + [include someother.qbk] +

    +
    +

    + Include +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    + [1] + Thanks to David Barrett, author of Qwiki, + for sharing these samples and teaching me these obscure formatting rules. + I wasn't sure at all if Spirit, + being more or less a formal EBNF parser, can handle the context sensitivity + and ambiguity. +

    +
    +
    +

    + [2] A sample + footnote +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook b/src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook new file mode 100644 index 000000000..00fc9caa1 --- /dev/null +++ b/src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook @@ -0,0 +1,1981 @@ +[article Quickbook + [quickbook 1.4] + [version 1.4] + [authors [de Guzman, Joel], [Niebler, Eric]] + [copyright 2002 2004 2006 Joel de Guzman, Eric Niebler] + [purpose /WikiWiki/ style documentation tool] + [license + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + [@http://www.boost.org/LICENSE_1_0.txt]) + ] +] + +[/ QuickBook Document version 1.3 ] +[/ Sept 24, 2002 ] +[/ Sept 2, 2004 ] +[/ Feb 14, 2005 ] +[/ Sept 13, 2005 ] + +[/ Some links] + +[def __note__ [$images/note.png]] +[def __alert__ [$images/alert.png]] +[def __tip__ [$images/tip.png]] +[def :-) [$images/smiley.png]] +[def __spirit__ [@http://spirit.sourceforge.net Spirit]] +[def __boostbook__ [@http://www.boost.org/doc/html/boostbook.html BoostBook]] +[def __docbook__ [@http://www.docbook.org/ DocBook]] + +[def __comments__ [link quickbook.syntax.comments Comments]] + +[def __font_styles__ [link quickbook.syntax.phrase.font_styles Font Styles]] +[def __quotations__ [link quickbook.syntax.phrase.quotations Quotations]] +[def __replaceable__ [link quickbook.syntax.phrase.replaceable Replaceble]] +[def __simple_formatting__ [link quickbook.syntax.phrase.simple_formatting Simple formatting]] +[def __inline_code__ [link quickbook.syntax.phrase.inline_code Inline code]] +[def __code_blocks__ [link quickbook.syntax.phrase.code_blocks Code blocks]] +[def __source_mode__ [link quickbook.syntax.phrase.source_mode Source Mode]] +[def __line_break__ [link quickbook.syntax.phrase.line_break line-break]] +[def __anchors__ [link quickbook.syntax.phrase.anchors Anchors]] +[def __links__ [link quickbook.syntax.phrase.links Links]] +[def __anchor_links__ [link quickbook.syntax.phrase.anchor_links Anchor links]] +[def __refentry_links__ [link quickbook.syntax.phrase.refentry_links refentry links]] +[def __code_links__ [link quickbook.syntax.phrase.code_links function, class, member, enum, macro, concept or header links]] +[def __escape__ [link quickbook.syntax.phrase.escape Escape]] +[def __single_char_escape__ [link quickbook.syntax.phrase.single_char_escape Single char escape]] +[def __images__ [link quickbook.syntax.phrase.images Images]] + +[def __document__ [link quickbook.syntax.block.document Document]] +[def __section__ [link quickbook.syntax.block.section Section]] +[def __xinclude__ [link quickbook.syntax.block.xinclude xinclude]] +[def __paragraphs__ [link quickbook.syntax.block.paragraphs Paragraphs]] +[def __ordered_lists__ [link quickbook.syntax.block.lists.ordered_lists Ordered lists]] +[def __list_hierarchies__ [link quickbook.syntax.block.lists.list_hierarchies List Hierarchies]] +[def __long_list_lines__ [link quickbook.syntax.block.lists.long_list_lines Long List Lines]] +[def __unordered_lists__ [link quickbook.syntax.block.lists.unordered_lists Unordered lists]] +[def __mixed_lists__ [link quickbook.syntax.block.lists.mixed_lists Mixed lists]] +[def __code__ [link quickbook.syntax.block.code Code]] +[def __escape_back__ [link quickbook.syntax.block.escape_back Escaping Back To QuickBook]] +[def __preformatted__ [link quickbook.syntax.block.preformatted Preformatted]] +[def __blockquote__ [link quickbook.syntax.block.blockquote Blockquote]] +[def __heading__ [link quickbook.syntax.block.headings Heading]] +[def __macros__ [link quickbook.syntax.block.macros Macros]] +[def __templates__ [link quickbook.syntax.block.templates Templates]] +[def __predefined_macros__ [link quickbook.syntax.block.predefined_macros Predefined Macros]] +[def __blurbs__ [link quickbook.syntax.block.blurbs Blurbs]] +[def __admonitions__ [link quickbook.syntax.block.admonitions Admonitions]] +[def __tables__ [link quickbook.syntax.block.tables Tables]] +[def __variable_lists__ [link quickbook.syntax.block.variable_lists Variable Lists]] +[def __include__ [link quickbook.syntax.block.include Include]] +[def __import__ [link quickbook.syntax.block.import Import]] + +[section:intro Introduction] + +[:[*['["Why program by hand in five days what you can spend five years of your +life automating?]]] + +-- Terrence Parr, author ANTLR/PCCTS +] + +Well, QuickBook started as a weekend hack. It was originally intended to be a +sample application using __spirit__. What is it? What you are viewing now, this +documentation, is autogenerated by QuickBook. These files were generated from +one master: + +[:[@../quickbook.qbk quickbook.qbk]] + +Originally named QuickDoc, this funky tool that never dies evolved into a +funkier tool thanks to Eric Niebler who resurrected the project making it +generate __boostbook__ instead of HTML. The __boostbook__ documentation format +is an extension of __docbook__, an SGML or XML based format for describing +documentation. + +QuickBook is a WikiWiki style documentation tool geared towards C++ +documentation using simple rules and markup for simple formatting tasks. +QuickBook extends the WikiWiki concept. Like the WikiWiki, QuickBook documents are +simple text files. A single QuickBook document can generate a fully linked set +of nice HTML and PostScript/PDF documents complete with images and syntax- +colorized source code. + +Features include: + +* generate __boostbook__ xml, to generate HTML, PostScript and PDF +* simple markup to link to Doxygen-generated entities +* macro system for simple text substitution +* simple markup for italics, bold, preformatted, blurbs, code samples, + tables, URLs, anchors, images, etc. +* automatic syntax coloring of code samples +* CSS support + +[endsect] + +[section:change_log Change Log] + +[h3 Version 1.3] + +* Quickbook file inclusion \[include\]. +* Better xml output (pretty layout). Check out the generated XML. +* Regression testing facility: to make sure your document will always be + compatible (full backward compatibility) regardless of changes to + QuickBook. +* Code cleanup and refactoring. +* Allow phrase markup in the doc-info. +* Preformatted code blocks via \`\`code\`\` (double ticks) allows code in tables + and lists, for example. +* Quickbook versioning; allows full backward compatibility. You have to add + \[quickbook 1.3\] to the doc-info header to enable the new features. Without + this, QuickBook will assume that the document is a pre-1.3 document. +* Better (intuitive) paragraph termination. Some markups may terminate a paragraph. + Example:`` + [section x] + blah... + [endsect]`` +* Fully qualified section and headers. Subsection names are concatenated to the + ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name` +* Better   and whitespace handling in code snippets. +* \[xinclude\] fixes up the relative path to the target XML file when + input_directory is not the same as the output_directory. +* Allow untitled tables. +* Allow phrase markups in section titles. +* Allow escaping back to QuickBook from code, code blocks and inline code. +* Footnotes, with the \[footnote This is the footnote\] syntax. +* Post-processor bug fix for escaped XML code that it does not recognize. +* Replaceable, with the \[~replacement\] syntax. +* Generic Headers +* Code changes to allow full recursion (i.e. Collectors and push/pop functions) +* Various code cleanup/maintenance +* Templates! +* \[conceptref\] for referencing BoostBook entities. +* Allow escape of spaces. The escaped space is removed from the output. Syntax: + `\ `. +* Nested comments are now allowed. +* Quickbook blocks can nest inside comments. +* __import__ facility. +* Callouts on imported code +* Simple markups can now span a whole block. +* __blurbs__, __admonitions__ and table cells (see __tables__) may now + contain paragraphs. +* `\n` and `[br]` are now deprecated. + +[endsect] + +[section:syntax Syntax Summary] + +A QuickBook document is composed of one or more blocks. An example of +a block is the paragraph or a C++ code snippet. Some blocks have +special mark-ups. Blocks, except code snippets which have their own +grammar (C++ or Python), are composed of one or more phrases. A phrase +can be a simple contiguous run of characters. Phrases can have special +mark-ups. Marked up phrases can recursively contain other phrases, but +cannot contain blocks. A terminal is a self contained block-level or +phrase-level element that does not nest anything. + +Blocks, in general, are delimited by two end-of-lines (the block terminator). +Phrases in each block cannot contain a block terminator. This way, syntax errors +such as un-matched closing brackets do not go haywire and corrupt anything past +a single block. + +[section Comments] + +Can be placed anywhere. + +[pre +'''[/ comment (no output generated) ]''' +] + +[/ for testing only... ] + +[pre +'''[/ comments can be nested [/ some more here] ]''' +] + +[/ for testing [/ only ] ] + +[pre +'''[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]''' +] + +[/ for testing [*only ] ] + +[endsect] + +[section:phrase Phrase Level Elements] + +[section Font Styles] + +[pre''' +['italic], [*bold], [_underline], [^teletype], [-strikethrough] +'''] + +will generate: + +['italic], [*bold], [_underline], [^teletype], [-strikethrough] + +Like all non-terminal phrase level elements, this can of course be nested: + +[pre''' +[*['bold-italic]] +'''] + +will generate: + +[*['bold-italic]] + +[endsect] + +[section Replaceable] + +When you want content that may or must be replaced by the user, use the syntax: + +[pre''' +[~replacement] +'''] + +This will generate: + +[~replacement] + +[endsect] + +[section Quotations] + +[pre''' +["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein +'''] + +will generate: + +["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein + +Note the proper left and right quote marks. Also, while you can simply use +ordinary quote marks like "quoted", our quotation, above, will generate correct +DocBook quotations (e.g. quoted). + +Like all phrase elements, quotations may be nested. Example: + +[pre''' +["Here's the rule for bargains: ["Do other men, for they would do you.] That's +the true business precept.] +'''] + +will generate: + +["Here's the rule for bargains: ["Do other men, for they would do you.] +That's the true business precept.] + +[endsect] +[section Simple formatting] + +Simple markup for formatting text, common in many applications, is now supported: + +[pre''' +/italic/, *bold*, _underline_, =teletype= +'''] + +will generate: + +/italic/, *bold*, _underline_, =teletype= + +Unlike QuickBook's standard formatting scheme, the rules for simpler +alternatives are much stricter[footnote Thanks to David Barrett, author of +[@http://quinthar.com/qwikiwiki/index.php?page=Home Qwiki], for sharing +these samples and teaching me these obscure formatting rules. I wasn't sure +at all if __spirit__, being more or less a formal EBNF parser, can handle +the context sensitivity and ambiguity.]. + +* Simple markups cannot nest. You can combine a simple markup with a nestable markup. +* Simple markups cannot contain any other form of quickbook markup. +* A non-space character must follow the leading markup +* A non-space character must precede the trailing markup +* A space or a punctuation must follow the trailing markup +* If the matching markup cannot be found within a block, the formatting + will not be applied. This is to ensure that un-matched formatting markups, + which can be a common mistake, does not corrupt anything past a single block. + We do not want the rest of the document to be rendered bold just because we + forgot a trailing '*'. A single block is terminated by two end of lines or + the close bracket: ']'. +* A line starting with the star will be interpreted as an unordered list. + See __unordered_lists__. + +[table More Formatting Samples + [[Markup] [Result]] + [[[^'''*Bold*''']] [*Bold*]] + [[[^'''*Is bold*''']] [*Is bold*]] + [[[^'''* Not bold* *Not bold * * Not bold *''']] [* Not bold* *Not bold * * Not bold *]] + [[[^'''This*Isn't*Bold (no bold)''']] [This*Isn't*Bold (no bold)]] + [[[^'''(*Bold Inside*) (parenthesis not bold)''']] [(*Bold Inside*) (parenthesis not bold)]] + [[[^'''*(Bold Outside)* (parenthesis bold)''']] [*(Bold Outside)* (parenthesis bold)]] + [[[^'''3*4*5 = 60 (no bold)''']] [3*4*5 = 60 (no bold)]] + [[[^'''3 * 4 * 5 = 60 (no bold)''']] [3 * 4 * 5 = 60 (no bold)]] + [[[^'''3 *4* 5 = 60 (4 is bold)''']] [3 *4* 5 = 60 (4 is bold)]] + [[[^'''*This is bold* this is not *but this is*''']][*This is bold* this is not *but this is*]] + [[[^'''*This is bold*.''']] [*This is bold*.]] + [[[^'''*B*. (bold B)''']] [*B*. (bold B)]] + [[[^'''['*Bold-Italic*]''']] [['*Bold-Italic*]]] + [[[^'''*side-by*/-side/''']] [*side-by*/-side/]] +] + +As mentioned, simple markups cannot go past a single block. The text +from "have" to "full" in the following paragraph will be rendered as +bold: + +[pre''' +Baa baa black sheep, *have you any wool? +Yes sir, yes sir, three bags full!* +One for the master, one for the dame, +And one for the little boy who lives down the lane. +'''] + +Baa baa black sheep, *have you any wool? +Yes sir, yes sir, three bags full!* +One for the master, one for the dame, +And one for the little boy who lives down the lane. + +But in the following paragraph, bold is not applied: + +[pre''' +Baa baa black sheep, *have you any wool? +Yes sir, yes sir, three bags full! +One for the master, one for the dame, +And one for the little boy who lives down the lane. +'''] + +Baa baa black sheep, *have you any wool? +Yes sir, yes sir, three bags full! +One for the master, one for the dame, +And one for the little boy who lives down the lane. + +[endsect] +[section Inline code] + +Inlining code in paragraphs is quite common when writing C++ documentation. We +provide a very simple markup for this. For example, this: + +[pre''' +This text has inlined code `int main() { return 0; }` in it. +'''] + +will generate: + +This text has inlined code `int main() { return 0; }` in it. The code will be +syntax highlighted. + +[note We simply enclose the code with the tick: [^'''"`"'''], not the +single quote: `"'"`. Note too that [^'''`some code`'''] is preferred over +[^'''[^some code]''']. ] + +[endsect] +[section Code blocks] + +Preformatted code simply starts with a space or a tab (See __code__). +However, such a simple syntax cannot be used as phrase elements in lists +(See __ordered_lists__ and __unordered_lists__), tables (See __tables__), +etc. Inline code (see above) can. The problem is, inline code does not +allow formatting with newlines, spaces, and tabs. These are lost. + +We provide a phrase level markup that is a mix between the two. By using the +double-tick, instead of the single-tick, we are telling QuickBook to use +preformatted blocks of code. Example: + +[pre +\`\` + #include + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } +\`\` +] + +will generate: + +`` + #include + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } +`` + +[endsect] +[section Source Mode] + +If a document contains more than one type of source code then the source +mode may be changed dynamically as the document is processed. All QuickBook +documents are initially in C++ mode by default, though an alternative +initial value may be set in the __document__ section. + +To change the source mode, use the [^\[source-mode\]] markup, where +=source-mode= is one of the supported modes. For example, this: + +[pre''' +Python's [python] `import` is rather like C++'s [c++] `#include`. A +C++ comment `// looks like this` whereas a Python comment [python] +`# looks like this`. +'''] + +will generate: + +Python's [python] `import` is rather like C++'s [c++] `#include`. A +C++ comment `// looks like this` whereas a Python comment [python] +`#looks like this`. + +[table Supported Source Modes + [[Mode] [Source Mode Markup]] + [[C++] [[^\[c++\]]]] + [[Python] [[^\[python\]]]] +] + +[note The source mode strings are lowercase.] + +[endsect] +[section line-break] + +[pre''' +[br] +'''] + +[warning `[br]` is now deprecated. __blurbs__, __admonitions__ and +table cells (see __tables__) may now contain paragraphs.] + +[endsect] +[section Anchors] + +[pre''' +[#named_anchor] +'''] + +A named anchor is a hook that can be referenced by a link elsewhere in the +document. You can then reference an anchor with [^'''[link named_anchor +Some link text]''']. See __anchor_links__, __section__ and __heading__. + +[endsect] +[section Links] + +[pre''' +[@http://www.boost.org this is [*boost's] website....] +'''] + +will generate: + +[@http://www.boost.org this is [*boost's] website....] + +URL links where the link text is the link itself is common. Example: + +[pre''' +see http://spirit.sourceforge.net/ +'''] + +so, when the text is absent in a link markup, the URL is assumed. Example: + +[pre +see '''[@http://spirit.sourceforge.net/]''' +] + +will generate: + +see [@http://spirit.sourceforge.net/] + +[endsect] +[section Anchor links] + +You can link within a document using: + +[pre''' +[link section_id.normalized_header_text The link text] +'''] + +See sections __section__ and __heading__ for more info. + +[endsect] +[section refentry links] + +In addition, you can link internally to an XML refentry like: + +[pre''' +[link xml.refentry The link text] +'''] + +This gets converted into [^The link text]. + +Like URLs, the link text is optional. If this is not present, the link text will +automatically be the refentry. Example: + +[pre''' +[link xml.refentry] +'''] + +This gets converted into [^xml.refentry]. + +[endsect] +[section:code_links Code Links] + +If you want to link to a function, class, member, enum, concept or header in the reference +section, you can use: + +[pre''' +[funcref fully::qualified::function_name The link text] +[classref fully::qualified::class_name The link text] +[memberref fully::qualified::member_name The link text] +[enumref fully::qualified::enum_name The link text] +[macroref MACRO_NAME The link text] +[conceptref ConceptName The link text] +[headerref path/to/header.hpp The link text] +'''] + +Again, the link text is optional. If this is not present, the link text will +automatically be the function, class, member, enum, macro, concept or header. Example: + +[pre''' +[classref boost::bar::baz] +'''] + +would have "boost::bar::baz" as the link text. + +[endsect] +[section Escape] + +The escape mark-up is used when we don't want to do any processing. + +[pre +\'\'\' +escape (no processing/formatting) +\'\'\' +] + +Escaping allows us to pass XML markup to __boostbook__ or __docbook__. For example: + +[pre +\'\'\' +This is direct XML markup +\'\'\' +] + +''' +This is direct XML markup +''' + +[important Be careful when using the escape. The text must conform to +__boostbook__/__docbook__ syntax.] + +[endsect] +[section Single char escape] + +The backslash may be used to escape a single punctuation character. The +punctuation immediately after the backslash is passed without any processing. +This is useful when we need to escape QuickBook punctuations such as `[` and `]`. +For example, how do you escape the triple quote? Simple: [^\\'\\'\\'] + + +`\n` has a special meaning. It is used to generate line breaks. + +[warning `\n` and `[br]` are now deprecated. __blurbs__, __admonitions__ +and table cells (see __tables__) may now contain paragraphs.] + +The escaped space: `\ ` also has a special meaning. The escaped space is removed +from the output. + +[endsect] +[section Images] + +[pre''' +[$image.jpg] +'''] + +[endsect] +[section Footnotes] + +As of version 1.3, QuickBook supports footnotes. Just put the text of the +footnote in a `[footnote]` block, and the text will be put at the bottom +of the current page. For example, this: + +[pre''' +[footnote A sample footnote] +'''] + +will generate this[footnote A sample footnote]. + +[section Macro Expansion] + +[pre''' +__a_macro_identifier__ +'''] + +See __macros__ for details. + +[endsect] + +[section Template Expansion] + +[pre''' +[a_template_identifier] +'''] + +See __templates__ for details. + +[endsect] + +[endsect] +[endsect] +[section:block Block Level Elements] + +[section Document] + +Every document must begin with a Document Info section, which should look +like this: + +[pre''' +[document-type The Document Title + [quickbook 1.3] + [version 1.0] + [id the_document_name] + [dirname the_document_dir] + [copyright 2000 2002 2003 Joe Blow, Jane Doe] + [purpose The document's reason for being] + [category The document's category] + [authors [Blow, Joe], [Doe, Jane]] + [license The document's license] + [source-mode source-type] +] +'''] + +Where document-type is one of: + +* book +* article +* library +* chapter +* part +* appendix +* preface +* qandadiv +* qandaset +* reference +* set + +quickbook 1.3 declares the version of quickbook the document is written for. +In its absence, version 1.1 is assumed. + +=version=, =id=, =dirname=, =copyright=, =purpose=, =category=, =authors=, +=license=, =last-revision= and =source-mode= are optional information. + +=source-type= is a lowercase string setting the initial __source_mode__. If +the =source-mode= field is omitted, a default value of =c++= will be used. + +[endsect] +[section Section] + +Starting a new section is accomplished with: + +[pre''' +[section:id The Section Title] +'''] + +where /id/ is optional. id will be the filename of the generated section. +If it is not present, "The Section Title" will be normalized and become the id. +Valid characters are =a-Z=, =A-Z=, =0-9= and =_=. All non-valid characters are +converted to underscore and all upper-case are converted to lower case. +Thus: "The Section Title" will be normalized to "the_section_title". + +End a section with: + +[pre''' +[endsect] +'''] + +Sections can nest, and that results in a hierarchy in the table of contents. + +[endsect] +[section xinclude] + +You can include another XML file with: + +[pre''' +[xinclude file.xml] +'''] + +This is useful when file.xml has been generated by Doxygen and contains your +reference section. + +[endsect] +[section Paragraphs] + +Paragraphs start left-flushed and are terminated by two or more newlines. No +markup is needed for paragraphs. QuickBook automatically detects paragraphs from +the context. Block markups \[section, endsect, h1, h2, h3, h4, h5, h6, blurb, +(block-quote) ':', pre, def, table and include \] may also terminate a paragraph. + +[endsect] + +[section Lists] +[section Ordered lists] + +[pre +# One +# Two +# Three +] + +will generate: + +# One +# Two +# Three + +[endsect] +[section List Hierarchies] + +List hierarchies are supported. Example: + +[pre +# One +# Two +# Three + # Three.a + # Three.b + # Three.c +# Four + # Four.a + # Four.a.i + # Four.a.ii +# Five +] + +will generate: + +# One +# Two +# Three + # Three.a + # Three.b + # Three.c +# Fourth + # Four.a + # Four.a.i + # Four.a.ii +# Five + +[endsect] +[section Long List Lines] + +Long lines will be wrapped appropriately. Example: + +[pre +# A short item. +# A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. +# A short item. +] + +# A short item. +# A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. + A very long item. A very long item. A very long item. +# A short item. + +[endsect] +[section Unordered lists] + +[pre''' +* First +* Second +* Third +'''] + +will generate: + +* First +* Second +* Third + +[endsect] +[section Mixed lists] + +Mixed lists (ordered and unordered) are supported. Example: + +[pre''' +# One +# Two +# Three + * Three.a + * Three.b + * Three.c +# Four +'''] + +will generate: + +# One +# Two +# Three + * Three.a + * Three.b + * Three.c +# Four + +And... + +[pre''' +# 1 + * 1.a + # 1.a.1 + # 1.a.2 + * 1.b +# 2 + * 2.a + * 2.b + # 2.b.1 + # 2.b.2 + * 2.b.2.a + * 2.b.2.b +'''] + +will generate: + +# 1 + * 1.a + # 1.a.1 + # 1.a.2 + * 1.b +# 2 + * 2.a + * 2.b + # 2.b.1 + # 2.b.2 + * 2.b.2.a + * 2.b.2.b + +[endsect] +[endsect] + +[section Code] + +Preformatted code starts with a space or a tab. The code will be +syntax highlighted according to the current __source_mode__: + +[c++] + + #include + + int main() + { + // Sample code + std::cout << "Hello, World\n"; + return 0; + } + +[python] + + import cgi + + def cookForHtml(text): + '''"Cooks" the input text for HTML.''' + + return cgi.escape(text) + +[c++] + +Macros that are already defined are expanded in source code. Example: + +[pre''' +[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]] +[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]] + + using __boost__::__array__; +'''] + +Generates: + +[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]] +[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]] + + using __boost__::__array__; + +[endsect] +[section:escape_back Escaping Back To QuickBook] + +Inside code, code blocks and inline code, QuickBook does not allow any +markup to avoid conflicts with the target syntax (e.g. c++). In case you +need to switch back to QuickBook markup inside code, you can do so using a +language specific /escape-back/ delimiter. In C++ and Python, the delimiter +is the double tick (back-quote): "\`\`" and "\`\`". Example: + +[pre''' +void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``() +{ +} +'''] + +Will generate: + + void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``() + { + } + +When escaping from code to QuickBook, only phrase level markups are +allowed. Block level markups like lists, tables etc. are not allowed. + +[endsect] +[section Preformatted] + +Sometimes, you don't want some preformatted text to be parsed as C++. In such +cases, use the [^[pre ... \]] markup block. + +[pre''' +[pre + + Some *preformatted* text Some *preformatted* text + + Some *preformatted* text Some *preformatted* text + + Some *preformatted* text Some *preformatted* text + +] +'''] + +Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block level +markup, pre (and Code) are the only ones that allow multiple newlines. The +markup above will generate: + +[pre + +Some *preformatted* text Some *preformatted* text + + Some *preformatted* text Some *preformatted* text + + Some *preformatted* text Some *preformatted* text + +] + +Notice that unlike Code, phrase markup such as font style is still permitted +inside =pre= blocks. + +[endsect] +[section Blockquote] + +[pre +'''[:sometext...]''' +] + +[:Indents the paragraph. This applies to one paragraph only.] + +[endsect] +[section Admonitions] + +[pre''' +[note This is a note] +[tip This is a tip] +[important This is important] +[caution This is a caution] +[warning This is a warning] +'''] + +generates __docbook__ admonitions: + +[note This is a note] +[tip This is a tip] +[important This is important] +[caution This is a caution] +[warning This is a warning] + +These are the only admonitions supported by __docbook__. So, +for example [^\[information This is some information\]] is unlikely +to produce the desired effect. + +[endsect] +[section Headings] + +[pre''' +[h1 Heading 1] +[h2 Heading 2] +[h3 Heading 3] +[h4 Heading 4] +[h5 Heading 5] +[h6 Heading 6] +'''] + +[h1 Heading 1] +[h2 Heading 2] +[h3 Heading 3] +[h4 Heading 4] +[h5 Heading 5] +[h6 Heading 6] + +Headings 1-3 \[h1 h2 and h3\] will automatically have anchors with normalized +names with [^name="section_id.normalized_header_text"] (i.e. valid characters are +=a-z=, =A-Z=, =0-9= and =_=. All non-valid characters are converted to underscore +and all upper-case are converted to lower-case. For example: Heading +1 in section Section 2 will be normalized to [^section_2.heading_1]). You can use: + +[pre''' +[link section_id.normalized_header_text The link text] +'''] + +to link to them. See __anchor_links__ and __section__ for more info. + +[endsect] +[section Generic Heading] + +In cases when you don't want to care about the heading level (1 to 6), you +can use the /Generic Heading/: + +[pre''' +[heading Heading] +'''] + +The /Generic Heading/ assumes the level, plus one, of the innermost section +where it is placed. For example, if it is placed in the outermost section, +then, it assumes /h2/. + +Headings are often used as an alternative to sections. It is used +particularly if you do not want to start a new section. In many cases, +however, headings in a particular section is just flat. Example: + +[pre''' +[section A] +[h2 X] +[h2 Y] +[h2 Z] +[endsect] +'''] + +Here we use h2 assuming that section A is the outermost level. If it is +placed in an inner level, you'll have to use h3, h4, etc. depending on +where the section is. In general, it is the section level plus one. It is +rather tedious, however, to scan the section level everytime. If you +rewrite the example above as shown below, this will be automatic: + +[pre''' +[section A] +[heading X] +[heading Y] +[heading Z] +[endsect] +'''] + +They work well regardless where you place them. You can rearrange sections +at will without any extra work to ensure correct heading levels. In fact, +with /section/ and /heading/, you have all you need. /h1/../h6/ becomes +redundant. /h1/../h6/ might be deprecated in the future. + +[endsect] +[section Macros] + +[pre''' +[def macro_identifier some text] +'''] + +When a macro is defined, the identifier replaces the text anywhere in the +file, in paragraphs, in markups, etc. macro_identifier is a string of non- +white space characters except '\]'. A macro may not follow an alphabetic +character or the underscore. The replacement text can be any phrase (even +marked up). Example: + +[pre''' +[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] +sf_logo +'''] + +Now everywhere the sf_logo is placed, the picture will be inlined. + +[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] +sf_logo + +[tip It's a good idea to use macro identifiers that are distinguishable. +For instance, in this document, macro identifiers have two leading and +trailing underscores (e.g. [^'''__spirit__''']). The reason is to avoid +unwanted macro replacement.] + +Links (URLS) and images are good candidates for macros. *1*) They tend to +change a lot. It is a good idea to place all links and images in one place near the top +to make it easy to make changes. *2*) The syntax is not pretty. It's easier to read and +write, e.g. [^'''__spirit__'''] than [^'''[@http://spirit.sourceforge.net Spirit]''']. + +Some more examples: + +[pre''' +[def :-) [$theme/smiley.png]] +[def __spirit__ [@http://spirit.sourceforge.net Spirit]] +'''] + +(See __images__ and __links__) + +Invoking these macros: + +[pre''' +Hi __spirit__ :-) +'''] + +will generate this: + +Hi __spirit__ :-) + +[endsect] +[section Predefined Macros] + +Quickbook has some predefined macros that you can already use. + +[table Predefined Macros + [[Macro] [Meaning] [Example]] + [['''__DATE__'''] [Today's date] [__DATE__]] + [['''__TIME__'''] [The current time] [__TIME__]] + [['''__FILENAME__'''] [Quickbook source filename] [__FILENAME__]] +] + +[endsect] +[section Templates] + +Templates provide a more versatile text substitution mechanism. Templates +come in handy when you need to create parameterizable, multi-line, +boilerplate text that you specify once and expand many times. Templates +accept one or more arguments. These arguments act like place-holders for +text replacement. Unlike simple macros, which are limited to phrase level +markup, templates can contain block level markup (e.g. paragraphs, code +blocks and tables). + +Example template: + +[pre''' +[template person[name age what] + +Hi, my name is [name]. I am [age] years old. I am a [what]. + +] +'''] + +[template person[name age what] + +Hi, my name is [name]. I am [age] years old. I am a [what]. + +] + +[heading Template Identifier] + +Template identifiers can either consist of: + +* An initial alphabetic character or the underscore, followed by + zero or more alphanumeric characters or the underscore. This is + similar to your typical C/C++ identifier. +* A single character punctuation (a non-alphanumeric printable character) + +[heading Formal Template Arguments] + +Template formal arguments are identifiers consisting of an initial +alphabetic character or the underscore, followed by zero or more +alphanumeric characters or the underscore. This is similar to your typical +C/C++ identifier. + +A template formal argument temporarily hides a template of the same name at +the point where the [link quickbook.syntax.block.templates.template_expansion +template is expanded]. Note that the body of the [^person] template above +refers to [^name] [^age] and [^what] as [^\[name\]] [^\[age\]] and +[^\[what\]]. [^name] [^age] and [^what] are actually templates that exist +in the duration of the template call. + +[heading Template Body] + +The template body can be just about any QuickBook block or phrase. There +are actually two forms. Templates may be phrase or block level. Phrase +templates are of the form: + +[pre''' +[template sample[arg1 arg2...argN] replacement text... ] +'''] + +Block templates are of the form: + +[pre''' +[template sample[arg1 arg2...argN] +replacement text... +] +'''] + +The basic rule is as follows: if a newline immediately follows the argument +list, then it is a block template, otherwise, it is a phrase template. +Phrase templates are typically expanded as part of phrases. Like macros, +block level elements are not allowed in phrase templates. + +[heading Template Expansion] + +You expand a template this way: + +[pre''' +[template_identifier arg1..arg2..arg3] +'''] + +At template expansion, you supply the actual arguments. The template will +be expanded with your supplied arguments. Example: + +[pre''' +[person James Bond..39..Spy] +[person Santa Clause..87..Big Red Fatso] +'''] + +Which will expand to: + +[person James Bond..39..Spy] +[person Santa Clause..87..Big Red Fatso] + +[caution A word of caution: Templates are recursive. A template can call +another template or even itself, directly or indirectly. There are no +control structures in QuickBook (yet) so this will always mean infinite +recursion. QuickBook can detect this situation and report an error if +recursion exceeds a certain limit.] + +Each actual argument can be a word, a text fragment or just about any [link +quickbook.syntax.phrase QuickBook phrase]. Arguments are separated by the +double dot [^".."] and terminated by the close parenthesis. + +[heading Nullary Templates] + +Nullary templates look and act like simple macros. Example: + +[pre''' +[template alpha[]'''&#945;'''] +[template beta[]'''&#946;'''] +'''] + +[template alpha[]'''α'''] +[template beta[]'''β'''] + +Expanding: + +[pre'''Some squigles...[*[alpha][beta]]'''] + +We have: + +Some squiggles...[*[alpha][beta]] + +The difference with macros are + +* The explicit [link quickbook.syntax.block.templates.template_expansion + template expansion syntax]. This is an advantage because, now, we don't + have to use obscure naming conventions like double underscores (e.g. + \_\_alpha\_\_) to avoid unwanted + macro replacement. +* The template is expanded at the point where it is invoked. A macro is + expanded immediately at its point of declaration. This is subtle and + can cause a slight difference in behavior especially if you refer to + other macros and templates in the body. + +The empty brackets after the template identifier ([^alpha\[\]]) indicates no +arguments. If the template body does not look like a template argument list, we +can elide the empty brackets. Example: + +[pre''' +[template aristotle_quote Aristotle: [*['Education is the best provision +for the journey to old age.]]] +'''] + +[template aristotle_quote\ Aristotle: [*['Education is the best provision +for the journey to old age.]]] + +Expanding: + +[pre''' +Here's a quote from [aristotle_quote]. +'''] + +We have: + +Here's a quote from [aristotle_quote]. + +The disadvantage is that you can't avoid the space between the template +identifier, `aristotle_quote`, and the template body "Aristotle...". This space +will be part of the template body. If that space is unwanted, use empty +brackets or use the space escape: "`\ `". Example: + +[pre''' +[template tag\ _tag] +'''] + +[template tag\ _tag] + +Then expanding: + +[pre''' +`struct` x[tag]; +'''] + +We have: + +`struct` x[tag]; + +You have a couple of ways to do it. I personally prefer the explicit empty +brackets, though. + +[heading Simple Arguments] + +As mentioned, arguments are separated by the double dot [^".."]. If there +are less arguments passed than expected, QuickBook attempts to break the +last argument into two or more arguments following this logic: + +* Break the last argument into two, at the first space found ([^'', '\\n', + \\t' or '\\r']). +* Repeat until there are enough arguments or if there are no more spaces + found (in which case, an error is reported). + +For example: + +[pre''' +[template simple[a b c d] [a][b][c][d]] +[simple w x y z] +'''] + +will produce: + +[template simple[a b c d] [a][b][c][d]] +[simple w x y z] + +"w x y z" is initially treated as a single argument because we didn't +supply any [^".."] separators. However, since [^simple] expects 4 +arguments, "w x y z" is broken down iteratively (applying the logic above) +until we have "w", "x", "y" and "z". + +QuickBook only tries to get the arguments it needs. For example: + +[pre''' +[simple w x y z trail] +'''] + +will produce: + +[simple w x y z trail] + +The arguments being: "w", "x", "y" and "z trail". + +It should be obvious now that for simple arguments with no spaces, we can +get by without separating the arguments with [^".."] separators. It is +possible to combine [^".."] separators with the argument passing +simplification presented above. Example: + +[pre''' +[simple what do you think ..m a n?] +'''] + +will produce: + +[simple what do you think ..m a n?] + +[heading Punctuation Templates] + +With templates, one of our objectives is to allow us to rewrite QuickBook +in QuickBook (as a qbk library). For that to happen, we need to accommodate +single character punctuation templates which are fairly common in +QuickBook. You might have noticed that single character punctuations are +allowed as [link quickbook.syntax.block.templates.template_identifier +template identifiers]. Example: + +[pre''' +[template ![bar] ''''''[bar]''''''] +'''] + +Now, expanding this: + +[pre''' +[!baz] +'''] + +We will have: + +[pre +baz +] + +[endsect] +[section Blurbs] + +[pre''' +[blurb :-) [*An eye catching advertisement or note...] + + __spirit__ is an object-oriented recursive-descent parser generator framework + implemented using template meta-programming techniques. Expression templates + allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) + completely in C++. +] +'''] + +will generate this: + +[blurb :-) [*An eye catching advertisement or note...] + + __spirit__ is an object-oriented recursive-descent parser generator + framework implemented using template meta-programming techniques. Expression + templates allow us to approximate the syntax of Extended Backus-Normal Form + (EBNF) completely in C++. +] + +[note Prefer [link quickbook.syntax.block.admonitions admonitions] wherever +appropriate.] + +[endsect] +[section Tables] + +[pre''' +[table A Simple Table + [[Heading 1] [Heading 2] [Heading 3]] + [[R0-C0] [R0-C1] [R0-C2]] + [[R1-C0] [R1-C1] [R1-C2]] + [[R2-C0] [R2-C1] [R2-C2]] +] +'''] + +will generate: + +[table A Simple Table + [[Heading 1] [Heading 2] [Heading 3]] + [[R0-C0] [R0-C1] [R0-C2]] + [[R2-C0] [R2-C1] [R2-C2]] + [[R3-C0] [R3-C1] [R3-C2]] +] + +The table title is optional. The first row of the table is automatically +treated as the table header; that is, it is wrapped in +[^...] XML tags. Note that unlike the original QuickDoc, the +columns are nested in [ cells... ]. The syntax is free-format and allows +big cells to be formatted nicely. Example: + +[pre''' +[table Table with fat cells + [[Heading 1] [Heading 2]] + [ + [Row 0, Col 0: a small cell] + [ + Row 0, Col 1: a big fat cell with paragraphs + + Boost provides free peer-reviewed portable C++ source libraries. + + We emphasize libraries that work well with the C++ Standard Library. + Boost libraries are intended to be widely useful, and usable across + a broad spectrum of applications. The Boost license encourages both + commercial and non-commercial use. + ] + ] + [ + [Row 1, Col 0: a small cell] + [Row 1, Col 1: a small cell] + ] +] +'''] + +and thus: + +[table Table with fat cells + [[Heading 1] [Heading 2]] + [ + [Row 0, Col 0: a small cell] + [ + Row 0, Col 1: a big fat cell with paragraphs + + Boost provides free peer-reviewed portable C++ source libraries. + + We emphasize libraries that work well with the C++ Standard Library. + Boost libraries are intended to be widely useful, and usable across + a broad spectrum of applications. The Boost license encourages both + commercial and non-commercial use. + ] + ] + [ + [Row 1, Col 0: a small cell] + [Row 1, Col 1: a small cell] + ] +] + +Here's how to have preformatted blocks of code in a table cell: + +[pre''' +[table Table with code + [[Comment] [Code]] + [ + [My first program] + ['''\`\` + #include + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } + \`\`'''] + ] +] +'''] + +[table Table with code + [[Comment] [Code]] + [ + [My first program] + [`` + #include + + int main() + { + std::cout << "Hello, World!" << std::endl; + return 0; + } + ``] + ] +] + +[endsect] +[section Variable Lists] + +[pre''' +[variablelist A Variable List + [[term 1] [The definition of term 1]] + [[term 2] [The definition of term 2]] + [[term 3] [The definition of term 3]] +] +'''] + +will generate: + +[variablelist A Variable List + [[term 1] [The definition of term 1]] + [[term 2] [The definition of term 2]] + [[term 3] [The definition of term 3]] +] + +The rules for variable lists are the same as for tables, except that +only 2 "columns" are allowed. The first column contains the terms, and +the second column contains the definitions. Those familiar with HTML +will recognize this as a "definition list". + +[endsect] +[section Include] + +You can include one QuickBook file from another. The syntax is simply: + +[pre''' +[include someother.qbk] +'''] + +The included file will be processed as if it had been cut and pasted +into the current document, with the following exceptions: + +* The '''__FILENAME__''' predefined macro will reflect the name of the + file currently being processed. +* Any macros defined in the included file are scoped to that file. + +The [^\[include\]] directive lets you specify a document id to use for the +included file. When this id is not explicitly specified, the id defaults to +the filename ("someother", in the example above). You can specify the id +like this: + +[pre''' +[include:someid someother.qbk] +'''] + +All auto-generated anchors will use the document id as a unique prefix. So +for instance, if there is a top section in someother.qbk named "Intro", the +named anchor for that section will be "someid.intro", and you can link to +it with [^\[link someid.intro The Intro\]]. + +[endsect] + +[section Import] + +When documenting code, you'd surely need to present code from actual source +files. While it is possible to copy some code and paste them in your QuickBook +file, doing so is error prone and the extracted code in the documentation tends +to get out of sync with the actual code as the code evolves. The problem, as +always, is that once documentation is written, the tendency is for the docs to +languish in the archives without maintenance. + +QuickBook's import facility provides a nice solution. + +[heading Example] + +You can effortlessly import code snippets from source code into your QuickBook. +The following illustrates how this is done: + +[pre''' +[import ../test/stub.cpp] +[foo] +[bar] +'''] + +The first line: + +[pre''' +[import ../test/stub.cpp] +'''] + +collects specially marked-up code snippets from [@../../test/stub.cpp stub.cpp] +and places them in your QuickBook file as virtual templates. Each of the +specially marked-up code snippets has a name (e.g. `foo` and `bar` in the +example above). This shall be the template identifier for that particular code +snippet. The second and third line above does the actual template expansion: + +[pre''' +[foo] +[bar] +'''] + +And the result is: + +[import ../test/stub.cpp] +[foo] +[bar] + +[heading Code Snippet Markup] + +Note how the code snippets in [@../../test/stub.cpp stub.cpp] get marked up. We +use distinguishable comments following the form: + + //[id + some code here + //] + +The first comment line above initiates a named code-snippet. This prefix will +not be visible in quickbook. The entire code-snippet in between `//[id` and +`//]` will be inserted as a template in quickbook with name ['/id/]. The comment +`//]` ends a code-snippet This too will not be visible in quickbook. + +[heading Special Comments] + +Special comments of the form: + + //` some [*quickbook] markup here + +and: + + /*` some [*quickbook] markup here */ + +will be parsed by QuickBook. This can contain quickbook /blocks/ (e.g. sections, +paragraphs, tables, etc). In the first case, the initial slash-slash, tick and +white-space shall be ignored. In the second, the initial slash-star-tick and the +final star-slash shall be ignored. + +[heading Callouts] + +Special comments of the form: + + /*< some [*quickbook] markup here >*/ + +will be regarded as callouts. These will be collected, numbered and +rendered as a "callout bug" (a small icon with a number). After the +whole snippet is parsed, the callout list is generated. See +[@http://www.docbook.org/tdg/en/html/callout.html Callouts] for details. +Example: + +[foo_bar] + +Checkout [@../../test/stub.cpp stub.cpp] to see the actual code. + +[endsect] + +[endsect] +[endsect] + +[section:install Installation and configuration] + +This section provides some guidelines on how to install and configure +BoostBook and Quickbook under several operating systems. + +Before continuing, it is very important that you keep this in mind: if you +try to build some documents and the process breaks due to misconfiguration, +be absolutely sure to delete any `bin` and `bin.v2` directories generated +by the build before trying again. Otherwise your configuration fixes will +not take any effect. + +[section:windows Windows 2000, XP, 2003, Vista] + +[python] + +[:['Section contributed by Julio M. Merino Vidal]] + +The following instructions apply to any Windows system based on Windows +2000, including Windows XP, Windows 2003 Server and Windows Vista. The +paths shown below are taken from a Windows Vista machine; you will need to +adjust them to match your system in case you are running an older version. + +# First of all you need to have a copy of `xsltproc` for Windows. There + are many ways to get this tool, but to keep things simple, use the + [@http://www.zlatkovic.com/pub/libxml/ binary packages] made by Igor + Zlatkovic. At the very least, you need to download the following + packages: `iconv`, `zlib`, `libxml2` and `libxslt`. + +# Unpack all these packages in the same directory so that you get unique + `bin`, `include` and `lib` directories within the hierarchy. These + instructions use `C:\Users\example\Documents\boost\xml` as the root for + all files. + +# From the command line, go to the `bin` directory and launch + `xsltproc.exe` to ensure it works. You should get usage information on + screen. + +# Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML + 4.2] and unpack it in the same directory used above. That is: + `C:\Users\example\Documents\boost\xml\docbook-xml`. + +# Download the latest + [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608 + Docbook XSL] version and unpack it, again in the same directory + used before. To make things easier, rename the directory created + during the extraction to `docbook-xsl` (bypassing the version name): + `C:\Users\example\Documents\boost\xml\docbook-xsl`. + +# Add the following to your `user-config.jam` file, which should live in + your home directory (`%HOMEDRIVE%%HOMEPATH%`). You must already have it + somewhere or otherwise you could not be building Boost (i.e. missing + tools configuration). + + using xsltproc + : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe" + ; + + using boostbook + : "C:/Users/example/Documents/boost/xml/docbook-xsl" + : "C:/Users/example/Documents/boost/xml/docbook-xml" + ; + +The above steps are enough to get a functional BoostBook setup. Quickbook +will be automatically built when needed. If you want to avoid these +rebuilds: + +# Go to Quickbook's source directory (`BOOST_ROOT\tools\quickbook`). + +# Build the utility by issuing `bjam --v2`. + +# Copy the resulting `quickbook.exe` binary (located under the + `BOOST_ROOT\bin.v2` hierarchy) to a safe place. Following our previous + example, you can install it into: + `C:\Users\example\Documents\boost\xml\bin`. + +# Add the following to your `user-config.jam` file: + + using quickbook + : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe" + ; + +[endsect] + +[section:linux Debian, Ubuntu] + +The following instructions apply to Debian and its derivatives. They are based +on a Ubuntu Edgy install but should work on other Debian based systems. + +First install the `bjam`, `xsltproc`, `docbook-xsl` and `docbook-xml` packages. +For example, using `apt-get`: + + sudo apt-get install xsltprc docbook-xsl docbook-xml + +If you're planning on building boost's documentation, you'll also need to +install the `doxygen` package as well. + +Next, we need to configure Boost Build to compile BoostBook files. Add the +following to your `user-config.jam` file, which should be in your home +directory. If you don't have one, create a file containing this text. For more +information on setting up `user-config.jam`, see the +[@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost +Build documentation]. + + using xsltproc ; + + using boostbook + : /usr/share/xml/docbook/stylesheet/nwalsh + : /usr/share/xml/docbook/schema/dtd/4.2 + ; + + # Remove this line if you're not using doxygen + using doxygen ; + +The above steps are enough to get a functional BoostBook setup. Quickbook +will be automatically built when needed. If you want to avoid these +rebuilds: + +# Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`). + +# Build the utility by issuing `bjam --v2`. + +# Copy the resulting `quickbook` binary (located under the + `BOOST_ROOT/bin.v2` hierarchy) to a safe place. The traditional location is + `/usr/local/bin`. + +# Add the following to your `user-config.jam` file, using the full path of the + quickbook executable: + + using quickbook + : /usr/local/bin/quickbook + ; + +[endsect] +[endsect] [/Installation and configuration] + +[section:editors Editor Support] + +Editing quickbook files is usually done with text editors both simple and +powerful. The following sections list the settings for some editors which can +help make editing quickbook files a bit easier. + +[blurb __note__ You may submit your settings, tips, and suggestions to the +authors, or through the [@https://lists.sourceforge.net/lists/listinfo/boost- +docs Boost Docs mailing list].] + +[section:scite Scintilla Text Editor] + +[:['Section contributed by Dean Michael Berris]] + +The Scintilla Text Editor (SciTE) is a free source code editor for Win32 and X. +It uses the SCIntilla source code editing component. + +[blurb __tip__ SciTE can be downloaded from [@http://www.scintilla.org/SciTE.html]] + +You can use the following settings to highlight quickbook tags when +editing quickbook files. + +[pre''' +qbk=*.qbk +lexer.*.qbk=props +use.tabs.$(qbk)=0 +tab.size.$(qbk)=4 +indent.size.$(qbk)=4 +style.props.32=$(font.base) +comment.stream.start.props=[/ +comment.stream.end.props=] +comment.box.start.props=[/ +comment.box.middle.props= +comment.box.end.props=] +'''] + +[blurb __note__ Thanks to Rene Rivera for the above SciTE settings.] + +[endsect] [/scite] +[endsect] [/editors] + +[section:faq Frequently Asked Questions] + +[heading Can I use QuickBook for non-Boost documentation?] + +QuickBook can be used for non-Boost documentation with a little extra work. + +[:['Faq contributed by Michael Marcin]] + +When building HTML documentation with BoostBook a Boost C++ Libraries header +is added to the files. When using QuickBook to document projects outside of +Boost this is not desirable. This behavior can be overridden at the BoostBook +level by specifying some XSLT options. When using Boost Build version 2 (BBv2) +this can be achieved by adding parameters to the BoostBook target declaration. + +For example: +[pre +using quickbook ; + +xml my_doc : my_doc.qbk ; + +boostbook standalone + : + my_doc + : + boost.image.src=images/my_project_logo.png + boost.image.alt="\\"My Project\\"" + boost.image.w=100 + boost.image.h=50 + nav.layout=none + ; +] + +[endsect] [/faq] + +[section:ref Quick Reference] + +[cpp] + +[template ordered_list_sample[] +[pre''' +# one +# two +# three +'''] +] + +[template unordered_list_sample[] +[pre''' +* one +* two +* three +'''] +] + +[template table_sample[] +[pre''' +[table Title +[[a][b][c]] +[[a][b][c]] +] +'''] +] + +[template var_list_sample[] +[pre''' +[variablelist Title +[[a][b]] +[[a][b]] +] +'''] +] + + +[table Syntax Compendium + [[To do this...] [Use this...] [See this...]] + [[comment] [[^'''[/ some comment]''']] [__comments__]] + [[['italics]] [[^'''['italics] or /italics/''']] [__font_styles__ and __simple_formatting__]] + [[[*bold]] [[^'''[*bold] or *bold*''']] [__font_styles__ and __simple_formatting__]] + [[[_underline]] [[^'''[_underline] or _underline_''']] [__font_styles__ and __simple_formatting__]] + [[[^teletype]] [[^'''[^teletype] or =teletype=''']] [__font_styles__ and __simple_formatting__]] + [[[-strikethrough]] [[^'''[-strikethrough]''']] [__font_styles__ and __simple_formatting__]] + [[[~replaceable]] [[^'''[~replaceable]''']] [__replaceable__]] + [[source mode] [[^\[c++\]] or [^\[python\]]] [__source_mode__]] + [[inline code] [[^'''`int main();`''']] [__inline_code__]] + [[code block] [[^'''``int main();``''']] [__code__]] + [[code escape] [[^'''``from c++ to QuickBook``''']] [__escape_back__]] + [[line break] [[^'''[br] or \n''']] [__line_break__ *DEPRECATED*]] + [[anchor] [[^'''[#anchor]''']] [__anchors__]] + [[link] [[^'''[@http://www.boost.org Boost]''']] [__links__]] + [[anchor link] [[^'''[link section.anchor Link text]''']] [__anchor_links__]] + [[refentry link] [[^'''[link xml.refentry Link text]''']] [__refentry_links__]] + [[function link] [[^'''[funcref fully::qualified::function_name Link text]''']] [__code_links__]] + [[class link] [[^'''[classref fully::qualified::class_name Link text]''']] [__code_links__]] + [[member link] [[^'''[memberref fully::qualified::member_name Link text]''']] [__code_links__]] + [[enum link] [[^'''[enumref fully::qualified::enum_name Link text]''']] [__code_links__]] + [[macro link] [[^'''[macroref MACRO_NAME Link text]''']] [__code_links__]] + [[concept link] [[^'''[conceptref ConceptName Link text]''']] [__code_links__]] + [[header link] [[^'''[headerref path/to/header.hpp Link text]''']] [__code_links__]] + [[escape] [[^\'\'\'escaped text (no processing/formatting)\'\'\']] [__escape__]] + [[single char escape] [[^\\c]] [__single_char_escape__]] + [[images] [[^'''[$image.jpg]''']] [__images__]] + [[begin section] [[^'''[section The Section Title]''']] [__section__]] + [[end section] [[^'''[endsect]''']] [__section__]] + [[paragraph] [No markup. Paragraphs start left-flushed and are terminated by two or more newlines.] [__paragraphs__]] + [[ordered list] [[ordered_list_sample]] [__ordered_lists__]] + [[unordered list] [[unordered_list_sample]] [__unordered_lists__]] + [[code] [No markup. Preformatted code starts with a space or a tab.] [__code__]] + [[preformatted] [[^'''[pre preformatted]''']] [__preformatted__]] + [[block quote] [[^'''[:sometext...]''']] [__blockquote__]] + [[heading 1] [[^'''[h1 Heading 1]''']] [__heading__]] + [[heading 2] [[^'''[h2 Heading 2]''']] [__heading__]] + [[heading 3] [[^'''[h3 Heading 3]''']] [__heading__]] + [[heading 4] [[^'''[h4 Heading 4]''']] [__heading__]] + [[heading 5] [[^'''[h5 Heading 5]''']] [__heading__]] + [[heading 6] [[^'''[h6 Heading 6]''']] [__heading__]] + [[macro] [[^'''[def macro_identifier some text]''']] [__macros__]] + [[template] [[^'''[template[a b] [a] body [b]]''']] [__templates__]] + [[blurb] [[^'''[blurb advertisement or note...]''']] [__blurbs__]] + [[admonition] [[^'''[warning Warning text...]''']] [__admonitions__]] + [[table] [[table_sample]] [__tables__]] + [[variablelist] [[var_list_sample]] [__variable_lists__]] + [[include] [[^'''[include someother.qbk]''']] [__include__]] +] + +[endsect] diff --git a/src/boost/tools/quickbook/test/regen-gold.sh b/src/boost/tools/quickbook/test/regen-gold.sh new file mode 100644 index 000000000..c1f9b8e8e --- /dev/null +++ b/src/boost/tools/quickbook/test/regen-gold.sh @@ -0,0 +1,47 @@ +#============================================================================== +# Copyright (c) 2017-2018 Daniel James +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +#============================================================================== + +#!/usr/bin/env bash + +cd $(dirname $0) + +cd .. +b2 -q || exit 1 +cd - + +find . -name "*.gold" | while read gold_file +do + flags="--debug" + + quickbook_file=$(echo $gold_file | sed 's/[.]gold/.quickbook/') + html_file=$(echo $gold_file | sed 's/[.]gold/.gold-html/') + + if [[ $gold_file =~ .*xinclude/.*-alt\.gold ]] + then + quickbook_file=$(echo $quickbook_file | sed 's/-alt\.quickbook/.quickbook/') + flags="$flags --xinclude-base xinclude/sub" + elif [[ $gold_file =~ .*xinclude/.*\.gold ]] + then + flags="$flags --xinclude-base xinclude/../.." + fi + + if [[ $gold_file =~ .*include/filename[-_]path.* ]] + then + flags="$flags -I include/sub" + fi + + if [[ $gold_file =~ .*command_line_macro.* ]] + then + flags="$flags -D__macro__=*bold* -D__empty__" + fi + + ../../../dist/bin/quickbook $quickbook_file $flags --output-file $gold_file || + echo "*** Error generating boostbook from $quickbook_file" + ../../../dist/bin/quickbook $quickbook_file $flags --output-file $html_file --output-format onehtml || + echo "*** Error generating html from $quickbook_file" +done diff --git a/src/boost/tools/quickbook/test/role-1_6.gold b/src/boost/tools/quickbook/test/role-1_6.gold new file mode 100644 index 000000000..bdb4b58ef --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_6.gold @@ -0,0 +1,9 @@ + + +
    + Quickbook Role Test + + Keyword [role] + +
    diff --git a/src/boost/tools/quickbook/test/role-1_6.gold-html b/src/boost/tools/quickbook/test/role-1_6.gold-html new file mode 100644 index 000000000..536c82745 --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_6.gold-html @@ -0,0 +1,12 @@ + + + + +

    + Quickbook Role Test +

    +

    + Keyword [role] +

    + + diff --git a/src/boost/tools/quickbook/test/role-1_6.quickbook b/src/boost/tools/quickbook/test/role-1_6.quickbook new file mode 100644 index 000000000..0982b9cd9 --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_6.quickbook @@ -0,0 +1,5 @@ +[article Quickbook Role Test +[quickbook 1.6] +] + +[role keyword Keyword] [role keyword] [role] diff --git a/src/boost/tools/quickbook/test/role-1_7-fail.quickbook b/src/boost/tools/quickbook/test/role-1_7-fail.quickbook new file mode 100644 index 000000000..b01d16e23 --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Quickbook Role Fail Test +[quickbook 1.7] +] + +[role] diff --git a/src/boost/tools/quickbook/test/role-1_7.gold b/src/boost/tools/quickbook/test/role-1_7.gold new file mode 100644 index 000000000..4cd7d5bb7 --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_7.gold @@ -0,0 +1,13 @@ + + +
    + Quickbook Role Test + + Keyword + + + road Red Three + Colours Red Red Road + +
    diff --git a/src/boost/tools/quickbook/test/role-1_7.gold-html b/src/boost/tools/quickbook/test/role-1_7.gold-html new file mode 100644 index 000000000..7e2eb0122 --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_7.gold-html @@ -0,0 +1,16 @@ + + + + +

    + Quickbook Role Test +

    +

    + Keyword +

    +

    + road Red Three + Colours Red Red Road +

    + + diff --git a/src/boost/tools/quickbook/test/role-1_7.quickbook b/src/boost/tools/quickbook/test/role-1_7.quickbook new file mode 100644 index 000000000..17bf44952 --- /dev/null +++ b/src/boost/tools/quickbook/test/role-1_7.quickbook @@ -0,0 +1,13 @@ +[article Quickbook Role Test +[quickbook 1.7] +] + +[role keyword Keyword] [role keyword] + +[template r red] +[template r2 road] +[r2] +[role [r] Red] [role [r]] +[role three-colours-[r] Three Colours Red] +[role [r]-[r2] Red Road] + diff --git a/src/boost/tools/quickbook/test/section-1_4.gold b/src/boost/tools/quickbook/test/section-1_4.gold new file mode 100644 index 000000000..07ba43a2c --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_4.gold @@ -0,0 +1,20 @@ + + +
    + Section Id 1.4 +
    + <link linkend="section_id_1_4.id_test1">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_4.id_test2">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_4.quickbook_section_no_id_test_1">Quickbook + section no id test 1</link> +
    +
    + <link linkend="section_id_1_4.___quickbook_section_no_id_test_2">++ Quickbook + section no id test 2</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/section-1_4.gold-html b/src/boost/tools/quickbook/test/section-1_4.gold-html new file mode 100644 index 000000000..948b8a9d7 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_4.gold-html @@ -0,0 +1,58 @@ + + + + +

    + Section Id 1.4 +

    + +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + Quickbook section no id test 1 +

    +
    +
    +
    +
    +

    + ++ Quickbook section no id test 2 +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/section-1_4.quickbook b/src/boost/tools/quickbook/test/section-1_4.quickbook new file mode 100644 index 000000000..6dd2beece --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_4.quickbook @@ -0,0 +1,12 @@ +[article Section Id 1.4 + [quickbook 1.4] +] + +[section:id_test1 Quickbook section id test] +[endsect] +[section :id_test2 Quickbook section id test] +[endsect:id_test2] +[section: Quickbook section no id test 1] +[endsect] +[section:++ Quickbook section no id test 2] +[endsect] diff --git a/src/boost/tools/quickbook/test/section-1_5-unclosed.gold b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold new file mode 100644 index 000000000..b86c556ec --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold @@ -0,0 +1,10 @@ + + +
    + Unclosed section +
    + <link linkend="unclosed_section.unclosed">Unclosed Section should be closed + with a warning</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html new file mode 100644 index 000000000..b756717b7 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html @@ -0,0 +1,27 @@ + + + + +

    + Unclosed section +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Unclosed Section should be closed with a warning +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook b/src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook new file mode 100644 index 000000000..49b70f491 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook @@ -0,0 +1,5 @@ +[article Unclosed section +[quickbook 1.5] +] + +[section:unclosed Unclosed Section should be closed with a warning] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/section-1_5.gold b/src/boost/tools/quickbook/test/section-1_5.gold new file mode 100644 index 000000000..13ec9eba2 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_5.gold @@ -0,0 +1,19 @@ + + +
    + Section Id 1.5 +
    + <link linkend="section_id_1_5.id_test1">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_5.id_test2">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_5.id_test3">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_5.___quickbook_section_no_id_test">++ Quickbook + section no id test</link> +
    +
    diff --git a/src/boost/tools/quickbook/test/section-1_5.gold-html b/src/boost/tools/quickbook/test/section-1_5.gold-html new file mode 100644 index 000000000..6089cf1ac --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_5.gold-html @@ -0,0 +1,57 @@ + + + + +

    + Section Id 1.5 +

    + +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + ++ Quickbook section no id test +

    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/section-1_5.quickbook b/src/boost/tools/quickbook/test/section-1_5.quickbook new file mode 100644 index 000000000..223a7e6c8 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_5.quickbook @@ -0,0 +1,12 @@ +[article Section Id 1.5 + [quickbook 1.5] +] + +[section:id_test1 Quickbook section id test] +[endsect] +[section :id_test2 Quickbook section id test] +[endsect:id_test2] +[section: id_test3 Quickbook section id test] +[endsect] +[section:++ Quickbook section no id test] +[endsect] diff --git a/src/boost/tools/quickbook/test/section-1_7.gold b/src/boost/tools/quickbook/test/section-1_7.gold new file mode 100644 index 000000000..02cb4c7d1 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_7.gold @@ -0,0 +1,32 @@ + + +
    + Section Id 1.7 +
    + <link linkend="section_id_1_7.quickbook_section_no_id_test">Quickbook + section no id test</link> +
    +
    + <link linkend="section_id_1_7.id_test1">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_7.id_test2">Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_7.id_test3_quickbook_section_id_te">id_test3 + Quickbook section id test</link> +
    +
    + <link linkend="section_id_1_7.--">Quickbook section odd id test</link> +
    +
    + <link linkend="section_id_1_7.sect-abc">Section with template in id</link> +
    + + +
    diff --git a/src/boost/tools/quickbook/test/section-1_7.gold-html b/src/boost/tools/quickbook/test/section-1_7.gold-html new file mode 100644 index 000000000..0d44ad8a2 --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_7.gold-html @@ -0,0 +1,100 @@ + + + + +

    + Section Id 1.7 +

    + +
    +

    + Quickbook section no id test +

    +
    +
    +
    +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + Quickbook section id test +

    +
    +
    +
    +
    +

    + id_test3 Quickbook section id test +

    +
    +
    +
    +
    +

    + Quickbook section odd id test +

    +
    +
    +
    +
    +

    + Section with template in id +

    +
    +
    +
    + + + + diff --git a/src/boost/tools/quickbook/test/section-1_7.quickbook b/src/boost/tools/quickbook/test/section-1_7.quickbook new file mode 100644 index 000000000..9c8baeb0c --- /dev/null +++ b/src/boost/tools/quickbook/test/section-1_7.quickbook @@ -0,0 +1,23 @@ +[article Section Id 1.7 + [quickbook 1.7] +] + +[section Quickbook section no id test] +[endsect] +[section:id_test1 Quickbook section id test] +[endsect] +[section :id_test2 Quickbook section id test] +[endsect:id_test2] +[section: id_test3 Quickbook section id test] +[endsect] +[section:-- Quickbook section odd id test] +[endsect] + +[template thing[] abc] +[section:sect-[thing] Section with template in id] +[endsect] + +[section [link section_id_1_7.id_test1 Link in title]] +[endsect] +[section [link section_id_1_7.id_test1 Link] in title] +[endsect] diff --git a/src/boost/tools/quickbook/test/simple_markup-1_5.gold b/src/boost/tools/quickbook/test/simple_markup-1_5.gold new file mode 100644 index 000000000..4d044ceb4 --- /dev/null +++ b/src/boost/tools/quickbook/test/simple_markup-1_5.gold @@ -0,0 +1,58 @@ + + +
    + Simple Markup Test +
    + <link linkend="simple_markup_test.simple_markup">Simple Markup</link> + + italic bold underline teletype + + + //not italic// **not bold** __not underline__ ==not teletype== + + + odd__ edge case + + + not__underlined__hopefully + + + (bold) und/er/lined + + + all/italic * not bold* + + + /not italic bold + + + not_underlined_ + + + _Should not underline escaped markup_. _or this escaped_ markup form. + + + Matti Meik\u00E4l\u00E4inen + + + replaced + + + replaced + + + _mac\ ro_ + + + italic\ + + + These shouldn't be interepted as markup: == // ** + + + < \< \\< + +
    +
    diff --git a/src/boost/tools/quickbook/test/simple_markup-1_5.gold-html b/src/boost/tools/quickbook/test/simple_markup-1_5.gold-html new file mode 100644 index 000000000..3e07c9b81 --- /dev/null +++ b/src/boost/tools/quickbook/test/simple_markup-1_5.gold-html @@ -0,0 +1,75 @@ + + + + +

    + Simple Markup Test +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Simple Markup +

    +
    +

    + italic bold + underline teletype +

    +

    + //not italic// **not bold** __not underline__ ==not teletype== +

    +

    + odd__ edge case +

    +

    + not__underlined__hopefully +

    +

    + (bold) und/er/lined +

    +

    + all/italic * not bold* +

    +

    + /not italic bold +

    +

    + not_underlined_ +

    +

    + _Should not underline escaped markup_. _or this escaped_ markup form. +

    +

    + Matti Meik\u00E4l\u00E4inen +

    +

    + replaced +

    +

    + replaced +

    +

    + _mac\ ro_ +

    +

    + italic\ +

    +

    + These shouldn't be interepted as markup: == // ** +

    +

    + < \< \\< +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/simple_markup-1_5.quickbook b/src/boost/tools/quickbook/test/simple_markup-1_5.quickbook new file mode 100644 index 000000000..c8277fb32 --- /dev/null +++ b/src/boost/tools/quickbook/test/simple_markup-1_5.quickbook @@ -0,0 +1,42 @@ +[article Simple Markup Test +[quickbook 1.5] +] + +[def _macro_ replaced] + +[section Simple Markup] + +/italic/ *bold* _underline_ =teletype= + +//not italic// **not bold** __not underline__ ==not teletype== + +_odd__ edge case_ + +not__underlined__hopefully + +(*bold*) _und/er/lined_ + +/all/italic/ * not bold* + +/not italic [@http://www.boost.org/ *bold*] + +not_underlined_ + +_Should not underline '''escaped''' markup_. +_or this '''escaped_ markup''' form. + +=Matti Meik\u00E4l\u00E4inen= + +=_macro_= + +__macro__ + +=_mac\ ro_= + +/italic\/ + +These shouldn't be interepted as markup: == // ** + +=<= =\<= =\\<= + +[endsect] diff --git a/src/boost/tools/quickbook/test/snippets/Jamfile.v2 b/src/boost/tools/quickbook/test/snippets/Jamfile.v2 new file mode 100644 index 000000000..6765dff9e --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/Jamfile.v2 @@ -0,0 +1,18 @@ +# +# Copyright (c) 2011 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/test/snippets ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +test-suite quickbook.test : + [ quickbook-test pass_thru ] + [ quickbook-test unbalanced_snippet1-1_5 ] + [ quickbook-error-test unbalanced_snippet1-1_6-fail ] + [ quickbook-error-test unbalanced_snippet2-1_6-fail ] + ; diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.cpp b/src/boost/tools/quickbook/test/snippets/pass_thru.cpp new file mode 100644 index 000000000..c5c120a17 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.cpp @@ -0,0 +1,33 @@ +// clang-format off + +//[foo_cpp_copyright +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +//] + +//[foo_cpp +struct Foo{ + + Foo()//=; +//<- + : x( 10 ) + {} +//-> + +//<- + int x; +//-> +}; + +/*= +int main() +{ + Foo x; +} +*/ +//] diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.gold b/src/boost/tools/quickbook/test/snippets/pass_thru.gold new file mode 100644 index 000000000..dde5deb19 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.gold @@ -0,0 +1,35 @@ + + +
    + Pass thru test + +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + + + +struct Foo{ + + Foo(); + +}; + + +int main() +{ + Foo x; +} + + + +def foo: + print('foo') + + +
    diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html b/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html new file mode 100644 index 000000000..ba0237ddb --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html @@ -0,0 +1,38 @@ + + + + +

    + Pass thru test +

    +

    +

    /*=============================================================================
    +    Copyright (c) 2011 Daniel James
    +
    +    Use, modification and distribution is subject to the Boost Software
    +    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    +    http://www.boost.org/LICENSE_1_0.txt)
    +=============================================================================*/
    +
    +

    +

    +

    struct Foo{
    +
    +  Foo();
    +
    +};
    +
    +
    +int main()
    +{
    +    Foo x;
    +}
    +
    +

    +

    +

    def foo:
    +    print('foo')
    +
    +

    + + diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.py b/src/boost/tools/quickbook/test/snippets/pass_thru.py new file mode 100644 index 000000000..412cee420 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.py @@ -0,0 +1,13 @@ +# Copyright (c) 2011 Daniel James +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +#[foo_py +def foo: + #=print('foo') + #<- + print('bar') + #-> +#] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook b/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook new file mode 100644 index 000000000..7e8319478 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook @@ -0,0 +1,12 @@ +[article Pass thru test +[quickbook 1.5] +] + +[import pass_thru.cpp] +[import pass_thru.py] + +[foo_cpp_copyright] + +[foo_cpp] + +[foo_py] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold new file mode 100644 index 000000000..1f9115c0f --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold @@ -0,0 +1,10 @@ + + +
    + Unbalanced snippet fail test 1 + +int main() {} + + +
    diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html new file mode 100644 index 000000000..af90d9d35 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html @@ -0,0 +1,13 @@ + + + + +

    + Unbalanced snippet fail test 1 +

    +

    +

    int main() {}
    +
    +

    + + diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook new file mode 100644 index 000000000..7fdde6afd --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook @@ -0,0 +1,8 @@ +[article Unbalanced snippet fail test 1 +[quickbook 1.5] +] + +[import unbalanced_snippet1.cpp] +[import unbalanced_snippet2.cpp] + +[unclosed] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook new file mode 100644 index 000000000..c2fb98ec0 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook @@ -0,0 +1,7 @@ +[article Unbalanced snippet fail test 1 +[quickbook 1.6] +] + +[import unbalanced_snippet1.cpp] + +[unclosed] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp new file mode 100644 index 000000000..ee5983912 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp @@ -0,0 +1,11 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +//[unclosed + +int main() {} diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook new file mode 100644 index 000000000..a06a16448 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook @@ -0,0 +1,5 @@ +[article Unbalanced snippet fail test 2 +[quickbook 1.6] +] + +[import unbalanced_snippet2.cpp] diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp new file mode 100644 index 000000000..b2fcb247b --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp @@ -0,0 +1,9 @@ +//] + +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ diff --git a/src/boost/tools/quickbook/test/source_mode-1_7.gold b/src/boost/tools/quickbook/test/source_mode-1_7.gold new file mode 100644 index 000000000..2cc454a6d --- /dev/null +++ b/src/boost/tools/quickbook/test/source_mode-1_7.gold @@ -0,0 +1,63 @@ + + +
    + Source Mode Test + + + + + +int main() {} + + +void foo() {} + + + + + +Plain text... + + int main() {} but plain + text. + + + + + int main() {} + + + + + int main() {} + + + + + int main() {} + + + + + int main() {} and int main() + {} should both be C++ highlighted. int + main() {} shouldn't be, but int + main() {} should. + + + int main() {}. Not highlighted: + int main() {}. + +
    + <link linkend="source_mode_test.cpp">C++ section</link> +int main() {} +
    +
    diff --git a/src/boost/tools/quickbook/test/source_mode-1_7.gold-html b/src/boost/tools/quickbook/test/source_mode-1_7.gold-html new file mode 100644 index 000000000..f5b16981c --- /dev/null +++ b/src/boost/tools/quickbook/test/source_mode-1_7.gold-html @@ -0,0 +1,80 @@ + + + + +

    + Source Mode Test +

    +
    +

    + Table of contents +

    + +
    +
    + + + + + + + +
    +
    int main() {}
    +
    +
    void foo() {}
    +
    +
    +
    Plain text...
    +

    + int main() {} but plain + text. +

    +
      +
    • +
      + int main() {} +
      +
    • +
    • +
      + int main() {} +
      +
    • +
    • +
      + int main() {} +
      +
    • +
    +

    + int main() {} and int main() + {} should both be C++ highlighted. int + main() {} shouldn't be, but int + main() {} + should. +

    +

    + int main() {}. Not highlighted: + int main() {}. +

    +
    +

    + C++ section +

    +
    +
    int main() {}
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/source_mode-1_7.quickbook b/src/boost/tools/quickbook/test/source_mode-1_7.quickbook new file mode 100644 index 000000000..9388867c8 --- /dev/null +++ b/src/boost/tools/quickbook/test/source_mode-1_7.quickbook @@ -0,0 +1,24 @@ +[quickbook 1.7] +[source-mode teletype] +[article Source Mode Test] + +[!c++][table [[``int main() {}``][``void foo() {}``]]] +``Plain text...`` + +[!c++]`int main() {}` but `plain text`. + +[!c++] +* `int main() {}` +* `int main() {}` +* [teletype] `int main() {}` [/ shouldn't be highlighted] + +[!c++] +`int main() {}` and `int main() {}` should both be C++ highlighted. +[!teletype]`int main() {}` shouldn't be, but `int main() {}` should. + +[!c++] `int main() {}`. Not highlighted: `int main() {}`. + +[!c++] +[section:cpp C++ section] +``int main() {}`` +[endsect] diff --git a/src/boost/tools/quickbook/test/src/text_diff.cpp b/src/boost/tools/quickbook/test/src/text_diff.cpp new file mode 100644 index 000000000..cee521173 --- /dev/null +++ b/src/boost/tools/quickbook/test/src/text_diff.cpp @@ -0,0 +1,96 @@ +// +// Copyright (c) 2005 João Abecasis +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include +#include +#include +#include + +#include +#include + +namespace spirit = boost::spirit::classic; + +typedef std::istream_iterator iterator; +typedef spirit::scanner scanner; + +int main(int argc, char* argv[]) +{ + std::vector args; + bool usage_error = false; + + for (int i = 1; i < argc; ++i) { + if (std::strncmp(argv[i], "--", 2) == 0) { + if (strcmp(argv[i], "--strict") == 0) { + // Ignore --strict because the build file accidentally + // uses it. Why yes, this is a horrible hack. + } + else { + std::cerr << "ERROR: Invalid flag: " << argv[i] << std::endl; + usage_error = true; + } + } + else { + args.push_back(argv[i]); + } + } + + if (!usage_error && args.size() != 2) { + std::cerr << "ERROR: Wrong number of arguments." << std::endl; + usage_error = true; + } + + if (usage_error) { + std::cout << "Usage:\n\t" << argv[0] << " file1 file2" << std::endl; + return 1; + } + + std::ifstream file1(args[0], std::ios_base::binary | std::ios_base::in), + file2(args[1], std::ios_base::binary | std::ios_base::in); + + if (!file1 || !file2) { + std::cerr << "ERROR: Unable to open one or both files." << std::endl; + return 2; + } + + file1.unsetf(std::ios_base::skipws); + file2.unsetf(std::ios_base::skipws); + + iterator iter_file1(file1), iter_file2(file2); + + scanner scan1(iter_file1, iterator()), scan2(iter_file2, iterator()); + + std::size_t line = 1, column = 1; + + while (!scan1.at_end() && !scan2.at_end()) { + if (spirit::eol_p.parse(scan1)) { + if (!spirit::eol_p.parse(scan2)) { + std::cout << "Files differ at line " << line << ", column " + << column << '.' << std::endl; + return 3; + } + + ++line, column = 1; + continue; + } + + if (*scan1 != *scan2) { + std::cout << "Files differ at line " << line << ", column " + << column << '.' << std::endl; + return 4; + } + + ++scan1, ++scan2, ++column; + } + + if (scan1.at_end() != scan2.at_end()) { + std::cout << "Files differ in length." << std::endl; + return 5; + } +} diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold new file mode 100644 index 000000000..c062eaab8 --- /dev/null +++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold @@ -0,0 +1,9 @@ + + +
    + Stray close bracket 1.1 + + X]Y + +
    diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html new file mode 100644 index 000000000..094ac4655 --- /dev/null +++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html @@ -0,0 +1,12 @@ + + + + +

    + Stray close bracket 1.1 +

    +

    + X]Y +

    + + diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook new file mode 100644 index 000000000..3866bdb7c --- /dev/null +++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook @@ -0,0 +1,3 @@ +[article Stray close bracket 1.1] + +X]Y diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook b/src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook new file mode 100644 index 000000000..6798b679c --- /dev/null +++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook @@ -0,0 +1,5 @@ +[article Stray close bracket 1.1 + [quickbook 1.7] +] + +X]Y diff --git a/src/boost/tools/quickbook/test/stub.c b/src/boost/tools/quickbook/test/stub.c new file mode 100644 index 000000000..f7f83cfe8 --- /dev/null +++ b/src/boost/tools/quickbook/test/stub.c @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +/*` +This should appear when =stub.c= is included. + +[foo_c] +*/ + +/*[foo_c */ + /*` + This is the C [*['foo]] function. + + This description can have paragraphs... + + * lists + * etc. + + And any quickbook block markup. + */ +char* foo() +{ + // return 'em, foo man! + return "foo"; +} +/*]*/ diff --git a/src/boost/tools/quickbook/test/stub.cpp b/src/boost/tools/quickbook/test/stub.cpp new file mode 100644 index 000000000..ef0f03432 --- /dev/null +++ b/src/boost/tools/quickbook/test/stub.cpp @@ -0,0 +1,86 @@ +/*============================================================================= + Copyright (c) 2006 Joel de Guzman + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +// clang-format off + +/*` This should appear when =stub.cpp= is included. */ + +#include + +//[ bar +//` This is the [*/bar/] function +std::string bar() +{ + // return 'em, bar man! + return "bar"; +} +/*` +Some trailing text here +*/ +//] + +//[ foo + /*` + This is the [*['foo]] function. + + This description can have paragraphs... + + * lists + * etc. + + And any quickbook block markup. + */ +std::string foo() +{ + // return 'em, foo man! + return "foo"; +} +//] + +//[ foo_bar +std::string foo_bar() /*< The /Mythical/ FooBar. + See [@http://en.wikipedia.org/wiki/Foobar Foobar for details] >*/ +{ + return "foo-bar"; /*< return 'em, foo-bar man! >*/ +} +//] + +//[ class_ +class x +{ +public: + + /*<< Constructor >>*/ + x() : n(0) + { + } + + /*<< Destructor >>*/ + ~x() + { + } + + /*<< Get the `n` member variable >>*/ + int get() const + { + return n; /*<- this will be ignored by quickbook ->*/ + } + + /*<< Set the `n` member variable >>*/ + void set(int n_) + { + n = n_; + } +//<- this will be ignored by quickbook +private: + + int n; +//-> +}; +//] diff --git a/src/boost/tools/quickbook/test/stub.py b/src/boost/tools/quickbook/test/stub.py new file mode 100644 index 000000000..48ba87e0c --- /dev/null +++ b/src/boost/tools/quickbook/test/stub.py @@ -0,0 +1,27 @@ +# Copyright 2009 Daniel James +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +#` This should appear when =stub.py= is included. + +#[foo_py +"""` + This is the Python [*['foo]] function. + + This description can have paragraphs... + + * lists + * etc. + + And any quickbook block markup. +""" + +def foo(): + # return 'em, foo man! + return "foo" + +#] + +print foo() \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/svg-1_1.gold b/src/boost/tools/quickbook/test/svg-1_1.gold new file mode 100644 index 000000000..a8a49b06a --- /dev/null +++ b/src/boost/tools/quickbook/test/svg-1_1.gold @@ -0,0 +1,18 @@ + + +
    + SVG test + + + + open_clipart_library_logo + + + + missing_image + + + +
    diff --git a/src/boost/tools/quickbook/test/svg-1_1.gold-html b/src/boost/tools/quickbook/test/svg-1_1.gold-html new file mode 100644 index 000000000..643e7762a --- /dev/null +++ b/src/boost/tools/quickbook/test/svg-1_1.gold-html @@ -0,0 +1,14 @@ + + + + +

    + SVG test +

    +

    + [] [] +

    + + diff --git a/src/boost/tools/quickbook/test/svg-1_1.quickbook b/src/boost/tools/quickbook/test/svg-1_1.quickbook new file mode 100644 index 000000000..71b811a8c --- /dev/null +++ b/src/boost/tools/quickbook/test/svg-1_1.quickbook @@ -0,0 +1,4 @@ +[article SVG test] + +[$images/open_clipart_library_logo.svg] +[$images/missing_image.svg] diff --git a/src/boost/tools/quickbook/test/table-1_3.gold b/src/boost/tools/quickbook/test/table-1_3.gold new file mode 100644 index 000000000..fcda21570 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_3.gold @@ -0,0 +1,351 @@ + + +
    + Table 1.3 + + Table 2 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + + + + + + Heading + + + + + + + + + cell + + + + + + + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title [/ ] containing a comment + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + [[Title]] + + + + + + Heading + + + + + + + + + cell + + + + + +
    +
    + <link linkend="table_tests.section1">Section 1</link> + + A & B + + + + + + A + + + + + B + + + + + + + + + a + + + + + b + + + + + +
    + + Empty Table + + + + +
    + + Table with an empty cell + + + + + + x + + + + + +
    + + Indentation + + + + + + Header 1. Paragraph 1 + + + Header 1. Paragraph 2 + + + + + Header 2 + + + + + + + + + Row 1. Cell 1. + + + + + Row 1. Cell 2. + + + Row 1. Cell 2. Paragraph 2. + + + + + +
    + + Nested Tables + + + + + + Header 1 + + + + + Header 2 + + + + + + + +
    + Inner Table + + + + + + 1.1 + + + + + 1.2 + + + + + + + + + 2.1 + + + + + 2.2 + + + + + +
    + + + + + + Something. + + + + + + + + + Table with anchors + + + + + + a + + + + + + + + + b + + + + + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/table-1_3.gold-html b/src/boost/tools/quickbook/test/table-1_3.gold-html new file mode 100644 index 000000000..99a126a92 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_3.gold-html @@ -0,0 +1,368 @@ + + + + +

    + Table 1.3 +

    +
    +

    + Table of contents +

    + +
    +
    + + + + + + + + + + + + +
    Table 2
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title [/ ] containing a comment
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    [[Title]]
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    +

    + Section 1 +

    +
    +
    + + + + + + + + + + + + + + +
    A & B
    +

    + A +

    +
    +

    + B +

    +
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    + + + + +
    Empty Table
    +
    +
    + + + + + + + +
    Table with an empty cell
    +

    + x +

    +
    +
    +
    + + + + + + + + + + + + + + +
    Indentation
    +

    + Header 1. Paragraph 1 +

    +

    + Header 1. Paragraph 2 +

    +
    +

    + Header 2 +

    +
    +

    + Row 1. Cell 1. +

    +
    +

    + Row 1. Cell 2. +

    +

    + Row 1. Cell 2. Paragraph 2. +

    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nested Tables
    +

    + Header 1 +

    +
    +

    + Header 2 +

    +
    +
    + + + + + + + + + + + + + + +
    Inner Table
    +

    + 1.1 +

    +
    +

    + 1.2 +

    +
    +

    + 2.1 +

    +
    +

    + 2.2 +

    +
    +
    +
    +

    + Something. +

    +
    +
    + +
    + + + + + + + + + + + + +
    Table with anchors
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/table-1_3.quickbook b/src/boost/tools/quickbook/test/table-1_3.quickbook new file mode 100644 index 000000000..1dc048911 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_3.quickbook @@ -0,0 +1,113 @@ +[article Table 1.3 + [quickbook 1.3] + [id table_tests] +] + +[table Table 2 + [[Heading]] + [[cell]] +] + +[table + [[Heading]] + [[cell]] +] + +[table [/ Comment?] Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] Title + [[Heading]] + [[cell]] +] + +[table Title [/ ] containing a comment + [[Heading]] + [[cell]] +] + +[/ These two might be considered to be a bug. ] + +[table [/ Multi line +comment] + Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] + [[Title]] + [[Heading]] + [[cell]] +] + +[section:section1 Section 1] + +[table A & B + [[A][B]] + [[a][b]] +] + +[table Empty Table +] + +[table Table with an empty cell +[[x]]] + +[table Indentation + [ + [ + Header 1. Paragraph 1 + + Header 1. Paragraph 2 + ] + [ + Header 2 + ] + ] + [ + [ + Row 1. Cell 1. + ] + [ + Row 1. Cell 2. + + Row 1. Cell 2. Paragraph 2. + ] + ] +] + +[table Nested Tables + [ + [ + Header 1 + ] + [ + Header 2 + ] + ] + [ + [ + [table Inner Table + [[1.1][1.2]] + [[2.1][2.2]] + ] + ] + ] + [ + [ + Something. + ] + ] +] + +[#id1] +[table Table with anchors +[[[#id2]a[#id3]]][[b]] +] + +[endsect] diff --git a/src/boost/tools/quickbook/test/table-1_5.gold b/src/boost/tools/quickbook/test/table-1_5.gold new file mode 100644 index 000000000..838a400fa --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_5.gold @@ -0,0 +1,442 @@ + + +
    + Table 1.5 + + Table 1 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Table 2 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + + + + + + Heading + + + + + + + + + cell + + + + + + + + + + + + + Heading + + + + + + + + + cell + + + + + + + + -table5- + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title [/ ] containing a comment + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + [[Title]] + + + + + + Heading + + + + + + + + + cell + + + + + +
    +
    + <link linkend="table_tests.section1">Section 1</link> + + Table 1 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + A & B + + + + + + A + + + + + B + + + + + + + + + a + + + + + b + + + + + +
    + + Empty Table + + + + +
    + + Table with an empty cell + + + + + + x + + + + + +
    + + Indentation + + + + + + Header 1. Paragraph 1 + + + Header 1. Paragraph 2 + + + + + Header 2 + + + + + + + + + Row 1. Cell 1. + + + + + Row 1. Cell 2. + + + Row 1. Cell 2. Paragraph 2. + + + + + +
    + + Nested Tables + + + + + + Header 1 + + + + + Header 2 + + + + + + + +
    + Inner Table + + + + + + 1.1 + + + + + 1.2 + + + + + + + + + 2.1 + + + + + 2.2 + + + + + +
    + + + + + + Something. + + + + + + + + + Table with anchors + + + + + + a + + + + + + + + + b + + + + + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/table-1_5.gold-html b/src/boost/tools/quickbook/test/table-1_5.gold-html new file mode 100644 index 000000000..49c999883 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_5.gold-html @@ -0,0 +1,459 @@ + + + + +

    + Table 1.5 +

    +
    +

    + Table of contents +

    + +
    +
    + + + + + + + + + + + + +
    Table 1
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Table 2
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    -table5-
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title [/ ] containing a comment
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    [[Title]]
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    +

    + Section 1 +

    +
    +
    + + + + + + + + + + + + +
    Table 1
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + + + +
    A & B
    +

    + A +

    +
    +

    + B +

    +
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    + + + + +
    Empty Table
    +
    +
    + + + + + + + +
    Table with an empty cell
    +

    + x +

    +
    +
    +
    + + + + + + + + + + + + + + +
    Indentation
    +

    + Header 1. Paragraph 1 +

    +

    + Header 1. Paragraph 2 +

    +
    +

    + Header 2 +

    +
    +

    + Row 1. Cell 1. +

    +
    +

    + Row 1. Cell 2. +

    +

    + Row 1. Cell 2. Paragraph 2. +

    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nested Tables
    +

    + Header 1 +

    +
    +

    + Header 2 +

    +
    +
    + + + + + + + + + + + + + + +
    Inner Table
    +

    + 1.1 +

    +
    +

    + 1.2 +

    +
    +

    + 2.1 +

    +
    +

    + 2.2 +

    +
    +
    +
    +

    + Something. +

    +
    +
    + +
    + + + + + + + + + + + + +
    Table with anchors
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/table-1_5.quickbook b/src/boost/tools/quickbook/test/table-1_5.quickbook new file mode 100644 index 000000000..7ab15b1ac --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_5.quickbook @@ -0,0 +1,133 @@ +[article Table 1.5 + [quickbook 1.5] + [id table_tests] +] + +[table:table1 Table 1 + [[Heading]] + [[cell]] +] + +[table Table 2 + [[Heading]] + [[cell]] +] + +[table + [[Heading]] + [[cell]] +] + +[table:table4 + [[Heading]] + [[cell]] +] + +[table:-table5- + [[Heading]] + [[cell]] +] + +[table [/ Comment?] Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] Title + [[Heading]] + [[cell]] +] + +[table Title [/ ] containing a comment + [[Heading]] + [[cell]] +] + +[/ These two might be considered to be a bug. ] + +[table [/ Multi line +comment] + Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] + [[Title]] + [[Heading]] + [[cell]] +] + +[section:section1 Section 1] + +[table:table1 Table 1 + [[Heading]] + [[cell]] +] + +[table A & B + [[A][B]] + [[a][b]] +] + +[table Empty Table +] + +[table Table with an empty cell +[[x]]] + +[table Indentation + [ + [ + Header 1. Paragraph 1 + + Header 1. Paragraph 2 + ] + [ + Header 2 + ] + ] + [ + [ + Row 1. Cell 1. + ] + [ + Row 1. Cell 2. + + Row 1. Cell 2. Paragraph 2. + ] + ] +] + +[table Nested Tables + [ + [ + Header 1 + ] + [ + Header 2 + ] + ] + [ + [ + [table Inner Table + [[1.1][1.2]] + [[2.1][2.2]] + ] + ] + ] + [ + [ + Something. + ] + ] +] + +[#id1] +[table Table with anchors +[[[#id2]a[#id3]]][[b]] +] + +[endsect] diff --git a/src/boost/tools/quickbook/test/table-1_6.gold b/src/boost/tools/quickbook/test/table-1_6.gold new file mode 100644 index 000000000..3abe6b0d2 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_6.gold @@ -0,0 +1,478 @@ + + +
    + Table 1.6 + + Table 1 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Table 2 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + + + + + + Heading + + + + + + + + + cell + + + + + + + + + + + + + Heading + + + + + + + + + cell + + + + + + + + -table5- + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title containing a comment + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + + + + Title on multiple lines with <emphasis role="bold">bold</emphasis> text? + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + +
    +
    + <link linkend="table_tests.section1">Section 1</link> + + Table 1 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + A & B + + + + + + A + + + + + B + + + + + + + + + a + + + + + b + + + + + +
    + + Empty Table + + + + +
    + + Table with an empty cell + + + + + + x + + + + + +
    + + Indentation + + + + + + Header 1. Paragraph 1 + + + Header 1. Paragraph 2 + + + + + Header 2 + + + + + + + + + Row 1. Cell 1. + + + + + Row 1. Cell 2. + + + Row 1. Cell 2. Paragraph 2. + + + + + +
    + + Nested Tables + + + + + + Header 1 + + + + + Header 2 + + + + + + + +
    + Inner Table + + + + + + 1.1 + + + + + 1.2 + + + + + + + + + 2.1 + + + + + 2.2 + + + + + +
    + + + + + + Something. + + + + + + + + + Table with anchors + + + + + + a + + + + + + + + + b + + + + + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/table-1_6.gold-html b/src/boost/tools/quickbook/test/table-1_6.gold-html new file mode 100644 index 000000000..83690c32e --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_6.gold-html @@ -0,0 +1,496 @@ + + + + +

    + Table 1.6 +

    +
    +

    + Table of contents +

    + +
    +
    + + + + + + + + + + + + +
    Table 1
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Table 2
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    -table5-
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title containing a comment
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +
    +
    + + + + + + + + + + + + + + + +
    Title on multiple lines with bold + text?
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +
    +
    +

    + Section 1 +

    +
    +
    + + + + + + + + + + + + +
    Table 1
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + + + +
    A & B
    +

    + A +

    +
    +

    + B +

    +
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    + + + + +
    Empty Table
    +
    +
    + + + + + + + +
    Table with an empty cell
    +

    + x +

    +
    +
    +
    + + + + + + + + + + + + + + +
    Indentation
    +

    + Header 1. Paragraph 1 +

    +

    + Header 1. Paragraph 2 +

    +
    +

    + Header 2 +

    +
    +

    + Row 1. Cell 1. +

    +
    +

    + Row 1. Cell 2. +

    +

    + Row 1. Cell 2. Paragraph 2. +

    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nested Tables
    +

    + Header 1 +

    +
    +

    + Header 2 +

    +
    +
    + + + + + + + + + + + + + + +
    Inner Table
    +

    + 1.1 +

    +
    +

    + 1.2 +

    +
    +

    + 2.1 +

    +
    +

    + 2.2 +

    +
    +
    +
    +

    + Something. +

    +
    +
    + +
    + + + + + + + + + + + + +
    Table with anchors
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/table-1_6.quickbook b/src/boost/tools/quickbook/test/table-1_6.quickbook new file mode 100644 index 000000000..332e07060 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_6.quickbook @@ -0,0 +1,134 @@ +[article Table 1.6 + [quickbook 1.6] + [id table_tests] +] + +[table:table1 Table 1 [[Heading]][[cell]]] + +[table Table 2 + [[Heading]] + [[cell]] +] + +[table + [[Heading]] + [[cell]] +] + +[table:table4 + [[Heading]] + [[cell]] +] + +[table:-table5- + [[Heading]] + [[cell]] +] + +[table [/ Comment?] Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] Title + [[Heading]] + [[cell]] +] + +[table Title [/ ] containing a comment + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] + Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] + [[Heading]] + [[Cell 1]] + [[Cell 2]] +] + +[table Title on multiple + lines with *bold* text? + [[Heading]] + [[Cell 1]] + [[Cell 2]] +] + +[section:section1 Section 1] + +[table:table1 Table 1 + [[Heading]] + [[cell]] +] + +[table A & B + [[A][B]] + [[a][b]] +] + +[table Empty Table] + +[table Table with an empty cell +[[x]]] + +[table Indentation + [ + [ + Header 1. Paragraph 1 + + Header 1. Paragraph 2 + ] + [ + Header 2 + ] + ] + [ + [ + Row 1. Cell 1. + ] + [ + Row 1. Cell 2. + + Row 1. Cell 2. Paragraph 2. + ] + ] +] + +[table Nested Tables + [ + [ + Header 1 + ] + [ + Header 2 + ] + ] + [ + [ + [table Inner Table + [[1.1][1.2]] + [[2.1][2.2]] + ] + ] + ] + [ + [ + Something. + ] + ] +] + +[#id1] +[table Table with anchors +[[[#id2]a[#id3]]][[b]] +] + +[endsect] diff --git a/src/boost/tools/quickbook/test/table-1_7.gold b/src/boost/tools/quickbook/test/table-1_7.gold new file mode 100644 index 000000000..6b8eafabf --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_7.gold @@ -0,0 +1,520 @@ + + +
    + Table 1.7 + + Table 1 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Table 2 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + + + + + + Heading + + + + + + + + + cell + + + + + + + + + + + + + Heading + + + + + + + + + cell + + + + + + + + + + + + + Heading + + + + + + + + + cell + + + + + + + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title containing a comment + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + Title + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + + + + Title on multiple lines with <emphasis role="bold">bold</emphasis> text? + + + + + + Heading + + + + + + + + + Cell 1 + + + + + + + Cell 2 + + + + + +
    +
    + <link linkend="table_tests.section1">Section 1</link> + + Table 1 + + + + + + Heading + + + + + + + + + cell + + + + + +
    + + A & B + + + + + + A + + + + + B + + + + + + + + + a + + + + + b + + + + + +
    + + Empty Table + + + + +
    + + Table with an empty cell + + + + + + x + + + + + +
    + + Indentation + + + + + + Header 1. Paragraph 1 + + + Header 1. Paragraph 2 + + + + + Header 2 + + + + + + + + + Row 1. Cell 1. + + + + + Row 1. Cell 2. + + + Row 1. Cell 2. Paragraph 2. + + + + + + + Row 2. Cell 1. + + + + + Row 2. Cell 1. List item 1. + + + + + Row 2. Cell 1. List item 2. + + + + + + + Row 2. Cell 2. + + + + + Row 2. Cell 2. List item 1. + + + + + Row 2. Cell 2. List item 2. + + + + + + + +
    + + Nested Tables + + + + + + Header 1 + + + + + Header 2 + + + + + + + +
    + Inner Table + + + + + + 1.1 + + + + + 1.2 + + + + + + + + + 2.1 + + + + + 2.2 + + + + + +
    + + + + + + Something. + + + + + + + + + Table with anchors + + + + + + a + + + + + + + + + b + + + + + +
    + + Table with template id + + + + +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/table-1_7.gold-html b/src/boost/tools/quickbook/test/table-1_7.gold-html new file mode 100644 index 000000000..90dc27274 --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_7.gold-html @@ -0,0 +1,538 @@ + + + + +

    + Table 1.7 +

    +
    +

    + Table of contents +

    + +
    +
    + + + + + + + + + + + + +
    Table 1
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Table 2
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title containing a comment
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + +
    Title
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + + + +
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +
    +
    + + + + + + + + + + + + + + + +
    Title on multiple lines with bold + text?
    +

    + Heading +

    +
    +

    + Cell 1 +

    +
    +

    + Cell 2 +

    +
    +
    +
    +

    + Section 1 +

    +
    +
    + + + + + + + + + + + + +
    Table 1
    +

    + Heading +

    +
    +

    + cell +

    +
    +
    +
    + + + + + + + + + + + + + + +
    A & B
    +

    + A +

    +
    +

    + B +

    +
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    + + + + +
    Empty Table
    +
    +
    + + + + + + + +
    Table with an empty cell
    +

    + x +

    +
    +
    +
    + + + + + + + + + + + + + + + + + + +
    Indentation
    +

    + Header 1. Paragraph 1 +

    +

    + Header 1. Paragraph 2 +

    +
    +

    + Header 2 +

    +
    +

    + Row 1. Cell 1. +

    +
    +

    + Row 1. Cell 2. +

    +

    + Row 1. Cell 2. Paragraph 2. +

    +
    +

    + Row 2. Cell 1. +

    +
      +
    • +
      + Row 2. Cell 1. List item 1. +
      +
    • +
    • +
      + Row 2. Cell 1. List item 2. +
      +
    • +
    +
    +

    + Row 2. Cell 2. +

    +
      +
    • +
      + Row 2. Cell 2. List item 1. +
      +
    • +
    • +
      + Row 2. Cell 2. List item 2. +
      +
    • +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nested Tables
    +

    + Header 1 +

    +
    +

    + Header 2 +

    +
    +
    + + + + + + + + + + + + + + +
    Inner Table
    +

    + 1.1 +

    +
    +

    + 1.2 +

    +
    +

    + 2.1 +

    +
    +

    + 2.2 +

    +
    +
    +
    +

    + Something. +

    +
    +
    + +
    + + + + + + + + + + + + +
    Table with anchors
    +

    + a +

    +
    +

    + b +

    +
    +
    +
    + + + + +
    Table with template id
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/table-1_7.quickbook b/src/boost/tools/quickbook/test/table-1_7.quickbook new file mode 100644 index 000000000..84d68f71d --- /dev/null +++ b/src/boost/tools/quickbook/test/table-1_7.quickbook @@ -0,0 +1,151 @@ +[article Table 1.7 + [quickbook 1.7] + [id table_tests] +] + +[table:table1 Table 1 [[Heading]][[cell]]] + +[table Table 2 + [[Heading]] + [[cell]] +] + +[table + [[Heading]] + [[cell]] +] + +[table:table4 + [[Heading]] + [[cell]] +] + +[table:-table5- + [[Heading]] + [[cell]] +] + +[table [/ Comment?] Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] Title + [[Heading]] + [[cell]] +] + +[table Title [/ ] containing a comment + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] + Title + [[Heading]] + [[cell]] +] + +[table [/ Multi line +comment] + [[Heading]] + [[Cell 1]] + [[Cell 2]] +] + +[table Title on multiple + lines with *bold* text? + [[Heading]] + [[Cell 1]] + [[Cell 2]] +] + +[section:section1 Section 1] + +[table:table1 Table 1 + [[Heading]] + [[cell]] +] + +[table A & B + [[A][B]] + [[a][b]] +] + +[table Empty Table] + +[table Table with an empty cell +[[x]]] + +[table Indentation + [ + [ + Header 1. Paragraph 1 + + Header 1. Paragraph 2 + ] + [ + Header 2 + ] + ] + [ + [ + Row 1. Cell 1. + ] + [ + Row 1. Cell 2. + + Row 1. Cell 2. Paragraph 2. + ] + ] + [ + [ +Row 2. Cell 1. + +* Row 2. Cell 1. List item 1. +* Row 2. Cell 1. List item 2. + ] + [ + Row 2. Cell 2. + + * Row 2. Cell 2. List item 1. + * Row 2. Cell 2. List item 2. + ] + ] +] + +[table Nested Tables + [ + [ + Header 1 + ] + [ + Header 2 + ] + ] + [ + [ + [table Inner Table + [[1.1][1.2]] + [[2.1][2.2]] + ] + ] + ] + [ + [ + Something. + ] + ] +] + +[#id1] +[table Table with anchors +[[[#id2]a[#id3]]][[b]] +] + +[template id_value[] id123] +[table:[id_value] Table with template id] + +[endsect] diff --git a/src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook new file mode 100644 index 000000000..d2622373d --- /dev/null +++ b/src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook @@ -0,0 +1,10 @@ +[article Expect template to fail because there are too many arguments. +] + +[template unary[x] [x]] + +[section Failure] + +[unary a..b ] + +[endsect] diff --git a/src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook new file mode 100644 index 000000000..335306a27 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook @@ -0,0 +1,11 @@ +[article Expect template to fail because there are too many arguments. + [quickbook 1.5] +] + +[template unary[x] [x]] + +[section Failure] + +[unary a..b ] + +[endsect] diff --git a/src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook new file mode 100644 index 000000000..4f8133708 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook @@ -0,0 +1,10 @@ +[article Expect template to fail because there are not enough arguments. +] + +[template ternary[x y z] [x][y][z]] + +[section Failure] + +[ternary a b ] + +[endsect] diff --git a/src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook new file mode 100644 index 000000000..1c45e09c7 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook @@ -0,0 +1,6 @@ +[article Expect template to fail because there are not enough arguments on 1.5. + [quickbook 1.5] +] + +[template ternary[x y z] {[x]-[y]-[z]}] +[ternary 1..2 3 4] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook new file mode 100644 index 000000000..83b2daa90 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook @@ -0,0 +1,10 @@ +[article Expect template to fail because there are no arguments. +] + +[template ternary[x y z] [x][y][z]] + +[section Failure] + +[ternary] + +[endsect] diff --git a/src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook new file mode 100644 index 000000000..cd6618241 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook @@ -0,0 +1,11 @@ +[article Expect template to fail because there are no arguments. + [quickbook 1.5] +] + +[template ternary[x y z] [x][y][z]] + +[section Failure] + +[ternary] + +[endsect] diff --git a/src/boost/tools/quickbook/test/template_section-1_5.gold b/src/boost/tools/quickbook/test/template_section-1_5.gold new file mode 100644 index 000000000..af270acb1 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_section-1_5.gold @@ -0,0 +1,22 @@ + + +
    + Section in a template + + Some text before the section. + +
    + <link linkend="section_in_a_template.test">Test</link> + + Hello. + + + Just + to test id generation + + + Goodbye. + +
    +
    diff --git a/src/boost/tools/quickbook/test/template_section-1_5.gold-html b/src/boost/tools/quickbook/test/template_section-1_5.gold-html new file mode 100644 index 000000000..a21f78004 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_section-1_5.gold-html @@ -0,0 +1,38 @@ + + + + +

    + Section in a template +

    +
    +

    + Table of contents +

    + +
    +

    + Some text before the section. +

    +
    +

    + Test +

    +
    +

    + Hello. +

    +

    + Just to test id generation +

    +

    + Goodbye. +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/template_section-1_5.quickbook b/src/boost/tools/quickbook/test/template_section-1_5.quickbook new file mode 100644 index 000000000..670654a23 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_section-1_5.quickbook @@ -0,0 +1,20 @@ +[article Section in a template + [quickbook 1.5] +] + +[template nestedsection[] + +Some text before the section. + +[section Test] + +Hello. + +[heading Just to test id generation] + +Goodbye. + +[endsect] +] + +[nestedsection] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook new file mode 100644 index 000000000..60b34830a --- /dev/null +++ b/src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook @@ -0,0 +1,9 @@ +[article Template should contain balanced sections + [quickbook 1.5] +] + +[template begin_no_end[] +[section Test] +] + +[begin_no_end] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook new file mode 100644 index 000000000..5445e88e3 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook @@ -0,0 +1,10 @@ +[article Template should contain balanced sections + [quickbook 1.5] +] + +[template end_before_begin[] +[endsect] +[section Test] +] + +[end_before_begin] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook new file mode 100644 index 000000000..237a9f0d1 --- /dev/null +++ b/src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook @@ -0,0 +1,9 @@ +[article Template should contain balanced sections + [quickbook 1.5] +] + +[template end_no_begin[] +[endsect] +] + +[end_no_begin] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/templates-1_3.gold b/src/boost/tools/quickbook/test/templates-1_3.gold new file mode 100644 index 000000000..ed3668fda --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_3.gold @@ -0,0 +1,192 @@ + + +
    + Templates +
    + <link linkend="templates.templates">Templates</link> + + nullary_arg + + + foo baz + + + foo baz + + + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... + + + baz + + + This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar.... blah blah blah...... + + + zoom peanut zoom + + + exactly xanadu + + + wx + + + wxyz wxyz trail + +int main() +{ + std::cout << "Hello, World" << std::endl; +} + + + x2 + + + α2 + + + x2 + + + got a banana? + + + .0 00 + + + [fool] + +
    +
    + <link linkend="templates.empty_templates">Empty Templates</link> +
    +
    + <link linkend="templates.nested_templates">Nested Templates</link> + + Pre + + + Start block template. + + + Start block template. + + + Hello! + + + End block template. + + + End block template. + + + Post + + + Pre + + + Start block template. + + + Start phrase template. Hello! End phrase template. + + + End block template. + + + Post + + + Pre + + + Start phrase template. + + + Start block template. + + + Hello! + + + End block template. + + + End phrase template. + + + Post + + + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post + +
    +
    + <link linkend="templates.block_markup">Block Markup</link> + + + + a + + + + + b + + + + +int main() {} + + Paragraphs 1 + + + Paragraphs 2 + + + + + + + + a + + + + + b + + + + + + + + + +int main() {} + + + + Paragraphs 1 + + + Paragraphs 2 + + + +
    +
    + <link linkend="templates.escaped_templates">Escaped templates</link> + + Not real boostbook Also not real boostbook + More fake boostbook Final fake boostbook + +
    +
    diff --git a/src/boost/tools/quickbook/test/templates-1_3.gold-html b/src/boost/tools/quickbook/test/templates-1_3.gold-html new file mode 100644 index 000000000..1696e949e --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_3.gold-html @@ -0,0 +1,240 @@ + + + + +

    + Templates +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Templates +

    +
    +

    + nullary_arg +

    +

    + foo baz +

    +

    + foo baz +

    +

    + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... +

    +

    + baz +

    +

    + This is a complete paragraph. madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar madagascar.... blah blah blah...... +

    +

    + zoom peanut zoom +

    +

    + exactly xanadu +

    +

    + wx +

    +

    + wxyz wxyz trail +

    +
    int main()
    +{
    +    std::cout << "Hello, World" << std::endl;
    +}
    +
    +

    + x2 +

    +

    + α2 +

    +

    + x2 +

    +

    + got a banana? +

    +

    + .0 00 +

    +

    + [fool] +

    +
    +
    +
    +

    + Empty Templates +

    +
    +
    +
    +
    +

    + Nested Templates +

    +
    +

    + Pre +

    +

    + Start block template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start block template. +

    +

    + Start phrase template. Hello! End phrase template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start phrase template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End phrase template. +

    +

    + Post +

    +

    + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post +

    +
    +
    +
    +

    + Block Markup +

    +
    +
      +
    • +
      + a +
      +
    • +
    • +
      + b +
      +
    • +
    +

    +

    +
    int main() {}
    +

    + Paragraphs 1 +

    +

    + Paragraphs 2 +

    +
      +
    • +
      +
        +
      • +
        + a +
        +
      • +
      • +
        + b +
        +
      • +
      +
      +
    • +
    • +

      +

      +
    • +
    • +
      int main() {}
      +
    • +
    • +
      + Paragraphs 1 +
      +
      + Paragraphs 2 +
      +
    • +
    +
    +
    +
    +

    + Escaped templates +

    +
    +

    + Not real boostbook Also not real boostbook More fake boostbook Final fake + boostbook +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/templates-1_3.quickbook b/src/boost/tools/quickbook/test/templates-1_3.quickbook new file mode 100644 index 000000000..a6d434878 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_3.quickbook @@ -0,0 +1,216 @@ +[article Templates + [quickbook 1.3] +] + +[section Templates] + +[/-------------------------------- nullary arg ] + +[template foo0 nullary_arg] + +[foo0] + +[/-------------------------------- unary arg, phrase syle ] + +[template foo1[bar] foo [bar]] + +[foo1 baz] + +[/-------------------------------- unary arg, block syle ] + +[template foo2[bar] +foo [bar] +] + +[foo2 baz] + +[template foo3[bar] +This is a complete paragraph. [bar] [bar] [bar] [bar] [bar] +[bar] [bar] [bar] [bar].... blah blah blah...... +] + +[foo3 kalamazoo] + +[/-------------------------------- unary arg, using punctuation ] + +[template ![bar] ''''''[bar]''''''] + +[!baz] + +[/-------------------------------- recursive templates ] + +[template foo4[bar] +[foo3 [bar]] +] + +[foo3 madagascar] + +[template foo5[x] zoom [x]] +[template foo6[x] [x] zoom] + +[foo6[foo5 peanut]] + +[template kinda_weird[x y] [x] [y]] + +[kinda_weird exactly..xanadu] + + +[/-------------------------------- space delimitted args ] + +[template simple1[a b] [a][b]] + +[simple1 w x] + +[template simple2[a b c d] [a][b][c][d]] + +[simple2 w x y z][simple2 w x y z trail] + +[/-------------------------------- John's templates ] + +[template code[x] + int main() + { + std::cout << ``[x]`` << std::endl; + } +] + +[code "Hello\, World"] + +[template alpha '''α'''] +[template pow[a b] [a]''''''[b]'''''' ] +[template super[text]''''''[text]'''''' ] + +[pow x 2] + +[pow [alpha] 2] + +x[super 2] + +[/-------------------------------- Some more ] + +[template banana got a banana?] +[template plantation[bananarama] [bananarama]] + +[plantation [banana]] + +[/-------------------------------- Not a bug (there was a syntax error here) ] + +[template join1[a b] [b][a]] +[template join2[a b] [a][b]] +[template test[x] [join1 [join2 0 [x]]...0]] +[test 0] + +[/-------------------------------- Mismatched template ] + +[template foo 1] +[fool] + +[template blah 10] + +[endsect] + +[section Empty Templates] + +[template empty1] +[template empty2 ] +[template empty3 [/comment]] +[template empty4 [/comment] + +] +[template empty5 +] +[template empty6 + +] +[template empty7 +[/comment] +] +[template empty8 + +[/comment] +] +[template empty_arg1[x]] +[template empty_arg2[x y]] + +[empty1] +[empty2] +[empty3] +[empty4] +[empty5] +[empty6] +[empty7] +[empty8] +[empty_arg1 1] +[empty_arg2 1 2] + +[endsect] + +[/----------------------------------- Nested templates ] + +[section Nested Templates] + +[template block[content] + +Start block template. + +[content] + +End block template. +] + +[template phrase[content] Start phrase template. [content] End phrase template.] + +Pre [block [block Hello!]] Post + +Pre [block [phrase Hello!]] Post + +Pre [phrase [block Hello!]] Post + +Pre [phrase [phrase Hello!]] Post + +[endsect] + +[/----------------------------------- Block Markup ] + +[section Block Markup] + +[template list +* a +* b] + +[template horizontal +----] + +[template codeblock + int main() {}] + +[template paragraphs +Paragraphs 1 + +Paragraphs 2 +] + +[list][horizontal][codeblock][paragraphs] + +* [list] +* [horizontal] +* [codeblock] +* [paragraphs] + +[endsect] + +[/----------------------------------- Escaped templates ] + +[section Escaped templates] + +[template raw_markup Not real boostbook] +[template | Also not real boostbook] +[template escaped1 [|] [`|]] +[template escaped2 [x] [`x]] + +[`raw_markup] +[`|] +[escaped1 More fake boostbook] +[escaped2 Final fake boostbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/templates-1_4.gold b/src/boost/tools/quickbook/test/templates-1_4.gold new file mode 100644 index 000000000..40c244369 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_4.gold @@ -0,0 +1,28 @@ + + +
    + Template 1.4 + + dynamic scoping + + + old + + + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3} + + + {[binary 1 2-3} 4] + + + {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3} + +
    + <link linkend="template_1_4.escaped_templates">Escaped templates</link> + + Not real boostbook Also not real boostbook + More fake boostbook Final fake boostbook + +
    +
    diff --git a/src/boost/tools/quickbook/test/templates-1_4.gold-html b/src/boost/tools/quickbook/test/templates-1_4.gold-html new file mode 100644 index 000000000..344d09eac --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_4.gold-html @@ -0,0 +1,45 @@ + + + + +

    + Template 1.4 +

    +
    +

    + Table of contents +

    + +
    +

    + dynamic scoping +

    +

    + old +

    +

    + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3} +

    +

    + {[binary 1 2-3} 4] +

    +

    + {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3} +

    +
    +

    + Escaped templates +

    +
    +

    + Not real boostbook Also not real boostbook More fake boostbook Final fake + boostbook +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/templates-1_4.quickbook b/src/boost/tools/quickbook/test/templates-1_4.quickbook new file mode 100644 index 000000000..3fb893748 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_4.quickbook @@ -0,0 +1,53 @@ +[article Template 1.4 + [quickbook 1.4] +] + +[/ 1.4 uses dynamic scoping ] + +[template x static scoping] +[template foo1[] [x]] +[template foo2[x] [foo1]] +[foo2 dynamic scoping] + +[/ In 1.4 template arguments are scoped at the point they are used] + +[template y new] +[template foo3[a y] [a]] +[foo3 [y] old] + +[/ 1.4 template arguments] + +[template binary[x y] {[x]-[y]}] +[binary 1..2] [/ {1-2} ] +[binary 1 2] [/ {1-2} ] +[binary 1..2 3 4] [/ {1-2 3 4} ] +[binary 1 2..3 4] [/ {1 2-3 4} ] +[binary 1 2 3..4] [/ {1 2 3-4} ] +[binary [1..2] [/ {(1-2} but with a square bracket ] +[binary 1.\.2..3] [/ {1..2-3} ] +[binary 1.\.2 3] [/ {1..2-3} ] + +[binary [binary 1 2..3] 4] [/ {[binary 1 2-3} 4] ] + +[template ternary[x y z] {[x]-[y]-[z]}] +[ternary 1..2..3] [/ {1-2-3} ] +[ternary 1 2 3] [/ {1-2-3} ] +[ternary 1..2 3 4] [/ {1-2-3 4} ] +[ternary 1 2..3 4] [/ {1 2-3-4} ] +[ternary [1..2..3] [/ {(1-2-3} (but with a square bracket) ] + +[/----------------------------------- Escaped templates ] + +[section Escaped templates] + +[template raw_markup Not real boostbook] +[template | Also not real boostbook] +[template escaped1 [|] [`|]] +[template escaped2 [x] [`x]] + +[`raw_markup] +[`|] +[escaped1 More fake boostbook] +[escaped2 Final fake boostbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/templates-1_5.gold b/src/boost/tools/quickbook/test/templates-1_5.gold new file mode 100644 index 000000000..9577f1a91 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_5.gold @@ -0,0 +1,239 @@ + + +
    + Template 1.5 +
    + <link linkend="template_1_5.templates">Templates</link> + + nullary_arg + + + foo baz + + + foo baz + + + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... + + + baz + + + This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar.... blah blah blah...... + + + zoom peanut zoom + + + exactly xanadu + + + wx + + + wxyz wxyz trail + +int main() +{ + std::cout << "Hello, World" << std::endl; +} + + + x2 + + + α2 + + + x2 + + + got a banana? + + + .0 00 + + + [fool] + +
    +
    + <link linkend="template_1_5.empty_templates">Empty Templates</link> +
    +
    + <link linkend="template_1_5.nested_templates">Nested Templates</link> + + Pre + + + Start block template. + + + Start block template. + + + Hello! + + + End block template. + + + End block template. + + + Post + + + Pre + + + Start block template. + + + Start phrase template. Hello! End phrase template. + + + End block template. + + + Post + + + Pre + + + Start phrase template. + + + Start block template. + + + Hello! + + + End block template. + + + End phrase template. + + + Post + + + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post + +
    +
    + <link linkend="template_1_5.block_markup">Block Markup</link> + + + + a + + + + + b + + + + +int main() {} + + Paragraphs 1 + + + Paragraphs 2 + + + + + + + + a + + + + + b + + + + + + + + + +int main() {} + + + + Paragraphs 1 + + + Paragraphs 2 + + + +
    +
    + <link linkend="template_1_5.static_scoping">Static Scoping</link> + + static scoping + + + [a] + + + new + + + foo foo + +
    +
    + <link linkend="template_1_5.template_arguments">Template Arguments</link> + + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} + + + { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} + + + {[1-2] 3} {[1-2] 3} {[1-2} + + + {1-2-3} {1-2-3} + +
    +
    + <link linkend="template_1_5.block_and_phrase_templates">Block and phrase + templates</link> + + Some text + + + A <emphasis>paragraph</emphasis>. + + + Some *text* A paragraph. + + + Things + +
    +
    + <link linkend="template_1_5.escaped_templates">Escaped templates</link> + + Not real boostbook Also not real boostbook + More fake boostbook Final fake boostbook + +
    +
    diff --git a/src/boost/tools/quickbook/test/templates-1_5.gold-html b/src/boost/tools/quickbook/test/templates-1_5.gold-html new file mode 100644 index 000000000..f557f0ac2 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_5.gold-html @@ -0,0 +1,308 @@ + + + + +

    + Template 1.5 +

    +
    +

    + Table of contents +

    + +
    +
    +

    + Templates +

    +
    +

    + nullary_arg +

    +

    + foo baz +

    +

    + foo baz +

    +

    + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... +

    +

    + baz +

    +

    + This is a complete paragraph. madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar madagascar.... blah blah blah...... +

    +

    + zoom peanut zoom +

    +

    + exactly xanadu +

    +

    + wx +

    +

    + wxyz wxyz trail +

    +
    int main()
    +{
    +    std::cout << "Hello, World" << std::endl;
    +}
    +
    +

    + x2 +

    +

    + α2 +

    +

    + x2 +

    +

    + got a banana? +

    +

    + .0 00 +

    +

    + [fool] +

    +
    +
    +
    +

    + Empty Templates +

    +
    +
    +
    +
    +

    + Nested Templates +

    +
    +

    + Pre +

    +

    + Start block template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start block template. +

    +

    + Start phrase template. Hello! End phrase template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start phrase template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End phrase template. +

    +

    + Post +

    +

    + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post +

    +
    +
    +
    +

    + Block Markup +

    +
    +
      +
    • +
      + a +
      +
    • +
    • +
      + b +
      +
    • +
    +

    +

    +
    int main() {}
    +

    + Paragraphs 1 +

    +

    + Paragraphs 2 +

    +
      +
    • +
      +
        +
      • +
        + a +
        +
      • +
      • +
        + b +
        +
      • +
      +
      +
    • +
    • +

      +

      +
    • +
    • +
      int main() {}
      +
    • +
    • +
      + Paragraphs 1 +
      +
      + Paragraphs 2 +
      +
    • +
    +
    +
    +
    +

    + Static Scoping +

    +
    +

    + static scoping +

    +

    + [a] +

    +

    + new +

    +

    + foo foo +

    +
    +
    +
    +

    + Template Arguments +

    +
    +

    + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} +

    +

    + { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} +

    +

    + {[1-2] 3} {[1-2] 3} {[1-2} +

    +

    + {1-2-3} {1-2-3} +

    +
    +
    +
    +

    + Block and phrase templates +

    +
    +

    + Some text +

    +

    + A <emphasis>paragraph</emphasis>. +

    +

    + Some *text* A paragraph. +

    +

    +

    + Things +

    +

    +
    +
    +
    +

    + Escaped templates +

    +
    +

    + Not real boostbook Also not real boostbook More fake boostbook Final fake + boostbook +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/templates-1_5.quickbook b/src/boost/tools/quickbook/test/templates-1_5.quickbook new file mode 100644 index 000000000..55ec031fd --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_5.quickbook @@ -0,0 +1,297 @@ +[article Template 1.5 + [quickbook 1.5] +] + +[section Templates] + +[/-------------------------------- nullary arg ] + +[template foo0 nullary_arg] + +[foo0] + +[/-------------------------------- unary arg, phrase syle ] + +[template foo1[bar] foo [bar]] + +[foo1 baz] + +[/-------------------------------- unary arg, block syle ] + +[template foo2[bar] +foo [bar] +] + +[foo2 baz] + +[template foo3[bar] +This is a complete paragraph. [bar] [bar] [bar] [bar] [bar] +[bar] [bar] [bar] [bar].... blah blah blah...... +] + +[foo3 kalamazoo] + +[/-------------------------------- unary arg, using punctuation ] + +[template ![bar] ''''''[bar]''''''] + +[!baz] + +[/-------------------------------- recursive templates ] + +[template foo4[bar] +[foo3 [bar]] +] + +[foo3 madagascar] + +[template foo5[x] zoom [x]] +[template foo6[x] [x] zoom] + +[foo6[foo5 peanut]] + +[template kinda_weird[x y] [x] [y]] + +[kinda_weird exactly..xanadu] + + +[/-------------------------------- space delimitted args ] + +[template simple1[a b] [a][b]] + +[simple1 w x] + +[template simple2[a b c d] [a][b][c][d]] + +[simple2 w x y z][simple2 w x y z trail] + +[/-------------------------------- John's templates ] + +[template code[x] + int main() + { + std::cout << ``[x]`` << std::endl; + } +] + +[code "Hello\, World"] + +[template alpha '''α'''] +[template pow[a b] [a]''''''[b]'''''' ] +[template super[text]''''''[text]'''''' ] + +[pow x 2] + +[pow [alpha] 2] + +x[super 2] + +[/-------------------------------- Some more ] + +[template banana got a banana?] +[template plantation[bananarama] [bananarama]] + +[plantation [banana]] + +[/-------------------------------- Not a bug (there was a syntax error here) ] + +[template join1[a b] [b][a]] +[template join2[a b] [a][b]] +[template test[x] [join1 [join2 0 [x]]...0]] +[test 0] + +[/-------------------------------- Mismatched template ] + +[template foo 1] +[fool] + +[template blah 10] + +[endsect] + +[section Empty Templates] + +[template empty1] +[template empty2 ] +[template empty3 [/comment]] +[template empty4 [/comment] + +] +[template empty5 +] +[template empty6 + +] +[template empty7 +[/comment] +] +[template empty8 + +[/comment] +] +[template empty_arg1[x]] +[template empty_arg2[x y]] + +[empty1] +[empty2] +[empty3] +[empty4] +[empty5] +[empty6] +[empty7] +[empty8] +[empty_arg1 1] +[empty_arg2 1 2] + +[endsect] + +[/----------------------------------- Nested templates ] + +[section Nested Templates] + +[template block[content] + +Start block template. + +[content] + +End block template. +] + +[template phrase[content] Start phrase template. [content] End phrase template.] + +Pre [block [block Hello!]] Post + +Pre [block [phrase Hello!]] Post + +Pre [phrase [block Hello!]] Post + +Pre [phrase [phrase Hello!]] Post + +[endsect] + +[/----------------------------------- Block Markup ] + +[section Block Markup] + +[template list +* a +* b] + +[template horizontal +----] + +[template codeblock + int main() {}] + +[template paragraphs +Paragraphs 1 + +Paragraphs 2 +] + +[list][horizontal][codeblock][paragraphs] + +* [list] +* [horizontal] +* [codeblock] +* [paragraphs] + +[endsect] + +[/----------------------------------- 1.5+ use static scoping ] + +[section Static Scoping] + +[template x static scoping] +[template static_test1[] [x]] +[template static_test2[x] [static_test1]] +[static_test2 dynamic scoping] + +[/ This should be '[a]' because [a] isn't matched. ] +[template test1[] [a]] +[template test2[a] [test1]] +[test2 1] + +[/ In 1.5 template arguments are scoped at the point they are defined] + +[template y new] +[template static_test3[a y] [a]] +[static_test3 [y] old] + +[/ From https://svn.boost.org/trac/boost/ticket/2034 ] + +[template same[x] [x]] +[template echo[a b] [a] [b]] +[template echo_twice[x] [echo [same [x]]..[same [x]]]] +[echo_twice foo] + +[endsect] + +[/----------------------------------- 1.5+ template arguments ] + +[section Template Arguments] + +[template binary[x y] {[x]-[y]}] +[binary 1..2] [/ {1-2} ] +[binary 1 2] [/ {1-2} ] +[binary 1..2 3 4] [/ {1-2 3 4} ] +[binary 1 2..3 4] [/ {1 2-3 4} ] +[binary 1 2 3..4] [/ {1 2 3-4} ] +[binary 1.\.2..3] [/ {1..2-3} ] +[binary 1.\.2 3] [/ {1..2-3} ] + +[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ] +[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ] +[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ] + +[binary \[1 2\] 3] [/ {[1-2] 3} ] +[binary \[1..2\] 3] [/ {[1-2] 3} ] +[binary \[1 2] [/ {(1-2} ] + +[template ternary[x y z] {[x]-[y]-[z]}] +[ternary 1..2..3] [/ {1-2-3} ] +[ternary 1 2 3] [/ {1-2-3} ] + +[endsect] + +[/----------------------------------- Block and phrases ] + +[section Block and phrase templates] + +[template phrase_template[] Some *text*] +[template block_template[] + +A paragraph. +] + +[phrase_template] +[block_template] +[`phrase_template] +[`block_template] + +[/ Trailing newline shouldn't be included] + +[template named_index[type title] +''''''[title]'''''' +] + +[named_index things Things] + +[endsect] + +[/----------------------------------- Escaped templates ] + +[section Escaped templates] + +[template raw_markup Not real boostbook] +[template | Also not real boostbook] +[template escaped1 [|] [`|]] +[template escaped2 [x] [`x]] + +[`raw_markup] +[`|] +[escaped1 More fake boostbook] +[escaped2 Final fake boostbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook b/src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook new file mode 100644 index 000000000..0fd039b1e --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook @@ -0,0 +1,8 @@ +[article Template 1.6 fail 1 + [quickbook 1.6] +] + +[/ I've removed support for escaping punctuation templates in 1.6. ] + +[template ~ body] +[`~] diff --git a/src/boost/tools/quickbook/test/templates-1_6.gold b/src/boost/tools/quickbook/test/templates-1_6.gold new file mode 100644 index 000000000..b37604e75 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_6.gold @@ -0,0 +1,257 @@ + + +
    + Template 1.6 +
    + <link linkend="template_1_6.templates">Templates</link> + + nullary_arg + + + foo baz + + + foo baz + + + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... + + + baz + + + This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar.... blah blah blah...... + + + zoom peanut zoom + + + exactly xanadu + + + wx + + + wxyz wxyz trail + +int main() +{ + std::cout << "Hello, World" << std::endl; +} + + + x2 + + + α2 + + + x2 + + + got a banana? + + + .0 00 + + + [fool] + +
    +
    + <link linkend="template_1_6.empty_templates">Empty Templates</link> +
    +
    + <link linkend="template_1_6.nested_templates">Nested Templates</link> + + Pre + + + Start block template. + + + Start block template. + + + Hello! + + + End block template. + + + End block template. + + + Post + + + Pre + + + Start block template. + + + Start phrase template. Hello! End phrase template. + + + End block template. + + + Post + + + Pre + + + Start phrase template. + + + Start block template. + + + Hello! + + + End block template. + + + End phrase template. + + + Post + + + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post + +
    +
    + <link linkend="template_1_6.block_markup">Block Markup</link> + + + + a + + + + + b + + + + +int main() {} + + Paragraphs 1 + + + Paragraphs 2 + + + + + + + + a + + + + + b + + + + + + + + + +int main() {} + + + + Paragraphs 1 + + + Paragraphs 2 + + + +
    +
    + <link linkend="template_1_6.static_scoping">Static Scoping</link> + + static scoping + + + [a] + + + new + + + foo foo + +
    +
    + <link linkend="template_1_6.template_arguments">Template Arguments</link> + + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} + + + { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} + + + {[1-2] 3} {[1-2] 3} {[1-2} + + + {1-2-3} {1-2-3} + +
    +
    + <link linkend="template_1_6.block_and_phrase_templates">Block and phrase + templates</link> + + Some text + + + A <emphasis>paragraph</emphasis>. + + + Some *text* A paragraph. + + + Things + +
    +
    + <link linkend="template_1_6.template_body">Skipping the template body + correctly</link> + + Argument + + + +code + + + + + + code + + + +
    +
    + <link linkend="template_1_6.escaped_templates">Escaped templates</link> + + Not real boostbook More fake boostbook + +
    +
    diff --git a/src/boost/tools/quickbook/test/templates-1_6.gold-html b/src/boost/tools/quickbook/test/templates-1_6.gold-html new file mode 100644 index 000000000..77d55d0a0 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_6.gold-html @@ -0,0 +1,332 @@ + + + + +

    + Template 1.6 +

    + +
    +

    + Templates +

    +
    +

    + nullary_arg +

    +

    + foo baz +

    +

    + foo baz +

    +

    + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... +

    +

    + baz +

    +

    + This is a complete paragraph. madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar madagascar.... blah blah blah...... +

    +

    + zoom peanut zoom +

    +

    + exactly xanadu +

    +

    + wx +

    +

    + wxyz wxyz trail +

    +
    int main()
    +{
    +    std::cout << "Hello, World" << std::endl;
    +}
    +
    +

    + x2 +

    +

    + α2 +

    +

    + x2 +

    +

    + got a banana? +

    +

    + .0 00 +

    +

    + [fool] +

    +
    +
    +
    +

    + Empty Templates +

    +
    +
    +
    +
    +

    + Nested Templates +

    +
    +

    + Pre +

    +

    + Start block template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start block template. +

    +

    + Start phrase template. Hello! End phrase template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start phrase template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End phrase template. +

    +

    + Post +

    +

    + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post +

    +
    +
    +
    +

    + Block Markup +

    +
    +
      +
    • +
      + a +
      +
    • +
    • +
      + b +
      +
    • +
    +

    +

    +
    int main() {}
    +

    + Paragraphs 1 +

    +

    + Paragraphs 2 +

    +
      +
    • +
      +
        +
      • +
        + a +
        +
      • +
      • +
        + b +
        +
      • +
      +
      +
    • +
    • +

      +

      +
    • +
    • +
      int main() {}
      +
    • +
    • +
      + Paragraphs 1 +
      +
      + Paragraphs 2 +
      +
    • +
    +
    +
    +
    +

    + Static Scoping +

    +
    +

    + static scoping +

    +

    + [a] +

    +

    + new +

    +

    + foo foo +

    +
    +
    +
    +

    + Template Arguments +

    +
    +

    + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} +

    +

    + { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} +

    +

    + {[1-2] 3} {[1-2] 3} {[1-2} +

    +

    + {1-2-3} {1-2-3} +

    +
    +
    +
    +

    + Block and phrase templates +

    +
    +

    + Some text +

    +

    + A <emphasis>paragraph</emphasis>. +

    +

    + Some *text* A paragraph. +

    +

    +

    + Things +

    +

    +
    +
    +
    +

    + Skipping the template body correctly +

    +
    +

    + Argument +

    +
      +
    1. +
      code
      +
    2. +
    +
      +
    1. +
      + code +
      +
    2. +
    +
    +
    +
    +

    + Escaped templates +

    +
    +

    + Not real boostbook More fake boostbook +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/templates-1_6.quickbook b/src/boost/tools/quickbook/test/templates-1_6.quickbook new file mode 100644 index 000000000..627bd7fd8 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_6.quickbook @@ -0,0 +1,313 @@ +[article Template 1.6 + [quickbook 1.6] +] + +[section Templates] + +[/-------------------------------- nullary arg ] + +[template foo0 nullary_arg] + +[foo0] + +[/-------------------------------- unary arg, phrase syle ] + +[template foo1[bar] foo [bar]] + +[foo1 baz] + +[/-------------------------------- unary arg, block syle ] + +[template foo2[bar] +foo [bar] +] + +[foo2 baz] + +[template foo3[bar] +This is a complete paragraph. [bar] [bar] [bar] [bar] [bar] +[bar] [bar] [bar] [bar].... blah blah blah...... +] + +[foo3 kalamazoo] + +[/-------------------------------- unary arg, using punctuation ] + +[template ![bar] ''''''[bar]''''''] + +[!baz] + +[/-------------------------------- recursive templates ] + +[template foo4[bar] +[foo3 [bar]] +] + +[foo3 madagascar] + +[template foo5[x] zoom [x]] +[template foo6[x] [x] zoom] + +[foo6[foo5 peanut]] + +[template kinda_weird[x y] [x] [y]] + +[kinda_weird exactly..xanadu] + + +[/-------------------------------- space delimitted args ] + +[template simple1[a b] [a][b]] + +[simple1 w x] + +[template simple2[a b c d] [a][b][c][d]] + +[simple2 w x y z][simple2 w x y z trail] + +[/-------------------------------- John's templates ] + +[template code[x] + int main() + { + std::cout << ``[x]`` << std::endl; + } +] + +[code "Hello\, World"] + +[template alpha '''α'''] +[template pow[a b] [a]''''''[b]'''''' ] +[template super[text]''''''[text]'''''' ] + +[pow x 2] + +[pow [alpha] 2] + +x[super 2] + +[/-------------------------------- Some more ] + +[template banana got a banana?] +[template plantation[bananarama] [bananarama]] + +[plantation [banana]] + +[/-------------------------------- Not a bug (there was a syntax error here) ] + +[template join1[a b] [b][a]] +[template join2[a b] [a][b]] +[template test[x] [join1 [join2 0 [x]]...0]] +[test 0] + +[/-------------------------------- Mismatched template ] + +[template foo 1] +[fool] + +[template blah 10] + +[endsect] + +[section Empty Templates] + +[template empty1] +[template empty2 ] +[template empty3 [/comment]] +[template empty4 [/comment] + +] +[template empty5 +] +[template empty6 + +] +[template empty7 +[/comment] +] +[template empty8 + +[/comment] +] +[template empty_arg1[x]] +[template empty_arg2[x y]] + +[empty1] +[empty2] +[empty3] +[empty4] +[empty5] +[empty6] +[empty7] +[empty8] +[empty_arg1 1] +[empty_arg2 1 2] + +[endsect] + +[/----------------------------------- Nested templates ] + +[section Nested Templates] + +[template block_foo[content] + +Start block template. + +[content] + +End block template. +] + +[template phrase_foo[content] Start phrase template. [content] End phrase template.] + +Pre [block_foo [block_foo Hello!]] Post + +Pre [block_foo [phrase_foo Hello!]] Post + +Pre [phrase_foo [block_foo Hello!]] Post + +Pre [phrase_foo [phrase_foo Hello!]] Post + +[endsect] + +[/----------------------------------- Block Markup ] + +[section Block Markup] + +[template list +* a +* b] + +[template horizontal +----] + +[template codeblock + int main() {}] + +[template paragraphs +Paragraphs 1 + +Paragraphs 2 +] + +[list][horizontal][codeblock][paragraphs] + +* [list] +* [horizontal] +* [codeblock] +* [paragraphs] + +[endsect] + +[/----------------------------------- 1.5+ use static scoping ] + +[section Static Scoping] + +[template x static scoping] +[template static_test1[] [x]] +[template static_test2[x] [static_test1]] +[static_test2 dynamic scoping] + +[/ This should be '[a]' because [a] isn't matched. ] +[template test1[] [a]] +[template test2[a] [test1]] +[test2 1] + +[/ In 1.5 template arguments are scoped at the point they are defined] + +[template y new] +[template static_test3[a y] [a]] +[static_test3 [y] old] + +[/ From https://svn.boost.org/trac/boost/ticket/2034 ] + +[template same[x] [x]] +[template echo[a b] [a] [b]] +[template echo_twice[x] [echo [same [x]]..[same [x]]]] +[echo_twice foo] + +[endsect] + +[/----------------------------------- 1.5+ template arguments ] + +[section Template Arguments] + +[template binary[x y] {[x]-[y]}] +[binary 1..2] [/ {1-2} ] +[binary 1 2] [/ {1-2} ] +[binary 1..2 3 4] [/ {1-2 3 4} ] +[binary 1 2..3 4] [/ {1 2-3 4} ] +[binary 1 2 3..4] [/ {1 2 3-4} ] +[binary 1.\.2..3] [/ {1..2-3} ] +[binary 1.\.2 3] [/ {1..2-3} ] + +[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ] +[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ] +[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ] + +[binary \[1 2\] 3] [/ {[1-2] 3} ] +[binary \[1..2\] 3] [/ {[1-2] 3} ] +[binary \[1 2] [/ {(1-2} ] + +[template ternary[x y z] {[x]-[y]-[z]}] +[ternary 1..2..3] [/ {1-2-3} ] +[ternary 1 2 3] [/ {1-2-3} ] + +[endsect] + +[/----------------------------------- Block and phrases ] + +[section Block and phrase templates] + +[template phrase_template[] Some *text*] +[template block_template[] + +A paragraph. +] + +[phrase_template] +[block_template] +[`phrase_template] +[`block_template] + +[/ Trailing newline shouldn't be included] + +[template named_index[type title] +''''''[title]'''''' +] + +[named_index things Things] + +[endsect] + +[/-------------------------------- Skipping template body ] + +[section:template_body Skipping the template body correctly] + +[template args1[x] [`x]] +[template args2[] +[ordered_list [``code``]] +] +[/ Due to a bug in the template parser need to stop the parser + thinking that the code is an escaped template. ] +[template args3[] +[ordered_list [\ `code`]] +] + +[args1 Argument] +[args2] +[args3] + +[endsect] + +[/----------------------------------- Escaped templates ] + +[section Escaped templates] + +[template raw_markup Not real boostbook] +[template escaped1 [x] [`x]] + +[`raw_markup] +[escaped1 More fake boostbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook b/src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook new file mode 100644 index 000000000..0618bebb9 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook @@ -0,0 +1,12 @@ +[article Template 1.7 fail +[quickbook 1.7] +] + +[/ This should fail because it's a phrase template containing a paragraph + separator. ] + +[template fail[] Phrase content. + +Paragraph content.] + +[fail] diff --git a/src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook b/src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook new file mode 100644 index 000000000..548884b16 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook @@ -0,0 +1,11 @@ +[article Template 1.7 fail +[quickbook 1.7] +] + +[/ This should fail because it's a block template called from an attribute ] + +[template fail[] + +Block template.] + +[link this-should-[fail]] diff --git a/src/boost/tools/quickbook/test/templates-1_7.gold b/src/boost/tools/quickbook/test/templates-1_7.gold new file mode 100644 index 000000000..c7d4c64e0 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_7.gold @@ -0,0 +1,302 @@ + + +
    + Template 1.7 +
    + <link linkend="template_1_7.templates">Templates</link> + + nullary_arg + + + foo baz + + + foo baz + + + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... + + + baz + + + This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar.... blah blah blah...... + + + zoom peanut zoom + + + exactly xanadu + + + wx + + + wxyz wxyz trail + +int main() +{ + std::cout << "Hello, World" << std::endl; +} + + + x2 + + + α2 + + + x2 + + + got a banana? + + + .0 00 + + + [fool] + +
    +
    + <link linkend="template_1_7.empty_templates">Empty Templates</link> +
    +
    + <link linkend="template_1_7.nested_templates">Nested Templates</link> + + Pre + + + Start block template. + + + Start block template. + + + Hello! + + + End block template. + + + End block template. + + + Post + + + Pre + + + Start block template. + + + Start phrase template. Hello! End phrase template. + + + End block template. + + + Post + + + Pre Start phrase template. + + + Start block template. + + + Hello! + + + End block template. + + + End phrase template. Post + + + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post + +
    +
    + <link linkend="template_1_7.block_markup">Block Markup</link> + + + + a + + + + + b + + + + +int main() {} + + Paragraphs 1 + + + Paragraphs 2 + + + + + + + + a + + + + + b + + + + + + + + + +int main() {} + + + + Paragraphs 1 + + + Paragraphs 2 + + + +
    +
    + <link linkend="template_1_7.static_scoping">Static Scoping</link> + + static scoping + + + [a] + + + new + + + foo foo + +
    +
    + <link linkend="template_1_7.template_arguments">Template Arguments</link> + + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} + + + { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} + + + {[1-2] 3} {[1-2] 3} {[1-2} + + + {1-2-3} {1-2-3} + +
    +
    + <link linkend="template_1_7.block_and_phrase_templates">Block and phrase + templates</link> + + Some text + + + A <emphasis>paragraph</emphasis>. + + + Some *text* A paragraph. + + + Things + + + + + + + + + + + + + + + Text2 afterwards. Text3 before. + + + + + + + + + Text4 before. + + + + + + + + + Text4 afterwards. + + + + + + + + + * Not a list. + + + + + + + + + * Not a list. + +
    +
    + <link linkend="template_1_7.template_body">Skipping the template body + correctly</link> + + Argument + + + +code + + + + + + code + + + +
    +
    + <link linkend="template_1_7.escaped_templates">Escaped templates</link> + + Not real boostbook More fake boostbook + +
    +
    diff --git a/src/boost/tools/quickbook/test/templates-1_7.gold-html b/src/boost/tools/quickbook/test/templates-1_7.gold-html new file mode 100644 index 000000000..b79546dd9 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_7.gold-html @@ -0,0 +1,377 @@ + + + + +

    + Template 1.7 +

    + +
    +

    + Templates +

    +
    +

    + nullary_arg +

    +

    + foo baz +

    +

    + foo baz +

    +

    + This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo + kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah...... +

    +

    + baz +

    +

    + This is a complete paragraph. madagascar madagascar madagascar madagascar + madagascar madagascar madagascar madagascar madagascar.... blah blah blah...... +

    +

    + zoom peanut zoom +

    +

    + exactly xanadu +

    +

    + wx +

    +

    + wxyz wxyz trail +

    +
    int main()
    +{
    +    std::cout << "Hello, World" << std::endl;
    +}
    +
    +

    + x2 +

    +

    + α2 +

    +

    + x2 +

    +

    + got a banana? +

    +

    + .0 00 +

    +

    + [fool] +

    +
    +
    +
    +

    + Empty Templates +

    +
    +
    +
    +
    +

    + Nested Templates +

    +
    +

    + Pre +

    +

    + Start block template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre +

    +

    + Start block template. +

    +

    + Start phrase template. Hello! End phrase template. +

    +

    + End block template. +

    +

    + Post +

    +

    + Pre Start phrase template. +

    +

    + Start block template. +

    +

    + Hello! +

    +

    + End block template. +

    +

    + End phrase template. Post +

    +

    + Pre Start phrase template. Start phrase template. Hello! End phrase template. + End phrase template. Post +

    +
    +
    +
    +

    + Block Markup +

    +
    +
      +
    • +
      + a +
      +
    • +
    • +
      + b +
      +
    • +
    +

    +

    +
    int main() {}
    +

    + Paragraphs 1 +

    +

    + Paragraphs 2 +

    +
      +
    • +
      +
        +
      • +
        + a +
        +
      • +
      • +
        + b +
        +
      • +
      +
      +
    • +
    • +

      +

      +
    • +
    • +
      int main() {}
      +
    • +
    • +
      + Paragraphs 1 +
      +
      + Paragraphs 2 +
      +
    • +
    +
    +
    +
    +

    + Static Scoping +

    +
    +

    + static scoping +

    +

    + [a] +

    +

    + new +

    +

    + foo foo +

    +
    +
    +
    +

    + Template Arguments +

    +
    +

    + {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3} +

    +

    + { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4} +

    +

    + {[1-2] 3} {[1-2] 3} {[1-2} +

    +

    + {1-2-3} {1-2-3} +

    +
    +
    +
    +

    + Block and phrase templates +

    +
    +

    + Some text +

    +

    + A <emphasis>paragraph</emphasis>. +

    +

    + Some *text* A paragraph. +

    +

    +

    + Things +

    +

    +
    + + + +
    +
    +
    + + + +
    +
    +

    + Text2 afterwards. Text3 before. +

    +
    + + + +
    +
    +

    + Text4 before. +

    +
    + + + +
    +
    +

    + Text4 afterwards. +

    +
    + + + +
    +
    +

    + * Not a list. +

    +
    + + + +
    +
    +

    + * Not a list. +

    +
    +
    +
    +

    + Skipping the template body correctly +

    +
    +

    + Argument +

    +
      +
    1. +
      code
      +
    2. +
    +
      +
    1. +
      + code +
      +
    2. +
    +
    +
    +
    +

    + Escaped templates +

    +
    +

    + Not real boostbook More fake boostbook +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/templates-1_7.quickbook b/src/boost/tools/quickbook/test/templates-1_7.quickbook new file mode 100644 index 000000000..bf1feaca2 --- /dev/null +++ b/src/boost/tools/quickbook/test/templates-1_7.quickbook @@ -0,0 +1,322 @@ +[article Template 1.7 + [quickbook 1.7] +] + +[section Templates] + +[/-------------------------------- nullary arg ] + +[template foo0 nullary_arg] + +[foo0] + +[/-------------------------------- unary arg, phrase syle ] + +[template foo1[bar] foo [bar]] + +[foo1 baz] + +[/-------------------------------- unary arg, block syle ] + +[template foo2[bar] +foo [bar] +] + +[foo2 baz] + +[template foo3[bar] +This is a complete paragraph. [bar] [bar] [bar] [bar] [bar] +[bar] [bar] [bar] [bar].... blah blah blah...... +] + +[foo3 kalamazoo] + +[/-------------------------------- unary arg, using punctuation ] + +[template |[bar] ''''''[bar]''''''] + +[|baz] + +[/-------------------------------- recursive templates ] + +[template foo4[bar] +[foo3 [bar]] +] + +[foo3 madagascar] + +[template foo5[x] zoom [x]] +[template foo6[x] [x] zoom] + +[foo6[foo5 peanut]] + +[template kinda_weird[x y] [x] [y]] + +[kinda_weird exactly..xanadu] + + +[/-------------------------------- space delimitted args ] + +[template simple1[a b] [a][b]] + +[simple1 w x] + +[template simple2[a b c d] [a][b][c][d]] + +[simple2 w x y z][simple2 w x y z trail] + +[/-------------------------------- John's templates ] + +[template code[x] + int main() + { + std::cout << ``[x]`` << std::endl; + } +] + +[code "Hello\, World"] + +[template alpha '''α'''] +[template pow[a b] [a]''''''[b]'''''' ] +[template super[text]''''''[text]'''''' ] + +[pow x 2] + +[pow [alpha] 2] + +x[super 2] + +[/-------------------------------- Some more ] + +[template banana got a banana?] +[template plantation[bananarama] [bananarama]] + +[plantation [banana]] + +[/-------------------------------- Not a bug (there was a syntax error here) ] + +[template join1[a b] [b][a]] +[template join2[a b] [a][b]] +[template test[x] [join1 [join2 0 [x]]...0]] +[test 0] + +[/-------------------------------- Mismatched template ] + +[template foo 1] +[fool] + +[template blah 10] + +[endsect] + +[section Empty Templates] + +[template empty1] +[template empty2 ] +[template empty3 [/comment]] +[template empty4 [/comment] + +] +[template empty5 +] +[template empty6 + +] +[template empty7 +[/comment] +] +[template empty8 + +[/comment] +] +[template empty_arg1[x]] +[template empty_arg2[x y]] + +[empty1] +[empty2] +[empty3] +[empty4] +[empty5] +[empty6] +[empty7] +[empty8] +[empty_arg1 1] +[empty_arg2 1 2] + +[endsect] + +[/----------------------------------- Nested templates ] + +[section Nested Templates] + +[template block_foo[content] + +Start block template. + +[content] + +End block template. +] + +[template phrase_foo[content] Start phrase template. [content] End phrase template.] + +Pre [block_foo [block_foo Hello!]] Post + +Pre [block_foo [phrase_foo Hello!]] Post + +Pre [phrase_foo [block_foo Hello!]] Post + +Pre [phrase_foo [phrase_foo Hello!]] Post + +[endsect] + +[/----------------------------------- Block Markup ] + +[section Block Markup] + +[template list +* a +* b] + +[template horizontal +----] + +[template codeblock + int main() {}] + +[template paragraphs +Paragraphs 1 + +Paragraphs 2 +] + +[list][horizontal][codeblock][paragraphs] + +* [list] +* [horizontal] +* [codeblock] +* [paragraphs] + +[endsect] + +[/----------------------------------- 1.5+ use static scoping ] + +[section Static Scoping] + +[template x static scoping] +[template static_test1[] [x]] +[template static_test2[x] [static_test1]] +[static_test2 dynamic scoping] + +[/ This should be '[a]' because [a] isn't matched. ] +[template test1[] [a]] +[template test2[a] [test1]] +[test2 1] + +[/ In 1.5 template arguments are scoped at the point they are defined] + +[template y new] +[template static_test3[a y] [a]] +[static_test3 [y] old] + +[/ From https://svn.boost.org/trac/boost/ticket/2034 ] + +[template same[x] [x]] +[template echo[a b] [a] [b]] +[template echo_twice[x] [echo [same [x]]..[same [x]]]] +[echo_twice foo] + +[endsect] + +[/----------------------------------- 1.5+ template arguments ] + +[section Template Arguments] + +[template binary[x y] {[x]-[y]}] +[binary 1..2] [/ {1-2} ] +[binary 1 2] [/ {1-2} ] +[binary 1..2 3 4] [/ {1-2 3 4} ] +[binary 1 2..3 4] [/ {1 2-3 4} ] +[binary 1 2 3..4] [/ {1 2 3-4} ] +[binary 1.\.2..3] [/ {1..2-3} ] +[binary 1.\.2 3] [/ {1..2-3} ] + +[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ] +[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ] +[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ] + +[binary \[1 2\] 3] [/ {[1-2] 3} ] +[binary \[1..2\] 3] [/ {[1-2] 3} ] +[binary \[1 2] [/ {(1-2} ] + +[template ternary[x y z] {[x]-[y]-[z]}] +[ternary 1..2..3] [/ {1-2-3} ] +[ternary 1 2 3] [/ {1-2-3} ] + +[endsect] + +[/----------------------------------- Block and phrases ] + +[section Block and phrase templates] + +[template phrase_template[] Some *text*] +[template block_template[] + +A paragraph. +] + +[phrase_template] +[block_template] +[`phrase_template] +[`block_template] + +[/ Trailing newline shouldn't be included] + +[template named_index[type title] +''''''[title]'''''' +] + +[named_index things Things] + +[/ Blocks in phrase templates ] + +[template phrase_block1[] [table]] +[template phrase_block2[] [table] Text2 afterwards.] +[template phrase_block3[] Text3 before. [table]] +[template phrase_block4[] Text4 before. [table] Text4 afterwards.] +[template phrase_block5[] [table] * Not a list.] +[template phrase_block6[] [table] +* Not a list.] + +[phrase_block1][phrase_block2][phrase_block3][phrase_block4] +[phrase_block5][phrase_block6] + +[endsect] + +[/-------------------------------- Skipping template body ] + +[section:template_body Skipping the template body correctly] + +[template args1[x] [`x]] +[template args2[] [ordered_list [``code``]]] +[/ Due to a bug in the template parser need to stop the parser + thinking that the code is an escaped template. ] +[template args3[] [ordered_list [\ `code`]]] + +[args1 Argument] +[args2] +[args3] + +[endsect] + +[/----------------------------------- Escaped templates ] + +[section Escaped templates] + +[template raw_markup Not real boostbook] +[template escaped1 [x] [`x]] + +[`raw_markup] +[escaped1 More fake boostbook] + +[endsect] diff --git a/src/boost/tools/quickbook/test/unicode_escape-1_5.gold b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold new file mode 100644 index 000000000..c2a8859eb --- /dev/null +++ b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold @@ -0,0 +1,156 @@ + + +
    + UTF-8 test + + Iñtërnâtiônàlizætiøn + + + + + Αα Alpha + + + + + Ββ Beta + + + + + Γγ Gamma + + + + + Δδ Delta + + + + + Εε Epsilon + + + + + Ζζ Zeta + + + + + Ηη Eta + + + + + Θθ Theta + + + + + Ιι Iota + + + + + Κκ Kappa + + + + + Λλ Lambda + + + + + Μμ Mu + + + + + Νν Nu + + + + + Ξξ Xi + + + + + Οο Omicron + + + + + Ππ Pi + + + + + Ρρ Rho + + + + + Σσς Sigma + + + + + Ττ Tau + + + + + Υυ Upsilon + + + + + Φφ Phi + + + + + Χχ Chi + + + + + Ψψ Psi + + + + + Ωω Omega + + + + + In the unlikely event that you've got a Mahjong font: + + + + + 🀀 East Wind + + + + + 🀁 South Wind + + + + + 🀂 West Wind + + + + + 🀃 North Wind + + + +
    diff --git a/src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html new file mode 100644 index 000000000..ab8409f10 --- /dev/null +++ b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html @@ -0,0 +1,159 @@ + + + + +

    + UTF-8 test +

    +

    + Iñtërnâtiônàlizætiøn +

    +
      +
    • +
      + Αα Alpha +
      +
    • +
    • +
      + Ββ Beta +
      +
    • +
    • +
      + Γγ Gamma +
      +
    • +
    • +
      + Δδ Delta +
      +
    • +
    • +
      + Εε Epsilon +
      +
    • +
    • +
      + Ζζ Zeta +
      +
    • +
    • +
      + Ηη Eta +
      +
    • +
    • +
      + Θθ Theta +
      +
    • +
    • +
      + Ιι Iota +
      +
    • +
    • +
      + Κκ Kappa +
      +
    • +
    • +
      + Λλ Lambda +
      +
    • +
    • +
      + Μμ Mu +
      +
    • +
    • +
      + Νν Nu +
      +
    • +
    • +
      + Ξξ Xi +
      +
    • +
    • +
      + Οο Omicron +
      +
    • +
    • +
      + Ππ Pi +
      +
    • +
    • +
      + Ρρ Rho +
      +
    • +
    • +
      + Σσς Sigma +
      +
    • +
    • +
      + Ττ Tau +
      +
    • +
    • +
      + Υυ Upsilon +
      +
    • +
    • +
      + Φφ Phi +
      +
    • +
    • +
      + Χχ Chi +
      +
    • +
    • +
      + Ψψ Psi +
      +
    • +
    • +
      + Ωω Omega +
      +
    • +
    +

    + In the unlikely event that you've got a Mahjong font: +

    +
      +
    • +
      + 🀀 East Wind +
      +
    • +
    • +
      + 🀁 South Wind +
      +
    • +
    • +
      + 🀂 West Wind +
      +
    • +
    • +
      + 🀃 North Wind +
      +
    • +
    + + diff --git a/src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook b/src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook new file mode 100644 index 000000000..becdef6b8 --- /dev/null +++ b/src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook @@ -0,0 +1,37 @@ +[article UTF-8 test + [quickbook 1.5] +] + +[heading I\u00F1t\u00EBrn\u00E2ti\u00F4n\u00E0liz\u00E6ti\u00F8n] + +* \u0391\u03B1 Alpha +* \u0392\u03B2 Beta +* \u0393\u03B3 Gamma +* \u0394\u03B4 Delta +* \u0395\u03B5 Epsilon +* \u0396\u03B6 Zeta +* \u0397\u03B7 Eta +* \u0398\u03B8 Theta +* \u0399\u03B9 Iota +* \u039A\u03BA Kappa +* \u039B\u03BB Lambda +* \u039C\u03BC Mu +* \u039D\u03BD Nu +* \u039E\u03BE Xi +* \u039F\u03BF Omicron +* \u03A0\u03C0 Pi +* \u03A1\u03C1 Rho +* \u03A3\u03C3\u03C2 Sigma +* \u03A4\u03C4 Tau +* \u03A5\u03C5 Upsilon +* \u03A6\u03C6 Phi +* \u03A7\u03C7 Chi +* \u03A8\u03C8 Psi +* \u03A9\u03C9 Omega + +In the unlikely event that you've got a Mahjong font: + +* \U0001F000 East Wind +* \U0001F001 South Wind +* \U0001F002 West Wind +* \U0001F003 North Wind \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/unit/Jamfile.v2 b/src/boost/tools/quickbook/test/unit/Jamfile.v2 new file mode 100644 index 000000000..43271b48c --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/Jamfile.v2 @@ -0,0 +1,31 @@ +# +# Copyright (c) 2011 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +import testing ; + +project quickbook/test/unit-tests + : requirements + ../../src + all + /boost//filesystem + gcc:-g0 + darwin:-g0 + msvc:/wd4709 + ; + +run values_test.cpp ../../src/values.cpp ../../src/files.cpp ; +run post_process_test.cpp ../../src/post_process.cpp ; +run source_map_test.cpp ../../src/files.cpp ; +run glob_test.cpp ../../src/glob.cpp ; +run utils_test.cpp ../../src/id_xml.cpp ../../src/utils.cpp ; +run cleanup_test.cpp ; +run path_test.cpp ../../src/path.cpp ../../src/native_text.cpp ../../src/utils.cpp ; + +# Copied from spirit +run symbols_tests.cpp ; +run symbols_find_null.cpp ; diff --git a/src/boost/tools/quickbook/test/unit/cleanup_test.cpp b/src/boost/tools/quickbook/test/unit/cleanup_test.cpp new file mode 100644 index 000000000..4952c991a --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/cleanup_test.cpp @@ -0,0 +1,80 @@ + +/*============================================================================= + Copyright (c) 2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include "cleanup.hpp" + +struct counted +{ + static int count; + static std::vector destroyed; + static void reset() + { + count = 0; + destroyed.clear(); + } + + int value; + + counted(int v) : value(v) + { + BOOST_TEST(value != -1); + ++count; + } + + counted(counted const& x) : value(x.value) + { + BOOST_TEST(value != -1); + ++count; + } + + ~counted() + { + BOOST_TEST(value != -1); + destroyed.push_back(value); + value = -1; + BOOST_TEST(count > 0); + --count; + } +}; + +int counted::count = 0; +std::vector counted::destroyed; + +int main() +{ + counted::reset(); + { + quickbook::cleanup c; + } + BOOST_TEST(counted::count == 0); + + counted::reset(); + { + quickbook::cleanup c; + counted& v1 = c.add(new counted(1)); + counted& v2 = c.add(new counted(2)); + BOOST_TEST(v1.value == 1); + BOOST_TEST(v2.value == 2); + } + BOOST_TEST(counted::count == 0); + BOOST_TEST(counted::destroyed.size() == 2); + BOOST_TEST(counted::destroyed[0] == 2); + BOOST_TEST(counted::destroyed[1] == 1); + + counted::reset(); + { + quickbook::cleanup c; + int& x = c.add(new int(10)); + BOOST_TEST(x == 10); + } + + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/glob_test.cpp b/src/boost/tools/quickbook/test/unit/glob_test.cpp new file mode 100644 index 000000000..27d2611b3 --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/glob_test.cpp @@ -0,0 +1,163 @@ +/*============================================================================= + Copyright (c) 2013 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include "glob.hpp" + +void glob_tests() +{ + BOOST_TEST(quickbook::glob("", "")); + + BOOST_TEST(!quickbook::glob("*", "")); + BOOST_TEST(quickbook::glob("*", "a")); + BOOST_TEST(quickbook::glob("*b", "b")); + BOOST_TEST(quickbook::glob("*b", "ab")); + BOOST_TEST(quickbook::glob("*b", "bab")); + BOOST_TEST(quickbook::glob("*b*", "b")); + BOOST_TEST(quickbook::glob("*b*", "ab")); + BOOST_TEST(quickbook::glob("*b*", "bc")); + BOOST_TEST(quickbook::glob("*b*", "abc")); + BOOST_TEST(!quickbook::glob("*b*", "")); + BOOST_TEST(!quickbook::glob("*b*", "a")); + BOOST_TEST(!quickbook::glob("*b*", "ac")); + + BOOST_TEST(quickbook::glob("hello.txt", "hello.txt")); + BOOST_TEST(!quickbook::glob("world.txt", "helloworld.txt")); + BOOST_TEST(quickbook::glob("*world.txt", "helloworld.txt")); + BOOST_TEST(!quickbook::glob("world.txt*", "helloworld.txt")); + BOOST_TEST(!quickbook::glob("hello", "helloworld.txt")); + BOOST_TEST(!quickbook::glob("*hello", "helloworld.txt")); + BOOST_TEST(quickbook::glob("hello*", "helloworld.txt")); + BOOST_TEST(quickbook::glob("*world*", "helloworld.txt")); + + BOOST_TEST(quickbook::glob("?", "a")); + BOOST_TEST(!quickbook::glob("?", "")); + BOOST_TEST(!quickbook::glob("?", "ab")); + BOOST_TEST(quickbook::glob("a?", "ab")); + BOOST_TEST(quickbook::glob("?b", "ab")); + BOOST_TEST(quickbook::glob("?bc", "abc")); + BOOST_TEST(quickbook::glob("a?c", "abc")); + BOOST_TEST(quickbook::glob("ab?", "abc")); + BOOST_TEST(!quickbook::glob("?bc", "aac")); + BOOST_TEST(!quickbook::glob("a?c", "bbc")); + BOOST_TEST(!quickbook::glob("ab?", "abcd")); + + BOOST_TEST(quickbook::glob("[a]", "a")); + BOOST_TEST(!quickbook::glob("[^a]", "a")); + BOOST_TEST(!quickbook::glob("[b]", "a")); + BOOST_TEST(quickbook::glob("[^b]", "a")); + BOOST_TEST(quickbook::glob("[a-z]", "a")); + BOOST_TEST(!quickbook::glob("[^a-z]", "a")); + BOOST_TEST(!quickbook::glob("[b-z]", "a")); + BOOST_TEST(quickbook::glob("[^b-z]", "a")); + BOOST_TEST(quickbook::glob("[-a]", "a")); + BOOST_TEST(quickbook::glob("[-a]", "-")); + BOOST_TEST(!quickbook::glob("[-a]", "b")); + BOOST_TEST(!quickbook::glob("[^-a]", "a")); + BOOST_TEST(!quickbook::glob("[^-a]", "-")); + BOOST_TEST(quickbook::glob("[^-a]", "b")); + BOOST_TEST(quickbook::glob("[a-]", "a")); + BOOST_TEST(quickbook::glob("[a-]", "-")); + BOOST_TEST(!quickbook::glob("[a-]", "b")); + BOOST_TEST(!quickbook::glob("[^a-]", "a")); + BOOST_TEST(!quickbook::glob("[^a-]", "-")); + BOOST_TEST(quickbook::glob("[^a-]", "b")); + BOOST_TEST(quickbook::glob("[a-ce-f]", "a")); + BOOST_TEST(!quickbook::glob("[a-ce-f]", "d")); + BOOST_TEST(quickbook::glob("[a-ce-f]", "f")); + BOOST_TEST(!quickbook::glob("[a-ce-f]", "g")); + BOOST_TEST(!quickbook::glob("[^a-ce-f]", "a")); + BOOST_TEST(quickbook::glob("[^a-ce-f]", "d")); + BOOST_TEST(!quickbook::glob("[^a-ce-f]", "f")); + BOOST_TEST(quickbook::glob("[^a-ce-f]", "g")); + BOOST_TEST(!quickbook::glob("[b]", "a")); + BOOST_TEST(quickbook::glob("[a]bc", "abc")); + BOOST_TEST(quickbook::glob("a[b]c", "abc")); + BOOST_TEST(quickbook::glob("ab[c]", "abc")); + BOOST_TEST(quickbook::glob("a[a-c]c", "abc")); + BOOST_TEST(quickbook::glob("*[b]*", "abc")); + BOOST_TEST(quickbook::glob("[\\]]", "]")); + BOOST_TEST(!quickbook::glob("[^\\]]", "]")); + + BOOST_TEST(quickbook::glob("b*ana", "banana")); + BOOST_TEST(quickbook::glob("1234*1234*1234", "123412341234")); + BOOST_TEST(!quickbook::glob("1234*1234*1234", "1234123341234")); + BOOST_TEST(quickbook::glob("1234*1234*1234", "123412312312341231231234")); + BOOST_TEST(!quickbook::glob("1234*1234*1234", "12341231231234123123123")); +} + +void invalid_glob_tests() +{ + // Note that glob only throws an exception when the pattern matches up to + // the point where the error occurs. + BOOST_TEST_THROWS(quickbook::glob("[", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[^", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[xyz", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[xyz\\", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[x\\y", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[a-", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[a-z", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[a-\\", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[a-\\a", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("xyx[", "xyxa"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("abc]", "abcd"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("]def", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[[]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[]]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("**", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[/]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[\\/]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[ -/]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("[ -\\/]", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("\\", "a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::glob("\\\\", "a"), quickbook::glob_error); +} + +void check_glob_tests() +{ + BOOST_TEST(!quickbook::check_glob("")); + BOOST_TEST(!quickbook::check_glob("file")); + BOOST_TEST(!quickbook::check_glob("file\\[\\]")); + BOOST_TEST(quickbook::check_glob("[x]")); + BOOST_TEST(quickbook::check_glob("abc[x]")); + BOOST_TEST(quickbook::check_glob("[x]abd")); + BOOST_TEST_THROWS(quickbook::check_glob("["), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[^"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[xyz"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[xyz\\"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[x\\y"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[a-"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[a-z"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[a-\\"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[a-\\a"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("xyx["), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("abc]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("]def"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[[]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[]]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("**"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[/]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[\\/]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[ -/]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("[ -\\/]"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("\\"), quickbook::glob_error); + BOOST_TEST_THROWS(quickbook::check_glob("\\\\"), quickbook::glob_error); +} + +int main() +{ + glob_tests(); + invalid_glob_tests(); + check_glob_tests(); + + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/path_test.cpp b/src/boost/tools/quickbook/test/unit/path_test.cpp new file mode 100644 index 000000000..734769ef6 --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/path_test.cpp @@ -0,0 +1,189 @@ +/*============================================================================= + Copyright (c) 2015 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include +#include "path.hpp" + +void file_path_to_url_tests() +{ + using boost::filesystem::path; + using quickbook::file_path_to_url; + + BOOST_TEST_EQ(std::string(), file_path_to_url(path())); + BOOST_TEST_EQ(std::string("."), file_path_to_url(path("."))); + BOOST_TEST_EQ(std::string("./"), file_path_to_url(path("./"))); + BOOST_TEST_EQ(std::string("a/b"), file_path_to_url(path("a/b"))); + BOOST_TEST_EQ(std::string("a/b/"), file_path_to_url(path("a/b/"))); + BOOST_TEST_EQ(std::string("./a/b"), file_path_to_url(path("./a/./././b"))); + BOOST_TEST_EQ(std::string("../a/b"), file_path_to_url(path("../a/b"))); + BOOST_TEST_EQ( + std::string("A%20B%2bC%2520"), file_path_to_url(path("A B+C%20"))); + BOOST_TEST_EQ(std::string("file:///"), file_path_to_url(path("/"))); + BOOST_TEST_EQ(std::string("file:///a/b"), file_path_to_url(path("/a/b"))); + BOOST_TEST_EQ(std::string("file:///a/b/"), file_path_to_url(path("/a/b/"))); + BOOST_TEST_EQ( + std::string("file://hello/a/b"), file_path_to_url(path("//hello/a/b"))); + +#if BOOST_OS_WINDOWS || BOOST_OS_CYGWIN + // Should this be file:///c:/x ? + BOOST_TEST_EQ( + std::string("file://?/a:/x"), file_path_to_url(path("\\\\?\\a:\\x"))); + BOOST_TEST_EQ(std::string("file:///a"), file_path_to_url(path("\\a"))); + BOOST_TEST_EQ(std::string("file:///c:/"), file_path_to_url(path("c:\\"))); + BOOST_TEST_EQ( + std::string("file:///c:/foo/bar"), + file_path_to_url(path("c:\\foo\\bar"))); + BOOST_TEST_EQ( + std::string("file://localhost/c:/foo/bar"), + file_path_to_url(path("\\\\localhost\\c:\\foo\\bar"))); + + // Really not sure what to do with these examples. + // Maybe an error? + BOOST_TEST_EQ(std::string("file:///c:"), file_path_to_url(path("c:"))); + BOOST_TEST_EQ( + std::string("file:///c:foo/bar"), file_path_to_url(path("c:foo\\bar"))); +#endif +} + +void dir_path_to_url_tests() +{ + using boost::filesystem::path; + using quickbook::dir_path_to_url; + + BOOST_TEST_EQ(std::string("./"), dir_path_to_url(path())); + BOOST_TEST_EQ(std::string("./"), dir_path_to_url(path("."))); + BOOST_TEST_EQ(std::string("./"), dir_path_to_url(path("./"))); + BOOST_TEST_EQ(std::string("a/b/"), dir_path_to_url(path("a/b"))); + BOOST_TEST_EQ(std::string("a/b/"), dir_path_to_url(path("a/b/"))); + BOOST_TEST_EQ(std::string("./a/b/"), dir_path_to_url(path("./a/./././b"))); + BOOST_TEST_EQ(std::string("../a/b/"), dir_path_to_url(path("../a/b"))); + BOOST_TEST_EQ( + std::string("A%20B%2bC%2520/"), dir_path_to_url(path("A B+C%20"))); + BOOST_TEST_EQ(std::string("file:///"), dir_path_to_url(path("/"))); + BOOST_TEST_EQ(std::string("file:///a/b/"), dir_path_to_url(path("/a/b"))); + BOOST_TEST_EQ(std::string("file:///a/b/"), dir_path_to_url(path("/a/b/"))); + BOOST_TEST_EQ( + std::string("file://hello/a/b/"), dir_path_to_url(path("//hello/a/b"))); + +#if BOOST_OS_WINDOWS || BOOST_OS_CYGWIN + // Should this be file:///c:/x/ ? + BOOST_TEST_EQ( + std::string("file://?/a:/x/"), dir_path_to_url(path("\\\\?\\a:\\x"))); + BOOST_TEST_EQ(std::string("file:///a/"), dir_path_to_url(path("\\a"))); + BOOST_TEST_EQ(std::string("file:///c:/"), dir_path_to_url(path("c:\\"))); + BOOST_TEST_EQ( + std::string("file:///c:/foo/bar/"), + dir_path_to_url(path("c:\\foo\\bar"))); + BOOST_TEST_EQ( + std::string("file://localhost/c:/foo/bar/"), + dir_path_to_url(path("\\\\localhost\\c:\\foo\\bar"))); + + // Really not sure what to do with these examples. + // Maybe an error? + BOOST_TEST_EQ(std::string("file:///c:"), dir_path_to_url(path("c:"))); + BOOST_TEST_EQ( + std::string("file:///c:foo/bar/"), dir_path_to_url(path("c:foo\\bar"))); +#endif +} + +void path_difference_tests() +{ + using boost::filesystem::current_path; + using boost::filesystem::path; + using quickbook::path_difference; + + BOOST_TEST(path(".") == path_difference(path(""), path(""))); + BOOST_TEST(path(".") == path_difference(path("a"), path("a"))); + BOOST_TEST(path(".") == path_difference(path("a/../b"), path("b"))); + BOOST_TEST(path(".") == path_difference(current_path(), current_path())); + BOOST_TEST(path("..") == path_difference(path("a"), path(""))); + BOOST_TEST( + path("..") == path_difference(current_path() / "a", current_path())); + BOOST_TEST(path("a") == path_difference(path(""), path("a"))); + BOOST_TEST( + path("a") == path_difference(current_path(), current_path() / "a")); + BOOST_TEST(path("b") == path_difference(path("a"), path("a/b"))); + BOOST_TEST( + path("b") == + path_difference(current_path() / "a", current_path() / "a" / "b")); + BOOST_TEST(path("../a/b") == path_difference(path("c"), path("a/b"))); + BOOST_TEST( + path("../a/b") == + path_difference(current_path() / "c", current_path() / "a" / "b")); + BOOST_TEST(path("..") == path_difference(path(""), path(".."))); + BOOST_TEST( + path("..") == + path_difference(current_path(), current_path().parent_path())); + BOOST_TEST(path("b") == path_difference(path("a/c/.."), path("a/b"))); + BOOST_TEST(path("b") == path_difference(path("b/c/../../a"), path("a/b"))); + BOOST_TEST( + path("b") == + path_difference(path("b/c/../../a"), path("d/f/../../a/b"))); + BOOST_TEST( + path("../../x/a/b") == + path_difference(path("b/c/../../a"), path("d/f/../../../x/a/b"))); + + // path_difference to a file, try to include the filename in the result, + // although not always possible. Maybe nonsense calls should be an error? + // + // Commented out cases are wrong because path_difference resolves the paths + // to the current working directory. In use this doesn't matter as it's + // always called with the full path, but it'd be nice to get this right. + // Or maybe just add the pre-condition to path_difference? + std::cout << path_difference(path(""), path(""), true) << std::endl; + // BOOST_TEST(path(".") == path_difference(path(""), path(""), true)); + BOOST_TEST(path("../a") == path_difference(path("a"), path("a"), true)); + BOOST_TEST( + path("../../a") == path_difference(path("a/b"), path("a"), true)); + BOOST_TEST( + path("../b") == path_difference(path("a/../b"), path("b"), true)); + BOOST_TEST( + ".." / current_path().filename() == + path_difference(current_path(), current_path(), true)); + // BOOST_TEST(path("..") == path_difference(path("a"), path(""), true)); + BOOST_TEST( + "../.." / current_path().filename() == + path_difference(current_path() / "a", current_path(), true)); + BOOST_TEST(path("a") == path_difference(path(""), path("a"), true)); + BOOST_TEST( + path("a") == + path_difference(current_path(), current_path() / "a", true)); + BOOST_TEST(path("b") == path_difference(path("a"), path("a/b"), true)); + BOOST_TEST( + path("b") == + path_difference( + current_path() / "a", current_path() / "a" / "b", true)); + BOOST_TEST(path("../a/b") == path_difference(path("c"), path("a/b"), true)); + BOOST_TEST( + path("../a/b") == + path_difference( + current_path() / "c", current_path() / "a" / "b", true)); + // BOOST_TEST(path("..") == path_difference(path(""), path(".."), true)); + BOOST_TEST( + "../.." / current_path().parent_path().filename() == + path_difference(current_path(), current_path().parent_path(), true)); + BOOST_TEST(path("b") == path_difference(path("a/c/.."), path("a/b"), true)); + BOOST_TEST( + path("b") == path_difference(path("b/c/../../a"), path("a/b"), true)); + BOOST_TEST( + path("b") == + path_difference(path("b/c/../../a"), path("d/f/../../a/b"), true)); + BOOST_TEST( + path("../../x/a/b") == + path_difference(path("b/c/../../a"), path("d/f/../../../x/a/b"), true)); +} + +int main() +{ + file_path_to_url_tests(); + dir_path_to_url_tests(); + path_difference_tests(); + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/post_process_test.cpp b/src/boost/tools/quickbook/test/unit/post_process_test.cpp new file mode 100644 index 000000000..e7681c72d --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/post_process_test.cpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include "post_process.hpp" + +#define EXPECT_EXCEPTION(test, msg) \ + try { \ + test; \ + BOOST_ERROR(msg); \ + } catch (quickbook::post_process_failure&) { \ + } + +int main() +{ + EXPECT_EXCEPTION( + quickbook::post_process(""), "Succeeded with unbalanced tag"); + EXPECT_EXCEPTION( + quickbook::post_process("<"), "Succeeded with badly formed tag"); + + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/source_map_test.cpp b/src/boost/tools/quickbook/test/unit/source_map_test.cpp new file mode 100644 index 000000000..6248ac1f6 --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/source_map_test.cpp @@ -0,0 +1,444 @@ +/*============================================================================= + Copyright (c) 2012 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include "files.hpp" +#include "fwd.hpp" +#include "string_view.hpp" + +void simple_map_tests() +{ + quickbook::string_view source("First Line\nSecond Line"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + + quickbook::string_iterator line1 = fake_file->source().begin(); + quickbook::string_iterator line1_end = + boost::find(fake_file->source(), '\n'); + quickbook::string_iterator line2 = line1_end + 1; + quickbook::string_iterator line2_end = fake_file->source().end(); + + quickbook::mapped_file_builder builder; + + { // Empty test + builder.start(fake_file); + BOOST_TEST(builder.empty()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST(f1->source().empty()); + } + + { // Add full text + builder.start(fake_file); + builder.add(quickbook::string_view(line1, line2_end - line1)); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ(f1->source(), source); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 2), + quickbook::file_position(1, 3)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line1_end - line1)), + quickbook::file_position(1, line1_end - line1 + 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2 - line1)), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + fake_file->position_of(fake_file->source().end())); + } + + { // Add first line + builder.start(fake_file); + builder.add(quickbook::string_view(line1, line1_end - line1)); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), + quickbook::string_view(source.begin(), line1_end - line1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 2), + quickbook::file_position(1, 3)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(1, line1_end - line1 + 1)); + } + + { // Add second line + builder.start(fake_file); + builder.add(quickbook::string_view(line2, line2_end - line2)); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ(f1->source(), quickbook::string_view("Second Line")); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 2), + quickbook::file_position(2, 3)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(2, line2_end - line2 + 1)); + } + + { // Out of order + builder.start(fake_file); + builder.add(quickbook::string_view(line2, line2_end - line2)); + builder.add(quickbook::string_view(line1_end, 1)); + builder.add(quickbook::string_view(line1, line1_end - line1)); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Second Line\nFirst Line")); + + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 2), + quickbook::file_position(2, 3)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2_end - line2 - 1)), + quickbook::file_position(2, line2_end - line2)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2_end - line2)), + quickbook::file_position(1, (line1_end - line1 + 1))); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2_end - line2 + 1)), + quickbook::file_position(1, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(1, line1_end - line1 + 1)); + } + + { // Repeated text + builder.start(fake_file); + builder.add(quickbook::string_view(line2, line2_end - line2)); + builder.add(quickbook::string_view(line1_end, 1)); + builder.add(quickbook::string_view(line2, line2_end - line2)); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Second Line\nSecond Line")); + + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 2), + quickbook::file_position(2, 3)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2_end - line2 - 1)), + quickbook::file_position(2, line2_end - line2)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2_end - line2)), + quickbook::file_position(1, (line1_end - line1 + 1))); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + (line2_end - line2 + 1)), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(2, line2_end - line2 + 1)); + } + + { // Generated text + builder.start(fake_file); + builder.add_at_pos("------\n", line1); + builder.add(quickbook::string_view(line1, line1_end - line1)); + builder.add_at_pos("\n------\n", line1_end); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), + quickbook::string_view("------\nFirst Line\n------\n")); + + quickbook::string_iterator newline = boost::find(f1->source(), '\n'); + + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 2), + quickbook::file_position(1, 1)); + BOOST_TEST_EQ(f1->position_of(newline), quickbook::file_position(1, 1)); + BOOST_TEST_EQ( + f1->position_of(newline + 1), quickbook::file_position(1, 1)); + BOOST_TEST_EQ( + f1->position_of(newline + 2), quickbook::file_position(1, 2)); + BOOST_TEST_EQ( + f1->position_of(newline + (line1_end - line1)), + quickbook::file_position(1, line1_end - line1)); + BOOST_TEST_EQ( + f1->position_of(newline + (line1_end - line1 + 1)), + quickbook::file_position(1, line1_end - line1 + 1)); + BOOST_TEST_EQ( + f1->position_of(newline + (line1_end - line1 + 2)), + quickbook::file_position(1, line1_end - line1 + 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(1, line1_end - line1 + 1)); + } +} + +void indented_map_tests() +{ + quickbook::string_view source(" Code line1\n" + " Code line2\n"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + + quickbook::mapped_file_builder builder; + + { + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line1\nCode line2\n")); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 4)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 1), + quickbook::file_position(1, 5)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 5), + quickbook::file_position(1, 9)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 10), + quickbook::file_position(1, 14)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 11), + quickbook::file_position(2, 4)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(3, 1)); + } + + { + builder.start(fake_file); + { + quickbook::mapped_file_builder builder2; + builder2.start(fake_file); + builder2.unindent_and_add(fake_file->source()); + builder.add(builder2); + } + quickbook::file_ptr f1 = builder.release(); + + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line1\nCode line2\n")); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 4)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 1), + quickbook::file_position(1, 5)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 5), + quickbook::file_position(1, 9)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 10), + quickbook::file_position(1, 14)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 11), + quickbook::file_position(2, 4)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(3, 1)); + } + + { + builder.start(fake_file); + builder.unindent_and_add(quickbook::string_view( + fake_file->source().begin() + 3, + fake_file->source().end() - (fake_file->source().begin() + 3))); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), + quickbook::string_view("Code line1\n Code line2\n")); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 4)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 1), + quickbook::file_position(1, 5)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 5), + quickbook::file_position(1, 9)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 10), + quickbook::file_position(1, 14)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 11), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().end()), + quickbook::file_position(3, 1)); + } +} + +void indented_map_tests2() +{ + quickbook::string_view source(" Code line1\n" + "\n" + " Code line2\n"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + + quickbook::mapped_file_builder builder; + + { + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line1\n\nCode line2\n")); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin()), + quickbook::file_position(1, 4)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 1), + quickbook::file_position(1, 5)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 5), + quickbook::file_position(1, 9)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 10), + quickbook::file_position(1, 14)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 11), + quickbook::file_position(2, 1)); + BOOST_TEST_EQ( + f1->position_of(f1->source().begin() + 12), + quickbook::file_position(3, 4)); + } +} + +void indented_map_leading_blanks_test() +{ + quickbook::mapped_file_builder builder; + + { + quickbook::string_view source("\n\n Code line1\n"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n")); + } + + { + quickbook::string_view source(" \n \n Code line1\n"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n")); + } + + { + quickbook::string_view source(" Code line1\n \n Code line2"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line1\n\nCode line2")); + } +} + +void indented_map_trailing_blanks_test() +{ + quickbook::mapped_file_builder builder; + + { + quickbook::string_view source("\n\n Code line1\n "); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n")); + } + + { + quickbook::string_view source(" \n \n Code line1\n "); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n ")); + } + + { + quickbook::string_view source(" Code line1\n \n Code line2\n "); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line1\n\nCode line2\n")); + } +} + +void indented_map_mixed_test() +{ + quickbook::mapped_file_builder builder; + + { + quickbook::string_view source("\tCode line 1\n Code line 2\n\t " + "Code line 3\n \tCode line 4"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), + quickbook::string_view( + "Code line 1\nCode line 2\n Code line 3\n Code line 4")); + } + + { + quickbook::string_view source(" Code line 1\n\tCode line 2"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line 1\n Code line 2")); + } + + { + quickbook::string_view source(" Code line 1\n \tCode line 2"); + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + builder.start(fake_file); + builder.unindent_and_add(fake_file->source()); + quickbook::file_ptr f1 = builder.release(); + BOOST_TEST_EQ( + f1->source(), quickbook::string_view("Code line 1\n\tCode line 2")); + } +} + +int main() +{ + simple_map_tests(); + indented_map_tests(); + indented_map_tests2(); + indented_map_leading_blanks_test(); + indented_map_trailing_blanks_test(); + indented_map_mixed_test(); + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp b/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp new file mode 100644 index 000000000..0be8ab1e5 --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2004 Joao Abecasis + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include +#include "symbols.hpp" + +typedef char char_type; +typedef char const* iterator; + +char_type data_[] = "whatever"; + +iterator begin = data_; +iterator end = + data_ + + sizeof(data_) / sizeof(char_type); // Yes, this is an intentional bug ;) + +int main() +{ + typedef BOOST_SPIRIT_CLASSIC_NS::scanner<> scanner; + typedef quickbook::tst symbols; + + symbols symbols_; + + symbols_.add(begin, end - 1, (void*)boost::addressof(symbols_)); + + // The symbol table parser should not choke on input containing the null + // character. + symbols_.find(scanner(begin, end)); +} diff --git a/src/boost/tools/quickbook/test/unit/symbols_tests.cpp b/src/boost/tools/quickbook/test/unit/symbols_tests.cpp new file mode 100644 index 000000000..41f37b5e7 --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/symbols_tests.cpp @@ -0,0 +1,374 @@ +/*============================================================================= + Copyright (c) 1998-2003 Joel de Guzman + Copyright (c) 2003 Martin Wille + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#include +#include +#include +#include +#include +#include +#include "symbols.hpp" + +/////////////////////////////////////////////////////////////////////////////// +using namespace std; +using namespace BOOST_SPIRIT_CLASSIC_NS; + +/////////////////////////////////////////////////////////////////////////////// + +template bool equal(IteratorT p, IteratorT q) +{ + while (*p && *p == *q) { + ++p; + ++q; + } + return *p == *q; +} + +template +void docheck( + SymbolsT const& sym, + CharT const* candidate, + bool hit, + CharT const* result, + int length) +{ + parse_info info = parse(candidate, sym); + +#define correctly_matched hit == info.hit +#define correct_match_length unsigned(length) == info.length +#define correct_tail equal(candidate + (hit ? 1 : 0) * length, result) + + BOOST_TEST(correctly_matched); + + if (hit) { + BOOST_TEST(correct_match_length); + BOOST_TEST(correct_tail); + } + else { + BOOST_TEST(correct_tail); + } +} + +template struct store_action +{ + store_action(T const& v) : value(v) {} + void operator()(T& v) const { v = value; } + + private: + T const value; +}; + +template store_action store(T const& v) { return v; } + +template struct check_action +{ + check_action(T const& v) : value(v) {} + +#define correct_value_stored (v == value) + void operator()(T const& v) const { BOOST_TEST(correct_value_stored); } + + private: + T const value; +}; + +template check_action docheck(T const& v) { return v; } + +static void default_constructible() +{ // this actually a compile time test + symbols > ns1; + symbols > ws1; + symbols > ns2; + symbols > ws2; + + (void)ns1; + (void)ws1; + (void)ns2; + (void)ws2; +} + +typedef symbols > nsymbols; +typedef symbols > wsymbols; + +static void narrow_match_tests() +{ + nsymbols sym; + sym = "pineapple", "orange", "banana", "applepie", "apple"; + + docheck(sym, "pineapple", true, "", 9); + docheck(sym, "orange", true, "", 6); + docheck(sym, "banana", true, "", 6); + docheck(sym, "apple", true, "", 5); + docheck(sym, "pizza", false, "pizza", -1); + docheck(sym, "steak", false, "steak", -1); + docheck(sym, "applepie", true, "", 8); + docheck(sym, "bananarama", true, "rama", 6); + docheck(sym, "applet", true, "t", 5); + docheck(sym, "applepi", true, "pi", 5); + docheck(sym, "appl", false, "appl", -1); + + docheck(sym, "pineapplez", true, "z", 9); + docheck(sym, "orangez", true, "z", 6); + docheck(sym, "bananaz", true, "z", 6); + docheck(sym, "applez", true, "z", 5); + docheck(sym, "pizzaz", false, "pizzaz", -1); + docheck(sym, "steakz", false, "steakz", -1); + docheck(sym, "applepiez", true, "z", 8); + docheck(sym, "bananaramaz", true, "ramaz", 6); + docheck(sym, "appletz", true, "tz", 5); + docheck(sym, "applepix", true, "pix", 5); +} + +static void narrow_copy_ctor_tests() +{ + nsymbols sym; + sym = "pineapple", "orange", "banana", "applepie", "apple"; + + nsymbols sym2(sym); + docheck(sym2, "pineapple", true, "", 9); + docheck(sym2, "pizza", false, "pizza", -1); + docheck(sym2, "bananarama", true, "rama", 6); +} + +static void narrow_assigment_operator_tests() +{ + nsymbols sym; + sym = "pineapple", "orange", "banana", "applepie", "apple"; + + nsymbols sym2; + sym2 = sym; + + docheck(sym2, "pineapple", true, "", 9); + docheck(sym2, "pizza", false, "pizza", -1); + docheck(sym2, "bananarama", true, "rama", 6); +} + +static void narrow_swap_tests() +{ + nsymbols sym, sym2; + sym = "pineapple", "orange", "banana", "applepie", "apple"; + sym2 = "potato", "cucumber", "cauliflower", "carrot"; + + boost::swap(sym, sym2); + + docheck(sym2, "pineapple", true, "", 9); + docheck(sym2, "pizza", false, "pizza", -1); + docheck(sym2, "bananarama", true, "rama", 6); + docheck(sym, "potatoe", true, "e", 6); + docheck(sym, "cauliflour", false, "cauliflour", -1); +} + +static void narrow_value_tests() +{ // also tests the add member functions + nsymbols sym; + + sym = "orange", "banana"; + sym.add("pineapple", 1234); + sym.add("lemon"); + + parse("orange", sym[store(12345)]); + parse("orange", sym[docheck(12345)]); + parse("pineapple", sym[docheck(1234)]); + parse("banana", sym[docheck(int())]); + parse("lemon", sym[docheck(int())]); +} + +static void narrow_free_functions_tests() +{ + nsymbols sym; + +#define add_returned_non_null_value (res != 0) +#define add_returned_null (res == 0) +#define find_returned_non_null_value (res != 0) +#define find_returned_null (res == 0) + + int* res = add(sym, "pineapple"); + BOOST_TEST(add_returned_non_null_value); + res = add(sym, "pineapple"); + BOOST_TEST(add_returned_null); + + res = find(sym, "pineapple"); + BOOST_TEST(find_returned_non_null_value); + res = find(sym, "banana"); + BOOST_TEST(find_returned_null); +} + +static void wide_match_tests() +{ + wsymbols sym; + sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple"; + + docheck(sym, L"pineapple", true, L"", 9); + docheck(sym, L"orange", true, L"", 6); + docheck(sym, L"banana", true, L"", 6); + docheck(sym, L"apple", true, L"", 5); + docheck(sym, L"pizza", false, L"pizza", -1); + docheck(sym, L"steak", false, L"steak", -1); + docheck(sym, L"applepie", true, L"", 8); + docheck(sym, L"bananarama", true, L"rama", 6); + docheck(sym, L"applet", true, L"t", 5); + docheck(sym, L"applepi", true, L"pi", 5); + docheck(sym, L"appl", false, L"appl", -1); + + docheck(sym, L"pineapplez", true, L"z", 9); + docheck(sym, L"orangez", true, L"z", 6); + docheck(sym, L"bananaz", true, L"z", 6); + docheck(sym, L"applez", true, L"z", 5); + docheck(sym, L"pizzaz", false, L"pizzaz", -1); + docheck(sym, L"steakz", false, L"steakz", -1); + docheck(sym, L"applepiez", true, L"z", 8); + docheck(sym, L"bananaramaz", true, L"ramaz", 6); + docheck(sym, L"appletz", true, L"tz", 5); + docheck(sym, L"applepix", true, L"pix", 5); +} + +static void wide_copy_ctor_tests() +{ + wsymbols sym; + sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple"; + + wsymbols sym2(sym); + docheck(sym2, L"pineapple", true, L"", 9); + docheck(sym2, L"pizza", false, L"pizza", -1); + docheck(sym2, L"bananarama", true, L"rama", 6); +} + +static void wide_assigment_operator_tests() +{ + wsymbols sym; + sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple"; + + wsymbols sym2; + sym2 = sym; + + docheck(sym2, L"pineapple", true, L"", 9); + docheck(sym2, L"pizza", false, L"pizza", -1); + docheck(sym2, L"bananarama", true, L"rama", 6); +} + +static void wide_swap_tests() +{ + wsymbols sym, sym2; + sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple"; + sym2 = L"potato", L"cucumber", L"cauliflower", L"carrot"; + + boost::swap(sym, sym2); + + docheck(sym2, L"pineapple", true, L"", 9); + docheck(sym2, L"pizza", false, L"pizza", -1); + docheck(sym2, L"bananarama", true, L"rama", 6); + docheck(sym, L"potatoe", true, L"e", 6); + docheck(sym, L"cauliflour", false, L"cauliflour", -1); +} + +static void wide_value_tests() +{ // also tests the add member functions + wsymbols sym; + + sym = L"orange", L"banana"; + sym.add(L"pineapple", 1234); + sym.add(L"lemon"); + + parse(L"orange", sym[store(12345)]); + parse(L"orange", sym[docheck(12345)]); + parse(L"pineapple", sym[docheck(1234)]); + parse(L"banana", sym[docheck(int())]); + parse(L"lemon", sym[docheck(int())]); +} + +static void wide_free_functions_tests() +{ + wsymbols sym; + + int* res = add(sym, L"pineapple"); + BOOST_TEST(add_returned_non_null_value); + res = add(sym, L"pineapple"); + BOOST_TEST(add_returned_null); + + res = find(sym, L"pineapple"); + BOOST_TEST(find_returned_non_null_value); + res = find(sym, L"banana"); + BOOST_TEST(find_returned_null); +} + +static void free_add_find_functions_tests() +{ + nsymbols sym; + BOOST_TEST(*add(sym, "a", 0) == 0); + BOOST_TEST(*add(sym, "a2", 1) == 1); + BOOST_TEST(add(sym, "a2", 2) == 0); + BOOST_TEST(find(sym, "a2")); + BOOST_TEST(find(sym, "a")); +} + +// The original teneray search tree implementation contained a bug when +// inserting duplicate values. I want this implementation to be as +// close as possible to the original (so they can be easily switched) +// so check that the bug remains the same. + +struct check_parse_value +{ + explicit check_parse_value(int value) : value_(value) {} + + void operator()(int value) const { BOOST_TEST(value == value_); } + + int value_; +}; + +// My version is different to the original, if there's an existing value +// it replaces it with the new one. + +static void duplicate_add_tests() +{ + char const* foo1 = "foo"; + char const* foo2 = foo1 + 3; + + nsymbols sym; + sym.add(foo1, foo2, 1); + nsymbols sym2 = sym; + sym.add(foo1, foo2, 2); + sym2.add(foo1, foo2, 3); + + BOOST_TEST(find(sym, "foo") && *find(sym, "foo") == 2); + BOOST_TEST(find(sym2, "foo") && *find(sym2, "foo") == 3); + + parse_info info; + + info = parse("foo ", sym[check_parse_value(2)]); + BOOST_TEST(info.hit && info.length == 3); + + info = parse("foo", sym[check_parse_value(2)]); + BOOST_TEST(info.hit && info.length == 3); + + info = parse("foo ", sym2[check_parse_value(3)]); + BOOST_TEST(info.hit && info.length == 3); + + info = parse("foo", sym2[check_parse_value(3)]); + BOOST_TEST(info.hit && info.length == 3); +} + +int main() +{ + default_constructible(); + narrow_match_tests(); + narrow_copy_ctor_tests(); + narrow_assigment_operator_tests(); + narrow_swap_tests(); + narrow_value_tests(); + narrow_free_functions_tests(); + wide_match_tests(); + wide_copy_ctor_tests(); + wide_assigment_operator_tests(); + wide_swap_tests(); + wide_value_tests(); + wide_free_functions_tests(); + free_add_find_functions_tests(); + duplicate_add_tests(); + + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/utils_test.cpp b/src/boost/tools/quickbook/test/unit/utils_test.cpp new file mode 100644 index 000000000..6a54dccfe --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/utils_test.cpp @@ -0,0 +1,67 @@ + +/*============================================================================= + Copyright (c) 2017 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include +#include "utils.hpp" + +#include + +void linkify_test() +{ + using quickbook::detail::linkify; + + BOOST_TEST(linkify("abc", "link") == "abc"); + BOOST_TEST( + linkify("abc", "link") == + "abc"); + BOOST_TEST( + linkify("abc def", "link") == + "abc def"); + BOOST_TEST( + linkify("abc def", "link") == + "abc def"); +} + +void decode_string_test() +{ + using quickbook::detail::decode_string; + BOOST_TEST_EQ(std::string(""), decode_string("<A&B>")); + BOOST_TEST_EQ(std::string(""), decode_string("<A&B>")); + BOOST_TEST_EQ(std::string("a"), decode_string("a")); + BOOST_TEST_EQ(std::string("OO"), decode_string("OO")); + // Unicode examples taken from wikipedia. + // https://en.wikipedia.org/wiki/UTF-8#Examples + BOOST_TEST_EQ( + std::string("\x24\xc2\xa2\xe2\x82\xAC\xF0\x90\x8D\x88"), + decode_string("$¢€𐍈")); +} + +void encode_string_test() +{ + using quickbook::detail::encode_string; + BOOST_TEST_EQ(std::string("<A&B>"), encode_string("")); +} + +void escape_uri_test() +{ + using quickbook::detail::escape_uri; + using quickbook::detail::partially_escape_uri; + + BOOST_TEST_EQ(std::string("%2520%2525%25"), escape_uri("%20%25%")); + BOOST_TEST_EQ(std::string("%20%25%25"), partially_escape_uri("%20%25%")); +} + +int main() +{ + linkify_test(); + decode_string_test(); + encode_string_test(); + escape_uri_test(); + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unit/values_test.cpp b/src/boost/tools/quickbook/test/unit/values_test.cpp new file mode 100644 index 000000000..d0036d428 --- /dev/null +++ b/src/boost/tools/quickbook/test/unit/values_test.cpp @@ -0,0 +1,128 @@ +/*============================================================================= + Copyright (c) 2010-2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +// Some very light testing for quickbook::value and friends. +// Just for a few issues that came up during development. + +#include +#include +#include +#include "files.hpp" +#include "values.hpp" + +void empty_tests() +{ + quickbook::value q; + BOOST_TEST(q.empty()); + BOOST_TEST(!q.is_list()); + BOOST_TEST(!q.is_encoded()); +} + +void qbk_tests() +{ + std::string source = "Source"; + quickbook::value q; + { + quickbook::file_ptr fake_file = + new quickbook::file("(fake file)", source, 105u); + q = quickbook::qbk_value( + fake_file, fake_file->source().begin(), fake_file->source().end()); + } + BOOST_TEST_EQ(q.get_quickbook(), quickbook::string_view(source)); +} + +void sort_test() +{ + quickbook::value_builder b; + b.insert(quickbook::encoded_value("a", 10)); + b.insert(quickbook::encoded_value("b", 2)); + b.insert(quickbook::encoded_value("c", 5)); + b.insert(quickbook::encoded_value("d", 8)); + b.sort_list(); + + quickbook::value_consumer c = b.release(); + BOOST_TEST(c.check(2)); + BOOST_TEST_EQ(c.consume(2).get_encoded(), "b"); + BOOST_TEST(c.check(5)); + c.consume(5); + BOOST_TEST(c.check(8)); + c.consume(8); + BOOST_TEST(c.check(10)); + c.consume(10); + BOOST_TEST(!c.check()); +} + +void multiple_list_test() +{ + quickbook::value_builder list1; + quickbook::value_builder list2; + + list1.insert(quickbook::encoded_value("b", 10)); + + { + quickbook::value p1 = quickbook::encoded_value("a", 5); + list1.insert(p1); + list2.insert(p1); + } + + list2.insert(quickbook::encoded_value("c", 3)); + + quickbook::value_consumer l1 = list1.release(); + quickbook::value_consumer l2 = list2.release(); + + BOOST_TEST(l1.check(10)); + BOOST_TEST_EQ(l1.consume(10).get_encoded(), "b"); + BOOST_TEST(l1.check(5)); + BOOST_TEST_EQ(l1.consume(5).get_encoded(), "a"); + BOOST_TEST(!l1.check()); + + BOOST_TEST(l2.check(5)); + BOOST_TEST_EQ(l2.consume(5).get_encoded(), "a"); + BOOST_TEST(l2.check(3)); + BOOST_TEST_EQ(l2.consume(3).get_encoded(), "c"); + BOOST_TEST(!l2.check()); +} + +void equality_tests() +{ + std::vector distinct_values; + + quickbook::value_builder builder; + quickbook::value nil; + + // 0: nil + distinct_values.push_back(nil); + + // 1: [] + distinct_values.push_back(builder.release()); + + // 2: [nil] + builder.insert(nil); + distinct_values.push_back(builder.release()); + + for (std::size_t i = 0; i < distinct_values.size(); ++i) { + for (std::size_t j = 0; j < distinct_values.size(); ++j) { + if ((i == j) != (distinct_values[i] == distinct_values[j])) { + BOOST_ERROR("Value mismatch."); + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "\tat " << i << ", " << j + << std::endl; + } + } + } +} + +int main() +{ + empty_tests(); + qbk_tests(); + sort_test(); + multiple_list_test(); + equality_tests(); + + return boost::report_errors(); +} diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_5.gold b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold new file mode 100644 index 000000000..735503ac5 --- /dev/null +++ b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold @@ -0,0 +1,12 @@ + + +
    + Unmatched elements + + [non-element] + + + [non-element] + +
    diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html new file mode 100644 index 000000000..a705860f6 --- /dev/null +++ b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html @@ -0,0 +1,15 @@ + + + + +

    + Unmatched elements +

    +

    + [non-element] +

    +

    + [non-element] +

    + + diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook b/src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook new file mode 100644 index 000000000..84ea298d0 --- /dev/null +++ b/src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook @@ -0,0 +1,12 @@ +[article Unmatched elements +[quickbook 1.5] +] + +[template identity[x] + +[x] +] + +[* [non-element]] + +[identity [non-element]] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_6.gold b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold new file mode 100644 index 000000000..ad52f651a --- /dev/null +++ b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold @@ -0,0 +1,12 @@ + + +
    + Unmatched elements + + [non-element] + + + [non-element] + +
    diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html new file mode 100644 index 000000000..20a7f3223 --- /dev/null +++ b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html @@ -0,0 +1,15 @@ + + + + +

    + Unmatched elements +

    +

    + [non-element] +

    +

    + [non-element] +

    + + diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook b/src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook new file mode 100644 index 000000000..689e9828a --- /dev/null +++ b/src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook @@ -0,0 +1,12 @@ +[article Unmatched elements +[quickbook 1.6] +] + +[template identity[x] + +[x] +] + +[* [non-element]] + +[identity [non-element]] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook b/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook new file mode 100644 index 000000000..be2bcbc44 Binary files /dev/null and b/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook differ diff --git a/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook b/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook new file mode 100644 index 000000000..d9782a465 Binary files /dev/null and b/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook differ diff --git a/src/boost/tools/quickbook/test/utf8-1_5.gold b/src/boost/tools/quickbook/test/utf8-1_5.gold new file mode 100644 index 000000000..088b314b3 --- /dev/null +++ b/src/boost/tools/quickbook/test/utf8-1_5.gold @@ -0,0 +1,130 @@ + + +
    + UTF-8 test + + Iñtërnâtiônàlizætiøn + + + + + Αα Alpha + + + + + Ββ Beta + + + + + Γγ Gamma + + + + + Δδ Delta + + + + + Εε Epsilon + + + + + Ζζ Zeta + + + + + Ηη Eta + + + + + Θθ Theta + + + + + Ιι Iota + + + + + Κκ Kappa + + + + + Λλ Lambda + + + + + Μμ Mu + + + + + Νν Nu + + + + + Ξξ Xi + + + + + Οο Omicron + + + + + Ππ Pi + + + + + Ρρ Rho + + + + + Σσς Sigma + + + + + Ττ Tau + + + + + Υυ Upsilon + + + + + Φφ Phi + + + + + Χχ Chi + + + + + Ψψ Psi + + + + + Ωω Omega + + + +
    diff --git a/src/boost/tools/quickbook/test/utf8-1_5.gold-html b/src/boost/tools/quickbook/test/utf8-1_5.gold-html new file mode 100644 index 000000000..adf6b9569 --- /dev/null +++ b/src/boost/tools/quickbook/test/utf8-1_5.gold-html @@ -0,0 +1,134 @@ + + + + +

    + UTF-8 test +

    +

    + Iñtërnâtiônàlizætiøn +

    +
      +
    • +
      + Αα Alpha +
      +
    • +
    • +
      + Ββ Beta +
      +
    • +
    • +
      + Γγ Gamma +
      +
    • +
    • +
      + Δδ Delta +
      +
    • +
    • +
      + Εε Epsilon +
      +
    • +
    • +
      + Ζζ Zeta +
      +
    • +
    • +
      + Ηη Eta +
      +
    • +
    • +
      + Θθ Theta +
      +
    • +
    • +
      + Ιι Iota +
      +
    • +
    • +
      + Κκ Kappa +
      +
    • +
    • +
      + Λλ Lambda +
      +
    • +
    • +
      + Μμ Mu +
      +
    • +
    • +
      + Νν Nu +
      +
    • +
    • +
      + Ξξ Xi +
      +
    • +
    • +
      + Οο Omicron +
      +
    • +
    • +
      + Ππ Pi +
      +
    • +
    • +
      + Ρρ Rho +
      +
    • +
    • +
      + Σσς Sigma +
      +
    • +
    • +
      + Ττ Tau +
      +
    • +
    • +
      + Υυ Upsilon +
      +
    • +
    • +
      + Φφ Phi +
      +
    • +
    • +
      + Χχ Chi +
      +
    • +
    • +
      + Ψψ Psi +
      +
    • +
    • +
      + Ωω Omega +
      +
    • +
    + + diff --git a/src/boost/tools/quickbook/test/utf8-1_5.quickbook b/src/boost/tools/quickbook/test/utf8-1_5.quickbook new file mode 100644 index 000000000..96f02f4f4 --- /dev/null +++ b/src/boost/tools/quickbook/test/utf8-1_5.quickbook @@ -0,0 +1,30 @@ +[article UTF-8 test + [quickbook 1.5] +] + +[heading Iñtërnâtiônàlizætiøn] + +* Αα Alpha +* Ββ Beta +* Γγ Gamma +* Δδ Delta +* Εε Epsilon +* Ζζ Zeta +* Ηη Eta +* Θθ Theta +* Ιι Iota +* Κκ Kappa +* Λλ Lambda +* Μμ Mu +* Νν Nu +* Ξξ Xi +* Οο Omicron +* Ππ Pi +* Ρρ Rho +* Σσς Sigma +* Ττ Tau +* Υυ Upsilon +* Φφ Phi +* Χχ Chi +* Ψψ Psi +* Ωω Omega \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/utf8_bom-1_5.gold b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold new file mode 100644 index 000000000..088b314b3 --- /dev/null +++ b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold @@ -0,0 +1,130 @@ + + +
    + UTF-8 test + + Iñtërnâtiônàlizætiøn + + + + + Αα Alpha + + + + + Ββ Beta + + + + + Γγ Gamma + + + + + Δδ Delta + + + + + Εε Epsilon + + + + + Ζζ Zeta + + + + + Ηη Eta + + + + + Θθ Theta + + + + + Ιι Iota + + + + + Κκ Kappa + + + + + Λλ Lambda + + + + + Μμ Mu + + + + + Νν Nu + + + + + Ξξ Xi + + + + + Οο Omicron + + + + + Ππ Pi + + + + + Ρρ Rho + + + + + Σσς Sigma + + + + + Ττ Tau + + + + + Υυ Upsilon + + + + + Φφ Phi + + + + + Χχ Chi + + + + + Ψψ Psi + + + + + Ωω Omega + + + +
    diff --git a/src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html new file mode 100644 index 000000000..adf6b9569 --- /dev/null +++ b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html @@ -0,0 +1,134 @@ + + + + +

    + UTF-8 test +

    +

    + Iñtërnâtiônàlizætiøn +

    +
      +
    • +
      + Αα Alpha +
      +
    • +
    • +
      + Ββ Beta +
      +
    • +
    • +
      + Γγ Gamma +
      +
    • +
    • +
      + Δδ Delta +
      +
    • +
    • +
      + Εε Epsilon +
      +
    • +
    • +
      + Ζζ Zeta +
      +
    • +
    • +
      + Ηη Eta +
      +
    • +
    • +
      + Θθ Theta +
      +
    • +
    • +
      + Ιι Iota +
      +
    • +
    • +
      + Κκ Kappa +
      +
    • +
    • +
      + Λλ Lambda +
      +
    • +
    • +
      + Μμ Mu +
      +
    • +
    • +
      + Νν Nu +
      +
    • +
    • +
      + Ξξ Xi +
      +
    • +
    • +
      + Οο Omicron +
      +
    • +
    • +
      + Ππ Pi +
      +
    • +
    • +
      + Ρρ Rho +
      +
    • +
    • +
      + Σσς Sigma +
      +
    • +
    • +
      + Ττ Tau +
      +
    • +
    • +
      + Υυ Upsilon +
      +
    • +
    • +
      + Φφ Phi +
      +
    • +
    • +
      + Χχ Chi +
      +
    • +
    • +
      + Ψψ Psi +
      +
    • +
    • +
      + Ωω Omega +
      +
    • +
    + + diff --git a/src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook b/src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook new file mode 100644 index 000000000..443f6c6c0 --- /dev/null +++ b/src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook @@ -0,0 +1,30 @@ +[article UTF-8 test + [quickbook 1.5] +] + +[heading Iñtërnâtiônàlizætiøn] + +* Αα Alpha +* Ββ Beta +* Γγ Gamma +* Δδ Delta +* Εε Epsilon +* Ζζ Zeta +* Ηη Eta +* Θθ Theta +* Ιι Iota +* Κκ Kappa +* Λλ Lambda +* Μμ Mu +* Νν Nu +* Ξξ Xi +* Οο Omicron +* Ππ Pi +* Ρρ Rho +* Σσς Sigma +* Ττ Tau +* Υυ Upsilon +* Φφ Phi +* Χχ Chi +* Ψψ Psi +* Ωω Omega \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook b/src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook new file mode 100644 index 000000000..a7e589680 --- /dev/null +++ b/src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook @@ -0,0 +1,5 @@ +[article Parse error [quickbook 1.4]] + +[variablelist Variable List +[[1234]] +] diff --git a/src/boost/tools/quickbook/test/variablelist-1_5.gold b/src/boost/tools/quickbook/test/variablelist-1_5.gold new file mode 100644 index 000000000..08d66133e --- /dev/null +++ b/src/boost/tools/quickbook/test/variablelist-1_5.gold @@ -0,0 +1,107 @@ + + +
    + Variable List Tests + + Empty + + + One entry + + a + + + b + + + + + + One entry, multiple items + + a + + + b + + + c + + + + + + Several entries + + a + + + b + + + + + a + + + b + + + c + + + + + a + + + b + + + c + + + d + + + + + a + + + b + + + c + + + d + + + e + + + + + a + + + b + + + + + + + Variable List with anchors + + a + + + b + + + + +
    diff --git a/src/boost/tools/quickbook/test/variablelist-1_5.gold-html b/src/boost/tools/quickbook/test/variablelist-1_5.gold-html new file mode 100644 index 000000000..b430fdafd --- /dev/null +++ b/src/boost/tools/quickbook/test/variablelist-1_5.gold-html @@ -0,0 +1,103 @@ + + + + +

    + Variable List Tests +

    +
    +
    + a +
    +
    +

    + b +

    +
    +
    +
    +
    + a +
    +
    +

    + b +

    +

    + c +

    +
    +
    +
    +
    + a +
    +
    +

    + b +

    +
    +
    + a +
    +
    +

    + b +

    +

    + c +

    +
    +
    + a +
    +
    +

    + b +

    +

    + c +

    +

    + d +

    +
    +
    + a +
    +
    +

    + b +

    +

    + c +

    +

    + d +

    +

    + e +

    +
    +
    + a +
    +
    +

    + b +

    +
    +
    + +
    +
    + a +
    +
    +

    + b +

    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/variablelist-1_5.quickbook b/src/boost/tools/quickbook/test/variablelist-1_5.quickbook new file mode 100644 index 000000000..cb68a6df7 --- /dev/null +++ b/src/boost/tools/quickbook/test/variablelist-1_5.quickbook @@ -0,0 +1,30 @@ +[article Variable List Tests +[quickbook 1.5] +] + +[variablelist Empty +] + +[variablelist One entry + [[a][b]] +] + +[variablelist One entry, multiple items + [[a][b][c]] +] + +[variablelist Several entries + [[a][b]] + [[a][b][c]] + [[a][b][c][d]] + [[a][b][c][d][e]] + [[a][b]] +] + +[#id1] +[variablelist Variable List with anchors + [ + [[#id2]a[#id3]] + [[#id4]b[#id5]] + ] +] diff --git a/src/boost/tools/quickbook/test/version-0_1-fail.quickbook b/src/boost/tools/quickbook/test/version-0_1-fail.quickbook new file mode 100644 index 000000000..ac3c51250 --- /dev/null +++ b/src/boost/tools/quickbook/test/version-0_1-fail.quickbook @@ -0,0 +1,5 @@ +[article Non-existent version of quickbook + [quickbook 0.1] +] + +This should fail... \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/version-1_8-fail.quickbook b/src/boost/tools/quickbook/test/version-1_8-fail.quickbook new file mode 100644 index 000000000..4311034ba --- /dev/null +++ b/src/boost/tools/quickbook/test/version-1_8-fail.quickbook @@ -0,0 +1,5 @@ +[article Future version of quickbook + [quickbook 1.8] +] + +This should fail... \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/version-2_0-fail.quickbook b/src/boost/tools/quickbook/test/version-2_0-fail.quickbook new file mode 100644 index 000000000..973b174f6 --- /dev/null +++ b/src/boost/tools/quickbook/test/version-2_0-fail.quickbook @@ -0,0 +1,5 @@ +[article Far future version of quickbook + [quickbook 2.0] +] + +This should fail... \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/versions/Jamfile.v2 b/src/boost/tools/quickbook/test/versions/Jamfile.v2 new file mode 100644 index 000000000..dd185d587 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/Jamfile.v2 @@ -0,0 +1,19 @@ +# +# Copyright (c) 2011 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/test/versions + : requirements + msvc:off + ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +test-suite quickbook.test : + [ quickbook-test versions-1_6 ] + [ quickbook-test invalid_macro-1_6 ] + ; diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold new file mode 100644 index 000000000..cb6241247 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold @@ -0,0 +1,36 @@ + + +
    + Invalid macro test + + Import: + + + + + okay + + + + + __invalid\macro__ + + + + + Include: + + + + + okay + + + + + bad + + + +
    diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html new file mode 100644 index 000000000..52455ec95 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html @@ -0,0 +1,39 @@ + + + + +

    + Invalid macro test +

    +

    + Import: +

    +
      +
    • +
      + okay +
      +
    • +
    • +
      + __invalid\macro__ +
      +
    • +
    +

    + Include: +

    +
      +
    • +
      + okay +
      +
    • +
    • +
      + bad +
      +
    • +
    + + diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook new file mode 100644 index 000000000..860d58b71 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook @@ -0,0 +1,14 @@ +[article Invalid macro test +[quickbook 1.6] +] + +Import: + +[import invalid_macro-inc-1_1.quickbook] + +* __valid__ +* __invalid\macro__ + +Include: + +[include invalid_macro-inc-1_1.quickbook] diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook b/src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook new file mode 100644 index 000000000..c44bd6741 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook @@ -0,0 +1,7 @@ +[quickbook 1.1] + +[def __valid__ okay] +[def __invalid\macro__ bad] + +* __valid__ +* __invalid\macro__ diff --git a/src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook b/src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook new file mode 100644 index 000000000..be5365055 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook @@ -0,0 +1,15 @@ +[article 1.1 Templates +[quickbook 1.1] +] + +[template section_1_1[] +[section In a 1.1 template] +Some text +[endsect] +] + +[section 1.1 Document] +[section_1_1] +[section_1_4] +[section_1_5] +[endsect] diff --git a/src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook b/src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook new file mode 100644 index 000000000..8b565512d --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook @@ -0,0 +1,20 @@ +[article 1.4 Templates +[quickbook 1.4] +] + +[template section_1_4[] +[section In a 1.4 template] +Some text +[endsect] +] + +[section 1.4 Document] +[section_1_1] +[section_1_4] +[section_1_5] +[endsect] + +[/ Odd test for calling 1.4 -> 1.5 -> 1.4 template] + +[template skip_1_5[a] [skip_1_5_2 wrong]] +[template skip_1_5_3[] [a]] diff --git a/src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook b/src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook new file mode 100644 index 000000000..9dd07f693 --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook @@ -0,0 +1,19 @@ +[article 1.5 Templates +[quickbook 1.5] +] + +[template section_1_5[] +[section In a 1.5 template] +Some text +[endsect] +] + +[section 1.5 Document] +[section_1_1] +[section_1_4] +[section_1_5] +[endsect] + +[/ Odd test for calling 1.4 -> 1.5 -> 1.4 template] + +[template skip_1_5_2[a] [skip_1_5_3]] diff --git a/src/boost/tools/quickbook/test/versions/versions-1_6.gold b/src/boost/tools/quickbook/test/versions/versions-1_6.gold new file mode 100644 index 000000000..7b89fdc3d --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/versions-1_6.gold @@ -0,0 +1,114 @@ + + +
    + Mixed version tests + + correct + +
    + <link linkend="mixed_version_tests.section_ids">Section ids in templates</link> +
    + <link linkend="mixed_version_tests.section_ids.in_a_1_1_template">In + a 1.1 template</link> + + Some text + +
    +
    + <link linkend="mixed_version_tests.section_ids.in_a_1_4_template">In + a 1.4 template</link> + + Some text + +
    +
    + <link linkend="mixed_version_tests.section_ids.in_a_1_5_template">In + a 1.5 template</link> + + Some text + +
    +
    +
    + 1.1 Templates +
    + 1.1 Document +
    + In a 1.1 template + + Some text + +
    +
    + In a 1.4 template + + Some text + +
    +
    + In a 1.5 template + + Some text + +
    +
    +
    +
    + 1.4 Templates +
    + <link linkend="1_4_templates.1_4_document">1.4 Document</link> +
    + <link linkend="1_4_templates.1_4_document.in_a_1_1_template">In a + 1.1 template</link> + + Some text + +
    +
    + <link linkend="1_4_templates.1_4_document.in_a_1_4_template">In a + 1.4 template</link> + + Some text + +
    +
    + <link linkend="1_4_templates.1_4_document.in_a_1_5_template">In a + 1.5 template</link> + + Some text + +
    +
    +
    +
    + 1.5 Templates +
    + <link linkend="1_5_templates.1_5_document">1.5 Document</link> +
    + <link linkend="1_5_templates.1_5_document.in_a_1_1_template">In a + 1.1 template</link> + + Some text + +
    +
    + <link linkend="1_5_templates.1_5_document.in_a_1_4_template">In a + 1.4 template</link> + + Some text + +
    +
    + <link linkend="1_5_templates.1_5_document.in_a_1_5_template">In a + 1.5 template</link> + + Some text + +
    +
    +
    +
    diff --git a/src/boost/tools/quickbook/test/versions/versions-1_6.gold-html b/src/boost/tools/quickbook/test/versions/versions-1_6.gold-html new file mode 100644 index 000000000..f895a387f --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/versions-1_6.gold-html @@ -0,0 +1,239 @@ + + + + +

    + Mixed version tests +

    +
    +

    + Table of contents +

    + +
    +

    + correct +

    +
    +

    + Section ids in templates +

    +
    +
    +
    +

    + In a 1.1 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.4 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.5 template +

    +
    +

    + Some text +

    +
    +
    +
    +
    +

    + 1.1 Templates +

    +
    +

    + Table of contents +

    + +
    +
    +

    + 1.1 Document +

    +
    +
    +
    +

    + In a 1.1 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.4 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.5 template +

    +
    +

    + Some text +

    +
    +
    +
    +
    +
    +

    + 1.4 Templates +

    +
    +

    + Table of contents +

    + +
    +
    +

    + 1.4 Document +

    +
    +
    +
    +

    + In a 1.1 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.4 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.5 template +

    +
    +

    + Some text +

    +
    +
    +
    +
    +
    +

    + 1.5 Templates +

    +
    +

    + Table of contents +

    + +
    +
    +

    + 1.5 Document +

    +
    +
    +
    +

    + In a 1.1 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.4 template +

    +
    +

    + Some text +

    +
    +
    +
    +

    + In a 1.5 template +

    +
    +

    + Some text +

    +
    +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/versions/versions-1_6.quickbook b/src/boost/tools/quickbook/test/versions/versions-1_6.quickbook new file mode 100644 index 000000000..fed5a93ea --- /dev/null +++ b/src/boost/tools/quickbook/test/versions/versions-1_6.quickbook @@ -0,0 +1,26 @@ +[quickbook 1.6] +[article Mixed version tests] + +[import templates-inc-1_1.quickbook] +[import templates-inc-1_4.quickbook] +[import templates-inc-1_5.quickbook] + +[/ This test calls a 1.4 template -> 1.5 template -> 1.4 template. + The name lookup in the 1.4 template should skip the 1.5 template + when doing dynamic name lookup. ] +[skip_1_5 correct] + +[/ When calling templates from old versions, the ids should + be consistent with their context ] + +[section:section_ids Section ids in templates] +[section_1_1] +[section_1_4] +[section_1_5] +[endsect] + +[/ For comparison] + +[include templates-inc-1_1.quickbook] +[include templates-inc-1_4.quickbook] +[include templates-inc-1_5.quickbook] diff --git a/src/boost/tools/quickbook/test/xinclude/Jamfile.v2 b/src/boost/tools/quickbook/test/xinclude/Jamfile.v2 new file mode 100644 index 000000000..4e18d4f17 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/Jamfile.v2 @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005 João Abecasis +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/test/xinclude + : requirements + msvc:off + ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +path-constant xinclude_base1 : ../.. ; +path-constant xinclude_base2 : sub ; +path-constant xinclude_base3 : . ; + +test-suite quickbook.test : + [ quickbook-test xinclude-1_1 : : : $(xinclude_base1) ] + [ quickbook-test xmlbase1-1_6 : : : $(xinclude_base1) ] + [ quickbook-test xmlbase2-1_6 : : : $(xinclude_base1) ] + [ quickbook-test xinclude-1_1-alt : xinclude-1_1.quickbook : xinclude-1_1-alt.gold : $(xinclude_base2) ] + [ quickbook-test xmlbase1-1_6-alt : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt.gold : $(xinclude_base2) ] + [ quickbook-test xmlbase2-1_6-alt : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt.gold : $(xinclude_base2) ] + [ quickbook-test xinclude-1_1-alt2 : xinclude-1_1.quickbook : xinclude-1_1-alt2.gold : $(xinclude_base3) ] + [ quickbook-test xmlbase1-1_6-alt2 : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt2.gold : $(xinclude_base3) ] + [ quickbook-test xmlbase2-1_6-alt2 : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt2.gold : $(xinclude_base3) ] + [ quickbook-error-test xmlbase-1_6-fail ] + ; diff --git a/src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect b/src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect new file mode 100644 index 000000000..099a233ec --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect @@ -0,0 +1,2 @@ +This directory just contains simple test files, which might be disrupted by +adding copyright etc. diff --git a/src/boost/tools/quickbook/test/xinclude/sub/stub.xml b/src/boost/tools/quickbook/test/xinclude/sub/stub.xml new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold new file mode 100644 index 000000000..cffe5296c --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold @@ -0,0 +1,9 @@ + + +
    + Include + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html new file mode 100644 index 000000000..8046a7261 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html @@ -0,0 +1,9 @@ + + + + +

    + Include +

    + + diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold new file mode 100644 index 000000000..7c2e40063 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold @@ -0,0 +1,9 @@ + + +
    + Include + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold new file mode 100644 index 000000000..0a5707f78 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold @@ -0,0 +1,9 @@ + + +
    + Include + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html new file mode 100644 index 000000000..8046a7261 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html @@ -0,0 +1,9 @@ + + + + +

    + Include +

    + + diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook new file mode 100644 index 000000000..9405e4e78 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook @@ -0,0 +1,6 @@ +[article Include] + +[xinclude ../stub.xml] +[xinclude stub.xml] +[xinclude sub/stub.xml] +[xinclude ../xinclude] diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook b/src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook new file mode 100644 index 000000000..899b4a2b4 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook @@ -0,0 +1,4 @@ +[article Xmlbase fail +[quickbook 1.5] +[xmlbase non-existent] +] diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold new file mode 100644 index 000000000..29a84ca26 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold @@ -0,0 +1,10 @@ + + +
    + XInclude with xmlbase + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html new file mode 100644 index 000000000..76a1871b7 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html @@ -0,0 +1,9 @@ + + + + +

    + XInclude with xmlbase +

    + + diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold new file mode 100644 index 000000000..1c2ccc2fc --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold @@ -0,0 +1,10 @@ + + +
    + XInclude with xmlbase + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold new file mode 100644 index 000000000..4c97e0de9 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold @@ -0,0 +1,10 @@ + + +
    + XInclude with xmlbase + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html new file mode 100644 index 000000000..76a1871b7 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html @@ -0,0 +1,9 @@ + + + + +

    + XInclude with xmlbase +

    + + diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook new file mode 100644 index 000000000..2656c7abf --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook @@ -0,0 +1,9 @@ +[article XInclude with xmlbase +[quickbook 1.6] +[xmlbase .] +] + +[xinclude ../stub.xml] +[xinclude stub.xml] +[xinclude sub/stub.xml] +[xinclude ../xinclude] diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold new file mode 100644 index 000000000..6cfa197b5 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold @@ -0,0 +1,10 @@ + + +
    + XInclude with xmlbase + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html new file mode 100644 index 000000000..76a1871b7 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html @@ -0,0 +1,9 @@ + + + + +

    + XInclude with xmlbase +

    + + diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold new file mode 100644 index 000000000..e3b2f6274 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold @@ -0,0 +1,10 @@ + + +
    + XInclude with xmlbase + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold new file mode 100644 index 000000000..f3507d337 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold @@ -0,0 +1,10 @@ + + +
    + XInclude with xmlbase + + + + +
    diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html new file mode 100644 index 000000000..76a1871b7 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html @@ -0,0 +1,9 @@ + + + + +

    + XInclude with xmlbase +

    + + diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook new file mode 100644 index 000000000..252bacca1 --- /dev/null +++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook @@ -0,0 +1,9 @@ +[article XInclude with xmlbase +[quickbook 1.6] +[xmlbase ../include] +] + +[xinclude ../stub.xml] +[xinclude stub.xml] +[xinclude sub/stub.xml] +[xinclude ../xinclude] diff --git a/src/boost/tools/quickbook/test/xml_escape-1_2.gold b/src/boost/tools/quickbook/test/xml_escape-1_2.gold new file mode 100644 index 000000000..bd28ae439 --- /dev/null +++ b/src/boost/tools/quickbook/test/xml_escape-1_2.gold @@ -0,0 +1,42 @@ + + + + + + + & should be &amp;, < should &lt; + + + + & should be &amp;, < should &lt; + + + Test that &, < are being escaped. +
    + Escapes & explicitly written markup + + + + & -> &amp; + + + + + < -> &lt; + + + + + > -> &gt; + + + + + " -> &quot; + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/xml_escape-1_2.gold-html b/src/boost/tools/quickbook/test/xml_escape-1_2.gold-html new file mode 100644 index 000000000..4b4bd7529 --- /dev/null +++ b/src/boost/tools/quickbook/test/xml_escape-1_2.gold-html @@ -0,0 +1,54 @@ + + + + +

    + Test that &, < are being escaped. +

    +
    +

    + & should be &amp;, < should &lt; +

    +
    +
    +

    + Table of contents +

    + +
    +
    +

    + Escapes & explicitly written markup +

    +
    +
      +
    • +
      + & -> &amp; +
      +
    • +
    • +
      + < -> &lt; +
      +
    • +
    • +
      + > -> &gt; +
      +
    • +
    • +
      + " -> &quot; +
      +
    • +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/xml_escape-1_2.quickbook b/src/boost/tools/quickbook/test/xml_escape-1_2.quickbook new file mode 100644 index 000000000..66a6086cc --- /dev/null +++ b/src/boost/tools/quickbook/test/xml_escape-1_2.quickbook @@ -0,0 +1,14 @@ +[library Test that &, < are being escaped. + [quickbook 1.2] + [purpose & should be &amp;, < should &lt;] + [license & should be &amp;, < should &lt;] +] + +[section Escapes & explicitly written markup] + +* & -> & +* < -> < +* > -> > +* " -> " + +[endsect] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/xml_escape-1_5.gold b/src/boost/tools/quickbook/test/xml_escape-1_5.gold new file mode 100644 index 000000000..f8f33edd2 --- /dev/null +++ b/src/boost/tools/quickbook/test/xml_escape-1_5.gold @@ -0,0 +1,43 @@ + + + + + + + & should be &amp;, < should &lt; + + + + & should be &amp;, < should &lt; + + + Test that &, < are being escaped. +
    + <link linkend="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes + & explicitly written markup</link> + + + + & -> &amp; + + + + + < -> &lt; + + + + + > -> &gt; + + + + + " -> &quot; + + + +
    +
    diff --git a/src/boost/tools/quickbook/test/xml_escape-1_5.gold-html b/src/boost/tools/quickbook/test/xml_escape-1_5.gold-html new file mode 100644 index 000000000..4b4bd7529 --- /dev/null +++ b/src/boost/tools/quickbook/test/xml_escape-1_5.gold-html @@ -0,0 +1,54 @@ + + + + +

    + Test that &, < are being escaped. +

    +
    +

    + & should be &amp;, < should &lt; +

    +
    +
    +

    + Table of contents +

    + +
    +
    +

    + Escapes & explicitly written markup +

    +
    +
      +
    • +
      + & -> &amp; +
      +
    • +
    • +
      + < -> &lt; +
      +
    • +
    • +
      + > -> &gt; +
      +
    • +
    • +
      + " -> &quot; +
      +
    • +
    +
    +
    + + diff --git a/src/boost/tools/quickbook/test/xml_escape-1_5.quickbook b/src/boost/tools/quickbook/test/xml_escape-1_5.quickbook new file mode 100644 index 000000000..642e1b537 --- /dev/null +++ b/src/boost/tools/quickbook/test/xml_escape-1_5.quickbook @@ -0,0 +1,14 @@ +[library Test that &, < are being escaped. + [quickbook 1.5] + [purpose & should be &, < should <] + [license & should be &, < should <] +] + +[section Escapes & explicitly written markup] + +* & -> & +* < -> < +* > -> > +* " -> " + +[endsect] \ No newline at end of file -- cgit v1.2.3